SoapClient not found in AramexHelper.php

Hi , i have installed the package and enabled the soap extension in php.ini file but when i tried to create shipment by this code         $callResponse = Aramex::createShipment([
'shipper' => [
'name' => 'Steve',
'email' =><EMAIL_ADDRESS>'phone'      => '+123456789982',
'cell_phone' => '+321654987789',
'country_code' => 'US',
'city' => 'New York',
'zip_code' => 32160,
'line1' => 'Line1 Details',
'line2' => 'Line2 Details',
'line3' => 'Line3 Details',
],
'consignee' => [
'name' => 'Steve',
'email' =><EMAIL_ADDRESS>'phone'      => '+123456789982',
'cell_phone' => '+321654987789',
'country_code' => 'US',
'city' => 'New York',
'zip_code' => 32160,
'line1' => 'Line1 Details',
'line2' => 'Line2 Details',
'line3' => 'Line3 Details',
],
'shipping_date_time' => time() + 50000,
'due_date' => time() + 60000,
'comments' => 'No Comment',
'pickup_location' => 'at reception',
// 'pickup_guid' => $guid,
'weight' => 1,
'number_of_pieces' => 1,
'description' => 'Goods Description, like Boxes of flowers',
]);
if (!empty($callResponse->error)) {
foreach ($callResponse->errors as $errorObject) {
handleError($errorObject->Code, $errorObject->Message);
}
} else {
}  i get this error Error: Class "SoapClient" not found in file C:\Users\ThinkCentre\Desktop\Last\vendor\octw\aramex\src\Helpers\AramexHelper.php on line 285

Seems like your installation of the extension is not done correctly, make sure to enable it for all the php instances on your machine, and specifically php-cli since its the instance that runs Laravel.
Quick hint:
run php --ini in terminal and make sure the php cli ini file is updated and enabled the extension.
to make sure that the extension is installed properly, try creating a new php file with dummy soap request, if you get the same error SoapClient not found, then the extension is not installed properly.

ok now i want to create shipment with this code     public function fetchCountries()
{
$callResponse = Aramex::createShipment([
'shipper' => [
'name' => 'Aqeel Hashem',
'email' =><EMAIL_ADDRESS>'phone'      => '+9656666666',
'cell_phone' => '+9657777777',
'country_code' => 'KW',
'city'      => 'Khaitan',
'zip_code' => '',
'line1' => '15 ABC St',
'line2' => 'Line2 Details',
'line3' => 'Line3 Details',
],
'consignee' => [
'name' => 'Michael',
'email' =><EMAIL_ADDRESS>'phone'      => '+9625555555',
'cell_phone' => '+96244444444',
'country_code' => 'Jo',
'city' => 'Amman',
'zip_code' => '',
'line1' => 'Mecca St',
'line2' => 'Line2 Details',
'line3' => 'Line3 Details',
],
        'shipping_date_time' => time() + 50000,
        'due_date' => time() + 60000,
        'comments' => 'No Comment',
        'pickup_location' => 'at reception',
        'pickup_guid' => '',
        'weight' => 1,
        'number_of_pieces' => 1,
        'description' => 'Goods Description, like Boxes of flowers',
        'product_group' => 'EXP',
        'product_type' => 'PDX',
        'payment_type' => 'P',
        'payment_option' => null,

    ]);
    if (!empty($callResponse->error)) {
        foreach ($callResponse->errors as $errorObject) {
            print_r($errorObject->Message);
            echo '<pre>';
        }
    } else {
        $labelUrl = $callResponse->Shipments->ProcessedShipment->ShipmentLabel->LabelURL;
        print_r($labelUrl);
    }
} but i get this error SoapFault: Could not connect to host in file \Last\vendor\octw\aramex\src\Aramex.php on line 96 specific  in this function     public static function createShipment($param = [])
{
    $aramex = new Core;
    $soapClient = AramexHelper::getSoapClient(AramexHelper::SHIPPING);
    $shipperAddress = AramexHelper::extractShipperAddressContact($param);
    $consigneeAddress = AramexHelper::extractConsigneeAddressContact($param);
    $shipmentDetails = AramexHelper::extractShipmentDetails($param);
    $aramex->initializeShipment($shipperAddress, $consigneeAddress, $shipmentDetails);
    $call =  $soapClient->CreateShipments($aramex->getParam());
    $ret = new \stdClass;
    if ($call->HasErrors) {
        $ret->error = 1;
        if (isset($call->Notifications->Notification)) {
            $ret->errors = [$call->Notifications->Notification];
        }

        if (is_object($call->Shipments->ProcessedShipment->Notifications->Notification)) {
            $ret->errors = [$call->Shipments->ProcessedShipment->Notifications->Notification];
        } else {
            $ret->errors = $call->Shipments->ProcessedShipment->Notifications->Notification;
        }
    } else {
        $ret = $call;
    }

    return $ret;
}

Same here
did you find any souloution @mohamedhasona61 ?

No, not yet.
On Mon, 13 Nov 2023, 15:07 YazanKh1997, @.***> wrote:

Same here
did you find any souloution @mohamedhasona61
https://github.com/mohamedhasona61 ?
—
Reply to this email directly, view it on GitHub
https://github.com/Moustafa22/Laravel-Aramex-SDK/issues/15#issuecomment-1808132552,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVPMUSWW7X4LRZJ5LJVDUUTYEILRDAVCNFSM6AAAAAA67LRXTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBYGEZTENJVGI
.
You are receiving this because you were mentioned.Message ID:
@.***>

same here :(


Add functions to read static global variables in trace.c

In the course of switching to the new Bazel-based build system, I removed the use of u3_Host.tra_u in trace.c because u3_Host is a global variable defined at the vere layer, which exists above the noun layer that holds trace.c. In the course of doing so, I forgot to update the sites in main.c that refer to u3_Host.tra_u, which obviously causes problems when attempting to use the tracing profiler. @philipcmonk was seeing many null values in the resulting JSON trace file, which I suspect is a symptom of this issue.

Here are the reproduction steps:
$ git checkout 8b406c3cbc6b44941597edc000e863ed509f8326
$ bazel build :urbit
$ ./urbit -j zod
dojo> -time ~s2
dojo> |exit
$ cat zod/.urb/put/trace/0.json

0.txt (note GitHub doesn't support JSON uploads, so the file had to be renamed from 0.json to 0.txt.)


Docs build p2

getting closer. this is a cleaner version of the docs with many improvements. i'm concerned that i may have broken things however because i can't run the test suite.

oops sorry wrong repo - closing.


Feat/82 antd optional module

Creating optional module from ANTD dependency
Fixes issue https://github.com/AckeeCZ/create-react-app/issues/82

I saw some potential in simplifying the localizations components structure and it was easier to code it instead of putting it into words, so here is a mini PR for that. I'd suggest merging it here.
Plus I found a little bug in optional module utils (the prettier was applied also on less files and not only on TS ones)
Have you tested it locally?

I saw some potential in simplifying the localizations components structure and it was easier to code it instead of putting it into words, so here is a mini PR for that. I'd suggest merging it here.
Plus I found a little bug in optional module utils (the prettier was applied also on less files and not only on TS ones)
Have you tested it locally?

Yes, but I have some problems to run it locally right now and it is caused by two major issues I can not solve

I can not see the fix for this error during the build -

Dont know how to import dependency  config file from react-scripts

Any ideas here? :)

I saw some potential in simplifying the localizations components structure and it was easier to code it instead of putting it into words, so here is a mini PR for that. I'd suggest merging it here.
Plus I found a little bug in optional module utils (the prettier was applied also on less files and not only on TS ones)
Have you tested it locally?

Yes, but I have some problems to run it locally right now and it is caused by two major issues I can not solve

I can not see the fix for this error during the build -

Dont know how to import dependency  config file from react-scripts

Any ideas here? :)

Did you pull the latest changes from this branch?
That's definitely not possible, nor a good idea to include in optional-modules. Why's that required?

I saw some potential in simplifying the localizations components structure and it was easier to code it instead of putting it into words, so here is a mini PR for that. I'd suggest merging it here.
Plus I found a little bug in optional module utils (the prettier was applied also on less files and not only on TS ones)
Have you tested it locally?

Yes, but I have some problems to run it locally right now and it is caused by two major issues I can not solve

I can not see the fix for this error during the build -

Dont know how to import dependency  config file from react-scripts

Any ideas here? :)

Did you pull the latest changes from this branch?
That's definitely not possible, nor a good idea to include in optional-modules. Why's that required?

Yes, but this is the problem with loading less files - I will handle it other way

Because in that file are used special commands needed only for Antd.
See that file here - https://github.com/AckeeCZ/create-react-app/blob/1cb086ed0b494606667d62ce88eddf91580184f1/packages/react-scripts/custom/config/transformWebpackConfig.js

I saw some potential in simplifying the localizations components structure and it was easier to code it instead of putting it into words, so here is a mini PR for that. I'd suggest merging it here.
Plus I found a little bug in optional module utils (the prettier was applied also on less files and not only on TS ones)
Have you tested it locally?

Yes, but I have some problems to run it locally right now and it is caused by two major issues I can not solve

I can not see the fix for this error during the build -

Dont know how to import dependency  config file from react-scripts

Any ideas here? :)

Did you pull the latest changes from this branch?
That's definitely not possible, nor a good idea to include in optional-modules. Why's that required?

Yes, but this is the problem with loading less files - I will handle it other way
Because in that file are used special commands needed only for Antd.
See that file here - https://github.com/AckeeCZ/create-react-app/blob/1cb086ed0b494606667d62ce88eddf91580184f1/packages/react-scripts/custom/config/transformWebpackConfig.js

