Fix panic in handleRPCFormContract

Ran into a panic on our CI today while fixing tests. The panic is related to handleRPCFormContract.
  go.sia.tech/coreutils/rhp/v4.(*Server).handleRPCFormContract(0xc0011dd700, {0x29c8270, 0xc00013da20})
  	/home/runner/go/pkg/mod/go.sia.tech/coreutils@v0.8.1-0.20241217153531-b5e84c03d17f/rhp/v4/server.go:615 +0x3297
  go.sia.tech/coreutils/rhp/v4.(*Server).handleHostStream(0xc0011dd700, {0x29c8270, 0xc00013da20}, 0xc0011e4180)
  	/home/runner/go/pkg/mod/go.sia.tech/coreutils@v0.8.1-0.20241217153531-b5e84c03d17f/rhp/v4/server.go:1033 +0x2a33
  go.sia.tech/coreutils/rhp/v4.(*Server).Serve.func1()
  	/home/runner/go/pkg/mod/go.sia.tech/coreutils@v0.8.1-0.20241217153531-b5e84c03d17f/rhp/v4/server.go:1103 +0xe5
  created by go.sia.tech/coreutils/rhp/v4.(*Server).Serve in goroutine 997336
  	/home/runner/go/pkg/mod/go.sia.tech/coreutils@v0.8.1-0.20241217153531-b5e84c03d17f/rhp/v4/server.go:1095 +0x126

Seems like the server doesn't sufficiently validate some data received from the client and the client is sending potentially faulty data.

My guess is it's coming from here: https://github.com/SiaFoundation/coreutils/blob/b5e84c03d17f6f0f4ea5b7e33078b1db37308d4f/rhp/v4/server.go#L586C1-L596C3
        // update renter input basis to reflect our funding basis
        if basis != req.Basis {
                hostInputs := formationTxn.SiacoinInputs[len(formationTxn.SiacoinInputs)-len(req.RenterInputs)]
                formationTxn.SiacoinInputs = formationTxn.SiacoinInputs[:len(formationTxn.SiacoinInputs)-len(req.RenterInputs)]
                txnset, err := s.chain.UpdateV2TransactionSet([]types.V2Transaction{formationTxn}, req.Basis, basis)
                if err != nil {
                        return errorBadRequest("failed to update renter inputs from %q to %q: %v", req.Basis, basis, err)
                }
                formationTxn = txnset[0]
                formationTxn.SiacoinInputs = append(formationTxn.SiacoinInputs, hostInputs)
        }

Looks like the order is mixed up: the renter inputs are first, followed by the host inputs, so it should be:
        // update renter input basis to reflect our funding basis
        if basis != req.Basis {
---             hostInputs := formationTxn.SiacoinInputs[len(formationTxn.SiacoinInputs)-len(req.RenterInputs)]
---             formationTxn.SiacoinInputs = formationTxn.SiacoinInputs[:len(formationTxn.SiacoinInputs)-len(req.RenterInputs)]
+++             hostInputs := formationTxn.SiacoinInputs[len(req.RenterInputs):]
+++             formationTxn.SiacoinInputs = formationTxn.SiacoinInputs[:len(req.RenterInputs)]
                txnset, err := s.chain.UpdateV2TransactionSet([]types.V2Transaction{formationTxn}, req.Basis, basis)
                if err != nil {
                        return errorBadRequest("failed to update renter inputs from %q to %q: %v", req.Basis, basis, err)
                }
                formationTxn = txnset[0]
                formationTxn.SiacoinInputs = append(formationTxn.SiacoinInputs, hostInputs)
        }

I'm wondering if we even need to be removing the host inputs before updating in the first place, though...?

That was my initial feeling as well. Deployed a branch with a println within the if and it does indeed print every time we encounter the panic.


NSManagedObject changes not detected by TLIndexPathController

Hi there. I am using the latest TLIndexPathTools (0.4.3) with Core Data and came across a bug that seems to be related to TLIndexPathController (or my understanding of it.)
In short, TLIndexPathController is not populating modifiedItems when it should be. It does call controller: didUpdateDataModel but updates has an empty modifiedItems array.
Not being sure where the issue was, I wrote two tests, one against NSFetchedResultsController and another against TLIndexPathController to detect the same exact changes. The NSFetchedResultsController tests work as expected, while the TLIndexPathController tests fail to detect intermediate changes. I would like to have the NSFetchedResultsController behavior.
I think this is either a serious issue, or a wild misunderstanding on my part. Either way I'd appreciate your guidance, and if it is an issue, I'd love to try to help resolve it. This library is a godsend and besides for this issue has been 100% solid for me. Thanks.
My tests:

FRCTests.swift
TLToolsTests.swift

Hm, OK. :) Digging further into your code, I guess what I was missing here was the modificationComparatorBlock option. It seems isEqual: is insufficient to detect Core Data property changes. With a more detailed comparator block set, I can detect the changes I'm looking for.
So, I guess this raises two questions. 1) Is my diagnosis correct, and do you think that's the best way to address the issue?, and 2) If isEqual doesn't detect basic property changes, what does it detect, and what should it detect?
Thanks for any ideas you may have on this. I certainly learned something today.

Detecting modifications is kind of a weak point of the framework :)
As you can guess, isEqual only works if the data models being compared have different instances. However, TLIndexPathController has a feature to detect updated Core Data objects: see references to the updatedItems property in TLIndexPathController. The modificationComparatorBlock was added recently by a contributor to help with non-Core Data objects, so you don't need to use that.
I could probably spot the problem right away if I had a working project for your test case. I'd suggest adding some breakpoints in TLIndexPathController to find out what's going on with updatedItems. My only guess so far is that controllerWillChangeContent is getting called a second time before controllerDidChangeContent since that is where updatedItems gets cleared.

Thanks for the input. The best guess I have right now is that isEqual: just doesn't detect the property changes. So, it's deciding it's the same object (which it is), even though property changes have occurred. If, in my modificationComparatorBlock I explicitly check a couple of properties I care about, then it seems to work perfectly.
I need to dig into this a bit deeper and see how it can be addressed most simply. Tomorrow. :)

There should only ever be one instance of any given Core Data object in a context. So, isEqual will never work as it’s comparing to itself. That is why TLIndexPathController detects updated Core Data objects for you internally (using an NSFetchedResultsController). It should just work. No need to worry about isEqual or modificationComparatorBlock. If it doesn’t work then, I would suggest we do a bit of digging to determine why.

On May 15, 2016, at 6:20 PM, Dave Troy<EMAIL_ADDRESS>wrote:
Thanks for the input. The best guess I have right now is that isEqual: just doesn't detect the property changes. So, it's deciding it's the same object (which it is), even though property changes have occurred. If, in my modificationComparatorBlock I explicitly check a couple of properties I care about, then it seems to work perfectly.
I need to dig into this a bit deeper and see how it can be addressed most simply. Tomorrow. :)
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/wtmoose/TLIndexPathTools/issues/68#issuecomment-219319000

Hm, yeah. That's sort of what I figured initially. If that's the case, I can only guess there is something wrong with the plumbing in how NSFetchedResultsController is supplying into to TLIndexPathController, as it's clear the former works when used alone. Tomorrow I will see about putting together a simple standalone project to try to isolate this.

I just did a quick look to see if willUpdateDataModel is being called more than once. So far that does not look to be the case, so it seems more a case that updatedItems is not being consistently populated rather than being inadvertently cleared.

OK, attached is a sample project that exactly illustrates the issue I am having. I've included tests against NSFetchedResultsController which all work fine, and tests against TLIndexPathController, which fail. You can make the TLIndexPathController tests pass by setting the comparator block, but as you say, that should be unnecessary, and I've discovered that in practice it updates way too much stuff and bogs down the app. Any thoughts and/or fixes appreciated! Hope this helps!
TLSample.zip

The main issue with the text is that NSFetchedResultsController reports changed message count as a move, rather than an update, because you're sorting on messageCount. The test passes if you set the sort descriptor to an empty array.
You'll also want to use permanent object IDs so that TLIPS can keep track newly created objects saves. To do this in your test, for example, add the following following line after creating the address:
try! mainContext.obtainPermanentIDsForObjects([address])

Alternatively, if your model object has an ID field of its own, you can pass that as the identifierKeyPath in the TLIndexPathController constructor.
Does that help?

Ah, ok, thanks. I will look into this. Yeah, I do need to sort on messageCount. So, to me the current behavior is a bug and it seems this fix is needed. Will you be putting it in? Because it's not working in production otherwise.
I will look at the .obtainPermanentIDsForObjects and/or consider passing in another identifier. Thanks for the help!

TLIPS seems to be consistent with NSFetchedResultsController except in the case where you make a change affecting the sort column, but not the actual sort order, wherein NSFetchedResultsController reports zero-distance moves. I could add a workaround in TLIPT to also reports zero-distance moves. Is that what you had in mind?

Yeah. I think that would be necessary for anyone wanting to use TLIPT with a sort order specified, and properly report such zero-distance moves. There doesn't seem to be any other way to catch it and I absolutely need that for my app.

Got this on my todo list.

Thanks. I am using my hack in the meantime and it seems to be pretty solid.

One other note, in case it is relevant. I am seeing issues where when a predicate is set on the TLIndexPathController fetchRequest, sometimes .insertedItems is not populated with an entity if that item previously existed but was newly changed to meet the predicate condition. Forcing a .performFetch() seems to fix it.
To illustrate, if fetchRequest.predicate = NSPredicate(format: "count>0"), and then,
object.count=0 // object is not shown
object.count=5 // may not be shown until performFetch()

Thanks!

Can you check if TLIndexPathController.controllerDidChangeContent(_) is getting called? If it is, I can't see how TLIPT wouldn't do the right thing, so I'll need to reproduce it on my end.

Actually, scratch that last issue. I am pretty sure I figured out what was causing it, and I think it's something I did. Original issue still stands. Thanks so much!

Any update on this? One thing I am still seeing, even with my 'fix' in place —
let's say object.count on a cell, goes from 1 to 4 and the sort order is on that field.

The cell is moved
The object is not refreshed on that cell

Therefore, an indicator displaying object.count will remain at 1 and not be refreshed to 4. I am pretty sure this is a TLIPT issue related to the move operation.

It isn't a TLIPT issue. Table view's don't call cellForRowAtIndexPath when you do a move operation. So, the cell content doesn't get updated. Typically, what I do is put my cell configuration logic in TLTableViewController.tableView(:configureCell:atIndexPath) and call TLTableViewController.reconfigureVisibleCells() in didUpdateDataModel.

