optimize: optimize 401 issues for some links

[ ] I have registered the PR changes.

Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?

fixes #6355
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

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

:exclamation: No coverage uploaded for pull request base (develop@b550f11). Click here to learn what that means.

:exclamation: Current head 65fbe3b differs from pull request most recent head c633c92. Consider uploading reports for the commit c633c92 to get more accurate results

Additional details and impacted files

@@            Coverage Diff             @@
##             develop    #6361   +/-   ##
==========================================
  Coverage           ?   48.43%
  Complexity         ?     4155
==========================================
  Files              ?      794
  Lines              ?    28084
  Branches           ?     3426
==========================================
  Hits               ?    13602
  Misses             ?    13054
  Partials           ?     1428


Updated messages

Problem
Updated messages for new release.
Solution
make messages
Acceptance Criteria
integration tests pass

coverage: 100.0%. remained the same
when pulling aafd0bc56c3eedbcb9287cf53dffb9093e5b6c26 on matthewhegarty:updated-messages
into 017184db23ea3ad6320afe723e2df4ae87f0867c on django-import-export:main.


daily schedule not respected

hi, i've this setup:
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
  name: scheduled-volume-snapshotter
spec:
  gitImplementation: go-git
  interval: 24h
  ref:
    tag: v0.14.1
  timeout: 20s
  url: https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: ${release}
  namespace: ${namespace}
spec:
  interval: 1m
  timeout: 10m
  releaseName: ${release}
  targetNamespace: ${namespace}
  test:
    enable: true
    timeout: 10m
  chart:
    spec:
      chart: helm/charts/scheduled-volume-snapshotter
      sourceRef:
        kind: GitRepository
        name: scheduled-volume-snapshotter
      interval: 24h
  values:
    # see https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter/tree/main/helm/charts/scheduled-volume-snapshotter
    schedule: "*/5 * * * *"
    rbac:
      enabled: true
    successfulJobsHistoryLimit: 3
    failedJobsHistoryLimit: 1
    logLevel: INFO
    startingDeadlineSeconds: 120

apiVersion: k8s.ryanorth.io/v1beta1
kind: ScheduledVolumeSnapshot
metadata:
  name: ha-lts-snapshots-hourly
  namespace: ${namespace}
spec:
  # see https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter#scheduling-snapshots
  # see https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter/blob/main/helm/charts/scheduled-volume-snapshotter/crds/scheduled-volume-snapshot-crd.yaml
  snapshotClassName: ${release}
  persistentVolumeClaimName: ha-core-data-lts
  snapshotFrequency: 1h
  snapshotRetention: 4h
  snapshotLabels:
    frequency: hourly
    envName: ${envName}

apiVersion: k8s.ryanorth.io/v1beta1
kind: ScheduledVolumeSnapshot
metadata:
  name: ha-lts-snapshots-daily
  namespace: ${namespace}
spec:
  # see https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter#scheduling-snapshots
  # see https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter/blob/main/helm/charts/scheduled-volume-snapshotter/crds/scheduled-volume-snapshot-crd.yaml
  snapshotClassName: ${release}
  persistentVolumeClaimName: ha-core-data-lts
  snapshotFrequency: 24h
  snapshotRetention: 7d
  snapshotLabels:
    frequency: daily
    envName: ${envName}

apiVersion: k8s.ryanorth.io/v1beta1
kind: ScheduledVolumeSnapshot
metadata:
  name: ha-lts-snapshots-weekly
  namespace: ${namespace}
spec:
  # see https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter#scheduling-snapshots
  # see https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter/blob/main/helm/charts/scheduled-volume-snapshotter/crds/scheduled-volume-snapshot-crd.yaml
  snapshotClassName: ${release}
  persistentVolumeClaimName: ha-core-data-lts
  snapshotFrequency: 7d
  snapshotRetention: 30d
  snapshotLabels:
    frequency: weekly
    envName: ${envName}

but something is broken in how it manages daily snapshots... in image, the 1st 4 lines are good, it took a daily snapshot on days march 19, 20, 21, and 22, at about 13:10... then it went wrong, from the 5th lines and below, all those snapshots are all of day march 22, about 10-15 minutes far each from an other...

nothing changed in deployed resources, and i've an other problem now, many snapshots are broken because it says an other one was already there on the same share, even if i completely remove all the offending snapshots (all those with ready: false)...
Status:
  Bound Volume Snapshot Content Name:  snapcontent-fae7a4ed-2fd3-47a3-b9e7-438ebcb3f63e
  Error:
    Message:     Failed to check and update snapshot content: failed to take snapshot of the volume <IP_ADDRESS>#mnt/kube_data#mongodb/lab/datadir-common-mongodb-hidden-0_pvc-0132f065-a5d2-49
0b-903c-2be6345dbd1e#pvc-0132f065-a5d2-490b-903c-2be6345dbd1e#: "rpc error: code = Internal desc = failed to mount src nfs server: rpc error: code = Aborted desc = An operation with the given
 Volume ID <IP_ADDRESS>#mnt/kube_data#mongodb/lab/datadir-common-mongodb-hidden-0_pvc-0132f065-a5d2-490b-903c-2be6345dbd1e#pvc-0132f065-a5d2-490b-903c-2be6345dbd1e# already exists"
    Time:        2024-03-25T15:00:09Z
  Ready To Use:  false

what's going on? how to fix? Thanks in advance

Could you provide the yaml of one of or two of those snapshots from your screenshot above that are being created every 15 minutes? My best guess is something is wrong with this logic when determining if we should create a new snapshot, but having the YAML associated with one of these snapshots in a bad state would help determine if that is the case

Actually, I believe it is trying to create a new snapshot because of this logic where it sees a new snapshot has not been successfully created within the last 24 hours, so it attempts to create a new one. It would be interesting to see the state of these snapshots (i.e. the YAML) to see if they are in an error state or something else

@ryaneorth sorry for the delay, i'm back to work today... thanks for your answers, yes, here it is:
this is a working one:
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  creationTimestamp: "2024-03-23T03:40:07Z"
  deletionGracePeriodSeconds: 0
  deletionTimestamp: "2024-03-23T07:40:08Z"
  finalizers:
  - snapshot.storage.kubernetes.io/volumesnapshot-bound-protection
  generation: 2
  labels:
    envName: lab
    frequency: hourly
    scheduled-volume-snapshot: common-mongodb-snapshots-hourly
  name: common-mongodb-snapshots-hourly-1711165207
  namespace: lab
  resourceVersion: "379413284"
  uid: 5ccf69b1-bb3c-4786-b401-91a95cd42ec6
spec:
  source:
    persistentVolumeClaimName: datadir-common-mongodb-hidden-0
  volumeSnapshotClassName: lab-common-mongodb-snapshots
status:
  boundVolumeSnapshotContentName: snapcontent-5ccf69b1-bb3c-4786-b401-91a95cd42ec6
  creationTime: "2024-03-23T04:04:00Z"
  readyToUse: true
  restoreSize: "61743560"

this is a broken one:
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  creationTimestamp: "2024-04-02T07:41:21Z"
  finalizers:
  - snapshot.storage.kubernetes.io/volumesnapshot-as-source-protection
  - snapshot.storage.kubernetes.io/volumesnapshot-bound-protection
  generation: 1
  labels:
    envName: lab
    frequency: hourly
    scheduled-volume-snapshot: common-mongodb-snapshots-hourly
  name: common-mongodb-snapshots-hourly-1712043681
  namespace: lab
  resourceVersion: "398226498"
  uid: f869c9fb-a398-43c6-944e-52a696fee29f
spec:
  source:
    persistentVolumeClaimName: datadir-common-mongodb-hidden-0
  volumeSnapshotClassName: lab-common-mongodb-snapshots
status:
  boundVolumeSnapshotContentName: snapcontent-f869c9fb-a398-43c6-944e-52a696fee29f
  error:
    message: 'Failed to check and update snapshot content: failed to take snapshot
      of the volume <IP_ADDRESS>#mnt/kube_data#mongodb/lab/datadir-common-mongodb-hidden-0_pvc-0132f065-a5d2-490b-903c-2be6345dbd1e#pvc-0132f065-a5d2-490b-903c-2be6345dbd1e#:
      "rpc error: code = Internal desc = failed to mount src nfs server: rpc error:
      code = Aborted desc = An operation with the given Volume ID <IP_ADDRESS>#mnt/kube_data#mongodb/lab/datadir-common-mongodb-hidden-0_pvc-0132f065-a5d2-490b-903c-2be6345dbd1e#pvc-0132f065-a5d2-490b-903c-2be6345d
bd1e#
      already exists"'
    time: "2024-04-02T07:42:13Z"
  readyToUse: false

unfortunately i lost the old ones as rotation occurred in this weekend and some were deleted...

@ryaneorth i even tried cleaning up every broken snapshot, but as soon as it restarts creating new ones, it again fails... the only thing i didn't clean up was the nfs storage where the snapshots are, i was waiting for your feedback in case you needed some logs from them, to replicate this behaviour...

Thanks @fragolinux for those details. That confirms why it is continually trying to create the snapshot: because of the code I linked to in my last comment. Specifically, the logic is set to see if there was a successful snapshot created within the time threshold specified by the Scheduled volume snapshot. In your case because the snapshots are failing, it will keep trying to create them.
How would you expect the scheduled volume snapshotter to behave in this case when there are failed snapshots? Would you expect it to not continue to try to create them?

That seems reasonable to me. I can look at adding in that functionality, but it might not be for a few days. If you need it sooner I definitely welcome contributions!

@fragolinux - does it look like the changes I made in PR #27 will meet your needs?

hi @ryaneorth , yes, thanks! I think that allowing to delete the failed ones (with an additional flag) is beyond the scope of your project... i need to implement some sort of monitoring to be alerted if something fails, anyway... my problem was that the nfs storage i was using was full (by the failed snapshots themselves, so it could be useful to get rid of them, as they're of no use and just waste storage space...

Sounds good! I've merged the PR and created a new release with the changes: v0.15.0


Scrambled text after installing Ultra lobster

I am on Obsidian 1.0.3 with vault with many plugins
After installing and enabling Ultra Lobster the text of the Obsidian menu is scrambled

I am not able to reproduce this in the Obsidian Sandbox, I will investigate the situation

Hi! I was just wondering if this issue is still happening. Did you say it was or was not working in a blank vault without any plugins?

it is solved when I tried installing it now, it was happening only in my vault, not in the Sanboxed one


id messageData EXC_BAD_INSTRUCTION problem

I have been trying to run my code with swift and parse but every time i try and initialize the cell, I get a the error at that line in the FlowLayout file. Any thoughts?

Figured it out! :)

