attachReactJsxNode convenience feature to help injecting React components in the "faked/compatibility" react JSX

What is the feature you are proposing?
#2508
Feature/Rationale
hono/jsx/dom in many cases now allows for interoperation with React UI libraries / components (guests) without actually running / mounting a real React renderer or explicitly wrapping user code in react-renderer middleware. However additional code/method sugar around in-place rendering of such guest React components might help code logic / DX.
Example of usage
We could take a React React component from shadcn or Tamagui or similar like:
https://ui.shadcn.com/docs/components/tooltip
and wrap it into a hono/honox (island) custom component like so (the styling issues are omitted here):
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger,}
from '@/components/ui/tooltip'
import { attachReactJsxNode } from 'hono/jsx/dom'

export default function TtDemo (/* props/children in case of a button/etc */) {

  const tt =
    <TooltipProvider>
      <Tooltip>
        <TooltipTrigger>Hover</TooltipTrigger>
        <TooltipContent>

Add to library

        </TooltipContent>
      </Tooltip>
    </TooltipProvider>

  return attachReactJsxNode(tt)  // children are handled in the JSX above
}

// On the higher level then: <><TtDemo /></> OR <MyTamaguiButton children attribs /> ...

(Also works with a simple Tamagui button as of 240520)
Reference implementation code of the idea
import { useEffect } from 'hono/jsx'
import { render } from 'hono/jsx/dom'
// import { v4 as uuidv4 } from 'uuid'
// import { nanoid } from 'nanoid/non-secure';

export function attachReactJsxNode (
  jsxNode: JSX.Element  // shall come from island or an other "browser-time" component (?) *
) {
  const mountPointId = _randomId()   // uuidv4() / nanoid()

  useEffect(() => {
    render(jsxNode, document.getElementById(mountPointId)!)
  }, [])

  return
}

// if no random id lib used, then:
function _randomId () { return Math.random().toString(36).replace(/^0\./, '_') }

Note: Children are handled in the ingress JSX
The above sample implementation code works. The actual implementation might better utilize the hono/useEffect internals or other dom lifecycle related internals.
*Please extend with the SSR/SSG aspects.

Hi @timurxyz
Thanks for creating the issue! Certainly this approach may make up for the incompleteness of hono's jsx. But hopefully we can get it to work without these workarounds.
https://ui.shadcn.com/docs/components/tooltip
Regarding this, just yesterday I created a PR that fixes jsx/dom and should work. This PR also adds useInsertionEffect. Would be glad to have you try to get it working on the PR branch if you can.

Regarding this, just yesterday I created a PR that fixes jsx/dom and should work. This PR also adds useInsertionEffect. Would be glad to have you try to get it working on the PR branch if you can.

Hi @usualoma , thank you!
And I tried your fix:

shadcn. It functionally works, though it might be a styling issue in my env that it shows like:

The actual useInsertionEffect request came from my experimenting with Tamagui to be ran by the compatibility layer so I tried that with the 4.3.8. hono.tgz. Added a Tamagui test into your hono-react-compat-demo. Please check out the results:
https://gitlab.com/6-1-6/xyz/usualoma-hono-react-compat-demo

As you will see, the basic test works after manually fixing the missing react:version feature (details in the README)

Resorted to import Tamagui components from their separate packages, the grand 'tamagui' package produces errors.

Tamagui Spinner, Toast, Switch and others fail to integrate due to the following issue:
Missing './jsx/dom/client' specifier in 'hono' package
May you see it as an issue, can it be fixed with a reasonable effort on your side, please?! (Let me know if this deserves a ticket.)

(The above is not related to this 2757, but chose to answer here. And will return to the actual attachReactJsxNode "workaround" topic a bit later soon, have some thoughts to share with you, please dont close yet. Ty!)

@timurxyz
Thanks for confirming and commenting! I understand the situation.

shadcn. it functionally works, though it might be a styling issue in my env that it shows like:.

Sorry, my demo only focused on the result of DOM changes and omitted the application of styles.
I have created a separate issue for the lack of version and client APIs, which I would like to discuss here.
https://github.com/honojs/hono/issues/2792

Hi @timurxyz
Can we close this issue?