Oh, alright.
I see. The loaded is however imported only if antd exists in package.json and the antd config for babel-plugin-transform-imports, that's ok to leave as it is (it won't just match any antd module, so it will do nothing)


readme: add example for having one workflow for each subcommands (publish and release-pr)

done in https://github.com/MarcoIeni/release-plz-action/commit/9b02a74058346dcb26ede6d66807fe46acab6546


Convert PoC code to loosly coupled service

E P I C

[ ]  SAMLRequest og Response i ruby
[ ] OIDC Request og Response
[x] #60
[ ] Pack and build it up as a standalone container
[ ] Create OIDC to OIDC IDP config in Authentik

We have decided to make a contribution upstream to Authentik, with the needed changes for making the SAML to OIDC communication work inside Authentik. https://github.com/goauthentik/authentik/issues/9172.
The issue can be reopened later if something doesent work out ...


Bug: complete_path ignores binary files

RTFM Checklist

[X] I have searched exisiting issues / discussions
[X] I have read the Wiki including the Advanced section
[ ] I have read man fzf / I am well versed in shell fzf

Operating system
Linux
Shell
zsh
Neovim version (nvim --version)
NVIM v0.11.0-dev
Fzf version (fzf --version)
0.46.0
Output of :lua print(os.getenv('FZF_DEFAULT_OPTS'))
--extended --inline-info
Is the problem reproducible with mini.sh?

[ ] My issue is reproducible with mini.sh
[ ] My issue IS NOT reproducible with mini.sh
[ ] I have not tested with mini.sh (not relevant, requires LSP, Windows, etc)

Fzf-lua configuration
require("fzf-lua").setup({
      vim.keymap.set({ "i" }, "<C-x><C-f>",
      function()
        require("fzf-lua").complete_path() end,
        { silent = true, desc = "Fuzzy complete path" })
    })

Describe the bug / steps to reproduce
When completing a path/filename using complete_path(), if the file I'm trying to get at is a binary file, it does not show up. In a directory with a mix of files, only text files are shown. I'm not sure if this is a bug or an option that can be set, or whether it uses gitignore as a basis for that, and if so how that can be changed.

This isn’t a bug, the command is auto detected and will prioritize fd over find, you can see what command is run if you add debug=true to the options, whatever fd returns is what you’ll see in the list, it’s probably being ignored becuse of gitignore, try adding no ignore to the command (remove debug when you’re done debugging):
require("fzf-lua").setup({
      vim.keymap.set({ "i" }, "<C-x><C-f>",
      function()
        require("fzf-lua").complete_path({ cmd = 'fd --no-ignore', debug = true }) end,
        { silent = true, desc = "Fuzzy complete path" })
    })

Apologies for mislabeling. Your suggestion however doesn't seem to work for some reason (as in, completion stops working altogether). Also, from what I can tell, gitignore either takes precendence over, or is merged with, an fd ignore file if it exists.

Apologies for mislabeling. Your suggestion however doesn't seem to work for some reason (as in, completion stops working altogether). Also, from what I can tell, gitignore either takes precendence over, or is merged with, an fd ignore file if it exists.

What does it mean “stops working altogether”, does it not complete or you get an empty list? My suggestion is a mere suggestion on how to teoubleshoot this, experiment with debug and different fd/find commands, try the same commands in the shell under the same cwd and find where the issue lies.
If there’s a bug, please provide more details why you believe this is a bug.

I meant there's an empty list. I understand it is not a bug, now just trying to understand how to configure it. I'll do as you suggested and compare with the shell. Thanks.

I meant there's an empty list

That means either the command I used is wrong or you don’t have fd installed, use debug=true and look at the first line, run the same command in the shell, the same output should appear in fzf-lua, find why the output doesn’t contain binaries and you have a solution.
Debug output:


Rectangles -> Polygons

It is helpful to be able to convert between these types since some things that support polygons don't support rotated rectangles

Added the test.  I really hope it's right.
Also added a to_poly converter.  It would be nice to have these for all regions, even circles, with nverts as a free parameter in that case

It would be nice to have these for all regions, even circles, with nverts as a free parameter in that case