Ah, thanks. This is on a UICollectionView but I imagine the logic is basically the same. I will check that out!


Video on the front page

The hero element should contain a video instead of a placeholder background.

Done in 97cfe0f845bde2591192fc67c6146dfea6da6d02 💫


Paste option is not working

There is no paste option for input field, is this a bug or?

The same issue, yeah It's a bug. Works on the regular input

any workaround solution exist ??


Qualimap missing "-p" before $qualimap_direction

According to Qualimap documentation, the syntax for specifying read strandedness is "-p ". Current code is missing the "-p" part. Proposed change:
- qualimap --java-mem-size=${memory} rnaseq $qualimap_direction $paired -s -bam $bam -gtf $gtf -outdir ${bam.baseName}
+ qualimap --java-mem-size=${memory} rnaseq -p $qualimap_direction $paired -s -bam $bam -gtf $gtf -outdir ${bam.baseName}

Fixed in https://github.com/nf-core/rnaseq/pull/356


Adding base logic to transition step to enable policy execution

Issue #, if available:
Description of changes:

Base logic for transition step - this is a requirement for other actions to be executed successfully in the policy

CheckList:

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #223 (a557032) into development-extension (bca8b41) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

@@                     Coverage Diff                     @@
##             development-extension     #223      +/-   ##
===========================================================
- Coverage                    59.88%   59.82%   -0.07%
  Complexity                    1310     1310
===========================================================
  Files                          249      249
  Lines                         9328     9338      +10
  Branches                      1437     1437
===========================================================
  Hits                          5586     5586
- Misses                        3063     3074      +11
+ Partials                       679      678       -1

Impacted Files
Coverage Δ

...agement/indexstatemanagement/ManagedIndexRunner.kt
28.98% <0.00%> (ø)

...t/indexstatemanagement/action/TransitionsAction.kt
0.00% <0.00%> (ø)

...anagement/step/transition/AttemptTransitionStep.kt
0.00% <0.00%> (ø)

...t/indexstatemanagement/model/ManagedIndexConfig.kt
74.28% <0.00%> (-2.86%)
:arrow_down:

...management/common/model/dimension/DateHistogram.kt
75.60% <0.00%> (+3.65%)
: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 bca8b41...a557032. Read the comment docs.


Getting error with reversetraj_clippedtraj_gen

I am getting an error with reversetraj_clippedtraj_gen.py in line 46 which is described below image:

Since there are none values in the Temperature_C field so '> or <' is not supported. I have used the GDAS1 meteorological input files for generating trajectories. Please fix this error, why I am getting none values in the temperature field?

Hey, have you solved this problem already? I am also getting a similar issue, could you please help me with this?


:green_heart: Updated node version in GitHub action workflows.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


recognition of root path if it has the format of a network directory

Issue: Webpack did not recognize network directory paths.
Network paths do not have ":" as second character. Unfortunately the code only tests this case for windows paths.
The consequence was the following error:
\\... is neither a posix nor a windows path, and there is no 'join' method defined in the file system
To fix this issue I inserted the following condition in the if clause:
|| rootPath.startsWith("\\")
What kind of change does this PR introduce?

bugfix

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

Nothing

Thanks for your contribution. I am closing PR because it is too stale..

@vankop I think we should open an issue for supporting \\ windows UNC paths (https://docs.microsoft.com/ru-ru/dotnet/standard/io/file-path-formats#unc-paths), not high priority,


This PR introduce an interface for the "message sender" which is used in the functional tests to validate the schema of the message sent to the backend.
This PR also adds a schema for the kill action.

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


bug in Transaction from customer

[x] customer to invoice :  creation not functioning showing error message  &place of supply not autopopulated (customer with tax treatment gcc non vat registered)
[x] customer to estimate : estimate creation not working &place of supply not autopopulated (customer with tax treatment gcc non vat registered)
[x] customer to sales order : sales order number showing new and place of supply not autopopulated (customer with tax treatment gcc non vat registered)

issue closed


Undo clears background image

When creating a Canvas with a background image with Canvas(backgroundImage: UIImage.init(named: "Image")!) calling undo wipes everything including the background image.
The undo functionality should undo the first drawing but not clear the background image. It seems the first drawing and the setting of the image are merged into the first action.

Also is there  way to clear all the undos?

Oh.. I see.
I'll fix it.
and I'll check clear undo
Thanks.

@Nicejinux thanks for the quick response.

Any estimate till when it's fixed :)

Oh. sure. You can submit PR anytime~~

@Nicejinux great ill try to see if i can get it done tonight

Fixed.
Please update and check.
Thanks.

@Nicejinux works perfectly :) thanks !!


New functions dev

This pull request is an expanded version of the pull request  https://github.com/julienmalard/pysd/pull/1 which is related to #209. Pull request #214 can also be closed. Following the previous work done by @julienmalard and @DVRodri8.
Main new features:
GET XLS/DIRECT DATA/SUBSCRIPT/LOOKUPS/CONSTANS (with several test to check that everything is working ok)
These expressions create a new class (external) whis is initialised before the stateful objects.
Moreover, for python 3.6+ if openpyxl (optional-requirements.txt) is installed it is possible to use these functions with cellrange names
Support for subscripted delays, if then else, xidz, zidz
Support for subscript switching and transposition
Support for subscript aggregation with complex expressions
Now the subscripted objects will always be an array with the correct dimensions, makes easier continuing developing new features,
The cache is now simpler, the allocation is in a nested dictionary which makes possible to stop checking every time the current time, easier to reset or clean and also allows creating a decorator with subscript dimensions ( the cache decorator will be used like @cache.step and @cache.run, however, @cache('run') and @cache('step') are still supported for backward compatibility with already translated models)
Improvements in the documentation of the functions in the model file.
Improvements in the documentation of PySD
This pull request should solve the following issues:
#170 #208 #196 #121 #71 #70 #51 #68 #102 #123
Issue #197 is indirectly solved when adding GET XLS/DIRECT as this was a problem raised due to hardcoding external data to make it work with the previous version.
There are several todos and things that will be cleaned or simplified in the following pull request, which will be the first PySD version requiring python 3.7 :)

Coverage increased (+2.6%) to 93.256% when pulling 18161080f3380493d05c2d9720207b08e57fadd2 on enekomartinmartinez:new_functions_dev into 26a9473e95b3b5f1c5ee8e5765a6ab1b12009625 on JamesPHoughton:master.

I have made a new commit following your comments

Wow! Thanks @enekomartinmartinez, @JamesPHoughton and @DVRodri8 ! This is really impressive and a very nice early Christmas present to have all this new functionality to play with in the new year!


NVidia grid driver version is not the latest.

NVidia grid driver version is not the latest.  The latest is 16.2.

@puccamau
Duplicate of #118686


changing provisioned_capacity from RU to vCPU - changes to descriptio…

Adapting Standard Tier provisioned_capacity to vCPU instead of RU

changing docs annotations from RU to vCPU
changing example values multiple of 500 to multiple of 1 - e.g. 1000 changed to 2

Commit checklist

[ ] Changelog
[ ] Doc gen (make generate)
[ ] Integration test(s)
[ ] Acceptance test(s)
[ ] Example(s)

@marksoper IIRC you were in favor of closing this right?


python unittest, 1st test pass

we don't need expensive database creation with django TestCase, so I changed it to unittest.TestCase
first test case pass: we don't need <p> </p> - text spacing should be done by css margins etc.

Thanks. Please resubmit with resolved conflicts if this change still makes sense. All the best, m.


Bug on loop graph

Hi thank you fo your great work.
I tested your extension on a flow of mine and I have a nasty bug on the attached flow :
maintenancePlan_tempsMoyenEntretien.flow-meta.xml.txt
it generate the following md :

X1_site --> loop_Sites_opp
loop_Sites_opp --> X1_site
loop_Sites_opp ---> END
get_opportunity --> get_sites_opportunite
get_sites_opportunite --> loop_Sites_opp
update_maintenace_plan --> END
START(( START )) --> get_opportunity

where it should generate this instead

X1_site --> loop_Sites_opp
loop_Sites_opp --> X1_site
loop_Sites_opp ---> update_maintenace_plan
get_opportunity --> get_sites_opportunite
get_sites_opportunite --> loop_Sites_opp
update_maintenace_plan --> END
START(( START )) --> get_opportunity

Thanks @Manu2pace .
Are you also able to share a screenshot of the Fow as seen in the Salesforce org, please?

Here it is from Salesforce :

dans in VScode as it is generated in markdown + flow
and what it should be based on the flow

Ah amazing! Thank you


Added a function with an extra parameter to use the "addtional_owners" in twitter's API

The added parameter "additionalOwners" is corresponding to the optional
parameter "addtional_owners" in the twitter's document, which is a
comma-separated list of user IDs to set as additional owners allowed to
use the returned media_id in Tweets or Cards. Up to 100 additional
owners may be specified.
This parameter will be useful when someone wants to post a media tweet
by multiple twitter accounts at one time without having to uploading
the media for multiple times, which is a waste of networking.
I forked it just because I came across the problem to give some ownership of the media to reuse it. I spent hours to learn about the twitter's document and found it's really convenient to post a tweet with your awesome project, which is just lack of a parameter I need.
Maybe few people have to post tweets through multiple accounts by sending once, and developers could extend the function by themselves easily. But the twitter has a too big document to read, and using your library would save much time to understand the whole process. I pulled the request to mean this.
Thank you for bringing such great tools again. xxx

Thank you; the pull request is now merged.


Feat:Add Scroll Back To Top Button

Describe the feature
Add Scroll Back To Top Button
Can you assign this issue to me under GSSOC 24 label
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Yes sure

Can you please assign this issue to me under gssoc label so that i will start working on it.

Assign me this issue please


Classification of the work

On the website, I see that works have classification (e.g., Furniture and interiors), but that is not available here. Could it be added?

Sorry, it is there. I missed it somehow.