Hi, your patience in awaiting my answer is much appreciated!)
I suggest to consider that if we had a build-in wrapper like the above 'attachReactJsxNode' that could create a first-class pattern for incorporating user components or components of design-system libraries provided/existing as React components. The 'attachReactJsxNode'-like extension to the React emulation or even a higher level wrapper is the last mile for implementing such middleware between hono code and those component sets. Which helps the DX with hono/honox.
The analogy could be:
 components: {
    ReactButton: applyPureReactInVue(ReactButton)
  },

approach allowed by 'veaury'.
In React itself there's no such thing obviously, but a complete emulation of the React API might need that as a complete one in terms of usage emulation. (But again, I might miss something already resolved in this regards.)


[UI] Dynamic display of Connections metadata

          @aabidsofi19 @senali-d @Yashsharma1911 can we move away from this hardcoding, knowing that every connection type will have different metadata properties and interpret dynamically instead?

Originally posted by @leecalcote in https://github.com/meshery/meshery/pull/8840#discussion_r1331924693

@senali-d FYI

@leecalcote  can you please assign me this issue?
if I am thinking properly I have to remove that scrollbar which is not suitable for ui?

we are now managing the metadata dynamically


Need a default overlay with alarms only

Need a default overlay with alarms only. SSM nodes with MSAM-Type will need this.

Provided in a previous build as html/js/app/ui/overlays/alarms_only.js.


Add Respect Family

Thanks. I'd love to add these, but not whilst they're in pre-alpha/dev state. Definitely re-open this once they're considered stable, though.

@ziadoz it's 1.0 now (:

@ziadoz: https://github.com/Respect/Validation/tree/1.0.0

@rogeriopradoj I just saw that Respect Validation is already on the README.md, the only "problem" is a typo, but there's a PR for this https://github.com/ziadoz/awesome-php/pull/494
in this PR the only one allowed would be the Config component which is 2.0


This video contains content from SME, who has blocked it on copyright grounds

Hey, most videos work great now i.e Vevo etc but I am still getting an issue with a few such as this one. Any suggestions? Keep up the great work :)
Using 2.4.1:
VideoID: L03JVPaZpyc
User Info: {
NSLocalizedDescription = "This video contains content from SME, who has blocked it on copyright grounds.";
NSURL = "https://www.youtube.com/get_video_info?eurl=https://youtube.googleapis.com/v/L03JVPaZpyc&hl=en&sts=16758&video_id=L03JVPaZpyc";
}

Can you watch this video on YouTube?

Hmm, I just checked and no. It appears that it has been removed. It was from a stored playlist I had. Thanks and apologies.
https://www.youtube.com/watch?v=L03JVPaZpyc


Added Plot Function + Fixed bugs

Plot function has been added.
For pandas dataframe as input and int64, the code was throwing assertion failures. Fixed.
For data with gapes in the Date/Time fields, the code was throwing assertion failures due to the gaps in data if the gap causes the number of data samples to be less than num_obs_samples. We will now ignore such occurances and return no anomalies for such data period.

Closing it as I would add the unittests for plot function as well. Also the data breakage test and better integration with pandas datasets too.


Tweak lines in page Borg: The Predecessor to Kubernetes

This PR does nothing except  tweaking lines in page Borg: The Predecessor to Kubernetes.

We don't typically update blogs over a year old but looks like this PR updates line breaks and does not add, remove, or modify content


Cleaned up buttons and added colors

I brought the button styles up to spec by:
*adding minor variation
*changing font size per size
*adding simple transtions to all buttons
*matching padding to style guide
To support these changes I added our new color swatches and a missing thickness,thickness-35, to the shared-styles .less files.
I also added a folder and .md file for Icon buttons to preserve some documentation that no longer made sense in the main buttons .md file.

Merged


Problem as soon as used a Figma Class like TextNode or others

Hi, I'm having a problem trying to use your boilerplate but I'm having problem of TextNode not found and other.
I tried a solution changing tsconfig.app adding
types:['@figma/plugins-types']
and I had a problem with redaclare console and others...
I also tried to use in each ts file:
///
// Your Figma plugin code here
But the error is the same
thanks

To be able to compile I just commented:
const console:Console
and fetch the declaration in
@figma/plugins-typings/index.d.ts
THIS IS NOT RECOMMENDED, but is a temporal solution


add brazilian portuguese translation

Explain your changes

Added Brazilian Portuguese translation. (pt-BR)

Checklist