Yes, that can be nice. Open a feature request issue?
I think both matplotlib and shapely (and surely others) have such code already, so whoever does this more systematically should probably look there for guidance instead of starting from scratch. (some shapes aren't easy to polygonise)

thanks for the pep8 check; it revealed that my syntax checker was broken


feat(category): replace DaffCategorySortOption with DaffSortOption from core.

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/graycoreio/daffodil/blob/master/CONTRIBUTING.md#commit
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?
Currently, we rely on a special type of category that is no longer necessary.
Fixes: N/A
What is the new behavior?
We now have a defined type in core that we use here.
Does this PR introduce a breaking change?
[ ] Yes
[x] No

@griest024 resolved.


Changing the active folder tab using ctrl+tab should circle through the tabs.

System information:

Operating system (distribution) and version
Windows 10 Enterprise version 1909

DBeaver version:
Version <IP_ADDRESS>202051448

Describe the problem you're observing:
With multiple tabs open (e.g. SQL Editors, session manager, etc.)  using ctrl+tab changes the active folder tab one to the right.  Once the rightmost tab is active, ctrl+tab  should loop around and make the leftmost tab the active one.  ctrl+tab on the rightmost tab now does nothing.  Same is true for using ctrl+shift+tab to make one tab to the left the active tab.  It now stops at the leftmost tab and should instead loop around to the rightmost one.
Steps to reproduce, if exist:
o  Make a DB connection, open 3 SQL consoles doing the following 3 times:
o  click on the connection in Database Navigator
o type ctrl+alt+enter
o  Click on the leftmost SQL console tab to make it active.
o  Type ctrl+tab to make the second SQL console active.
o  Type ctrl+tab to make the third SQL console active.
o  Type ctrl+tab again and there is no change.
The requested behavior here is for:
o  when the rightmost tab is active,  ctrl+tab  should loop around and make the leftmost tab active.
o  when the leftmost tab is active,  ctrl+shift+tab  should loop around and make the rightmost tab active.

Thank you for the idea.


Progress updates are not using the same embed as they once did

When the progress is updated it sends a new message instead of updating the original embed.

resolved with 960da004d7a5bd1c967f8408d473bdaa8d6824d1


Extended withNamespaces not delivering up-to-date t prop

As demonstrated in the example here, I'm currently having to pass the current lang from this.props.lng into the t function to get this extended version of withNamespaces to work correctly after a language change.
To reproduce:

Clone the repo
Do yarn && yarn run-example
Open a browser to localhost:3000
Reload a few times, observe behaviour
Press the button to change language
Do a reload - SSR language will be incorrect, and client will correct it

It's important to note that both initialLanguage and initialI18nStore appear to be correct during this SSR process, it's just the t function that is returning a translation in a different language than the current language. This is why overriding the current lang to this.props.lng works.
Somehow, either via the context provided by I18nextProvider, or some other reason, the reference that withNamespaces has to the current lang is not being updated. It could be that there are multiple i18n instances existing simultaneously that I'm not aware of.
I'm quite sure this is user error on my part, but @jamuhl if you had a short moment to check this out and let me know what you think, I would be very grateful.

@isaachinman will take a look when back home later today.

@isaachinman ok i guess i found the cause...
https://github.com/isaachinman/next-i18next/blob/master/src/hocs/app-with-translation.js#L30
You set the language on the one main instance used on server and pass that to the I18nextProvider. There is a second place i18next.translator.language which is the language really used for translations  (so a i18next.changeLanguage triggers a change there too: https://github.com/i18next/i18next/blob/master/src/i18next.js#L187)
So adding:
if (req && req.i18n) {
        [initialLanguage] = req.i18n.languages
        i18n.language = initialLanguage
        i18n.translator.language = initialLanguage // <--- this
        req.i18n.languages.forEach((l) => {
        // ...

Will make it work...but honestly i'm not sure this is a good idea. If i see it right: https://github.com/isaachinman/next-i18next/blob/master/src/hocs/app-with-translation.js#L7 is not the i18n instance req.i18n but just something like require('i18next')....right?
If so any async process done during rendering leads to a chance that the language on that main instance gets changed by another request - this is why the req.i18n is always a own cloned instance.

@jamuhl The i18n instance in app-with-translation is the instance initialised with user options. It's bound to the app-with-translation function as this.i18n here.
This should be the exact same setup as the working NextJs example... Not sure what is different here.
What would be wrong with setting i18n.translator.language? But that aside, why is it not updating on its own? It seems as though withNamespaces is consuming / connected to a different i18n instance than expected.

ah...didn't catch that in the example...
setting i18n.language does not set language on translator -> only calling i18n.changeLanguage does.
the problem with setting that is...requests are asynchronous...as long you do no async data fetching during SSR there won't be any issue...as long there are not a lot of request there is no issue - but if there are:

req1 -> set lng to "de" -> calls fetch data -> waits for callback
req2 -> set lng to "fr" -> calls fetch data -> waits for callback
req1 gets data -> starts rendering -> i18n.language = "fr" as it was set by req2

so it will work in development and brake in production

Yes, I understand that. The language is being changed on the client via i18n.changeLanguage, and then on the next full reload, the SSR process does not respect the newly set language - despite the cookie being changed correctly, etc.

It's important to note that both initialLanguage and initialI18nStore appear to be correct during this SSR process, it's just the t function that is returning a translation in a different language than the current language.

Anyways, I will keep looking into it now.

like said you will need to set i18next.translator.language too, if not using changeLanguage like here: https://github.com/isaachinman/next-i18next/blob/master/src/hocs/app-with-translation.js#L30
regarding the express requests: https://github.com/i18next/i18next-node/blob/master/test/i18next.server.reqCollision.spec.js#L80 that was a test in v1 asserting that we get right results

Okay, I understand. Doing an await i18n.changeLanguage(initialLanguage) seems to work fine. Curious as to how this is not broken in the example for the react-i18next repo though.

believe it's broken there too -> we just not noticed yet as not in production and no async data fetching in the sample (no apollo or similar) --- at least we would have a problem if react.renderToString is not synchron (as i'm not an expert on that i'm not sure - but i guess it does not block as that would kill server performance)
eventual we lost using req.i18n down the road of updates: https://github.com/i18next/react-i18next/blob/v8.0.0/example/nextjs_withAppJS/i18n.js#L54

I am not so sure what you mean about async fetching. We can do any async actions inside NextJs's getInitialProps, and that will all happen before any renderToString calls.
This package is getting close to being ready for initial testing by the way, if you feel like trying it out. Even after spending several weeks now focusing on NextJs and react-i18next, I still do not feel as though I am an expert at all, and can always use your advice!
There are definitely some smaller problems I've noticed already (including "codesplitting" namespaces when using ES modules, etc) that don't necessarily need to be solved ASAP. I want to start with a solid base first.
Sometime soon I will also add a withI18nRouter method to the class to support routing via props as well.

sounds awesome. Yes, i can help with the react-i18next part - and with testing. For nextjs i always got a  less comfortable feeling...i feel save when i use this things myself in production at some point - just doing samples always leave me with the feeling i might have missed something.

@isaachinman we got the same issue on the react-i18next/example/nextjs when we upgrade react-i18next to latest...
steps:

toggle client language so it is de
refresh the page

=> the serverside render will show en while client will show correctly de
the commit causing it: https://github.com/i18next/react-i18next/commit/2028d0ae3d96c5988dfca276f5424c4b87ea1d56
Not sure why setting language again and again fixes it - as that seems wrong. Not sure but guess the problem is related to mixing req.i18n and the global instance on serverside.
I really would say this: https://github.com/isaachinman/next-i18next/blob/master/src/hocs/app-with-translation.js#L78 should be req.i18n

Ah yeah. Same fix as what I did for next-i18next, we simply need to use changeLanguage instead of mutating the object directly. Example can be seen here:
https://github.com/isaachinman/next-i18next/blob/master/src/hocs/app-with-translation.js#L44
I'll submit a PR for this repo shortly.


UI: Find Out More and Sidebar Update

Information page has been replaced by Find Out More page which includes

short information about Federated and Distributed Learning
Disco's features
Step by step tutorial
Buttons to Task List and Task Creation Form pages
Further information

Each topic is now in their separate sections, this will help users to focus on each topic one by one.
Necessary changes made to Sidebar to make the new page visible and icons are replaced by texts.
Footer has been moved to the Sİdebar to make it more visible.
Find Out More

Sidebar

discussed with @gozgun, this PR is stale w.r.t her more recent ones :)


Lisk Copyright is Inaccurate

Lisk copyright should state 2016-2017, not just 2017.

are you kidding, don't you have some decent job to do!

No I am not kidding. Some code was taken from our 2017 version of explorer, and since the explorer was forked in 2016 it should reflect that.

I believe this can be closed now?  I'll update the emails in package.json too.
Let me know if something was missed


The /health endpoint can return a 503 HTTP response code on error

Fix https://github.com/sensu/uchiwa/issues/557

Coverage decreased (-0.2%) to 24.54% when pulling 5a59c37b574d85455859792d4b08153aaf4c8e1a on palourde:issue-557-health-return-code into f9e32771c64fdc424d7dd26f2dfd95459e734572 on sensu:master.

thank you!


Separate section for Reverse Engineering

A separate section is needed for Reverse Engineering. Three popular tools which I can mention are Hopper, IDA Pro and radare2.

Good point. Please add PR.

#52

Nice work, thanks! (#52).


Fix handling of default parameters in plans

Passing None as the default for a field sets the default to None and
is different to there being no default.
If a default value is given, it is now returned via a default_factory.
This is required to prevent pydantic errors when the default is an ophyd
device.

not sure why CI is unhappy

Because lambda x: x != lambda x: x


doc: update buildNixShellImage docs, add streamNixShellImage docs

Description of changes
This PR updates the content and structure of the docs for buildNixShellImage, and adds docs for streamNixShellImage as a bonus. The content added follows the docs conventions.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2024-02-08-documentation-team-meeting-notes-108/39492/1


Use dd instead of tee in Unix-like operating systems

Benefits of using dd instead of tee:

Memory usage can be possibly reduced as dd can read from the temporary file directly instead of reading from stdin.
If the entered password is wrong, the file content will not be treated as passwords by sudo, so only 1 failed attempt will be counted. (Probably related to #34)
If sudo uses something other than password authentication (like fprintd fingerprint authentication), the entered password will not end up at the top of the written file.

Thanks a lot! That's very interesting. I need to try and investigate so please wait for this weekend. Please mention me if you feel I might forget this.

Before

After

Perfect 🎉


⚠ Bofrost.nl has degraded performance

In dd29793, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 1458 ms

Resolved: Bofrost.nl performance has improved in fe9b404 after 6 minutes.


Incorrect button name in transaction details

Please change the name of the fourth button to "Repeat transaction"

The button itself works correctly:
https://user-images.githubusercontent.com/85252690/173355369-d7e43286-3401-417f-957f-381ca9526b1d.mp4

Checked


Trigger-Tiles only lay down correctly when dragging from upper-left

The trigger-tiles only lay down correctly when dragging from the upper-left, otherwise, if you try dragging from the lower-right side, it flips the visible trigger tile(s) over an axis and the visible trigger-tile doesn't match up with where the tokens will actually trigger. It still seems to place in the spot you dragged over, BUT the visible tiles that the GM sees won't be in the correct spot. Moving the visible tiles moves the invisible triggers as well.
So if you were to try to drag from the lower right corner to create a 1x1 (or any size trigger), the below shows what happens ['o' are empty spaces, 'x' is the visible trigger tile, and 'y' is the space you drag over and the actual space that will trigger when a player walks over (but does not show for GM)]
y o o
o x o
o o o

Wow, thank you so much for your in depth explanation here. And what a great find - I would have NEVER found this because I always drag from the top left haha. I'm doing some work on this module this weekend and I'll see if it's easily possible to fix this!

After experimenting with this more, I think this might be a Foundry bug itself with tile placement. 😬 I disabled all modules and tried to drag from the lower right corner and it flips the tile as well... I may report this as a bug in Foundry itself, or check if 0.8.1 resolves this.

Interesting. I’ll have to give it a try with normal tiles. I hadn’t thought to even try that and just assumed it was module-specific.


Allow users to upload data to existing datasets

Implementation is finished but waiting until v2 to merge so that we can minimize risk for v1.
See screenshots in the PR.
Code review is TBD.

@alesnarx The following code diff might give you a running start on this task:
https://gitlab.aws.dev/ianwow/1pd4amc/-/merge_requests/31


No Output from MOT Evaluation

Hello there, thank you for the wonderful work on the dataset. I am trying to perform MOT evaluation on the validation set.
I have prepared the JSON files from validation set results from a custom trained model, and I am trying to run the following. However, there is no output from the program, there are no errors either.
python3 -m bdd100k.eval.run \
        -t box_track \
        -g /Users/admin/Desktop/bdd100kdata/bdd100k/labels/box_track_20/val \
        -r /Users/admin/Desktop/bdd100kdata/bdd100k_epoch5/bdd \
        --out_file /Users/admin/Desktop/bdd100kdata/bdd100K_epoch5/val_output \
        --score_file /Users/admin/Desktop//bdd100kdata/bdd100k_epoch5/

In my own attempt to understand what is going on, I have placed print statements in the various files, and identified that in run.py, there are no more print outputs after load(args.gt, args.nproc) from the section of the code below. However, I'm not too sure what else I could do after this.
Perhaps you may have a solution? Thank you.
elif args.task == "box_track":
        print("Mode: Box Track")
        results = evaluate_track(
            acc_single_video_mot,
            gts=group_and_sort(
                bdd100k_to_scalabel(
                    load(args.gt, args.nproc).frames, bdd100k_config
                )
            ),
            results=group_and_sort(
                bdd100k_to_scalabel(
                    load(args.result, args.nproc).frames, bdd100k_config
                )
            ),
            config=bdd100k_config.scalabel,
            iou_thr=args.iou_thr,
            ignore_iof_thr=args.ignore_iof_thr,
            nproc=args.nproc,
        )

I've tested the code with the original BDD annotations, and it works. So, the problem seems to be with my result files.
I'm following the following format from the bdd100k docs, but I'm getting the following errors. Any help is appreciated!

pydantic.error_wrappers.ValidationError: 10 validation errors for Frame
labels -> 0 -> box2d
value is not a valid dict (type=type_error.dict)
labels -> 1 -> box2d
value is not a valid dict (type=type_error.dict)

My result JSON format, according to BDD100k documentation:
- videoName: str, name of the current sequence,
- name: str, name of the current frame,
- framIndex: int, index of the current frame within the sequence,
- labels []:
    - id: str, unique instance id of the prediction in the current sequence,
    - category: str, name of the predicted category,
    - box2d []:
        - x1: float,
        - y1: float,
        - x2: float,
        - y2: float

I've figured out the problem. In the result template, box2d should be a dictionary instead of a list. In addition, there has been a typo on the documentations. framIndex should be frameIndex!
With this, it works as expected now!


NCS 2.5.0 Compatibility

Hi Helmut,
Please update project to build successfully with NCS 2.5.2.
Looks like a pretty useful project. Thank you!

@hlord2000 Thank you for updating the distance toolbox demo. I did chnage the SSD1306 OLED I2C address to 0x3c, rest was fine for NCS 2.5.2 build.
However, the distance measurements seem to be inaccurate for MCPD. I'll review the code to see what's going on.
Also, I tried building for NCS 2.6.0. With a few minor tweaks, I was able to build but the firmware didn't run successfully. I'l dig in more but if you do get a chance, please update for NCS 2.6.0.
Thank you.


Add GraphQL Binding

Description
Added GraphQL binding to connect to Hasura server
Issue reference
This PR will close issue #3098

@mukundansundar can you please review?

@mukundansundar @yaron2
I think we will have to adjust the lint checker for Graphql/Hasura Operations which are query and mutation differ from other usual CRUD bindings and does not have CreateOperation, DeleteOperation, GetOperation, ListOperation
Let us know where to make that adjustment will be happy to do so. Thank you.

Wouldn't the desired behavior here be to have a case for all of those and return an error saying it's not a supported operation? You can see how the Azure storage binding does it as it only supports 3 out of 4 operations:
https://github.com/dapr/components-contrib/blob/master/bindings/azure/blobstorage/blobstorage.go#L204

@mukundansundar @yaron2
I think we will have to adjust the lint checker for Graphql/Hasura Operations which are query and mutation differ from other usual CRUD bindings and does not have CreateOperation, DeleteOperation, GetOperation, ListOperation
Let us know where to make that adjustment will be happy to do so. Thank you.

Wouldn't the desired behavior here be to have a case for all of those and return an error saying it's not a supported operation? You can see how the Azure storage binding does it as it only supports 3 out of 4 operations:
https://github.com/dapr/components-contrib/blob/master/bindings/azure/blobstorage/blobstorage.go#L204

@halspang  Sounds like the right way to do it but it will have side effect to update other components to account for new operation query and mutation .
Two new entries will have to be made and other component will have to fallthrough the two new operation. Linter might fail for other two cases missing in older bindings.
https://github.com/dapr/components-contrib/blob/master/bindings/requests.go#L19-L24
const (
	GetOperation    OperationKind = "get"
	CreateOperation OperationKind = "create"
	DeleteOperation OperationKind = "delete"
	ListOperation   OperationKind = "list"
	QueryOperation	OperationKind = "query"
	MutationOperation OperationKind = "mutation"
)

We can also avoid updating the requests.go the way @amirmm11 has implemented it and apply the lint per binding because each binding can have its own kind of operation.
Let us know what would be a good idea. If adding two new operation and old binding will not complain we should be good.
Thank you.

@mukundansundar @yaron2
I think we will have to adjust the lint checker for Graphql/Hasura Operations which are query and mutation differ from other usual CRUD bindings and does not have CreateOperation, DeleteOperation, GetOperation, ListOperation
Let us know where to make that adjustment will be happy to do so. Thank you.

Wouldn't the desired behavior here be to have a case for all of those and return an error saying it's not a supported operation? You can see how the Azure storage binding does it as it only supports 3 out of 4 operations:
https://github.com/dapr/components-contrib/blob/master/bindings/azure/blobstorage/blobstorage.go#L204

@halspang Sounds like the right way to do it but it will have side effect to update other components to account for new operation query and mutation .
Two new entries will have to be made and other component will have to fallthrough the two new operation. Linter might fail for other two cases missing in older bindings.
https://github.com/dapr/components-contrib/blob/master/bindings/requests.go#L19-L24
const (
	GetOperation    OperationKind = "get"
	CreateOperation OperationKind = "create"
	DeleteOperation OperationKind = "delete"
	ListOperation   OperationKind = "list"
	QueryOperation	OperationKind = "query"
	MutationOperation OperationKind = "mutation"
)

We can also avoid updating the requests.go the way @amirmm11 has implemented it and apply the lint per binding because each binding can have its own kind of operation.
Let us know what would be a good idea. If adding two new operation and old binding will not complain we should be good.
Thank you.

I don't think we should make old bindings fail if they don't have the new operation. I would be fine with letting default be considered covering for exhaustive. This is at least how I've handled things in the past in languages like Java. There's a setting for it in the linter but I'll leave it up to @mukundansundar or @pkedy to decide if they're OK with that.
Here's the setting you'd put in .golangci.yaml:
  exhaustive:
    # check switch statements in generated files also
    check-generated: false
    # indicates that switch statements are to be considered exhaustive if a
    # 'default' case is present, even if all enum members aren't listed in the
    # switch
    default-signifies-exhaustive: true

I haven't tried it, but I think that'd work.

@amirmm11 That is a very good question. Yes, it can be done with Metadata but I don't think it will be pretty because the 1) the properties are map[string]string and 2) secrets are involved.
There could be some prefix based way to do this (But again, not pretty)
  metadata:
  - name: headerKeys
    value: headerAccessKey
  - name: headerAccessKeyName
    value: "x-hasura-access-key"
  - name: headerAccessKeyValue
    secretKeyRef:
    	name: hasura-secret
        key:  hasura-password

/cc @artursouza @mukundansundar @yaron2 Thoughts on how to configure a nested map[string]string like header values?

With the current design, it would require some inner structure in the string like as URL query params encoding: "X=1&Y=2"

@artursouza Don't forget the use case here involves secrets (specifically an access key). I didn't think you could embed secrets using a single headers property with query params encoding. Is that incorrect? In other words can you do something like:
x-hasura-access-key=${secret(hasura-secret,hasura-password)}&X=1&Y=2

If so, it is not documented here: https://docs.dapr.io/operations/components/component-secrets/

@artursouza Don't forget the use case here involves secrets (specifically an access key). I didn't think you could embed secrets using a single headers property with query params encoding. Is that incorrect? In other words can you do something like:
x-hasura-access-key=${secret(hasura-secret,hasura-password)}&X=1&Y=2

If so, it is not documented here: https://docs.dapr.io/operations/components/component-secrets/

I see - then we should not wait for this inlining feature for this PR (please, create an issue to track that) we already have {uuid} today and we add more values to be resolved in metadata.
I am OK with the experience suggested by Phil. Once we have inline values for secrets, we can support both ways.

@yaron2
I updated the code to use a map as a header to connect any GraphQL connection and fixed the linting issues.
// GraphQL represents GraphQL output bindings
type GraphQL struct {
	client *graphql.Client
	header map[string]string
	logger logger.Logger
}

and the Yaml sidecar should like this to connect to Hasura, for example:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: example.bindings.graphql
spec:
  type: bindings.graphql
  version: v1
  metadata:
    - name: endpoint
      value: localhost:8080
    - name: x-hasura-access-key
      value: localhost:1234

@amirmm11 I like this simpler approach more than the what I recommended. But there still needs to be a way to separate normal config settings from headers. What if you used a prefix on the names like this?
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: example.bindings.graphql
spec:
  type: bindings.graphql
  version: v1
  metadata:
    - name: endpoint
      value: localhost:8080
    - name: header:x-hasura-access-key
      secretKeyRef:
    	name: hasura-secret
        key:  hasura-password

@amirmm11 I like this simpler approach more than the what I recommended. But there still needs to be a way to separate normal config settings from headers. What if you used a prefix on the names like this?
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: example.bindings.graphql
spec:
  type: bindings.graphql
  version: v1
  metadata:
    - name: endpoint
      value: localhost:8080
    - name: header:x-hasura-access-key
      secretKeyRef:
    	name: hasura-secret
        key:  hasura-password

@pkedy would it be sufficient and safe to assume that header will start with x-zzzzz ... Anything not following such convention can be safely assumed as not a header ? Following the HTTP conventional style.

@amirmm11 I like this simpler approach more than the what I recommended. But there still needs to be a way to separate normal config settings from headers. What if you used a prefix on the names like this?
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: example.bindings.graphql
spec:
  type: bindings.graphql
  version: v1
  metadata:
    - name: endpoint
      value: localhost:8080
    - name: header:x-hasura-access-key
      secretKeyRef:
    	name: hasura-secret
        key:  hasura-password

@pkedy would it be sufficient and safe to assume that header will start with x-zzzzz ... Anything not following such convention can be safely assumed as not a header ? Following the HTTP conventional style.
In this case endpoint is clearly not a header while x-hasura-access-key by following http style header convention.

@alvinhenrick @pkedy I assumed that everything except endpoint is a header. I just wanted not to add many complexities to the sidecar.

@amirmm11 I think we want config to be explicit so that if the user makes a mistake they receive and error instead of treating is as a header. I think the prefix is succinct, clear, and doesn't add too much complexity.
@alvinhenrick You are correct in that custom headers should have a x- prefix, but I'm concerned about a case where the backend violates that convention or you need to specify a standard header (e.g. Authorization).
IMO this is a case where I think clear is better than clever.

@amirmm11 I think we want config to be explicit so that if the user makes a mistake they receive and error instead of treating is as a header. I think the prefix is succinct, clear, and doesn't add too much complexity.
@alvinhenrick You are correct in that custom headers should have a x- prefix, but I'm concerned about a case where the backend violates that convention or you need to specify a standard header (e.g. Authorization).
IMO this is a case where I think clear is better than clever.

@pkedy Done as you recommended.
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: example.bindings.graphql
spec:
  type: bindings.graphql
  version: v1
  metadata:
    - name: endpoint
      secretKeyRef:
        name: dev/RDS/hasura_url
        key: dev/RDS/hasura_url
    - name: header:x-hasura-access-key
      secretKeyRef:
        name: dev/RDS/hasura_admin_secret
        key: dev/RDS/hasura_admin_secret
auth:
  secretStore: example.aws.secretmanager

@amirmm11 I think we want config to be explicit so that if the user makes a mistake they receive and error instead of treating is as a header. I think the prefix is succinct, clear, and doesn't add too much complexity.
@alvinhenrick You are correct in that custom headers should have a x- prefix, but I'm concerned about a case where the backend violates that convention or you need to specify a standard header (e.g. Authorization).
IMO this is a case where I think clear is better than clever.

Sounds good.

@amirmm11 I was trying to help resolve the linter issues and refactored the code a bit to resolve the cyclomatic complexity. I found that the query and mutation commands were basically the same logic. I've attached a diff for you to see.
Given that the query and mutation commands are basically the same, would it make sense to verify that queries command strings are queries and mutations command strings are mutations? To do this, is it as simple as checking the first keyword?
	requestString = strings.TrimSpace(requestString)
	re := regexp.MustCompile(`(?m)` + requestKey + `\b`)
	matches := re.FindAllStringIndex(requestString, 1)
	if len(matches) != 1 || matches[0][0] != 0 {
		return fmt.Errorf("GraphQL Error: command is not a %s", requestKey)
	}

patch.diff.zip

Thank you @pkedy
I added your changes.

@amirmm11 Looks like a gofumpt issue.  Pls change the loop at line 68 to
	for k, v := range p {
		if strings.HasPrefix(k, "header:") {
			gql.header[strings.TrimPrefix(k, "header:")] = v
		}
	}

This removes and extra newline and also that error check which is not necessary.

@pkedy Done. Thanks


Add george-edison55/cmake-3.x for cmake 3 support

The reason why I personally want cmake 3 support is for the ninja-build generator.
EDIT: I realized this ppa does not support precise and that cmake 2.8.11 supports ninja just fine.

sscuberth/cmake-here has a recent cmake version, and supports precise.


Complain to build about robot not being done yet

Like actually its not a programming problem yet :smiley_cat:

~12 minutes ago: apparently armservo has a chance of becoming armmotor2 per andrew's word


Ensure Release Assets

@ii generates assets for our tags here:
https://github.com/ii/wgtunnel/releases/tag/v0.1.0
Having trouble generating them here:
https://github.com/cloudnative-coop/wgtunnel/actions/runs/4716351905
Help wanted!

Yes, we will be pushing this upstream.

Just realised I duplicated this work in https://github.com/cloudnative-coop/wgtunnel/issues/2

Here is the PR I created to address this: https://github.com/coder/wgtunnel/pull/15/files


 not being captured

when i set input boxes to disabled, i still want to capture the value of the box.

Disabled field not sent on form submission, so it's not serialized. However you can use callback function which returns name/value pair for disabled fields (see "Custom Fields" example).
Probably it makes sense to add such option (skipDisabled).


Any suggestions on how to deal with thread-safety of connection?

Hi!
When using C++17, I need to make sure I only access the connection object from the same thread.
If I want to execute operations on the connection and handle the results later, I have to post it to the io_context, something like this:
#include <boost/asio.hpp>
#include <boost/redis.hpp>
#include <boost/redis/connection.hpp>
#include <boost/redis/src.hpp>
#include <iostream>
#include <semaphore>

void SetKey(std::string_view key, std::string_view value,
    boost::redis::connection& connection, std::counting_semaphore<1>& semaphore,
    boost::asio::io_context& io_context) {
  auto request = std::make_shared<boost::redis::request>();
  request->push("SET", key, value);
  auto response = std::make_shared<boost::redis::response<std::string>>();
  io_context.post([&connection, request, response, &semaphore]() {
    connection.async_exec(
        *request, *response,
        [request, response, &semaphore]
            (const boost::system::error_code& error, std::size_t) {
          if (error) {
            std::cout << "Failed to send SET command to Redis server: " << error.to_string() << std::endl;
          } else {
            std::cout << "Response: " << std::get<0>(*response).value() << std::endl;
          }
          semaphore.release();
        });
  });
}

int main() {
  boost::asio::io_context io_context{1};
  std::thread thread;

  // Set up.
  boost::redis::connection connection(io_context);
  boost::redis::config config;
  connection.async_run(config, {boost::redis::logger::level::warning},
    [](const boost::system::error_code& error) {
    if (error) {
      std::cout << "Redis server setup error: " << error.to_string() << std::endl;
    }
  });
  thread = std::thread([&io_context] {
    std::cout << "RedisGlobalCache running" << std::endl;
    io_context.run();
    std::cout << "RedisGlobalCache finished" << std::endl;
  });

  std::counting_semaphore<1> semaphore(0);
  SetKey("key1", "value1", connection, semaphore, io_context);

  // Somewhat later I will check the result...
  semaphore.acquire();

  io_context.post([&connection] { connection.cancel(); });
  thread.join();
  return 0;
}

Is there a better way to do this? Does that mean I also can't have more than 1 thread in my io_context?
Thanks in advance!

I think you have two options here:
1.-Go fully single-threaded (like Node.js). In this case, I'd advise you to not use std::thread and have main run the context:
#include <boost/asio.hpp>
#include <boost/redis.hpp>
#include <boost/redis/connection.hpp>
#include <boost/redis/src.hpp>
#include <iostream>
#include <semaphore>

void SetKey(std::string_view key, std::string_view value,
    boost::redis::connection& connection) {
  auto request = std::make_shared<boost::redis::request>();
  request->push("SET", key, value);
  auto response = std::make_shared<boost::redis::response<std::string>>();
  connection.async_exec(
      *request,
      *response,
      [request, response, &connection] (const boost::system::error_code& error, std::size_t) {
          if (error) {
            std::cout << "Failed to send SET command to Redis server: " << error.to_string() << std::endl;
          } else {
            std::cout << "Response: " << std::get<0>(*response).value() << std::endl;
          }
      }
      connection.cancel();
  );
}

int main() {
  boost::asio::io_context io_context{1};
  std::thread thread;

  // Set up.
  boost::redis::connection connection(io_context);
  boost::redis::config config;
  connection.async_run(config, {boost::redis::logger::level::warning},
    [](const boost::system::error_code& error) {
    if (error) {
      std::cout << "Redis server setup error: " << error.to_string() << std::endl;
    }
  });

  SetKey("key1", "value1", connection, semaphore);

  io_context.run();
  return 0;
}

This is using "work counting" in Boost.Asio. io_context::run won't return until all outstanding I/O operations have finished. In your example, this means it won't return until you've called cancel on your connection.

Go multi-threaded. I'd advise to use asio::thread_pool instead of io_context However, this requires extra care. The way to go is using strands. I'd advise to first build it single-threaded, then switch to multi-threaded only after efficiency measuring.

Note: io_context.post(f) is deprecated. The new way of writing it is asio::post(asio::bind_executor(io_context.get_executor(), f))

Thanks @anarthal !

Thanks for the suggestion. The problem is that I do want the Redis operation to be async, as the way this integrates into my project will be something like: "User Request" -> "Executes Redis" -> "Reply later with result". And I can't really block the execution with the run (that is why I have it in another thread), and would like to reuse the same connection object.

I see, it does seem that strands would be the best way to solve the problem if having more than one thread!

Thanks for pointing out about the deprecated function!

Hm, is the rest of your program using Asio? Or is it just the part using Redis? In the latter case, I'd suggest to use something like the following:
#include <boost/asio.hpp>
#include <boost/redis.hpp>

#include <cstddef>
#include <future>
#include <iostream>

namespace asio = boost::asio;

std::future<std::size_t> SetKey(
    std::string_view key,
    std::string_view value,
    boost::redis::connection& connection,
    boost::asio::io_context& io_context
)
{
    // clang-format off
    auto request = std::make_shared<boost::redis::request>();
    request->push("SET", key, value);
    auto response = std::make_shared<boost::redis::response<std::string>>();
    return boost::asio::dispatch(boost::asio::bind_executor(
        io_context.get_executor(),
        boost::asio::deferred([&connection, request, response]() {
            return connection.async_exec(
                *request,
                *response,
                asio::consign(asio::deferred, request, response)
            );
        })
    ))(boost::asio::use_future);
    // clang-format on
}

int main()
{
    boost::asio::io_context io_context{1};
    std::thread thread;

    // Set up.
    boost::redis::connection connection(io_context);
    boost::redis::config config;
    connection.async_run(
        config,
        {boost::redis::logger::level::warning},
        [](const boost::system::error_code& error) {
            if (error)
            {
                std::cout << "Redis server setup error: " << error.to_string() << std::endl;
            }
        }
    );
    thread = std::thread([&io_context] {
        std::cout << "RedisGlobalCache running" << std::endl;
        io_context.run();
        std::cout << "RedisGlobalCache finished" << std::endl;
    });

    SetKey("key1", "value1", connection, io_context).get();

    asio::post(asio::bind_executor(io_context.get_executor(), [&connection] { connection.cancel(); }));
    thread.join();
    return 0;
}

Explanation:

You can think that your std::thread "owns" the io_context and any object within it. All Redis communication is going to happen using this dedicated thread. Communication with your main thread is going to use std::future, which is thread-safe.
SetKey returns a std::future, which replaces your semaphore. It can communicate values and exceptions back to your code, which you will find useful when implementing the "get" part of the cache. We use std::future<std::size_t> because async_execute has handler signature void(error_code, std::size_t).
Posting and dispatching to the io_context from any thread is safe. We need to do it because initiating an async_execute in a thread that is not running the context is a race condition.
asio::consign is a special completion token that is used to keep things alive until an async op finishes. This is telling "please keep request and response alive until async_execute completes" (a requirement of Boost.Redis).
asio::deferred is used here to create an async chain. Read this as the .then() function in Javascript: first dispatch to the context, then execute the operation.
asio::use_future is a special completion token that is used for this kind of patterns. It runs an async operation, and when it finishes, it sets the value of a future instead of calling a callback. Note that, if the operation fails, an exception is thrown (there are ways to prevent this, let me know if you're interested).

Note that async_run should technically be wrapped in an asio::dispatch call, too.

Thanks for the thorough response! It makes sense now. Two quick follow up questions:

Can the post be simplified to: asio::post(io_context, [&connection] { connection.cancel(); }); ?
Unfortunately the code I am working with does not support exceptions, if you could show a simple example that uses the error codes instead that would be awesome!

Please feel free to close this issue after your response too, I hope this was the right forum to ask these clarifying questions! Thank you

It will boil down to the same thing at the end of the day, but there are some technical differences that you must be aware of. asio::post(io_context, [&connection] { connection.cancel(); }); first posts to the io_context, then dispatches to the callback's associated executor. This is asio::system_executor, for which dispatch is just an inline, immediate completion, so you will observe no difference. However, in other scenarios you might observe differences, so I'd advise to stick to the bind_executor syntax. It's longer, but it won't cause you any nasty surprise.
1a. The difference between post and dispatch is that dispatch may call the function you pass inline, while post forces always a reschedule. You usually do dispatch when you just want to run a function in a context, and post when you want to force the reschedule to prevent recursion from overflowing your stack. In your case, both will do the same, because you're calling them from outside of the thread running the I/O context. In general, dispatch may be faster than post. dispatch probably captures better what you're trying to do than post.
You probably want to use asio::as_tuple. For instance:

std::future<std::tuple<error_code, std::size_t>> SetKey(
    std::string_view key,
    std::string_view value,
    boost::redis::connection& connection,
    boost::asio::io_context& io_context
)
{
    // clang-format off
    auto request = std::make_shared<boost::redis::request>();
    request->push("SET", key, value);
    auto response = std::make_shared<boost::redis::response<std::string>>();
    return boost::asio::dispatch(boost::asio::bind_executor(
        io_context.get_executor(),
        boost::asio::deferred([&connection, request, response]() {
            return connection.async_exec(
                *request,
                *response,
                asio::consign(asio::as_tuple(asio::deferred), request, response)
            );
        })
    ))(boost::asio::use_future);
    // clang-format on
}

BTW I'm not the maintainer of Boost.Redis so I can't close it :)
I think this forum is correct, we also have the #boost-asio channel in the cpplang slack for Asio questions.

Thank you!


Expected parent IDs to be set when ordering by parent ID.

Hi Prisma Team! My Prisma Client just crashed. This is the report:
Versions

Name
Version

Node
v18.16.0

OS
darwin-arm64

Prisma Client
in-memory

Query Engine
6a3747c37ff169c90047725a05a6ef02e32ac97e

Database
mysql

Logs
prisma:client:libraryEngine requestBatch
prisma:client:libraryEngine library starting
prisma:client:libraryEngine sending request, this.libraryStarted: false
prisma:client:libraryEngine library already starting, this.libraryStarted: false
prisma:client:libraryEngine sending request, this.libraryStarted: false
prisma:client:libraryEngine library already starting, this.libraryStarted: false
prisma:client:libraryEngine library started

Client Snippet
npx prisma studio

Schema
model Company {
  id                 String      @id @unique @default(cuid())
  name               String
  phone              String
  email              String
  address            String
  city               String
  state              String
  zipCode            String
  processingFee      Float
  createdAt          DateTime    @default(now())
  updatedAt          DateTime    @updatedAt
  users              User[]
  projects         Project[]
}

Prisma Engine Query
{"X":true}}}}}

Uh interesting, Studio crashing like that is unexpected.
Does this happen just when you open Studio, or when you open a specific model in there?
Can you share the data of the underlying table (and related tables)?

@jacobcwright Did you see the message from @janpio? Without additional information to be able to reproduce, we would later close this issue as part of our issue process.

Hey @jacobcwright, without your input we cannot move this issue forward, so I am closing it. Please provide us with the missing information so we understand how to treat this, and we will happily re-open it. Thanks.


JS demo is not working

I tried to run the latest index_jsdemo.js in local and share the web session.
I am able to start the local server , the QR code that got generated is not valid to start the web session sharing. Any idea??

You need to update Whatsapp Web version to "0,4,2081".

Here the version is already 0,4,2081
WHATSAPP_WEB_VERSION="0,4,2081"
But the QR code isn't readed on JS Demo. Same problem here.

same


Using ChoicePrompt in Designer with SuggestedActions causes broken buttons

Version
Adaptive
Describe the bug
When using the ChoicePrompt in Designer, only the first two choices will display properly when rendered as SuggestedActions.
This ChoicePrompt definition:
    {
      "$type": "Microsoft.ChoiceInput",
      "$designer": {
        "createdAt": "2019-06-12T19:50:23.410Z",
        "updatedAt": "2019-06-18T16:16:27.430Z",
        "id": "546453"
      },
      "property": "turn.menuchoice",
      "outputProperty": "",
      "prompt": "Here are my main functions:",
      "retryPrompt": "PLEASE PICK ONE!!",
      "style": "SuggestedAction",
      "choices": [
        {
          "value": "craft item"
        },
        {
          "action": {},
          "value": "list inventory",
          "synonyms": []
        },
        {
          "action": {},
          "value": "demo"
        },
        {
          "action": {},
          "value": "tests"
        }
      ]
    }

Results in this message in emulator:

[bug]

Additional issues with ChoicePrompt:

When set to "Auto", the prompt fails completely and returns "Object reference not set to an instance of an object."

When set to "Hero Card", the prompt renders as an error:

@luhan2017 tried to reproduce and apparently this was fixed with the input rewrite. @benbrown please reopen if you experience issues after you take a snapshot of the latest changes.


hi, we use custom data. But make failed by NEUS's guidance.

[ 50%] Building CXX object CMakeFiles/calibration.dir/calibration.cpp.o
[100%] Linking CXX executable calibration
/usr/bin/ld: cannot find -lcnpy
collect2: error: ld returned 1 exit status
CMakeFiles/calibration.dir/build.make:137: recipe for target 'calibration' failed
make[2]: *** [calibration] Error 1
CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/calibration.dir/all' failed
make[1]: *** [CMakeFiles/calibration.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

say thanks to me, and follow me.     (if you still can not reconstrcut your object, please feel free to mail me<EMAIL_ADDRESS>

before step by step,  some tips about how to solve problem without friendly help, like me.
a) find similar projects,  similar camera pose computing.   in nerf, almost all of them used colmap, excepts a few camera-pose-free algorithms, such as:  nope, four, nerf--, etc.
b) from the classical implementation, you can find some branchs, that means there are many many researcher forked and modified, including this type of data-preprocessing issue.

step by step
a) install colmap, you can download and install windows version, I will copy my steps, at the end of this answer.
b) download that 'DOG' data from https://github.com/xrr-233/Textured-NeuS.   ([think back my suggestion #0, almost all of problems have been resolved by others.)
c) copy code,  under preprocess_custom_data, from https://github.com/xrr-233/Textured-NeuS.
d) run two steps:  *.py.
e) bingo. :-)