Please share the solution! :smile: others might find it helpful

I was doing an invalid typecasting on my PFObject which kept throwing the error. So I just deleted the typecast and then it worked! :)


Scale down London and Ireland cell counts

What
Both were a good number higher than was necessary. Numbers have been chosen to give a little wiggle room on top of what's already accounted for, so that we have time to address it if we're growing into that buffer.
London

Ireland

How to review
Do you agree with the numbers? Suggest others?

🚨⚠ Please do not merge this pull request via the GitHub UI ⚠🚨

I think they're both a bit extreme - we'd be getting DiegoCellRepMemoryCapacity before the end of the week as it momentarily touched the limit for some reason.

What would you suggest?

Maybe 123 and 18?

Have adjusted to those numbers


[BUG] : Footer UI Issue

The footer is aligned with the bottom screen.
I can be improved by adjusting the CSS Styles.
@Alitindrawan24 please assign this issue to me under hacktoberfest.
Thank You!

@Artemiskgg1 already assigned


Documentation clarification on host naming

Include in documentation the expectations of hostnames for each of the nodes.
TASK [login_server : Install ipa server] ****************************************************
fatal: [<IP_ADDRESS>]: FAILED! => {"changed": true, "cmd": ["ipa-server-install", "-n", "compute.test", "--hostname=mgr-1.compute.test", "-a", "myipapassword", "-p", "mydmpassword", "-r", "COMPUTE.TEST", "--setup-dns", "--auto-forwarders", "--auto-reverse", "-U"], "delta": "0:00:00.836839", "end": "2021-09-18 22:46:20.198555", "msg": "non-zero return code", "rc": 1, "start": "2021-09-18 22:46:19.361716", "stderr": "ipapython.admintool: ERROR    The host name mgr-1.compute.test does not match the primary host name mgr-1.c.asu-ke-rto-gcp-sandbox.internal. Please check /etc/hosts or DNS name resolution\nipapython.admintool: ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information", "stderr_lines": ["ipapython.admintool: ERROR    The host name mgr-1.compute.test does not match the primary host name mgr-1.c.asu-ke-rto-gcp-sandbox.internal. Please check /etc/hosts or DNS name resolution", "ipapython.admintool: ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information"], "stdout": "Checking DNS domain compute.test, please wait ...\n\nThe log file for this installation can be found in /var/log/ipaserver-install.log\n==============================================================================\nThis program will set up the IPA Server.\n\nThis includes:\n  * Configure a stand-alone CA (dogtag) for certificate management\n  * Configure the Network Time Daemon (ntpd)\n  * Create and configure an instance of Directory Server\n  * Create and configure a Kerberos Key Distribution Center (KDC)\n  * Configure Apache (httpd)\n  * Configure DNS (bind)\n  * Configure the KDC to enable PKINIT\n\nWARNING: conflicting time&date synchronization service 'chronyd' will be disabled\nin favor of ntpd", "stdout_lines": ["Checking DNS domain compute.test, please wait ...", "", "The log file for this installation can be found in /var/log/ipaserver-install.log", "==============================================================================", "This program will set up the IPA Server.", "", "This includes:", "  * Configure a stand-alone CA (dogtag) for certificate management", "  * Configure the Network Time Daemon (ntpd)", "  * Create and configure an instance of Directory Server", "  * Create and configure a Kerberos Key Distribution Center (KDC)", "  * Configure Apache (httpd)", "  * Configure DNS (bind)", "  * Configure the KDC to enable PKINIT", "", "WARNING: conflicting time&date synchronization service 'chronyd' will be disabled", "in favor of ntpd"]}

Is your feature request related to a problem? Please describe.
The parameters -n and --hostname pull from configuration and/or host query, but when not matching, fail without instruction.
no_log prevents immediate troubleshooting feedback.
Describe the solution you'd like
While ensuring a FQDN is already a best-practice, the mismatch of the /etc/hostname and domain_name attribute initially provides no help. If no_log were disabled for this task, or if the playbook could otherwise check this earlier in the play, that would suffice.
Describe alternatives you've considered
The mapping.csv already contains the IP/hostname.  Is a completely independent boolean variable that executes hostnamectl set-hostname <fqdn> early in the playbook possible?
This would reduce the number of separate pre-playbook tasks required to basically ssh-copy-id.

@asu-wdizon no_log is for security reason, so that playbook doesn't log the password. Enhancement which you have suggested, we will take it in our 1.2 release which will following 1.1, we are almost at the end of 1.1.

@asu-wdizon , We have documented the following in the Known Issues section of Readme.md,
Issue: The FreeIPA server and client installation fails.
Cause: The hostnames of the manager and login nodes are not set in the correct format.
Resolution: If you have enabled the option to install the login node in the cluster, set the hostnames of the nodes in the format: hostname.domainname. For example, manager.omnia.test is a valid hostname for the login node. Note: To find the cause for the failure of the FreeIPA server and client installation, see ipaserver-install.log in the manager node or /var/log/ipaclient-install.log in the login node.

For security reasons we have set no_log. So we have provided the log path for the user to find the actual cause of failure.


Errors with inifile 3.0

Error: Could not run Puppet configuration client: /usr/lib/ruby/gems/1.8/gems/inifile-3.0.0/lib/inifile.rb:558: undefined (?...) sequence: /\A"(.*)(?<!\\)"\z/

This is on the current HEAD.

Update: downgrading inifile to 2.0.2 worked on 1.8.7.
Suggestions:
Document that ruby 1.8.7 needs ijnifile 2.0.0.
Change that syntax to be 1.8.7 compatible.

Either will do, do you want to provide PR for that?


[Q&A] Any palns for different dtypes for Q (query) and KV (kv-cache)?

Hi, All! This is just a question of whether there are such plans or not...
Right now, Flashinfer lib requires Q (query) and KV (kv-cache) to have the same dtype.
Just an example from the code, q and paged_kv have the same DTypeIn:
template <bool partition_kv, PosEncodingMode pos_encoding_mode, uint32_t num_stages_smem,
          uint32_t tile_size_per_bdx, uint32_t vec_size, uint32_t bdx, uint32_t bdy, uint32_t bdz,
          PageStorage page_storage, QKVLayout kv_layout, typename DTypeIn, typename DTypeOut,
          typename IdType>
__global__ void BatchDecodeWithPagedKVCacheKernel(
    DTypeIn* __restrict__ q, IdType* __restrict__ q_offset,
    paged_kv_t<page_storage, kv_layout, DTypeIn, IdType> paged_kv,
    kv_partition_info_t<IdType> kv_partition_info, DTypeOut* __restrict__ o,
    DTypeOut* __restrict__ tmp, float* __restrict__ lse, float sm_scale, float rope_rcp_scale,
    float rope_rcp_theta)

Are there any plans to support different dtypes for KV-cache and Q (query)?
My personal interest is fp8 for kv-cache and fp16 for query.
Thank you in advance!
cc @yzh119

Thanks for your suggestions. Sure, I think we can definitely support it, and using fp8 for kv-cache and fp16 for q sounds reasonable to me.
I'll separate the DTypeIn to DTypeQ and DTypeKV in the kernel implementations, and the python APIs doesn't have to change.

Seconding this - I was actually thinking of submitting a PR myself. @yzh119 let me know if you need any help on this (from what I can tell, it should be quite straightforward).

let me know if you need any help on this (from what I can tell, it should be quite straightforward).
Sounds good, I would really appreciate your help!

can we expect fp8 support for prefill any time soon?

Yes we are in the last step of dealing with transposed ldmatrix for fp8 (for V matrix). It should be available soon :)

Ok, let me see if I can get a PR going this week!


Text edits

[x] Figure 1: Explanation should be “U.S. Water Withdrawals” not “U.S. Water Use” ("Explanation" = "legend")
[x] Figure 1: Explanation “(millions of gallons per day)” should be “(million gallons per day)”
[x] Figure 2: Insert “withdrawals” into this sentence: “The national breakdown of water withdrawals is as follows:”
[x] Figure 2: Add "of water" to "The U.S. states and territories used over 322 billion gallons [of water] per day in 2015. "
[x] Figure 2: Change "over" to "nearly" or "about" in "The U.S. states and territories used [XXoverXX nearly] 322 billion gallons [of water] per day in 2015. "
[ ] Figure 2: “U.S. states” reads “United States states”, so instead maybe “The U.S., including the territories of Puerto Rico and the U.S. Virgin Islands,”
[ ] Figure 2: “We use water in different ways to serve many economically and culturally important needs.” We all felt “cultural” was not the right word. Perhaps… “We use water in different ways to meet our everyday domestic needs and to serve many important economic purposes.”
[ ] Figure 2: “Together” is misspelled on the pie chart blurb “Domestic, livestock, aquaculture, and mining compose the "other" category and togther make up approximately 5 percent of total withdrawals.”
[ ] Figure 2-3: This sentence is long, consider breaking it up: “While you can still see that irrigation and thermoelectric are the largest, there is a stark contrast between the East, where thermoelectric is dominant, and the West, where irrigation is dominant.”
[ ] Figure 2-3: “stark contrast” - we see “stark” having negative connotations. Maybe “striking contrast”
[ ] Figure 3: Consider adding a figure caption to the pies map
[ ] Figure 4: Add "blue" to "Drag a [blue] state over its matching bar", and color the word blue w/ the appropriate blue color
[ ] Bottom blurb and references: Remove this sentence: “The USGS Water Availability and Use Science Program hopes to produce higher spatial resolution and more frequent reports in the future”, replace with a separate paragraph or bullet saying “More information on the USGS Water Availability and Use Science Program.”
[ ] Bottom blurb: Remove “accurately” from this sentence: “This information is essential to [XaccuratelyX] understand how future water demands will be met”

Good point. I'm OK with 'American states and territories', or 'States and territories of the U.S.', or - now that you've pointed it out - even 'U.S. states and territories'


[AutoPR billing/resource-manager] fix: billing/resource-manager/Microsoft.Billing

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/5481

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/4412


Cigar tag needs removing

Apparently we have a tag and the component.

I'll take this one.

Is this relevant given the CigPack and CigarCase use the tags Cigarette and Cigar respectively to prevent all other items from being placed within? It could be done and the whitelist changed to work off Cigar component but then you could put cigarettes in the cigar case, which would still have the visualizer show it as if there were cigars inside.


Wrong!