[x] I have read the “Pull requests” section in the contributing guidelines.
[x] I agree to the terms within the code of conduct.

🛟 If you need help, consider asking for advice over in the Kinde community.

Thanks @marcosmartini - looking great!


Encountering Import File Mismatch in Testing

I'm attempting to install and test the python astrodynamics software on a Mac Pro running Mac OS X (ver. 10.12.1) Sierra under Python 2.7.12 in the Anaconda distribution.
I cloned astrodynamics from GitHub and installed the software from its high level directory using the command, python setup.py install. The installation appeared successful, but when I executed the command, conda list, astrodynamics failed appear. See the file conda_list.txt attached to this file. What is going on here?
When I run the tests using the command, python runtests.py, I got file mismatch errors as indicated in the file instellation and test of astrodynamics.txt. My question here is how does one fix this problem?
Please advise.
Sam Dupree.
conda_list.txt
instellation and test of astrodynamics.txt

Upgrading to pytest 3 will prevent the file mismatch errors. runtests.py is deprecated, you can use python setup.py test or just pytest.
runtests.py has been removed on the downloadspk and frames branches.

pip install . should be used in favour of python setup.py install. It should then show up in conda list.


Error while upgrading

Hi,
I'm trying to update as advised; "git pull" is OK, but "npm install --only=production" is returning this error :
native array.js:122
iT[zY=½=S)return 4rue?
^
SyntaxError: Invalid or unexpected token
Strange, isn't it ?

This is very strange, is there any other output besides this?

None, but Gekko crashed with the same error.
Surprisingly, I restarted my computer and just launched "npm install --only=production".
This time it worked !


Fixed #29112 -- Allowed using QuerySet.update() to update specific keys in nested JSONField.

Specific keys can be updated within a nested JSONField  by specifying
the path and new value as arguments to the update() method, just like
the syntax used in Lookups.
https://code.djangoproject.com/ticket/29112

I am getting the following error:
django.db.utils.ProgrammingError: function jsonb_set(jsonb, unknown, unknown, boolean) does not exist
I have run the postgres tests on my machine successfully. The following query works:
UPDATE "testapp_dog" SET "data" = JSONB_SET("testapp_dog"."data", {owner,name}, "Steve", False)
My PostgreSQL version is 9.6.6. What version of PostgreSQL are we using in Jenkins ?

I have tested the system using PostgreSQL 9.6.6. Django 2.1 will support PostgreSQL 9.4 and higher. 9.4 does not have the JSONB_SET function, and this is causing test-failure.