0.txt

@yuedajiong. Thanks for your help. I will try by your steps.


cuelang.org: new language guide

Placeholder issue for the new language guide announced as part of the CUE Community Call #1
Please subscribe for further updates.

WEB DEV USE: (INTERNAL ONLY)
Layout Name and Figma Link:
Associated Linear issues (if applicable):
Website Components needed:
Other considerations:
Content Copy (if available): (link)


[RDNA3_EMU][1/n] Add new compile_hip function to generate llvm bitcode + asm

For testing purposes we want to create asm to ingest into the rdna3 emulator. By using different hiprtc functions and a new flag (hiprtcGetBitcode, hiptrtcGetBitcodeSize, and -fgpu-rpc) we can generate llvm IR bitcode.
We can then use llc -o  to create proper  AMD assembly.
I've modified the test to use this multi-step hip compilation so we can ingest the asm into the emulator.
Next steps include parsing the assembly and obviously emulating the rdna3 ISA.

This has changed to use comgr. Feel free to resubmit if there's something you want from this.


Add default rustfmt

Adding rustfmt.toml will format the code on each system with the same setttings.

Thanks for the PR!  I’ll add a target for executing rustfmt to the Makefile and then merge this PR.


Scale zero to one values jumps instead of animating

Describe the bug
Scale values in 0-1 range are not animating properly.
To Reproduce
Steps to reproduce the behavior:

Create an element
Style it to have transform: scale(0)
Run anime({ target: el, opacity: 1, duration: 100 })
Here's the simplest reproduction example: https://stackblitz.com/edit/js-afgrcn?file=index.js (Added translation as well so you can see that anime is running correctly, just not the scale)

Expected behavior
Smooth scale animation from 0 to 1
Desktop (please complete the following information):

OS: Mac OS
Browser: Chrome
Version: 104

Opacity does seem to work fine without any issues I could find.
But with scale I do have to either use scale: [0, 1] or scale: "100%" before it behaves properly.

@different55 Strange, I've had the issue in my app with opacity as well but now I can't replicate it. Changed the issue to be about the scale only. Thanks for the workaround!

Maybe it's because it's not animating based on transform, but a standalone property scale: https://css-tricks.com/almanac/properties/s/scale/ (based on a different system I guess)

I believe it is using transform, if you remove translateX from your example animation your circle vanishes as anime.js stops overriding the transform value.
Diving just a tiny bit deeper into things, it looks like when setting "scale: 1" then the tween has both from and to set to "1". But if you set it to 100%, then from is "0.2777777777777778%". Maybe the initial value is somehow being read as some random unit? 0.27778 is 20/72, the kind of number I'd expect from some weird CSS/font unit shuffling.

