Failed at the<EMAIL_ADDRESS>install script: error code ELIFECYCLE

303 info postuninstall<EMAIL_ADDRESS>304 error<EMAIL_ADDRESS>install: node-gyp rebuild
304 error Exit status 1
305 error Failed at the<EMAIL_ADDRESS>install script.
305 error This is most likely a problem with the libxmljs package,
305 error not with npm itself.
305 error Tell the author that this fails on your system:
305 error     node-gyp rebuild
305 error You can get their info via:
305 error     npm owner ls libxmljs
305 error There is likely additional logging output above.
306 error System Linux 3.2.0-59-virtual
307 error command "/usr/bin/node" "/usr/bin/npm" "install" "libxmljs"
308 error cwd /home/nemobis/parsoid/tests
309 error node -v v0.10.26
310 error npm -v 1.4.3
311 error code ELIFECYCLE
Full log: http://p.defau.lt/?XhhRQhlxcxpN5kTkleSRqw
It happened with 0.8 but upgrading node to 0.10 didn't help. I read http://grokbase.com/t/gg/nodejs/127j3280ac/installing-libxmljs-in-centos-5-x but it has no working solution

I saw this exception with a heroku deployment - I commented over https://github.com/TooTallNate/node-gyp/issues/598 with my similar exception - it appears to be a problem with the latest node/npm combination

I've also run into an error with libxmljs 0.8.0 installing when trying to upgrade from Node 0.10.x to Node 4.2.x. My problem is that can't figure out which package has libxmljs as a dependency, so  I possibly deal with that package's dependency being out of date. Oddly, when I grep  node_modules, there are no hits for libxmljs in package.json files, yet npm install is trying to install it. I tried npm install --verbose but it doesn't show where there libxmljs dependency originates from that I can see.

I figured out what was depending on libxmljs through some guess-and-check. I ran npm install at least twice and then checked npm-debug.log. Since npm install had already run once,  on the second run, the first thing it tried to install was failing, which appeared first in the debug log. In my case, this was an old version of gulp-svgstore.  I'm not certain if the new version of   gulp-svgstore even have libxmljs in their dependency tree.


React Aria warnings on radio fields

React-Aria spams the console with the following warning:
If you do not provide children, you must specify an aria-label for accessibility

This is traced from the useRadio hook used in YesNo, DefaultGroupItemSlot, and other fields. It looks like since my implementation does not explicitly send a label or children to the hook, it's complaining. I do still render things correctly down the component tree to meet a11y but, unfortunately, the hook has other opinions on how things should be done.

Also this is a major performance impact on apps, since each visible radio will log a warning each re-render.