@priyanshsaxena was this PR abandoned :( ?

Closing due to inactivity.

Sd that this feature isn't finished and closed.

Hi @iMakedonsky — You're welcome to pick it up and open a new PR.

anyone taking this up?
or can you link me to a hack/(help me) to update a {key:value} in a JSONField (postgres9.6) on a queryset, without triggering post_save/pre_save signals , and without overwriting existing values in the JSONField ?

https://stackoverflow.com/questions/62561675/using-queryset-update-to-update-specific-keys-in-nested-jsonfield
linking here, for visibility.

This is being taken back to active development.


Mention jekyll as a build dependency

During #213 investigation, I noticed installing jekyll is needed to build the book. It's better to mention it in README file.

Jekyll is used to build and host the book, but it is automatically installed using bundler.

Ah. I see. In my case,I had to install it explicitly. I have one possible cause of this and I'll check it.

@wenkokke
I checked the possible issue. It was not cause of my case.
After I uninstall everything bundle related, I tried to run make again.
It gave me'
ruby -S bundle exec jekyll build
bundler: command not found: jekyll
Install missing gem executables with `bundle install`
make: *** [build] Error 127

I read Makefile and I guess you expect us to run make macos-setup before running make build on MacOS.

That's a good point, there should be a general setup command. Thanks.

On 26 Mar 2019, at 14:08, Yasu Watanabe<EMAIL_ADDRESS>wrote:
@wenkokke https://github.com/wenkokke
I checked the possible issue. It was not cause of my case.
After I uninstall everything bundle related, I tried to run make again.
It gave me'
ruby -S bundle exec jekyll build
bundler: command not found: jekyll
Install missing gem executables with bundle install
make: *** [build] Error 127
I read Makefile and I guess you expect us to run make macos-setup before running make build on MacOS.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/plfa/plfa.github.io/pull/235#issuecomment-476622057, or mute the thread https://github.com/notifications/unsubscribe-auth/ADzKZarOeRZo9VgT4lMIXJ4oPOCIrgPFks5vahvTgaJpZM4cAjUM.

As https://jekyllrb.com/ says,
installing bundler and jekyll is possible with the command below:
gem install bundler jekyll
This was easy for me.

The correct way to install all the ruby dependencies is to call:
gem install bundler
bundle install


open a background thread to call opencc api

convert will take a long time, it will block UI.A thread should be opened to process it

There is no way to do this ATM. Will waiting until flutter support it


Support sha256 digest on CertificatePinner

Hello guys,
I'm using this awesome project to build an app to manage flynn clusters, however, it generates a sha256 digest for its self-signed TLS certificate.
Currently, I see that OkHttp supports only sha1 hashes. There is a way to add support for sha256 too?

I'd prefer to keep one hash mechanism only. If you'd like another, consider following this example:
https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/com/squareup/okhttp/recipes/CheckHandshake.java

I don't understand your decision, but thank you anyway. :smile:

The standard is now to use SHA256
https://tools.ietf.org/html/rfc7469#section-2.4
https://developer.mozilla.org/en-US/docs/Web/Security/Public_Key_Pinning#Enabling_HPKP


OSF Meetings table's scrollbar causes contents to be misaligned with column labels

Steps

Go to osf.io/meetings
Go to a meeting that has more than 17 submissions (the maximum height of the table)
In the meeting's table of contents, notice the alignment of the contents with the column labels

Expected behavior
I expected the contents to align vertically with the column labels. This is the behavior when viewing a project with 17 or less submissions.
APS 2015

Actual behavior
The appearance of the scrollbar condenses the contents to the left.
SPSP 2015

This page may be updated shortly.  Good to keep in mind when that work is merged.


#718 IClaimsTransofrmer updated to take ClaimsTransformationContext

IClaimsTransofrmer updated to take ClaimsTransformationContext instead of ClaimsPrincipal in TransformAsync method.
#718

Hi @DovydasNavickas, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla2.dotnetfoundation.org.

TTYL, DNFBOT;

@DovydasNavickas, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, DNFBOT;

I've updated code according to comments and all checks have passed. Should I squash commits or are there any more comments?

Sure go ahead and squash and I'll merge, thanks!

Merged, thanks again!  f5c1c45db20fd4592a3f49d4dc1d39dc5f62108c


Updating constructs lib causes deploy failure with SqsToLambda DLQ

When using SqsToLambda construct, upgrading from 2.58.1 to 2.60+ results in a failure to deploy due to conflicting resources.
This seems to be caused by the change to https://github.com/awslabs/aws-solutions-constructs/blame/main/source/patterns/%40aws-solutions-constructs/core/lib/sqs-helper.ts#L226
changing the line in<EMAIL_ADDRESS>from
const buildQueueResponse = buildQueue(scope, 'deadLetterQueue', {
to
const buildQueueResponse = buildQueue(scope, ${id}-dlq, {
in PR #1131
Reproduction Steps
In CDK stack
sample = SqsToLambda(
            self,
            "Sample",
            lambda_function_props=_lambda.FunctionProps(...),
                handler="sample.handler",
            ),
            queue_props=sqs.QueueProps(
                queue_name=f"sample",
                removal_policy=RemovalPolicy.DESTROY,
            ),
            dead_letter_queue_props=sqs.QueueProps(
                queue_name=f"sample_dlq",
                removal_policy=RemovalPolicy.DESTROY,
            ),
)

Deploy with older version of constructs (< 2.60), update constructs version (>= 2.60), then attempt re-deploy.
Error Log
On cdk deploy:
$STACK_NAME | 4:28:23 PM | CREATE_FAILED        | AWS::SQS::Queue                 | $CONSTRUCT_ID/queue-dlq ($CONSTRUCT_IDqueuedlq2DA5CD76) Resource handler returned message: "Resource of type 'AWS::SQS::Queue' with identifier '$DLQ_QUEUE_NAME' already exists." (RequestToken: 6c1eae2c-5e34-3e13-eaf1-f1ed356f727d, HandlerErrorCode: AlreadyExists)

cdk diff shows queue name changes, from SampledeadLetterQueueABCD1234 to SamplequeuedlqEFGH5678 which correlates with the change I highlighted above.
Environment

CDK CLI Version      : 2.152
CDK Framework Version: 2.150.0
AWS Solutions Constructs Version     : 2.65.0
OS                   : MacOS 14.6.1/Ubuntu 22.04
Language             : Python

Other

This is :bug: Bug Report

Thanks, we'll take a look

The problem is the combination of the new version changing the resource ID and your code using hardcoded resource names. The resource name change results in the the resource being replaced. Apparently CloudFormation creates the new resource before deleting the old resource - so it  is  trying to create the replacement queue while the original queue still exists. Since the queue has a name defined in the code, both the original and replacement queues have the same name and can't exist simultaneously, causing the error you see.
I can see two paths forward for you.

Remove the queue name from your code and allow CDK/Cloudformation to generate the name. They will create names that are unique to each stack and reproducible. Delegating naming resources to CDK/CFN is really highly recommended as it makes environments less brittle. For instance, I believe that if  you tried to launch your app twice in the same region you would see an error when the two application installations collide at the queue name. If the queue name is to integrate with other apps, it can be specified as an output so other stacks can reference it.

If it is not feasible to remove the hardcoded queue name, you can change the name of the dlq and successfully launch. If the name must remain "sample-dlq" (or whatever value is in your actual code), you can

Change the name in the code
Launch with the new version of Constructs
Change the name back to the original in the code
Launch (Update) the stack again

I tried that process here and ended up with the same name on the queue.

@biffgaut Thanks for the advice on workarounds. We can certainly use one of those strategies in our circumstances.
I'm concerned that this change wasn't called out in release notes for potential data loss. I believe the resource ID change would cause old DLQs to be replaced, losing any messages that might have been sitting in them.

To be more precise, anyone who had a DLQ built with this Construct prior to 2.60 would lose all messages in those DLQs upon deploying after upgrading to 2.60+ because the change in #1131 changed the resource IDs of all those queues.

That's a good point - we'll dig into it further and look at updating CHANGELOG.md

Yes, an existing DLQ will be deleted along with any messages - we will update the CHANGELOG accordingly.
Eventually someone reading this Issue may ask, why did we make this change? We needed to do it when we added a Construct Factory for SQS queues. Since the original code had a fixed resource ID for DLQs, when we created Queues outside of a Solutions Construct we see ID collisions if an app deployed 2 queues. This code would not work:
    const factories = new ConstructsFactories(this, 'factories');
    factories.sqsQueueFactory('this-queue', {});
    factories.sqsQueueFactory('that-queue', {});

If you haven't looked at Constructs Factories yet, you should check them out - we're very excited about them. We haven't really publicized them yet - we're aiming for a blog post this Fall.

CHANLGELOG.md. has been updated. We think this completes this Issue and will close it in a couple weeks unless we hear otherwise.  If you're good, you can close it now if you like.

I appreciate all the explanation, and the push towards these factories does sound like an improvement. I'll definitely need to look through and learn more about them. Thanks for all the work the team is doing, it makes my job a lot easier. 😄


Created Rules Page

Description: created a new Rules page.
Fixes: Issue #357
Before Creating the Rules Page

After Creating the Rules Page

@iamparas0 kindly have a look at this.


[Writing Guide] How-to use and create Tabs components

What kind of changes does this PR include?

New or updated content

Description
Here I am again, adding more stuff to the Writing Guide. This time, info on how to use the Tabs component and how to create your own if necessary.

Thanks @sarah11918, all great suggestions 🙌

LGTM @Yan-Thomas !


markdown around output not picked up

see https://github.com/kobotoolbox/enketo-express/issues/451

fixed with eed6bbec9410ddee3cc8b129be0375461e7281a2


Autocomplete feature and some updates to DG

Added beta autocomplete feature and added some updates to DG and UG.
DG - Removed AB3 undo/redo
DG - Started on autocomplete description
DG - Renamed AddressBook to TaskList for UML images
Edited some UG stuff that may require deconflict.
Closes #73

Codecov Report

Merging #79 (99ed22f) into master (bdf7d3c) will decrease coverage by 1.55%.
The diff coverage is 10.52%.

@@             Coverage Diff              @@
##             master      #79      +/-   ##
============================================
- Coverage     70.62%   69.06%   -1.56%
  Complexity      513      513
============================================
  Files            89       89
  Lines          1508     1542      +34
  Branches        151      158       +7
============================================
  Hits           1065     1065
- Misses          398      432      +34
  Partials         45       45

Impacted Files
Coverage Δ

...ava/seedu/address/logic/commands/ClearCommand.java
100.00% <ø> (ø)

...java/seedu/address/logic/commands/ExitCommand.java
100.00% <ø> (ø)

...rc/main/java/seedu/address/model/ModelManager.java
91.52% <ø> (ø)

src/main/java/seedu/address/ui/CommandBox.java
0.00% <0.00%> (ø)

...address/logic/commands/list/ListMarkedCommand.java
90.00% <100.00%> (ø)

...dress/logic/commands/list/ListUnmarkedCommand.java
90.00% <100.00%> (ø)

...ss/model/task/ModuleContainsKeywordsPredicate.java
100.00% <100.00%> (ø)

...dress/model/task/TagContainsKeywordsPredicate.java
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Add a method to collect and package inventory

Adds a top-level method to collect and package inventory as well as a
_queue method which returns a task for the API to call.
This is useful if the manifest can't be fetched from the API and when
the payload can't be posted directly to insights via the
insights-client.

cc @abellotti @Fryguy
@Fryguy this puts the manifest in the queue as an argument which I don't love but a file path wouldn't work unless we queue this on the same appliance...could also go with a BinaryBlob.  Thoughts?

I don't see a problem with the manifest being in the queue...I can't imagine it will be so big as to be an issue.

I think this is good for the API to call, I take it API will be calling collect_queue to get ye-old task id back.  The one thing though, I see update_task to be called by the back-end to reflect the payload_path, but I don't see that as an API inbound parameter (even partial path naming).  Are the user's ever going to specify in the UI the name/path of downloaded file or is that always system generated ?

Thanks @agrare for the update, this LGTM!! 👍

Thanks @agrare for the enhancement (and changing the collect method name).  👍

Ivanchuk backport details:
$ git log -1
commit<PHONE_NUMBER>ea951072d0abe5e29812ec11a3baa9
Author: Alberto Bellotti<EMAIL_ADDRESS>Date:   Thu Aug 1 11:36:13 2019 -0400

    Merge pull request #28 from agrare/add_method_to_collect_and_package_inventory

    Add a method to collect and package inventory

    (cherry picked from commit 50405c75c2280b7194b4c2a8e9a3dcb3f9965f60)


Disappearing Issues ?

I am sure I posted a question yesterday about ReportState not working (the GUI not updating after sending a Reportstate e.g for a switch, lamp. Today the post is not in the list anymore. It must be Altzheimer got me ?

Thanks, Saw the reply by email. It seems closed issued are not visible (?)


Blacklisted host that does not resolve to an IP causes error.

https://github.com/zmap/zmap/blob/master/lib/blacklist.c#L131
getaddrinfo will return non-zero for a host that resolves to no IP. The program promptly throws up its hands and quits. A better behavior is to just ignore that entry.

Per an internal discussion, the existing flag --ignore-blacklist-errors should cause these lookup errors to be ignored.
The default zblacklist behavior should not change.


'az policy assignment update' needs to validate '--not-scopes' value

Describe the bug
The az policy assignment update option's --not-scopes option, or the underlying API call, are not validating their input.
To Reproduce
Assuming the policy already has two or more exclusions...
EXCLUSIONS="$(
    az policy assignment show -o tsv --query notScopes \
        --name "$POLICY_NAME"
)"

az policy assignment update \
    --name          "$POLICY_NAME" \
    --not-scopes    "$EXCLUSIONS $NIC_ID"

The first command returns a value with embedded newlines, so the second command submits a value with that long newline-separated string, followed by a space, followed by the new ID. (The policy in this case is "NICs cannot have public IPs", and the exclusions are the NICs which have been "approved" to have public IPs.)
Observed behavior
The policy started with 15 exclusions. The command and the API call were accepted. After the call was processed, the policy (as shown in the portal) had 2 exclusions - one containing all of the existing IDs as a string with embedded newlines (which the portal didn't understand, but didn't show any kind of error message for) and one containing the new ID.
Expected behavior
EITHER the az command should convert newlines to spaces, OR the az command should throw an error message before the API call is made.
In addition, if the value with embedded newlines is submitted to the API, the API call should fail without making any changes.
Environment summary
azure-cli 2.26.0 on macOS 11.3, installed using Homebrew. bash shell.
Additional context
Worked around the problem by fixing the input data. (The extra echo around the first command converted the newlines to spaces.) Note that this is the same fix I would have done if the command or the API call had thrown an error - the difference is, the policy database within Azure wouldn't have contained an invalid policy exclusion for the short time it took me to figure out what the problem was.
EXCLUSIONS="$( echo $(
    az policy assignment show -o tsv --query notScopes \
        --name "$POLICY_NAME"
))"

az policy assignment update \
    --name          "$POLICY_NAME" \
    --not-scopes    "$EXCLUSIONS $NIC_ID"

ARM

Almost three years later and STILL nothing has been done to fix this.
Also, @yonzhan you marked this as a "feature request" rather than a bug report - can you explain WHY this isn't a bug? Is the command not supposed to report invalid arguments (such as a list of IDs with embedded newlines)? Or is the list with embedded newlines actually valid, and it just "looks funny" in the portal web site?
Also, in the az policy assignment update -h output, the description of --not-scopes (in azure-cli 2.59.0, macOS/Homebrew) says "Space-separated scopes where the policy assignment does not apply." Should this option be used as ...

--not-scopes "A B C" (single list of IDs with spaces between, split by the az program)
--not-scopes A B C (multiple IDs as separate arguments, split by the shell before running the az program)

This should be clarified, both here and in the program's help text.


Update Delete occurrences of an element if it occurs more than n time…

…s.py
I have added the naive solution of above question to appreciate the beauty of efficient solution and their respective time complexities.

Thanks for the PR.
But the repo destiny is to host my solutions - not necessarily the best practice or efficient ones, but the ones I submitted.

Thanks for the PR.
But the repo destiny is to host my solutions - not necessarily the best practice or efficient ones, but the ones I submitted.


Open Source Repository

Let's open source the extension and ensure we don't share any secrets before we do so.

Done!


CAMEL-8822 - new camel-slack component

Thanks for this PR the code has been merged. Do you mind closing this?

Sure. Thanks, Claus!


error: (-215) intersection.size() <= 8 in function rotatedRectangleIntersection

Hi， When I use the Efficientnet backbone to train the R3Det,  I get this bug after 120k iters:
Traceback (most recent call last):
File "/home/anaconda2/envs/tensorflow_gpu/lib/python3.6/site-packages/tensorflow/python/ops/script_ops.py", line 209, in call
ret = func(*args)
File "/R3Det_Tensorflow/libs/box_utils/iou_rotate.py", line 88, in iou_rotate_calculate2
int_pts = cv2.rotatedRectangleIntersection(r1, r2)[1]
cv2.error: OpenCV(3.4.1) /io/opencv/modules/imgproc/src/intersection.cpp:247: error: (-215) intersection.size() <= 8 in function rotatedRectangleIntersection
I have checked  the data，it's right. And this is the train loss:

How can I solve this problem. Please give me some advice. Thanks !

OPENCV cannot handle iou calculation of rotating bbox with more than 8 intersection points (two overlapping frames).

I had the same problem, so how to solve it

@jewelc92 updating opencv-python version to 4 makes it work, try it


bindOnce - only fire bind callback once

Added bindOnce with tests -  bind an event like bind(), but unbind the callback after the first time its called.
Similar to jQuery one and Node.js emitter.once. See issue #156 for requests, discussion, and alternative implementation.

This looks identical to #309

It doesn't seem that way to me unless I am missing something.
#309 fixes a problem with unbinding during a callback, regardless of how you do it.
This explicitly adds a bindOnce function (and test) that unbinds after the first callback. So this depends on #309, but I wouldn't say its the same.

+1

@buger good point, no reason to have code duplication between underscore and backbone

Cool! Closing (since pull request was actually included and commited by @tbranyen in 21abc4a).


Reviewer Role

This PR adds reviewer functionality to OpenCfP.
The reviewer currently has the following options

See talks and speakers
Rate talks

The reviewer can not comment on talks, favorite or select them, remove speakers or talks, promote or demote to/from admin. They also can't see the speakers airport.
In the future it would be good to let the admin decide what the reviewer can and can not do/ see. Either through config files, or another way.
Related to #415, #485 .
Changes in this PR

Addition of reviewer role
Ability to promote to/demote from reviewer through command line
Basic refactor of Command classes
promote function on AccountManagement is now promoteTo, and has a second optional parameter which is the role to promote to, defaults to admin
The same for the demote function, which is now DemoteFrom
Addition of a 'search' scope in the user model, which does a 'like' search
getFilteredTalks has been moved to its own class
3 new controllers, for reviewers (Dashboard, Speaker, Talks)
AdminAccess is now RoleAccess, and takes the role to check for as an argument
Updated to the UserAccess interface to make that possible
New Routes/ Providers/ views/ tests
Reviewer role Migration

I will be making a separate PR to move Pagination to its own space, which should fix some of the Code Climate issues, but thats outside of the scope for this PR, since its growing pretty big already.

@BackEndTea is this no longer WIP?

@chartjes This is no longer WIP.
It is a good base for the reviewer role, though there are still features that could be created for it.

@BackEndTea Once the test failures are fixed, I'm happy to merge this in and cut a v1.3 release with this functionality in it https://travis-ci.org/opencfp/opencfp/builds/300230058?utm_source=github_status&utm_medium=notification

Thanks for this great new feature @BackEndTea

Thanks @chartjes


cargo clean doesn't work well from Windows

Problem
I tried to build rust project with Cargo but faced Blocking waiting for xxxxx.
So I tried to clean cargo cache as following
cargo clean
But caches are not cleared from Windows OS so I manually remove those files from System drive.
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
No response

Due to the lack of a minimal set of steps to reproduce, it's hard to help with this issue. Could you add a minimal reproducer and attach the version information via cargo -vV as well?
Besides, a related pull request just got merged https://github.com/rust-lang/cargo/pull/11442. The fix should be released in the next few days on nightly channel.

Sorry for lack information.

cargo 1.69.0 (6e9a83356 2023-04-12)
release: 1.69.0
commit-hash: 6e9a83356b70586d4b77613a6b33f9ea067b9cdf
commit-date: 2023-04-12
host: x86_64-pc-windows-msvc
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:Schannel)
os: Windows 10.0.19044 (Windows 10 Pro N) [64-bit]

What did you want to achieve, what have you done, and what did it exactly mean by “caches are not cleared”?
We need a clear description and a reproducer of the problem to proceed. Thank you.

Dud you have any other editor opening the same project? Usually Rust Analyzer or some IDE integration will run cargo check which does block other command from running, as they are downloading and unpacking dependency source code.
If you were stuck in “Blocking waiting for xxxx” for a long while, say 3 minutes, without any IDE integration in the background, it might be a real issue.
If in that case you could try deleting ~/.cargo/registry/.package-cache. That should unlock your registry cache.

Thank you for your advice.
In addition, there are no other editor opening the same project.
Anyway, I manually deleted the above file and after than, it worked well.
Thank you.

Cargo uses LockFileEx on Windows to do file locking on .package-cache, if that makes any sense to you.
If you can reproduce it very constantly, would you be willing to provide a minimal reproducible example?


Handling IOS Cancel Button

How can I handle "Cancel" button on IOS "listening for tag" pop up.
Can I remove this pop up completely ?
Generally I have issue (different on Android and different on IOS) when I start listening for tags and stop it by "Cancel" button in ios or I use system back on Android. How can I check if request for technology is currently active and ask for technology only when it its not?

Hi @Damian333
You won't be able to remove the iOS popup, however, you can detect the cancellation from users.
With v3.2.0, we have NfcErrorIOS to check for this:
import NfcManager, {NfcTech, NfcErrorIOS} from 'react-native-nfc-manager';
...
    try {
      await NfcManager.requestTechnology([NfcTech.Ndef]);
      const tag = await NfcManager.getTag();
      console.warn(tag);
      await NfcManager.cancelTechnologyRequest();
    } catch (ex) {
      if (NfcErrorIOS.parse(ex) === NfcErrorIOS.errCodes.userCancel) {
        console.warn('user cancel NFC scanning');
      } else {
        console.warn(ex);
      }
    }
...

If you're in previous version, you can manually parse error string for "NFCError: 200" (200 is defined by iOS as user cancellation error code).

@whitedogg13 this does not work in the current version of the lib. When the user cancels or the session times out, the catch handler is not called.