Update CONSTS to direct developers to use role instead of accessibilityRole (#31500)

This fixes the issue with ROLE and ACCESSIBLITY_ROLE identified earlier and discussed on Slack.
It makes the following changes:
Changes to CONST.ts

Reverts CONST.ACCESSIBILITY_ROLE.TEXT to the value 'text'
Adds deprecation warnings on CONST.ACCESSIBLITY_ROLE and all properties
Creates the CONST.ROLE object with JSDoc comments

Fixes to Components
Simple find-replace
The majority of components were fixed using a simple find and replaced that made the following change
Replace: role={CONST.ACCESSIBILITY_ROLE with role={CONST.ROLE
For example:
role={CONST.ACCESSIBILITY_ROLE.BUTTON} would become role={CONST.ROLE.BUTTON}
Specific Cases

Description
Why Change Was Made
Before
After

Components using TEXT to mean PRESENTATION
Aligned with correct key in CONST.ROLE
role={CONST.ACCESSIBILITY_ROLE.TEXT}
role={CONST.ROLE.PRESENTATION}

Inappropriate use of IMAGEBUTTON
IMAGEBUTTON only available in accessibilityRole. Corrected property to accessibilityRole and pointed to the right const
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}

Inappropriate use of ADJUSTABLE
adjustable is not available in role but is in accessibilityRole. Reverted the value and updated prop to reflect correct usage
role={CONST.ACCESSIBILITY_ROLE.ADJUSTABLE}
role={CONST.ROLE.SLIDER}

Use of non-existent ACCESSIBILITY_ROLE.IMAGE
Replaced with valid role value
role={CONST.ACCESSIBILITY_ROLE.IMAGE}
role={CONST.ROLE.IMG}

Note: In the IMAGEBUTTON Case, I thought it was best to preserve the imagebutton role information, and minimize the number of changes, rather than try to decide on a case-by-case basis what an appropriate replacement would be.
Details

Fixed Issues

$
PROPOSAL:
Tests

[ ] Verify that no errors appear in the JS console

Offline tests

QA Steps

[ ] Verify that no errors appear in the JS console

PR Author Checklist

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

[ ] I added steps for local testing in the Tests section
[ ] I added steps for the expected offline behavior in the Offline steps section
[ ] I added steps for Staging and/or Production testing in the QA steps section
[ ] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] 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)
[ ] 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).

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

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

[ ] 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)
[ ] I followed proper code patterns (see Reviewing the code)

[ ] 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)
[ ] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[ ] I verified that comments were added to code that is not self explanatory
[ ] 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.
[ ] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[ ] 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:

[ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[ ] 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.
[ ] 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.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I followed the guidelines as stated in the Review Guidelines
[ ] 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)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] 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
[ ] I verified that if a function's arguments changed that all usages have also been updated correctly
[ ] If any new file was added I verified that:

[ ] 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

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

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

