Error on convert ContractId instance to Solidity Address

I am receiving an error when converting a ContractId instance to the Solidity address
code snippet that emits the error:
const contractAccount = ContractId.fromString(contractHederaAddress)
const contractAddress = contractSpenderAccount.toSolidityAddress()

Error Message:
TypeError: First argument to DataView constructor must be an ArrayBuffer
    at new DataView (<anonymous>)
    at ContractId.toSolidityAddress (/home/user/hashgraph/hashgraph/js/node_modules/@hashgraph/sdk/lib/contract/ContractId.js:56:22)

Checking the "toSolidityAddress" function use in the "AccountId"  they generate a Uint8Array and pass to DataView constructor the buffer.buffer param,  on the "ContractId" they just pass the buffer, and throw the error just a little fix resolve that
AccountId:
    toSolidityAddress() {
        const buffer = new Uint8Array(20);
        const view = new DataView(buffer.buffer, 0, 20);
        view.setUint32(0, this.shard);
        view.setUint32(8, this.realm);
        view.setUint32(16, this.account);
        return hex.encode(buffer, true);
    }

ContractId:
    toSolidityAddress() {
        const buffer = new Uint8Array(20);
        const view = new DataView(buffer, 0, 20);
        view.setUint32(0, this.shard);
        view.setUint32(8, this.realm);
        view.setUint32(16, this.account);
        return hex.encode(buffer, true);
    }

Thanks for reporting the issue. Fixed in 24ecd543e754a7e750b1c7c974f424bf922e827f.


Add boundary check before accessing os.Args[1]

!!!Outdated!!!
calledByAlias(cmd *cobra.Command) compares os.Args with cmd.Aliases to check if the command is called by its alias. Note that commands like kubectl -f replace update or kubectl -f update replace can fool calledByAlias(). Because this function will be removed when deprecated aliases are removed, I think it's good enough for now.
Fixes #10572.
@krousey @bgrant0607

Why don't all calls to printDeprecationWarning have the same issue?

The issue with RunReplace is that when it's called from tests, there is no os.Args, so it's an index out of bound error. For rolling-update, there is no test directly calling RunRollingUpdate.
Shippable doesn't catch this because unit tests are called with -test.timeout=120s

Why not check os.Args length?

By "all calls", I meant:
https://github.com/GoogleCloudPlatform/kubernetes/blob/5520386b180d3ddc4fa7b7dfe6f52642cc0c25f3/pkg/kubectl/cmd/apiversions.go#L44
https://github.com/GoogleCloudPlatform/kubernetes/blob/b84826ee2301b43ae5f60cbe22bdede567bd71e4/pkg/kubectl/cmd/clusterinfo.go#L50
https://github.com/GoogleCloudPlatform/kubernetes/blob/5520386b180d3ddc4fa7b7dfe6f52642cc0c25f3/pkg/kubectl/cmd/log.go#L86
https://github.com/GoogleCloudPlatform/kubernetes/blob/5520386b180d3ddc4fa7b7dfe6f52642cc0c25f3/pkg/kubectl/cmd/scale.go#L69
https://github.com/GoogleCloudPlatform/kubernetes/blob/0f1c4c25c344f70c3592040b2ef092ccdce0244f/pkg/kubectl/cmd/run.go#L74

In particular, log does:
	if len(os.Args) > 1 && os.Args[1] == "log" {
		printDeprecationWarning("logs", "log")
	}

That will miss the cases like kubectl --api-version=v1 update....

Other calls to pringDeprecationWarning don't have the same issue because of a bunch of coincidences:
apiversions.go, clusterinfo.go, run.go and scale.go do not have unit tests to trigger the issue;
In exec.go, the code does not check os.Args[1] before printing deprecation warning;
In log.go the code checks len(os.Args) before referencing os.Args[1].
I pushed a second commit to replace other references to os.Args[1].

Did you look at maybe doing this the the cobra API? Maybe
func callByAlias(cmd *cobra.Command) (string, bool) {
	if !cmd.HasParent() {
		return "", false
	}

	args := cmd.Parent().LocalFlags().Args()
	if len(args) > 0 && cmd.HasAlias(args[0]) {
		return args[0], true
	}

	return "", false
}

I have no idea if that would work, by the way.
Also, your builds are failing because you second commit didn't remove the import of os when you removed the only use of it. Running goimports on them should fix it.

cc @jlowdermilk @deads2k

@krousey, unfortunately it doesn't work. There is no flag set for the parent command

Is this one getting in? Without this PR, a manual go test in k8s folder will fail.

I don't like all the false positives, but it's better than panicing the tests.
LGTM