Support "Add to App" flutter integrations in native apps (Don't start SentrySDK if it is already running)

TL:DR - Add to App use cases where Flutter is integrated into an existing native app can have their configured SentrySDK instance stopped and 'overridden' by sentry-dart, which starts its own native SentrySDK instance. (At least for iOS)
Problem Statement
Our app is a native platform built for Android & iOS that integrates flutter for some parts of the UI of the app, but is dominantly a natively developed app. Flutter calls this the "Add to App" experience: https://flutter.dev/docs/development/add-to-app
After integrating sentry-dart into our native iOS app which was already using sentry-cocoa, we discovered that the flutter library was creating a new SentrySDK.start() instance, effectively stopping the previous instance we created in the native side of the app. This startup behavior is not necessary since we already had an instance of SentrySDK running. This code was temporarily commented out for our implementation tests, and worked just fine using our already started instance for the native app.
Since we are using "native" dominant apps, the apps each have their own project buckets on Sentry.io, one for the android app, one for the iOS app, which allows for the flutter exception events to route to the native platform project buckets, preventing the need for additional tagging of the platform and sentry library in the flutter crash. This code was also commented out.
The native app is also starting and stopping flutter as it moves between native ui and flutter ui. We wanted to keep Sentry running after the 'flutter side' was closed, so we commented out the SentrySDK.close() code as well.
Since we have a native instance of Sentry running, we are using the native DSN, and do not need to set a DSN for flutter, however SentryFlutter.init() has a requirement for options to be set. For now, we are feeding in an empty string for dsn.
await SentryFlutter.init(
  (options) => options.dsn = '' // No DSN needed as we are relying on the native SDK instance which already has a DSN assigned.
);

Edited (commented out) function code in SentryFlutterPluginApple.swift
    private func initNativeSdk(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
        guard let arguments = call.arguments as? [String: Any], !arguments.isEmpty else {
            print("Arguments is null or empty")
            result(FlutterError(code: "4", message: "Arguments is null or empty", details: nil))
            return
        }
// Sentry SDK is already running and configured in our app. Comment out this call to start().
//        SentrySDK.start { options in
//            self.updateOptions(arguments: arguments, options: options)
//
//            self.sentryOptions = options
//
// No need to configure extra tags with platform details as the native SDK is already configured for this data
//            // note : for now, in sentry-cocoa, beforeSend is not called before captureEnvelope
//            options.beforeSend = { event in
//                self.setEventOriginTag(event: event)
//
//                if var sdk = event.sdk, self.isValidSdk(sdk: sdk) {
//                    if let packages = arguments["packages"] as? [String] {
//                        if var sdkPackages = sdk["packages"] as? [String] {
//                            sdk["packages"] = sdkPackages.append(contentsOf: packages)
//                        } else {
//                            sdk["packages"] = packages
//                        }
//                    }
//
//                    if let integrations = arguments["integrations"] as? [String] {
//                        if var sdkIntegrations = sdk["integrations"] as? [String] {
//                            sdk["integrations"] = sdkIntegrations.append(contentsOf: integrations)
//                        } else {
//                            sdk["integrations"] = integrations
//                        }
//                    }
//                    event.sdk = sdk
//                }
//
//                return event
//            }
//        }
//
        // checking enableAutoSessionTracking is actually not necessary, but we'd spare the sent bits.
        if didReceiveDidBecomeActiveNotification {
            // we send a SentryHybridSdkDidBecomeActive to the Sentry Cocoa SDK, so the SDK will mimics
            // the didBecomeActiveNotification notification and start a session if not yet.
            NotificationCenter.default.post(name: Notification.Name("SentryHybridSdkDidBecomeActive"), object: nil)
            // we reset the flag for the sake of correctness
            didReceiveDidBecomeActiveNotification = false
        }

        result("")
    }

    private func closeNativeSdk(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
        // No need to close Sentry here. This is being controlled by the native app.
        //SentrySDK.close()
        result("")
    }

Proposal
SentryFlutter.init() in Dart could support optional options, or a flag within the options to say that the execution is for the "Add-to-App" experience, where a DSN is not necessary.
If SentrySDK is already running natively, do not shut it down and create a new instance for Flutter, instead use the already running instance being used by the native app.
This will help support the add-to-app bits of Flutter pretty quickly, but I'm not sure if this is the best design. Any thoughts on the right way to support this?

Hey, thanks for this throughout issue description. I understand that it can be useful to support that scenario.
This issue is kinda related https://github.com/getsentry/sentry-dart/issues/265

yep I'd say so its kinda related to it, a workaround might be removing the NativeSdkIntegration from the integrations list or using the https://pub.dev/packages/sentry instead of sentry_flutter

The RN SDK has an option called enableNative.
We could add support for it and based on that, we don't call the Native bridge for initing the SDK.
It's needed for https://github.com/getsentry/sentry-dart/issues/265 as well

Dup of #265


Changed "parse-next" to "parse-first"

64 changes staged for testing, changed "parse-next" to "parse-first". CTRL+SHIFT+F to search for all keywords containing "parse-next".
All Language files have been modified, however the translations have not been modified due to the lack of trust in google translate.
Fixes #{issue number here}
Changes proposed in this pull request:

changed every translation file from "parse-next" to "parse-first"
changed translation .json files in main/webapp to also reflect this change

Hi @josephkois, thanks for this PR! Did you try to address a problem which is described by one of our issues? If so, you could insert the issue number in the description of your pull request (at Fixes #{issue number here}).
If not, could you describe why this change is needed?
Generally, pull requests made here should only change the English translation files: the translators can then take care of updating the translations accordingly. Your change seems to reuse existing translations for a different English source, which is generally not something we should do: if you change the English source, then it is likely the translations need to be changed as well, and as such I suspect that Weblate will not mark those strings as needing new translation.

Hi @josephkois, thanks for this PR! Did you try to address a problem which is described by one of our issues? If so, you could insert the issue number in the description of your pull request (at Fixes #{issue number here}). If not, could you describe why this change is needed?
Generally, pull requests made here should only change the English translation files: the translators can then take care of updating the translations accordingly. Your change seems to reuse existing translations for a different English source, which is generally not something we should do: if you change the English source, then it is likely the translations need to be changed as well, and as such I suspect that Weblate will not mark those strings as needing new translation.

Hey sorry about that, I thought I did include the issue #.
I ended up changing all the parse-next, however did not change the translation. I will try another pull request and will only update the English translation, I will also fix the title and description of the pull request to align with the standard.
Sorry, first time contributing to open source.


CI doc: explain why CI may fail but by design (model has not improved)

added a note to part4 explaining it.


Token Catagories

I have noticed that there are only three catagories for Tokens:
Base
BtT
SoA

However some of the tokens are from Reoccurring nightmares (MoME1*), for example Eric Colt shows as a "Base" token, but he is actually from the aforementioned expansion.

I think I had it in my head these were in the conversion kit, but I was probably confused?
Maybe they should just be removed, provided no existing scenarios use them?

I think keeping those tokens is not an issue. If we have them, why don't we use them?
It just goes back to the need for better classification which I suggested earlier. Once I finish my scenario, I will work on the classification for tokens unless Scrubless wants to help?

Ref #666

Ok so it took me 5 un-boxing videos but I found it.
Yes those tokens are in the Conversion kit, 100% base game content.

Sorry I completely forgot about the conversion kit.


Some API errors do not produce advisories

Errors like these should probably also produce error advisories, what do you think @derekcollison
https://github.com/nats-io/nats-server/blob/915876db61ea97a0346bf1a618cfe5ab39742205/server/jetstream_api.go#L369

Yes

https://github.com/nats-io/nats-server/pull/1353/files


Update tutorial-pipeline-return-value.md

In ADF, the expression language does not directly support inline JSON objects with expressions . Instead, we need to concatenate strings and expressions properly. Example:
@{
concat(
'{',
'"datetime": "', utcnow(), '", ',
'"date": "', substring(utcnow(),0,10), '", ',
'"year": "', substring(utcnow(),0,4), '", ',
'"month": "', substring(utcnow(),5,2), '", ',
'"day": "', substring(utcnow(),8,2), '"',
'}'
)
}

@kromerm
Can you review the proposed changes?
Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@kromerm
Can you review this old PR and determine whether it needs to be closed or merged?

Is there anything needed or it is just the final reviewer ?

Fixed in https://github.com/MicrosoftDocs/azure-docs-pr/pull/288202. #please-close

Hello , thanks i cant find the link can you please help me with the Docs link ?


Unexpected files copy result

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.70.2
OS Version: macOS 11.2

Steps to Reproduce:

Focus a file in a folder
Use command + A to select all files in the folder
Use command + click to unselect a file, e.g. c.less
Use command + c to copy all selected files
Use command + v to paste all selected files

Results:
I copy files that i unselected (c.less), but i want to copy other files (a.less, b.less, c.less).

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.71.0. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

Same issue as #108885 it's because we treat explorer focus and select differently


Improved proxy support

I'm still testing this internally, but I believe this proxy support PR is complete. The goal here is to add the ensure that all tasks have access to proxy variables if they exist. There were several tasks that were still failing in our environment when using proxies. Especially vault, rkt, and helm. I moved the environment conditions from each task into cluster.yml. This will ensure that proxy info is available everywhere and when this info is not provided (no proxies in use), these environment variables are simply empty strings.
Will remove the WIP tag when I've built successfully in both environments internally.

ci check this

@mattymo @bradbeam this is now ready. kicking a fresh CI run.

Passed CI and working as expected internally. Merging.


Copyedit and update of simulators index page

This started out as a copy edit, but the page was three years old and needed scenario and feature updates, and contained a lot of content that, in my opinion, should be elsewhere. Much of that content is better suited for Gillen's "Run Q# with standalone applications or host programs" article, which is in progress.
I updated the content to include command line and Python hosting, used the QRNG tutorial as a reference, and removed much of the content that didn't directly relate to simulators (most of which is better suited, or already planned, for Gillen's article).
Gillen, it would be good to get your feedback on how we want to balance this overview article with yours. Since this is an overview, the meat of the content should be in your article.

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology.

Article
Acrolinxscore
Lowestcategoryscore
Spellingissues
Scorecard
Processed

articles/machines/index.md
87
75
0
link
:white_check_mark:

More information about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues
Troubleshooting issues with Acrolinx

Docs Build status updates of commit 6cc21a2:
:warning: Validation status: warnings

File
Status
Preview URL
Details

articles/machines/index.md
:warning:Warning
View
Details

articles/machines/index.md

Line 67: [Warning-InvalidFileLink] Invalid file link:(~/machines/TBD).

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology.

Article
Acrolinxscore
Lowestcategoryscore
Spellingissues
Scorecard
Processed

articles/machines/index.md
87
75
0
link
:white_check_mark:

More information about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues
Troubleshooting issues with Acrolinx

Docs Build status updates of commit 0886753:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/machines/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology.

Article
Acrolinxscore
Lowestcategoryscore
Spellingissues
Scorecard
Processed

articles/user-guide/machines/index.md
87
75
0
link
:white_check_mark:

More information about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues
Troubleshooting issues with Acrolinx

Docs Build status updates of commit 434c002:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/user-guide/machines/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology.

Article
Acrolinxscore
Lowestcategoryscore
Spellingissues
Scorecard
Processed

articles/user-guide/machines/index.md
87
75
0
link
:white_check_mark:

More information about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues
Troubleshooting issues with Acrolinx

Docs Build status updates of commit b81782d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/user-guide/machines/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology.

Article
Acrolinxscore
Lowestcategoryscore
Spellingissues
Scorecard
Processed

articles/user-guide/machines/index.md
87
75
0
link
:white_check_mark:

More information about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues
Troubleshooting issues with Acrolinx

Docs Build status updates of commit 8bc40db:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/user-guide/machines/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology.

Article
Acrolinxscore
Lowestcategoryscore
Spellingissues
Scorecard
Processed

articles/user-guide/machines/index.md
86
73
0
link
:white_check_mark:

More information about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues
Troubleshooting issues with Acrolinx

Docs Build status updates of commit 6a65f1b:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/user-guide/machines/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology.

Article
Acrolinxscore
Lowestcategoryscore
Spellingissues
Scorecard
Processed

articles/user-guide/machines/index.md
84
71
0
link
:white_check_mark:

More information about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues
Troubleshooting issues with Acrolinx

Docs Build status updates of commit 215d5b6:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/user-guide/machines/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

@gillenhaalb - thanks! Should be good to go now.


About NIG_REG loss

Hi,
Thanks for your Excellent work!
I have a confusion about the NIG reg loss term. You defined it as equ (5): $\lambda|y_{kd} - \hat \mu_{kd}|(2\hat \alpha_{kd}+\hat \upsilon_{kd})$ in your paper.
But in your code, it was implemented as
def NIG_REG(y_true, gamma, alpha, beta, reduce=False):
    error = torch.abs(y_true - gamma) / (beta * torch.reciprocal(alpha - 1.0))
    evi = 2 * alpha
    reg = error * evi

    return torch.mean(reg) if reduce else reg

This conflicts with the formula in the paper. Could you please explain why this is done, or which of the two implementations is more effective? Looking forward to your reply.

Apologies for the late reply. This is an incomplete experiment that snuck its way into the release version. In the accompanying toy problem, it appears that the correct aleatoric uncertainty is only recovered if we use evi = 2 * alpha. The change to the error term (dividing by the aleatoric uncertainty) appears to improve calibration.
For further discussion on the regularization term, I recommend this paper: [The Unreasonable Effectiveness of Deep Evidential Regression](file:///Users/lennart/Downloads/26096-Article%20Text-30159-1-2-20230626.pdf). Take a look at the sections on total evidence.
Hope this helps!


JRuby can't run specs because ronn requires (native) rdiscount

In Gentoo we don't allow any implementation to install a package if it can't run its testsuite (in general); the problem we have here is that Bundler's spec suite requires ronn to be present, and ronn is based on rdiscount which is a C extension.
Is there any hope to find some alternative to ronn? Or to get in touch with ronn's author to switch to kramdown or something else that doesn't use native code?

Is there any reason you can't just skip the manual specs on platforms that don't support ronn?

The Rakefile does not seem to allow that, if it did, I'd love to do
that...

I'd be happy to apply a pull that changes the Rakefile to do that.
On Feb 29, 2012, at 5:58 AM, Diego Elio<EMAIL_ADDRESS>wrote:

The Rakefile does not seem to allow that, if it did, I'd love to do
that...

Reply to this email directly or view it on GitHub:
https://github.com/carlhuda/bundler/issues/1682#issuecomment-4237776


Update dashboard to v1.7.1 release

ci check this

CI passed but CI has no validation tests for dashboard, and testing manually we're still seeing the reported auth issues as expected. I'm working on a rewrite for dashboard to take care of that, I'll try to submit a PR tonight or tomorrow. refs #1851


Injected styling tags to be constants

Tags surrounding the injected styles for position marking should be extracted to constants.

Done


RayCast2D force_raycast_update() not having any effect on my project

**Godot version: 3.2.stable.official
**OS/device including version: Windows10
**Issue description: I have a project developed with 3.1.2 and the RayCast2D force_raycast_update() works just fine. When I open the same project on 3.2 it does not work. I narrowed it down to the force_raycast. When I comment the RayCast2D force_raycast_update() line on 3.1.2 it generates the same error as the 3.2.
**Steps to reproduce: call RayCast2D force_raycast_update() and see if it works on 3.2

Can you upload a minimal reproduce project?
Thanks!

I'll close this as @gabrielf82  didn't upload a minimal reproduction project in time.
The issue can be reopened if someone uploads a minimal reproduction project.


Add source_mat_id slot to biosample

This is needed for @StantonMartin's biosamples submission to validate:
validate-nmdc-json -i ornl-martins-nmdc-2021-04-09.json
Additional properties are not allowed ('source_mat_id' was unexpected)
ornl-martins-nmdc-2021-04-09.json: The JSON data is ** NOT ** valid for NMDC schema.

Currently defined in mixs.yaml but not associated with any classes:
grep source_mat_id *

In src/schema:

mixs.yaml:      field source_mat_id is recommended in addition to sample_name.
mixs.yaml:  source_mat_id:
mixs.yaml:    name: source_mat_id
mixs.yaml:      the source_mat_id field. For instance, the /specimen_voucher qualifier and source_mat_id
mixs.yaml:      may refer to a value from an initial culture (e.g. ATCC:11775) while source_mat_id

@dwinston I approved :)
You might want to override (i.e., slot_usage) the description. IIRC, there was a lot of discussion about what exactly was meant by "source material".

source_mat_id is already a slot on the Biosample class, so no need to merge this.


Using a factory library to seed schema fails when polymorphic field is nil

We are using ex_machina to seed schema and data in our tests. However, when trying to seed a schema with a nil polymorphic field, we face the following error:

(UndefinedFunctionError) function nil.__struct__/0 is undefined. If you are using the dot syntax, such as map.field or module.function, make sure the left side of the dot is an atom or a map

ExMachina uses cast/2, which never pattern match on a nil value. I forked the library to provide reproduction steps in a separate codebase not to include an additional dependency here!
> mix test test/polymorphic_embed_test.exs:114
…

  1) test inserting a null embed in ExMachina factory (PolymorphicEmbedTest)
     test/polymorphic_embed_test.exs:114
     ** (UndefinedFunctionError) function nil.__struct__/0 is undefined. If you are using the dot syntax, such as map.field or module.function, make sure the left side of the dot is an atom or a map
     code: Factory.insert(
     stacktrace:
       nil.__struct__()
       (elixir 1.10.4) lib/kernel.ex:2182: Kernel.struct/3
       (polymorphic_embed 0.12.0) lib/polymorphic_embed.ex:90: PolymorphicEmbed.cast_to_changeset/2
       (polymorphic_embed 0.12.0) lib/polymorphic_embed.ex:68: PolymorphicEmbed.cast/2
       (ex_machina 2.4.0) lib/ex_machina/ecto_strategy.ex:62: ExMachina.EctoStrategy.cast_value/3
       (ex_machina 2.4.0) lib/ex_machina/ecto_strategy.ex:48: anonymous fn/2 in ExMachina.EctoStrategy.cast_all_fields/1
       (elixir 1.10.4) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
       (ex_machina 2.4.0) lib/ex_machina/ecto_strategy.ex:39: ExMachina.EctoStrategy.cast/1
       (ex_machina 2.4.0) lib/ex_machina/ecto_strategy.ex:25: ExMachina.EctoStrategy.handle_insert/2
       test/polymorphic_embed_test.exs:116: (test)

Finished in 0.4 seconds
14 tests, 1 failure, 13 excluded

Thank you for adding the test ✌
The fix is available in release 0.13

That was fast! So fast I haven't had time to push the second commit with a little cleanup and the missing cast/2 pattern match… 🍻

Too fast actually 😁 Eventually I removed the ex_machina dependency, and made a more simple test that simulates exactly how ex_machina is casting a nil value of a custom type:
test "simulate ExMachina's cast for nil value" do
  assert {:ok, nil} = Ecto.Type.cast({:parameterized, PolymorphicEmbed, %{metadata: []}}, nil)
end

Having ex_machina as a dependency will confuse contributors, and quite some code can be removed.
🍻

Also have a look at this tweet: https://twitter.com/davydog187/status/1274018846949736448
Ecto factories: https://hexdocs.pm/ecto/test-factories.html

Too fast actually 😁 Eventually I removed the ex_machina dependency, and made a more simple test that simulates exactly how ex_machina is casting a nil value of a custom type:

test "simulate ExMachina's cast for nil value" do

  assert {:ok, nil} = Ecto.Type.cast({:parameterized, PolymorphicEmbed, %{metadata: []}}, nil)

end

Having ex_machina as a dependency will confuse contributors, and quite some code can be removed.
🍻

I totally agree! My goal was not to introduce a new dependency in the lib at the first place 👍🏻

Also have a look at this tweet: https://twitter.com/davydog187/status/1274018846949736448

I actually never challenged choosing ex_machina at the first place, but reading thru this thread makes me realize I should have… It's on my list of many things to improve, thanks for sharing ❤


vid2vid

On trying vid2vid conversion, I get this error. Not sure what I'm doing wrong.

This happens with or without controlnet enabled.  Also a question on controlnet. Can you just use the input directory for controlnet ? Or do you have to export the video as frames and feed it to the batch controlnet ?

Not sure about the error. Try to process any other video, preferably mp4 with H.264 codec, as I suspect that this is some sort of problem with the video itself. Regarding controlnet, you have not to do any extra steps besides just activating it and choosing the model, the current frame will be fed to the CN by the extension itself.

Same happens to me:
A1111 Web UI Autoinstaller\stable-diffusion-webui/extensions/sd-cn-animation/scripts\core\txt2vid.py", line 62, in start_process
processed_frame = np.array(processed_frames[0])
IndexError: list index out of range

Changing the video worked for me, thanks!

I got a number of things wrong that time. Messed up height and width input, also the video was 5 minutes long lol. I exported a shorter 5 second video and made sure it was h.264 mp4. Still didn't work, BUT I restarted webui completely and now it works. So it's solved !
Thanks !


Update the manifestival to 0.7.2

Fixes: #1499

/test eventing-upgrade-tests

/test eventing-upgrade-tests


Duplicate codeowners file

@johnbent seems like we have two CODEOWNERS file present in cortx repository as follow,
https://github.com/Seagate/cortx/blob/main/CODEOWNERS
https://github.com/Seagate/cortx/blob/main/.github/CODEOWNERS
We could remove one sitting at the root of the repository

@gauravchaudhari02  Seems GitHub supports CODEOWNERS file from both root and .github folder. https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-file-location
However for clean way we should remove https://github.com/Seagate/cortx/blob/main/CODEOWNERS

@gauravchaudhari02 Seems GitHub supports CODEOWNERS file from both root and .github folder. https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-file-location
However for clean way we should remove https://github.com/Seagate/cortx/blob/main/CODEOWNERS

Agree with you @shailesh-vaidya. 👍🏼

Agree it is cleaner as @shailesh-vaidya says.  :)

Fixed: https://github.com/Seagate/cortx/commit/2371b60a462ea3f68c27657bdb7304394ace6839


Support for externally stored strings

Hi! I am in the middle of integrating localization in my project, but I was wondering if there is there a way to include strings stored in ex. a Google sheet, or a separate repo, which it fetches every X amount of time?

What about something like this:
const stringsJson = await fetch('https://somesitewithmystrings.com/strings.json') let strings = new LocalizedStrings(stringsJson) ...
:-)