The command on Windows:  *dotnet new --uninstall .*
Does NOT work!  You have to enter the ENTIRE and COMPLETE, FULL Path that contains the .template..config folder. DO NOT include  a trailing slash either.

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

ID: d9cb6bd4-1194-91fa-014c-2e72d809e772
Version Independent ID: c3fddda9-24c1-f20c-a1b6-6aeea61d6e53
Content: Create an item template for dotnet new - .NET CLI
Content Source: docs/core/tutorials/cli-templates-create-item-template.md
Product: dotnet-fundamentals
GitHub Login: @adegeo
Microsoft Alias: adegeo

@ChrisM-1231 Hello, sorry this isn't working for you. I just went and verified with some other templates I have that the commands do work. Can you please give more information about what version of dotnet you're running, which sdk/runtimes are installed, and verify that your terminal was currently navigated to the folder where the .template.config folder exists. Here is an example of myself running it successfully:

I have all the frameworks installed on this machine and all the dotNET Core stuff as well. I followed the directions on the page explicitly and double checked everything 3 times. What’s interesting is the same steps repeated a second time yielded different results. For example, I’m STILL not quite certain exactly HOW I was finally able to remove my test templates.
Chris Millensifer
Senior Software Developer
303-518-4402
<EMAIL_ADDRESS>www.zolldata.comhttp://www.zolldata.com/
@.***
An Asahi Kasei Group Company
This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use or disclosure is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
@.***https://events.bizzabo.com/367009
From: Andy (Steve) De George @.>
Sent: Wednesday, March 16, 2022 10:30 AM
To: dotnet/docs @.>
Cc: Chris Millensifer @.>; Mention @.>
Subject: Re: [dotnet/docs] Wrong! (Issue #28680)
This message originated from the Internet. Please be careful when opening any attachments.

@ChrisM-1231https://urldefense.com/v3/__https:/github.com/ChrisM-1231__;!!EzxY8wA2a6DAUw!m32olPDz0CN8nGaCaNBU8BdyzaHq85t1Ytqf4nI6Ao1rpoiayHLI6Scao7SrBjZz$ Hello, sorry this isn't working for you. I just went and verified with some other templates I have that the commands do work. Can you please give more information about what version of dotnet you're running, which sdk/runtimes are installed, and verify that your terminal was currently navigated to the folder where the .template.config folder exists. Here is an example of myself running it successfully:
[image]https://urldefense.com/v3/__https:/user-images.githubusercontent.com/67293991/158639257-5a8d8852-e693-40ed-a2ae-a749f5456315.png__;!!EzxY8wA2a6DAUw!m32olPDz0CN8nGaCaNBU8BdyzaHq85t1Ytqf4nI6Ao1rpoiayHLI6Scao9JJCDxU$
—
Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/dotnet/docs/issues/28680*issuecomment-1069322876__;Iw!!EzxY8wA2a6DAUw!m32olPDz0CN8nGaCaNBU8BdyzaHq85t1Ytqf4nI6Ao1rpoiayHLI6Scao-MQKpow$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AX52HAYLJECGXGNJZBWTDLLVAIEAZANCNFSM5QZ6EXEQ__;!!EzxY8wA2a6DAUw!m32olPDz0CN8nGaCaNBU8BdyzaHq85t1Ytqf4nI6Ao1rpoiayHLI6Scao10RLV7v$.
Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!EzxY8wA2a6DAUw!m32olPDz0CN8nGaCaNBU8BdyzaHq85t1Ytqf4nI6Ao1rpoiayHLI6Scao_b_3-n2$ or Androidhttps://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!EzxY8wA2a6DAUw!m32olPDz0CN8nGaCaNBU8BdyzaHq85t1Ytqf4nI6Ao1rpoiayHLI6ScaoxlJYXOC$.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>


x/mod/module: MatchPrefixPattern doesn't match when glob ends with trailing slash

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

$ go version
go version go1.16.5 darwin/arm64

Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
```
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/hauyang/Library/Caches/go-build"
GOENV="/Users/hauyang/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/hauyang/go/pkg/mod"
GONOPROXY="github.com/zeals-co-ltd/"
```

What did you do?
I want to get a private repo with GOPRIVATE, but I failed. The reason is the url ends with salsh /.

What did you expect to see?
Ends with slash should be fine for url
What did you see instead?
failed to get the private repo

This looks like a proxy server thing, but I am not super-familiar with that part of the system (so I need a little help).
Can you provide the command, or a similar example, that failed?
And if you leave the slash off the end, does it work as you expected?

I have opened a CL for this


🚀 Feature: Have TypeScript documentary link to / mention my timestamps

Bug Report Checklist

[X] I have tried restarting my IDE and the issue persists.
[X] I have pulled the latest main branch of the repository.
[X] I have searched for related issues and found none that matched my issue.

Overview
@agulen recently pointed out that joshuakgoldberg.com/speaking -> Documentaries doesn't explain when I'm in the TypeScript Documentary. It'd nice for family & friends to just point them to my location, so they don't have to sit through the whole thing if they're in a hurry.
Additional Info
For reference, I'm there a couple times:

28:20 - 30:00 (primary): introduced; offered cookies; "embrace extend extinguish"; TypeScript adoption at Microsoft
1:14:20 - 1:15:10 (secondary): talked about improving onboarding & errors explanations

Co-authored-by: @agulen

@allcontributors add @agulen for idea


Jekyll is once again emitting a putrescent stench

Run gem install bundler
Successfully installed bundler-2.2.5
Parsing documentation for bundler-2.2.5
Installing ri documentation for bundler-2.2.5
Done installing documentation for bundler after 5 seconds
1 gem installed
Fetching gem metadata from http://rubygems.org/.........
listen-3.2.1 requires ruby version >= 2.2.7, ~> 2.2, which is incompatible with
the current version, ruby 3.0.0p0
Error: Process completed with exit code 5.

Builds that worked last week are now all failing like that.

Does anyone know a web framework thats actually good - that doesnt break all the time? #unreliable

Jekyll is good, but it takes Ruby knowledge to keep shelf stable that shouldn't be necessary on a non-Ruby project.  Where stability is the primary requirement, I like the single-binary approach of Hugo.  For a Scala project like this, I recommend paradox, which is managed through SBT.


when running as normal user, nix-shell misses groff

the command:
nix-shelll --help
as normal user, issues a "groff: command not found."
as root it runs fine.
as so does:
nix-shell -p groff --run 'nix-shell --help'
O.o ... groff should be included in user space by default... :)

lolz... :D
installed "man", and all is fine now... :)
[ thank you very much ]


disable tooltip on click and show input filed instead of tooltip value?

Is this possible? It would be convenient if you can click and see input where you enter number, hit enter and show tooltip with value again, of course with slide to that value.

Is it possible to use the tooltip's slot implementation?

You can't because that is part of this dot slot and it is always movable.

I achieved it like this:
<template slot="tooltip" slot-scope="{ value }">

        <input v-show="editingValue" v-model="newValue" v-on:change="pushValue('slider', newValue)" />
        {{inputValue}}

</template>

The variable "editingValue" hides and shows the input/span
The v-on:click.stop prevents the event propagation and movement of the dot when you click on the tooltip, then launches the "editValue" function:
methods: {
    editValue (sliderId) {
            this.editingValue = true;
            this.newValue = '';
    },
    pushValue(slider, newValue) {
            this.editingValue = false;
            this.slider.value = newValue;
    }
}

@BarbaraWiacek this works only if slider  contains one value. What if it is a range or multiple values?

Well you could use a custom input component that emit input/blur or w/e events with the value and catch it in the slider component, then change the sliders value with the provided function.
Let me know if this helped at all, or if i should be more precise.


Fine-tune with custom-dataset

Hi,
I have a custom dataset in CSV format containing [ Text, Aspect, Label (Polarity) ]. I wanted to know how can I finetune any PyABSA model from your repository for APC.
Can you please list out the steps needed to achieve that?
I understand that I need to create a dataset in the required format to fine-tune, using ABSA Dataset, but I don't see any method to directly convert the data from CSV format to the required one i.e this
In addition to this, do you also have a script to store inference in CSV directly instead of printing?
Thanks in advance!

Currently, the datasets are either processed by users-selves or annotated using the DPT tool in ABDADatasets, no available scripts now for converting, as I cant foresee the CSV format of other users.
To use APC models, you can:

Write a script to convert your data and put it in the same location of ABSADatasets(named integrated_datasets in your project)
Select a demo script for APC, e.g., here

It already have a saving function, you can just activate saving by setting save_result=True as this example

@yangheng95 Thank you for such a detailed reply, I will write the script for the same and if possible will contribute.


BUG - Seeing metrics from untagged resources (v0.27.0-alpha)

Recently updated from v0.25.0-alpha to v0.27.0-alpha, and updated the config to match the breaking changes.  However, we are now getting metrics (specifically RDS metrics) for untagged resources.
Here is an example of my config file for the RDS section:
discovery:
  jobs:
  - type: rds
    period: 60
    length: 60
    regions:
      - us-east-1
    searchTags:
      - key: Name
        value: my-database
      - key: service
        value: myservice
    metrics:
      - name: FreeStorageSpace
        statistics:
        - Average
        - Minimum
        - Maximum
        - Sum
        - SampleCount

Previously with this config, we returned metrics for only a single database (which is desired, as our team has only one database but the company has hundreds).  After the update, however, we are seeing many more metrics come through, and I have identified that the metrics are for all the RDS databases that have no tags whatsoever, not even Name.  I do not believe this is expected behavior.  Here are some examples of metrics that come through for untagged databases:
aws_rds_free_storage_space_minimum{account_id="1111111111111",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="db.t2.micro",dimension_EngineName="",name="global",region="us-east-1"} 1.8980446208e+10
aws_rds_free_storage_space_minimum{account_id="1111111111111",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="db.t2.small",dimension_EngineName="",name="global",region="us-east-1"} 1.1863068672e+10
aws_rds_free_storage_space_minimum{account_id="1111111111111",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="db.t3.medium",dimension_EngineName="",name="global",region="us-east-1"} 7.335497728e+09
aws_rds_free_storage_space_minimum{account_id="1111111111111",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="db.t3.small",dimension_EngineName="",name="global",region="us-east-1"} 7.863328768e+09

We seen to get one metric series per instance class for all our untagged databases.
Any assistance you can provide will be greatly appreciated.  For now, I am going to rollback to the old version.  Thanks!

