ZF\ContentValidation\Validator\Db[No]RecordExists exclude current entity by default?

I’m in running into a rather tricky situation, using NoRecordExists validtor within Apigility.
It’s quite easy to setup and force a field value to be unique like this:
'validators' => array(
    0 => array(
        'name' => 'ZF\\ContentValidation\\Validator\\Db\\NoRecordExists',
        'options' => array(
            'adapter' => 'Zend\\Db\\Adapter\\Adapter',
            'table' => 'mytable',
            'field' => 'myuniquefield',
        ),
    ),
)

However, this does not really work in real-life, since only POST requests deliver the expected results. Once you want to modify a records using PUT, this fails, because … well … the record exists already. In case of PUT/PATCH, I need to set up the validator to exclude the entity that’s being updated, like this:
'validators' => array(
    0 => array(
        'name' => 'ZF\\ContentValidation\\Validator\\Db\\NoRecordExists',
        'options' => array(
            'adapter' => 'Zend\\Db\\Adapter\\Adapter',
            'table' => 'mytable',
            'field' => 'myuniquefield',
            'exclude' => array(
                'field' => 'id',
                'value' => CURRENT_ENTITY_ID,
            ),
        ),
    ),
)

But I don’t know how to inject the requested entity’s ID into the options array. Wouldn’t it make sense, to have Apigility set these excludes for PUT/PATCH requests automatically?

This CURRENT_ENTITY_ID is inside your the route parameters of your RouteMatch a route identifier does not belong inside the validator/input filter logic. You can make your own validator where you inject the RouteMatch if you want or you can move validation to your ResourceListener class and do the validation after your resolved your object from the database in your fetch method.

I’ve solved it with the event listener for the time being. But this seems very cumbersome to me.
Here’s a simple example that expects you to have a route like /entities/:id and modifies the NoRecordExists validator of a unique field named 'alias'.
Put this in your Module.php:
public function onBootstrap(MvcEvent $e)
{
    $serviceManager = $e->getApplication()->getServiceManager();

    $events = $serviceManager->get('ZF\ContentValidation\ContentValidationListener')->getEventManager();

    $events->attach('contentvalidation.beforevalidate', function(MvcEvent $e)
    {
        $inputFilter = $e->getParam('ZF\ContentValidation\InputFilter');

        $alias = $inputFilter->get('alias');
        $validatorChain = $alias->getValidatorChain();

        foreach ($validatorChain->getValidators() as $validator) {
            if (! $validator['instance'] instanceof NoRecordExists) {
                continue;
            }

            $validator['instance']->setExclude(array(
                'field' => 'id',
                'value' => intval($e->getRouteMatch()->getParam('id')),
            ));
            break;
        }
    });
}

This repository has been closed and moved to laminas-api-tools/api-tools; a new issue has been opened at https://github.com/laminas-api-tools/api-tools/issues/12.


Update step-groups.md

Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the maintainers.
What Type of PR is This?

[ x] Issue
[ ] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

https://harness.atlassian.net/browse/DOC-1285

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[ ] Tested Locally
[ ] Optional Screen Shoot.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app

just removing text. no peer review needed.


Bump node to 1.29.0-rc3

[x] Bump node to 1.29.0-rc3
[x] Regenerate CLI goldens
[x] Update readme

Comments
Following
git diff 1.29.0-rc2 1.29.0-rc3 -- cabal.project

plus the cardano-node revision change itself.

Issue Number
ADP-1091

bors try

bors r+


TNT-44351 Create XDM schema for Target Classification datasets

Jira:https://jira.corp.adobe.com/browse/TNT-44351
Github Issue: https://github.com/adobe/xdm/issues/1681
Summary:
A new XDM schema for Target Classification datasets containing a set of meta-data fields that will classify Target activities and experiences.

@mjasrotia This new class should be ready to merge now.


chor: refactor preinstall script error warn printing

Refactoring the multiple console.errors of preinstall build script.

@microsoft-github-policy-service agree

Closing since it doesn't address an actual issue.
If you'd like to help out, check out our Contribution Guide:

Issues labeled help wanted are good issues to submit a PR for. Issues labeled good first issue are great candidates to pick up if you are in the code for the first time.


Fixes getUserFollows and getUserFollower

Readme states that getUserFollows() and getUserFollower() accepts an $id and $limit, however these were never used.  Also, nothing was ever returned.

Looking at the original repo, this has already been fixed.
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php#L234

Shouldn't we maybe provide defaults for the attributes, so it doesn't break current implementations?

Awesome, thanks!

I've now set the defaults for the attributes.  However, looking at the original repo this is forked from, they have since removed getFollows and getFollower and merged them into getUserFollows and getUserFollower.

There where no commits on the original repo, since I forked it as far as I know.

Apologies, that was an incorrect assumption.
It looks like you split the functions out previously, which is where the default arguments were lost, along with the return of data.
https://github.com/florianbeer/Instagram-PHP-API/commit/5215339c5d9949adfe5369b336267ffc00784c0c#diff-2411056acc576df0164ae0c72f94793b

If I remember correctly that was because of the API changes, but I'm not sure right now.


Updated Landing for new Chaos Tutorial

Updated Landing for new Chaos Tutorial
Fixed Kubernetes Typo

Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the maintainers.
What Type of PR is This?

[x] Issue
[ ] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

Issue(s)

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[x] Tested Locally
[x] Optional Screen Shoot.
[ ]

Preview environment: https://ci.pr.harness.io/pr-117


QPS parameter proposal

What this PR does / why we need it:
Proposed setting of QPS value to avoid rate limiting https://github.com/helm/helm/issues/12347
Special notes for your reviewer:
Seems relatively trivial, the QPS value is actually a float32 so I arbitrarily chose a 2 digit precision for this.
passing 0 as the QPS parameter to the discovery client config currently states that if 0 is passed then 5 is used but it is assumed that this value may vary over time based on changes for default behaviour in the client-go library so I have specified 'client library' defaults in the documentation.
If applicable:

[X] this PR contains documentation
[X] this PR contains unit tests
[X] this PR has been tested for backwards compatibility

@dependabot recreate

@sabre1041 yes, my initial PR drew some attention to this saying that it would use 'library defaults' as saying simply 5 and being an external dependency might be subject to external change. @mattfarina suggested some wording but I'm happy to make further changes if there is a consensus that this should be clearer?