TypeScript error in pixi.d.ts because of missing SpriteBatch class

An error in the TypeScript defs

In pixi.d.ts it looks like the SpriteBatch class was removed on purpose.
Update Notes: "Phaser.SpriteBatch was incorrectly applying the prototypes, causing the Sprite Batch render methods to be replaced by the normal DisplayObjectContainer ones, meaning nothing was really batched at all. This has now been fixed, and PIXI.SpriteBatch removed, as it's no longer required."
Without it in visual studio I get an error on the following code in the WebGLFastSpriteBatch class.
Here:  begin(spriteBatch: SpriteBatch, renderSession: RenderSession): void;
and Here: render(spriteBatch: SpriteBatch): void;
Adding it back in fixes the error.
export class SpriteBatch extends DisplayObjectContainer {
    constructor(texture?: Texture);

    ready: boolean;
    textureThing: Texture;

    initWebGL(gl: WebGLRenderingContext): void;

}

Hello, i have this problem.
Where can i add this to fix it?

Add the SpriteBatch class to the pixi.d.ts file.  I added it right after the Sprite class like this...
export class Sprite extends DisplayObjectContainer {

    constructor(texture: Texture);

    anchor: Point;
    blendMode: blendModes;
    exists: boolean;
    shader: IPixiShader;
    texture: Texture;
    tint: number;

    setTexture(texture: Texture, destroyBase?: boolean): void;

}

export class SpriteBatch extends DisplayObjectContainer {

    constructor(texture?: Texture);

    ready: boolean;
    textureThing: Texture;

    initWebGL(gl: WebGLRenderingContext): void;

}

@photonstorm hello, this is still missing in pixi.comments.d.ts and throws the same error when using the default typings.json


update for windows

rename few metric keys
change source few metrics

LGTM! :full_moon:

don't you fix https://github.com/mackerelio/mackerel-agent/commit/6aa01da10fb372b6d08849e9923d6fd9e0974a19#commitcomment-10816383 ?

https://github.com/mackerelio/mackerel-agent/pull/81/files#diff-30f3b6a98d65c07c03e6c7eb3874e81bR64
thanks for your checked!
I think modified it on this commit.

Ah, i missed it.


Added missing 'glue:DeleteResourcePolicy' to pivotRole in YAML and CDK

Feature or Bugfix

Bugfix

Detail

Added 'glue:DeleteResourcePolicy' in PivotRole stack (CloudFormation YAML and CDK)

Relates

#317

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

Insteas of using AWS managed policies I have opted for looking for the particular permission that was missing (and was needed) as per the discussion in #317


gup-process has 100% cpu usage

/needsMoreInfo please follow this guide to narrow down performance issues https://github.com/microsoft/vscode/wiki/Performance-Issues.

I have not installed any extensions

Closing - since the issue was reported performance work happened in tsserver, pls reopen a new issue if the problem still shows up using the guidelines described here https://github.com/microsoft/vscode/wiki/Performance-Issues.


typo fixed

there is an additional whitespace between ' the method '

Can one of the admins verify this patch?

Can any one review this code


GCP provider; Can we run the benchmarks with OSLOGIN enabled.

Is there a way to run the benchmarks with OSLOGIN enabled?
If not is there a way to run the benchmark and disable OSLOGIN at the instance level and the project level?  Some users may not have permissions to disable OSLOGIN at a project level.

PKB currently does not support OSLOGIN.
Ways to disable OSLOGIN:

Project Level: gcloud compute project-info add-metadata \ --metadata enable-oslogin=FALSE
Instance level:   gcloud compute instances add-metadata VM_NAME \  --metadata enable-oslogin=TRUE OR gcloud compute instances create VM_NAME \  --metadata enable-oslogin=FALSE

https://cloud.google.com/compute/docs/instances/managing-instance-access#enable_oslogin
An implementation to support OSLOGIN would be to add a boolean flag to support gcp os login. This flag would then add --metadata enable-oslogin=TRUE to create gce_instance when set tot true.

Please also see the section on disabling OS Login in the beginner walkthrough. It points to the same solution.
https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/tree/master/tutorials/beginner_walkthrough#disable-os-login-in-favor-of-legacy-ssh-keys
@shyamsabhaya: Since PKB doesn't use oslogin, should we always just disable oslogin on the VMs that PKB spins up?

We could do that. I believe oslogin is by default set to false. Unless a project has specified enable-oslogin=TRUE in its metadata.

If it wouldn't hurt, I think we should. If you follow the walk-through and activate cloud shell, then it sounds like OS Login becomes enabled.

Thanks.  I am looking for a way to pass an argument to pbk.py so as to disable/enable OSLOGIN at the instance level(not project level).  Based on the comment should Interpret this to mean I can do this by running the following:
./pkb.py --benchmarks=fio --metadata enable-oslogin=FALSE

Looks like I can control OSLOGIN at the instance level with this command:
 --gcp_instance_metadata=enable-oslogin:FALSE
Thanks


tf.split for unequal splits when num is odd and size_splits is not available

System information

TensorFlow version: 1.14.0

Describe the feature and the current behavior/state.
When I have a tensor of size say [99, 100, 100, 1] and want to split (batch size 99) it into 4 parts (because I have 4 GPUs). It can't be split with the existing function. I don't always know the batch size so I can't use size_splits as well.

@kamalravi, Can you provide the sample code snippet to analyze the reported issue. Thanks!

`    def make_parallel(fn, num_gpus, **kwargs):
    in_splits = {}
    for k, v in kwargs.items():
        in_splits[k] = tf.split(v, num_gpus)`

where
fn is the model
kwargs.items() are input ( [99, 100, 100, 1]) and output data ( [99, 100, 100, 1])
num_gpus is the number of available GPUs.
I want to split input and output almost evenly for each GPU. Thanks!

@kamalravi, Did you use Distribution strategy to employ multiple GPUs. Please take a look at different ways to use multiple GPUs in this doc. Thanks!

Thanks for the suggestion! Closing the issue.


homepage:          https://github.com/meteficha/fb

not  https://github.com/meteficha/facebook

That was going to be this package's name, but then I got worried about using Facebook's name some prominently.  Good catch, thanks! =)


Add a pop up dialog box for subscribing to newsletter done ! #929

Hello, PR
Add new feature - #929
Add a pop up dialog box for subscribing to newsletter done properly -

Type of change
What sort of changes have you made:

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Code style update (formatting, local variables)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist

[x] My code follows the code style of this project.
[x] I have followed the contribution guidelines
[x] I have performed a self-review of my own code.
[x] I have ensured my changes don't generate any new warnings or errors.
[x] I have updated the documentation (if necessary).
[x] I have resolved all merge conflicts.