We are testing latest tag: v0.28.0-alpha
and we same type of metrics also:
# HELP aws_rds_cpuutilization_average Help is not implemented yet.
# TYPE aws_rds_cpuutilization_average gauge
aws_rds_cpuutilization_average{account_id="655922159383",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="",dimension_EngineName="",name="global",region="us-east-1",tag_service_env="",tag_service_group=""} 5.09993833744417
aws_rds_cpuutilization_average{account_id="655922159383",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="",dimension_EngineName="mariadb",name="global",region="us-east-1",tag_service_env="",tag_service_group=""} 1.8498766748883408
aws_rds_cpuutilization_average{account_id="655922159383",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="",dimension_EngineName="sqlserver-se",name="global",region="us-east-1",tag_service_env="",tag_service_group=""} 8.35
aws_rds_cpuutilization_average{account_id="655922159383",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="db.m5.large",dimension_EngineName="",name="global",region="us-east-1",tag_service_env="",tag_service_group=""} 8.35
aws_rds_cpuutilization_average{account_id="655922159383",dimension_DBInstanceIdentifier="",dimension_DatabaseClass="db.t3.medium",dimension_EngineName="",name="global",region="us-east-1",tag_service_env="",tag_service_group=""} 1.8498766748883408

Same issue with filter on RDS  in v0.28.0-alpha, ec2 and s3  filters work well at same time

Observing the same strange behavior. May I ask to properly address the issue? It seems to be ignored for half of the year already. Version 0.33.0

@begemotik that makes me sad to see a message like that. I am working hard on this project in my free time and it does not provide me any money to pay my bills.
I understand your frustration that a bug is not resolved for such a long time.
I wish you would have more understanding of my situation and instead of showing me for how long it is not fixed, get me some help into the project. - Either monetary or time (by contributing).

I just re-read the message and realized how rude it was. I sincerily sorry for that

No worries. Have a nice day!
The issue is on my radar and I bet this week I won't be able to find time for it but I will try to get some insights into this bug for next week.
Greetings ;)

I don't have any RDS resources to prove this out but I think I have an idea of what's going on here as I did some research on this for #468.
The single tagged RDS resource likely exposes the dimension DatabaseClass in the list-metrics API. The dimension likely looks a lot like the EC2 version,
{
    "Namespace": "AWS/EC2",
    "MetricName": "CPUUtilization",
    "Dimensions": [
        {
            "Name": "InstanceType",
            "Value": "t2.micro"
        }
    ]
},

This dimension is not linked back to your tagged instance so when requesting metric data for the dimension you see those extra metrics which are coming from other instances. I can't quite explain why you are seeing values across all the different DatabaseClass values but it's possible those values are all being returned by list-metrics. You can test it via calling list-metrics on the CLI for your instance.

Hi,
I'm using version v0.32.0-alpha and I'm seeing metrics from other RDS instances ( from tag such as Env: prod) even though setting SearchTags to only Env: dev
Do we have some trick here to fix that ?
Thanks in advance
    - type: rds       enableMetricData: true       regions:         - ${aws_region}       roles:       - roleArn: ${assume_cw_role_infra}       awsDimensions:         - DBInstanceIdentifier       searchTags:         - key: Env           value: dev       metrics:         - name: CPUUtilization           statistics:           - Average           period: 300           length: 3600

For the fresh versions (v0.38.0-alpha in my case) need to use dimensionNameRequirements instead of awsDimensions
  jobs:
  - type: rds
    regions:
      - us-east-1
    searchTags:
    - key: Environment
      value: stage
    dimensionNameRequirements: [DBInstanceIdentifier]

that did the trick


Replaced command to be used

Replaced command to be used to tab through configurable properties on the storage account.

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

We'll close this pull request because the contributor account has been closed.


kapp deploy suddenly doesn't work anymore

What steps did you take:
Yesterday I started working with kapp (nice tool! :D) in my win-10 docker-desktop-k8s ... simple setup, using lens to look into it, simple application to deploy (deployment, service, nginx-ingress, ....) nothing special so far ... And everything works well ...
kapp deploy -a "foo" -f .
I did this many many many times ... changed my yaml's, re-deployed etc.
I also deleted my app many times
kapp delete -a "foo"
Everything was fine
What happened:
BUT :D Today ... kapp deploy always fail with
"kapp: Error: error unmarshaling JSON: json: cannot unmarshal array into Go value of type map[string]interface {}"
And I have no glue why :(
Anything else you would like to add:
I removed all the things I installed with kapp yesterday
kapp list
kapp delete ...
Is there a debug/verbose mode or something?
Environment:
$kapp --version
kapp version 0.43.0
$kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:42:41Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}

OMG ... Shit ... sorry ... was my fault! :)
I was in the wrong directory today ... there are no yaml's at all ... and this cause this "result".
Mayb it would be good if kapp shows a different warning if no input files at all given?
Could be rejected.

Glad you are enjoying kapp!
Could you share the YAML that you are trying to deploy?
It'll be a big help.

Glad you are enjoying kapp! Could you share the YAML that you are trying to deploy? It'll be a big help.

That was the problem :D I run kapp deploy with "nothing" g

Oh I see! I am sorry I did not notice the comment you made later.
Keep having fun with kapp 🚀
Closing this issue.

The error I get while trying to deploy an empty directory is
kapp: Error: Trying to apply empty set of resources will result in deletion of resources on cluster. Refusing to continue unless --dangerous-allow-empty-list-of-resources is specified.

I am curious about what conditions led to that error message as we would definitely want it to be more helpful 🤔

Is it possible that this directory had YAML files that were improperly formatted or created for some other purpose?

You are right @100mik  ... there was a "EXPORT.yml" ... its just a configuration file.
So its seems I did it 100% wrong :D

Oops! Thanks for bringing this up.
Closing this for now, seems like Murphy's law is at play!


adding UNQUOTED_SUFFIX to sort_order

Summary of Changes
Fixes sort order when using standalone column model.
NOTE: I wonder if standalone column model should be deprecated or refactored so that it doesn't get out of sync with other column model? If primary purpose is for sample data loader, there is a different approach that we can take.
Tests
None
Documentation
None
CheckList
Make sure you have checked all steps below to ensure a timely review.

[x] PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"

In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

[x] PR includes a summary of changes.
[x] PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
[x] In case of new functionality, my PR adds documentation that describes how to use it.

All the public functions and the classes in the PR contain docstrings that explain what it does

[x] PR passes make test

Codecov Report

Merging #190 into master will decrease coverage by 0.14%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #190      +/-   ##
==========================================
- Coverage   82.07%   81.93%   -0.15%
==========================================
  Files          70       70
  Lines        3381     3382       +1
  Branches      364      351      -13
==========================================
- Hits         2775     2771       -4
- Misses        499      501       +2
- Partials      107      110       +3

Impacted Files
Coverage Δ

databuilder/models/standalone_column_model.py
79.62% <100%> (+0.38%)
:arrow_up:

...ilder/transformer/regex_str_replace_transformer.py
95.83% <0%> (-4.17%)
:arrow_down:

...abuilder/extractor/snowflake_metadata_extractor.py
93.44% <0%> (-1.64%)
:arrow_down:

...tabuilder/extractor/postgres_metadata_extractor.py
93.54% <0%> (-1.62%)
:arrow_down:

databuilder/publisher/neo4j_csv_publisher.py
84.07% <0%> (-1%)
:arrow_down:

databuilder/task/neo4j_staleness_removal_task.py
56.98% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

I think it should deprecate IMO as it is requested and used for csv/standalone use case from Shaun.

ok, to get rid of standalone column model, I would just need to add an extractor (that I have already implemented) that properly creates the table model using both columns and tables. I can put this in the sample script section.
If you would like, I can either modify this MR to go in that direction, or I can have that be a separate issue.

@samshuster let's merge this one. And have a new pr to remove this model.


Error about finding plots.jl file