@lavalamp @dchen1107, could you give an ok-to-merge? @bgrant0607 is not available for review now.
Without this PR, go test without arguments will panic.
I've created issue #10586 to revert this change once we remove all deprecated kubectl commands, so this is just a temporary solution.

@lavalamp @krousey, now it's a simple boundary check and it fixed go test panics. PTAL. Thank you!

@lavalamp @krousey, may I get a LGTM? Thanks!

accidentally click on the "close and comment" button

@lavalamp @bgrant0607 I think this is low risk and should go in as it prevents a panic when running go test without args. Any objections to adding the ok-to-merge label?

LGTM... It's probably worth merging. I'll let Brian apply the label if he agrees.

Please cherrypick into the release branch.

cc @erictune for merge

I'm not merging any code until Jenkins is green for a turn.

What do you mean? Jenkins is green.


CSHARP-989 Fix writetime support in LINQ

Integration test and fix on top of #581

Just fyi @bastianeicher had to change the return type of the function to long because that's what the DB returns.


flag provided but not defined: -js   in hakrawler

plz fix it

also have same issue
flag provided but not defined: -js

I thought you installed it using apt repository which includes old version. So in order to install the latest version you should install it using GO  .Well that resolves your issue


Media: add video and gif autoplay options (#268)

Add two options to autoplay videos and animated GIFs image.
Resolving #268
This PR need be considered as work in progress, as videos are played as soon as the the 'TweetVideo' object is instanced, before it's visible on the screen.
This should be reworked to make the playback start when the media is in the center of the screen and stop when out of screen.

I think this is going to be very tricky. I recently stopped all TweetVideo widgets from initialising the videos as soon as they're loaded, as I wasn't able to get Flutter to dispose the video_player widgets when they disappear off of the screen. I replaced them with a "tap-to-load-and-play" widget, rather than just "tap-to-play".
In a scenario where a user is scrolling through their feed, they might end up with hundreds of initialised, but un-disposed videos, which eventually ends up breaking the underlying video library (too many handles or something, I guess).
Flutter does have the concept of widget "keepalives", which should solve this, but I fiddled with it quite a bit over the past year or so, and was never able to get the videos to consistently dispose once they disappear off the screen (or at least consistently enough that they wouldn't brick the video library).
I'm happy to try and help at any point with this though, if you're running into anything fiddly!

Have you looked into using RecyclerView?


Fix: moved popover menu max width from menu item into context menu item component

Details

This PR moves the popover max width (375px) added as a result of this PR, out of the MenuItem component and moves it into the ContextMenuItem component. The MenuItem component is being used at a lot of places and adding a maxWidth to it directly turned out to be a bad idea.
Fixed Issues

$ https://github.com/Expensify/App/issues/17601
PROPOSAL: https://github.com/Expensify/App/issues/17601#issuecomment-1513569355
Tests

Login any account
Go to Settings
Verify that the right arrow is not spaced abruptly.
Go to any report and try to open the context menu.
Verify that the context menu is not spaced abruptly.
Right click any link.
Verify that the URL to be copied appears in the context menu and the menu itself doesn't exceed the width of 375px.

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

Offline tests

N/A
QA Steps

Login any account
Go to Settings
Verify that the right arrow is not spaced abruptly.
Go to any report and try to open the context menu.
Verify that the context menu is not spaced abruptly.
Right click any link.
Verify that the URL to be copied appears in the context menu and the menu itself doesn't exceed the width of 375px.

[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 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 correct English and 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

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

@hayata-suenaga @s77rt One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

Since this PR is a follow up for a regression from https://github.com/Expensify/App/pull/17321 within the regression period I think @sobitneupane should review this.

This is linked to deploy blockers https://github.com/Expensify/App/issues/17731
And also the other issues mentioned above so I am reverting the original PR https://github.com/Expensify/App/pull/17739 to make sure we can deploy today

Conflicts

I was using the breakpoint incorrectly and have updated the code.

What changes did you made? You forced-pushed, so could not see the exact change. Did you test it in iPad?

Removed @s77rt as reviewer per this comment https://github.com/Expensify/App/pull/17640#issuecomment-1514190398

🚀 Deployed to staging by https://github.com/cead22 in version: 1.3.9-14 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.12-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


[BUG] 365 Learning Pathways Provisioning Issues

PROVISIONING NOTE: If you are having issues with the provisioning service while trying to provision M365 learning pathways please do not post that issue to this repo as we cannot help you here. Please post all questions and issues for the provisioning service to https://github.com/SharePoint/sp-dev-docs/issues.

Describe the bug
We tried to provision the 365 Learning Pathways in our PROD and we ran into provisioning error immediately once we click the "Add to your tenant". The person who tried provisioning has logged in to their global admin account and also has administrator permissions in the Tenant App Catalog.
To Reproduce
Steps to reproduce the behavior:

Sign into tenant as tenant admin.
Go to the Microsoft 365 learning pathways solution page: https://provisioning.sharepointpnp.com/details/3df8bd55-b872-4c9d-88e3-6b2f05344239
Click Add to your tenant. The very first time when we tried , it did asked for "Consent on behalf of the organization to provision the app" .
We did not get the screen to provide consent when we tried subsequent trials
See error -
Sorry, something went wrong. There was an unexpected issue. Please try again after a while.
Current site is not a tenant administration site.

Expected behavior
We should see the provision information screen which would get Email address, destination URL's and provision button to install the Learning Pathways into the Tenant App catalog
Screenshots
If applicable, add screenshots to help explain your problem.

Learning Pathways version number:
Please share the version number of learning pathways in your tenant app catalog.
https://provisioning.sharepointpnp.com/details/3df8bd55-b872-4c9d-88e3-6b2f05344239
Additional context
Add any other context about the problem here.

Per the note at the very top of the bug template: "Please post all questions and issues for the provisioning service to https://github.com/SharePoint/sp-dev-docs/issues."


Add support for non-flatten models structure

Examples:

TypeScript / Flow needs flatten entities.
Swift need recursive

Done in 0.2.1


Clean up old resources that are no longer present

What will clean up old resources that are no longer present in opentelemetry-demo.yaml? We could add --prune but it's (still) alpha. Or we could jump on the new hotness: https://kubernetes.io/blog/2023/05/09/introducing-kubectl-applyset-pruning/

Originally posted by @quentinmit in https://github.com/GoogleCloudPlatform/opentelemetry-demo/pull/50#discussion_r1580029325

This is blocked on https://github.com/GoogleCloudPlatform/opentelemetry-demo/pull/116 (because we use the sed command to replace gcloud_project), but once that is merged we can switch our deploy script to use helmfile and that should automatically prune old resources


Add config module to UI

There should be a concept of configuration that a user could change.
This would include the REST endpoint, available operations, blacklisted and whitelisted operations, as well as the Java class - javascript type conversion. This config should be made available in an angular service.

This feature was delivered as part of #233

If you don't configure a REST endpoint, the controller will assume that the Gaffer REST API is at the same address and port but with /rest/latest instead of /ui


Revert some gitlab permanent error checks introduced in PR #315 for simple build

Reverting some checks for gitlab permanent errors introduced in https://github.com/konflux-ci/build-service/pull/315 because the changes cause e2e tests failures in https://github.com/redhat-appstudio/infra-deployments/pull/3863:
2024-06-21T04:24:43.950Z	ERROR	ComponentOnboarding	controllers/component_build_controller.go:359	simple build submition for the Component failed	{"controller": "component", "controllerGroup": "appstudio.redhat.com", "controllerKind": "Component", "Component": {"name":"mc-golang-nodevfile","namespace":"rhtap-demo-huox-tenant"}, "namespace": "rhtap-demo-huox-tenant", "name": "mc-golang-nodevfile", "reconcileID": "310758b7-d68d-46aa-b6ce-76450c35c9bf", "ComponentGitSource": {"url":"https://github.com/redhat-appstudio-qe/devfile-sample-go-basic-dockerfile-only-private.git","dockerfileUrl":"docker/Dockerfile"}, "error": "GET https://api.github.com/repos/redhat-appstudio-qe/devfile-sample-go-basic-dockerfile-only-private: 404 Not Found [] No scope is found from response header. Check it from GitHub settings."}

The root cause is that siple build relying on the secret in component spec which is not counted in the recently added extra check.
Since simple build is deprecated and is rarely use and moreover with gitlab corner cases, it's safe to not to do the checks.

/test build-service


ci: patch installing pypesq

What does this PR do?
Seems CI broke over the weekend when trying to install dependencies:
https://github.com/Lightning-AI/torchmetrics/actions/runs/4773312959/jobs/8502645533?pr=1726
Numpy had a release on 22 April so timeline matches.
Trying to pin upper version.

Before submitting

[ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
[ ] Did you read the contributor guideline, Pull Request section?
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?

PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?
Make sure you had fun coding 🙃

switching to https://github.com/Lightning-Sandbox/python-pesq

as https://github.com/vBaiCai/python-pesq/pull/28 was merged we can keep original links


Fetch api

Implemented Project Requirements

Utilized the correct React hooks: Implemented useEffect and useState hooks for fetching data from the API and managing component state.
Connected to API within a functional component: Created a new functional component, QuoteDisplay, to fetch and display quotes from the API Ninjas Quotes API.
Displayed different UI outputs based on component state: Showed a loading state when fetching data, an error state when an error occurs, and the fetched quote when successful.
Created a new component for displaying quotes: Developed the QuoteDisplay component to fetch and display quotes alongside the existing Calculator component.
Imported the new component into the main component: Imported QuoteDisplay into App.js to display it on the same page as the Calculator.
Styled the quote display: Added extra CSS to make the quote display look good.

Please let me know if you have any questions or require any changes. Thank you!
To run this project:
npm install

npm start

Hello, dear reviewer.
While working on the project, I encountered an issue with the ESLint rule import/no-extraneous-dependencies. As per the initial configuration, importing devDependencies in the src folder was not allowed. However, I needed to import the axios library, which is a necessary dependency for this specific component.
the previous reviewer suggested a link with a solution to update the .eslintrc.json configuration to allow importing devDependencies in the src folder:
"import/no-extraneous-dependencies": ["error", {
  "devDependencies": ["**/*.test.js", "**/*.spec.js", "**/setupTests.js", "src/**/*"],
  "optionalDependencies": false,
  "peerDependencies": false
}]

I want to emphasize that I initially did not want to fix the issue this way, considering the guidelines about linters configuration. However, the previous reviewer pointed me to a link that offered this specific solution, as he believed it was the best approach. The suggested modification allowed me to proceed with the project without violating any style guidelines and maintaining the consistency of the codebase.
I have made sure that this change does not impact any other part of the project or violate any other style guidelines. This modification has been carefully considered and is crucial for the proper functioning of the component, as suggested by the previous reviewer.
I kindly request you to consider this explanation and allow this specific change in the linter configuration for the successful completion of the project, keeping in mind that it was a solution provided by a previous reviewer.
Thank you for your understanding.
Best regards,
Note: by saying this I am very thankful with the previous reviewer for giving me this option but at the same time I am not sure if it was the best approach. Could you please tell me something about that? Thank you very much.


Created index.html

created base html file for the index
page. no css or **js has been linked.

this is the final version
:)


Fix bug volume cloning is broken because of failing to revert snapshot

longhorn/longhorn#3886

@PhanLe1010 this probably should be backported to 1.2.x.


Empty block trap

See https://github.com/rakudo/rakudo/issues/1644
Basically:
$ = {say 42;} # Block
$ = {;}       # Block
$ = {…}       # Block
$ = { }       # Hash

Related doc issue: https://github.com/perl6/doc/issues/1380#issuecomment-377466698


using map instead

Signed-off-by: zounengren<EMAIL_ADDRESS>
What type of PR is this?
What this PR does / why we need it:
using map instead
Which issue(s) this PR fixes:

Special notes for your reviewer:
none

/LGTM
@zouyee welcome to join crane community 👍


Dynasty by Elephante unsupported.

Check if issue with swaglyrics or whether song lyrics unavailable on Genius.

stripper -> Elephante-Dynasty

done


Tall items can break the flow

Here is a pen with an example of what I am talking about.
https://codepen.io/matthewdixon/pen/dyobXEN
Two columns, three (or more items) when the first item is taller than the others. In this example I would expect the last item to be in the right column. But perhaps this is expecting too much from flexbox based layout?
The use case is a page with a series of galleries throughout seperated by text where each gallery has 2 - 6 items in it.

Reading through the code it doesn't look like the intention of this script is to fit the content in the most appropriate space. Is that right? the content flows from top left to bottom right with each block starting where the one above it leaves off. But if there is more space in the next column it won't fill that space instead.

That is correct. This doesn't try and fit the content optimally (like Masonry does). This just tries to make the columns similar heights.

Presumably this is beyond the scope of this project ?

Yes. Mainly because the aim of this project was to use as little JS as possible.

Sounds good to me!


Fix ode semantics

This PR updates the naming of the endpoint that reconstructs ode semantics and adds a json example.

Codecov Report

Merging #211 (4f5db8d) into main (add147d) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #211      +/-   ##
==========================================
- Coverage   77.89%   77.85%   -0.04%
==========================================
  Files          68       68
  Lines        5482     5483       +1
==========================================
- Hits         4270     4269       -1
- Misses       1212     1214       +2

Impacted Files
Coverage Δ

mira/dkg/model.py
96.77% <100.00%> (+0.01%)
:arrow_up:

tests/test_model_api.py
96.80% <100.00%> (ø)

... and 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more