Keybindings dialog

Waiting for merge of: https://github.com/mbrlabs/Lorien/pull/168
https://user-images.githubusercontent.com/542105/175877964-9c17bc2a-0850-410d-8468-9e64cb0b957b.mp4
Key rebinding dialog is ready and functional for use with keystrokes.
Here a shortlist of the most important changes:

Added a new dialog for keybindings
Added a ACTION_* translation strings to the i18n for actions

These could maybe be used to remove some duplication in the i18n files themselves in the future (lots of "Line tool" repetitions in that file)

Added a bunch of more extends Reference to various classes, because certain files actually yield transient results now, making it necessary to enable them for garbage collection.

TODO
Actually discovered while writing this PR text...

[x] Collect all added messages and convert them to i18n-strings.

Future work

Persisting keybindings. That feature is hinging on #159 . I will create a PR with that one merged to integrate them all.

Pretty big PR, thanks. Overally looks pretty good.

Yeah sorry, was working off my prototype I made 2 weeks back with this one. I was not too sure how to slice and dice this one without it stopping making sense :-/

I don't like the red color for the action buttons...i think the default button color would be best here. Or something a lot more subtle.

Completely agree. I would have liked to do something like this instead:

Or would that match your style? I fiddled with it but was not very happy. Anyway, if I can get it to work, would that be something you also like?

One general thing btw and just in case you are wondering: I originally planned to use the TreeView that Godot is also using for events. But binding multiple keystrokes to a single action got very very vertical, and the settings-windows is relatively small. Therefore I opted for this different soltution. Big disadvantage of this keybindings-page is that the GridView does not seem to allow for fine control over the column-widths. They will be all over the place. Only other thing that could be done is to write a custom layouter for the thing, which I did not want to do :-/

Or would that match your style? I fiddled with it but was not very happy. Anyway, if I can get it to work, would that be something you also like?

Yeah, that looks good 👍

Or would that match your style? I fiddled with it but was not very happy. Anyway, if I can get it to work, would that be something you also like?

Yeah, that looks good +1

This is the best I can do... really would have liked to add the trashcan to the right because that would make semantically more sense. From what I read, right-aligned icons will be a feature in a next version of Godot. So - eh. I feel not worth it to custom-code it now.

I feel not worth it to custom-code it now.

Yeah, that's fine. As for the icon...most of the time i try to use one of these for consistent art style: https://remixicon.com. Lorien already has a bin/delete icon (it's the filled version of delete-bin) which is used in the color palette editor. Sorry for not mentioning this earlier, i hope you didn't spent too much time with your custom icon (looks pretty good though 😉).

Yeah, that's fine. As for the icon...most of the time i try to use one of these for consistent art style: https://remixicon.com. Lorien already has a bin/delete icon (it's the filled version of delete-bin) which is used in the color palette editor. Sorry for not mentioning this earlier, i hope you didn't spent too much time with your custom icon (looks pretty good though wink).

Nah, don't worry. Was like 5 minutes in - Inkscape :wink: But actually I found the delete-icon a bit later which is why I opened https://github.com/mbrlabs/Lorien/issues/173 . Just having the image maps in this repo here in an accessible in some editor would have been helpful.  :D
Admittedly, I find my icons a bit more fitting for the dialog... maybe increase the distance between trashcan and text a bit??

... Looking at the dialog - I also forgot the spacing between the tabs and the list!

Alright good😄. I actually don't have these premade Remix icons in that file - it only contains custom icons a made because Remix did not have approriate ones. On the Remix website you can choose the render resolution and color and then just dowload it as png - pretty handy.

maybe increase the distance between trashcan and text a bit??

yeah, i think that would look a bit better 👍

Final look - with increased icon-text separation:

Alright i think this is good to go now. Thanks a ton!


Installation issue

I find this repo has installation issue related to metacontroller, there is no prerequisite information that has been provided. if someone has completed the installation with kustomize 3.5.4 Please share your steps, that may save lot of time.
in my case pods are getting unscheduled and it has warnings.

I agree, please add some documentation on this, I am pulling from diff other forums and diff solutions that will just make things worse


Install files in brax/v2/io and brax/v2/envs/assets required in non-editable installations

Without this change, many tests are failing after a non-editable installation with error:
2023-01-14T18:47:29.8721847Z _________________ ERROR collecting v2/spring/pipeline_test.py __________________
2023-01-14T18:47:29.8723983Z ImportError while importing test module '$PREFIX/lib/python3.10/site-packages/brax/v2/spring/pipeline_test.py'.
2023-01-14T18:47:29.8725020Z Hint: make sure your test modules/packages have valid Python names.
2023-01-14T18:47:29.8725639Z Traceback:
2023-01-14T18:47:29.8726594Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.10/importlib/__init__.py:126: in import_module
2023-01-14T18:47:29.8727869Z     return _bootstrap._gcd_import(name[level:], package, level)
2023-01-14T18:47:29.8729232Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.10/site-packages/brax/v2/spring/pipeline_test.py:20: in <module>
2023-01-14T18:47:29.8730502Z     from brax.v2 import test_utils
2023-01-14T18:47:29.8731783Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.10/site-packages/brax/v2/test_utils.py:22: in <module>
2023-01-14T18:47:29.8733083Z     from brax.v2.io import mjcf
2023-01-14T18:47:29.8733733Z E   ModuleNotFoundError: No module named 'brax.v2.io'

To reproduce:
# Run in an appropriate virtualenv or conda env
cd ~
git clone https://github.com/google/brax
cd brax
pip install .
# Navigate to a different directory to avoid cross-talking with the source directory
cd ~
mkdir testbrax
cd testbrax
pytest --pyargs brax -v

I guess the CI did not catched this error as it is only testing the editable install.

Thanks!


BUG: Begin your journey and register has same page

Is there an existing issue for this?

[X] I have searched the existing issues

What went down?
Both begin your journey and register of nav bar opens same page.

Record

[X] I agree to follow this project's Contributing.md
[X] I'm a SWOC contributor
[X] I want to work on this issue

@msv6264 Issue assigned to you.


subtraction feature added

name: Pull Request
about: Create a pull request to contribute to this repository
title: ''
labels: ''
assignees: ''
Is your pull request related to an issue?
If so, please link the issue here: [Link to the issue]
Describe your Pull Request
A clear and concise description of what you have done and why.
Changes Made
A brief summary of the changes you made.
Screenshots
If applicable, add screenshots to showcase the changes.
Checklist

[ ] I have tested my changes thoroughly.
[ ] My code follows the project's coding guidelines.
[ ] I have added necessary documentation (if applicable).
[ ] I have updated the README (if applicable).
[ ] All new and existing tests passed.
[ ] I have signed the Contributor License Agreement.

Additional Comments
Any additional information or context.
Related Issues

Fixes #[Issue Number]
Closes #[Issue Number]

@milanbhandari047 Don't be frustrated because of all the changes I've been requesting. If I were you, I would see this as a new learning opportunity. Happy coding 🥂

remove the .vscode folder from the commit. dot folders/files might be hidden in the explorer. From the command line do the following:
git rm -r .vscode
git commit -m "removed .vscode settings"
git push -u origin main

Then delete this PR and create a new one.

@rahuldahal  can you help me how to delete the PR?


request

I have two questions:

could you give some lovelace examples with thermostat and/or other possibility's?
in my case i have only one group in my OZW/RVS,  there is an option to use a second group (eg. DP 8771, 8773, 8774)
i have only one Siemens thermostat (its a bit more it can configure the whole device). Would it be possible to use the second group in a virual way?

HI I use this HACS repo custom integration to simulate/integrate my boiler into climate/thermostat cards:
https://github.com/litinoveweedle/hass-template-climate
In my case configuration.yaml looks like this (you will need to change config to match your OZW entities):

climate:
  - platform: climate_template
    name: "Heating HC1"
    modes:
      - "heat"
    preset_modes:
      - "automatic"
      - "comfort"
      - "reduced"
      - "protection"
    min_temp: 10
    max_temp: 30
    temp_step: 0.5
    current_temperature_template: "{{ states('sensor.thrs19_room_temperature_actual_value_hc1') }}"
    preset_mode_template: "{{ states('select.thrs19_operating_mode_hc1') | lower }}"
    set_temperature:
      - service: number.set_value
        target:
          entity_id: "number.thrs19_room_temperature_{% if state_attr('climate.heating_hc1', 'preset_mode') == 'automatic' %}comfort{% else %}{{ state_attr('climate.heating_hc1', 'preset_mode') }}{% endif %}_setpoint_hc1"
        data:
          value: "{{ temperature }}"
    set_preset_mode:
      - service: select.select_option
        target:
          entity_id: select.thrs19_operating_mode_hc1
        data:
          option: "{{ preset_mode | title }}"

  - platform: climate_template
    name: "Heating HC2"
    modes:
      - "heat"
    preset_modes:
      - "automatic"
      - "comfort"
      - "reduced"
      - "protection"
    min_temp: 10
    max_temp: 30
    temp_step: 0.5
    current_temperature_template: "{{ states('sensor.thrs19_room_temperature_actual_value_hc2') }}"
    preset_mode_template: "{{ states('select.thrs19_operating_mode_hc2') | lower }}"
    set_temperature:
      - service: number.set_value
        target:
          entity_id: "number.thrs19_room_temperature_{% if state_attr('climate.heating_hc2', 'preset_mode') == 'automatic' %}comfort{% else %}{{ state_attr('climate.heating_hc2', 'preset_mode') }}{% endif %}_setpoint_hc2"
        data:
          value: "{{ temperature }}"
    set_preset_mode:
      - service: select.select_option
        target:
          entity_id: select.thrs19_operating_mode_hc2
        data:
          option: "{{ preset_mode | title }}"

  - platform: climate_template
    name: "Heating DHW"
    modes:
      - "heat"
      - "off"
    min_temp: 10
    max_temp: 60
    temp_step: 1
    current_temperature_template: "{{ states('sensor.thrs19_dhw_temperature_actual_value_top_b3') }}"
    hvac_mode_template: "{% if states('switch.thrs19_dhw_operating_mode') == 'on' %}heat{% else %}off{% endif %}"
    set_temperature:
      - service: number.set_value
        target:
          entity_id: number.thrs19_dhw_temperature_nominal_setpoint
        data:
          value: "{{ temperature }}"
    set_hvac_mode:
      - condition: template
        value_template: "{{ ( hvac_mode == 'heat' and states('switch.thrs19_dhw_operating_mode') != 'on' ) or ( hvac_mode == 'off' and states('switch.thrs19_dhw_operating_mode') != 'off' ) }}"
      - service: switch.toggle
        target:
          entity_id: switch.thrs19_dhw_operating_mode


feat: refactor string package reverse

Part of https://github.com/stdlib-js/stdlib/issues/1062
Description

What is the purpose of this pull request?

This pull request:

[x] Refactors the string package @stdlib/string/reverse
[x] Adds @stdlib/string/base/reverse
[x] Adds @stdlib/string/base/reverse-code-point
[x] Adds @stdlib/string/base/reverse-grapheme-cluster

Related Issues

Does this pull request have any related issues?

This pull request:

Is part of https://github.com/stdlib-js/stdlib/issues/1062

Questions

Any questions for reviewers of this pull request?

No.
Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.
Checklist

Please ensure the following tasks are completed before submitting this pull request.