@mattfarina @sabre1041 I think this is ready to be merged now


does not work in this channel

https://www.twitch.tv/murderofbirds
ex. video (https://www.twitch.tv/videos/1497421933?filter=highlights&sort=time)

Hi, do you use Firefox or another browser?

i use google chrome

Try to download the extension with the Code button

And reinstall the extension, it should work

thanks so much it works now!!


Move embedded snippets to project file 12

Create Rdg12 folder to contain sample here and follow Rdg1

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

ID: 98b9d6b6-fdd2-4600-2392-eb2c2cdd61f5
Version Independent ID: 98b9d6b6-fdd2-4600-2392-eb2c2cdd61f5
Content: RDG012: Unable to resolve inaccessible type
Content Source: aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg012.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @captainsafia
Microsoft Alias: safia

I can take this one


Implement label-hst-products

Implement the standalone tool to perform label-hst-products based on the following:
Note: there is another issue open for the implementation of task queue & queue manager.
Task: label-hst-products

Initiated by: update-hst-visit
Input: program ID and visit
Log: <HST_PIPELINE>/hst_<nnnnn>/visit_<ss>/logs/label-hst-products-<ymdhms>.log
Priority: 5 (Highest)
State:

New files are in <HST_STAGING>/hst_<nnnnn>/visit_<ss>/.
Existing bundle, if any, is at <HST_BUNDLES>/hst_<nnnnn>/.

Actions:

Compare the staged FITS files to those in an existing bundle, if any.
Create a new XML label for each file.
Reset the modification dates of the FITS files to match their production date at MAST.
If any file contains NaNs, rename the original file with “-original” appended, and then rewrite the file without NaNs.
TBD: What to do if the file in the existing bundle is identical.

Implemented and merged into master.


Add support for zstd http content decompression

Motivation:
Now that ZstdDecoder has been added, we should consider supporting ztsd content decompression
Modification:
Add support for zstd http and http2 content decompression
Result:
Netty supports zstd http and http2 content decompression

DataCompressionHttp2Test.zstdEncodingSingleMessage() has tested the zstd http2 decompression, but it not works before this pr is merged. So we need to let this works

@skyguard1 thanks!

Reapplied


chore(npm/github): update ignore files

Might be a little aggressive.  Definitely need someone to double check.

Looks good after the one comment.

Merged in with f0e2195


Update AppVeyor to know about VS 2019

Update AppVeyor to know about VS 2019.
Fixes #1038

@chwarr Yeah, the build passed. So, the ValidateSet changes were needed as well. You got to fixing it before I could take a look. Thanks!


Problem with match iteration

Expected Behavior
Fist match:

:test(\d+)?
test
\d+
?

Second match:

:asd(\d+)?
asd
\d+
?

Actual Behavior

":test(\d+)?/auth/:asd(\d+)?"
"test"
"\d+)?/auth/:asd(\d+"
?

Steps to Reproduce the Problem
let path_regexp: Regex = Regex::new(vec![
    // Match escaped characters that would otherwise appear in future matches.
    // This allows the user to escape special characters that won't transform.
    r"(\\.)",
    // Match Express-style parameters and un-named parameters with a prefix
    // and optional suffixes. Matches appear as:
    //
    // ":test(\\d+)?" => [":test(\\d+)?", "test", "\d+", None, "?"]
    // "(\\d+)"  => ["(\\d+)", None, None, "\d+", None]
    r"(?::(\w+)(?:\(((?:.|[^()])+)\))?|\(((?:\\.|[^\\()])+)\))([+*?])?"
].join("|").as_str()).unwrap();

for caps in path_regexp.captures_iter("/auth/:test(\\d+)?/auth/(\\d+)") {
    println!("{:#?}", caps);
}

Online example:
https://regex101.com/r/ssMlg9/1

Please provide a smaller example. I can't make sense of this and don't have time to. Sorry.

@BurntSushi My bad, it works like a charm. Sorry


Update cup.txt

Updated for 27th June results... (sad Germany out :( )

@pratul-nayak Thanks again - sorry for the conflict again. Let me know if you're interested in helping to keep the world cup update-to-date you're more than welcome to join the openfootball org (if you're interested please let me now and I  send you an invite for the org (via github) so you can edit /change the page "inline" without pull request etc.  Cheers. Keep it up. Enjoy the beautiful game.


[BUG]: DotNetCoreCLI@2 restore - handle relative paths in nuget.config just like nuget

New issue checklist

[X] I searched for existing GitHub issues
[X] I read pipeline troubleshooting guide
[ ] I checked how to collect logs

Task name
dotnet restore
Task version
245.1
Issue Description
Please finally fix the different behavior (nuget vs. dotnet restore) regarding package sources defined as relative file path in nuget.config.
example:
<add key="MyLocalFeed" value="./../../packages" />
Please handle relative paths just like anybody would expect it (relative to the (origin) nuget.config file).
See https://developercommunity.visualstudio.com/t/azure-pipelines-fails-to-restore-packages-from-loc/841179 and https://stackoverflow.com/questions/64001539/issue-restoring-local-nuget-package-through-azure-pipelines for related issues.
If  I check the available sources via nuget sources -Source ... I get this output.

If call dotnet restore (via DotNetCoreCLI@2) I get this failure:

Obviously this is not true:

We build our product within windows and linux pipelines. i. e.  the workaround of using nuget directly is not applicable. No one really wants to install mono nowadays on their build machines just to workaround this kind of issue.
Hint: We're using self-hosted Build agents in conjunction with Azure cloud.
Environment type (Please select at least one environment where you face this issue)

[X] Self-Hosted
[ ] Microsoft Hosted
[ ] VMSS Pool
[ ] Container

Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows 10
Relevant log output
Check the issue description, please.

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION]

Repro steps
No response

@KaiBNET Could you please clarify the name of the azure pipelines task that you think needs to be fixed? (I see PowerShell on your screenshot)

#@max-zaytsev Sorry for being imprecise. It is about the DotNetCoreCLI@2 task (command: 'restore') called like this:
- task: DotNetCoreCLI@2
  displayName: Restore ${{ parameters.RelativePathToSolution }}
  inputs:
    command: 'restore'
    projects: |
      ${{ parameters.RelativePathToSolution }}
    feedsToUse: config
    nugetConfigPath: ${{ parameters.RelativePathToNuGetConfig }}
    noCache: true

@max-zaytsev
I guess this must be fixed in the NuGetConfigHelper2 that is used in restorecommand.ts.
--> Adapt relative path copied from the origin nuget.config file according to the path of the generated temporary nuget.config file.
Unfortunately, it seems like this part is closed source. Am I right?

@max-zaytsev Any news on this? This is kind of showstopper for us. We want to execute regression tests on basis of NuGet packages generated during the build. i.e. we do not want to publish NuGet packages on any feed before tests get passed on the build machine.


Add vertical accuracy to quality extension

So users can optionally record the vertical accuracy of their datasets, we want to add the following optional properties to the quality extension.
quality:vertical_accuracy number (decimal) - The vertical accuracy of the dataset. Must be in units of metres. Where there are complexities to the accuracy which make it difficult to describe with a single value, the "Data Quality" field should be used to further describe it.
quality:vertical_accuracy_type string (enumeration of Nominalor 95% confidence interval) - The type of accuracy for the vertical accuracy value. Options are "Nominal" and "95% confidence interval". Other confidence levels must be converted to 95% by applying appropriate scaling of the accuracy value.

LGTM


Core: move rules related to explicit property/method visibility from Extra to Core

For all constructs which allow it (properties, methods), visibility should be explicitly declared.
Using the var keyword for property declarations is not allowed.

The PSR2.Classes.PropertyDeclaration sniff contains a multitude of checks, amongst which two error codes which IMO should probably not (yet) go into the Core ruleset.

Underscore - which warns against prefixing a property name with an underscore, advising to use visibility instead. While I'm 100% in favour of this, introducing this for WP Core would be problematic as renaming (public/protected) properties would be a BC-break.
Multiple - which throws an error for multi-property declarations. I have excluded it as it is not something which is explicitly forbidden in the handbook, nor was it mentioned in the Make post. Having said that, I have scanned WP Core with this check in place and it would not yield any issues, so "silently" introducing it should not be a problem.

As these rules were previously already included in the Extra ruleset, those error code which are being silenced for Core, will be "unsilenced" again for Extra.
Refs:

https://make.wordpress.org/core/2020/03/20/updating-the-coding-standards-for-modern-php/ - Visibility should always be declared section
https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#visibility-should-always-be-declared
WordPress/wpcs-docs#107
WordPress/WordPress-Coding-Standards#1101
WordPress/WordPress-Coding-Standards#1103

Multiple - which throws an error for multi-property declarations. I have excluded it as it is not something which is explicitly forbidden in the handbook, nor was it mentioned in the Make post. Having said that, I have scanned WP Core with this check in place and it would not yield any issues, so "silently" introducing it should not be a problem.

@GaryJones @dingo-d Gentlemen, just checking - did either or you have an opinion on the above ?

PSR-12 says There MUST NOT be more than one property declared per statement., so I'd be happy to align with that as well.

Definitely apply the no multiple properties per statement 👍🏼

Thanks for your responses. Actioned in #2104.


Pass labels to v1.Config during build

Hi, thanks for working on this awesome project. This is very useful in our Go-centered projects.
One thing which can be nice to have is to add Labels to the image config. Today, some container registries have API(s) around image labels. For e.g, it is possible to add a specified label in Quay to tell the registry when this image will expire so will be cleaned up automatically. This is an awesome feature for CI images, by the way.
LABEL quay.expires-after=20h

kaniko allows us to do this with a flag --label as describe here. I also looked at the ko code base and if I understand correctly, here is the place where we can tweak a bit to support labels as well?
https://github.com/google/ko/blob/c14c08e982592bcea40a3bd95de94836bfbe40f9/pkg/build/gobuild.go#L603-L607
Do you think this is something reasonable to be added? Thanks. :)

We can do this, and I agree we should. I'd also like to support image manifest annotations. I've hacked up a PoC here: https://github.com/google/ko/compare/main...ImJasonH:image-label
Some design questions:

Unfortunately, "labels" is an overloaded term 😅 . ko apply already supports only applying objects that match a k8s label selector, so we'll have to be careful to document that "labels" in this context means image labels. In the PoC above I've gone with --image-label.
ko can produce multiple images, some of which might have already been built and published before, in which case ko purposefully isn't going to produce a new image. If you're adding --image-label quay.expires-after=24h that'll be 24h after the first time the image was built and published, not the latest time. Is that the expected behavior?
What should the flag be called? I've gone with --image-label with no short form for now.

Wow, Thanks Jason!
It's a nice choice to use --image-label, both explicit and accurate.
Regarding your second point, the way how Quay works is:
https://github.com/quay/quay/blob/bd7252c536bcf8c49cca167d7c4b433489d36044/data/model/oci/tag.py#L459-L470
It adds the expiration seconds on top of lifetime_start_ts. In the case you described, even the push is tried, the lifetime_start_ts won't change anyway. That means the behavior is expected in my opinion.

with no short form for now

You're using StringSliceVarP which specifically has a short form:

// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash.

You want StringSliceVar.
FWIW that change looks good to me, if we get a test :)