It looks like Weave.jl is trying to find a file plots.jl relative to the current working directory. I my notebooks I often set the directory explicitly for searching for local resources, data etc. Recently it started throwing this error. It doesn't seem to negatively affect the operation - I still get my render out.
I'm using Weave v0.9.1, from within Atom/Juno using language-weave  v0.6.7.
julia> [ Info: Weaving chunk 1 from line 41
(compiled mode) evaluation error starting at /home/sfr/research_journal/2020/02/28/full_data_sdr/no
ne:0
  could not open file /home/sfr/research_journal/2020/02/28/full_data_sdr/plots.jl
Stacktrace:
 [1] include at ./boot.jl:328 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1105
 [3] include(::Module, ::String) at ./Base.jl:31
 [4] top-level scope at none:0
while evaluating
begin
    Base.include(Main, "plots.jl")
    __pkguuid__ = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
end
in module Weave

whoops, just realized I'm not on the latest Weave.jl. Updating seems to have resolve the issue. Sorry for the noise!

Whoops, actually after a fresh Julia reboot it seems I'm seeing the issue again.

I see the same. Base.include in the init() function in Weave.jl seems to search the file to include in the current directory instead of in the Weave module directory. The following fix solved the issue here.
function __init__()
    @require Plots="91a5bcdd-55d7-5caf-9e0b-520d859cae80" Base.include(Main, joinpath(dirname(pathof(Weave)), "plots.jl"))
    @require Gadfly="c91e804a-d5a3-530f-b6f0-dfbca275c004" Base.include(Main, joinpath(dirname(pathof(Weave)), "gadfly.jl"))
end


Add netstandard2.0 Target?

A netstandard2.0 target would be helpful when using Ical.Net in newer projects. The existing netstandard1.3 target allows referencing from .NET Core versions >= 3.0 as well, but adds additional, potentially unwanted dependencies.
@rianjs I'd consider working on the PRs and am asking, whether the work would be appreciated and (given the quality is ok) merged any time soon.
I saw that PRs for retargeting exist already but the changes are quite severe and partly breaking. I feel that it would be easier to merge a PR that introduces less changes and focusses more on backwards-compatibility.
This would be the approach:

Upgrade to the latest 2.x version of NodaTime (currently 2.4.13). Upgrading to 3.x would introduce too many changes for now and might be done in a separate project in the future. Updating to 2.x could be done in a PR separate from the one introducing the new target.
Introduce additional target netstandard2.0, while keeping today's targets netstandard1.3 and net46. This will maintain backwards-compatibility.
Clone the test project Ical.Net.CoreUnitTests (create a copy of the csproj file within the same directory). Reference the same tests but let one of the projects target netcoreapp3.1, while the other one keeps targeting netcoreapp2.0. Cloning the project instead of adding a new target to the existing test project seems to be beneficial when running the tests from within Visual Studio, because VS would only run the tests from a single target, not from all of the test project's targets.
Update Ical.Net.nuspec to also include the netstandard2.0 files
Change version no. to 4.2.0 (would this be done inside or outside of the PR?)

I recognize the discussion in #495. I agree, that the status quo of this project has a maturity level that is ready for productive use in many projects even without major further development. However, keeping the project up to date with newer versions of .NET seems to be a minimum requirement in order to stay useful.

@rianjs Any thoughts? Feedback would be appreciated, so we know, whether it's worth the effort..


refactor shutdown sequence to use plugin.stop

Change shutdown sequence to be triggered by plugin.stop instead of ShutdownSignal exception.
Also remove any calls to: shutdown, finished, finished?, running? or terminating?
This depends on https://github.com/elastic/logstash/pull/3895

How does this apply? I only use teardown during shutdown of the plugin.

@NickMRamirez see https://github.com/elastic/logstash/issues/3210#issuecomment-139284570 for details

There is no code here.  This will be addressed in forks, or when something is merged here.


[feature] Consider refactoring client kubeconfig logic

Current State:
several flows in the code involve initializing a local client using cfg, err := clientcmd.BuildConfigFromFlags("", os.Getenv("KUBECONFIG")).
This does 3 things:

makes every flow's function re-initialize a client from config, which may have already been initialized in a previous flow.
actively looking for a KUBECONFIG env var, and no fallbacks in case the user would like to read the default .kube or has provided the explicit flag.  often resulting in nasty errors.
tool initialization takes a client (client.go) where kubeconfig is being read with controller runtime's kubeconfig, err := ctrl.GetConfig().   this is a hierarchical config loading function which also considers an explicit --kubeconfig flag, and can fall back to default.
this, together with (1), may lead to a situation where initialization is successful but then a flow would fail to load a config.  creating inconsistency.

Proposed Solutions:

have every localized flow do ctrl.GetConfig() instead of BuildConfigFromFlags.   this will ensure consistency.
(better in my opinion) use and re-use a central, get-able client, initialized using the controller runtime method.  this will both ensure consistency and prevent re-initializing clients which may have already been created.

HI @itroyano, thanks for the suggestion! Agreed. Can you please list what flows you saw that need refactoring so that we can plan this accordingly? Could please point out the lines on the code where you catch the problem? Thanks again!

Hi @acmenezes
basically all the checks that go through initializing a client from config

vs the flows that go through

which is the function that does ctrl.GetConfig()
I'll have a PR up with suggestions soon.

Hi @itroyano just passing by here. Is this one still relevant? Let me know if you need any help. And would be glad to see your suggestions.

it does make sense to use the controller runtime GetConfig() method since it would use the precedence below:

--kubeconfig flag pointing at a file
KUBECONFIG environment variable pointing at a file
In-cluster config if running in cluster
$HOME/.kube/config if exists.

@itroyano Should I assign this to you?

/assign

@OchiengEd it does.
Also I want to "centralize" the initialization of Client & Config.  have functions that want a client, fetch it with a "get" rather than trying to initialize locally.
@acmenezes code has changed so I'll need to look at the above places one more time.

Sure @itroyano, let me know if you need any help.


Repurpose zinc ingot texture as orange metal ingot texture (copper)

@Yarden-zamir this can be deleted right?

@Yarden-zamir this can be deleted right?
yeah zinc has been removed, closing this issue.


⚠ Bofrost.fr has degraded performance

In 035ff78, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1375 ms

Resolved: Bofrost.fr performance has improved in 48b208d after 18 minutes.


Input field within a SortableElement loses focus on typing

I have a sorted list of divs. Within these divs, there are a few input fields. The value of these fields are maintained in the state - so every key press triggers a re-render. Everything works as expected, except for the fact that the input loses focus after each key press. See below:

I feel like I'm close to understanding this - but just can't figure out how to make it work. I've read through the issues, and it feels similar to #49. I know you have the shouldCancelStart and distance parameters (with shouldCancelStart defaulting to true for inputs, textareas, etc). But, it doesn't seem that disabling the drag is the problem (and indeed, perhaps the fact that I have a dragHandle makes these irrelevant).
I also thought that if I make sure everything in the SortableElement has a key, it would re-render and see that it was unchanged, but focus is still lost. Any ideas?
Thanks so much for your work on this project.

Hey @isTravis, try removing all instances of key, including in the elements inside your SortableElement, you shouldn't need those and they're probably what's causing the issues you're seeing.
I put together a basic example here with what you seem to be describing, and all seems well: https://jsfiddle.net/vr2Lh1sm/

Thanks so much for the example fiddle! I removed all of the keys I had manually inserted, but still no luck on my end. Looking at your example though, I'm more sure this is something strange about my setup rather than a library bug.
I'm pulling my list of items from props rather than state - as I have a redux action that fires on each drag event. I can't see why the SortableList would care about this though - it just sees an array, regardless of where it's pulled from.
I'll keep poking at it, and if I can't figure out anything, I'll post a minimal version of my setup and see if that helps in the debugging.
Thanks so much!

@isTravis did you find anything? I have the same problem and can't find why it happen (keys are ok)

Unfortunately, I haven't found anything yet. I can't see anything shady that I'm doing besides using props (and having multiple renders fire) on each update. To make it work in the meantime though, I just wound up doing the unspeakable - grabbing the values by their ids when needed:
const labelUpdates = {
     title: document.getElementById('editTitle').value,
     description: document.getElementById('editDescription').value
};
this.props.dispatch(submitForm( labelUpdates);

     Title
     <input type="text" id={'editTitle'} defaultValue={collection.title} />

     Description
     <textarea type="text" id={'editDescription'} defaultValue={collection.description} />

This works because I'm not calling setState on every keystroke. This makes it so the component isn't re-rendering and the focus is maintained.
Of course, if you need to update the state on every keystroke (to show a character count or something) - then I think you'll still have the same problem.

@isTravis thx for the feedback :)

Ok, i found why this happened in my case.
I was creating the SortableItem and SortableList inside my render method (before return) to make quick lib testing.
In this case, the classes was created at each render and in this case React reconciliation process discard and replace dom.
So i just needed to use same SortableItem and SortableList at each render to avoid this.

That makes sense! I'm also creating the SortableItem and SortableList components in my render method because the depend on a handful of props that I didn't want to send all over the place.  Though it may be a useful note somewhere in the docs that the sortable components can't be regenerated on each render.

@gouxlord you saved my life

@gouxlord Thanks so much for coming back and commenting on your solution to the problem. Legend. 👍

@gouxlord
just needed to use same SortableItem and SortableList classes at each render to avoid this.
There is some sample code?

Please give me an example code :)

I don't have my project anymore so here is how you have to do, based on your example (not tested)

const SortableItem = SortableElement(({value, sortIndex}) =>

          <input/>

);

const SortableList = SortableContainer(({items}) => {
    return (

            {items.map((value, index) => (
                <SortableItem key={`item-${index}`} index={index} value={value} sortIndex={index}/>
            ))}

    );
});
class Toto extends Component {
  render() {
        return (
            <SortableList items={this.state.items} onSortEnd={this.onSortEnd} helperClass="SortableHelper"/>
        );
    }
}

As far as i remember, @gouxlord is correct, you need to remove the <SortableList/> and <SortableItem/> outside of the render function to prevent it being re-instantiated on each render.

I had the same problem with an html table in which I have input text lines in a column. inside a loop I read a json object and I create rows in particular I have a column with inputtext.
        http://reactkungfu.com/2015/09/react-js-loses-input-focus-on-typing/

        I managed to solve it in the following way

    import { InputTextComponent } from './InputTextComponent';
    //import my  inputTextComponent
    ...

var trElementList = (function (list, tableComponent) {
var trList = [],
    trElement = undefined,
    trElementCreator = trElementCreator,
    employeeElement = undefined;

// iterating through employee list and
// creating row for each employee
for (var x = 0; x < list.length; x++) {

    employeeElement = list[x];

    var trNomeImpatto = React.createElement('tr', null, {employeeElement['NomeTipologiaImpatto'].toUpperCase()}	);
    trList.push(trNomeImpatto);

    trList.push(trElementCreator(employeeElement, 0, x));
    trList.push(trElementCreator(employeeElement, 1, x));
    trList.push(trElementCreator(employeeElement, 2, x));

} // end of for

return trList; // returns row list

function trElementCreator(obj, field, index) {
    var tdList = [],
        tdElement = undefined;

    //my input text
    var inputTextarea = <InputTextComponent
        idImpatto={obj['TipologiaImpattoId']}//index
        value={obj[columns[field].nota]}//initial value of the input I read from my json data source
        noteType={columns[field].nota}
        impattiComposite={tableComponent.state.impattiComposite}
        //updateImpactCompositeNote={tableComponent.updateImpactCompositeNote}
    />

    tdElement = React.createElement('td', { style: null }, inputTextarea);
    tdList.push(tdElement);

    var trComponent = createClass({

        render: function () {
            return React.createElement('tr', null, tdList);
        }
    });
    return React.createElement(trComponent);
} // end of trElementCreator

});
...
//my tableComponent
var tableComponent = createClass({
// initial component states will be here
// initialize values
getInitialState: function () {
return {
impattiComposite: [],
serviceId: window.sessionStorage.getItem('serviceId'),
serviceName: window.sessionStorage.getItem('serviceName'),
form_data: [],
successCreation: null,
};
},
    //read a json data soure of the web api url
    componentDidMount: function () {
        this.serverRequest =
            $.ajax({
                url: Url,
                type: 'GET',
                contentType: 'application/json',
                data: JSON.stringify({ id: this.state.serviceId }),
                cache: false,
                success: function (response) {
                    this.setState({ impattiComposite: response.data });
                }.bind(this),

                error: function (xhr, resp, text) {
                    // show error to console
                    console.error('Error', xhr, resp, text)
                    alert(xhr, resp, text);
                }
            });
    },

    render: function () {
...
React.createElement('table', {style:null}, React.createElement('tbody', null,trElementList(this.state.impattiComposite, this),))
...
}

        //my input text
        var inputTextarea = <InputTextComponent
                    idImpatto={obj['TipologiaImpattoId']}//index
                    value={obj[columns[field].nota]}//initial value of the input I read //from my json data source
                    noteType={columns[field].nota}
                    impattiComposite={tableComponent.state.impattiComposite}//impattiComposite  = my json data source

                />//end my input text

                tdElement = React.createElement('td', { style: null }, inputTextarea);
                tdList.push(tdElement);//add a component

    //./InputTextComponent.js
    import React from 'react';

    export class InputTextComponent extends React.Component {
      constructor(props) {
        super(props);
        this.state = {
          idImpatto: props.idImpatto,
          value: props.value,
          noteType: props.noteType,
          _impattiComposite: props.impattiComposite,
        };
        this.updateNote = this.updateNote.bind(this);
      }

    //Update a inpute text with new value insert of the user

      updateNote(event) {
        this.setState({ value: event.target.value });//update a state of the local componet inputText
        var impattiComposite = this.state._impattiComposite;
        var index = this.state.idImpatto - 1;
        var impatto = impattiComposite[index];
        impatto[this.state.noteType] = event.target.value;
        this.setState({ _impattiComposite: impattiComposite });//update of the state of the father component (tableComponet)

      }

      render() {
        return (
          <input
            className="Form-input"
            type='text'
            value={this.state.value}
            onChange={this.updateNote}>
          </input>
        );
      }
    }

@gouxlord Thank you very much

Thank you all!  In my case it's functional component and I had to move container/element out of it and it solved the issue.

I encountered this issue, I tried all the solutions & nothing fixed on my case, here is my code:
https://codesandbox.io/s/react-playground-6syv5

Thank you all! In my case it's functional component and I had to move container/element out of it and it solved the issue.

Hey! Can you please quote an example of how you solved it for a functional component? I have been trying it for a while now but doesn't seem to work. Any help would be appreciated. Thank you :)

Thank you all! In my case it's functional component and I had to move container/element out of it and it solved the issue.

Hey! Can you please quote an example of how you solved it for a functional component? I have been trying it for a while now but doesn't seem to work. Any help would be appreciated. Thank you :)

Hello, sorry I don't have an example on hand but IIRC I had a large end-result functional component that returns the SortableContainer and each SortableElement within the return.
Essentially what gouxlord and srsholmes mentioned above.  Your component should return another component that implements SortableContainer and its SortableElement.  Using the above example, my mistake was having the Toto component returning both SortableContainer and SortableElement directly.

Thank you all! In my case it's functional component and I had to move container/element out of it and it solved the issue.

Hey! Can you please quote an example of how you solved it for a functional component? I have been trying it for a while now but doesn't seem to work. Any help would be appreciated. Thank you :)

Hello, sorry I don't have an example on hand but IIRC I had a large end-result functional component that returns the SortableContainer and each SortableElement within the return.
Essentially what gouxlord and srsholmes mentioned above. Your component should return another component that implements SortableContainer and its SortableElement. Using the above example, my mistake was having the Toto component returning both SortableContainer and SortableElement directly.

Thank you so much for replying :) I had actually done that way from the very beginning. I had created a component which had SortableContainer and SortableElement implementation. My main component was returning this component. But no luck. I have now moved to react-beautiful-dnd. It works well for me. Thanks, again :)