[x] Read, understood, and followed the contributing guidelines.

@stdlib-js/reviewers

@steff456 Looks like the tests don't cover all branches for reversing code points. Would you mind adding a few tests to address?

You can generate a test coverage report locally using make test-cov.

@steff456 @kgryte Looks like the coverage reported in the table is incorrect. I ran make test-cov with the TESTS_FILTER locally  and it is 100% for string/base/reverse-code-point, so everything's good! The number in the table is the coverage when running the tests for one of the other packages. Investigating...

I'm not sure why the coverage tests failed with the last commit, but when I try it locally it is working 🙃

@steff456 I believe the test coverage failure is due to a known issue. @Planeshifter can you comment?

@steff456 Will look into it, sorry for that; seems like the job was not able to push the coverage report to the test coverage repo. The table now shows that 100% coverage is achieved, though, so that's awesome!

Perf! Thanks to both 👏🏻

@steff456 Would you mind renaming the packages from
reverse-code-point
reverse-grapheme-cluster

to
reverse-code-points
reverse-grapheme-clusters

The use of singular is a bit confusing in this context, as, e.g., reverse-code-point, makes it seem as those the function only reverses a single code point, rather than a sequence of code points.

The failing CI jobs do not appear related to this PR. As such, will go ahead and merge...


Add label to main asdf docs

Add label to main index of asdf docs so that intersphinx referencing can be done.

The windows CI failure is unrelated


Updating influxdb version to 0.8.8.

Bumped up influx container version number.
This update paves way for adding collectd support in influxdb.

LGTM


'Auto Indent' and in-line indenting doesn't handle if/elseif/else/end structures in languages that don't use braces

Description
'Auto Indent' and in-line indenting doesn't handle if/elseif/else/end structures in languages that don't use braces
Steps to Reproduce

Use language like Julia that doesn't use braces for if statements
type out if statement and see auto-indent occurring incorrectly
also try 'auto indent' option from edit menu

Expected behavior:
if
    #some code
elseif
    #some code
else
    #some code
end

Actual behavior:
if
    #some code
    elseif
        #some code
    else
        #some code
    end

Versions
Release 1.8 build 1.8.0-17108 (alf_localization_release_1.8 3af64fae4)
build timestamp: Wed Nov 02 2016 04:47:30 GMT-0700
MacOS

I've installed the Julia Syntax Highlighter extension and I've created a test.jl file
The elseif seem dedented correctly.
And I cannot reproduce on http://codemirror.net/mode/julia/
But I also don't see any 'auto indent' option on Edit menu: do you have some other extensions?

I've drilled down and it seems to be an issue when the conditional statement is present beside the elseif
For instance, this indents properly:
if something
    #some code
elseif
    #some code
else
    #some code
end

But this doesn't
if somecondition
    #some code
    elseif someothercondition
    #some code
else
    #some code
end

And you're correct, the 'auto indent' option in the edit menu was in an extension. I didn't realise.

If I write simply
if somecondition
    #some code

and then write elseif is dedented correctly.
Can you reproduce on the codemirror demo? If so, you should file an issue upstream.

I get that behaviour too, but if you make the 2nd line code, not a comment, the issue arises:
if something
    something
    elseif something
else
end

if something
    #some code
elseif something
else
end

I'm using the exact example you wrote and still cannot reproduce.
Do I need some real code?
That said, if you can reproduce on CodeMirror demo the issue should be fixed there.

The last example I gave should be sufficient to reproduce. I have no idea why you're not seeing the same behavior. I can reproduce this on CodeMirror, so I'll do as you suggest and post an issue there

Issue found and addressed in codemirror

In #13116 we have upgraded CodeMirror. This should be fixed in next release.


Change log data structure in frontend

Improved frontend performance by changing the data structure of logs.
In the future, another PR will change the data structure of logs on the server side.
Afterward, logTransformMiddleware added temporarily in this PR can be removed because the server side returns logs with the new structure and data structure transformation in frontend will no longer be needed.
before
{
  "id": 60341,
  "logItems": [
    {
      "key": "epoch",
      "logId": 60341,
      "value": 232
    },
    ...,
    {
      "key": "validation/main/ap/train",
      "logId": 60341,
      "value": 0.8742285132142299
    }
  ],
  "resultId": 21
}

after
{
  "id": 60341,
  "resultId": 21,
  "logDict": {
    "epoch": 232,
    "lr": 0.000010000000000000003,
    "elapsed_time":<PHONE_NUMBER>0658506,
    ...,
    "other1/loss/conf": 1.3967612981796265,
    "validation/main/ap/train": 0.8742285132142299
  }
}

Thank you!


panel sliding

hi,
Is there a way to keep the sliding until  the visible part of my slidingpanel get hidden ?

I created a pull request adding this option. See https://github.com/umano/AndroidSlidingUpPanel/pull/577

thank you for your replay , i'am  new to github how can i use your version ?

I don't think you can use it just by adding dependencies until my pull request is reviewed and merged...you would probably have to download the library, add my changes, and add the modified library to your project. Maybe there's an easier way...but that's how I did it. If you need help doing that, I can try to help you!