[ ] 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.
[ ] 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)
[ ] 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.
[ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[ ] 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.
[ ] 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.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

@trevor-coleman looks like the linter isn't happy! And some conflicts

Also we should probably point it at a different branch than main and then PR that branch against ExpensifyApp/main so it can go through their process.

Linter passing -- going to make that new branch now.

@cdanwards  --  lints are passing, and this is now against a feature branch. I think she's ready to go.

Love the detail in documentation

Yeah when I do big find-replaces like this I like to document the edge cases to (hopefully) make it easier to review.


gRPC test case fails on macos

Requirement - what kind of business use case are you trying to solve?
Make test cases pass on all Go-compatible platforms.

Problem - what in Jaeger blocks you from solving the requirement?
Test consistently fails on macos. Seems to rely on Linux behavior.

Proposal - what do you suggest to solve the problem or improve the existing situation?
Use of port 1 is not inherently problematic, when privileges are correct. Use a truly invalid port to test address bind failure.

Found a failure when running unit tests locally:
=== RUN   TestFailToListen
2018-11-27T12:22:24.450-0500	INFO	grpcserver/grpc_server.go:64	Starting jaeger-collector gRPC server	{"grpc-port": "1"}
--- FAIL: TestFailToListen (0.00s)
    require.go:765:
        	Error Trace:	grpc_server_test.go:43
        	Error:      	Expected nil, but got: &net.TCPAddr{IP:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, Port:1, Zone:""}
        	Test:       	TestFailToListen
FAIL
FAIL	github.com/jaegertracing/jaeger/cmd/collector/app/grpcserver	0.029s


Add Mathematics 1st Semester resources

Issue Title

Add Maths 1st semester resources

Issue Description

Add Maths 1st semester resources in "src/app/components/Tabs/Data.jsx"

Video Links

Extract the relevant videos from the playlist and add it to Data.jsx : https://www.youtube.com/playlist?list=PLU6SqdYcYsfINU_Y9CMp1pZ827ZB1U-Xn

Note:
The Format will be like this:
          {
            key: 00 , // the next number
            heading: "The Title",
            description:
              "add a small description.",
            link: "https://www.youtube.com/xyz",
          },

I, @janasounak & @dharasritama want to work on this project as a team

Assigned @RitochitGhosh.
@janasounak & @dharasritama have to comment individually to get assigned.

I'd like to work on this project as a part of the team of @RitochitGhosh .

I'd like to work on this project as a part of the team of @RitochitGhosh .

Adding resources to mathematics section (Matrices) has been completed.


Create Test-DbaAvailabilityGroup.ps1

Type of Change

[ ] Bug fix (non-breaking change, fixes #)
[x] New feature (non-breaking change, adds functionality) #4556
[ ] Breaking change (effects multiple commands or functionality)
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose
New command #4556
Approach
Using Test-SqlAvailabilityGroup, seems not to support -SqlCredential.
Commands to test
Examples in the help
Screenshots

Learning

k, will close for now and we'll work out something later, even if it's creating the underlying commands


DOM Manipulation Clarification

Adding parentheses clarifies statements.

I'm not sure that this is an improvement; it reads roughly the same to me.

Going through the doc, I read it as ambiguous/imprecise. Id be happy to help the change, of it helps.
DOM manipulations are fairly easy, there should be nothing ambiguous at that level of interpretation. I learned much from the article.
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Jake Bailey @.>
Sent: Wednesday, September 13, 2023 11:49:20 AM
To: microsoft/TypeScript-Website @.>
Cc: Robert A Howell @.>; Author @.>
Subject: Re: [microsoft/TypeScript-Website] DOM Manipulation Clarification (PR #2943)
I'm not sure that this is an improvement; it reads roughly the same to me.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/TypeScript-Website/pull/2943#issuecomment-1717981851, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE5GEVQKGDRC4PNMZMOKE53X2HPZBANCNFSM6AAAAAA4WMJWGQ.
You are receiving this because you authored the thread.Message ID: @.***>

I'm not sure what we'd change it too; both before and after it refers to a code snippet above and I don't see how it can be ambigious.

The proper grammatical implementation is to use parentheses, I'm sure I looked it up to confirm it. That's why I'm offering an improvement.
Proper scripts documents deserve proper use of grammer to avoid amiguous situations from any sense. A clearer version may be helpful to someone, so I submitted the version change.
All the best,
Robert H.
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Jake Bailey @.>
Sent: Tuesday, October 24, 2023 2:53:14 PM
To: microsoft/TypeScript-Website @.>
Cc: Robert A Howell @.>; Author @.>
Subject: Re: [microsoft/TypeScript-Website] DOM Manipulation Clarification (PR #2943)
I'm not sure what we'd change it too; both before and after it refers to a code snippet above and I don't see how it can be ambigious.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/TypeScript-Website/pull/2943#issuecomment-1777929633, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE5GEVVSRVRFT3EFZ4PPQWLYBAMCVAVCNFSM6AAAAAA4WMJWGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZXHEZDSNRTGM.
You are receiving this because you authored the thread.Message ID: @.***>

Pushing requires testing. That appears to be without my attention?


Put to_create(&:save!) in all AR factories

FactoryGirl/Bot uses save by default to save. We want it to use save! in AR factories to avoid hidden errors.

Keep alive!

Closing in favor of https://app.clubhouse.io/cartoteam/story/83525/put-to-create-save-in-all-ar-factories


Add Message binary decoding support from ContiguousBytes.

ContiguousBytes should allow other libraries that have their own "buffer"
types to directly decode things without having to copy the payloads into
a Data first.

Add a new init.
Add a new merge.
Redirect the Data interfaces thru the ContiguousBytes interfaces.

Sorry, I was on holiday when this patch was posted.
Can I suggest that rather than taking a ContiguousBytes existential you make this function @inlinable and generic over ContiguousBytes instead? Taking an existential throws away type information unnecessarily, whereas having the function be generic preserves that type information and grants the compiler more opportunities to generate efficient code. This goes double if the generic function is also inlinable, and as it will be small (just a call to withUnsafeBytes that passes the input to another helper function) this actually produces a code size win in most cases.
This advantage particularly accrues to data types whose implementation of ContiguousBytes is itself inlinable, as then it is possible to reduce the code to a minimal case. As an example, let's consider a simplified version of your module containing both options, where doStuff is the equivalent of what your code would be:
import Foundation

@usableFromInline
func doStuff(_ pointer: UnsafeRawBufferPointer) throws { }

public func takesExistential(contiguousBytes bytes: ContiguousBytes) throws {
    try bytes.withUnsafeBytes(doStuff)
}

@inlinable
public func takesGeneric<Bytes: ContiguousBytes>(contiguousBytes bytes: Bytes) throws {
    try bytes.withUnsafeBytes(doStuff)
}

In a different module (necessary to simulate the effects of the cross-module optimisation properties of this code) we can import NIO and try to pass a ByteBufferView to this code (the @inline(never) shouldn't affect the correctness of the code, but it should prevent the linker killing our functions and making it hard to see them):
import lib
import NIO
import NIOFoundationCompat

@inline(never)
func testWithExistential(buffer: ByteBuffer) throws {
    try takesExistential(contiguousBytes: buffer.readableBytesView)
}

@inline(never)
func testWithGeneric(buffer: ByteBuffer) throws {
    try takesGeneric(contiguousBytes: buffer.readableBytesView)
}

var buffer = ByteBufferAllocator().buffer(capacity: 1024)
try! testWithExistential(buffer: buffer)
try! testWithGeneric(buffer: buffer)

The difference in output here is profound.
The existential-taking code generates two quite large functions. The first is testWithExistential itself:
_$s4test0A15WithExistential6buffery3NIO10ByteBufferV_tKF:        // test.testWithExistential(buffer: NIO.ByteBuffer) throws -> ()
push       rbp                          ; CODE XREF=_main+129
mov        rbp, rsp
push       r14
push       rbx
sub        rsp, 0x50
mov        rbx, r12
movabs     rax, 0xffffffffffffff
and        rdx, rax                     ; argument #3 for method _$s3NIO10ByteBufferV17readableBytesViewAA0bcF0Vvg
lea        rax, qword [rbp+var_38]
call       _$s3NIO10ByteBufferV17readableBytesViewAA0bcF0Vvg ; NIO.ByteBuffer.readableBytesView.getter : NIO.ByteBufferView
lea        rax, qword [_$s3NIO14ByteBufferViewVN] ; _$s3NIO14ByteBufferViewVN
mov        qword [rbp+var_48], rax
mov        rax, qword [_$s3NIO14ByteBufferViewVAC10Foundation15ContiguousBytes19NIOFoundationCompatWL] ; _$s3NIO14ByteBufferViewVAC10Foundation15ContiguousBytes19NIOFoundationCompatWL
test       rax, rax
jne        loc_1000e1a25

lea        rdi, qword [_$s3NIO14ByteBufferViewV10Foundation15ContiguousBytes19NIOFoundationCompatMc] ; _$s3NIO14ByteBufferViewV10Foundation15ContiguousBytes19NIOFoundationCompatMc
lea        rsi, qword [_$s3NIO14ByteBufferViewVN] ; _$s3NIO14ByteBufferViewVN
call       imp___stubs__swift_getWitnessTable ; swift_getWitnessTable
mov        qword [_$s3NIO14ByteBufferViewVAC10Foundation15ContiguousBytes19NIOFoundationCompatWL], rax ; _$s3NIO14ByteBufferViewVAC10Foundation15ContiguousBytes19NIOFoundationCompatWL

loc_1000e1a25:
mov        qword [rbp+var_40], rax      ; CODE XREF=_$s4test0A15WithExistential6buffery3NIO10ByteBufferV_tKF+57
lea        rdi, qword [__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_test+24] ; 0x100111c90
mov        esi, 0x38
mov        edx, 0x7
call       imp___stubs__swift_allocObject ; swift_allocObject
mov        qword [rbp+var_60], rax
mov        rcx, qword [rbp+var_18]
mov        qword [rax+0x30], rcx
mov        rcx, qword [rbp+var_20]
mov        qword [rax+0x28], rcx
mov        rcx, qword [rbp+var_28]
mov        qword [rax+0x20], rcx
mov        rcx, qword [rbp+var_38]
mov        rdx, qword [rbp+var_30]
mov        qword [rax+0x18], rdx
mov        qword [rax+0x10], rcx
lea        r14, qword [rbp+var_60]
mov        rdi, r14                     ; argument #1 for method _$s3lib16takesExistential15contiguousBytesy10Foundation010ContiguousE0_p_tKF
mov        r12, rbx
call       _$s3lib16takesExistential15contiguousBytesy10Foundation010ContiguousE0_p_tKF ; lib.takesExistential(contiguousBytes: Foundation.ContiguousBytes) throws -> ()
mov        rbx, r12
mov        rdi, r14                     ; argument #1 for method ___swift_destroy_boxed_opaque_existential_1
call       ___swift_destroy_boxed_opaque_existential_1 ; ___swift_destroy_boxed_opaque_existential_1
test       rbx, rbx
mov        r12, rbx
add        rsp, 0x50
pop        rbx
pop        r14
pop        rbp
ret

This code is in 3 parts. The first block creates the ByteBufferView from a ByteBuffer, and is not something we're very interested in. The second part is the thunk that builds and loads the value witness table for a ByteBufferView. This will be run only once in the program, and is required because we need the VWT for the call with the existential.
The third block is interesting, as it does two things. Firstly, it heap-allocates. It does this because the existential being passed to lib.takesExistential is not known not to escape, so a refcounted heap allocation must be made to manage the ByteBufferView. Second, note that we emit an actual call into lib.takesExistential. That means we need to jump into lib, to this code:
_$s3lib16takesExistential15contiguousBytesy10Foundation010ContiguousE0_p_tKF:        // lib.takesExistential(contiguousBytes: Foundation.ContiguousBytes) throws -> ()
push       rbp                          ; CODE XREF=_$s4test0A15WithExistential6buffery3NIO10ByteBufferV_tKF+165
mov        rbp, rsp
push       r15
push       r14
push       r13
push       rbx
mov        r14, r12
mov        rbx, qword [rdi+0x18]
mov        r15, qword [rdi+0x20]
mov        rsi, rbx                     ; argument #2 for method ___swift_project_boxed_opaque_existential_1
call       ___swift_project_boxed_opaque_existential_1 ; ___swift_project_boxed_opaque_existential_1
mov        rdx, qword [_$sytN_100102a88] ; _$sytN_100102a88
add        rdx, 0x8
lea        rdi, qword [_$sSWs5Error_pIgyzo_SWytsAA_pIegyrzo_TR20$s3lib7doStuffyySWKFTf3nnpf_n] ; _$sSWs5Error_pIgyzo_SWytsAA_pIegyrzo_TR20$s3lib7doStuffyySWKFTf3nnpf_n
xor        esi, esi
mov        r13, rax
mov        r12, r14
mov        rcx, rbx
mov        r8, r15
call       imp___stubs__$s10Foundation15ContiguousBytesP010withUnsafeC0yqd__qd__SWKXEKlFTj ; dispatch thunk of Foundation.ContiguousBytes.withUnsafeBytes<A>((Swift.UnsafeRawBufferPointer) throws -> A1) throws -> A1
pop        rbx
pop        r13
pop        r14
pop        r15
pop        rbp
ret

Here we do a partial unwrap of the existential and then jump through the ContiguousBytes protocol witness table for the provided value, passing the address of doStuff as an argument.
The effect here is that we have the following costs: one allocation, an unwrap of an existential, an indirect call via the PWT into NIO, followed by another indirect call in the non-specialised NIO implementation of withUnsafeBytes back into lib.doStuff. These two indirect calls are tricky to predict, and when combined with the allocation make things somewhat expensive, especially given that all we want to do is to ask NIO to vend us a pointer to interior storage.
By comparison, here is the code generated by testWithGeneric:
 _$s4test0A11WithGeneric6buffery3NIO10ByteBufferV_tKF:        // test.testWithGeneric(buffer: NIO.ByteBuffer) throws -> ()
push       rbp                          ; CODE XREF=_main+212
mov        rbp, rsp
push       r15
push       r14
push       r13
push       rbx
sub        rsp, 0x50
mov        qword [rbp+var_50], r12
movabs     rax, 0xffffffffffffff
and        rdx, rax                     ; argument #3 for method _$s3NIO10ByteBufferV17readableBytesViewAA0bcF0Vvg
lea        rax, qword [rbp+var_48]
call       _$s3NIO10ByteBufferV17readableBytesViewAA0bcF0Vvg ; NIO.ByteBuffer.readableBytesView.getter : NIO.ByteBufferView
mov        r15, qword [rbp+var_48]
mov        r14d, dword [rbp+var_38]
movzx      ebx, word [rbp+var_34]
movzx      r13d, byte [rbp+var_32]
lea        rdi, qword [r15+0x18]
lea        rsi, qword [rbp+var_68]
xor        edx, edx
xor        ecx, ecx
call       imp___stubs__swift_beginAccess ; swift_beginAccess
mov        r15, qword [r15+0x18]
lea        rdi, qword [rbp+var_48]      ; argument #1 for method _$s3NIO14ByteBufferViewVWOr
call       _$s3NIO14ByteBufferViewVWOr  ; outlined retain of NIO.ByteBufferView
shl        r13, 0x30
shl        rbx, 0x20
or         rbx, r14
or         rbx, r13
mov        rdi, rbx                     ; argument #1 for method _$s3NIO16_ByteBufferSliceV10lowerBounds6UInt32Vvg
call       _$s3NIO16_ByteBufferSliceV10lowerBounds6UInt32Vvg ; NIO._ByteBufferSlice.lowerBound.getter : Swift.UInt32
cmp        r14d, eax
jb         loc_1000e1bd0

mov        eax, eax
add        r15, rax
je         loc_1000e1bd2

mov        rax, qword [rbp+var_30]
mov        rbx, qword [rbp+var_28]
sub        rbx, rax
jo         loc_1000e1bd4

test       rbx, rbx
js         loc_1000e1bd6

add        r15, rax
add        rbx, r15
lea        rdi, qword [rbp+var_48]      ; argument #1 for method _$s3NIO14ByteBufferViewVWOr
call       _$s3NIO14ByteBufferViewVWOr  ; outlined retain of NIO.ByteBufferView
mov        rdi, r15
mov        rsi, rbx
mov        r12, qword [rbp+var_50]
call       _$s3lib7doStuffyySWKF        ; lib.doStuff(Swift.UnsafeRawBufferPointer) throws -> ()
mov        rbx, r12
test       r12, r12
je         loc_1000e1ba4

mov        r12, rbx
call       imp___stubs__swift_willThrow ; swift_willThrow
lea        r14, qword [rbp+var_48]
mov        rdi, r14                     ; argument #1 for method _$s3NIO14ByteBufferViewVWOs
call       _$s3NIO14ByteBufferViewVWOs  ; outlined release of NIO.ByteBufferView
mov        rdi, r14                     ; argument #1 for method _$s3NIO14ByteBufferViewVWOs
call       _$s3NIO14ByteBufferViewVWOs  ; outlined release of NIO.ByteBufferView
mov        r12, rbx
call       imp___stubs__swift_willThrow ; swift_willThrow
jmp        loc_1000e1bb8

loc_1000e1ba4:
lea        r14, qword [rbp+var_48]      ; CODE XREF=_$s4test0A11WithGeneric6buffery3NIO10ByteBufferV_tKF+188
mov        rdi, r14                     ; argument #1 for method _$s3NIO14ByteBufferViewVWOs
call       _$s3NIO14ByteBufferViewVWOs  ; outlined release of NIO.ByteBufferView
mov        rdi, r14                     ; argument #1 for method _$s3NIO14ByteBufferViewVWOs
call       _$s3NIO14ByteBufferViewVWOs  ; outlined release of NIO.ByteBufferView

loc_1000e1bb8:
mov        rdi, r14                     ; argument #1 for method _$s3NIO14ByteBufferViewVWOs, CODE XREF=_$s4test0A11WithGeneric6buffery3NIO10ByteBufferV_tKF+226
call       _$s3NIO14ByteBufferViewVWOs  ; outlined release of NIO.ByteBufferView
mov        r12, rbx
add        rsp, 0x50
pop        rbx
pop        r13
pop        r14
pop        r15
pop        rbp
ret

This code is a bit larger but has a number of better properties. In particular, it does not heap allocate, and never makes an indirect call: all calls are directly to the relevant function, including directly into lib.doStuff. This code path is much friendlier to the branch predictor and is inclined to run substantially faster.
In fact, the only problem with this code is that the codegen is kinda lousy due to implementation mistakes in NIO: we missed a bunch of inlinables that I'll be adding sometime soon.
In general, having this inlinable generic thunk greatly reduces the costs of obtaining pointers to the backing storage of structures, and I'd strongly recommend doing it.

Do we want to just worry about inline on this or should we also start to go after #763 (and deal with what it might bean for breaking changes).

The generic part is likely easily doable, but @inlinable runs into problems.
BinaryDecoder is private to the module, and it is directly used from merge(...), so you can't make merge @inlinable without going back and making BinaryDecoder public.
So the question seem to quickly slide into expanding the library interface with more things public, or wedging in more non inline functions to keep some types hidden, but that is likely going to prevent some of the wins one is trying to get by allowing things to be inline.

BinaryDecoder is internal to the module, and it is directly used from merge(...), so you can't make merge @inlinable without going back and making BinaryDecoder public

You can if you Mark it @usableFromInline.

You can if you Mark it @usableFromInline.

Yea, that doesn't really work out, everything to support the Decoder protocol then also has to get tagged (as well as the init and decodeFullMessage(message:) that is called from the method we're trying to support inlinable on).

No they don't, you just need to refactor slightly. You have this:
public mutating func merge(
  contiguousBytes bytes: ContiguousBytes,
  extensions: ExtensionMap? = nil,
  partial: Bool = false,
  options: BinaryDecodingOptions = BinaryDecodingOptions()
) throws {
  try bytes.withUnsafeBytes { (body: UnsafeRawBufferPointer) in
    if let baseAddress = body.baseAddress, body.count > 0 {
      let pointer = baseAddress.assumingMemoryBound(to: UInt8.self)
      var decoder = BinaryDecoder(forReadingFrom: pointer,
                                  count: body.count,
                                  options: options,
                                  extensions: extensions)
      try decoder.decodeFullMessage(message: &self)
    }
  }
  if !partial && !isInitialized {
    throw BinaryDecodingError.missingRequiredFields
  }
}

You can write this instead:
@inlinable
public mutating func merge<Bytes: ContiguousBytes>(
  contiguousBytes bytes: Bytes,
  extensions: ExtensionMap? = nil,
  partial: Bool = false,
  options: BinaryDecodingOptions = BinaryDecodingOptions()
) throws {
  try bytes.withUnsafeBytes { (body: UnsafeRawBufferPointer) in
    try _merge(rawBytes: body, extensions: extensions, partial: partial, options: options)
  }
}

@usableFromInline
internal mutating func _merge(
  rawBytes body: UnsafeRawBufferPointer,
  extensions: ExtensionMap?,
  partial: Bool,
  options: BinaryDecodingOptions
) throws {
  if let baseAddress = body.baseAddress, body.count > 0 {
    let pointer = baseAddress.assumingMemoryBound(to: UInt8.self)
    var decoder = BinaryDecoder(forReadingFrom: pointer,
                                count: body.count,
                                options: options,
                                extensions: extensions)
    try decoder.decodeFullMessage(message: &self)
  }
  if !partial && !isInitialized {
    throw BinaryDecodingError.missingRequiredFields
  }
}

This requires only one point of @usableFromInline, where everything else can remain appropriately access controlled.

That's the other option I was suggesting, I just wasn't sure if that meant we were getting the same wins since we're only moving a small amount to be reachable now.

Yeah, this gives nearly 100% of the win. As a rough heuristic, if the function is not generic, the win from making it @inlinable is much lower than when it is. This pattern of having a small inlinable thunk that performs the generic operation and then delegates to an inner function is a very effective strategy for giving the compiler the best opportunity to remove the overhead of generics while keeping your code as compartmentalised as possible.

@Lukasa, do you have any links to good resources where I can read more about the finer performance differences between things like existentials vs. generics? I get bits and pieces of info from discussions like this and from some of the compiler documentation, but it's not an area I've ever needed to personally focus too much on, so I have a lot of gaps in my knowledge and I'd love to know if someone has done a comprehensive write-up anywhere.

I am not aware of a good writeup. It's definitely something worth having written down. The biggest problem is actually that the story changes a lot: for example, Swift recently (i.e. in the last two or so Swift versions) started stack allocating existentials where possible which somewhat changes their performance profile.
Part of the issue as well is that constructing small benchmarks is quite hard because you need to place a module boundary in the way. Within a module, the compiler will usually be able to break down the abstraction and perform the appropriate specialisation work. Only across boundaries do we see the difference.
In general, though, my first order theory is that wherever possible it is better to use generics than existentials, because generics can be specialised but existentials cannot. This rule is not 100% factually accurate, but it's a good starting point: preserving type information gives the compiler more options than throwing it away. Naturally this doesn't work in all cases: generics are tricky for heterogeneous containers, for example. But it's a useful starting point.


Quicksort 'Magnetica' submission

Hi,
please add to your beautiful collection the fastest (known to me) Quicksort:
https://www.qb64.org/forum/index.php?topic=3518.msg138244#msg138244

I may have found a way to successfully port it into our program. I do need to know, though, does this visual seem correct?

Congratulations, you appear to have reinvented ternary quicksort with Yaroslavskiy partitioning and "middle element" pivot selection.  Given that, the visualisation looks correct to me.

@PCBoyGames
Many thanks, love both your video and sound.
Yes, it works correctly.
I wish people to have practical experience, not the "university" style of not going into details, as we all know, the devil is in the detail, or rather, the detail is the devil that works, heh-heh.
@chromi
Thanks, not sure, the only PDF/paper I know of is:
https://web.archive.org/web/20151002230717/http://iaroslavski.narod.ru/quicksort/DualPivotQuicksort.pdf
Does he have single-pivot variant along with dual-pivot one? My Magnetica uses single-pivot.

Both ternary and dual-pivot quicksort create three partitions, just on slightly different criteria.  Your method of doing so is the same, and characteristically leaves the equal-to-pivot values in the middle so they don't have to be swapped into position again.
I have a version of quicksort that selects two pivots (using a random sampling method, which avoids quadratic pathologies much better than any fixed choice), then checks whether they are equal to each other.  If they are, it does a ternary partition very like yours.  If not, it does a dual-pivot partition very like Yaroslavskiy's.  This tends to obtain the best qualities of both.

It seems you have superior strategy, bravo.
As for the random choosing, I avoid it since benchmarking becomes not "stable".

You could choose pivots deterministically as well, for example by taking the 0/7, 1/7, …, 7/7 positioned elements, sorting them (insertion sort is good enough), then choosing the 3rd and 6th ranked as two pivots (ie. tertiles of 8).  Or the 0/4, ¼, ½, ¾, 4/4 positioned, then the 3rd ranked for a single pivot (ie. median of 5).  It is still possible to deliberately create inputs that provoke quadratic behaviour with this (eg. ArrayV has an "AntiQSort" mode that generates them), but you should find fewer cases where your pivot is wildly out of place on average.
Or, for benchmarking, you could seed the RNG with a consistent value, but switch to a truly random seed in production.  Then instead of picking samples from fixed positions, you use the RNG to choose them, then proceed as above.
Finally, you will want to switch from quicksort to a simpler algorithm for small partitions, for which the work of selecting a good pivot and setting up the partitioning algorithm becomes a large overhead.  Insertion sort becomes superior below about a dozen elements.  Shellsort with a good choice of gap sequence could be a win for as much as 4000 elements:
size_t a=0x400, b=0x30, gap;
do {
	size_t gap = a+b+1; a /= 4; b /= 2;
	for(size_t i = gap; i < A.size(); i++)
		for(size_t j = i; j >= gap && A[j] < A[j-gap]; j -= gap)
			std::swap(A[j], A[j-gap]);
} while(gap > 1);

The above uses a modified Sedgewick 1982 sequence: 1073, 281, 77, 23, 8, 3, 1.

@chromi
Thanks for the ideas.

you will want to switch from quicksort to a simpler algorithm for small partitions,
Indeed, this is a must, however my wish was the initial Magnetica to be as simple as possible, to serve as a baseline.

Insertion sort becomes superior below about a dozen elements.
As far as I see, the magic number with Magnetica (surely for scenarios with few (or not many) distinct keys) should be bigger, my intent is to fix it as 19, but first will benchmark on two CPUs using GCC 10.2.1 and Intel v15.0, that is, to see whether modern hardware and compilers "allow" 19.

Just found this gold benchmark/source mine:
https://stackoverflow.com/questions/2786899/fastest-sort-of-fixed-length-6-int-array?rq=1
Love the branchless etudes, so my intent is to choose Pivot as the middle of 6 or 7 elements ... chosen somehow. LOVE the whole experimental attitude from all the coders there.
What is your favorite among these golden etudes?

Recommendation: Join our Discord

In case you want to use the best I could write so far:
https://www.qb64.org/forum/index.php?action=dlattach;topic=3518.0;attach=16024
It chooses median of 5 pivot - branchlessly!
Magnetica (the C source from above link) compared with qsort from Fedora 33 and BM=quicksort_Bentley_McIlroy_3way_partitioning, gcc 10.2.1 used.
Again, it outperforms both! But, now it is more robust against quadratic behavior - surely will scream with 'Organ Pipe' and such...
On laptop with i5-7200U 3.1GHz max turbo, 36GB DDR4 2133MHz:
[kaze@kaze Quicksort_says_rev4]$ gcc -O3 QS_bench_r4.c -o QS_bench_r4.elf
[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf qsort few
Allocating AUX-Buffer 21MB ...
Allocating Master-Buffer 17043MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 360 seconds.
Checking whether sort went correct... OK. Unique keys = 10

 Performance counter stats for './QS_bench_r4.elf qsort few':

        374,137.53 msec task-clock:u              #    0.999 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         4,363,067      page-faults:u             #    0.012 M/sec
 1,130,498,069,102      cycles:u                  #    3.022 GHz                      (50.00%)
 3,279,617,021,921      instructions:u            #    2.90  insn per cycle           (62.50%)
   650,533,917,251      branches:u                # 1738.756 M/sec                    (62.50%)
     5,521,100,564      branch-misses:u           #    0.85% of all branches          (62.50%)
   734,144,831,583      L1-dcache-loads:u         # 1962.233 M/sec                    (62.50%)
     6,748,748,435      L1-dcache-load-misses:u   #    0.92% of all L1-dcache accesses  (62.50%)
       401,878,659      LLC-loads:u               #    1.074 M/sec                    (50.00%)
       106,122,616      LLC-load-misses:u         #   26.41% of all LL-cache accesses  (50.00%)

<PHONE_NUMBER>28 seconds time elapsed

<PHONE_NUMBER>00 seconds user
       5.690335000 seconds sys

[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf Magnetica few
Allocating AUX-Buffer 21MB ...
Allocating Master-Buffer 17043MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 35 seconds.
Checking whether sort went correct... OK. Unique keys = 10

 Performance counter stats for './QS_bench_r4.elf Magnetica few':

         48,568.57 msec task-clock:u              #    1.000 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         4,363,068      page-faults:u             #    0.090 M/sec
   131,511,912,878      cycles:u                  #    2.708 GHz                      (50.00%)
   112,398,266,721      instructions:u            #    0.85  insn per cycle           (62.50%)
    24,083,136,669      branches:u                #  495.858 M/sec                    (62.50%)
     3,277,693,748      branch-misses:u           #   13.61% of all branches          (62.50%)
    13,332,653,082      L1-dcache-loads:u         #  274.512 M/sec                    (62.50%)
     1,657,129,638      L1-dcache-load-misses:u   #   12.43% of all L1-dcache accesses  (62.50%)
        61,079,406      LLC-loads:u               #    1.258 M/sec                    (50.00%)
        52,834,258      LLC-load-misses:u         #   86.50% of all LL-cache accesses  (50.00%)

      48.592132565 seconds time elapsed

      42.699590000 seconds user
       5.537604000 seconds sys

[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf BM few
Allocating AUX-Buffer 21MB ...
Allocating Master-Buffer 17043MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 40 seconds.
Checking whether sort went correct... OK. Unique keys = 10

 Performance counter stats for './QS_bench_r4.elf BM few':

         54,275.83 msec task-clock:u              #    1.000 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         4,363,067      page-faults:u             #    0.080 M/sec
   148,622,728,821      cycles:u                  #    2.738 GHz                      (49.99%)
   141,790,933,565      instructions:u            #    0.95  insn per cycle           (62.49%)
    29,021,159,581      branches:u                #  534.698 M/sec                    (62.50%)
     2,945,037,342      branch-misses:u           #   10.15% of all branches          (62.51%)
    20,760,966,368      L1-dcache-loads:u         #  382.509 M/sec                    (62.51%)
     2,254,743,473      L1-dcache-load-misses:u   #   10.86% of all L1-dcache accesses  (62.51%)
       206,505,163      LLC-loads:u               #    3.805 M/sec                    (50.00%)
        97,481,857      LLC-load-misses:u         #   47.21% of all LL-cache accesses  (49.99%)

      54.295299616 seconds time elapsed

      48.359850000 seconds user
       5.552888000 seconds sys

[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf qsort many
Allocating FILE-Buffer 23MB ...
Allocating AUX-Buffer 189MB ...
Allocating Master-Buffer 18938MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 535 seconds.
Checking whether sort went correct... OK. Unique keys = 2847531

 Performance counter stats for './QS_bench_r4.elf qsort many':

        549,999.00 msec task-clock:u              #    1.000 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         4,896,780      page-faults:u             #    0.009 M/sec
 1,668,181,170,985      cycles:u                  #    3.033 GHz                      (50.00%)
 2,936,904,303,452      instructions:u            #    1.76  insn per cycle           (62.50%)
   656,551,483,104      branches:u                # 1193.732 M/sec                    (62.50%)
    24,993,461,483      branch-misses:u           #    3.81% of all branches          (62.50%)
   675,411,011,343      L1-dcache-loads:u         # 1228.022 M/sec                    (62.50%)
     8,360,278,671      L1-dcache-load-misses:u   #    1.24% of all L1-dcache accesses  (62.50%)
       224,636,221      LLC-loads:u               #    0.408 M/sec                    (50.00%)
       128,684,015      LLC-load-misses:u         #   57.29% of all LL-cache accesses  (50.00%)

<PHONE_NUMBER>23 seconds time elapsed

<PHONE_NUMBER>00 seconds user
       6.272608000 seconds sys

[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf Magnetica many
Allocating FILE-Buffer 23MB ...
Allocating AUX-Buffer 189MB ...
Allocating Master-Buffer 18938MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 229 seconds.
Checking whether sort went correct... OK. Unique keys = 2847531

 Performance counter stats for './QS_bench_r4.elf Magnetica many':

        244,034.76 msec task-clock:u              #    1.000 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         4,896,784      page-faults:u             #    0.020 M/sec
   728,706,789,305      cycles:u                  #    2.986 GHz                      (50.00%)
   801,207,820,988      instructions:u            #    1.10  insn per cycle           (62.50%)
   152,404,608,907      branches:u                #  624.520 M/sec                    (62.50%)
    18,717,429,150      branch-misses:u           #   12.28% of all branches          (62.50%)
   105,275,157,071      L1-dcache-loads:u         #  431.394 M/sec                    (62.50%)
     9,759,976,614      L1-dcache-load-misses:u   #    9.27% of all L1-dcache accesses  (62.50%)
       262,730,414      LLC-loads:u               #    1.077 M/sec                    (50.00%)
       220,216,469      LLC-load-misses:u         #   83.82% of all LL-cache accesses  (50.00%)

<PHONE_NUMBER>14 seconds time elapsed

<PHONE_NUMBER>00 seconds user
       6.118416000 seconds sys

[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf BM many
Allocating FILE-Buffer 23MB ...
Allocating AUX-Buffer 189MB ...
Allocating Master-Buffer 18938MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 230 seconds.
Checking whether sort went correct... OK. Unique keys = 2847531

 Performance counter stats for './QS_bench_r4.elf BM many':

        245,002.86 msec task-clock:u              #    1.000 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         4,896,781      page-faults:u             #    0.020 M/sec
   731,986,011,848      cycles:u                  #    2.988 GHz                      (50.00%)
   655,933,578,244      instructions:u            #    0.90  insn per cycle           (62.50%)
   165,775,989,922      branches:u                #  676.629 M/sec                    (62.50%)
    18,932,375,613      branch-misses:u           #   11.42% of all branches          (62.50%)
    85,130,377,588      L1-dcache-loads:u         #  347.467 M/sec                    (62.50%)
     8,621,483,859      L1-dcache-load-misses:u   #   10.13% of all L1-dcache accesses  (62.50%)
       228,200,878      LLC-loads:u               #    0.931 M/sec                    (50.00%)
       163,363,682      LLC-load-misses:u         #   71.59% of all LL-cache accesses  (50.00%)

<PHONE_NUMBER>12 seconds time elapsed

<PHONE_NUMBER>00 seconds user
       6.076702000 seconds sys

[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf qsort ALL
Allocating FILE-Buffer 1916MB ...
Allocating AUX-Buffer 15329MB ...
Allocating Master-Buffer 15329MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 520 seconds.
Checking whether sort went correct... OK. Unique keys =<PHONE_NUMBER>

 Performance counter stats for './QS_bench_r4.elf qsort ALL':

        543,037.81 msec task-clock:u              #    0.993 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         7,849,013      page-faults:u             #    0.014 M/sec
 1,623,485,482,541      cycles:u                  #    2.990 GHz                      (50.00%)
 2,271,412,145,371      instructions:u            #    1.40  insn per cycle           (62.50%)
   537,049,261,949      branches:u                #  988.972 M/sec                    (62.50%)
    28,403,315,111      branch-misses:u           #    5.29% of all branches          (62.50%)
   520,083,072,189      L1-dcache-loads:u         #  957.729 M/sec                    (62.50%)
     6,711,300,111      L1-dcache-load-misses:u   #    1.29% of all L1-dcache accesses  (62.50%)
       179,157,605      LLC-loads:u               #    0.330 M/sec                    (50.00%)
       101,853,848      LLC-load-misses:u         #   56.85% of all LL-cache accesses  (50.00%)

<PHONE_NUMBER>09 seconds time elapsed

<PHONE_NUMBER>00 seconds user
      12.702404000 seconds sys

[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf Magnetica ALL
Allocating FILE-Buffer 1916MB ...
Allocating AUX-Buffer 15329MB ...
Allocating Master-Buffer 15329MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 302 seconds.
Checking whether sort went correct... OK. Unique keys =<PHONE_NUMBER>

 Performance counter stats for './QS_bench_r4.elf Magnetica ALL':

        324,320.50 msec task-clock:u              #    0.991 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         7,849,024      page-faults:u             #    0.024 M/sec
   953,068,016,151      cycles:u                  #    2.939 GHz                      (50.00%)
 1,078,558,010,841      instructions:u            #    1.13  insn per cycle           (62.50%)
   202,072,815,438      branches:u                #  623.065 M/sec                    (62.49%)
    24,712,860,248      branch-misses:u           #   12.23% of all branches          (62.50%)
   143,013,173,669      L1-dcache-loads:u         #  440.962 M/sec                    (62.50%)
     7,341,720,240      L1-dcache-load-misses:u   #    5.13% of all L1-dcache accesses  (62.51%)
       206,349,700      LLC-loads:u               #    0.636 M/sec                    (50.00%)
       171,267,094      LLC-load-misses:u         #   83.00% of all LL-cache accesses  (50.00%)

<PHONE_NUMBER>69 seconds time elapsed

<PHONE_NUMBER>00 seconds user
      12.146404000 seconds sys

[kaze@kaze Quicksort_says_rev4]$ perf stat -d ./QS_bench_r4.elf BM ALL
Allocating FILE-Buffer 1916MB ...
Allocating AUX-Buffer 15329MB ...
Allocating Master-Buffer 15329MB ...
Sorting in single-thread<PHONE_NUMBER> elements...
Done in 312 seconds.
Checking whether sort went correct... OK. Unique keys =<PHONE_NUMBER>

 Performance counter stats for './QS_bench_r4.elf BM ALL':

        336,008.08 msec task-clock:u              #    0.994 CPUs utilized
                 0      context-switches:u        #    0.000 K/sec
                 0      cpu-migrations:u          #    0.000 K/sec
         7,849,047      page-faults:u             #    0.023 M/sec
   987,096,373,815      cycles:u                  #    2.938 GHz                      (50.00%)
   896,653,900,788      instructions:u            #    0.91  insn per cycle           (62.50%)
   226,954,097,302      branches:u                #  675.442 M/sec                    (62.50%)
    26,002,237,784      branch-misses:u           #   11.46% of all branches          (62.50%)
   119,818,264,279      L1-dcache-loads:u         #  356.593 M/sec                    (62.50%)
     7,935,978,293      L1-dcache-load-misses:u   #    6.62% of all L1-dcache accesses  (62.50%)
       198,601,062      LLC-loads:u               #    0.591 M/sec                    (50.00%)
       148,030,944      LLC-load-misses:u         #   74.54% of all LL-cache accesses  (50.00%)

<PHONE_NUMBER>29 seconds time elapsed

<PHONE_NUMBER>00 seconds user
      12.847897000 seconds sys

[kaze@kaze Quicksort_says_rev4]$

How does it compare against PDQSort?

@Gaming32
Don't know, it would be good to compare them, but from what I see at first glance, Magnetica is superior.

I have sent the algorithm in as part of a pull request to the ArrayV Extra Sorts Pack. Keep an eye out: Gaming32/ArrayV-Extra-Sorts#1


avoid exit in entrypoint

To follow & rebase on https://github.com/dogecoin/docker/pull/29.
Last fix to make entrypoint compatible for tests of https://github.com/dogecoin/docker/pull/25.

#29 merged, rebased and ready for review.


[py cli] api clients submit-job is broken

Python api clients submit-job is broken: ValueError: invalid literal for int() with base 10: 'C'.
No other cue is given. Something must have changed in the Job spec recently.
Repro:
from bacalhau_sdk.api import submit
from bacalhau_sdk.config import get_client_id
from bacalhau_apiclient.models.storage_spec import StorageSpec
from bacalhau_apiclient.models.spec import Spec
from bacalhau_apiclient.models.job_spec_language import JobSpecLanguage
from bacalhau_apiclient.models.job_spec_docker import JobSpecDocker
from bacalhau_apiclient.models.job_sharding_config import JobShardingConfig
from bacalhau_apiclient.models.job_execution_plan import JobExecutionPlan
from bacalhau_apiclient.models.deal import Deal

data = dict(
    APIVersion='V1beta1',
    clientid=get_client_id(),
    Spec=Spec(
        engine="Docker",
        verifier="Noop",
        publisher="IPFS",
        docker=JobSpecDocker(
            image="ubuntu",
            entrypoint=["echo", "Hello World!"],
        ),
        timeout=1800,
        deal=Deal(concurrency=1, confidence=0, min_bids=0),
    ),
)

try:
  submit(data)
except Exception as e:
  print(e)
  print(data)

It looks like __deserialize_primitive in api_client.py . When it is trying to deserialize the SubmitResponse, for some reason it thinks it should deser RequesterPublicKey as list[int] instead of list[byte] or something more useful.
I found this in the swagger doc
{
    "RequesterPublicKey":  {
        "description": "The public key of the Requester node that created this job\nThis can be used to encrypt messages back to the creator",
    "type": "array",
    "items": {
        "type": "integer"
    }
}

so it looks like the swagger doc is wrong in this case.

@rossjones 's suggestion:
I think you can tag the fields in the Go code with something like swagger:"string" format="base64" alongside the json tagh.

Tried to manually edit the swagger doc by changing "type": "integer" to "type": "string", it solves the issue but it's a hack. Ross's suggestion (see above) is definitely more promising.

Even though swaggo should support tagging fields like this:
type JobRequester struct {
	// The ID of the requester node that owns this job.
	RequesterNodeID string `json:"RequesterNodeID,omitempty" example:"QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF"`

	// The public key of the Requester node that created this job
	// This can be used to encrypt messages back to the creator
	RequesterPublicKey PublicKey `json:"RequesterPublicKey,omitempty" swaggertype:"string" format:"base64"`
}

It still outputs:
"RequesterPublicKey": {
                    "description": "The public key of the Requester node that created this job\nThis can be used to encrypt messages back to the creator",
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }

Can the PublicKey just be changed to a string, as it's supposed to be a base64 encoded string anyway, without breaking the API?

Using "global overrides" (https://github.com/swaggo/swag#use-global-overrides-to-support-a-custom-type) seems to be what we're looking for.
"RequesterPublicKey": {
                    "description": "The public key of the Requester node that created this job\nThis can be used to encrypt messages back to the creator",
                    "type": "string"
                }


Support routing for default WSS endpoint

For all APIs apart from the WSS endpoint, the default endpoint can be used across regions. However, for subscriptions, the region specific endpoint has to be used:

default: wss://subscriptions.graph.cool/v1/__PROJECT_ID__
AP: wss://subscriptions.ap-northeast-1.graph.cool/v1/cislqwo6e039e01171nzb9mxw
US: wss://subscriptions.us-west-2.graph.cool/v1/cislqwo6e039e01171nzb9mxw

It should be possible for all regions to use the default endpoint.

We don't want to proxy websocket connections as they have to stay open for an extended period of time. Rather, we should redirect to the correct region. Some ws implementations are known to not follow redirects, so we should verify that this works with Apollo in most cases.
See for example https://github.com/websockets/ws/issues/812


S3 PutObjectRequest RequestId

Hello,
I am trying to get request ids (x-amz-request-id and x-amz-id-2) from Put requests, and currently SDK code does not have such function that I can use in PutObjectResult.cpp and .h
But, I see the functions exist in GetObjectResult.cpp and .h (someone already suggested this but only for Get. https://github.com/aws/aws-sdk-cpp/issues/554).
Would you please add the similar functions to PutObjectResult.cpp and .h as well?
Thank you,
Leo Song

Would you also please do the same for ListObjectsResult as well?


Custom datasets

Hello, I made an error with custom datasets, how can I solve it?

Hello, this error is caused by mismatch of image size between your dataset and the model in which input image size is supposed to be 448448 when "cait_m48_448" is set as backbone.
Please check if resize to 448448 in your custom dataset class has an effect!


App Crashes on OCR

Future _read() async {
List texts = [];
try {
texts = await FlutterMobileVision.read(
waitTap: true,
flash: _torchOcr,
autoFocus: _autoFocusOcr,
multiple: _multipleOcr,
showText: _showTextOcr,
preview: _previewOcr,
camera: _ocrCamera,
fps: 2.0,
);
setState(() {
currentLogItem.washOption = texts[0].value;
});
} on Exception {
texts.add(OcrText('Failed to recognize text'));
}
}
}

same issue

I resolved the issue by adding the OCR activity to my AndroidManifest.xml after other activity nodes

<activity android:name="io.github.edufolly.fluttermobilevision.ocr.OcrCaptureActivity" />

Yes, even I've same issue...

E/AndroidRuntime(24295): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Thread$State java.lang.Thread.getState()' on a null object reference
E/AndroidRuntime(24295): 	at io.github.edufolly.fluttermobilevision.ui.CameraSource$FrameProcessingRunnable.release(CameraSource.java:1142)
E/AndroidRuntime(24295): 	at io.github.edufolly.fluttermobilevision.ui.CameraSource$FrameProcessingRunnable.access$900(CameraSource.java:1119)
E/AndroidRuntime(24295): 	at io.github.edufolly.fluttermobilevision.ui.CameraSource.release(CameraSource.java:334)
E/AndroidRuntime(24295): 	at io.github.edufolly.fluttermobilevision.ui.CameraSourcePreview.release(CameraSourcePreview.java:85)
E/AndroidRuntime(24295): 	at io.github.edufolly.fluttermobilevision.util.AbstractCaptureActivity.onDestroy(AbstractCaptureActivity.java:124)
E/AndroidRuntime(24295): 	at android.app.Activity.performDestroy(Activity.java:8251)
E/AndroidRuntime(24295): 	at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1364)
E/AndroidRuntime(24295): 	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5290)

This is my code:
`class OCRPage extends StatefulWidget {
@override
_OCRPageState createState() => _OCRPageState();
}
class _OCRPageState extends State {
int _ocrCamera = FlutterMobileVision.CAMERA_BACK;
String _text = "TEXT";
Future _read() async {
List texts = [];
try {
texts = await FlutterMobileVision.read(
camera: _ocrCamera,
waitTap: true,
);
  setState(() {
    _text = texts[0].value;
  });
} on Exception {
  texts.add(OcrText('Failed to recognize text'));
}

}
@override
Widget build(BuildContext context) {
// TODO: implement build
return SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Lottie.asset('assets/scan-some-words.json', repeat: true),
SizedBox(height: 20),
Text(
_text,
style: GoogleFonts.orbitron(
textStyle: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500)),
textAlign: TextAlign.center,
),
SizedBox(height: 10),
Text(
Morse(_text).encode(),
style: GoogleFonts.orbitron(
textStyle: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500)),
textAlign: TextAlign.center,
),
SizedBox(height: 30),
ElevatedButton(
onPressed: _read,
child: new Text('Start Scanning'),
// color: Color(0xFFFF16CD),
// splashColor: Colors.orangeAccent,
),
SizedBox(height: 10),
Text(
'Tap on the text to convert into Morse Code',
style: TextStyle(color: Color(0xffE6BBFC)),
)
]));
}
}`

found in a other camera thread, it fixed this issue
@SuppressLint("Assert")
private void release() {
assert (processingThread == null || processingThread.getState() == State.TERMINATED);
if (mDetector != null) {
mDetector.release();
mDetector = null;
}
}

I have just commented the following lines and it works, not sure it's the right way.
    @SuppressLint("Assert")
    private void release() {

//            assert (processingThread.getState() == State.TERMINATED);
//                mDetector.release();
//                mDetector = null;
    }

found in a other camera thread, it fixed this issue
replace with this in CameraSource.java from the library.
this is my path but you can adjust for yours
D:\flutter.pub-cache\hosted\pub.dartlang.org\flutter_mobile_vision-0.1.4+1\android\src\main\java\io\github\edufolly\fluttermobilevision\ui
@SuppressLint("Assert")
private void release() {
assert (processingThread == null || processingThread.getState() == State.TERMINATED);
if (mDetector != null) {
mDetector.release();
mDetector = null;
}
}

It does not work, anything else you did?

@edufolly

Same issue.. Does someone fixed that or know other way to do same OCR text recognition?
Thanks

I got the same issue as well. Error message:
E/AndroidRuntime( 5573): java.lang.RuntimeException: Unable to destroy activity {com.example.receipt_scanner/io.github.edufolly.fluttermobilevision.ocr.OcrCaptureActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Thread$State java.lang.Thread.getState()' on a null object reference
Seems like a basic Nullpointer exception which causes unable to destroy activity {com.example.receipt_scanner/io.github.edufolly.fluttermobilevision.ocr.OcrCaptureActivity}.  Currently I have not the time to investigate more on this error. maybe at the end of this week.

I have found that this bug looks to be tied to the gradle version.
When I upgrade my build.grade to classpath to version com.android.tools.build:gradle:4.1.0 or greater in conjunction to the gradle-wrapper.properties distribution to distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip or greater, this is what causes this library to crash.
I have been able to fix this problem by tying my app to older versions com.android.tools.build:gradle:3.5.0 and distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip respectively.
Although it is not ideal nor a good long-term solution, it at least is a temporary workaround I have found in case it helps anyone else.


Edit git url  in order to avoid Permission denied

<EMAIL_ADDRESS>Permission denied (publickey).

Thanks!


How do i set the VIDIT dataset?

hi~The following is my error warning.
[09/03/2021 10:30:01 INFO] Running command TRAIN
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\User\Desktop\python\STUDY_CNN_imagematching\LISRD-master\lisrd\experiment.py", line 130, in
args.func(config, exper_dir, args)
File "C:\Users\User\Desktop\python\STUDY_CNN_imagematching\LISRD-master\lisrd\experiment.py", line 39, in _train
config['data']['name'])(config['data'], device)
File "C:\Users\User\Desktop\python\STUDY_CNN_imagematching\LISRD-master\lisrd\datasets\mixed_dataset.py", line 32, in init
device))
File "C:\Users\User\Desktop\python\STUDY_CNN_imagematching\LISRD-master\lisrd\datasets\vidit.py", line 27, in init
files = np.sort(files).reshape(300, 40)
ValueError: cannot reshape array of size 11999 into shape (300,40)

here are many datasets, which dataset is suitable for use?
And what should the folder structure be?

Hi, the train dataset of track 2 with the original file structure should be the right one (i.e. all images in the same folder).
But apparently you only have 11999 images instead of the 12000 that are expected. Maybe something went wrong when downloading the dataset? I recommend you to try again to download it and check that you get 12000 images.

Thank you for your reply.


Use conditional requests for API requests

https://developer.github.com/v3/#conditional-requests
Allows us to drastically cut down on the number of API requests we've made if there aren't any changes since the last time we accessed the endpoint.

I can take a look at this. Do you think we should be caching the resource last modified values within a session or between multiple sessions?


index.md: index-update

A lot of broken links here from https://docs.dasharo.com/unified/novacustom/. Will have to check it out and try to fix it.

Did the rebase as follows:

git rebase --onto index-2024-05-23 master
git log ro check
git push -f origin index-2024-05-23

Checks are now green. Hope I have done it as I should.


Noticed typo on the log

Signed-off-by: Matthias Wessendorf<EMAIL_ADDRESS>Fixes minor typo, I noticed on the log

/lgtm
/approve

/ok-to-test

/retest


⚠ Bofrost.at has degraded performance

In 14de907, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2326 ms

Resolved: Bofrost.at performance has improved in 8ff9021.


Limit the reading of CSVs in seed directory to dbt seed

When using dbt commands beyond dbt seed (i.e. dbt run), the parse_seed_file function in parser.py loads the CSV file unnecessarily. In the event that there are larger CSVs in the seed directory, this load time can take a while.
To limit the loading of the CSVs, the following section of parse_seed_file should only run during dbt seed.
 try:
        table = dbt.clients.agate_helper.from_csv(abspath)
    except ValueError as e:
        dbt.exceptions.raise_compiler_error(str(e), node)
    table.original_abspath = abspath
    node['agate_table'] = table

The original Slack conversation that this issue came up in is here.

This is super exciting @beckjake! Thanks for putting a together a fix -- looking forward to testing it out :)


Review Informal Systems handler interfaces

Informal Systems are building some rust IBC handlers that could be integrated in a to-be-designed rust framework. They probably make more sense in native code than cosmwasm contracts, and I do not want to propose them being contracts, but I think using similar idioms and types in the API would be a nice step to getting a common language for Rust developers, rather than every group reinventing the wheel. It is also good for us to have this discussion on naming and we could port some smaller changes back to CosmWasm as well.
They have not really implemented anything, but have a large description in ADR3 in their IBC Repo.

[ ] Read ADR (Ethan)
[ ] Read ADR (Simon)
[ ] Prepare thoughts on what ideas we can bring to CosmWasm, which ideas CosmWasm can bring to them
[ ] Set up meeting to discuss API design

@webmaster128 please take a look at this when you are back from vacation. I think if nothing else the naming discussion (logs vs. event, emit vs. add_log, Context vs ResultBuilder) would be nice to have, as they have spend a while thinking on this issue as well and have some similar types and interfaces

Is this still relevant? Can it be closed?

Actually, it would make sense to spend an hour looking at their API and see if you get any naming inspiration.
They return multiple events (not just attributes on one event), so not the same. I think most (all?) naming issues have been addressed, but do take a skim before closing

Did review. Can close


Support folder tracks and docked fx chains in CF_Get{Track,Take}FXChain

:white_check_mark: Build sws 235-master completed (commit https://github.com/reaper-oss/sws/commit/3fd8846cbc by @cfillion)

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2019, ARCH=x64

build/BuildUtils/SWS_Template.ReaperLangPack
build/BuildUtils/whatsnew.html
build/reaper_sws-x64.pdb
build/sws-<IP_ADDRESS>-Windows-x64-cf_gettrackfxchain-folders-3fd8846c.exe

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2019, ARCH=x86

build/BuildUtils/SWS_Template.ReaperLangPack
build/BuildUtils/whatsnew.html
build/reaper_sws-x86.pdb
build/sws-<IP_ADDRESS>-Windows-x86-cf_gettrackfxchain-folders-3fd8846c.exe

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=armv7l

build/sws-<IP_ADDRESS>-Linux-armv7l-cf_gettrackfxchain-folders-3fd8846c.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=x86_64

build/sws-<IP_ADDRESS>-Linux-x86_64-cf_gettrackfxchain-folders-3fd8846c.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=i686

build/sws-<IP_ADDRESS>-Linux-i686-cf_gettrackfxchain-folders-3fd8846c.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=aarch64

build/sws-<IP_ADDRESS>-Linux-aarch64-cf_gettrackfxchain-folders-3fd8846c.tar.xz


J-Stars Victory VS [PCSG00300]

App summary

App name: J-Stars Victory VS
App serial: PCSG00300
App version: 1.00

Vita3K summary

Version: v0.1.6
Build number: 2854
Commit hash: https://github.com/vita3k/vita3k/commit/1ce445ce
CPU backend: Dynarmic
GPU backend: Vulkan

Test environment summary

Tested by: nishinji
OS: Windows 10
CPU: Ryzen 9 3950x
GPU: RTX 3060ti
RAM: 32 GB

Issues
can't proceed to menu
Screenshots

Log
vita3k.log
Recommended labels
intro

as of https://github.com/Vita3K/Vita3K/commit/343d438e4ee6b27f46b71accd29fb8b6f4e07d20, the game did display graphics in OpenGL, but in Vulkan it did boot but crashed shortly after.
Screenshots

Logs
vita3k (OGL).log
vita3k (Vulkan).log


version 3.8.2 - adding hard coded account numbers to the module

Description
Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the examples/* directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by running terraform init && terraform apply without any further changes.
If your request is for a new feature, please use the Feature request template.

[ ] ✋ I have searched the open/closed issues and my issue is not listed.

⚠ Note
Before you submit an issue, please perform the following first:

Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
Re-initialize the project root to pull down modules: terraform init
Re-attempt your terraform plan or apply and check if the issue still persists

Versions

Module version [Required]:
3.8.2
Terraform version:

Provider version(s):

Reproduction Code [Required]

Steps to reproduce the behavior:

Expected behavior

Dynamic or variable configuration of the feature
Actual behavior
Forced accounts numbers :
List of AWS regions where permissions should be granted to the specified Elastic Load Balancing account ID ( https://docs.aws.amazon.com/elasticloadbalancing/latest/application/enable-access-logging.html#attach-bucket-policy )
elb_service_accounts = {
us-east-1      = "127311923021"
us-east-2      = "033677994240"
us-west-1      = "027434742980"
us-west-2      = "797873946194"
af-south-1     = "098369216593"
ap-east-1      = "754344448648"
ap-south-1     = "718504428378"
ap-northeast-1 = "582318560864"
ap-northeast-2 = "600734575887"
ap-northeast-3 = "383597477331"
ap-southeast-1 = "114774131450"
ap-southeast-2 = "783225319266"
ap-southeast-3 = "589379963580"
ca-central-1   = "985666609251"
eu-central-1   = "054676820928"
eu-west-1      = "156460612806"
eu-west-2      = "652711504416"
eu-west-3      = "009996457667"
eu-south-1     = "635631232127"
eu-north-1     = "897822967062"
me-south-1     = "076674570225"
sa-east-1      = "507241528517"
us-gov-west-1  = "048591011584"
us-gov-east-1  = "190560391635"
}

Terminal Output Screenshot(s)

Additional context

Regions available before August 2022 have static AWS account numbers and won't change in the future, so we hard-code them into the module. You should not need to specify your AWS account number in the bucket policy to get ELB log delivery.


CI: collect kind logs on integration testing

This action is not executed because It is using pull request target, please if you are happy, please merge it.

/approved


Previous Versions Removed, Only One Version Available

Description
It seems that previous versions of the package are no longer available, and the page now only points to the latest version (4.2.2). The release history is showing a single version, released about 5 hours ago.
Steps to Reproduce

Go to the package release page.
Check the "Release history" section.
Observe that only one version (4.2.2) is displayed.

Expected Behavior
The page should list all previous versions of the package for users to download or reference as needed.
Actual Behavior
Only the latest version (4.2.2) is displayed, and all previous versions appear to have been removed.
Impact

Users relying on older versions cannot access or install them.
Dependency issues might arise for projects that are tied to earlier versions.

Screenshot

I intentionally deleted previous versions, since I think users should encode categorical data themselves.


Universal caching node

Is there an existing issue for this?

[X] I have searched the existing issues.

Please describe the feature you have in mind and explain what the current shortcomings are?
AYON Cache node in compliance with Houdini's vanilla filecache node.
How would you imagine the implementation of the feature?
There are some ideas: We can create

our own AYON filecache node
Wrap the existing filecache nodes inside some AYON HDA
Extend filecache node defintion and add AYON functionality

Are there any labels you wish to add?

[X] I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:
No response
Additional context:
Related to Node based houdini integration Epic.
It was also mentioned in Houdini's Future plan and it was discussed in Houdini WG

This may be superseded by "Generic ROP publishing" where essentially any ROP-like node could be made into a publishable node - which means that #2 may fix this issue.
Of course, even then it may be worth investigating whether a dedicated AYON Cache HDA is worth it - but at the same time, many studios may already be rolling their own or be using the Houdini LABs filecache node, etc.

We need to decide if this is solved by #2 or not.