Hello @jeremycy and @prateeksha-nf
Idk maybe it's late, but.. this is an example of how to solve this problem in a FUNCTIONAL COMPONENT case.
You just need to take 'em out of the main function:
const SortableItem = SortableElement(({value, sortIndex}) =>

          <input/>

);

const SortableList = SortableContainer(({items}) => {
    return (

            {items.map((value, index) => (
                <SortableItem key={`item-${index}`} index={index} value={value} sortIndex={index}/>
            ))}

    );
});

function MyApp() {
    const [items,setItems] = useState(["foo","bar"]);
    const onSortEnd = ({oldIndex, newIndex}) => {
        // ...
    }
    return (
        <SortableList items={items} onSortEnd={onSortEnd} helperClass="sortable-helper"/>
    );
}

export default MyApp;

Thank you @gouxlord for the inspiration.

Hola @jeremycy y @ prateeksha-nf
Idk tal vez sea tarde, pero ... este es un ejemplo de cómo resolver este problema en un caso de COMPONENTE FUNCIONAL .
Solo necesitas sacarlos de la función principal:
const  SortableItem  =  SortableElement ( ( { valor , sortIndex } )  =>

          < input / >

) ;

const  SortableList  =  SortableContainer ( ( { items } )  =>  {
    return  (

            { items . map ( ( valor ,  índice )  =>  (
                < SortableItem  key = { `item- $ { index } ` }  índice = { índice }  valor = { valor } sortIndex = { index } / >
            ) ) }

    ) ;
} ) ;

function  MyApp ( )  {
    const  [ items , setItems ]  =  useState ( [ "foo" , "bar" ] ) ;
    const  onSortEnd  =  ( { oldIndex , newIndex } )  =>  {
        // ...
    }
    return  (
        < SortableList  items = { items }  onSortEnd = { onSortEnd }  helperClass ="sortable-helper" / >
    ) ;
}

exportar  MyApp predeterminada  ;

Gracias @gouxlord por la inspiración.

No

Hello @jeremycy and @prateeksha-nf
Idk maybe it's late, but.. this is an example of how to solve this problem in a FUNCTIONAL COMPONENT case.
You just need to take 'em out of the main function:
const SortableItem = SortableElement(({value, sortIndex}) =>

          <input/>

);

const SortableList = SortableContainer(({items}) => {
    return (

            {items.map((value, index) => (
                <SortableItem key={`item-${index}`} index={index} value={value} sortIndex={index}/>
            ))}

    );
});

function MyApp() {
    const [items,setItems] = useState(["foo","bar"]);
    const onSortEnd = ({oldIndex, newIndex}) => {
        // ...
    }
    return (
        <SortableList items={items} onSortEnd={onSortEnd} helperClass="sortable-helper"/>
    );
}

export default MyApp;

Thank you @gouxlord for the inspiration.

No fue tarde para mí....esto resolvió mi problema
Gracias!


fastly: 10.4.0 -> 10.5.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/fastly/versions.
meta.description for fastly is: Command line tool for interacting with the Fastly API
meta.homepage for fastly is: https://github.com/fastly/cli
meta.changelog for fastly is: https://github.com/fastly/cli/blob/v10.5.0/CHANGELOG.md
Updates performed

Golang update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 10.5.0 with grep in /nix/store/xqs4gd3x974ybvhy6f0h0y16n6mrj4jg-fastly-10.5.0
found 10.5.0 in filename of file in /nix/store/xqs4gd3x974ybvhy6f0h0y16n6mrj4jg-fastly-10.5.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
fastly

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/xqs4gd3x974ybvhy6f0h0y16n6mrj4jg-fastly-10.5.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A fastly https://github.com/r-ryantm/nixpkgs/archive/52ed1bb836ec3f4bb258021b245174d1e92f9d6f.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/52ed1bb836ec3f4bb258021b245174d1e92f9d6f#fastly

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/xqs4gd3x974ybvhy6f0h0y16n6mrj4jg-fastly-10.5.0
ls -la /nix/store/xqs4gd3x974ybvhy6f0h0y16n6mrj4jg-fastly-10.5.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

fastly

Maintainer pings
cc @ereslibre @shyim for testing.

Result of nixpkgs-review pr 261968 run on x86_64-linux 1

1 package built:

fastly


docs: improve site's docs page

what's wrong with the documentation?

currently, our site's documentation is outdated, we need to improve & according to the updated contributing.md
need to add proper screenshots
add guide from forking to creating Pull request (with proper screenshots)

Add screenshots
n/a
Record

[X] I agree to follow this project's Code of Conduct
[ ] I'm a GSSoC'23 contributor
[ ] I want to work on this issue

I would like to work on it

I would like to work on it

assigned to you

I would like to work on it Please assign me this issue @priyankarpal

hi i wanted to work on this issue!

@priyankarpal you can assign this issue to others

I would like to work on it Please assign me this issue @priyankarpal

you can work on it


Raycasting causes exception in server tick loop

Game seems to crash when trying archers distillation.
Crash log below:
crash-2024-04-20_14.59.59-server.txt
Full log below:
latest.log

Immersive portals was not installed.
Suggestion:
Throw error if not detected.

https://github.com/Stick404/PortalHexAddon/commit/bbca8a6e5004f69ee4c416a4e0902a0ddd561ac5 Just fixed this


Make regexes compatible with latest oniguruma

The latest oniguruma forbids mixing of numbered (\1) and named (\k<name>) backreferences.
I'm using oniguruma and the grammars from vscode to build a terminal text editor.
Without this patch, I get errors like:
...
  File "/home/asottile/workspace/babi/venv/lib/python3.7/site-packages/onigurumacffi.py", line 143, in _compile_regex_t
    _check(ret, err_info)
  File "/home/asottile/workspace/babi/venv/lib/python3.7/site-packages/onigurumacffi.py", line 26, in _check
    raise OnigError(_err(code, *args))
onigurumacffi.OnigError: numbered backref/call is not allowed. (use name)

After fixing the two patterns I can successfully render the README of this project.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: asottile sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Thanks!


Ensuring Auth category can be tested from swift test

Issue #

In attempting to run unit tests from the command line using swift test, I noticed they crash because of a fatal being raised when attempting to fetch the current Auth plugin.
Description

This change is a proposal for the library to use placeholder plugins to avoid using such a big hammer like fatal.
General Checklist

[x] Added new tests to cover change, if needed
[x] Build succeeds with all target using Swift Package Manager
[x] All unit tests pass
[x] All integration tests pass
- [ ] Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
- [ ] Documentation update for the change if required
[x] PR title conforms to conventional commit style
[x] New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
- [ ] If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Closing this since the PR changes the internal of storing the plugin inside each category. We need to fix the internal of testing maybe to fix the issue - https://github.com/aws-amplify/amplify-swift/issues/2745#issuecomment-1638523542


same rotated bbox while iou == 0

box = [[0, 0], [100, 0], [200, 100], [100, 100]]
cal_iou(box,box)
while result iou is 0?
is this a bug or?

Would you please provide the complete code to reproduce the result? My previous code indeed has problems with the same boxes but I've already fixed it.
Also, I provide test cases in test_corner_cases.py some test cases to validate my code. Would you please send me the result you get?

i modify the representation of rbbox from (x,y,w,h,theta) -> (x1,y1,...,x4,y4) format in function cal_iou of oriented_iou_loss.py
    corners1 = box1     corners2 = box2     inter_area, _ = oriented_box_intersection_2d(corners1, corners2)  # (B, N)     #area1 = box1[:, :, 2] * box1[:, :, 3]     area1 = calc_area(corners1)     area2 = calc_area(corners2)     #area2 = box2[:, :, 2] * box2[:, :, 3]     u = area1 + area2 - inter_area     iou = inter_area / u     return iou, corners1, corners2, u