inside onPanelSlide
       mPauseSong.setAlpha(slideOffset * 0);
     } else {
       mPauseSong.setAlpha(slideOffset + 1);
 }```


Swift4 Support?

Your packages have been extremely useful, any plans to get Swift 4 support going ?

Yes, they will be on Nuget next week.

Excellent :D :D

@Flash3001 Great to hear about Swift4 support.  Will there also be support for Swift 3.2 which was also released with Xcode 9?

A new set of packages was uploaded to Nuget.
If you are using the Charts library I'll be sending a update for it later this week. They already published a Swift 4/Xcode 9 compatible version, but I need to rebind it.
@GregPerez83 As far as I could check the runtime libraries are shared between the two. Do you mind to validate?

@Flash3001 It does work with 3.2.  Thank you very much for updating this quickly.

Hi, I have an issue with swift4 library libswiftCoreFoundation.dylib.
packages.config file:
<packages>
  <package id="Xamarin.Swift4" version="<IP_ADDRESS>" targetFramework="xamarinios10" />
  <package id="Xamarin.Swift4.CoreFoundation" version="4.0.3" targetFramework="xamarinios10" />
</packages>

Error:
dyld: Library not loaded: @rpath/libswiftCoreFoundation.dylib
  Referenced from: /private/var/containers/Bundle/Application/47AA1F21-E2A5-4CA2-B5DB-3182127D38AC/MyApp.app/Frameworks/EmiratesIDFw.framework/EmiratesIDFw
  Reason: no suitable image found.  Did find:
	/private/var/containers/Bundle/Application/47AA1F21-E2A5-4CA2-B5DB-3182127D38AC/MyApp.app/Frameworks/libswiftCoreFoundation.dylib: code signature invalid for '/private/var/containers/Bundle/Application/47AA1F21-E2A5-4CA2-B5DB-3182127D38AC/MyApp.app/Frameworks/libswiftCoreFoundation.dylib'
	/private/var/containers/Bundle/Application/47AA1F21-E2A5-4CA2-B5DB-3182127D38AC/MyApp.app/Frameworks/libswiftCoreFoundation.dylib: stat() failed with errno=1
	/private/var/containers/Bundle/Application/47AA1F21-E2A5-4CA2-B5DB-3182127D38AC/MyApp.app/Frameworks/libswiftCoreFoundation.dylib: code signature invalid for '/private/var/containers/Bundle/Application/47AA1F21-E2A5-4CA2-B5DB-3182127D38AC/MyApp.app/Frameworks/libswiftCoreFoundation.dylib'
Application 'com.MyApp' terminated.

Can anyone help please?


Installing an addon for previous version fails?

I was trying to install https://github.com/emanuele45/SimpleSEF on 1.1.
Yes, the 1.0 version (for test... I was hoping it would work without changes :P), though there seems to be some problem:

the fact is for a previous version apparently is not found (the package manager doesn't show the "install emulating 1.x" button, but just "install add-on"),
doing the install generates an error:

Notice: Undefined XML element: * from /.../sources/subs/Package.subs.php on line 862 in /.../sources/subs/XmlArray.class.php on line 743

and terminates with the message:
The package you are trying to download or install is either corrupt or not compatible with this version of the software.

Is that the expected behaviour?
Why does the install link is displayed if it is not compatible with the current version? I would expect to either try the emulation or not show the "install add-on" button at all.

@Spuds since you wrote that part of the emulation, do you have any reminiscence that could shed some light on this? :angel:

That was like a lifetime ago ... I'll take a look in a bit.  Also thats where that $forum_version had not been replaced by the constant, so that may have had something to do with it.

You have <install for="1.0.1 - 1.0.99"> in your xml file twice.  The second one should be  <uninstall for="1.0.1 - 1.0.99"> I remember when I packed my first addon as well, don't worry, it gets easier👅
So since the xml file is corrupt, I'd say that was the expected behavior.  Changing it at least said install emulating.

:ambulance:


chore: add test and example for button

Description

add unit test to Button
add example for disable Button

Deploy Preview
Include a direct link to your changes in this PR's deploy preview here (e.g., a specific component page).
Merge Checklist

[ ] If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
[ ] Does your change adhere to the documented style conventions?
[ ] Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
[ ] Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
[ ] Were your changes tested in the example app?
[ ] Is there adequate test coverage for your changes?
[ ] Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

[ ] Verify your changes were released to NPM at the expected version.
[ ] If you'd like, share your contribution in #show-and-tell.
[ ] 🎉 🙌 Celebrate! Thanks for your contribution.

:tada: This PR is included in version 20.16.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Added some more preconditions using hax::implies and hax::forall and slight refactoring.

Removed all use of map() for the C-extraction

Looks like hax is failing

Yeah, I opened https://github.com/hacspec/hax/pull/380 to fix this.


paths in jsconfig.json not working in insider

VSCode Version: 1.17.0-insider f7962f0682a76516df51de4856f8ccc5d8ad578a
OS Version: macOS 10.12.3

Steps to Reproduce:

open a js project with jsconfig.json:

{
    "compilerOptions": {
        "jsx": "react",
        "module": "commonjs",
        "allowSyntheticDefaultImports": true,
        // This must be specified if "paths" is set
        "baseUrl": "./",
        "moduleResolution": "node",
        // Relative to "baseUrl"
        "paths": {
            "common/*": ["src/common/*"]
        }
    }
}

then press F3 to go to definition, then failed with cannot find any definition for xxx.
Same project will work in vscode-stable.

Reproduces without extensions: No
It's strange that after it worked if I run with --disable-extensions, but I cannot find which extension cause this.
z at ZsMBP in ~/Projects/Rust/aria2c-gui (master)
$ code --list-extensions
DavidAnson.vscode-markdownlint
EditorConfig.EditorConfig
HookyQR.beautify
Ionide.Ionide-FAKE
Ionide.Ionide-fsharp
Ionide.Ionide-Paket
PeterJausovec.vscode-docker
Shan.code-settings-sync
Zignd.html-css-class-completion
agauniyal.vscode-caniuse
alphabotsec.vscode-eclipse-keybindings
anseki.vscode-color
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
dbaeumer.vscode-eslint
donjayamanne.githistory
donjayamanne.python
eg2.tslint
file-icons.file-icons
formulahendry.code-runner
freebroccolo.reasonml
hackwaly.ocaml
humao.rest-client
jrieken.backspace-plusplus
jtlowe.vscode-icon-theme
kogai.regex-railroad-diagrams
kumar-harsh.graphql-for-vscode
ms-vscode.csharp
qinjia.seti-icons
robertohuertasm.vscode-icons
robinbentley.sass-indented
rust-lang.rust
searKing.preview-vscode
steoates.autoimport
vadimcn.vscode-lldb
wix.vscode-import-cost
wmaurer.vscode-jumpy
xabikos.JavaScriptSnippets
xyz.local-history

Sounds like one of those extensions is to blame. Try disabling all extensions that apply to JavaScript or TypeScript and then enabling them one by one to track down which one may have caused this
You may also want to try changing the active TypeScript version in your workspace to see if this fixes things

@mjbvz I tried replacing typescript version to global installed 2.3.4, it worked! Looks like typescript in vscode-insider cannot work well with current version of jsconfig.json.

@zaaack Can you please also try this with TypeScript 2.5.3 which is included in VSCode 1.17?
If that doesn't work, also try out the nightly typescript as well (npm install typescript@next) to see if the issue has been fixed there in that


Update 'run' command doc for better readability.  Issue:#22721

closes #22721
- What I did
Changed the documentation for 'run' cmd as recommended in #22721 i.e. in the [Set environment variables] (https://github.com/docker/docker/blob/master/docs/reference/commandline/run.md#set-environment-variables--e---env---env-file) section, changed the following:
From: then that variable's current value is passed through (i.e. $MYVAR1 from the host is set to $MYVAR1 in the container).
To: then that variable's current value, set via export, is passed through (i.e. $MYVAR1 from the host is set to $MYVAR1 in the container).
- Description for the changelog
'run' cmd doc updated for better readability

LGTM, thanks @mansinahar!
ping @SvenDowideit @vdemeester ptal

LGTM 🐯


kernel: use ts-node insteadof tsc compiled source

Currently test by following steps

compile src to out
mocha out/test

We will change it to following:

mocha --require ts-node/register

Pros

No overhead
No out/ file

Blocker #332

Main reason is that simplify transpile work flow.

Previous

tsc: src -> es_modules
babel: es_modules -> lib

Future

tsc: src -> lib
#354


unable to verify the first certificate

Version: 1.10.1
AzCopy Version: 10.2.1
Platform: Windows
Architecture: ia32
Build Number: 20190919.2
Commit: 868c6dff1
Support ID: 53e4cd95-f15a-82cb-9cb5-2e099058571f
Bug Description
When attempting to browse in my gen1 account, I am getting this error:

Steps to Reproduce
go to browse one of your gen1 accounts in storage explorer

@alexgman Have you gone our troubleshooting guide?

Closing due to lack of reply.


ROS2 Documentation on launch files tab autocompletion

I found out the hardway that the launch files should have the keyword launch in its filename to be found by ros2 launch <package> <launch file> auto completion. Examples:

run_robot.launch.py
run_tobot_launch_py

Maybe I am missing this piece of information. If not, I think it should be added to either:
https://docs.ros.org/en/rolling/How-To-Guides/Launch-file-different-formats.html
or
https://docs.ros.org/en/rolling/How-To-Guides/Launching-composable-nodes.html

launch files should have the keyword launch in its filename to be found by ros2 launch <package> <launch file> auto completion

This launch file tutorial would probably be the right place to mention this: https://docs.ros.org/en/rolling/Tutorials/Intermediate/Launch/Launch-system.html#writing-the-launch-file. Specifically somewhere in or after this sentence:

Inside your launch directory, create a new launch file called my_script_launch.py. _launch.py is recommended, but not required, as the file suffix for Python launch files.


Import all auth plugins

Signed-off-by: Harsh Thakur<EMAIL_ADDRESS>Fixes https://github.com/kubesphere/kubeeye/issues/61

/assign @zryfish

/asssign @ruiyaoOps @pixiake

@RealHarshThakur  I had a test on GCP, it can't work on it, so what fixed by this PR?

kubeeye is working well at AKS and EKS, there are no problems.

@ruiyaoOps I tested with GKE itself and it worked for me. Can you please try again?

it works @pixiake pi
thanks for your contribution @RealHarshThakur

/approve
/lgtm

@all-contributors please add @RealHarshThakur for code


add WithOtherFields for TransactionReceipt

Test failing

Test failing

@Eikix It wasn't a code issue, it's our CI that's failing randomly right for a week or so now.
We'll have to look at this closely, but in anyway it wasn't the code because the fail that occurred had nothing to do with the added parts and relaunching the tests gives green light on the CI.

Could we try running the whole system locally with docker compose and checking that out of Cairo steps transactions are indexed correctly ?

Best would be a real test but this works too

@greg Good timing, just wrote an issue to track this properly https://github.com/kkrt-labs/kakarot-rpc/issues/1457

Best would be a real test but this works too

i think writing a test for it is shorter than trying locally

@Eikix I think we can merge this to move forward and do the test in a follow up PR tomorrow as per https://github.com/kkrt-labs/kakarot-rpc/issues/1457

@Eikix Can we merge this so that @eugypalu can move on with tests?


if MDB insert a Chinese ,open CIS_Lib.mdb  Chinese show error codes .

let env: Environment = Environment::new().unwrap();
let connection_string =  "Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:/Users/U35/Documents/CIS_Lib.mdb;";
let conn =env.connect_with_connection_string(&connection_string, ConnectionOptions::default());
let create_table_sql = "CREATE TABLE Birthdays111 (id INT PRIMARY KEY,[Value] VARCHAR(255),year INT);";
conn.execute(create_table_sql, ())?;
conn.execute(
"INSERT INTO Birthdays111 (id,[Value], year) VALUES (?,?, ?)",
(&11, "您好".into_parameter(), &12),
)?;
open CIS_Lib.mdb    through Microsoft Access on the windows10 Chinese show error codes .How to deal with it?

Hello,
what is the error message you see?

cargo run dev is successful.when I open CIS_Lib.mdb through Microsoft Access on the windows10 Chinese show it

If there is an error in the picture I can not see it.

if CIS_Lib.mdb files insert an Chinese such as "您好" ,cargo run dev is successful.when I open CIS_Lib.mdb through Microsoft Access on the windows10 .Chinese isn't show "您好". MayBe my computer 's character set is GKB,rust support utf-8,How to deal with it?

Actually odbc-api should automatically use wide strings on windows, because on windows it is not assumed that the default encoding is utf-8.

With your description from earlier today it rather seemed to me that the widestring crate I used missidentifies some of the strings as not valid utf-8. Can not confirm yet though. My point being, there might still be something to do for me here. This should have worked independent of your systems local (i.e. regional settings)

.into_parameter() only support utf-8,if you component  's character set is GKB .into_parameter() will cause show error ,must to do  buffer_description

Alternatively you might opt out of using your system local in windows by using utf16 encoding:
let arg = U16String::from_str("您好");
conn.execute(&insert_sql, &arg.into_parameter()).unwrap();


Header/Footer of docx file

Hello! Thanks for the excellent work!
Is it just me, or is text in the header/footer not being replaced?

Looks like this issue was predicted:
	f := t.documentMain // TODO: loop all xml files

so i will try to fix/test it :+1:

Thank you for looking into it! That is awesome.
So far, this is the best Word Processing Lib I could find on the web, and your solution to rendering out lists is excellent and clever!

Thank you! Please check the new version when possible. It seems a bit of motivation was all I needed to complete this feature. :)

Wow, that was quick! Thanks! Now it is working perfectly for both header and footer


Index ignores site.url and always creates relative links

Generated search-index.js always contains only relative paths and ignores site.url setting in the playbook.

Hello @a-tokar, it's intended and this change was made to make the index "portable", see https://github.com/Mogztter/antora-lunr/issues/38
If you are using the default UI, please make sure to use the latest version of the supplemental_ui directory: https://github.com/Mogztter/antora-lunr/tree/v0.7.1/supplemental_ui

@Mogztter thanks for the information!
Looks like I used not the most recent version...

No worries, the update procedure is a bit cumbersome!


fix: prevent duplicated point of linear element with multiple points

Fixed adding origin twice to points.
(the cause is the touchup event that occurred before initializing MultiElement when linear element is added.)
Before

Now

Hey. This breaks desktop workflow because I imagine the second (preview) point isn't created and thus doesn't follow the cursor as you move the pointer around.
I don't recall exactly, but I think the way go about this is instead not "committing" the second point if it's around the same position as the first point.

@dwelle
Thank you for letting me know how to fix it.
I fixed it as I understood and passed the test this time.


Generalize termination metrics to expressions

As currently implemented, termination metrics are limited to variables — such as m and n in ⟦ ...  / [m], [n]⟧ in https://github.com/shingarov/MachineArithmetic/blob/termination6/SpriteLang-Tests/L7PosTest.class.st .  This is insufficient: sometimes induction is over an expression such as len(xs) + len(ys) in https://github.com/ranjitjhala/sprite-lang/blob/master/test/L7/pos/braid.re .
As such, the bogus assumption imposed in RefinementParser>>myExprP and MetricExpression — that the expression inside [ ... ] will never happen to be anything other than a variable — is there just to play with the proof-of-concept.  Undefined bad things will happen if we feed braid.re to the machine.
This Issue seeks to address the difficulty arising from the interaction between #< and #subst: — they do not compose because x<y is no longer substable by simple variable renaming, leading to a DelayedSubst, which doesn't admit naïve textual manipulation like in our #<.  Is there any reason to have MetricExpression and not just use DecidableRefinement (which should be called something like SmalltalkExpr)?  #< would then create one of those delayed message sends — will they continue to work for termination proofs?

FYI @Mark-hi


"Following" feature doesn't appear to work

Describe the bug
When clicking on the "Following" link (e.g. https://docs.microsoft.com/en-us/users/) a description briefly shows on the right saying "Follow your favourite threads, topics and users" which then disappears.
To Reproduce
Steps to reproduce the behavior:

Go to 'https://docs.microsoft.com/en-us/users'
Click "Following" on the left hand side of the screen
View the screen very carefully!

Expected behavior
Options to view favourite threads, topics and users.  In my case, the only thing that shows up is a Q&A thread I'm following.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: Mac OS X 10.15.4
Browser: Edge
Version: 81.0.416.72

@philstubbington You can give feedback about Q&A at https://docs.microsoft.com/en-us/answers/content/idea/list.html


Add combined cluster to test in staging

@mpolden

@kkraune @hmusum FYI. We'll revert. Just want to see if this is caught in the new staging tests.


feat: migrate to deprecated-react-native-prop-types

Does any other open PR do the same thing?
No.
What issue is this PR fixing?
Image.propTypes, Text.propTypes, TextInput.propTypes, ColorPropType, EdgeInsetsPropType, PointPropType, and ViewPropTypes from react-native are deprecated, and starting from<EMAIL_ADDRESS>using them will print a warning. They have already been removed in the main branch, so<EMAIL_ADDRESS>likely won't include them at all.
See<EMAIL_ADDRESS>changelog
Suggested solution is to use the deprecated-react-native-prop-types package instead, which this PR does.
How did you test this PR?
Installed react-native-maps in a<EMAIL_ADDRESS>project, resulting in a lot of warning messages. After these changes, the warnings are no longer printed and the library continue to work as expected.

@christopherdro could you look into this?


[JavaScript/Node.js] Support for "Go to definition" of code located in "node_modules"

From @drywolf on January 29, 2016 15:54
I am using "npm link ../../lib/my-lib" to symlink a local module that is shared across several apps into the "node_modules" directory of each of the apps. This is nice for developing the shared lib in combination with all the apps.
// a standard npm module, can't navigate to its definition
var shortid = require('shortid');
// some functions from a symlink-ed local module inside node_modules, can't navigate to it either
var ModelMountUtils = require('@ipp/loopback-lib').ModelMountUtils;
var RemoteMethodUtils = require('@ipp/loopback-lib').RemoteMethodUtils;

VS-Code does not allow me to navigate to this shared libraries' code by pressing F12 or "Go to definition". The same applies for all other npm modules inside the node_modules directory.
Is this restricted functionality intentional ? or should it be working and I am running to a JS parsing bug that prevents the "Go to definition" to do its work ?
If the "Go to definition" feature is not supposed to work for all things "node_modules" ... could we integrate an exception for symlink directories inside node_modules ?
Thanks
Copied from original issue: Microsoft/vscode#2550

From @drywolf on January 31, 2016 19:5
Nice, I'm looking forward to the next release :smile:

From @jrieken on January 29, 2016 18:6
That's a bug. We will soon ship with a revamped JS language support and such things should be fixed then

From @jrieken on September 9, 2016 8:16
@waderyan This is an issue with the typescript brain

From @girvo on August 17, 2016 4:25
Just checking, this still seems to be broken in the latest Insider build. Is that expected behaviour? It's a React Native Javascript project, if that matters :)

@jrieken just to make sure I understand, when you say "typescript brain" you mean the TypeScript language service, correct?

From @zjaml on September 9, 2016 7:1
Subscribed to this too. The feature could be very useful.

From @jrieken on September 9, 2016 15:27
yes

Should be working correctly in latest drop of TypeSript (TS 2.0.2 or later). VSCode ships with an older version of TypeScript. Please see Using Newer TypeScript Versions documentation for more details on updating your VSCode to use a different version of TypeScript.

How to enable this feature? I have upgrade the TypeScript to 2.1.5, however when I highlight an external import and click F12, nothing happened.
Is this also fixed for javascript service?

can you share a project?

It seems F12 jumps to the TypeScript definition file but not into the actual source code. Is there any intention of supporting a direct-to-source jump?

please see https://github.com/Microsoft/TypeScript/pull/22658


Symfony

https://sendgrid.com/docs/Integrate/Frameworks/symfony.html
The yml configuration file lacks of proper indentation.

Hello @krvajalmiguelangel,Thanks for your suggestion or question! In an attempt to clear out our backlog,                                              we are closing out issues over 90 days old.                                             If this is still an issue, please feel free to reopen it.                                             Team SendGrid DX-Docs


Added rom.path.exists()

Allows checking for the existence of a path from within the Hell2Modding ecosystem.
I'm not completely familiar with your project structure, so feel free to point out anything I might have missed to get this working. I believe the changes to Hell2Modding (documentation, cmake file) would need to be done manually after this is merged?

Thanks!


Tree implementation ? BST and BT ?

Are we planning to add tree implementations?

As far as I know (and correct me if I'm wrong) you can add any (reasonable) algorithm or data structure you want. Currently there is no TODO list, but we might need one.

You are right. Adding one today!


Understanding filters in PHP

Understanding filters in PHP
PHP Filter is a data filtering plugin that sanitizes or validates data. Many of the methods needed for verifying user input are included in the PHP filter extension, which is meant to make verification easier and faster. In this article, we are to discuss more on PHP filters.
Key takeaways
What is a filter in PHP?
PHP filter example.
Benefits of using  PHP filters.
How to sanitize a string using a PHP filter with an example program.
How to validate an integer using PHP filter with an example program.
how to validate an IP address using PHP filter with an example program.
How to sanitize and validate an email address with an example program.
Article quality
This article is unique as it gives more information about PHP filters and uses PHP programs to implement in each concept being discussed
References
N/A

Thank you for your response and we thank you for submitting your topic. After some careful consideration it struck us that this topic may be a bit over saturated throughout other blog sites and official documentations. Please feel free to suggest an alternate topic to explore.


Lazy Loading and  fastClick

I use Lazy Loading like this in vue2:
const Foo = resolve => require(['./Foo.vue'], resolve)
it can not work in the the second time click,
and please teach me how to fastclick (remove touch 300ms)  in vue2, think.

and in mode: 'history' some time will be refresh ....

Hello!
Regarding the issue with component resolving, please provide a reproduction repo, because otherwise we can not triage the issue.
Regarding usage questions, we encourage you to ask them on forum or gitter. We try to keep the issue tracker for bug reports and feature requests.

it can not work in the the second time click,
It's a known issue only seen with webpack 2.0 + require. Please use System.import instead. More explanation: https://github.com/vuejs/vue-router/pull/862


Reorder relations

Port @tobias-kuendig PR to add Reorder capability to Relations
ref. https://github.com/octobercms/october/pull/5298
Requires https://github.com/wintercms/storm/pull/78
Also recompile storm.js assets

@mjauvin which PR is the active version of this?

@LukeTowers None.
I started work on merging the ReorderController into the ListController (ref. https://github.com/wintercms/winter/pull/553) but I need to know what to do with the current issues mentioned in that PR.

Responded there @mjauvin, thanks


Is this project dead?

Almost 2 years since any updates, issues and PRs piling up 😕
Back to gson I suppose :(

https://github.com/square/moshi not gson :/

Same question here!

And here!

Well, I guess I don't have this question anymore.
But the readme should say (in big bold letters) that this project has been discontinued and everyone should move to moshi.

if you need similar performance, use https://github.com/ansman/kotshi

even that is arguably not necessary. the way that retrofit/moshi performs deserialization as the data is streaming over the socket combined with the way moshi caches things makes annotation processing mostly moot. If you are doing it so you can get away from the kotlin reflect package when dealing with data classes then maybe it is worth it. but show me the performance tests where the gains are worth the overhead of another anno processor in your build.  IMO the biggest win of moshi is the memory profile.

Reflection will always be slower than direct method calls. But if the response JSON size is small, the differences will be negligible.
Some positives:

Kotlin KAPT Cache means incremental builds are much faster.
Seeing the parsing code is very helpful with debugging
compile time checking for type adapter for custom types.
Proguarding is much easier.

point being that the reflection is amortized across the network transfer so your bottleneck remains network so trying to speed it up is moot. the proguard config on json is usually moot as well since obfuscation is pointless due to string constants being retained for matching the json structure. Makes reversal almost trivial.
I can agree with seeing parsing code though. static call stacks are always much nicer.

@trevjonez

reflection is amortized across the network transfer

You mean throughput is amortized, right? Request latency still remains — if a request takes 10 seconds do download JSON, and 2 more seconds to initialize reflection machinery, you are penalizing yourself with additional 16% latency. If your application downloads a JSON file to show user some data, your users will enjoy an additional 2s delay. If your messenger parsers JSON file from server to show a notification, that notification will be late by ~2s etc.

the proguard config on json is usually moot as well since obfuscation is pointless due to string constants being retained for matching the json structure.

Does not matter unless you are trying to use Proguard for obfuscation. Personally, I am using it as optimizing Java compiler.
Having APT-based adapters for other JSON libraries is cool, but sparsely supported third-party plugin is still strictly worse than a library like LoganSquare, that uses APT as it's primary operation mode. Until Moshi/Gson/Whatever switch to annotation processing by default, those libraries aren't interesting for me.

It comes down to a "lets see the test data" where the test was actually a real world test of a slow stream of json over an IO socket not some blob of json string already in memory.The way you deal with the json is only a tiny piece of the whole picture.
I know logan square has touted huge speed gains but the tests I looked at have all been untrue to real life consumption.

According to https://github.com/fabienrenaud/java-json-benchmark LoganSquare is still one of the fastest JSON processors. Would definitely be sad to see it going. Would be great if we can contribute and maintain it further. It's not just useful for Android (but even Java and server land).

@hc-codersatlas I am actually surprised, that some processors are so much faster, compared to LoganSquare. For example, dsljson seems to have huge upper hand... Except that it's benchmark does not use streaming mode, it just parses from a single byte[] array:
https://github.com/fabienrenaud/java-json-benchmark/blob/79b0b465b440f8a2f6f7f22ee4905e3c7328c3f4/src/main/java/com/github/fabienrenaud/jjb/databind/Deserialization.java#L83-L87
The same is true for most of the library benchmarks: some accept Strings, other byte[] arrays or Okio sources...
There are also few things not accounted for by those benchmarks — for example, they don't measure the initial hiccup, associated with reflective lookups (for libraries, that use those).


fix(core): fix validations on fragments/operations naming conflicts

Fix https://github.com/dotansimha/graphql-code-generator/issues/8570

can we add a test here for this so when we upgrade tools next time we hopefully know it doesn't break?

Agree, we added a integration test in tools 👀


Achieve Tag Parity With React

Quite a number of tags are not supported by the library that React does.
This should be remedied.

See dca0c50


Error while converting .pb file into .blob

Hello,
I'm trying to convert my .pb file to .blob to deploy it on OAK-1 lite device. The online blob converter thowrs the error

Error message
Command failed with exit code 1, command: /opt/intel/openvino2022_1/tools/compile_tool/compile_tool -m /tmp/blobconverter/608bbf1ef5db4445a806b913d712dcdb/ctpn/FP16/ctpn.xml -o /tmp/blobconverter/608bbf1ef5db4445a806b913d712dcdb/ctpn/FP16/ctpn.blob -c /tmp/blobconverter/608bbf1ef5db4445a806b913d712dcdb/myriad_compile_config.txt -d MYRIAD -ip U8
Console output (stdout)
OpenVINO Runtime version ......... 2022.1.0
Build ........... 2022.1.0-7019-cdb9bec7210-releases/2022/1
Network inputs:
Placeholder : u8 / [...]
Network outputs:
Reshape_2:0 : f16 / [...]
rpn_bbox_pred/Reshape_1:0 : f16 / [...]
Error output (stderr)
Cannot get length of dynamic dimension

Parameters in converter:
Model optimizer params:
--data_type=FP16 --mean_values=[127.5,127.5,127.5] --scale_values=[255,255,255] (default)
Compile parameters:
-ip U8 (default)
Error occurs on any number of shaves chosen.
I'm new to oak openvino etc. so could someone explain if I'm doing something wrong or what to change?

Hi @rafal-mazur , it seems like it is the same issue as with #48 . Can you try specifying input shape when converting?

Hi, I included --input_shape [1,512,512,3] parameter as in the #48. Thanks a lot for support :)


Add the OVERRIDE_LOCK config var to the variables list

Change-type: minor
See: https://jel.ly.fish/32cc2ee4-c5a7-4ec8-8e91-1ba4f1379bc4
See: https://www.flowdock.com/app/rulemotion/r-product/threads/9mk8QcdNp4UAwKeEUpXPHVxYM_c
Signed-off-by: Thodoris Greasidis<EMAIL_ADDRESS>

Please make sure to read the CONTRIBUTING document before opening the PR for relevant information on contributing to the documentation. Thanks!

Since this configuration.md is actually rather outdated, I think it'd be better to make the PR in Supervisor's config docs? I (or @20k-ultra) am planning on pulling this README into the docs repo as an external README source, much like the Supervisor API docs.
(This is an intermediary step of course, but better than maintaining 2 sources of truth for config var docs. The next step towards the ideal solution of the Supervisor contract rendering config docs is to write a cue file for configs which is still in the works)

On principle I agree with what you are saying, better to have 1 place rather than 2.
I see some non-trivial issues atm though, the biggest of which being that atm most config var definitions use the RESIN_ prefix unfortunately.
As a result, setting one of the well known config vars from the UI will set the RESIN_ config var, while the supervisor docs mention the BALENA_ prefixed one. Moreover, if a user manually sets the BALENA_ one, then the UI will show it as a custom variable atm, instead of showing the appropriate toggle/control in the top table with the well known config vars.
I remember there was an effort on migrating away from that but it seems we reprioritized that effort.
Given the above, I ended up in this PR, which also unblocks dropping some code from the UI, w/o making the current situation worse (imo).

Fair enough, if this is blocking, merging this sounds good. Then we can work on having the 1 source of truth and the discrepancies between RESIN_ and BALENA_. Thanks for the info! :)

@balena-ci rebase

@balena-ci I self-certify!


Identify path of sas program file being submitted - at least when using Local SAS 9.4

Is your feature request related to a problem? Please describe.
My programs need to identify from which path they are executed, and the SAS program file name, in order to retrieve metadata from a parent/sibling folder.  When submitting from SAS 9.4 Enhanced Editor this information can be retrieved from environment variable SAS_EXECFILEPATH.  When submitting in batch mode it can be retrieved from %sysfunc(getoption(sysin)).  In other circumstances it can be retrieved from SASHELP.VEXTFL.  In LSAF, it can be retrieved from global macro-variable &_SASFILEPATH_.
Describe the solution you'd like
An environment variable, or global macro variable, should be set to the path of the SAS program from which code is being submitted.
Describe alternatives you've considered
Alternatively the path should be retrievable from a SASHELP view or by running some macro or data step code or some SAS procedure, or even by executing some Java method.
Additional context
Environment
PC SAS version 9.4 (windows 10 desktop)

There's a global macro variable workDir storing the working directory. You can run SAS code %put &=workDir; to show the path in SAS log.

Thanks @scnwwu , but this does not help.
Let's say I've opened the program C:\test1\sas-vscode-test.sas in VScode editor, with the line:
%put &workdir;

When I run that line of code, the log shows:
9          %put &=workdir;
WORKDIR=C:\Users\jbodart\AppData\Local\Temp\SAS Temporary Files\_TD6680_ARGENXLAP3088_\Prc2

but what I need to retrieve is the path of my program: C:\test1\sas-vscode-test.sas


Error compiling

Hi Pascallike !
Thank you for this project. I just wanted to let you know that I have this error whan compiling my project with your lib :
ERROR in<EMAIL_ADDRESS>Module parse failed: Unexpected token (79:26) You may need an appropriate loader to handle this file type. |                         client.getBackend().storeScope(s); |                     } |                     catch { |                         // Do nothing |                     }
I solved it by removing this import
import {captureMessage} from '@sentry/browser/esm';
and replacing it with
import * as Sentry from '@sentry/browser';
and calling the captureMessage function like that
Sentry.captureMessage(response.message);
No more error ;-)

Hello @BenLune,
Thanks for reporting this issue! 🙂
I can not reproduce this error. What kind of Angular app are you using? A CLI generated one? Or one with a custom webpack config? Can you show me your tsconfig.json file?
It looks like that the node_modules folder or at least the node_modules/@sentry folder is included during the build process...

Hello Pascal,
It' an Angular 7 app 7.2.0, generated by the CLI. I attached my tsconfig file. I never tried to propose a merge request, as soon as I'm ready, I'll do it ;-)
Nevertheless, I use your SentryErrorInterceptor, a little bit modified and it works very well ! Thank you for that ;-) Sentry is a great product, and it is a good idea to create this angular library.
Have a good day,
Best regards,
Benoît

Le 20 févr. 2019 à 04:01, Pascal Iske<EMAIL_ADDRESS>a écrit :
Hello @BenLune https://github.com/BenLune,
Thanks for reporting this issue! 🙂
I can not reproduce this error. What kind of Angular app are you using? A CLI generated one? Or one with a custom webpack config? Can you show me your tsconfig.json file?
It looks like that the node_modules folder or at least the node_modules/@sentry folder is included during the build process...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/pascaliske/ngx-sentry/issues/18#issuecomment-465485803, or mute the thread https://github.com/notifications/unsubscribe-auth/AFZn-ophyWBOJFbQ1He2wCC_TLRxgglcks5vPQ7qgaJpZM4bDcQE.

Benoît Plâtre
président Ici la Lune Montréal
direction des projets numériques
design / développement / management
<EMAIL_ADDRESS>Canada + 1<PHONE_NUMBER>
France + 33 (0) 1 44 50 50 37
twitter @benLune
ICI LA LUNE Montréal
4388 rue Saint-Denis
bureau 200
Montréal, QC H2J 2L1
ICI LA LUNE Paris
12 rue du Mont Thabor
75001 PARIS
http://www.icilalune.com

Fixed by #20 in v1.4.0.
@BenLune Can you confirm if your build succeeds now? 🙂

@pascaliske It now works on my side !.
Thank you 😄


Updated Android support lib reference

Recently the plugin has been failing on Android: drop-in immediately resolved with  userCancelled=true. This seems to be resolved.

I would strongly suggest this change is merged to master as Braintree have recently announced that old versions of the SDK will cease to work after 20th May 2020. This is because old versions of the SDK include a SSL certificate that is expiring, below are the two emails I received.
I have tested the pull request and it seems to work fine.
iOS
Our records show that you are using a legacy iOS SDK version that is not compatible with an upcoming update to our root SSL certificate provider for API traffic on May 18, 2020. The records showing your use of a legacy SDK are from March 23rd - April 8th which represent (20%) of all API requests to Braintree coming from your iOS app’s client. If you have updated your iOS integration since then, please disregard this email.
If you do not update to a compatible SDK, your users may not be able to complete checkout workflows until you make the necessary update.
What action is required?
In order to avoid interruption to your processing, please update your iOS SDK version by May 18 to latest available version, 4.32.1. If you are unable to update to the latest version, please update to the minimum version 4.10.0.
Note: If you are using the iOS Drop-In SDK please update your integration to use the latest version of Braintree/Core as a dependency (4.32.1). The minimum version of Braintree/Core that can be used is 4.10.0.
What should I do if this is a small amount of my client API requests?
It’s likely that the client requests we identified are from users on older iOS devices using an older version of your iOS app. That version of your iOS app in turn has a dependency on an impacted version of the Braintree iOS SDK.
We recommend strongly encouraging or requiring your users update their version of your app so that they are not impacted.
Can this deadline be extended?
The current SSL certificate is set to expire shortly after the May 18 deadline, which is why we are unable to offer any extensions. It is critical that you update your integration by May 18, 2020
Android
Our records show that you are using a legacy Android SDK version that is not compatible with an upcoming update to our root SSL certificate provider for API traffic on May 18, 2020. The records show your continued use of a legacy SDK are from March 23rd - April 8th which represent (100%) of all API requests to Braintree coming from your Android app’s client. If you have updated your Android integration since then, please disregard this email.
If you do not update to a compatible SDK, your users may not be able to complete checkout workflows until you make the necessary update.
What action is required?
In order to avoid interruption to your processing, please update your Android SDK version by May 18 to latest available version, 3.9.0. If you are unable to update to the latest version, please update to the latest version of the Android v2 SDK, version 2.21.0
If you are using the Android Drop-In SDK please update to the latest version, 4.5.0, or at a minimum version 3.7.1.
[same end of email as above]

@Deeeej @mudam just tried installing this and seeing the following when building:
platforms/ios/Scout/Plugins/cordova-plugin-braintree/BraintreePlugin.m:10:9: fatal error: 'BraintreeDropIn.h' file not found
#import <BraintreeDropIn.h>
        ^~~~~~~~~~~~~~~~~~~
1 error generated.

Any ideas?

@jamesdixon
Please try this fork instead https://github.com/mudam/cordova-plugin-braintree
I've updated ios support since this pr.

@mudam sorry, should have been more clear...I am testing that fork!

I've been testing on Android the code at: https://github.com/mudam/cordova-plugin-braintree, it seems to work fine the first time you make a payment, but if you try to make a subsequent payment it seems to fail without an error, doesnt seem to make a difference what the payment type is, for example credit card or paypal.
The second time you try to make a payment, you enter the payment details, press the button and as the plugin returns you to the app, it just seems to fail, doesnt call the callback, just closes the UI and nothing happens. Very strange.
I've tried debugging without success. Doesnt seem to be a braintree API issue. Any ideas @mudam? Have you seen this behaviour?

@jamesdixon
Have you checked all pods are installed correctly? I recall having similar issue, don't know the exact cause yet. Try this:

open project in xcode
remove the offending line from the code
add the line again using xcode code completion

@Deeeej
This is also what I get. First time it completes without issues, subsequent payments appear to be cancelled even though the user is presented with the UI and can apparently complete the payment.
It just happens that the drop-in android intent returns cancelled result code. The intent itself is obtained from Braintree API (new DropInRequest). Maybe it does not get properly handled by cordova when dismissed, leaving something dirty.
This issue is currently present in all forks of the plugin including the original. I suspect it uses some Android apis incorrectly or in the manner that was appropriate long time ago.

@Deeeej See my original comment to this PR. Some time ago I investigated this issue and had the impression I managed to fix it, hence the PR. This seems not to be the case, however.

I appear to have fixed the issue with the below BraintreePlugin.java.
I compared it to a previous version that worked and noticed that 'callbackContext' was passed in as a parameter and not assigned as a global variable. I also explicitly set resultMap.put("userCancelled", false); where it should be false (but to be honest, I don't think this has any affect).
package net.justincredible;
import android.util.Log;
import android.app.Activity;
import android.content.Intent;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.PluginResult;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.braintreepayments.api.BraintreeFragment;
import com.braintreepayments.api.DataCollector;
import com.braintreepayments.api.PayPal;
import com.braintreepayments.api.dropin.DropInActivity;
import com.braintreepayments.api.dropin.DropInRequest;
import com.braintreepayments.api.dropin.DropInResult;
//import com.braintreepayments.api.exceptions.InvalidArgumentException;
import com.braintreepayments.api.interfaces.PaymentMethodNonceCreatedListener;
import com.braintreepayments.api.interfaces.BraintreeErrorListener;
import com.braintreepayments.api.models.CardNonce;
import com.braintreepayments.api.models.PayPalAccountNonce;
import com.braintreepayments.api.models.PayPalRequest;
import com.braintreepayments.api.models.PaymentMethodNonce;
import com.braintreepayments.api.models.ThreeDSecureInfo;
import com.braintreepayments.api.models.ThreeDSecureRequest;
import com.braintreepayments.api.models.VenmoAccountNonce;
import com.braintreepayments.cardform.view.CardForm;
//import com.google.android.gms.wallet.Cart;
//import com.google.android.gms.wallet.LineItem;
import java.util.HashMap;
import java.util.Map;
public final class BraintreePlugin extends CordovaPlugin implements PaymentMethodNonceCreatedListener, BraintreeErrorListener {
private static final String TAG = "BraintreePlugin";

private static final int DROP_IN_REQUEST = 100;
private static final int PAYMENT_BUTTON_REQUEST = 200;
private static final int CUSTOM_REQUEST = 300;
private static final int PAYPAL_REQUEST = 400;

private DropInRequest dropInRequest = null;
private CallbackContext _callbackContext = null;
private BraintreeFragment braintreeFragment = null;
private String temporaryToken = null;

@Override
public synchronized boolean execute(String action, final JSONArray args, final CallbackContext callbackContext) throws JSONException {

    if (action == null) {
        Log.e(TAG, "execute ==> exiting for bad action");
        return false;
    }

    Log.w(TAG, "execute ==> " + action + " === " + args);

    try {
        if (action.equals("initialize")) {
            this.initializeBT(args, callbackContext);
        }
        else if (action.equals("presentDropInPaymentUI")) {
            this.presentDropInPaymentUI(args, callbackContext);
        }
        else if (action.equals("paypalProcess")) {
            this.paypalProcess(args);
        }
        else if (action.equals("paypalProcessVaulted")) {
            this.paypalProcessVaulted();
        }
        else if (action.equals("setupApplePay")) {
            this.setupApplePay(callbackContext);
        }
        else {
            // The given action was not handled above.
            return false;
        }
    } catch (Exception exception) {
        callbackContext.error("BraintreePlugin uncaught exception: " + exception.getMessage());
    }

    return true;
}

@Override
public void onError(Exception error) {
    Log.e(TAG, "Caught error from BraintreeSDK: " + error.getMessage());
    if(_callbackContext != null){
       _callbackContext.error("BraintreePlugin uncaught exception: " + error.getMessage());
    }
}

// Actions

private synchronized void initializeBT(final JSONArray args, final CallbackContext callbackContext) throws Exception {

    // Ensure we have the correct number of arguments.
    if (args.length() != 1) {
        callbackContext.error("A token is required.");
        return;
    }

    // Obtain the arguments.
    String token = args.getString(0);

    if (token == null || token.equals("")) {
        callbackContext.error("A token is required.");
        return;
    }

    temporaryToken = token;

    // After testing, it seems we do not need this!
    // try {
    //    braintreeFragment = BraintreeFragment.newInstance(this.cordova.getActivity(), temporaryToken);
    //    braintreeFragment.addListener(this);
    // } catch (InvalidArgumentException e) {
    //     // There was an issue with your authorization string.
    //     Log.e(TAG, "Error creating PayPal interface: " + e.getMessage());
    //     _callbackContext.error(TAG + ": Error creating PayPal interface: " + e.getMessage());
    // }

    callbackContext.success();
}

private synchronized void setupApplePay(final CallbackContext callbackContext) throws JSONException {
    // Apple Pay available on iOS only
    callbackContext.success();
}

private synchronized void presentDropInPaymentUI(final JSONArray args, final CallbackContext callbackContext) throws JSONException {

    // Ensure we have the correct number of arguments.
    if (args.length() < 2) {
        callbackContext.error("amount and email are required.");
        return;
    }

    // Obtain the arguments.

    String amount = args.getString(0);

    if (amount == null) {
        callbackContext.error("amount is required.");
    }

    // Mandatory email for 3DS
    String email= args.getString(1);
    if (email == null) {
        callbackContext.error("email is required.");
    }

    dropInRequest = new DropInRequest().clientToken(temporaryToken);
    // dropInRequest.cardholderNameStatus(CardForm.FIELD_REQUIRED);
    // dropInRequest.vaultManager(true);

    // ThreeDSecureRequest threeDRequest = new ThreeDSecureRequest();
    // threeDRequest.amount(amount);
    // threeDRequest.email(email);
    // threeDRequest.versionRequested(ThreeDSecureRequest.VERSION_2);
    // dropInRequest.threeDSecureRequest(threeDRequest);

    if (dropInRequest == null) {
        callbackContext.error("The Braintree client failed to initialize.");
        return;
    }

    if (dropInRequest.isGooglePaymentEnabled()) {
        // // TODO: Make this conditional
        // dropInRequest.androidPayCart(Cart.newBuilder()
        //     .setCurrencyCode("GBP")
        //     .setTotalPrice(amount)
        //     .addLineItem(LineItem.newBuilder()
        //         .setCurrencyCode("GBP")
        //         .setDescription(primaryDescription)
        //         .setQuantity("1")
        //         .setUnitPrice(amount)
        //         .setTotalPrice(amount)
        //         .build())
        //     .build()
        // );
    }

    this.cordova.setActivityResultCallback(this);

    try {
        Intent intent = dropInRequest.getIntent(this.cordova.getActivity());

        if (intent == null) {
            Log.e(TAG, "presentDropInPaymentUI failed ===> unable to create Braintree DropInRequest");
            callbackContext.error(TAG + ": presentDropInPaymentUI failed ===> unable to create Braintree DropInRequest");
            return;
        }

        this.cordova.startActivityForResult(this, intent, DROP_IN_REQUEST);

    } catch (Exception e) {
        Log.e(TAG, "presentDropInPaymentUI failed with error ===> " + e.getMessage());
        callbackContext.error(TAG + ": presentDropInPaymentUI failed with error ===> " + e.getMessage());
    }

   _callbackContext = callbackContext;
}

private synchronized void paypalProcess(final JSONArray args) throws Exception {
    PayPalRequest payPalRequest = new PayPalRequest(args.getString(0));
    payPalRequest.currencyCode(args.getString(1));
    PayPal.requestOneTimePayment(braintreeFragment, payPalRequest);
}

private synchronized void paypalProcessVaulted() throws Exception {
    //PayPal.authorizeAccount(braintreeFragment);
}

// Results

@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
    super.onActivityResult(requestCode, resultCode, intent);

    Log.i(TAG, "DropIn Activity Result: " + requestCode + ", " + resultCode);

    if (_callbackContext == null) {
        Log.e(TAG, "onActivityResult exiting ==> callbackContext is invalid");
        return;
    }

    if (requestCode == DROP_IN_REQUEST) {

        PaymentMethodNonce paymentMethodNonce = null;

        if (resultCode == Activity.RESULT_OK) {
            DropInResult result = intent.getParcelableExtra(DropInResult.EXTRA_DROP_IN_RESULT);
            paymentMethodNonce = result.getPaymentMethodNonce();

            Log.i(TAG, "DropIn Activity Result: paymentMethodNonce = " + paymentMethodNonce);
        }

        // handle errors here, an exception may be available in
        if (intent != null && intent.getSerializableExtra(DropInActivity.EXTRA_ERROR) != null) {
            Exception error = (Exception)intent.getSerializableExtra(DropInActivity.EXTRA_ERROR);
            Log.e(TAG, "onActivityResult exiting ==> received error: " + error.getMessage() + "\n" + error.getStackTrace());
            _callbackContext.error("onActivityResult exiting ==> received error: " + error.getMessage());
            return;
        }

        this.handleDropInPaymentUiResult(resultCode, paymentMethodNonce);
    }
    else if (requestCode == PAYMENT_BUTTON_REQUEST) {
        //TODO
        _callbackContext.error("Activity result handler for PAYMENT_BUTTON_REQUEST not implemented.");
    }
    else if (requestCode == CUSTOM_REQUEST) {
        _callbackContext.error("Activity result handler for CUSTOM_REQUEST not implemented.");
        //TODO
    }
    else if (requestCode == PAYPAL_REQUEST) {
        _callbackContext.error("Activity result handler for PAYPAL_REQUEST not implemented.");
        //TODO
    } else {
        Log.w(TAG, "onActivityResult exiting ==> requestCode [" + requestCode + "] was unhandled");
    }
}

/**
 * Helper used to handle the result of the drop-in payment UI.
 *
 * @param resultCode Indicates the result of the UI.
 * @param paymentMethodNonce Contains information about a successful payment.
 */
private void handleDropInPaymentUiResult(int resultCode, PaymentMethodNonce paymentMethodNonce) {

    Log.i(TAG, "handleDropInPaymentUiResult resultCode ==> " + resultCode + ", paymentMethodNonce = " + paymentMethodNonce);

    if (_callbackContext == null) {
        Log.e(TAG, "handleDropInPaymentUiResult exiting ==> callbackContext is invalid");
        return;
    }

    if (resultCode == Activity.RESULT_CANCELED) {
        Map<String, Object> resultMapx = new HashMap<String, Object>();
        resultMapx.put("userCancelled", true);
        _callbackContext.success(new JSONObject(resultMapx));
        _callbackContext = null;
        return;
    }

    if (paymentMethodNonce == null) {
        _callbackContext.error("Result was not RESULT_CANCELED, but no PaymentMethodNonce was returned from the Braintree SDK (was " + resultCode + ").");
        _callbackContext = null;
        return;
    }

    Map<String, Object> resultMap = this.getPaymentUINonceResult(paymentMethodNonce);
    _callbackContext.success(new JSONObject(resultMap));
    _callbackContext = null;
}

/**
 * Helper used to return a dictionary of values from the given payment method nonce.
 * Handles several different types of nonces (eg for cards, PayPal, etc).
 *
 * @param paymentMethodNonce The nonce used to build a dictionary of data from.
 * @return The dictionary of data populated via the given payment method nonce.
 */
private Map<String, Object> getPaymentUINonceResult(PaymentMethodNonce paymentMethodNonce) {

    Map<String, Object> resultMap = new HashMap<String, Object>();
    resultMap.put("userCancelled", false);
    resultMap.put("nonce", paymentMethodNonce.getNonce());
    resultMap.put("type", paymentMethodNonce.getTypeLabel());
    resultMap.put("localizedDescription", paymentMethodNonce.getDescription());

    // Card
    if (paymentMethodNonce instanceof CardNonce) {
        CardNonce cardNonce = (CardNonce)paymentMethodNonce;

        Map<String, Object> innerMap = new HashMap<String, Object>();
        innerMap.put("lastTwo", cardNonce.getLastTwo());
        innerMap.put("network", cardNonce.getCardType());

        resultMap.put("card", innerMap);
    }

    // PayPal
    if (paymentMethodNonce instanceof PayPalAccountNonce) {
        PayPalAccountNonce payPalAccountNonce = (PayPalAccountNonce)paymentMethodNonce;

        Map<String, Object> innerMap = new HashMap<String, Object>();
        resultMap.put("email", payPalAccountNonce.getEmail());
        resultMap.put("firstName", payPalAccountNonce.getFirstName());
        resultMap.put("lastName", payPalAccountNonce.getLastName());
        resultMap.put("phone", payPalAccountNonce.getPhone());
        //resultMap.put("billingAddress", paypalAccountNonce.getBillingAddress()); //TODO
        //resultMap.put("shippingAddress", paypalAccountNonce.getShippingAddress()); //TODO
        resultMap.put("clientMetadataId", payPalAccountNonce.getClientMetadataId());
        resultMap.put("payerId", payPalAccountNonce.getPayerId());

        resultMap.put("paypalAccount", innerMap);
    }

    // 3D Secure
    if (paymentMethodNonce instanceof CardNonce) {
        CardNonce cardNonce = (CardNonce) paymentMethodNonce;
        ThreeDSecureInfo threeDSecureInfo = cardNonce.getThreeDSecureInfo();

        if (threeDSecureInfo != null) {
            Map<String, Object> innerMap = new HashMap<String, Object>();
            innerMap.put("liabilityShifted", threeDSecureInfo.isLiabilityShifted());
            innerMap.put("liabilityShiftPossible", threeDSecureInfo.isLiabilityShiftPossible());
            innerMap.put("enrolled", threeDSecureInfo.getEnrolled());
            resultMap.put("threeDSecureCard", innerMap);
        }
    }

    // Venmo
    if (paymentMethodNonce instanceof VenmoAccountNonce) {
        VenmoAccountNonce venmoAccountNonce = (VenmoAccountNonce) paymentMethodNonce;

        Map<String, Object> innerMap = new HashMap<String, Object>();
        innerMap.put("username", venmoAccountNonce.getUsername());

        resultMap.put("venmoAccount", innerMap);
    }

    return resultMap;
}

@Override
public void onPaymentMethodNonceCreated(PaymentMethodNonce paymentMethodNonce) {
    Log.i(TAG, "onPaymentMethodNonceCreated  ==> paymentMethodNonce = " + paymentMethodNonce);

    if (_callbackContext == null) {
        Log.e(TAG, "onPaymentMethodNonceCreated exiting ==> callbackContext is invalid");
        return;
    }

    try {
        JSONObject json = new JSONObject();
        json.put("userCancelled", false);
        json.put("nonce", paymentMethodNonce.getNonce().toString());
        //json.put("deviceData", DataCollector.collectDeviceData(braintreeFragment));
        //json.put("deviceData", DataCollector.collectDeviceData(braintreeFragment, this));

        if (paymentMethodNonce instanceof PayPalAccountNonce) {
            PayPalAccountNonce pp = (PayPalAccountNonce) paymentMethodNonce;
            json.put("payerId", pp.getPayerId().toString());
            json.put("firstName", pp.getFirstName().toString());
            json.put("lastName", pp.getLastName().toString());
        }

        _callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, json));
    } catch (Exception e) {
        Log.e(TAG, "onPaymentMethodNonceCreated  ==> error:" + e.getMessage());
        e.printStackTrace();
    }
}

}

I appear to have fixed the issue with the below BraintreePlugin.java.
I compared it to a previous version that worked and noticed that 'callbackContext' was passed in as a parameter and not assigned as a global variable. I also explicitly set resultMap.put("userCancelled", false); where it should be false (but to be honest, I don't think this has any affect).
package net.justincredible;

import android.util.Log;
import android.app.Activity;
import android.content.Intent;

import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.PluginResult;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.braintreepayments.api.BraintreeFragment;
import com.braintreepayments.api.DataCollector;
import com.braintreepayments.api.PayPal;
import com.braintreepayments.api.dropin.DropInActivity;
import com.braintreepayments.api.dropin.DropInRequest;
import com.braintreepayments.api.dropin.DropInResult;
//import com.braintreepayments.api.exceptions.InvalidArgumentException;
import com.braintreepayments.api.interfaces.PaymentMethodNonceCreatedListener;
import com.braintreepayments.api.interfaces.BraintreeErrorListener;
import com.braintreepayments.api.models.CardNonce;
import com.braintreepayments.api.models.PayPalAccountNonce;
import com.braintreepayments.api.models.PayPalRequest;
import com.braintreepayments.api.models.PaymentMethodNonce;
import com.braintreepayments.api.models.ThreeDSecureInfo;
import com.braintreepayments.api.models.ThreeDSecureRequest;
import com.braintreepayments.api.models.VenmoAccountNonce;
import com.braintreepayments.cardform.view.CardForm;
//import com.google.android.gms.wallet.Cart;
//import com.google.android.gms.wallet.LineItem;

import java.util.HashMap;
import java.util.Map;

public final class BraintreePlugin extends CordovaPlugin implements
PaymentMethodNonceCreatedListener, BraintreeErrorListener {

private static final String TAG = "BraintreePlugin";

private static final int DROP_IN_REQUEST = 100;
private static final int PAYMENT_BUTTON_REQUEST = 200;
private static final int CUSTOM_REQUEST = 300;
private static final int PAYPAL_REQUEST = 400;

private DropInRequest dropInRequest = null;
private CallbackContext _callbackContext = null;
private BraintreeFragment braintreeFragment = null;
private String temporaryToken = null;

@Override
public synchronized boolean execute(String action, final JSONArray args, final CallbackContext callbackContext) throws JSONException {

    if (action == null) {
        Log.e(TAG, "execute ==> exiting for bad action");
        return false;
    }

    Log.w(TAG, "execute ==> " + action + " === " + args);

    try {
        if (action.equals("initialize")) {
            this.initializeBT(args, callbackContext);
        }
        else if (action.equals("presentDropInPaymentUI")) {
            this.presentDropInPaymentUI(args, callbackContext);
        }
        else if (action.equals("paypalProcess")) {
            this.paypalProcess(args);
        }
        else if (action.equals("paypalProcessVaulted")) {
            this.paypalProcessVaulted();
        }
        else if (action.equals("setupApplePay")) {
            this.setupApplePay(callbackContext);
        }
        else {
            // The given action was not handled above.
            return false;
        }
    } catch (Exception exception) {
        callbackContext.error("BraintreePlugin uncaught exception: " + exception.getMessage());
    }

    return true;
}

@Override
public void onError(Exception error) {
    Log.e(TAG, "Caught error from BraintreeSDK: " + error.getMessage());
    if(_callbackContext != null){
       _callbackContext.error("BraintreePlugin uncaught exception: " + error.getMessage());
    }
}

// Actions

private synchronized void initializeBT(final JSONArray args, final CallbackContext callbackContext) throws Exception {

    // Ensure we have the correct number of arguments.
    if (args.length() != 1) {
        callbackContext.error("A token is required.");
        return;
    }

    // Obtain the arguments.
    String token = args.getString(0);

    if (token == null || token.equals("")) {
        callbackContext.error("A token is required.");
        return;
    }

    temporaryToken = token;

    // After testing, it seems we do not need this!
    // try {
    //    braintreeFragment = BraintreeFragment.newInstance(this.cordova.getActivity(), temporaryToken);
    //    braintreeFragment.addListener(this);
    // } catch (InvalidArgumentException e) {
    //     // There was an issue with your authorization string.
    //     Log.e(TAG, "Error creating PayPal interface: " + e.getMessage());
    //     _callbackContext.error(TAG + ": Error creating PayPal interface: " + e.getMessage());
    // }

    callbackContext.success();
}

private synchronized void setupApplePay(final CallbackContext callbackContext) throws JSONException {
    // Apple Pay available on iOS only
    callbackContext.success();
}

private synchronized void presentDropInPaymentUI(final JSONArray args, final CallbackContext callbackContext) throws JSONException {

    // Ensure we have the correct number of arguments.
    if (args.length() < 2) {
        callbackContext.error("amount and email are required.");
        return;
    }

    // Obtain the arguments.

    String amount = args.getString(0);

    if (amount == null) {
        callbackContext.error("amount is required.");
    }

    // Mandatory email for 3DS
    String email= args.getString(1);
    if (email == null) {
        callbackContext.error("email is required.");
    }

    dropInRequest = new DropInRequest().clientToken(temporaryToken);
    // dropInRequest.cardholderNameStatus(CardForm.FIELD_REQUIRED);
    // dropInRequest.vaultManager(true);

    // ThreeDSecureRequest threeDRequest = new ThreeDSecureRequest();
    // threeDRequest.amount(amount);
    // threeDRequest.email(email);
    // threeDRequest.versionRequested(ThreeDSecureRequest.VERSION_2);
    // dropInRequest.threeDSecureRequest(threeDRequest);

    if (dropInRequest == null) {
        callbackContext.error("The Braintree client failed to initialize.");
        return;
    }

    if (dropInRequest.isGooglePaymentEnabled()) {
        // // TODO: Make this conditional
        // dropInRequest.androidPayCart(Cart.newBuilder()
        //     .setCurrencyCode("GBP")
        //     .setTotalPrice(amount)
        //     .addLineItem(LineItem.newBuilder()
        //         .setCurrencyCode("GBP")
        //         .setDescription(primaryDescription)
        //         .setQuantity("1")
        //         .setUnitPrice(amount)
        //         .setTotalPrice(amount)
        //         .build())
        //     .build()
        // );
    }

    this.cordova.setActivityResultCallback(this);

    try {
        Intent intent = dropInRequest.getIntent(this.cordova.getActivity());

        if (intent == null) {
            Log.e(TAG, "presentDropInPaymentUI failed ===> unable to create Braintree DropInRequest");
            callbackContext.error(TAG + ": presentDropInPaymentUI failed ===> unable to create Braintree DropInRequest");
            return;
        }

        this.cordova.startActivityForResult(this, intent, DROP_IN_REQUEST);

    } catch (Exception e) {
        Log.e(TAG, "presentDropInPaymentUI failed with error ===> " + e.getMessage());
        callbackContext.error(TAG + ": presentDropInPaymentUI failed with error ===> " + e.getMessage());
    }

   _callbackContext = callbackContext;
}

private synchronized void paypalProcess(final JSONArray args) throws Exception {
    PayPalRequest payPalRequest = new PayPalRequest(args.getString(0));
    payPalRequest.currencyCode(args.getString(1));
    PayPal.requestOneTimePayment(braintreeFragment, payPalRequest);
}

private synchronized void paypalProcessVaulted() throws Exception {
    //PayPal.authorizeAccount(braintreeFragment);
}

// Results

@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
    super.onActivityResult(requestCode, resultCode, intent);

    Log.i(TAG, "DropIn Activity Result: " + requestCode + ", " + resultCode);

    if (_callbackContext == null) {
        Log.e(TAG, "onActivityResult exiting ==> callbackContext is invalid");
        return;
    }

    if (requestCode == DROP_IN_REQUEST) {

        PaymentMethodNonce paymentMethodNonce = null;

        if (resultCode == Activity.RESULT_OK) {
            DropInResult result = intent.getParcelableExtra(DropInResult.EXTRA_DROP_IN_RESULT);
            paymentMethodNonce = result.getPaymentMethodNonce();

            Log.i(TAG, "DropIn Activity Result: paymentMethodNonce = " + paymentMethodNonce);
        }

        // handle errors here, an exception may be available in
        if (intent != null && intent.getSerializableExtra(DropInActivity.EXTRA_ERROR) != null) {
            Exception error = (Exception)intent.getSerializableExtra(DropInActivity.EXTRA_ERROR);
            Log.e(TAG, "onActivityResult exiting ==> received error: " + error.getMessage() + "\n" + error.getStackTrace());
            _callbackContext.error("onActivityResult exiting ==> received error: " + error.getMessage());
            return;
        }

        this.handleDropInPaymentUiResult(resultCode, paymentMethodNonce);
    }
    else if (requestCode == PAYMENT_BUTTON_REQUEST) {
        //TODO
        _callbackContext.error("Activity result handler for PAYMENT_BUTTON_REQUEST not implemented.");
    }
    else if (requestCode == CUSTOM_REQUEST) {
        _callbackContext.error("Activity result handler for CUSTOM_REQUEST not implemented.");
        //TODO
    }
    else if (requestCode == PAYPAL_REQUEST) {
        _callbackContext.error("Activity result handler for PAYPAL_REQUEST not implemented.");
        //TODO
    } else {
        Log.w(TAG, "onActivityResult exiting ==> requestCode [" + requestCode + "] was unhandled");
    }
}

/**
 * Helper used to handle the result of the drop-in payment UI.
 *
 * @param resultCode Indicates the result of the UI.
 * @param paymentMethodNonce Contains information about a successful payment.
 */
private void handleDropInPaymentUiResult(int resultCode, PaymentMethodNonce paymentMethodNonce) {

    Log.i(TAG, "handleDropInPaymentUiResult resultCode ==> " + resultCode + ", paymentMethodNonce = " + paymentMethodNonce);

    if (_callbackContext == null) {
        Log.e(TAG, "handleDropInPaymentUiResult exiting ==> callbackContext is invalid");
        return;
    }

    if (resultCode == Activity.RESULT_CANCELED) {
        Map<String, Object> resultMapx = new HashMap<String, Object>();
        resultMapx.put("userCancelled", true);
        _callbackContext.success(new JSONObject(resultMapx));
        _callbackContext = null;
        return;
    }

    if (paymentMethodNonce == null) {
        _callbackContext.error("Result was not RESULT_CANCELED, but no PaymentMethodNonce was returned from the Braintree SDK (was " + resultCode + ").");
        _callbackContext = null;
        return;
    }

    Map<String, Object> resultMap = this.getPaymentUINonceResult(paymentMethodNonce);
    _callbackContext.success(new JSONObject(resultMap));
    _callbackContext = null;
}

/**
 * Helper used to return a dictionary of values from the given payment method nonce.
 * Handles several different types of nonces (eg for cards, PayPal, etc).
 *
 * @param paymentMethodNonce The nonce used to build a dictionary of data from.
 * @return The dictionary of data populated via the given payment method nonce.
 */
private Map<String, Object> getPaymentUINonceResult(PaymentMethodNonce paymentMethodNonce) {

    Map<String, Object> resultMap = new HashMap<String, Object>();
    resultMap.put("userCancelled", false);
    resultMap.put("nonce", paymentMethodNonce.getNonce());
    resultMap.put("type", paymentMethodNonce.getTypeLabel());
    resultMap.put("localizedDescription", paymentMethodNonce.getDescription());

    // Card
    if (paymentMethodNonce instanceof CardNonce) {
        CardNonce cardNonce = (CardNonce)paymentMethodNonce;

        Map<String, Object> innerMap = new HashMap<String, Object>();
        innerMap.put("lastTwo", cardNonce.getLastTwo());
        innerMap.put("network", cardNonce.getCardType());

        resultMap.put("card", innerMap);
    }

    // PayPal
    if (paymentMethodNonce instanceof PayPalAccountNonce) {
        PayPalAccountNonce payPalAccountNonce = (PayPalAccountNonce)paymentMethodNonce;

        Map<String, Object> innerMap = new HashMap<String, Object>();
        resultMap.put("email", payPalAccountNonce.getEmail());
        resultMap.put("firstName", payPalAccountNonce.getFirstName());
        resultMap.put("lastName", payPalAccountNonce.getLastName());
        resultMap.put("phone", payPalAccountNonce.getPhone());
        //resultMap.put("billingAddress", paypalAccountNonce.getBillingAddress()); //TODO
        //resultMap.put("shippingAddress", paypalAccountNonce.getShippingAddress()); //TODO
        resultMap.put("clientMetadataId", payPalAccountNonce.getClientMetadataId());
        resultMap.put("payerId", payPalAccountNonce.getPayerId());

        resultMap.put("paypalAccount", innerMap);
    }

    // 3D Secure
    if (paymentMethodNonce instanceof CardNonce) {
        CardNonce cardNonce = (CardNonce) paymentMethodNonce;
        ThreeDSecureInfo threeDSecureInfo = cardNonce.getThreeDSecureInfo();

        if (threeDSecureInfo != null) {
            Map<String, Object> innerMap = new HashMap<String, Object>();
            innerMap.put("liabilityShifted", threeDSecureInfo.isLiabilityShifted());
            innerMap.put("liabilityShiftPossible", threeDSecureInfo.isLiabilityShiftPossible());
            innerMap.put("enrolled", threeDSecureInfo.getEnrolled());
            resultMap.put("threeDSecureCard", innerMap);
        }
    }

    // Venmo
    if (paymentMethodNonce instanceof VenmoAccountNonce) {
        VenmoAccountNonce venmoAccountNonce = (VenmoAccountNonce) paymentMethodNonce;

        Map<String, Object> innerMap = new HashMap<String, Object>();
        innerMap.put("username", venmoAccountNonce.getUsername());

        resultMap.put("venmoAccount", innerMap);
    }

    return resultMap;
}

@Override
public void onPaymentMethodNonceCreated(PaymentMethodNonce paymentMethodNonce) {
    Log.i(TAG, "onPaymentMethodNonceCreated  ==> paymentMethodNonce = " + paymentMethodNonce);

    if (_callbackContext == null) {
        Log.e(TAG, "onPaymentMethodNonceCreated exiting ==> callbackContext is invalid");
        return;
    }

    try {
        JSONObject json = new JSONObject();
        json.put("userCancelled", false);
        json.put("nonce", paymentMethodNonce.getNonce().toString());
        //json.put("deviceData", DataCollector.collectDeviceData(braintreeFragment));
        //json.put("deviceData", DataCollector.collectDeviceData(braintreeFragment, this));

        if (paymentMethodNonce instanceof PayPalAccountNonce) {
            PayPalAccountNonce pp = (PayPalAccountNonce) paymentMethodNonce;
            json.put("payerId", pp.getPayerId().toString());
            json.put("firstName", pp.getFirstName().toString());
            json.put("lastName", pp.getLastName().toString());
        }

        _callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, json));
    } catch (Exception e) {
        Log.e(TAG, "onPaymentMethodNonceCreated  ==> error:" + e.getMessage());
        e.printStackTrace();
    }
}

}

I can confirm that this edit actually fixes the "canceled=true" problem. Tried on android, seems to work fine on mudam fork.

@Deeeej nice work. @mudam can you get this merged into your fork?

Thanks @Deeeej , great stuff. With your permission I'll add this to my fork and probably create new PR.
@jamesdixon have you tried this code as well? I'll do quick test and proceed to publishing.

@mudam can i suggest to update the docs too? The part about the ios hook seems unnecessary since the hook file has been deleted.

@mudam Of course, glad to help in any way I can.
It's worth noting in my change I also commented the lines:
// dropInRequest.cardholderNameStatus(CardForm.FIELD_REQUIRED);
// dropInRequest.vaultManager(true);
As
a) The vault manager doesnt seem to apply here (?)
b) Card holder name is not a required field (especially as 3DS is not turned on)

hey guys, I just tried to upload to the Apple Store and am running into the issue in #6. Is this using the updated Braintree frameworks?

@mudam are you guys seeing that vaultManager is enabled? We just had a client complain that their customer deleted a payment method and can no longer be billed. I am seeing that the vault manager is enabled and according to the Braintree docs, it looks like it has to be explicitly enabled. I do not see any calls to it.

@mudam have you by chance successfully used 3ds with this plugin?

@MedITSolutionsKurman I noticed you have a fork with 3ds but having trouble getting it to compile for iOS. Lots of build errors.  Desperate for something with 3ds support.


[Feature Request] Add dark mode

Hello @Teifun2,
Thanks a lot for your app which makes it a lot simpler to see my recipes, and it’s already soo good !
I know it’s certainly not the priority, but I would be very happy to see a dark theme on this app.
Thanks again for this app. If I can help on a way or another (more on testing, as I’m not a developper), I would be glad to help you 😃

Hello @Thovi98
Firstly thanks a lot for your kind words,
About the dark mode i will investigate, maybe there is a simple flutter way to achieve this whithout major changes!
Otherwhise this will need to wait a bit, but i like the idea!

Darkmode would be very nice. If you have no image for your recipes you can't read the white names of the Categories.

Darkmode would be very nice. If you have no image for your recipes you can't read the white names of the Categories.

@florian-hild This is very weird. The behaviour should be differently if there is no image for a recipe!
Are you on the newest app version and plugin version on nextcloud?
See:

@florian-hild This is very weird. The behaviour should be differently if there is no image for a recipe!
Are you on the newest app version and plugin version on nextcloud?
See:

@florian-hild With the other bug i was investigating i also came across this problem! I will be able to hopefully solve this soon! Sorry for the cirumstances!

@florian-hild With the other bug i was investigating i also came across this problem! I will be able to hopefully solve this soon! Sorry for the cirumstances!

Thank you! Now it's looking fine.

Thank you! Now it's looking fine.

Thanks for the support !
Looks beautiful now 😊


Fix parsing double quoted parameters (#262)

This fixes (or adds support for, i'm not really sure, looking at the code, that it was originally intended) parsing for parameters in double quotes as mentioned in #262.
This doesn't include the quotes with the parameter and also doesn't work with single quotes but both could be fixed easily.

Umm..... #262 is referring to the Dev Branch..... this functionality already works in 0.9 (Master Branch)

Well then, I tried.
But from what I've seen, the algorithm in the Master branch simply ignores quotes and doesn't actually consider everything in them as a parameter.
I've done my own testing, but not in the "official" tests.

It's been a while since I used 0.9, but I recall being able to use these with no issue. Given there is no open issue for this for 0.9, I don't think this should be accepted. We don't know it's broken, so let's leave it as is

I'm avoiding touching the 0.9 branch unless absolutely necessary, and I don't remember this ever being an issue o.O.

Agreed. This wasn't an issue for 0.9. Cited Issue is for 1.0


Example: Streamlit Bot with LocalAI

Streamlit bot
This is an example of a bot using Streamlit with LocalAI.
https://github.com/majoshi1/localai_streamlit_bot

Thanks @Aisuko for your reply. I cloned the repo, created a new local branch. But unable to push. Any idea?
$  git push --set-upstream origin streamlit-bot
remote: Permission to go-skynet/LocalAI.git denied to majoshi1.
fatal: unable to access 'https://github.com/go-skynet/LocalAI.git/': The requested URL returned error: 403

Hi @majoshi1. Jut git push origin streamlit-bot.

Thanks @Aisuko. I tried but getting same error. Any other option?
User@DESKTOP MINGW64 /c/opt/LocalAI (streamlit-bot)
$ git push origin streamlit-bot
remote: Permission to go-skynet/LocalAI.git denied to majoshi1.
fatal: unable to access 'https://github.com/go-skynet/LocalAI.git/': The requested URL returned error: 403

Please note that I had created streamlit-bot branch in my local. Is it ok?
git checkout -b streamlit-bot

Hi @majoshi1. Please fork localAI to your GitHub. And clone it to your local machine. Create a new branch and push it to the GitHub. And then create a PR from your repo to the localAI repo (which we called upstream repo).

Thanks @Aisuko. Did following steps:
-Forked LocalAI to my GitHub account.
-Created new branch.
-Cloned new branch to my local machine.
-Added example and updated examples readme.
-Pushed with a signed commit.
-Created a PR 1072 from my branch to upstream go-skynet/LocalAI repo.
Please check and get back in case of any questions.