FWIW that change looks good to me, if we get a test :)

Adding a test caught a bug, the system works! 🎉


support passing in params for Deployments.list method

Looking at GitHub's Deployments api docs, it describes the ability to filter deployments by "sha", "ref", "task" and "environment".  There doesn't seem to be the ability to pass in optional query params to the Tentacat.Repositories.Deployments.list call.  This will be convenient, for instance, in the case of finding all deployments associated with a PR/sha value.

I wish to report a similar request concerning Contents.find which accepts a ref parameter as well. Should I open a different PR for this?
I'm willing to submit a PR.


VS Code Extension "unable to create context store: $HOME is not defined"

VS Code Version 1.48.2
Host OS: MacOS 10.14.6
Security Scan: 1.2.0
Upon installing the extension, the security scan ran automatically and threw the error "unable to create context store: $HOME is not defined" in the Output pane of VS Code.  And running it manually also triggers the same error.

Hi @troyfontaine Are you confident it was sast-scan that threw the output? scan uses a separate output channel for the vs code extension. Also was it reproducible after reloading the window?

Hi @prabhu I am confident it is sast-scan generating it-it occurs every time I try to run a scan from the UI in VS Code via the extension.  Reloading, uninstalling and re-installing it continues to occur.

The scanner UI will just sit there as if hung on the error:

Interesting! Is docker desktop for mac running btw? Are you able to run scan via the cli and then see the reports with the extension? You can open the .sarif files generated in reports directory and the extension should automatically display it.

@prabhu I've been able to run scans using the example commands without issues.  The .sarif file is not automatically previewed when I double click on it in the VS-Code window's file list.

ok will take a look. Have to find a mac since I have moved to linux and windows :(

The extension is working fine for me on a mac. I even asked another colleague to test. Are there any errors in the developer tools on vs code?

I'll check this morning.  I am now noticing a pop up in the lower right corner of VS Code asking if Docker for Mac is installed.  I am using Docker for Mac edge if that plays at all into things-but I will check the developer tools and look at reinstalling VS Code.

Hi @prabhu looks like it was specifically that I was using Docker for Mac edge.  Uninstalling and installing Stable the VS Code Plugin works fine.

Thanks @troyfontaine. I will try to reproduce this docker edge and iterm and get back to you.

Hi @troyfontaine
Can you try the extension from the below link to see if it works on both docker edge and stable version on mac?
https://github.com/ShiftLeftSecurity/shiftleft-scan-vscode/suites/1182490143/artifacts/17312616

@prabhu that did the trick, it is now running and the .sarif file is viewable in VSCode.  Thanks!

Cool. We will release the new extension in a few minutes. As an added bonus, it also comes with a new light color theme.


[BEAM-3088] Improves size estimation of BigQueryTableSource.

Updates BigQueryTableSource to consider data in streaming buffer when determining estimated size.
Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

R: @reuvenlax

Thanks. Will merge after tests pass.

Run Java PreCommit

Run seed job

Any status on the tests?

Run Java PreCommit

Retest this please

Run Java PostCommit


[Audio balance] A bunch of sounds files are very loud

Hey there,
Congrats on the 3.0.0 release, the map/interior are great.  Just a heads up that a number of the sound files are normalized quite a bit louder than LC audio.
Specifically: The intro audio clip that plays when landing, the aperture science elevator jingle, and the sliding door open/close audio (door type shown below).
Cheers

edit: and while not strictly a bug report, I'd love if there was more clarity on blocked doors.  It seems like you're using light boarding and some hazard signs to indicated blocked doors, but some blocked paths don't seem to have any indicator on the door at all (?).  It would be nice if you could lean into the boarding off idea and just use that uniformly, and make the boards really thick and cover the full door.  Would make navigating the interior a lot more intuitive

Volume levels for the doors were adjusted in a previous version, but I've just lowered the intro audio a bit, and the elevator jingle significantly, hopefully that makes things a little nicer. That'll be live in 3.1.0 whenever it becomes available.

edit: and while not strictly a bug report, I'd love if there was more clarity on blocked doors. It seems like you're using light boarding and some hazard signs to indicated blocked doors, but some blocked paths don't seem to have any indicator on the door at all (?). It would be nice if you could lean into the boarding off idea and just use that uniformly, and make the boards really thick and cover the full door. Would make navigating the interior a lot more intuitive

I'm open to seeing specific examples of which ones you find especially problematic so that we can re-evaluate this, but currently we're pretty happy with the readability of the blockers. The main goal was to make it so that you don't have to walk too far before you can see that a door is blocked, which I think we've at least mostly achieved.
If you want to follow up, though, please do so in another bug with some example screenshots so that we can figure out if there are any specific improvements we can make.

Hey zaggy,
Thanks for the reply and fixes.  Everything sounds a lot better.  The intro line and door sfx are perfect.  The elevator is definitely much more pleasant, though it still seems a tiny bit loud when standing inside of it (maybe ~0.5-1db too high, it's a bit overbearing when trying to talk to people)
As for the blocked doors, I can open a new issue if you want, but it seems like you've already decided against any changes so I'll just leave a quick followup here.  I think there's a strong case to be made for using a single, uniform scheme for indicating blocked doors.  Doors with an administrative sign/note don't really reach the threshold for clarity, in my opinion.  I've lost count of the times I've seen crew members walk up to these doors and try to interact with them even after spending a significant amount of time on Black Mesa.

A few examples of doors I don't think meet the bar for clarity from a distance or at a quick glance

Also, as a minor note, it seems like when walking into the shallow part of a vent, the player will always hold up their hands as if they are hitting a solid wall before proceeding

Cheers


transform \n error

I try to transform the json
"[{\"uid\":\"a8dc9967-5abd-475a-96a7-ce77ee9b4480\",\"id\":\"edbba732-27da-4dba-96b0-e9478577eca7\",\"name\":\"hello\",\"mem_name\":\"\",\"touser\":\"\",\"content\":\"[asdsadf]\n[asdfasdf]\",\"min\":6}]"

than get the type is SwiftyJSON.Type.Null
can swiftyjson parsing  "\n"?

If we don't escape \n then the string becomes
[{
  "uid": "a8dc9967-5abd-475a-96a7-ce77ee9b4480",
  "id": "edbba732-27da-4dba-96b0-e9478577eca7",
  "name": "hello",
  "mem_name": "",
  "touser": "",
  "content": "[asdsadf]
  [asdfasdf]",
  "min": 6
}]

Which IMHO is corrupted...
JSON parsing in SwiftyJSON is actually delegated to iOS's NSJSONSerialization which is where this parse is failing.
Also you can escape it simply by wrapping it with another \. like \\n


temp,flexcpu: Add BP functionality [ci skip]

I know you're not ready for this PR, but I'd like to make some comments on the code.

Now we've removed most of the same call stack things, so it should be
easier to make the assertion hold. Put this on the todo list :).
On Tue, Sep 11, 2018 at 4:15 PM Bradley<EMAIL_ADDRESS>wrote:

@animalvgamer commented on this pull request.
In src/cpu/flexcpu/simple_dataflow_thread.cc
https://github.com/darchr/gem5/pull/28#discussion_r216853378:

@@ -757,6 +870,22 @@ SDCPUThread::populateDependencies(shared_ptr inst_ptr)

 // END ISA explicit serialization

if (static_inst->isNonSpeculative()) {

   const shared_ptr<InflightInst> last_inst = *(++inflightInsts.rbegin());

   if (!(last_inst->isCommitted() || last_inst->isSquashed()))

I mean this check is really a "should never be the case" check, since in
theory, by the time I'm adding a new instruction, committed instructions
should have been taken off the buffer, and nothing should follow a squashed
instruction at this time :T. I just need to spend time to see if those
assertions hold true before I remove those barriers. I think I ran into
problems early on with unresolvable dependencies due to things being in the
same call stack though...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/darchr/gem5/pull/28#discussion_r216853378, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAGsHHn2TeVJVebxsy_H1XG1lT90ePjjks5uaEQYgaJpZM4WjsLr
.

--
Jason Lowe-Power
Assistant Professor, Computer Science Department
University of California, Davis
3049 Kemper Hall
https://faculty.engineering.ucdavis.edu/lowepower/


Display plane slot size

Slot size displayed for non-0 slots that have aircraft equipped

thanks for contributing, hm, I'm kinda not sure if it's a good thing to have - I've given it some thoughts about showing slot size in the past but for showing fleet composition and equipments, icons are sufficient, and showing slot size makes the icon underneath hard to see.
that said, probably a switch for turning slot size on / off could be better. I can do it myself during weekend or a followup PR is appreciated.

just noticed I can change the target branch of this PR, what about let's make it a new branch instead, work on it and merge after all's looking good?


My project is not being yet added

I have followed all the instructions, yet the project is not added

Hey there! I know this project has been unmaintained for quite some time — apologies! We see there's quite a backlog and we're working on it. Please allow us some time and we'll merge the PRs. Thanks!


feat: Add configuration to gazelle plugin to selectively generate swift grpc library flavors.

Initially I just made the gazelle plugin generate all of the flavors (client, client_stubs, and server). This shouldn't cause any issues since, if nothing depends on them, they'll never be evaluated. To produce "cleaner" BUILD files, though, it would be nice to have a gazelle configuration to only generate a subset of these. E.g. if the protos are only being used on the client, there is no need to generate the server protos.

Per a recent Slack thread, we need to provide a way for a client to disable the generation of all Swift GRPC targets.


Speed of Travel - Acceleration & deceleration

Any chance we can add acceleration & deceleration between 2 points? to a set maximum speed?

If I understand you correctly, it is already possible by manipulation your own travel time matrix. Here, you can accelerate the vehicle on a specific relation.
For further questions, please use discuss.graphhopper.com.
Thanks.


Upgrade glam to 0.22, bump minimum to 0.21

glam finally removed the deprecated const_vec3! macro constructor in favour of proper const fns, supported for both arrays and loose per-component arguments.  This however bumps the minimum requirement to 0.21 where these const fns were first introduced, and propagates its 1.58.1 MSRV.

woop woop! 🥳 thanks for the PR :) Sounds like it's time for dolly 0.4 then!
I'll look at setting up some CI at um... some point xD meanwhile, this LGTM.

Aaaaaaand we're live with 0.4!

@h3r2tic Thanks for merging this so quickly! Do you want to set up the CI yourself, or should I cobble together various bits of CI logic from the many projects I maintain? Think about rustfmt, clippy, cargo test, cargo doc with warnings (e.g. broken intradoc links) disallowed, and the proposed MSRV build-test.

Oh if you have some action configs handy, dolly (and I) would love a PR! I only have a subset of that in some of my projects 😅

@h3r2tic cool! Submitted in #13!


feat: Use standard key derivation for metamask and key hardware

Problem
Miguel: Switch key derivation in second layer to use BIP-44 instead of aezeed? Easier integration (metamask snap wallets would be interchangeable with wallet daemon) but we need to figure out layer1-to-layer2 integration
Proposal 1:
Discuss further. Using the same seed phrase standard as metamask for L2 makes sense to me. Since L1 and L2 wallets are independent there shouldn't be any issues with using a different scheme.
https://crates.io/crates/bip39
https://crates.io/crates/tiny-hderive

Yeah, I second this. I don't think we need to use Aezeed. It makes integration much harder


Cannot recreate reverse proxy container when Portainer is behind the reverse proxy

Bug description
When Portainer is running behind a reverse proxy, Portainer cannot recreate the reverse proxy container.
Expected behavior
Recreate the reverse proxy container; container comes back up with freshly pulled image.
Steps to reproduce the issue:

Duplicate/edit and deploy with same name or recreate the reverse proxy container from Portainer's UI.

Technical details:

Portainer version: 2.18.3
Docker version (managed by Portainer): 20.10.21
Platform (windows/linux): Ubuntu Jammy
Command used to start Portainer (docker run -p 9443:9443 portainer/portainer):
Browser: Chrome
Use Case (delete as appropriate): Using Portainer at Home
Have you reviewed our technical documentation and knowledge base? Yes

Additional context

Portainer is only configured on a bridge network (i.e. not host network)
Portainer has no ports mapped to host ports
Reverse proxy is Nginx Proxy Manager

Portainer is able to stop Nginx Proxy Manager but the network connectivity to the UI stops once the reverse proxy is down. I am assuming the subsequent payloads to delete the existing container and create the new container never make it as a result. A potential resolution would be to batch the stop+delete+create into a single POST message and have Portainer process batch parts sequentially.

@coanghel
Chicken and egg situation.
I use NPM as well, deployed as a stack. I'm able to update the stack using UI. It does go down for a few seconds while the containers restart but it does update them and Portainer UI comes back.

@samdulam confirmed that this works; created a single service stack with just NPM and am able to update by redeploying the stack.
This does feel like more of a work-around (which is fine) since I'm guessing why it works is because the stacks feature leverages docker compose which would be a single "compose up" command vs re-creating from the containers screen is essentially a stop+remove+run

It's not a work around per say. A stack update is a single command to docker. On the other hand a container recreate is multiple commands as docker does not have a recreate option. Portainer stops the container, creates a new on and waits for it to be ready. This causes the chicken and egg situation when doing it to the reverse proxy


⚠ ClamAV has degraded performance

In 1bf9110, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 151 ms

Resolved: ClamAV performance has improved in ca1bbaf.


feat: make OverlayExtensionConfig ExtensionIPRange field immutable

Reason for Change:
We want to make OverlayExtensionConfig extensionIPRange field immutable to prevent accidental changes to the field. Network Containers are getting programmed for every IP address in this field's CIDR range, and DNC/DNC-RC will not support updating this field.
Issue Fixed:

Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] relevant PR labels added