@vishanurag @somyadipghosh  done, Sir please merge my PR with level 3, If you check other projects, they are also giving level 3 for this..

You can check my code..
Thank you 🙏🏻

resolve merge conflicts

@vishanurag @somyadipghosh done, Sir please merge my PR with level 3,

@vishanurag done, Sir please merge my PR with level 3,

@vishanurag Sir kindly 🙏🏻 upgrade the level 2 to 3, If you check other projects, they are also giving level 3 for this.. You can check my code also...

@vishanurag Thank You sir 🙏🏻


Issue normalizing GO terms

The following code currently fails, meaning that I can't run a proper query for HGNC genes for this GO term. Looking into it now...
from indra_cogex.representation import norm_id

assert norm_id("GO", "0032571") == "go:0032571"

I think the expected input is
norm_id("GO", "GO:0032571")

Here the namespace and ID have to correspond to valid INDRA values hence the above.

either way what comes out is "go:2571", totally crazy

oh sorry, I misread that. I will check if I fix the input

False alarm! perhaps the normalize function should yell if it gets something unexpected?

That's just because 3 characters corresponding to "GO:" are stripped off by index since the code recognizes that this is a "namespace embedded in ID" situation, which is why this weirdness happens if the embedded prefix is missing.


use i18next-http-backend not working

🐛 Bug Report
No loadPath api requested after running the project
To Reproduce
here is a example repo
https://github.com/yuuk/next-i18n-backend-demo
dependencies
"dependencies": {
    "i18next": "latest",
    "i18next-http-backend": "latest",
    "next": "latest",
    "next-i18next": "latest",
    "react-i18next": "latest",
    "react": "latest",
    "react-dom": "latest"
  },

next-i18next.config
const HttpBackend = require("i18next-http-backend/cjs");

const isDev = process.env.NODE_ENV === "development";

module.exports = {
  debug: isDev,
  backend: {
    loadPath: "http://localhost:3000/api/locales?lng={{lng}}&ns={{ns}}",
    addPath: "http://localhost:3000/api/locales?lng={{lng}}&ns={{ns}}",
    requestOptions: {
      mode: "no-cors",
      cache: "default",
    },
  },
  i18n: {
    defaultLocale: "en",
    locales: ["en"],
  },
  serializeConfig: false,
  use: [HttpBackend],
};

Expected behavior
Can load resources from api

runtime version: node v14.18.0

You need to define also the ns option, to "preload" the namespaces:

and the returned namespace json should be correct:

You need to define also the ns option, to "preload" the namespaces:
and the returned namespace json should be correct:

Thanks~


Error: spawn UNKNOWN when trying to getInfo

I'm using node-youtube-dl through discord.js-music for a Discord music bot. Whenever someone tries to play a song, the bot crashes at the getInfo call with the same error:
{ Error: spawn UNKNOWN     at _errnoException (util.js:1021:11)     at ChildProcess.spawn (internal/child_process.js:325:11)     at exports.spawn (child_process.js:494:9)     at exports.execFile (child_process.js:209:15)     at call (PATH_TO_BOT\node_modules\youtube-dl\lib\youtube-dl.js:163:5)     at Function.getInfo (PATH_TO_BOT\node_modules\youtube-dl\lib\youtube-dl.js:285:5)     at msg.channel.sendMessage.then.response (PATH_TO_BOT\node_modules\discord.js-music-v11\index.js:132:14)     at <anonymous>     at process._tickCallback (internal/process/next_tick.js:188:7) code: 'UNKNOWN', errno: 'UNKNOWN', syscall: 'spawn' }

I have the same issue with:
youtube-dl: 1.12.1
node: 6.11.3
----- app.js (first example from README)
var fs = require('fs');
var youtubedl = require('youtube-dl');
var video = youtubedl('http://www.youtube.com/watch?v=90AiXO1pAiA',
  // Optional arguments passed to youtube-dl.
  ['--format=18'],
  // Additional options can be given for calling `child_process.execFile()`.
  { cwd: __dirname });

// Will be called when the download starts.
video.on('info', function(info) {
  console.log('Download started');
  console.log('filename: ' + info.filename);
  console.log('size: ' + info.size);
});

video.pipe(fs.createWriteStream('myvideo.mp4'));

And here is the exception:
> node app.js
internal/child_process.js:328
    throw errnoException(err, 'spawn');
    ^

Error: spawn UNKNOWN
    at exports._errnoException (util.js:1020:11)
    at ChildProcess.spawn (internal/child_process.js:328:11)
    at exports.spawn (child_process.js:369:9)
    at exports.execFile (child_process.js:137:15)
    at call (C:\Users\********\testytdl\node_modules\youtube-dl\lib\youtube-dl.js:162:5)
    at Function.getInfo (C:\Users\********\testytdl\node_modules\youtube-dl\lib\youtube-dl.js:280:5)
    at module.exports (C:\Users\********\testytdl\node_modules\youtube-dl\lib\youtube-dl.js:106:10)
    at Object.<anonymous> (C:\Users\********\testytdl\app.js:5:13)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)

I replaced path to the project with asterisks

Version 1.11.1 works correctly.

this is still an issue it looks like. I haven't tested version 1.11.1 yet as I'm having problems getting npm to install it

I can confirm that manually going to http://rg3.github.io/youtube-dl/download.html and getting the 7meg file works.

i have the same issue with this 1.12.2 version.  version 1.11.1 works fine

Still having this issue with the new version

I have same issue here, how can i switch from 1.12.2 to 1.11.1?

For Windows possible solution on Stack Overflow

same issue on v 10.1.0 but resolved thanks @zishon89us  and others

How is it that this issue is considered to be closed? Rolling back to an old version is not a proper solution.

Can the fix be released please?
For now, we have to use a hack to fix this, which is not ideal.


FR: post several .md files into one Confluence page

Hola!
Our team are migrating from Foliant to Mark. And we faced problem that it's not possible to post several .md files into one Confluence page.
It's very useful when you have not so big documentation that is separated so that 1 section == 1 .md file. And it's not convenient to publish them in separate pages as they are too small to be a single page.
Maybe mark has this feature already? I couldn't find anything in the documentation.
Thanks!

I think the easiest way to accomplish this is using a bash script that merges the single docs together in the order you want.
If mark should do this, how would it be able to identify all the snippets?

In Foliant user must specify desired .md files based on some order. Here there can be such an option I guess. It's especially useful when you want to specify order (for example documentation or instruction).
Thanks for idea with merging! Definitely worth trying.

My team had a different use case: we wanted to generate part of our documentation and then include it in other pages. We name these auto-generated pages as *.GENERATED.md , and our publishing script excludes any page with this name to prevent them from being published directly.
I’ve had success using the Include: header to accomplish combining multiple markdown files into a single Confluence page.
Assume you have the following directory structure:
Folder
├───Page-section-1.md
├───Page-section-2.md
└───Page.md

Here, Page.md is the main file. To include other files, you can add the following lines to Page.md:
<!-- Include: Page-section-1.md -->
<!-- Include: Page-section-2.md -->

Then, just run mark on Page.md to generate the complete document with all included sections.


fix(seed): Capitalizes CSS Grid in the title of challengs

Pre-Submission Checklist

[x] Your pull request targets the staging branch of freeCodeCamp.
[x] Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
[x] You have only one commit (if not, squash them into one commit).
[x] All new and existing tests pass the command npm test. Use git commit --amend to amend any fixes.

Type of Change

[x] Small bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would change existing functionality)
[ ] Add new translation (feature adding new translations)

Checklist:

[x] Tested changes locally.
[x] Addressed currently open issue (replace XXXXX with an issue no in next line)

Closes #16870
Description
CSS Grid has been added to preFormattedBlockNames object so that it will be capitalized in the CSS Grid challenge titles.

Thanks @ahmadabdolsaheb


[Fix typo] Implemetation -> Implementation

Fixed typo in sdk\iothub\azure-mgmt-iothub\azure\mgmt\iothub_iot_hub_client.py
Description
I fixed typo in azure-sdk-for-python\sdk\iothub\azure-mgmt-iothub\azure\mgmt\iothub_iot_hub_client.py
implemetation -> implementation
All SDK Contribution checklist:

[X] The pull request does not introduce [breaking changes]
[X] CHANGELOG is updated for new features, bug fixes or other significant changes.
[X] I have read the contribution guidelines.

General Guidelines and Best Practices

[X] Title of the pull request is clear and informative.
[X] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[X] Pull request includes test coverage for the included changes.

Thanks for your contribution.
This is auto-generated code and we don't modify them manually.
There is possibly a typo in code generator, please help open a bug in the repo and we will take a look.


ActionView::Template::Error in admin/communication/websites/pages#preview