This is a limitation of anime regarding parsing CSS transforms. Anime will look for inline styles to get pre-defined CSS transforms values, if none has been set, it will use default values (in the case of scale it’s 1).
To set the from value to 0, you can either set the scale via js first:
anime.set(el, {scale: 0});
or use the from to array syntax:
anime({
  targets: el,
  scale: [0, 1]
});

I’ve been thinking of adding a more robust way to parse predefined CSS transform values for a while, but the amount of code needed to achieve a solid transform matrix parser is enormous, and I don’t think it’s worth doubling the size of the library for a single use case that is already easily solvable.


vhost-vdpa: fix DeviceInfo file content

This PR fixes an issue in the DeviceInfo file generation for vhost-vdpa devices.
For details please check the following issue:
https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/issues/492

@SchSeba @bn222 Can you please have a look and merge if looks good to you?

@bn222 AFAIK there is no error condition to be handled at the call site. Let's say, if a path is returned, it'll be used to fill some structs, otherwise an empty path will be stored instead. The glog.Infof is just for convenience.

It seems to me that whenever this function returns "", it was due to it being called on something that doesn't have this path, i.e. it should not have been called on it the first place?

Added error handling for GetPath function

/lgtm

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

18 of 30 (60.0%)  changed or added relevant lines in 3 files are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.2%) to 78.223%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/infoprovider/vdpaInfoProvider.go
2
5
40.0%