where calc_area function is from Shoelace Theorem
`def calculate_area(idx_sorted: torch.Tensor, vertices: torch.Tensor):
"""calculate area of intersection
Args:
    idx_sorted (torch.Tensor): (B, N, 9)
    vertices (torch.Tensor): (B, N, 24, 2)

return:
    area: (B, N), area of intersection
    selected: (B, N, 9, 2), vertices of polygon with zero padding
"""
idx_ext = idx_sorted.unsqueeze(-1).repeat([1, 1, 1, 2])
selected = torch.gather(vertices, 2, idx_ext)
total = selected[:, :, 0:-1, 0]*selected[:, :, 1:, 1] - \
    selected[:, :, 0:-1, 1]*selected[:, :, 1:, 0]
total = torch.sum(total, dim=2)
area = torch.abs(total) / 2
return area, selected`

if i am wrong, point out for me, thanks

I get your idea. You want to use corners directly as input instead of the five parameters. The idea is fine. The problem is, the box_1  in your test case is not a rectangle. In this case, my code doesn't work. (BTW, I got the correct result with box_2, which is a rectangle.)
Check the function box1_in_box2 in box_intersection_2d.py. This function assumes that the inputs are two rectangles. You should modify this function to make your code work.
The function is based on the projection of vectors and only works with rectangles. To support other types of polygons, you should use a more general method, such as point-in-polygon.

YES, i have found the problem, and i replace the follow function to replace the original box1_in_box2,
def box1_in_box2(corners1: torch.Tensor, corners2: torch.Tensor):
    """check if corners of box1 lie in box2
    Convention: if a corner is exactly on the edge of the other box, it's also a valid point

    Args:
        corners1 (torch.Tensor): (B, N, 4, 2)
        corners2 (torch.Tensor): (B, N, 4, 2)

    Returns:
        c1_in_2: (B, N, 4) Bool
    """
    # a->b->c->d  -->  b->c->d->a
    corners2_clockwise = torch.roll(corners2, -1, -2)
    # a->b->c->d  -->  d->a->b->c
    corners2_anti = torch.roll(corners2, 1, -2)
    edge_clockwise = corners2_clockwise - corners2
    edge_anti = corners2_anti - corners2
    edge_clockwise = edge_clockwise.unsqueeze(2).repeat([1, 1, 4, 1, 1])
    edge_anti = edge_anti.unsqueeze(2).repeat([1, 1, 4, 1, 1])

    # x dot for
    c1 = corners1.unsqueeze(3).repeat([1, 1, 1, 4, 1])
    c2 = corners2.unsqueeze(2).repeat([1, 1, 4, 1, 1])
    point_to_p = c1 - c2
    ABXAP = edge_clockwise[..., 0] * point_to_p[...,
                                                1] - edge_clockwise[..., 1] * point_to_p[..., 0]
    ADXAP = edge_anti[..., 0] * point_to_p[...,
                                           1] - edge_anti[..., 1] * point_to_p[..., 0]

    # (B, N, 4, 4)
    indicator = ABXAP * ADXAP
    indicator = indicator <= 0
    # (B, N , 4)
    indicator = indicator.all(dim=-1)

    return indicator

now, the iou of box_1 and box_2 is 0 while the correct iou is 0.3,
if the two polygon share several points, the  build_vertices function in
def oriented_box_intersection_2d(corners1: torch.Tensor, corners2: torch.Tensor):
    """calculate intersection area of 2d rectangles

    Args:
        corners1 (torch.Tensor): (B, N, 4, 2)
        corners2 (torch.Tensor): (B, N, 4, 2)

    Returns:
        area: (B, N), area of intersection
        selected: (B, N, 9, 2), vertices of polygon with zero padding
    """
    import pdb
    pdb.set_trace()
    inters, mask_inter = box_intersection_th(corners1, corners2)
    c12, c21 = box_in_box_th(corners1, corners2)
    vertices, mask = build_vertices(
        corners1, corners2, c12, c21, inters, mask_inter)

    sorted_indices = sort_indices(vertices, mask)
    return calculate_area(sorted_indices, vertices)

will add duplicate points, at the same time, the sorted_indices does not take mask into consideration,
the final iou is 0, do you have any idea to fix that case?

I don't have enough time to test your new code, since I have my own work. I can only give some basic ideas.
Yes, things would become tricky if the two polygons share points. In my code, I have to loose some conditions so that the IoU can be correctly calculated and the code is numerically stable. In my box1_in_box2 function, I use:
    cond1 = (p_ab / norm_ab > - 1e-6) * (p_ab / norm_ab < 1 + 1e-6)   # (B, N, 4)
    cond2 = (p_ad / norm_ad > - 1e-6) * (p_ad / norm_ad < 1 + 1e-6)   # (B, N, 4)

instead of the theoretical conditions:
    cond1 = (p_ab / norm_ab >= 0) * (p_ab / norm_ab <= 1)   # (B, N, 4)
    cond2 = (p_ad / norm_ad >= 0) * (p_ad / norm_ad <= 1)   # (B, N, 4)

I think you could probably modify the following line to loose the condition.
    indicator = indicator <= 0
Yes, I also saw the duplicated points previously. I've added some code in the CUDA-Kernel to remove them. Since the added part is like some sort of dirty hack, it might not work with your code. If the duplicated points are still a problem, you could consider modifying the CUDA-Kernel.
  // for corner case: the two boxes are exactly the same.
  // in this case, idx would have duplicate elements, which makes the shoelace formula broken
  // because of the definition, the duplicate elements only appear in the first 8 positions
  // (they are "corners in box", not "intersection of edges")
  if (num_valid[i] == 8){
      int counter = 0;
      for (int j=0; j<4; ++j){
          int check = idx[i*MAX_NUM_VERT_IDX + j];
          for (int k=4; k<INTERSECTION_OFFSET; ++k){
              if (idx[i*MAX_NUM_VERT_IDX + k] == check)
                  counter++;
          }
      }
      if (counter == 4){
          idx[i*MAX_NUM_VERT_IDX + 4] = idx[i*MAX_NUM_VERT_IDX + 0];
          for (int j = 5; j<MAX_NUM_VERT_IDX; ++j){
              idx[i*MAX_NUM_VERT_IDX + j] = pad;
          }
      }
  }

thanks for you time and advices,  I will try to fix it.


'adonis install' should run npm post-install hook

I think(??) I found a bug that adonis install does not run the postinstall npm script.
I noticed this because I used npm link to local packages. Well, npm 5 has a bug where running npm i unlinks packages. So I have a post-install to put them back.
It works with npm install but not with adonis install.

Hey @benallfree! 👋
This is somehow weird since adonis-cli use npm directly to install the package.
https://github.com/adonisjs/adonis-cli/blob/develop/src/Commands/Install/steps/install.js#L29

Closing since no response from the issue reporter and not actionable as well


Remove default.json because default is not intended for validation

Since default is not used for validation, it should not be in the test-suite.
See #139 as well as https://github.com/json-schema-org/json-schema-spec/issues/204

These tests are still correct though. Why would we want to remove them? They're testing that implementations do not misinterpret default, which yes is not used for validation.

What @Julian said.  Line 19 in the first file and other similar lines should perhaps be changed to not say "still valid when invalid default is used" but something like "still valid in the presence of an invalid default"

The reason to remove them is simply that their presence suggests to implementors that default s a meaning regarding validation. Since it does not, these tests are misleading.

@pipobscure in what way are they misleading though? These tests, if an implementation does not pass, indicates the implementation is not spec-conforming. That's the essence of tests, to indicate whether an implementation is correct or not :)

They are trying to catch the situation where someone assumes that a default must validate.  Since that is in fact a common misconception, it's a valid test.

@Julian they are null tests though. We might just as well at these tests then:
[
    {
        "description": "invalid type for julian",
        "schema": {
            "properties": {
                "foo": {
                    "type": "integer",
                    "julian": []
                }
            }
        },
        "tests": [
            {
                "description": "valid when property is specified",
                "data": {"foo": 13},
                "valid": true
            },
            {
                "description": "still valid when the invalid julian is used",
                "data": {},
                "valid": true
            }
        ]
    },
    {
        "description": "invalid string value for julian",
        "schema": {
            "properties": {
                "bar": {
                    "type": "string",
                    "minLength": 4,
                    "default": "bad"
                }
            }
        },
        "tests": [
            {
                "description": "valid when property is specified",
                "data": {"bar": "good"},
                "valid": true
            },
            {
                "description": "still valid when the invalid julian is used",
                "data": {},
                "valid": true
            }
        ]
    }
]

The julian keyword has no relevance at all, so why test for it.
On the other hand default is part of the specification, so the test has merit, but then we also need to add tests for description and title and all the other annotations.

@pipobscure they are not null tests :)
It seems like you mean to say "it is obvious that this behavior is correct because default is only for documentation", but we started exactly on the opposite side of that :), with the tests pointing out that fact itself.
The goal of a test is to ensure that an implementor is properly informed about incorrect assumptions they may have made. It is the closest to an explicit specification as you can possibly get reasonably.
If in fact anyone was worried that some implementor was going to introduce improper behavior for a non-existent julian property, yes precisely those tests should exist :), but there is no such worry, so they do not.
default however is a continuing source of confusion both for implementors and users, and the tests that are here (and perhaps even some that are missing) are exactly to make sure that no one makes a mistake in a place where such mistakes are rampant.

@handrews @Julian : OK, then. Let's just agree that the state of definition of default is a total mess. It's there, but has no value to validation whatever other than that it's not necessary to be valid. (Which also holds true of anything else I put into a schema).
I'd be free to add a standard property to a schema. That could/could-not need validate just like default. In other words, in the current state of the spec default is entirely superfluous and does nothing more than confuse implementors.
So I guess the best way forward would be to remove the default keyword from the spec altogether.

@pipobscure it's not superfluous (although it is very unclearly written).  It reserves the keyword for a specific sort of use, but does not constrain that use.  It prevents someone else from imposing other behavior on it, and it prevents different implementations from picking different keywords for the same sort of thing.  The SHOULD is also of note- it tells users that doing something other than what SHOULD advises can result in strange and useless behavior.

That is precisely what was intended. It forces anyone who wants to do something other than what is defined to use something else, and standardizes what is defined for anyone who does not.


Reduce memory allocations

This PR reduces memory allocations in:

onDraw(Canvas)
getClosestThumb(Float, Float)
initAttributes(AttributeSet).
updateGradient(). I'm not sure it's working right. In documentation doesn't mentioned whether positions and colors copied in constructor of SweepGradient. This is important because positions and colors are global and they mutates. But I'm sure that in setLocalMatrix argument matrix is copied.
initColors().

Haven't looked ar everything yet, but the colors and positions are cloned in then SweepGradient constructor.
See: https://android.googlesource.com/platform/frameworks/base/+/master/graphics/java/android/graphics/SweepGradient.java

I have looked at too much C++ code and I haven't noticed that. I was checking whether setLocalMatrix copies matrix in older versions of Android.

But from the another side, that isn't even important, because _sliderRangePaint.shader is assigned to new instance of SweepGradient and paint doesn't connected with old one.

But from the another side, that isn't even important, because _sliderRangePaint.shader is assigned to new instance of SweepGradient and paint doesn't connected with old one.

Yes, it indeed doesn't matter.

@pelmenstar1 sorry for the delay!


btrfs-progs: 4.13.1 -> 4.13.3

Motivation for this change
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

CCing maintainers @nckx @7c6f434c @wkennington

Oops, sorry for not noticing.


Pram0d’s Snow Bros 2 arcade core

Can this arcade core be added to the updater?
https://github.com/psomashekar/pram0d-pocket-dist-public

his cores are supported now


php deserves rockstars too

obviously

I am not sure and I thought @MarkWaldron had intentionally left out php :grimacing:

That's also what I thought :-( lol.

I am accepting the PR. Just received a call from Zuck.

@avinassh @jarnix I swear I didn't lol I just don't work with PHP very often


Upgrade fails from 9.8.1 to 9.9.0 - Could not load file or assembly 'MailKit'

Description of bug
Upgrade from 9.8.1 to 9.9.0 gives the error:  Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MailKit' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Steps to reproduce
List the precise steps to reproduce the bug:

Download the Upgrade package and remove the Block in Properties
Unzip to DNN directory
Go to URL:  http://localhost/dotnetnuke/install/install.aspx
See error

Current behavior
Explain the current behavior.
Cannot upgrade DNN due to error.
Expected behavior
Provide a clear and concise description of the expected behavior.
Upgrade process should not produce an error.
Screenshots
If applicable, provide screenshots to help explain the bug.

Error information
Provide any error information (console errors, error logs, etc.) related to this bug.
[FileLoadException: Could not load file or assembly 'MailKit' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]  [FileLoadException: Could not load file or assembly 'MailKit, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]    System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0    System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +37    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +159    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +80    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +22    System.Reflection.Assembly.Load(String assemblyString) +29    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +39  [ConfigurationErrorsException: Could not load file or assembly 'MailKit, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +777    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +229    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +140    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +176    System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +99    System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +310    System.Web.Compilation.BuildManager.ExecutePreAppStart() +165    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +590  [HttpException (0x80004005): Could not load file or assembly 'MailKit, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10087352    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263 --
Additional context
Provide any additional context that may be helpful in understanding and/or resolving the bug.
I looked in the Upgrade zip file for the MailKit manifest but could not easily locate it.
Upgrade file was DNN_Platform_9.9.0_Upgrade.zip
Affected version

[ ] 10.00.00 alpha build
[ X] 09.09.00 release
[ ] 09.08.01 latest supported release

Affected browser

[ ] Chrome
[X ] Firefox
[ ] Safari
[ ] Internet Explorer 11
[ ] Microsoft Edge (Classic)
[ ] Microsoft Edge Chromium

Do you have a third-party or custom solution that utilized MailKit for outbound email?

No, have never used it.  Just standard DNN mail.

Do you have a copy of the site from prior to the ugprade?  Was there a MailKit assembly included in the /bin directory?

Yes, mailkit.dll is in the bin directory, in addition to the web.config (see updated reply above).

@TopCat6 Ok, that makes the process pretty simple!
Before the upgrade - Copy the MailKit DLL
Unzip the upgrade
Replace the file
Figure out who put that there

@mitchelsellers Ok, I'll try that.  I found out that it was the Mandeeps Common Library that contained the MailKit:
v4.0.1 - 07/23/2020
New:

FIPS compatible licensing
MailKit Library for improved compatibility with IMAP & POP3

v4.0.5 is the latest version, so I'll update to that one first, then try your suggestion. I got this as part of the Porto skin package, so I don't really think I need the MailKit that comes with their common library, but so it goes.

@mitchelsellers Thanks for the guidance. Your suggestion worked and got me to the next error which was the same but for MimeKit.dll.  I substituted the old one and the install worked.
I guess I will take this up with Mandeeps support.

Perfect, I will close this issue then.

Pls, join testing DNN before it is released. If you want to join send me your email address and I will add you to our Slack group

Mandeeps support has prepared an updated version of their Common Library (v4.0.6) which fixes the issue and should be published soon.


Adding mapping to resource object from homepage.

Fixes #694

so the issue with it not showing was it not set to the current personId?  Thanks!

@tonysurma yes. The personId field was null and the EntryDate was 01/01/0001.  Probably just the result of some schema changes along the way.


Function loadJson() does not handle errors, can cause nil pointer panic

I have started testing the library a few days ago and just saw a first nil pointer panic like this:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4314fd8]

goroutine 22414 [running]:
github.com/pemistahl/lingua-go.loadJson(0xa834340, 0x45537a0)
	/Users/marian/go/pkg/mod/github.com/pemistahl/lingua-go@v1.0.3/json.go:37 +0x178
github.com/pemistahl/lingua-go.languageDetector.loadLanguageModels({{0xc01622a700, 0x1f, 0x1f}, 0x0, {0xc017283f80, 0xc, 0x10}, 0xc01312f320, 0xa834340, 0xa834240, ...}, ...)
	/Users/marian/go/pkg/mod/github.com/pemistahl/lingua-go@v1.0.3/detector.go:612 +0x8d
github.com/pemistahl/lingua-go.languageDetector.lookUpNgramProbability({{0xc01622a700, 0x1f, 0x1f}, 0x0, {0xc017283f80, 0xc, 0x10}, 0xc01312f320, 0xa834340, 0xa834240, ...}, ...)
	/Users/marian/go/pkg/mod/github.com/pemistahl/lingua-go@v1.0.3/detector.go:552 +0x146
github.com/pemistahl/lingua-go.languageDetector.computeSumOfNgramProbabilities({{0xc01622a700, 0x1f, 0x1f}, 0x0, {0xc017283f80, 0xc, 0x10}, 0xc01312f320, 0xa834340, 0xa834240, ...}, ...)
	/Users/marian/go/pkg/mod/github.com/pemistahl/lingua-go@v1.0.3/detector.go:526 +0x145
github.com/pemistahl/lingua-go.languageDetector.computeLanguageProbabilities({{0xc01622a700, 0x1f, 0x1f}, 0x0, {0xc017283f80, 0xc, 0x10}, 0xc01312f320, 0xa834340, 0xa834240, ...}, ...)
	/Users/marian/go/pkg/mod/github.com/pemistahl/lingua-go@v1.0.3/detector.go:484 +0xcb
github.com/pemistahl/lingua-go.languageDetector.lookUpLanguageModels({{0xc01622a700, 0x1f, 0x1f}, 0x0, {0xc017283f80, 0xc, 0x10}, 0xc01312f320, 0xa834340, 0xa834240, ...}, ...)
	/Users/marian/go/pkg/mod/github.com/pemistahl/lingua-go@v1.0.3/detector.go:452 +0xb7
created by github.com/pemistahl/lingua-go.languageDetector.ComputeLanguageConfidenceValues
	/Users/marian/go/pkg/mod/github.com/pemistahl/lingua-go@v1.0.3/detector.go:176 +0x455

Seems as if even reading from an embed File can fail at some point.
I'm using go version go1.17.2 darwin/amd64.

Thank you for reporting this @marians. Can you please show me your code which calls the library? When exactly did this error occur? I need more context to find out what's going on.

The code is not public currently. I'll copy a reduced version of my invocation here.

languages := []lingua.Language{
	lingua.Albanian,
	lingua.Basque,
	lingua.Bosnian,
	lingua.Bulgarian,
	lingua.Chinese,
	lingua.Catalan,
	lingua.Croatian,
	lingua.Czech,
	lingua.Danish,
	lingua.Dutch,
	lingua.English,
	lingua.Estonian,
	lingua.Finnish,
	lingua.French,
	lingua.German,
	lingua.Greek,
	lingua.Hungarian,
	lingua.Italian,
	lingua.Japanese,
	lingua.Latvian,
	lingua.Lithuanian,
	lingua.Macedonian,
	lingua.Polish,
	lingua.Portuguese,
	lingua.Romanian,
	lingua.Serbian,
	lingua.Slovak,
	lingua.Slovene,
	lingua.Spanish,
	lingua.Swedish,
	lingua.Unknown,
}

detector := lingua.NewLanguageDetectorBuilder().
	FromLanguages(languages...).
	Build()

// This part is called within a loop for many different text values.
confidenceValues := detector.ComputeLanguageConfidenceValues(text)
if len(confidenceValues) > 0 {
	result := confidenceValues[0].Language().IsoCode639_1().String()
}

Ah, I think I know what's wrong. You are trying to build the language detector by including lingua.Unknown. This does not make sense because this is not a real language. The function loadJson tries to find language models for lingua.Unknown but it cannot find any, of course. I've forgotten to check for lingua.Unknown and handle this case appropriately, so your issue is still valid. I'm going to fix it soon.
For the time being, please remove lingua.Unknown from your set of languages and you should be fine.

Thanks for the info!
My expectation (without reading up in this) was that having Unknown in the list, the classifier would be able to give "unknown" as the most likely result if the language was in fact not classified as one of the other ones. If that makes sense.

Well, one could guess so. But no, if the language cannot be reliably detected, lingua.Unknown is returned no matter if it has been included in the set of languages or not. I will make this more clear in the documentation. Thanks again for making me aware of this.


Update Product Owner and Scrum Master

Merge review required for feature-update-83

Reviewed with team, merge complete and tested with team Feb 19/22


[WIP] Change detection for single commits

This PR fixes issue #40

I am not sure if this is nicely unit testable. Any ideas @ksindi ?

Thanks again @mowies! Left a couple comments. Unfortunately I'm not sure how to test this either.

Thanks @mowies. Let me have a quick try. If all works I'll merge and deploy as 0.5.0.

Thanks again for the feature @mowies. If I can entice you on doing more issues like me know :-).

Awesome!
I can look through the other issues but I have to see if I can make time. Maybe even work time since I use buildkite at work :)