Error in Osuny
ActionView::Template::Error in admin/communication/websites/pages#preview
undefined method `url' for nil
View on Bugsnag
Stacktrace
app/views/admin/communication/blocks/templates/posts/_show.html.erb:64 - _app_views_admin_communication_blocks_templates_posts__show_html_erb___2331856834370216615_395820
app/views/admin/communication/blocks/content/_show.html.erb:3 - block in _app_views_admin_communication_blocks_content__show_html_erb__3652611926240545363_255560
app/views/admin/communication/blocks/content/_show.html.erb:2 - _app_views_admin_communication_blocks_content__show_html_erb__3652611926240545363_255560
app/views/admin/communication/websites/pages/preview.html.erb:6 - _app_views_admin_communication_websites_pages_preview_html_erb___1177062259075163179_255540
app/controllers/admin/communication/websites/pages_controller.rb:64 - preview
app/controllers/application_controller/with_locale.rb:19 - switch_locale

View full stacktrace
Created automatically via Bugsnag

An error linked to this issue has been marked as fixed in Bugsnag
ActionView::Template::Error in admin/communication/websites/pages#preview


fix some broken links in docs

- What I did
fix some broken links and some format problems.
- How I did it
- How to verify it
- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "fix-some-broken-links-in-docs" git@github.com:pengqinglan/docker.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

got it, thank you


packages upgrade

when will it come to master?

@quantosapplications Any update?

@ahujaraghav Any update?

We need to wait for @gauravguha

It's updated in version 0.2.0.
https://github.com/GeekyAnts/flick-video-player/tree/v0.2.0
And also, in this PR there were many native file changes. We missed .gitignore in commits, so it caused issues.
Please feel free to open if there is an issue. Thank you.


Update Lisk Service Framework - Closes #1083

What was the problem?
This PR resolves #1083
How was it solved?

[x] Update mysql.js to support composite primary keys
[x] Move mysql.js and the corresponding tests to the framework
[x] Signals implementation and the corresponding unit tests are up-to-date
[x] Make addMethods in microservice synchronous
[x] Publish framework to GitHub and update all microservices packages
[x] Refactor connector logic for registering proxy endpoints and events
[x] Refactor all microservices to make start process synchronous
[x] Remove unused dependencies
[x] Update mock data generator for fee estimator tests
[x] Fix fee estimator unit tests

How was it tested?

[x] Local
[x] Jenkins

Please cherry-pick commit d0510b04140c22eac7f0d41ba09f47917e224c70 from branch 1128-aggregation-inconsistencies into this PR. This resolves the issue with registering multiple HTTP routes (from various microservices) under a single path, which is broken with the latest moleculer-web update.


⚠ GitLab Server has degraded performance

In 0062256, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 6717 ms

Resolved: GitLab Server performance has improved in 6f8c2a6.


Load all .gitignores before scanning

Motivation
I'm dealing with a mixed Go and Rust project and noticed that I had written a .gitignore under the rust/ directory and it was not being applied.
What this change does

Recursively searching for all .gitignore files throughout the project's directory structure.
Merging these files into a single temporary file, with each own prefixes
Creating a gitignore object from this temporary file at the beginning of the scan.

For example, if the project's root .gitignore contains:
a/
b/

And a nested .gitignore in ./rust/ contains:
target/**

The temporary file will compile these rules into:
a/
b/
rust/target/**

@kiokuless Thank you!!


type SendMessageBatchRequestEntryQueueTypeDef missing in mypy-boto3-sqs 1.34.101

I recently upgraded my project from mypy-boto3-sqs 1.34.0 to 1.34.101, and noticed a type check error due to a missing type SendMessageBatchRequestEntryQueueTypeDef
After further investigation, it seems that 1.34.0 contains 2 identical TypeDict's: SendMessageBatchRequestEntryTypeDef and SendMessageBatchRequestEntryQueueTypeDef, and later versions contains only the first one.
According to the AWS documentation, the SendMessageBatchRequestEntry type is indeed the correct one, so I just want to confirm if this change was intentional, and it is safe to replace references to SendMessageBatchRequestEntryQueueTypeDef with SendMessageBatchRequestEntryTypeDef.
Thank you!

Hello! Thank you for the report.
Yes, the current behavior is correct, there should only be SendMessageBatchRequestEntryTypeDef. There used to be two of them because I had a logic to create a separate resource-specific TypeDef if it had different members or totality. Unfortunately, there was a bug that did not compare global and resource-specific TypeDefs correctly, so there was an unnecessary duplication.

Thanks for the response. Yes, it is working as expected.


[SDL1]: list of modes returned by SDL_ListModes() didn't sorted correctly.

According to the https://www.libsdl.org/release/SDL-1.2.15/docs/html/sdllistmodes.html, the list of screenmodes should be  sorted from largest to smallest (as it done on win32 and linux for example), while on amigaos4 realisation, we have in output something like this:
more_num: 0, w = 1920, h = 1200
more_num: 1, w = 1600, h = 1200
more_num: 2, w = 1920, h = 1080
more_num: 3, w = 1440, h = 900
more_num: 4, w = 1024, h = 768
more_num: 5, w = 1280, h = 720
While should be:
more_num: 0, w = 1920, h = 1200
more_num: 2, w = 1920, h = 1080
more_num: 1, w = 1600, h = 1200
more_num: 3, w = 1440, h = 900
more_num: 5, w = 1280, h = 720
more_num: 4, w = 1024, h = 768

Tested with testvidinfo, and seems to be better now.

Yeah, confirmed ! Thanks !


Can't figure out how to create a Google::Protobuf::RepeatedField of Google::Monitoring::V3::Point

In order to create a custom metric you must pass in a RepeatedField. To instantiate a RepeatedField you must pass in the class type that the RepeatedField will contain.
I spent 30 minutes trying to figure out how to do this. Here are some things I tried:
points = Google::Protobuf::RepeatedField.new("Google::Monitoring::V3::Point".to_sym)
points = Google::Protobuf::RepeatedField.new("Google::Monitoring::V3::TimeSeries".to_sym)
points = Google::Protobuf::RepeatedField.new("Google::Monitoring::V3::Point")
points = Google::Protobuf::RepeatedField.new("Google::Monitoring::V3::TimeSeries")
None of those worked. This is an odd pattern for Ruby so there should be documentation in the examples of how to do this.

Acknowledged. @omaray is driving the general solution of getting us to comprehensive autogen samples across all methods/APIs.

Hello everyone,
does this issue still exist or is there a solution to it? I'm trying to do something similar but was not able to create a RepeatedList with a specific custom type in Ruby so far:
messageContexts = Google::Protobuf::RepeatedField.new("Google::Cloud::Dialogflow::V2::Context".to_sym)
Thank you in advance for your support.

The discussion has moved to https://github.com/protocolbuffers/protobuf/issues/4969.

Maybe it's just me, but I would not describe Nakilon's using the word "simplified".  I would probably choose an antonym of that.

For @thagomizer's original question, the answer is to not create the RepeatingField of Points, but to instead create the message that contains it, and then append points to that empty array.
So if there's a message e.g.
message Foo {
    ...
    repeated Points points = 6;
    ...
}

Then you want to do this:
foo = Foo.new # contains an empty points RepeatedField
points1 = create_points(blah) # returns Google::Monitoring::V3::Point
points2 = create_points(blah)
foo.push points1
foo.push points2

You don't need to call RepeatedField.new, and I still don't know how to even use that with anything but a basic ruby type.

If anyone else is having the same issue in 2020, even though @gbirchmeier's solution works, it seems that the Ruby generated code has been updated since 2019 and it is now possible to set the field using an array (official documentation seems outdated as it doesn't mention it at the moment).
Here's how to do it now, based on the previous example from @gbirchmeier:
points = [
    create_points(blah) # returns Google::Monitoring::V3::Point
    create_points(blah)
]

foo = Foo.new(
    points: points,
)


[7.x] Get data from QueuedCommand

This PR allows to get the protected attribute $data from the QueuedCommand class.
Our use case is the following:
Queue::assertPushed(QueuedCommand::class, function (QueuedCommand $command) {
    return $command->getData()[0] === 'my-command';
});

This does not break anything because it only gets the data. I don't know if I should write a test because it's so simple. If you want me to write one, let me know.

If that is your use case, why not just add a method like $command->command()... $command->parameters()


Kernels: update 4.19 and add 5.4

Thanks to @orivej we can build all kernels again: https://github.com/musnix/musnix/pull/106.
When it is merged, these updates are possible.

@magnetophon - safe to close now?


Custom autocorrect messages + multi-file autocorrect support in LSP

Motivation

Users need a better message than just the error for code actions.
Multi-file autocorrects should be supported.

Test plan

See included automated tests.

MERGEBOT_SUBMIT

@jez requesting review for a look at the autocorrect API changes


Document supported and not supported LDAP and SAML providers

User Story
We know for sure some LDAP and SAML providers are in wide use with IAM V2 and we know a few that will not work (due to Dex not supporting idP initiated SSO for example).
It won't be the full long-term support matrix, but let's document what we know works and what we know doesn't for our own sake and so customers don't go down a route that we know won't work to begin with.
Reference

dex supported connectors
@bcmdarroch

we don't support SAML with Azure AD because Automate can't consume SAML IdP metadata, which Azure relies on to rotate keys.

This is a good idea for internal-facing documentation, which are docs that you write for your own team or for use by another internal org. In nearly all cases, the @chef/docs-team's scope of work follows the technical writing maxim: "Doc what you do, not what you don't".

Would it be possible to list the known/supported SAML providers on this page (https://automate.chef.io/docs/saml/)?

dex's support matrix for reference
we might use this work as a jumping off point for discussing how we could add more connectors (like Azure)

Within this team, we know some things that are being used by customers right now. Let's start by documenting these things. One of the big motivators for this is that people keep trying to use one of the multiple forms of Azure LDAP and SAML providers. Hopefully by clearly stating what we support, it will be clear that the other solutions will not work.
Internal documentation on what doesn't work can live in the codebase.
Quick list of things we know based on meeting:

MSAD
Okta
... more

For asking customer facing teams. places to inquire:

#support-team
Customer Success, Architects, etc.

Before the break, I posted in customer-eng and customer-success to see what customers are using.
Will Fisher provided this partial list (responding in customer-eng):

Okta
AZure AD (LDAP/SAML)
Tivoli Federated Identity Manager
onelogin

Due to the break, I reposted today in customer-success and in architects.


Enhancement: Enable more flexible background/sky subraction

Currently, background subtraction is done after the image is cropped and is limited to a ring around the PSF. In most cases this is fine, but as in #79, the small size of NIRISS images gave me some problems. When the fringe pattern is ~centered, the current method works fine, but if the image is off-centered, the background is restricted to a very small right, and is very near the fringe patterns. Here are a few possible changes that could help:

Do sky subraction before cropping the image, allowing users to define a ring in the full image. This leaves a bigger choice of pixels to use, even if the background ring ends up being a circular arc instead of a full circle
Allow users to provide either a boolean mask to use for sky subtraction, or to provide functions that can be used instead of the default sky_correction function. (I think a boolean mask would give a lot of flexibility and require relatively simple changes to AMICAL)

In the case of relatively small images (example NIRISS 80x80 images), I think the first point above, or something similar, is necessary to make the sky subtraction useful with NIRISS data and does not really affect other instruments. The second point would be nice to have as well, although less essential.
@DrSoulain, let me know what you think, I'd be happy to send a PR for this.

Solved by #85.


Add the method to get the credentials as a json object

Since we are going to add the credentials for message hub in the
vcap file, we expect the property "kafka_brokers_sasl" as a list.
That is the reason why we need to get the credentials as a json
object instead of a hashmap.

PG1 982


Wrong instructions in the article Tutorial: Create an application gateway with path-based routing rules using the Azure portal

In the Tutorial: Create an application gateway with path-based routing rules using the Azure portal article, inside the Create an application gateway section, Frontends tab subsection, the step 2 instructions read:

Choose Create new for the Public IP address and enter myAGPublicIPAddress for the public IP address name, and then select OK.

The current interface has the Firewall public IP address field but no Public IP address field. For this field it has the Add new option but no Create new option.

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

ID: 7c5c94a5-2548-b3a2-3a43-d52bc0892227
Version Independent ID: 01e9c2bc-3265-447c-5d0f-488039c60e87
Content: Tutorial: URL path-based routing rules using portal - Azure Application Gateway
Content Source: articles/application-gateway/create-url-route-portal.md
Service: application-gateway
GitHub Login: @vhorne
Microsoft Alias: victorh

@cox-antohi Thank you for bringing this to our attention along with the other doc issue you have raised (https://github.com/MicrosoftDocs/azure-docs/issues/56039). The Networking team is investigating this issue and will engage the content team or have updates published as appropriate.

@cox-antohi , Appreciate your patience. The doc has been edited accordingly and it would take some time for the changes to get reflect over the doc.
We are closing this issue for now. If there are further questions regarding this matter, please reply and we will gladly continue the discussion.


add -flto=thin to mac aarch64 build cflags for ez 10% gain

Adds somewhere between 5-10% improvement to wall time.
I've ran all tests, booted several fakeships and comets with this installed, and all seems to work properly.
Mac x86 is coming, I just don't have access to an intel mac right now [but soon...].
Linux will come later once I figure out some bugs.
The following is time to boot a fakeship from a brass pill:
Without LTO:
________________________________________________________
Executed in  180.46 secs    fish           external
usr time   17.83 secs    0.10 millis   17.83 secs
sys time    0.23 secs    1.86 millis    0.23 secs

With LTO:
________________________________________________________
Executed in  164.87 secs    fish           external
usr time   15.65 secs    0.12 millis   15.65 secs
sys time    0.19 secs    1.94 millis    0.19 secs

180/164 -> 1.09

I'm not sure what you mean. Currently on linux, debug symbols seem to be intact, at least in my local builds. According to
https://hubicka.blogspot.com/2018/06/gcc-8-link-time-and-interprocedural.html
this would have been fixed in GCC 8? We're using GCC 9.

I'm unsure whether this is a bug with gcc, gdb, or perhaps what is more likely - that I am just
doing something wrong.
Debug info is clearly intact on linux with the -flto option. That said, in gdb, anything that would
involve parsing DWARF file/line/column info seems completely broken. Other things like printing
local vars/args are also broken (i args and i lo return "No symbol table info available."). Some
things still work, like disassembly obviously, and commands that print global variables.
There are definitely some expected changes to the dwarf. For instance, the functions _find_home
and _pave_home. These no longer show up in the symbol table.  Observe they both show the nuu_o param.
WITH LTO:
 <1><89f9f>: Abbrev Number: 44 (DW_TAG_subprogram)
    <89fa0>   DW_AT_external    : 1
    <89fa0>   DW_AT_name        : (indirect string, offset: 0xd22e): u3m_pave
    <89fa4>   DW_AT_decl_file   : 26
    <89fa5>   DW_AT_decl_line   : 648
    <89fa7>   DW_AT_decl_column : 1
    <89fa8>   DW_AT_prototyped  : 1
    <89fa8>   DW_AT_sibling     : <0x89fba>
 <2><89fac>: Abbrev Number: 45 (DW_TAG_formal_parameter)
    <89fad>   DW_AT_name        : (indirect string, offset: 0xd0db): nuu_o
    <89fb1>   DW_AT_decl_file   : 26
    <89fb2>   DW_AT_decl_line   : 648
    <89fb4>   DW_AT_decl_column : 15
    <89fb5>   DW_AT_type        : <0x8879f>

WITHOUT LTO:
 <1><fdf55>: Abbrev Number: 44 (DW_TAG_subprogram)
    <fdf56>   DW_AT_external    : 1
    <fdf56>   DW_AT_name        : (indirect string, offset: 0x10fac): u3m_pave
    <fdf5a>   DW_AT_decl_file   : 1
    <fdf5b>   DW_AT_decl_line   : 648
    <fdf5d>   DW_AT_decl_column : 1
    <fdf5e>   DW_AT_prototyped  : 1
    <fdf5e>   DW_AT_inline      : 1	(inlined)
    <fdf5f>   DW_AT_sibling     : <0xfdf71>
 <2><fdf63>: Abbrev Number: 45 (DW_TAG_formal_parameter)
    <fdf64>   DW_AT_name        : (indirect string, offset: 0x10df6): nuu_o
    <fdf68>   DW_AT_decl_file   : 1
    <fdf69>   DW_AT_decl_line   : 648
    <fdf6b>   DW_AT_decl_column : 15
    <fdf6c>   DW_AT_type        : <0xf8cac>

Additionally, observe that the file index (26 - manage.c:648) with lto is correct:
readelf --debug-dump=rawline /home/d/src/urbit/vere2/bazel-bin/pkg/vere/urbit
Raw dump of debug contents of section .debug_line:

...

The Directory Table (offset 0x6df0):
  1	pkg/c3
  2	pkg/noun
  3	/usr/local/x86_64-linux-musl/x86_64-linux-musl/include/bits
  4	/usr/local/x86_64-linux-musl/x86_64-linux-musl/include

 The File Name Table (offset 0x6e74):
  Entry	Dir	Time	Size	Name
  1	3	0	0	alltypes.h
  2	0	0	0	<built-in>
  3	4	0	0	unistd.h
  4	4	0	0	stdio.h
  5	1	0	0	types.h
  6	4	0	0	errno.h
  7	2	0	0	types.h
  8	2	0	0	options.h
  9	2	0	0	log.c

 No Line Number Statements.
  Offset:                      0x6edf
  Length:                      633
  DWARF Version:               4
  Prologue Length:             627
  Minimum Instruction Length:  1
  Maximum Ops per Instruction: 1
  Initial value of 'is_stmt':  1
  Line Base:                   -10
  Line Range:                  242
  Opcode Base:                 13

 Opcodes:
  Opcode 1 has 0 args
  Opcode 2 has 1 arg
  Opcode 3 has 1 arg
  Opcode 4 has 1 arg
  Opcode 5 has 1 arg
  Opcode 6 has 0 args
  Opcode 7 has 0 args
  Opcode 8 has 0 args
  Opcode 9 has 1 arg
  Opcode 10 has 0 args
  Opcode 11 has 0 args
  Opcode 12 has 1 arg

 The Directory Table (offset 0x6efb):
  1	bazel-out/k8-fastbuild/bin/external/gmp/gmp/include
  2	bazel-out/k8-fastbuild/bin/external/sigsegv/sigsegv/include
  3	pkg/c3
  4	pkg/noun
  5	/usr/local/x86_64-linux-musl/x86_64-linux-musl/include/bits
  6	/usr/local/x86_64-linux-musl/x86_64-linux-musl/include/sys
  7	/usr/local/x86_64-linux-musl/x86_64-linux-musl/include

 The File Name Table (offset 0x702a):
  Entry	Dir	Time	Size	Name
  1	5	0	0	alltypes.h
  2	0	0	0	<built-in>
  3	7	0	0	unistd.h
  4	5	0	0	setjmp.h
  5	7	0	0	setjmp.h
  6	7	0	0	stdio.h
  7	7	0	0	signal.h
  8	5	0	0	signal.h
  9	6	0	0	time.h
  10	6	0	0	resource.h
  11	3	0	0	types.h
  12	7	0	0	errno.h
  13	3	0	0	defs.h
  14	4	0	0	types.h
  15	4	0	0	version.h
  16	5	0	0	stat.h
  17	4	0	0	options.h
  18	4	0	0	allocate.h
  19	4	0	0	events.h
  20	1	0	0	gmp.h
  21	4	0	0	jets.h
  22	7	0	0	time.h
  23	4	0	0	trace.h
  24	4	0	0	vortex.h
  25	2	0	0	sigsegv.h
  26	4	0	0	manage.c

I really have no idea what's causing the bad behavior in gdb then. @fighet-parnet, any ideas? Can
you repro?
gdb version 13.1 fyi. Additionally, tried fixing the DWARF version with -gdwarf-5, or -gdwarf-3,
etc. But no dice. I did this because I noticed that when -flto is specified, gcc defaults to
dwarf4. While when unspecified, it was using dwarf3.

Yeah so following up on the gdb weirdness I experienced. Basically looks like we need a
build:linux --linkopt="-g"

in .bazelrc.
The gnu optimizations docs on -flto state " If any of the input files at link time were built with debug info generation enabled the link will enable debug info generation as well." So idk why this is necessary.
Further note this warning: " Any elaborate debug info settings like the dwarf level -gdwarf-5 need to be explicitly repeated at the linker command line and mixing different settings in different translation units is discouraged. "
It doesn't look like there's any problem with the --per_file_copt hack we're using in .bazelrc for faster builds. But I guess there's the potential to run into issues given the "mixing different settings in different translation units is discouraged."
Anyway, without the explicit linktop="-g", source level debugging in gdb is broken. With it, all is good.

Okay, @barter-simsum what do you think about this appropriately grug-brained way of adding copts with quite a bit more finer-grained control than before?

Also note that this enables LTO on linux, but only on our code so by my previous testing this should work fine (though I haven't built this on linux yet.)

@fighet-parnet fantastic. Looks like this solves the issue I ran into which was that by removing .bazelrc debug/release configurations and moving them to a dual cc_library, none of the copts specified with --per_file_copt were passed to vere libraries. I'll remove a bit more thoroughly later and approve.

@fighet-parnet One thing I noticed is that the vere_library and vere_binary
macros should include on linux builds -g in the linkopts. Otherwise, we'll
probably break gdb source debugging capabilities like I previously experienced
when -flto is included (and elaborated on above).

Ah yes, for some reason I thought -flto was the link-time parameter missing. Updated.

@fighet-parnet
Ok, I think the following changes would make a bit more sense.
In top-level BUILD.bazel:
1) Just define release and debug config_settings rather than thinlto, lto, and
debug.
-- side note, why precisely is this necessary? It seems like we're basically aliasing compilation_mode.
config_setting(
    name = "rel",
    values = {
        "compilation_mode": "opt"
    }
)

config_setting(
    name = "dbg",
    values = {
        "compilation_mode": "dbg"
    }
)

2) Do the macos/linux dispatch in bazel/common_settings.bzl instead of the
top-level BUILD.bazel
something like this:
def vere_library(...):
    ...
    "//:dbg": ...,
    "//:rel": ...
        "@platforms//os:linux": ["-flto"],
        "@platforms//os:macos": ["-flto=thin"]
    ...
    etc

@fighet-parnet
Ah, that's too bad. Didn't realize select statements had that limitation. And
since this is the only use case of a dispatch on platform + , I
don't want to add a dependency on "Bazel Skylib" for config_setting_group as
suggested by the docs you linked.
LGETM

Oh, one last thing. INSTALL.md needs to be updated with the new build commands.
s/--config=dbg/--compilation_mode=dbg
I'd update this myself, but it's on a branch you own


fixed #347 - added _ to the list of valid hostname chartacters

wrong branch

can you have a look at 9b05d56c4768232fcf0a4c51f6f38bcbce1d58c4 and pull that into your PR?

ok

@rodneyrehm updated the PR.

thank you! :)

released as v1.18.12


How to demote an Owner to Member?

Is there a corresponding PowerShell method to demote an Owner to Member?
Logically the following should work, correct?
Add-TeamChannelUser -GroupId <group_id> -DisplayName "<channel-name>" -User <UPN> -Role Member

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

ID: 74381d05-2e95-4751-4285-752a46eb025f
Version Independent ID: 2481b258-b593-e323-90f0-e9ca6e7797bf
Content: Add-TeamChannelUser (teams)
Content Source: teams/teams-ps/teams/Add-TeamChannelUser.md
Service: teams-powershell
GitHub Login: @kenwith
Microsoft Alias: kenwith

@officedocsbot assign @yogkumgit

Hello @HandyAndyOnGitHub
Please see the documentation for Remove-TeamChannelUser

@get-itips  Thank you very much for the contribution and sharing this explanation. @HandyAndyOnGitHub Hope this comment is helpful for you. If you see a documentation update is required, please feel free to open an issue for the same. We proceed here to close it. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


how to evaluate aider on swe_bench lite dataset?

Issue
how can I evaluate aider on swe_bench lite dataset?
Are there documents for replication step?
Version and model info
No response

Thanks for trying aider and filing this issue. This doc may be helpful:
https://github.com/paul-gauthier/aider-swe-bench

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.


Toggle props can be passed into menu items.

Fixes #291 which allows toggle properties to be passed into menu-items when creating menus. An example of this has been included in the docs.

This is due to added spread functionality in src/menu.jsx and src/menu-item.jsx


How to get a aligned depth image and RGB image with the resolution of 1280*720

Hi
We can align the RGB image with the depth image, but they are only can be 640 * 480. How can I get a aligned depth image and RGB image with the resolution of 1280 * 720? Is there any parameters in the aligh class?
Thanks.

Required Info

Camera Model
{ D435 }

Firmware Version
(<IP_ADDRESS>)

Operating System & Version
{Win 10

Kernel Version (Linux Only)
(e.g. 4.14.13)

Platform
PC

SDK Version
{ legacy / 2.<16>.<1> }

Language
{C++ }

Segment
{others }

Issue Description
<Describe your issue / question / feature request / etc..>

The images are attached.

A simple Align script can be found here:
https://github.com/IntelRealSense/librealsense/wiki/Projection-in-RealSense-SDK-2.0#frame-alignment
You may also find the rs-align sample program useful, as it generates a 1280x720 window for alignment to take place in.
https://github.com/IntelRealSense/librealsense/tree/master/examples/align

Thanks. I can display the aligned images in 1280 * 720, but cannot save them as displayed. I would like to know how to save the aligned images in 1280 * 720?

One of the Intel guys should be able to help with this.  Thanks for your patience!

The Intel support members on this GitHub do their best to answer the majority of questions in a timely manner, though some cases take longer than others.  I promise that as long as your case remains open, Intel are aware of it.

#include <librealsense2/rs.hpp>
#include "../example.hpp"
// 3rd party header for writing png files
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#include
#include
#include
#include
#include
void remove_background(rs2::video_frame& other, const rs2::depth_frame& depth_frame, float depth_scale, float clipping_dist);
float get_depth_scale(rs2::device dev);
rs2_stream find_stream_to_align(const std::vectorrs2::stream_profile& streams);
bool profile_changed(const std::vectorrs2::stream_profile& current, const std::vectorrs2::stream_profile& prev);
int main(int argc, char * argv[]) try
{
// Create and initialize GUI related objects
window app(1280, 720, "CPP - Align Example"); // Simple window handling     // ImGui library intializition
rs2::colorizer c;                          // Helper to colorize depth images
texture renderer;                     // Helper for renderig images
									  // Create a pipeline to easily configure and start the camera
rs2::pipeline pipe;
//Calling pipeline's start() without any additional parameters will start the first device
// with its default streams.
//The start function returns the pipeline profile which the pipeline used to start the device
rs2::pipeline_profile profile = pipe.start();

// Each depth camera might have different units for depth pixels, so we get it here
// Using the pipeline's profile, we can retrieve the device that the pipeline uses
float depth_scale = get_depth_scale(profile.get_device());

//Pipeline could choose a device that does not have a color stream
//If there is no color stream, choose to align depth to another stream
rs2_stream align_to = find_stream_to_align(profile.get_streams());

// Create a rs2::align object.
// rs2::align allows us to perform alignment of depth frames to others frames
//The "align_to" is the stream type to which we plan to align depth frames.
rs2::align align(align_to);

// Define a variable for controlling the distance to clip
float depth_clipping_distance = 10000.f;

while (app) // Application still alive?
{
	// Using the align object, we block the application until a frameset is available
	rs2::frameset frameset = pipe.wait_for_frames();

	// rs2::pipeline::wait_for_frames() can replace the device it uses in case of device error or disconnection.
	// Since rs2::align is aligning depth to some other stream, we need to make sure that the stream was not changed
	//  after the call to wait_for_frames();
	if (profile_changed(pipe.get_active_profile().get_streams(), profile.get_streams()))
	{
		//If the profile was changed, update the align object, and also get the new device's depth scale
		profile = pipe.get_active_profile();
		align_to = find_stream_to_align(profile.get_streams());
		align = rs2::align(align_to);
		depth_scale = get_depth_scale(profile.get_device());
	}

	//Get processed aligned frame
	auto processed = align.process(frameset);

	// Trying to get both other and aligned depth frames
	rs2::video_frame other_frame = processed.first(align_to);
	rs2::depth_frame aligned_depth_frame = processed.get_depth_frame();

	//If one of them is unavailable, continue iteration
	if (!aligned_depth_frame || !other_frame)
	{
		continue;
	}
	// Passing both frames to remove_background so it will "strip" the background
	// NOTE: in this example, we alter the buffer of the other frame, instead of copying it and altering the copy
	//       This behavior is not recommended in real application since the other frame could be used elsewhere
	remove_background(other_frame, aligned_depth_frame, depth_scale, depth_clipping_distance);

	// Taking dimensions of the window for rendering purposes
	float w = static_cast<float>(app.width());
	float h = static_cast<float>(app.height());

	// At this point, "other_frame" is an altered frame, stripped form its background
	// Calculating the position to place the frame in the window
	rect altered_other_frame_rect{ 0, 0, w, h };
	altered_other_frame_rect = altered_other_frame_rect.adjust_ratio({ static_cast<float>(other_frame.get_width()),static_cast<float>(other_frame.get_height()) });

	// Render aligned image
	renderer.render(other_frame, altered_other_frame_rect);

	// The example also renders the depth frame, as a picture-in-picture
	// Calculating the position to place the depth frame in the window
	//rect pip_stream{ 0, 0, w / 5, h / 5 };
	//pip_stream = pip_stream.adjust_ratio({ static_cast<float>(aligned_depth_frame.get_width()),static_cast<float>(aligned_depth_frame.get_height()) });
	//pip_stream.x = altered_other_frame_rect.x + altered_other_frame_rect.w - pip_stream.w - (std::max(w, h) / 25);
	//pip_stream.y = altered_other_frame_rect.y + altered_other_frame_rect.h - pip_stream.h - (std::max(w, h) / 25);

	// Render depth (as picture in pipcture)
	rs2::video_frame vf=c.process(aligned_depth_frame);
	//renderer.upload(vf);
	//renderer.show(pip_stream);
	std::stringstream png_file;
	png_file << "rs-save-to-disk-output-" << other_frame.get_profile().stream_name() << ".png";
	stbi_write_png(png_file.str().c_str(), other_frame.get_width(), other_frame.get_height(),
		other_frame.get_bytes_per_pixel(), other_frame.get_data(), other_frame.get_stride_in_bytes());
	std::cout << "Saved " << png_file.str() << std::endl;
	std::stringstream png_file1;
	png_file1 << "rs-save-to-disk-output-" << vf.get_profile().stream_name() << ".png";
	stbi_write_png(png_file1.str().c_str(), vf.get_width(), vf.get_height(),
		vf.get_bytes_per_pixel(), vf.get_data(), vf.get_stride_in_bytes());
	std::cout << "Saved " << png_file1.str() << std::endl;

}
return EXIT_SUCCESS;

}
catch (const rs2::error & e)
{
std::cerr << "RealSense error calling " << e.get_failed_function() << "(" << e.get_failed_args() << "):\n    " << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (const std::exception & e)
{
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
float get_depth_scale(rs2::device dev)
{
// Go over the device's sensors
for (rs2::sensor& sensor : dev.query_sensors())
{
// Check if the sensor if a depth sensor
if (rs2::depth_sensor dpt = sensor.asrs2::depth_sensor())
{
return dpt.get_depth_scale();
}
}
throw std::runtime_error("Device does not have a depth sensor");
}
void remove_background(rs2::video_frame& other_frame, const rs2::depth_frame& depth_frame, float depth_scale, float clipping_dist)
{
const uint16_t* p_depth_frame = reinterpret_cast<const uint16_t*>(depth_frame.get_data());
uint8_t* p_other_frame = reinterpret_cast<uint8_t*>(const_cast<void*>(other_frame.get_data()));
int width = other_frame.get_width();
int height = other_frame.get_height();
int other_bpp = other_frame.get_bytes_per_pixel();

#pragma omp parallel for schedule(dynamic) //Using OpenMP to try to parallelise the loop
for (int y = 0; y < height; y++)
{
auto depth_pixel_index = y * width;
for (int x = 0; x < width; x++, ++depth_pixel_index)
{
// Get the depth value of the current pixel
auto pixels_distance = depth_scale * p_depth_frame[depth_pixel_index];
		// Check if the depth value is invalid (<=0) or greater than the threashold
		if (pixels_distance <= 0.f || pixels_distance > clipping_dist)
		{
			// Calculate the offset in other frame's buffer to current pixel
			auto offset = depth_pixel_index * other_bpp;

			// Set pixel to "background" color (0x999999)
			std::memset(&p_other_frame[offset], 0x01, other_bpp);
		}
	}
}

}
rs2_stream find_stream_to_align(const std::vectorrs2::stream_profile& streams)
{
//Given a vector of streams, we try to find a depth stream and another stream to align depth with.
//We prioritize color streams to make the view look better.
//If color is not available, we take another stream that (other than depth)
rs2_stream align_to = RS2_STREAM_ANY;
bool depth_stream_found = false;
bool color_stream_found = false;
for (rs2::stream_profile sp : streams)
{
rs2_stream profile_stream = sp.stream_type();
if (profile_stream != RS2_STREAM_DEPTH)
{
if (!color_stream_found)         //Prefer color
align_to = profile_stream;
		if (profile_stream == RS2_STREAM_COLOR)
		{
			color_stream_found = true;
		}
	}
	else
	{
		depth_stream_found = true;
	}
}

if (!depth_stream_found)
	throw std::runtime_error("No Depth stream available");

if (align_to == RS2_STREAM_ANY)
	throw std::runtime_error("No stream found to align with Depth");

return align_to;

}
bool profile_changed(const std::vectorrs2::stream_profile& current, const std::vectorrs2::stream_profile& prev)
{
for (auto&& sp : prev)
{
//If previous profile is in current (maybe just added another)
auto itr = std::find_if(std::begin(current), std::end(current), [&sp](const rs2::stream_profile& current_sp) { return sp.unique_id() == current_sp.unique_id(); });
if (itr == std::end(current)) //If it previous stream wasn't found in current
{
return true;
}
}
return false;
}
This is our code for aligning the RGB color image with the depth image and saving them. Hope to hear from you.

[Realsense Customer Engineering Team Comment]
Hi @fu3lab,
I'm sorry for late.
Do you ask how to config the output of the RealSense camera?
If yes, you can replace
rs2::pipeline_profile profile = pipe.start();
by
    rs2::config cfg;     cfg.enable_stream(rs2_stream::RS2_STREAM_DEPTH, 1280, 720, rs2_format::RS2_FORMAT_Z16);     cfg.enable_stream(rs2_stream::RS2_STREAM_COLOR, 1280, 720, rs2_format::RS2_FORMAT_RGB8);     rs2::pipeline_profile profile = pipe.start(cfg);

Thank you very much. This is what we want.

Thank You @RealSense-Customer-Engineering
In case someone is looking for the code to use opencv instead of imgui.
`#include <opencv2/opencv.hpp>
#include
#include <librealsense2/rs.hpp>
#include
#include
float get_depth_scale(rs2::device dev)
{
// Go over the device's sensors
for (rs2::sensor& sensor : dev.query_sensors())
{
// Check if the sensor if a depth sensor
if (rs2::depth_sensor dpt = rs2::depth_sensor(sensor))
{
return dpt.get_depth_scale();
}
}
throw std::runtime_error("Device does not have a depth sensor");
}
void remove_background(rs2::video_frame& other_frame, const rs2::depth_frame& depth_frame, float depth_scale, float clipping_dist)
{
const uint16_t* p_depth_frame = reinterpret_cast<const uint16_t*>(depth_frame.get_data());
uint8_t* p_other_frame = reinterpret_cast<uint8_t*>(const_cast<void*>(other_frame.get_data()));
int width = other_frame.get_width();
int height = other_frame.get_height();
int other_bpp = other_frame.get_bytes_per_pixel();
//#pragma omp parallel for schedule(dynamic) //Using OpenMP to try to parallelise the loop
for (int y = 0; y < height; y++)
{
auto depth_pixel_index = y * width;
for (int x = 0; x < width; x++, ++depth_pixel_index)
{
// Get the depth value of the current pixel
auto pixels_distance = depth_scale * p_depth_frame[depth_pixel_index];
	// Check if the depth value is invalid (<=0) or greater than the threashold
	if (pixels_distance <= 0.f || pixels_distance > clipping_dist)
	{
		// Calculate the offset in other frame's buffer to current pixel
		auto offset = depth_pixel_index * other_bpp;

		// Set pixel to "background" color (0x999999)
		std::memset(&p_other_frame[offset], 0x01, other_bpp);
	}
}

}
}
rs2_stream find_stream_to_align(const std::vectorrs2::stream_profile& streams)
{
//Given a vector of streams, we try to find a depth stream and another stream to align depth with.
//We prioritize color streams to make the view look better.
//If color is not available, we take another stream that (other than depth)
rs2_stream align_to = RS2_STREAM_ANY;
bool depth_stream_found = false;
bool color_stream_found = false;
for (rs2::stream_profile sp : streams)
{
rs2_stream profile_stream = sp.stream_type();
if (profile_stream != RS2_STREAM_DEPTH)
{
if (!color_stream_found) //Prefer color
align_to = profile_stream;
	if (profile_stream == RS2_STREAM_COLOR)
	{
		color_stream_found = true;
	}
}
else
{
	depth_stream_found = true;
}

}
if (!depth_stream_found)
throw std::runtime_error("No Depth stream available");
if (align_to == RS2_STREAM_ANY)
throw std::runtime_error("No stream found to align with Depth");
return align_to;
}
bool profile_changed(const std::vectorrs2::stream_profile& current, const std::vectorrs2::stream_profile& prev)
{
for(auto&& sp : prev)
{
//If previous profile is in current (maybe just added another)
auto itr = std::find_if(std::begin(current), std::end(current), [&sp](const rs2::stream_profile& current_sp) { return sp.unique_id() == current_sp.unique_id(); });
if (itr == std::end(current)) //If it previous stream wasn't found in current
{
return true;
}
}
return false;
}
int main(int argc, char * argv[]) try
{
// Create and initialize GUI related objects
// window app(1280, 720, "CPP - Align Example"); // Simple window handling // ImGui library intializition
rs2::colorizer c; // Helper to colorize depth images
// texture renderer; // Helper for renderig images
								  // Create a pipeline to easily configure and start the camera

rs2::pipeline pipe;
//Calling pipeline's start() without any additional parameters will start the first device
// with its default streams.
//The start function returns the pipeline profile which the pipeline used to start the device
rs2::pipeline_profile profile = pipe.start();
// Each depth camera might have different units for depth pixels, so we get it here
// Using the pipeline's profile, we can retrieve the device that the pipeline uses
float depth_scale = get_depth_scale(profile.get_device());
//Pipeline could choose a device that does not have a color stream
//If there is no color stream, choose to align depth to another stream
rs2_stream align_to = find_stream_to_align(profile.get_streams());
// Create a rs2::align object.
// rs2::align allows us to perform alignment of depth frames to others frames
//The "align_to" is the stream type to which we plan to align depth frames.
rs2::align align(align_to);
// Define a variable for controlling the distance to clip
float depth_clipping_distance = 10000.f;
while (true) // Application still alive?
{
// Using the align object, we block the application until a frameset is available
rs2::frameset frameset = pipe.wait_for_frames();
// rs2::pipeline::wait_for_frames() can replace the device it uses in case of device error or disconnection.
// Since rs2::align is aligning depth to some other stream, we need to make sure that the stream was not changed
//  after the call to wait_for_frames();
if (profile_changed(pipe.get_active_profile().get_streams(), profile.get_streams()))
{
	//If the profile was changed, update the align object, and also get the new device's depth scale
	profile = pipe.get_active_profile();
	align_to = find_stream_to_align(profile.get_streams());
	align = rs2::align(align_to);
	depth_scale = get_depth_scale(profile.get_device());
}

//Get processed aligned frame
auto processed = align.process(frameset);

// Trying to get both other and aligned depth frames
rs2::video_frame other_frame = processed.first(align_to);
rs2::depth_frame aligned_depth_frame = processed.get_depth_frame();

//If one of them is unavailable, continue iteration
if (!aligned_depth_frame || !other_frame)
{
	continue;
}
// Passing both frames to remove_background so it will "strip" the background
// NOTE: in this example, we alter the buffer of the other frame, instead of copying it and altering the copy
//       This behavior is not recommended in real application since the other frame could be used elsewhere
remove_background(other_frame, aligned_depth_frame, depth_scale, depth_clipping_distance);

const int w_other = other_frame.get_width();
const int h_other = other_frame.get_height();

rs2::video_frame depth_color=c.process(aligned_depth_frame);

const int w_depth = depth_color.get_width();
const int h_depth = depth_color.get_height();

std::cout << "other frame\n";
std::cout << "w = " << w_other << " h = " << h_other <<'\n';
std::cout << "stride = " << other_frame.get_stride_in_bytes() << '\n';
std::cout << "bits per pixel = " << other_frame.get_bits_per_pixel() << '\n';

std::cout << "depth frame\n";
std::cout << "w = " << w_depth << " h = " << h_depth <<'\n';
std::cout << "stride = " << depth_color.get_stride_in_bytes() << '\n';
std::cout << "bits per pixel = " << depth_color.get_bits_per_pixel() << '\n';

cv::Mat image_frame(cv::Size(w_other, h_other), CV_8UC3, (void*)other_frame.get_data(), cv::Mat::AUTO_STEP);
// cv::Mat BGR_img;
cv::Mat image_depth(cv::Size(w_depth, h_depth), CV_8UC3, (void*)depth_color.get_data(), cv::Mat::AUTO_STEP);

cv::cvtColor(image_frame, image_frame, CV_BGR2RGB);
cv::namedWindow( "Image window", cv::WINDOW_AUTOSIZE ); // Create a window for display.
cv::imshow( "Image window", image_frame );                // Show our image inside it.
cv::namedWindow( "Depth window", cv::WINDOW_AUTOSIZE ); // Create a window for display.
cv::imshow( "Depth window", image_depth );                // Show our image inside it.

if((char)cv::waitKey(25)==27)
  break;

}
return EXIT_SUCCESS;
}
catch (const rs2::error & e)
{
std::cerr << "RealSense error calling " << e.get_failed_function() << "(" << e.get_failed_args() << "):\n " << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (const std::exception & e)
{
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
`

Thank You @RealSense-Customer-Engineering for the answer.
and @fu3lab for raising the issue.
If anyone is looking for the opencv compatible version , the code is below and is independent of any third party libraries from realsense.
https://gist.github.com/MRo47/aecd9be1b58455f29b5c1544703589ae

Thank You @RealSense-Customer-Engineering for the answer.
and @fu3lab for raising the issue.
If anyone is looking for the opencv compatible version , the code is below and is independent of any third party libraries from realsense.
https://gist.github.com/MRo47/aecd9be1b58455f29b5c1544703589ae

The link for this is not working, is there another way to get this code?
Thank you!

The link is here:
https://gist.github.com/MRo47/aecd9be1b58455f29b5c1544703589ae
You can also get it via this link if the above one stops working:
https://gist.github.com/MRo47

Thanks @MartyG-RealSense . @aalarcon96 hope that solved your problem. If not try copy pasting the link in your browser

Hello again,
Is there a way to superimpose the opencv color and depth images like in rs-align? I have aligned color and depth frames using opencv but I was wondering if there was a way to view them in the same viewer like rs-align does.
Thank you!

Hi @aalarcon96
https://docs.opencv.org/3.1.0/d5/dc4/tutorial_adding_images.html
Maybe this helps?


Core components accessible in both web and mobile.

description: Core Component should be accessible with navigation in both web and mobile.

invalid issue.