pkg/devices/vdpa.go
0
4
0.0%

pkg/netdevice/netResourcePool.go
16
21
76.19%

Files with Coverage Reduction
New Missed Lines
%

pkg/netdevice/netResourcePool.go
3
79.52%

Totals

Change from base Build<PHONE_NUMBER>:
-0.2%

Covered Lines:
1954

Relevant Lines:
2498

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

18 of 30 (60.0%)  changed or added relevant lines in 3 files are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.2%) to 78.223%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/infoprovider/vdpaInfoProvider.go
2
5
40.0%

pkg/devices/vdpa.go
0
4
0.0%

pkg/netdevice/netResourcePool.go
16
21
76.19%

Files with Coverage Reduction
New Missed Lines
%

pkg/netdevice/netResourcePool.go
3
79.52%

Totals

Change from base Build<PHONE_NUMBER>:
-0.2%

Covered Lines:
1954

Relevant Lines:
2498

💛  - Coveralls


DDT-1265: Add references to event_cache

Signed-off-by: Niels Thykier<EMAIL_ADDRESS>

Obsolete, fixed differently


Remove imodel-bridge

We're separating the imodel-bridge package from imodeljs mono repository as we're migrating to the new independent repository that will soon be available at https://github.com/iTwin/connector-framework. This only affects 3.0 and the imodel-bridge package under 2.x will continued to be maintained.

Also please update the CODEOWNERS file, remove the files from common/api and common/api/summary, and clean up  the common/changes/@bentley/imodel-bridge.


Provide different wrappers for the Breakout environment

Currently, the default observation space is the following gym.spaces.Dict:
observation_space = Dict({
    "ball_x": ...,
    "ball_y": ...,
    "ball_dir": ...,
    "paddle_x": ...,
    "bricks_matrix": ...
})

The package should provide some gym.core.ObservationWrapper like:

encoder from dictionary to integer
everything but the brick matrix
differential state space (only the difference between ball_x and paddle_x

PR #3 addresses the first two points. BreakoutS is missing (the lightweight state space)


please document community support for perl

Hi,
I notice you have a section in the README for community supported languages.
You might want to add perl to that list, referencing https://metacpan.org/pod/Wasm::Wasmtime

Thanks for the heads up! Would you be up for sending a PR to update the README?

Thanks for the encouragement but no: Due to Github questionable terms of service I only ever use their issue trackers, never push code.
I am happy to setup a git clone with a commit that you can pull, but I suspect that's more work for your (don't mind my investment in my odd principles) than simply writing that one-liner edit yourself. :-)

This was done in https://github.com/bytecodealliance/wasmtime/pull/6880, so closing.


Add "migration" guide from D1.0 > D2.0

Description
We'll have (hopefully) a lot of users transitioning from Dashboard 1.0 to 2.0, and should have an explicit page on the documentation to detail where some things have moved from/to.
Epic/Story
No response
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate

First draft pushed in #283
Closing for now and further work will be done with individual node/widget updates.


Revert android onLoadStart event and remove cachePath

Details

https://github.com/Expensify/react-native-fast-image/pull/5
Upstream has been merged, it has reverted onLoadStart and removed cachePath, so we update the corresponding version
Fixed Issues

$ https://github.com/Expensify/App/issues/16046
$ https://github.com/Expensify/App/issues/16046#issuecomment-1477726116
Tests

Send 1 picture
Send 3 PDF files
Click the picture to preview
Switch between 4 files
When switching to the picture, verify the picture will not always display loading forever

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

Same as others

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

https://github.com/Expensify/App/assets/20135674/f7c9a1b2-8d74-419d-807c-918ee068c151

Mobile Web - Chrome

https://github.com/Expensify/App/assets/20135674/969f7e53-6d37-44d5-a6ca-fac4dde8ac9b

Mobile Web - Safari

https://github.com/Expensify/App/assets/20135674/e88c3c9d-ebcc-4434-a7e7-abdb7a1f9796

Desktop

https://github.com/Expensify/App/assets/20135674/68c4c40a-d0fb-4bf6-a898-9581510ae5cd

iOS

https://github.com/Expensify/App/assets/20135674/333cd0ab-fc00-4676-9bcd-03c58b81bfd3

Android

https://github.com/Expensify/App/assets/20135674/9a0b10b3-ea56-44cb-a2b9-3e15a8e17402

PR merged on react-native-fast-image

@hellohublot Could you resolve the conflict? Thanks!

@danieldoglas  Hello, this PR https://github.com/Expensify/App/pull/19021 reverts Expensify/react-native-fast-image to react-native-fast-image.patch, so I can't simply resolve the conflict

We can modify react-native-fast-image.patch, but I prefer to use Expensify/react-native-fast-image and avoid using patch

We only revert  https://github.com/Expensify/react-native-fast-image/commit/2cc218a23f959eaa44d298fb836a6c1fee7c646b, but not all, and then we continue use Expensify/react-native-fast-image

Hey @danieldoglas, tbh I'm not sure why I was tagged here. But it sounds like removing our fork is an option here?

@mountiny @danieldoglas   Yep, I'm not sure whether to use a patch or a fork, so asking for reviewer's opinion

But I see upstream has not been maintained for a long time
And image loading is a very important part of the App, maybe there will be many changes in the future
Looks like https://github.com/Expensify/react-native-fast-image/pull/6 wants to fix the regression caused by the disableTransformation

So I still recommend using Expensify/react-native-fast-image to avoid using patch, maybe we can wait for https://github.com/Expensify/react-native-fast-image/pull/6 first

@hellohublot I agree with your reasoning
@danieldoglas I think its worth waiting/ making another Pr for to our fork to get this feature cleaned up

Ok. @hellohublot let's wait until https://github.com/Expensify/react-native-fast-image/pull/6 is merged, then let's go back to our own fork with the changes we've merged in your previous PR.


Bug in SpeechBubbles

The SpeechBubble offset is broken due to an incorrect property name in ClientAPI script. Line 63 reads
SpeechBubbles[npc].StudsOffset = properties.StudsOffset
but the property name in the Settings script on line 21 is SpeechBubbleStudsOffset
SpeechBubbleStudsOffset = Vector3.new(0,4,0); -- Replace this with how far you want the speech bubble to be from the NPC's head. Measured in studs. [accepts Vector3]
This causes the the ClientAPI to throw an error "expects Vector3, got nil" or similar.  Changing the reference to the correct property in ClientAPI fixes this problem:
SpeechBubbles[npc].StudsOffset = properties.SpeechBubbleStudsOffset

Thank you! I'll check this out when I get home.


References to embedded document collections

I'm not sure if this is officially supported by Doctrine, since it is not documented, but it works - with an error notice.
For example, if I have documents A and B where document B has an embedded document, E, I can design the mapping as follows:
/** @Document */
class A {
    /** @ReferenceMany(targetDocument="B", mappedBy="foo.bar") */
    private $whatever = [];
}

/** @Document */
class B {
    /** @EmbedMany(targetDocument="E") */
    private $foo = [];
}

/** @EmbeddedDocument */
class E {
     /** @ReferenceOne(targetDocument="A", inversedBy="whatever") */
    private $bar;
}

However, reading A::$whatever generates the following notice:

Notice: Undefined index: foo.bar in mongodb-odm/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php on line 709

Despite this, the document collection is retrieved correctly.

Imagine thinking anyone cares about design flaws.

Imagine thinking anyone cares about Open Source being a joint effort.

Imagine thinking open source means other people work for you for free.


Reverts #1296 "Makes computeDepth take linear time"

There was a bug in the assumptions of #1296, as it treated depth and height as
having a 1-1 relationship. This is only true with balanced trees. For example,
consider the following tree:
  A
 / \
B   C
     \
      D

In this tree, B has height 0 and depth 1 while D has height 0 and depth 2. So
the graph will be laid out weirdly if we compute the depth of B and D by
subtracting their heights from the height of A.
There seems to be another bug in the implementation that can actually throw
B off of the graph, but I'm not sure exactly why that was happening.
This should address #1301.

Thanks @daveFNbuck