Notes:

Can you update the description to include "why?" There's not enough context here to understand why this particular field should be immutable as opposed to others.

Can you update the description to include "why?" There's not enough context here to understand why this particular field should be immutable as opposed to others.

Yeah, it was not very clear from the description. I hope it is better now.

/azp run Azure Container Networking PR

/azp run Azure Container Networking PR

/azp run Azure Container Networking PR


String operations syntax defining

Please comment your opinion on the below syntax formats and also add if few other functionalities are required.
String functions:
String length.
Syntax: strlen($string$)
Concat string
Syntax: concat($a$,$b$)
Substring
Syntax: substr($string$,$offset$,$length$)
Toupper case
Syntax: toupper($string$)
Tolower case
Syntax: tolower($string$)
Is empty?
Syntax: isempty($string$)

The above looks good. Please also add the following functionalities,
Anything to string,
str($anything$)
String Concatenation,
$string1$ + $string2$

I added all the functions but I would like to check from you whether shall we have str($anything$) function in string operations or as a part of typecast operations

Make sense to add them to a typecast library for now

This is kept in String Operations since there is no typecast library


Out of date dependencies

Your current build of ursa is out of date and won't build with the new up to date Node due to breaking V8 changes. This should be fixed by simply updating to the latest version.

this is best discussed in a pull request you submit, with tests passing :)