I now see what the second bug is. If you get the depths wrong, the second traversal gets them right and never sees the claimed height. So xOrder never gets set and we end up with a bunch of invalid operations that prevent the node from being placed properly. So it's all just the one bug.


[Core] GDNative construct_object now also returns the extension instance

So that extended classes can be safely created via gdnative. See https://github.com/vnen/godot-cpp/pull/33 for details

Turns out we don't actually need this, and it can already be done with the current API. See: https://github.com/vnen/godot-cpp/pull/33#issuecomment-926974106


Due to inconsistencies with installing Office 2013 from disk vs installing from MSI, change how launching apps works to be based on a Registry key to run the most recent version launched.

Basically, Office has a Registry key here: HKEY_CLASSES_ROOT\Word.Application\CurVer
That key refers to the "current" version of Word installed on the user's computer. This also means that the Options window will not be as required as it currently is. Also, if the Options window is not as necessary, the only stuff it would have is probably customization such as themes and anything else.
http://stackoverflow.com/a/27870476

Here's a page that has an image showing a registry key that exists if Office 365 was used to install Office:
http://windowsitpro.com/microsoft-office/determining-if-office-installation-click-run-or-not

I found a registry key that might be more reliable!

This is the registry key for Office 2013 via Office 365.

Actually, just make the Office 365 checkbox disabled if the dropdown box .Text property is Office 2013 when the dropdown box .TextChanged event fires. When it's disabled, another checkbox will be shown below the Office 365 checkbox that says, "I installed via MSI." Have the tooltip for the MSI checkbox describe the purpose of that checkbox and why it's necessary. Also, make sure to add code to the OfficeLocater.vb file just for Office 2013 Click-to-Run.


Adding the except block in an endpoint

## Current Behaviour
in main.py adding the except block in an endpoint
Can you reproduce the bug
yes i will add the except block
Can you fix the bug by yourself?

[x] YES
[ ] NO

@ighoshsubho please assign it to me

Sure @filza2112 go ahead! ;)

@ighoshsubho please check my PR #336


Tests for /articles/feed/

I'm looking this issue ;)

Sorry! I have no time to see this issue in this week. I will try in the next week :)

Someone doing this?

@paulsmal I don't think so, go ahead if you want

Guys, migrating this to new repo -> https://github.com/gothinkster/elixir-phoenix-realworld-example-app/issues/1


'Decoded' object has no attribute 'rect'

Results of reading a barcode
Decoded = namedtuple('Decoded', ['data', 'type'])
in pyzbar/pyzbar.py

I have same problem. Any solution ?


could SQL node show the HIVE MR progress logs

*For better global communication, please give priority to using English description, thx! *
Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.
Describe the question
A clear and concise description of what the improvement is.
could sql node show the MR progress  ,tks
What are the current deficiencies and the benefits of improvement

A clear and concise description of the current deficiencies and the benefits of this improvement.

Which version of DolphinScheduler:
-[1.3.2]
Describe alternatives you've considered
A clear and concise description of any alternative improvement solutions you've considered.

show process log on the UI or something else?

logs screen

does not the show MR logs
can we show the logs like

Everyone can discuss whether this requirement can be done ,or who is willing to realize it

logs page

it does not the show MR progress logs
can we show the logs like

@dailidong

as far as I know, SQL node can not show the processing log, because the server side not return the process through jdbc interface.  please correct me if I am wrong

logs page

it does not the show MR progress logs
can we show the logs like

@dailidong

as far as I know, SQL node can not show the processing log, because the server side not return the process through jdbc interface.  please correct me if I am wrong


Update TFLite concrete function conversion codes to have the associat…

…ed trackable object.
Providing trackable objects is now recommended for the users. This makes the
concrete function conversion API be based on the new SavedModel importer, which
will enable new TensorFlow Lite features including variable support, resources
and variant tensor, and signature concept.

@marcvanzee PTAL

LGTM


[#noissue] Adjust the y tick label nicely

Codecov Report

Merging #5690 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5690      +/-   ##
==========================================
+ Coverage   40.58%   40.58%   +<.01%
==========================================
  Files        2908     2908
  Lines       87408    87408
  Branches    11550    11550
==========================================
+ Hits        35473    35475       +2
+ Misses      48858    48856       -2
  Partials     3077     3077

Impacted Files
Coverage Δ

...vercorp/pinpoint/rpc/packet/ClientClosePacket.java
55.55% <0%> (-11.12%)
:arrow_down:

...p/pinpoint/rpc/stream/StreamChannelRepository.java
75% <0%> (-10%)
:arrow_down:

...ofiler/sender/StandbySpanStreamDataSendWorker.java
80.59% <0%> (-2.99%)
:arrow_down:

...orp/pinpoint/rpc/server/DefaultPinpointServer.java
79.22% <0%> (-1.06%)
:arrow_down:

...point/rpc/client/DefaultPinpointClientHandler.java
72.4% <0%> (+0.32%)
:arrow_up:

...om/navercorp/pinpoint/rpc/codec/PacketDecoder.java
59.57% <0%> (+2.12%)
:arrow_up:

...cluster/zookeeper/ZookeeperClusterDataManager.java
64.7% <0%> (+2.2%)
:arrow_up:

...navercorp/pinpoint/rpc/common/SocketStateCode.java
85.36% <0%> (+2.43%)
:arrow_up:

...p/pinpoint/rpc/client/WriteFailFutureListener.java
75% <0%> (+18.75%)
:arrow_up:

Continue to review full report at Codecov.

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


fixing as latest : github:foundry-rs/forge-std#main

github:foundry-rs/forge-std#main

I dont understand why did you closed this ser?


TypeError: String.prototype.concat called on null or undefined (v0.6.1)

Describe the issue
Seeing the following error on v0.6.1. Code was previously working on v0.6.0 and earlier versions
TypeError: String.prototype.concat called on null or undefined
    at concat (<anonymous>)
    at transformFile.next (<anonymous>)
    at run.next (<anonymous>)
    at transform.next (<anonymous>)

I was able to narrow it down to this new null check added in v0.6.1:
https://github.com/facebook/stylex/blob/c48bea12d3f4109a0b6bcce7c68c807972c16620/packages/babel-plugin/src/utils/evaluate-path.js#L693
In our case, we hit the following condition first (isStringLiteral is true)
https://github.com/facebook/stylex/blob/c48bea12d3f4109a0b6bcce7c68c807972c16620/packages/babel-plugin/src/utils/evaluate-path.js#L683-L691
^ which defines func as the string concat function but context remains undefined.
As a result, calling func later results in TypeError: String.prototype.concat called on null or undefined being thrown because context is undefined.
https://github.com/facebook/stylex/blob/c48bea12d3f4109a0b6bcce7c68c807972c16620/packages/babel-plugin/src/utils/evaluate-path.js#L725
I was able to workaround this by setting context to val. Reverting the null check also works but unsure which is the correct solution.
Expected behavior
No errors when compiling valid code.
Steps to reproduce
See issue description.
Test case
No response
Additional comments
No response

Could you share the code that is causing the error? The null check was needed for some other edge-cases we ran into.

I have the same issue after updating. I updated from 0.4.1 to 0.6.1. I didn't try other versions. I can try to create a test case in 2 weeks if needed.

@adrian-novacescu Would you be willing to share a minimal repro? Ideally, start removing all the StyleX styles from your project until you find the root cause of the problem.
Thanks! (Sorry I was away for a couple of weeks)

@nmn, I will try to do it until Friday. Worst case scenario I will do it during weekend.

Unfortunately I didn't have the chance to work on it and the next couple of weeks seems to be extremely busy. Sorry for that. I will notify you as soon as I can do it :(.

@adrian-novacescu If you can even share the last few files where you used StyleX I might be able to find the root cause.

@nmn  in my case code below throws same error when I use storybook
import * as stylex from "@stylexjs/stylex";

export const spacing = stylex.defineVars({
    3: '12px',
});

const styles = stylex.create({
    optionBase: {
        padding: `0 ${spacing['3']}`, // this line
    },
});

@nmn sorry it took me so long but I was full until now. I added a zip here that contain a test case where this can be reproduced. From what I see, it doesn't matter where the values are defined. As long as we use template literals for concatenating, it will fail. With normal string concatenation it works ok.
In the same test case I added another issue. I tried to use dynamic styles or variables for media queries but in this case I get: Only static values are allowed inside of a stylex.create() call.
All you need is to uncomment the code from index.tsx and run yarn production to reproduce that.
stylex.zip

According the minimal reproduction. I got the code before pipe to stylex compiler.

AFAIK. dynamic style only support arrow function expression. And the attribute padding isn't a valid token. So cause the error translate. So i disable the @babel/preset-env in your local babel.config.js  and i got the right code for stylex.

@nmn Did you think it's a bug or a configuration error? For the attribute padding i think it's a wrong conversion.

About StringLiteral being converted i'll take a look.

About babel configuration. I think we can add a document that describes its behavior to help users avoid incorrect configurations.

Thanks for understanding and then fixing this issue @nonzzz !


dts: stm32f1: fix UART4 define

fix stm32f1 UART4 define in dst.fixup
Signed-off-by: chen<EMAIL_ADDRESS>

Codecov Report

Merging #10400 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #10400   +/-   ##
=======================================
  Coverage      53%      53%
=======================================
  Files         210      210
  Lines       25732    25732
  Branches     5672     5672
=======================================
  Hits        13639    13639
  Misses       9779     9779
  Partials     2314     2314

Continue to review full report at Codecov.

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


Losing superadmin rank on join

I get this too sometimes but it's because of it not capturing your steam id and using your IP as an identifier.
That's my theory though.

Of course, if you have another id, the issue is an identification problem, but in this case, it's the same identification, with the rank being lost.

Should be fixed.