@substack  @juliangruber pull request done(current version won't work at all /at least with node 6.9 so make sure you merge asap)

@BDiehr  it wasn't just ursa also combiner2 had breaking changes without major release so dependencies  were resolving to a version with breaking changes . All tests pass now but need the pr to be merged


Update CircleCI to Go 1.9.1

Yes it did run the PR build
I also run on my fork https://circleci.com/gh/gliptak/hoverfly/2


Address prefix in the route configuration is unclear

Is that the ISE Connector OUtbound IP? Runtime outbound IP?

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

ID: 9c2da9f4-0b97-89d1-e516-0fc8f1831c61
Version Independent ID: 0bf30e98-17d1-5ee3-a458-c8ff30bbd9bc
Content: Set up a public outbound IP address for ISEs - Azure Logic Apps
Content Source: articles/logic-apps/connect-virtual-network-vnet-set-up-single-ip-address.md
Service: logic-apps
GitHub Login: @ecfan
Microsoft Alias: estfan

Hi @AzureAzim Thanks for reaching out. We will review and update as appropriate.

Hi @AzureAzim,
If you're referring to the Address prefix property here, the value is the IP address or range for the destination service or system in your scenario:

In the next section, Set up network rule, you specify the same address for the Destination addresses property in the route table that you create, for example, the SFTP server that's described in this scenario:

Does this explanation make sense?

I've updated the topic to clarify the value for the address prefix. If you have other comments related to this thread, please feel free to add to this post. I'll now close the issue.
@DixitArora-MSFT: #please-close

#assign @ecfan

@DixitArora-MSFT: Please update the labels on this issue to doc-enhancement? Thanks!

@ecfan Done


Fixed: code to update jobs when updating a job from Threshold updates page (#2e5vq83).

Related Issues

Closes #
Short Description and Why It's Useful

Fixed: code to update job's information when updating a job from Threshold updates page
Screenshots of Visual Changes before/after (If There Are Any)

https://user-images.githubusercontent.com/52008359/170960481-961ed00f-84f7-47ef-865e-268926da89ea.mp4
IMPORTANT NOTICE - Remember to add changelog entry
Contribution and Currently Important Rules Acceptance

[ ] I read and followed contribution rules

Closing as handled in #167


[crypto] Make HKDF limit of 32 bits on Digest a compile-time limit

Adds a compile-time test to check HKDF with outputs < 32 are impossible to write.
Contributes to #4473

@bors-libra r=kchalkias

:pushpin: Commit d6ae5bd has been approved by kchalkias

:hourglass: Testing commit d6ae5bd00cd93149d9d458981c92800951211433 with merge 40011a593f0f84cbdc37376e37def94ab0369e5d...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: kchalkias
Pushing 40011a593f0f84cbdc37376e37def94ab0369e5d to master...


After upgrade to 1-5-0, I get ImportError: dynamic module does not define init function (initcygrpc)

from google.cloud import datastore
  File "/base/data/home/apps/s~notify-engine/1-0-3.407710064260605490/lib/google/cloud/datastore/__init__.py", line 60, in <module>
    from google.cloud.datastore.batch import Batch
  File "/base/data/home/apps/s~notify-engine/1-0-3.407710064260605490/lib/google/cloud/datastore/batch.py", line 24, in <module>
    from google.cloud.datastore import helpers
  File "/base/data/home/apps/s~notify-engine/1-0-3.407710064260605490/lib/google/cloud/datastore/helpers.py", line 29, in <module>
    from google.cloud.datastore_v1.proto import datastore_pb2
  File "/base/data/home/apps/s~notify-engine/1-0-3.407710064260605490/lib/google/cloud/datastore_v1/__init__.py", line 18, in <module>
    from google.cloud.datastore_v1.gapic import datastore_client
  File "/base/data/home/apps/s~notify-engine/1-0-3.407710064260605490/lib/google/cloud/datastore_v1/gapic/datastore_client.py", line 18, in <module>
    import google.api_core.gapic_v1.client_info
  File "/base/data/home/apps/s~notify-engine/1-0-3.407710064260605490/lib/google/api_core/gapic_v1/__init__.py", line 16, in <module>
    from google.api_core.gapic_v1 import config
  File "/base/data/home/apps/s~notify-engine/1-0-3.407710064260605490/lib/google/api_core/gapic_v1/config.py", line 23, in <module>
    import grpc
  File "/base/data/home/apps/s~notify-engine/1-0-3.407710064260605490/lib/grpc/__init__.py", line 22, in <module>
    from grpc._cython import cygrpc as _cygrpc
ImportError: dynamic module does not define init function (initcygrpc)

Even after downgrade, I see same error.

I my project I am installing / upgrading these packages:
google-api-python-client
google-cloud-datastore
google-cloud-pubsub
google-endpoints
google-endpoints-api-management
oauth2client==3.0.0

Are you able to solve this issue?

Hey there! I'm sorry you're experiencing this. The driver you're having issues with is part of google-cloud-python. The Python driver in this repo (package name googledatastore) is totally separate. Please re-file this issue there and the google-cloud-python team will investigate. Sorry for the confusing situation.

This issue was moved to GoogleCloudPlatform/google-cloud-python#5170


Roll Flutter Engine from 6670f92130d9 to 8833a18e436f (1 revision)

https://github.com/flutter/engine/compare/6670f92130d9...8833a18e436f
2022-06-13<EMAIL_ADDRESS>Roll Dart SDK from ab8eafda59f7 to ec56a51b9cdd (1 revision) (flutter/engine#33991)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Disallow invalid filenames

Bugfix: Disallow illegal filenames filter
We have created a validator that checks if a filename is in a list of forbidden filenames.
This list is defined in the config file and can be extended by the administrator.
https://github.com/owncloud/ocis/issues/1002

closing superseded by #4740


Make documentation build properly fail

Ensure that when there are legitimate warnings from sphinx or its spelling module that these cause the build to fail. This should force developers to fix such issues prior to merging code that breaks the docs.
A new optional "SKIP_DOCS" env variable allows the docs checks to be skipped in some environments (eg, when the docs output will never be used, like in the standard docker images). Should be used like:
$ make SKIP_DOCS=true

See the individual commits for more detail.

This change is

test-docs-please

Failure in the ginkgo scripts:
22:53:24     runtime: Run 'pip install -r Documentation/requirements.txt'
22:53:24     runtime: Makefile:25: recipe for target 'check-requirements' failed
22:53:24     runtime: make[2]: *** [check-requirements] Error 2
22:53:24     runtime: make[2]: Leaving directory '/home/vagrant/go/src/github.com/cilium/cilium/Documentation'
22:53:24     runtime: Makefile:298: recipe for target 'check-docs' failed
22:53:24     runtime: make[1]: Leaving directory '/home/vagrant/go/src/github.com/cilium/cilium'
22:53:24     runtime: make[1]: *** [check-docs] Error 1
22:53:24     runtime: Makefile:303: recipe for target 'postcheck' failed
22:53:24     runtime: make: *** [postcheck] Error 2

test-me-please

test-docs-please


Added Generalized CAM model

@duncandc - I use a slightly different algorithm for implementing CAM scatter than you. The new method is still based on Pearson rank-order correlation coefficients, but it is entirely robust to the dynamic range and PDF of the secondary galaxy property. I have also implemented variable scatter as a function of stellar mass, or whatever the primary galaxy property is.
The ConditionalAbunMatch docstring is comprehensive and include a fairly extensive set of examples. There is also a pre-loaded model called Campbell15. The testing I have done is relatively broad, so at this point the only way to effectively find bugs is to just start using the class.
The main problem I'm having is runtime: it takes me about 20 seconds to populate Bolshoi with Campbell15. This is still fast enough to be quite useful for exploratory science, because of how much flexibility there is in the class. But obviously this is unacceptable for likelihood analyses. I have not profiled the code yet, so I don't know what's taking so long, other than that ConditionalAbunMatch is responsible. It would be useful to hear what runtimes you've been able to get with your own code. In general, notes on API, clarity, and performance are most welcome.

@duncandc - here are the relevant links to the docs:
http://halotools.readthedocs.org/en/master/api/halotools.empirical_models.ConditionalAbunMatch.html#halotools.empirical_models.ConditionalAbunMatch
http://halotools.readthedocs.org/en/master/api/halotools.empirical_models.Campbell15.html#halotools.empirical_models.Campbell15


I can't run demo app, There's no google-services.json file here.

My demo build is failed with error message like this.
Execution failed for task ':demo:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
   Searched Location:
  /Users/sinseungmin/AndroidProject/RxSocialLogin/demo/src/debug/google-services.json
  /Users/sinseungmin/AndroidProject/RxSocialLogin/demo/google-services.json

How can I play demo?
Do I have to put on my own google-service.json there? Or Is it just kind of bug?

Somehow, few of services notice me 'your secret is leaked' error (and so many email), so currently sample application doesn't provide own google-services.json.
you can use sample app with this approach

Make sample application
Register to Firebase and getting google-services.json
change package name with sample application's package name in google-services.json

This will make build is success, but GoogleLogin isn't working

Somehow, few of services notice me 'your secret is leaked' error (and so many email), so currently sample application doesn't provide own google-services.json.
you can use sample app with this approach

Make sample application
Register to Firebase and getting google-services.json
change package name with sample application's package name in google-services.json

This will make build is success, but GoogleLogin isn't working


add java 20 runtime

Closing, this became irrelevant after we did V3 Pull Request. Version sync will be done once V3 is merged.
Doing that after will be much easier then trying to sync this branch.


Error when installing from integrations area

Describe the bug
I get this in the log when I try to install Alexa Media from integration
loading configuration flow for integration alexa_media: cannot import name 'AlexapyLoginError' from 'alexapy' (/config/deps/lib/python3.7/site-packages/alexapy/init.py)
To Reproduce
Steps to reproduce the behavior:

Installed VIA hacs
Click on confuration>>integration
Click + For Alexa Media Player , just does back to integration list
See error in logg
loading configuration flow for integration alexa_media: cannot import name 'AlexapyLoginError' from 'alexapy' (/config/deps/lib/python3.7/site-packages/alexapy/init.py)

Expected behavior
I had to redo my entire HA app after some Zwave errors on 0.107  so I reinstalled the config director from backup, this is the last thing i need to get working. tried to take it all out and put it back in but still getting this error.  I am not getting notified of a Captcha
Screenshots
If applicable, add screenshots to help explain your problem.
System details

Home-assistant (version):
Hassio (Yes/No): (Please note you may have to restart hassio 2-3 times to load the latest version of alexapy after an update. This looks like a HA bug).
alexa_media  (version from const.py or HA startup):
alexapy (version from pip show alexapy or HA startup):

Logs
Please provide logs. We'll be most likely asking for them anyway.
Additional context
Add any other context about the problem here.

If you reinstalled from backup then multiple things are likely broken. Uninstall it from HACS and reinstall. Make sure you don't have an old version of alexapy in your config directory.


[BUG] {Title of the bug}

Hello,
I am trying to setup a OAK-D Lite on ROS Foxy on my Ubuntu 20.04.5 LTS machine.
I am getting an error on "Setting up procedure - Step 7" that I can't seem to find an answer to online.
~/Depthai-Tests/ros2-test/dai_ws$ ./src/depthai-ros/build.sh
Build type: RelWithDebInfo, Install_type: symlink-install
Sequential build
Starting >>> depthai_ros_msgs
Finished <<< depthai_ros_msgs [12.8s]
Starting >>> depthai_bridge
--- stderr: depthai_bridge
/home/cg22628/Depthai-Tests/ros2-test/dai_ws/src/depthai-ros/depthai_bridge/src/SpatialDetectionConverter.cpp: In member function ‘void dai::ros::SpatialDetectionConverter::toRosVisionMsg(std::shared_ptr<dai::SpatialImgDetections>, std::deque<vision_msgs::msg::Detection3DArray_<std::allocator<void> > >&)’:
/home/cg22628/Depthai-Tests/ros2-test/dai_ws/src/depthai-ros/depthai_bridge/src/SpatialDetectionConverter.cpp:103:49: error: ‘__gnu_cxx::__alloc_traits<std::allocator<vision_msgs::msg::ObjectHypothesisWithPose_<std::allocator<void> > >, vision_msgs::msg::ObjectHypothesisWithPose_<std::allocator<void> > >::value_type’ {aka ‘struct vision_msgs::msg::ObjectHypothesisWithPose_<std::allocator<void> >’} has no member named ‘hypothesis’
  103 |         opDetectionMsg.detections[i].results[0].hypothesis.class_id = std::to_string(inNetData->detections[i].label);
      |                                                 ^~~~~~~~~~
/home/cg22628/Depthai-Tests/ros2-test/dai_ws/src/depthai-ros/depthai_bridge/src/SpatialDetectionConverter.cpp:104:49: error: ‘__gnu_cxx::__alloc_traits<std::allocator<vision_msgs::msg::ObjectHypothesisWithPose_<std::allocator<void> > >, vision_msgs::msg::ObjectHypothesisWithPose_<std::allocator<void> > >::value_type’ {aka ‘struct vision_msgs::msg::ObjectHypothesisWithPose_<std::allocator<void> >’} has no member named ‘hypothesis’
  104 |         opDetectionMsg.detections[i].results[0].hypothesis.score = inNetData->detections[i].confidence;
      |                                                 ^~~~~~~~~~
make[2]: *** [CMakeFiles/depthai_bridge.dir/build.make:115: CMakeFiles/depthai_bridge.dir/src/SpatialDetectionConverter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/depthai_bridge.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< depthai_bridge [27.7s, exited with code 2]

Summary: 1 package finished [40.7s]
  1 package failed: depthai_bridge
  1 package had stderr output: depthai_bridge
  3 packages not processed

Would anyone happen to know how to fix this issue?
Thank you for you help.
G-ridge

Hi, are you using foxy branch?

Since you're using build.sh script I suspect you are on a humble branch (it hasn't been ported to foxy yet.

You need to switch branches locally as well. Indeed, when doing the step git clone https://github.com/luxonis/depthai-ros.git, this puts you into the master branch (humble). Go into the directory where you cloned it (depthai-ros/) and write git switch foxy. This will switch you to the foxy branch. Then do the other steps.


GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1

I am using python3 on raspberry pi.
I executed the following codes and reported the warning message:
import cv2
import os
import usb
if os.path.exists("/home/pi/MMRS/camA.png"):
os.remove("/home/pi/MMRS/camA.png")
camera1 = cv2.VideoCapture(0)
return_value, image = camera1.read()
cv2.imwrite('/home/pi/MMRS/camA.png', image)
del(camera1)
Can anyone help to fix it?  Thank you so much!

Dear @wineos,
Before we can help you, we need more info.
Which Debian distribution do you use? Buster (Debian 10) of Bullseye (Debian 11)?
The later doesn't support VideoCapture() any more, by the way.
Which warnings did you recieve?

Dear Qengineering,
Oh, I am using Bullseye version, 64-bit, with OpenCV 4.5.5.
I am new on all these tools, so I don't know Bullseye doesn't support VideoCapture() anymore.
Can you give me advice?  How can I rewrite it?
Thank you so much!

Dear @wineos
I've some sad news. We don't use Python here at the office, only C++. We haven't any Python code available.
Please see: https://www.raspberrypi.com/news/new-old-functionality-with-raspberry-pi-os-legacy/
Please see: https://core-electronics.com.au/guides/raspberry-pi-bullseye-camera-commands/

If you want to keep it simple and still enjoy the convenience of Python, switch back to the 'old' Buster OS and reinstall OpenCV.
Since Bullseye was only recently released, there isn't much documentation and code snippets. The difference between Buster and Bullseye is not that big. We still use Buster for our camera apps because ffmpeg doesn't support Bullseye either.
Especially as a beginner you should not always get stuck on this kind of version misery.

Dear Qengineering,
Thank you for your information and advice.
I will then switch back to Buster OS.
Thank you so much!


Update gradle to 7.0.2

To help project stay up to date

Gradle 7 is not support by IntelliJ

Gradle 7 is not support by IntelliJ

Are you sure? It seems to be working fine for me both in AS and Intellij. What error are you receiving?


Rotate / Flip live image

Hello,
The camera chip I am using is not square and I would like to Flip and rotate the image, I can do that after acquisition in the engine but I wonder if there is an option to rotate the image on the live view as well?
Thanks!
Cedric

Curious what @tlambert03 thinks but I think I'd prefer to implement such functionality in pymmcore-plus instead of here. Something like:
core.image_transforms.append(np.flip)

Curious what @tlambert03 thinks but I think I'd prefer to implement such functionality in pymmcore-plus instead of here. Something like:

love that idea.  Maybe it's time to generally attack adding functional hooks to the engine?

love that idea. Maybe it's time to generally attack adding functional hooks to the engine?

When you say "functional hooks" what does that mean?

Meaning: it's one thing to be able to connect callbacks to events emitted by the MDA... but that's one way communication: we can't modify the events and or the image  in the process.  A functional hook would provide a way to modify either the event object and or the image itself before further processing and/or event emission

Ahh gotcha. Is this something that we should use a library (a la psygnal) for, or is better to go simpler with something like keeping a list of functions to evaluate?


⚠ Bofrost.es has degraded performance

In accf03b, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1552 ms

Resolved: Bofrost.es performance has improved in f0f4bfb.