text:
core: Add inclusive and additive amount calculation in SEP-31

PR Checklist
PR Structure

[x] This PR has reasonably narrow scope (if not, break it down into smaller PRs).
[x] This PR avoids mixing refactoring changes with feature changes (split into two PRs
otherwise).
[x] This PR's title starts with name of package that is most changed in the PR, ex.
paymentservice.stellar, or all or doc if the changes are broad or impact many
packages.

Thoroughness

[ ] This PR adds tests for the most critical parts of the new functionality or fixes.

What
Add inclusive and additive amount calculation in SEP-31. Default to "inclusive"
Why
There are anchors who calculate amount in the following equation.
amount_in = amount + fee (additive)
Known limitations
Demo wallet won't work with additive settings.

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Also, it would be great to add tests to make sure we cover all these cases. This part of the code is a bit complicated and we should have tests in place to make sure a change won't break things here.

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr195.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr195.previews.kube001.services.stellar-ops.com/

repo: stellar/java-stellar-anchor-sdk


text:
Change to Circle USDC.

What
Switching e2e tests to use circle's USDC.
Why
It's easier to fund the distribution account with circle's USDC, then having one more asset to maintain during testnet resets.
Known limitations
[TODO or N/A]
Checklist
PR Structure

[ ] This PR has a reasonably narrow scope (if not, break it down into smaller PRs).
[ ] This PR title and description are clear enough for anyone to review it.
[ ] This PR does not mix refactoring changes with feature changes (split into two PRs otherwise).

Thoroughness

[ ] This PR adds tests for the new functionality or fixes.
[ ] This PR contains the link to the Jira ticket it addresses.

Configs and Secrets

[ ] No new CONFIG variables are required -OR- the new required ones were added to the helmchart's values.yaml file.
[ ] No new CONFIG variables are required -OR- the new required ones were added to the deployments (pr-preview, dev, demo, prd).
[ ] No new SECRETS variables are required -OR- the new required ones were mentioned in the helmchart's values.yaml file.
[ ] No new SECRETS variables are required -OR- the new required ones were added to the deployments (pr-preview secrets, dev secrets, demo secrets, prd secrets).

Release

[ ] This is not a breaking change.
[ ] This is ready for production.. If your PR is not ready for production, please consider opening additional complementary PRs using this one as the base. Only merge this into develop or main after it's ready for production!

Deployment

[ ] Does the deployment work after merging?

stellar-disbursement-platform-backend-preview is available here:SDP:      https://sdp-backend-pr132.previews.kube001.services.stellar-ops.com/healthAP:       https://sdp-ap-pr132.previews.kube001.services.stellar-ops.com/healthFrontend: https://sdp-backend-dashboard-pr132.previews.kube001.services.stellar-ops.com

stellar-disbursement-platform-backend-preview is available here:SDP:      https://sdp-backend-pr132.previews.kube001.services.stellar-ops.com/healthAP:       https://sdp-ap-pr132.previews.kube001.services.stellar-ops.com/healthFrontend: https://sdp-backend-dashboard-pr132.previews.kube001.services.stellar-ops.com

source: gharchive/pull-request

authors: marwen-abid stellar-jenkins

license_type: permissive

license_source: github-api


text:
Реализовать popup для отдельных маркеров

Контекст
Как пользователь я хочу иметь возможность быстро просматривать детали событий, отображаемых на карте. Для этого при нажатии на отдельный марке должен отображаться popup, содержащий основную информацию по событию.
Задача
Реализовать отображение основных деталей события в popup-е при нажатии на маркер:

Дату события
Адрес события
Тип события
Дополнительное описание.

@gellouglas, какие варианты "типа события" будут?  Доп-описание будет только текст, или картинки в попапах тоже будут?

@gellouglas, какие варианты "типа события" будут? Доп-описание будет только текст, или картинки в попапах тоже будут?

Типы событий на маркерах:

попадание арт снаряда
попадание фугасной бомбы
попадание зажигательной бомбы

В доп описании пока только текст. Мне кажется перегружать картинкой хинты - не лучшая идея. Картинки наверное будет показывать в поле расширенного описания на панели.

source: gharchive/issue

authors: gellouglas stepan-anokhin vzakhari

repo: stepan-anokhin/spb-histmap

license: MIT


text:
Check your .tlu/properties.dat properties

I cant install the bot and the update have a bug or anything.
Here a screenshot: http://prntscr.com/ixqgua

Try to download the newest version manually: https://github.com/stephan-strate/teamspeak-league-update/releases/download/3.0.1/teamspeak-league-update.jar and delete your .tlu folder.
I had a bug in Version 3.0.0, which caused this issue.

Where is the .tlu folder?

It is in the same folder as your teamspeak-league-update.jar, it might be hidden by your system. Try to show hidden files and folders.

Thanks man!

All setups are right.
Here a screen: http://prntscr.com/iy63p0

I reconnect with my second ID and dont get my rank.

I connect with the verifyed ID from bot. The ID is on the reconnect the same, what I mean.

Difficult to tell where the problem is. You can send me your .tlu folder to my mail address (you can find my mail address on my profile, left side)

I released a new version 3.0.2 with a small bugfix. This should fix your problems, you might need to delete your .tlu/properties.dat

authors: NaturFront stephan-strate

repo: stephan-strate/teamspeak-league-update


text:
Any plan to support NDJSON?

Hello.
I think glaze is a great library.
I have started to use glaze when I write new programs.
Next phase, I would like to replace other libraries with glaze in existing programs where speed is important, but NDJSON(Newline Delimited JSON) support is an issue.
http://ndjson.org/
As far as I know, glaze does not support NDJSON.
Are there any plans to support NDJSON?

NDJSON is a reasonable and great suggestion. We'll try to add support for this soon, probably as a compile time option.

@toge
NDJSON support has been added for array types like std::array, std::vector, std::tuple, and glz::array
For runtime deduced variant types see this Variant Handling documentation on the Wiki. This will let you deduce the type from the NDJSON.
Here are some tests that demonstrate the behavior and calling syntax:
      std::vector<std::string> x = { "Hello", "World", "Ice", "Cream" };
      std::string s = glz::write_ndjson(x);

      expect(s ==
R"("Hello"
"World"
"Ice"
"Cream")");

      x.clear();

      glz::read_ndjson(x, s);
      expect(x[0] == "Hello");
      expect(x[1] == "World");
      expect(x[2] == "Ice");
      expect(x[3] == "Cream");

Another example:
      std::tuple<my_struct, sub_thing> x{};

      std::string s = glz::write_ndjson(x);

      expect(s ==
R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]}
{"a":3.14,"b":"stuff"})");

      auto& first = std::get<0>(x);
      auto& second = std::get<1>(x);

      first.hello.clear();
      first.arr[0] = 0;
      second.a = 0.0;
      second.b.clear();

      glz::read_ndjson(x, s);

      expect(first.hello == "Hello World");
      expect(first.arr[0] = 1);
      expect(second.a == 3.14);
      expect(second.b == "stuff");

@stephenberry
Thanks a lot!
It is wonderful.
I will give it a try!

authors: stephenberry toge

repo: stephenberry/glaze


text:
Restrict use of qualified table names

Qualified table names are not allowed when creating indexes or foreign key references.
Fixes #395

Nice solution! Thank you!

authors: jlawton stephencelis

license: mit

license_source: bigquery


text:
Fix positional argument count on get_db_prep_value

When I try to run the Wordpress importer with the latest git head of Mezzanine (ee24a48b5f33) and Django 1.10.1, I get the error reproduced at the bottom of this comment when it tries to import WordPress pages. This occurs on both SQLite (which didn't experience this problem in February when I was last experimenting) and PostgreSQL (which I didn't test previously).
Despite spending a bit of time looking into it, I'm not totally sure why this started appearing now. The code at core/fields.py:103 doesn't appear to have changed since 2012 and the Django API for this function hasn't changed since Django 1.2. Probably Django is passing the connection object now regardless of whether a multi-tenant DB configuration is used or not, and maybe it wasn't before?
In any case, I'm not sure what the hiccup is, but now that I got it working, I'm not super interested in spending more time hunting down the root cause. It's working again with the attached patch. Hope this helps. :smile:
Imported comment by: Test
Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_from_command_line(sys.argv)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
   utility.execute()
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 359, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/core/management/base.py", line 294, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/core/management/base.py", line 345, in execute
    output = self.handle(*args, **options)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/Mezzanine-4.2.0-py3.5.egg/mezzanine/blog/management/base.py", line 232, in handle
    page, created = RichTextPage.objects.get_or_create(**page)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/query.py", line 473, in get_or_create
    return self.get(**lookup), False
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/query.py", line 379, in get
    num = len(clone)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/query.py", line 238, in __len__
    self._fetch_all()
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/query.py", line 1087, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/query.py", line 54, in __iter__
    results = compiler.execute_sql()
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 824, in execute_sql
    sql, params = self.as_sql()
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 376, in as_sql
    where, w_params = self.compile(self.where) if self.where is not None else ("", [])
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 353, in compile
    sql, params = node.as_sql(self, self.connection)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/sql/where.py", line 79, in as_sql
    sql, params = compiler.compile(child)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 353, in compile
    sql, params = node.as_sql(self, self.connection)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/lookups.py", line 156, in as_sql
    rhs_sql, rhs_params = self.process_rhs(compiler, connection)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/lookups.py", line 92, in process_rhs
    return self.get_db_prep_lookup(value, connection)
  File "/home/jeff/mez_test/mez_venv/lib/python3.5/site-packages/django/db/models/lookups.py", line 184, in get_db_prep_lookup
    [get_db_prep_value(value, connection, prepared=True)]
TypeError: get_db_prep_value() takes 2 positional arguments but 3 were given

Thanks for tracking this down!
I had a look myself and the code in Django is a bit inconsistent - sometimes it's defined as a positional arg, and sometimes as a keyword arg. Anyway it looks like the change in 1.10 here caused the problem: https://github.com/django/django/commit/eab5df12b664b154b2e280330aa43d8c0621b94a

authors: sjuxax stephenmcd

repo: stephenmcd/mezzanine


text:
ZED camera causes ubuntu 18.04 with RX 2080 and CUDA 10.0 to freeze

My setup:
Ubuntu 18.04
AMD Ryzen 2700X
NVidia RTX 2080
nvidia-driver-410
cuda-10-0

Steps to reproduce:
1)
Connect ZED camera
If ZED camera is not detected, try plug/unplug until it is
Try to calibrate camera
if the calibartion window will become unresponding, try restarting calibration
Wait for system freeze

Connect ZED camera
If ZED camera is not detected, try plug/unplug until it is
Try to see video using ZED explorer
if camera is not detected, just wait

Any news?

Hi,
Can you tell the ZED SDK version you are using ?

The latest, 2.8.3, from https://download.stereolabs.com/zedsdk/2.8/ubuntu18 .

authors: EmilPi obraun-sl

repo: stereolabs/zed-examples


text:
Disparity as Grayscale image

HI,
I need the disparity as an image so what the best way to get it?
I am thinking to normalize the MEASURE_DISPARITY from 0-1 then multiply by 255 but the issue each image has a different range so it will be not accurate to make it in real time. Please, if a there better way to do it let me know.

Hi,
Yes, there is a better way to display the disparity map. Use the retrieveImage function with  view=VIEW_DEPTH
The disparity and depth are visually similar.

Ok, thank you @adujardin for this quick response.
I put issue from a long time and I will appreciate more if you could answer it.

repo: stereolabs/zed-python-api


text:
bug: Oil window just closes without error when trying to add/remove file

Did you check the docs and existing issues?

[X] I have read the docs
[X] I have searched the existing issues

Neovim version (nvim -v)
NVIM v0.11.0-dev-1207+g534544cbf7
Operating system/version
Arch Linux LTS
Describe the bug
I have not determined when, but quite often when I try to add or remove files, the oil window just closes and puts me to the last file I was in. There is no error.
It happened a few version ago, but I'm not sure which. It happens in multiple projects.
Right now I have a directory where I can delete some folders, but not all, and adding a file/folder just closes the window.
Is there some logs I can find to see what's happening?
I used the below repro config, and I did not get the error, but I did try with a clean oil config with my own nvim config, and got the issue.
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce

Be in file
Run this keymap:     vim.keymap.set("n", "-", require("oil").open, { desc = "Open parent directory" })
Delete folder

I havent determined the exact causation, so it's hard to give a definitive reproduction.
Expected Behavior
Can modity oil buffer
Directory structure
/012   .git/
/010   .github/
/006   .tests/
/013   autoload/
/003   deps/
/004   doc/
/001   ftplugin/
/011   lua/
/009   scripts/
/002   tests/
/014   .gitignore
/007   CONTRIBUTING.md
/008   Makefile
/005   README.md
/015   stylua.toml
Repro
-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
        "stevearc/oil.nvim",
        config = function()
            require("oil").setup({
              -- add any needed settings here
            })
        end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Did you check the bug with a clean config?

[X] I have confirmed that the bug reproduces with nvim -u repro.lua using the repro.lua file above.

I tracked it down to be casued by this plugin: https://github.com/Shatur/neovim-session-manager
Probably some code related to session saving that borked it out. I didnt find a fix, I just switched plugins.


text:
Clique Community Persistence: A Topological Visual Analysis Approach for Complex Networks

Dear Steve,
thank you so much for this service! I have finally added all information about this project on OSF.io. Would you kindly include the relevant URIs?

All data: https://osf.io/rdktg/
Paper (PDF): https://mfr.osf.io/render?url=https://osf.io/td973/?action=download%26mode=render
Supplementary materials (PDF): https://mfr.osf.io/render?url=https://osf.io/e8dmp/?action=download%26mode=render
Additional explanations: https://mfr.osf.io/render?url=https://osf.io/ygd6m/?action=download%26mode=render

Hope that I am using this service correcetly---this is my first project on OSF, inspired by your initiative. Thanks for your efforts!
Best,
Bastian

Thanks Bastian. The paper is updated. And I've put the OSF repository as the materials. The data category is for experiment results such as experiment subject responses or algorithmic runtime results. I'm not sure the data folder here fits into that. Feel free to comment in this issue if you think anything should change.

Hi Steve! I realize that I should have named the folder somewhat differently, but it actually contains the results of algorithmic runs as well as scripts to create them for yourself (in order to compare them with the ones we reported in the paper). I'll also add a link from the GitHub repository to the OSF one so that more people are capable of finding it.

Hi Steve, sorry to bother you again, but I wanted to ask whether you could add the OSF repository as a data repository of our paper, as well. I have uploaded the raw input files as well as the results of our analysis in order to make everything reproducible.

I took a look at the data folder, and I'm still not sure if it fits the criteria of experiment data rather than materials.
I don't see:

A data dictionary (how do I read the data?)
An explanation in the paper about how the data is used for an analysis (e.g., mean & SD of algorithm run times) or comparison (algorithm A vs algorithm B; simulation vs ground truth; algorithm vs human estimation; etc.). I see the conclusion mentions a contrast with existing methods, but I don't see a discussion of the comparison using the data.

I just want to make sure that I understand what's posted, as it seems to be quite outside the typical umbrella of experiment results.

OK, I understand that I was mistaken about the nature of these experimental data. I have added an updated README to the Data folder to explain what is in there. In short, I added:

all networks that we analysed in our paper
the results of this analysis in the form of so-called persistence diagrams
further data calculated with our method (topological centrality) and a comparison between existing centrality measures
comparisons between our method and existing methods in the form of distance matrices (one is generated with the old method, the other with our method)
embeddings & glyphs to reproduce the figures in our paper

I also added detailed instructions and automated scripts for reproducing every figure and every table in the table. The results are added in order to make it possible to check the correctness of the calculations.
So, I was hoping that this (along with the supplied code) should make it possible to reproduce just about everything in the paper (and also try it out with new data, if possible).
Sorry for taking up so much time; I have to admit that Open Science is something new for me—but I'm very excited to try it out and see the benefits for other scientists.

authors: Submanifold steveharoz

repo: steveharoz/open-access-vis


text:
Group items

Is there an index or anything I could hack to group items in a wrapping template?
IE... create rows, blocks of items for a slide show etc.

I'm closing this as it's very old, but for future reference, the mock option and success callback can be used to work with the data before inserting it into the DOM yourself.

authors: benjamin-hull sprynm


text:
Doesn't work for duplicate params

Doesn't work for duplicate params
It just adds it as a second param, rather than replacing the first

Doesn't work for duplicate params
It just adds it as a second param, rather than replacing the first

I just made same library, which same name, even same options. And I found this package because I cannot publish mine with the name build-url, so I placed my library as scoped library: @googlicius/build-url
And it can replace the existing query params, Typescript supported. So please check it.

authors: Geczy googlicius

repo: steverydz/build-url


text:
[BUG] In DialogListAdapter, addItem(dialog) adds the item to end of the list but updates the first item

On adding a new dialog, item gets added but UI isn't updated.
/**
     * Add dialog to the end of dialogs list
     *
     * @param dialog dialog item
     */
    public void addItem(DIALOG dialog) {
        items.add(dialog);
        notifyItemInserted(0);        <=== should be notifyItemInserted(items.length() - 1)
    }

Hi! Yeah you are right! I can't understand how we missed it. I'll fix it. You can use method addItem(int position, DIALOG dialog) while I haven't update library.

Yup! I am using the addItem(int position, DIALOG dialog) for now.

authors: bevzaanton mayuroks

repo: stfalcon-studio/ChatKit


text:
Add support to sync only keys matching a certain pattern

I've used this tool it in the past and it works great, but now I have a case in which I need to dump keys that only match a certain pattern instead of dumping all the keys of a DB.
MATCH option of SCAN command can be used to add this support.
The following commit https://github.com/fzunino/rump/commit/67bc2e1dac6d46019019a8f6cf6996ba8a02cf70 adds this support adding an optional command line argument called match and using * as default value, maintaining the current semantic.
Let me know and I can submit a PR with this commit.

@fzunino Yes, that's great idea!
Let's keep the new argument optional. :+1:

Hi,
We just released Rump 1.0.0 and dropped support for MATCH, considering that it could lead to inconsistencies since the filter is applied after SCAN: https://redis.io/commands/scan#the-match-option
It is important to note that the MATCH filter is applied after elements are retrieved from the collection, just before returning data to the client. This means that if the pattern matches very little elements inside the collection, SCAN will likely return no elements in most iterations.

authors: badshark fzunino nixtrace

repo: stickermule/rump


text:
Fix small mistake in time.rs: kilohertz should be megahertz

Fix error in description of Megahertz

Perfect, thanks!


text:
Fetching packages stuck at last package

Expected Behavior
For the install to continue
Actual Behavior

Steps to Reproduce the Problem

Clone the repo
Run yarn install
Stuck

Specifications

Platform: Ubuntu 18.04 LTS
Subsystem:

fsevents@1.2.13: The platform "linux" is incompatible with this module

fsevents@1.2.13: The platform "linux" is incompatible with this module

repo: stockmarkat/stockmarket-simulation


text:
[Manual] Operator bundle update

Description
Please provide a brief description of the purpose of this pull request.
Related Issue
If applicable, please reference the issue(s) that this pull request addresses.
Changes Made
Provide a clear and concise overview of the changes made in this pull request.
Screenshots (if applicable)
Add screenshots or GIFs that demonstrate the changes visually, if relevant.
Checklist

[ ] I have tested the changes locally and they are functioning as expected.
[ ] I have updated the documentation (if necessary) to reflect the changes.
[ ] I have added/updated relevant unit tests (if applicable).
[ ] I have ensured that my code follows the project's coding standards.
[ ] I have checked for any potential security issues and addressed them.
[ ] I have added necessary comments to the code, especially in complex or unclear sections.
[ ] I have rebased my branch on top of the latest main/master branch.

Additional Notes
Add any additional notes, context, or information that might be helpful for reviewers.
Reviewers
Tag the appropriate reviewers who should review this pull request. To add reviewers, please add the following line: /cc @reviewer1 @reviewer2
/cc @cameronmwall @ngraham20
Definition of Done

[ ] Code is reviewed.
[ ] Code is tested.
[ ] Documentation is updated.
[ ] All checks and tests pass.
[ ] Approved by at least one reviewer.
[ ] Merged into the main/master branch.

/cherry-pick backplane-2.7

repo: stolostron/backplane-operator


text:
[doc] remove hosted import

Summary
Related issue(s)
Fixes #

/retest

repo: stolostron/multicluster-global-hub


text:
[WIP] refactor hoh addon intallation

Signed-off-by: Zhiwei Yin zyin@redhat.com

/assign @clyang82
/assign @morvencao

/test test-e2e


text:
ACM-10812: Fix status report

We are still having issues with status reporting. In the latest instance, the endpoint-operator fails to update the metrics-collector deployment because of a conflict, then sets the status to degraded. And it remains in that state while the metrics are forwarded.
This PR:

Adds retry on conflict error to the metrics-collector related updates.
Changes the comparison between the found resources version and the desired ones to use DeepDerivative. This will reduce the number of unnecessary updates.
Adds retry on conflict for status updates made by the metrics-collector.
Sort conditions before updating the status in the metrics-collector to ensure it handles the most recent one.

I tried to change as few things as possible.

/retest

/cherrypick release-2.10

/cherrypick release-2.10


text:
Upgraded to Go1.21 and dependencies

Upgraded all dependencies and go version to 1.21

/retest

Trying to get unit tests to pass

Getting unit tests to pass

repo: stolostron/multiclusterhub-operator


text:
Links with absolute urls do not work

Hello,
Context
Currently, its impossible to add an absolute url link, which would redirect user from stoplight elements page, to a differente page , which is located outside of stoplight elements scope
Steps to Reproduce

Have @stoplight/elements generated API be placed under specific route, i.e. my-domain.com/api#.
Use hash router.
Have some pages outside of the @stoplight/elements scope, i.e. my-domain.com/guides
Attempt to add a link in API documentation, which would direct user to guides page, i.e.  [check out our guides page](/guides)

Current Behavior
The generated links poins to my-domain.com/api#/guides instead of my-domain.com/guides
Expected Behavior
I would expect a valid link to be genrated, which would point to my-domain.com/guides.
Possible Workaround/Solution
No workarounds, unless final host url is known in advance.

Version used: Latest @stoplight/elements version

@manvydasu We propose the following enhancement to achieve what you're after:

pick some sort of token to use in the link definition to tell us to put the host in the url (i.e. [check out our guides page]($$origin/guides)
when we come across this token, we'd replace it with the origin where the app is currently hosted

We will work with our Product team to prioritize this, but feel free to put up a PR for the proposed solution above in the meantime.

authors: chohmann manvydasu

repo: stoplightio/elements


text:
405 Method Not Allowed, response is invalid

Describe the bug
For operations not described in the OAS Prism will return a 405, but without the required Allow header value.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405
To Reproduce
Created a default API in Stoplight Studio, exposing a User endpoint, the one provided out of the box.
Running this request against the prism mock.
curl --request GET 'http://127.0.0.1:3100/user'
Expected behavior
HTTP/1.1 405, Method Not Allowed
Allow: POST

405 is coming for me for no reason. It was working 2 weeks back

405 is coming for me for no reason. It was working 2 weeks back

I'm not sure how this has anything to do with the issue I raised @abhayathapa?

authors: abhayathapa morten-nielsen

repo: stoplightio/prism


text:
Cache option not working

If i try to enable cache option:
    buildModules: [         ["@storyblok/nuxt", {             accessToken: "xxxxx",             apiOptions: {                 cache: { type: "memory" },             },         }]     ],
I get an error:
Cannot add property accessToken, object is not extensible
This is also not working:
    buildModules: [         ["@storyblok/nuxt", {             accessToken: "xxxxx",             apiOptions: {                 accessToken: "xxxxx",                 cache: { type: "memory" },             },         }]     ],
Iam using the latest version.
If i remove the apiOptions property, storyblok creates two request:
301 https://api.storyblok.com/v2/cdn/stories/en?version=published&token=xxxxx&cv=undefined =>
200 https://api.storyblok.com/v2/cdn/stories/en?cv=1654702667&token=xxxxx&version=published
How can i prevent this 301?

Confirming this issue. Whenever I pass apiOptions to the module it start failing with [nuxt] [request error] Cannot add property accessToken, object is not extensible.
The problematic code seems to be this bit in the storyblokInit function (code taken from dist folder in node_modules):
const { bridge, accessToken, use = [], apiOptions = {} } = pluginOptions;
apiOptions.accessToken = apiOptions.accessToken || accessToken;

This should be fixed as of V4.3.0. Check https://github.com/storyblok/storyblok-nuxt/issues/170#issuecomment-1239527769.

Closing since it hasn't been active in a while and the latest comment from @StaffOfHades. If it's still happening feel free to re-open providing a valid reproduction link
Thanks!

authors: StaffOfHades alvarosabu arpadgabor do-web

repo: storyblok/storyblok-nuxt


text:
Upgrade jest dependencies to v29 [rebased]

#319 + #345 but rebased on next.
Blocked by

#354

[ ] Release of #349

Dropping node 12 is fine, storybook itself also doesn't support node 12 anymore.

@legobeat Sounds good to me.
@yannbf Let's do this when you are back.

Hey there! Sorry for not checking this sooner. I'll update this PR and test it out next week!

authors: kasperpeulen legobeat yannbf

repo: storybookjs/test-runner


text:
[Bug] Protected properties are included in args table

The args table currently includes protected properties of components without indicating that they are protected.
I guess in most cases, protected properties do not need to be shown at all. In an API documentation, they are only relevant for classes that are intended to be subclassed. In other cases, protected members usually are an artifact of how a component is implemented instead of part of the API.
The angular framework itself excludes protected members from the public API except for classes that are explicitly marked as non-final in the documentation.

Yes, the plan was to exclude protected and private properties and i simply overlooked the protected properties.
Since the target audience of the generated types are developers consuming public components, and not extending them, i think it is fine to always exclude protected properties.

authors: Etienne-Buschong Yogu


text:
Update Typescript Definition File closes #632

This adds the addDecorator exported function to the definitions.

Awesome.
Thanks.

authors: arunoda wmonk

repo: storybooks/react-storybook


text:
Webpack 2

Hi, is there any guideline how can we move storybook to webpack 2?
Thanks!

refs #637

Note to self:
This fork seems to have done pretty much the same things I have also done, could be interesting to compare at some point.

@ndelangen Is this the proper issue to watch for progress on webpack 2 support in storybook?

We'll be releasing an 3.0.0.alpha.01 soonish, which will have webpack 2 support.
We'll probably have to write some good migration guides before the real release.
Webpack 2 support is already in master, so you could already give it a try manually by either npm link or local file dependencies.

We're real close to a 3.0.0-alpha.01 release people!
I think after this: https://github.com/storybooks/storybook/issues/773#issuecomment-297679733 I will be publishing!

Any updates on this?

I second this...any update?

I'm working on it as much as I can 👍

It looks like #773 was unblocked today.  Is there anything still holding up a 3.0.0-alpha release?  :smile:

Not too much, 🔬 details I think and then 🚢

I'm going to releasing 3.0.0-alpha.0 in a short while, so this can be closed.

authors: ajhyndman andrewcashmore delijah eatrocks joscha ndelangen tomitrescak

repo: storybooks/storybook


text:
2 storyshots libraries???

 Issue by pyros2097
Saturday Mar 04, 2017 at 12:18 GMT
Originally opened as https://github.com/storybooks/storyshots/issues/82

Why are there 2 storyshots libraries? Which one should I use. Its  seems they are different versions also.
npm i -D @kadira/storyshots
npm i -D storyshots

 Comment by mnmtanish
Saturday Apr 01, 2017 at 11:07 GMT

Please use the storyshots module


text:
Add Docgen info to PropTable

Issue:
Storybook Info Addon currently does not support React docgen for documenting components. This was actually implemented on the old repo but got lost on the migration:
https://github.com/storybooks/react-storybook-addon-info/commit/092e10a736d9381ffdab5609ec7585df9d2cb7a1
What I did
Added support for react docgen on the PropTable component and documentation
How to test
Follow the instructions on the readme on a repo supporting flowtype. normal npm link approaches should be helpful

@jribeiro Thanks for contributing this! Is there any chance you can add this to the examples/cra-kitchen-sink example as part of this PR? We're starting to make sure that all PRs have good examples there.
To get the example running on your machine:
yarn && yarn bootstrap
cd examples/cra-kitchen-sink
yarn storybook

Many thanks again and please let me know if you have any questions!

Hi @shilman, thanks for that. I've added an example to the examples/cra-kitchen-sink. Let me know if you need any other change.

Hi @danielduan, is this not needed anymore?

Sorry about that, I tried to fix the merge conflicts and when I pushed to your branch, this got closed automatically. New PR is above ^

authors: danielduan jribeiro shilman


text:
Opening titles component

[x] themeable variations
[x] data schema
[x] reponsiveness
[x] micro interactions: hovers/active
[x] abstract anilink/button component variation?

Done in https://github.com/storycopter/storycopter/commit/94b649e4b4565330fd569bacb513d5882bc665c8

repo: storycopter/storycopter


text:
java.lang.ClassNotFoundException: org.postgresql.Driver

使用postgresql，无法运行

感谢你的使用与反馈，目前bin中的jar仅import了mariadb的驱动jar。
所以默认支持mariadb与mysql, 当在使用其它类型的数据库运行时，需要import相应的数据库驱动jar。
主要操作方法有两个:
1、fork源码在pom.xml中增加数据库驱动依赖，重新打包再以jar -jar GGCode-xxx.jar运行
2、将驱动包下载到GGCode-0.0.1.jar同级目录，使用java -cp GGCode-0.0.1.jar:[driver.jar] App运行(windows则使用java -cp GGCode-0.0.1.jar;[driver.jar] App运行)

authors: printfcoder stotem

repo: stotem/GGCode


text:
and another package version not initialised

before a repository can be released, all package.xml need to have the same version or prepare-release is doomed to fail :-(

I'll merge it myself and re-release afterwards

now the re-release worked: https://lcas.lincoln.ac.uk/jenkins/job/prepare-release/384/


text:
StatefulJob can't easily tar node data

The StatefulJob docs state this, and I'm attempting to use it for the same function.
Strangelove uses it to compress and upload snapshots of chain data.

I'm having a problem achieving this though. On the Provenance chain our nonpruned nodes contain about 1TB of data. Our PVCs are setup for 1.25TB and to grow when they are at 90% used. With about 25% space overhead, there's not enough space to compress the data and store the tar.gz on the same volume.
The two ways I could think that the StatefulJob could support this would be the following:

Allow configuration to specify additional PV/PVCs that are created/cleaned up
Allow setting additional snapshot PV size. Then the PV is restored from the snapshot, it is then edited to increase its size further based on this config

I can try tackling this if we settle on the solution.

We currently handle this by doing a streamed compress and upload so that storage is not necessary for the compressed file prior to upload.
For resumable uploads though, it would be great to have this feature so that the file is compressed once, and retries can be retried.
We could add an additional parameter that would allow creating the StatefulJobs PVC with something like twice the size so that additional room was available for these kinds of operations.

repo: strangelove-ventures/cosmos-operator


text:
fix alpine version crahes for cosmwasm based networks

reference: https://github.com/CosmWasm/wasmvm/issues/523
Currently Osmosis builds cause a cgo panic. Also affected wormhole w/ testing for Joel.

I have found a solution to this problem if necessary CosmWasm/wasmvm#576
I think we should submit a PR on the Heighliner project to systematically use an Alpine 3.18 image, at least for projects requiring cosmwasmvm.

@vimystic @0xPuncker

Considering generi-sizing all of heighliner to have choice of alpine base and install  golang version from the mod file of the respective chains .Similar to what you suggest but for everything.
Alternatively , if the desired golang alpine combo does not exist , we then pass in an ARG to the docker file to do the needful
Will run it by people internally and keep you posted on this issue.

authors: Reecepbcups mrzigha nourspace vimystic

repo: strangelove-ventures/heighliner


text:
Quickstart is not working on my mac

api_1  | [2018-06-14T21:18:40.844Z] info Creating your application... It might take a few seconds.
api_1  | [2018-06-14T21:18:40.928Z] error $ strapi new can only be called in an empty directory.
api_1  | [2018-06-14T21:18:41.177Z] error This command can only be used inside a Strapi project.
strapi-docker_api_1 exited with code 0

docker pull node:9.11.1-alpine
and redo quickstart. Now it works.

repo: strapi/strapi-docker


text:
tmpop: add tendermint evidence

At last, we're able to compute full tendermint evidence for our segments!
We can't really use the lite package as it's meant to be used by clients and is quite complex to fit in our infrastructure (it acts as a proxy node) but I think the data we're able to access in the votes is enough to produce a correct proof.
It's a bit complicated to do so because we can do it only at the beginning of block N+3 so we need to be careful with off-by-one errors in many places.
I've tested on a filetmpop that the evidence produced looks correct and is correctly validated by the Verify() method, but this is a tricky piece of code so I'm counting on you to find potential issues during the PR ;).
Don't hesitate to drop by my desk to draw diagrams of what object signs what part if you're unsure.

This change is

Reviewed 10 of 10 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

cs/evidence_tendermint_test.go, line 189 at r1 (raw file):

	}

	assert.True(t, e.Verify(linkHash), "Proof should be verified")

supernit: shouldn't this assert be in its own test case?

tmpop/tmpop.go, line 376 at r1 (raw file):

	linkHashes, err := t.getCommitLinkHashes(evidenceHeight)
	if err != nil {
		log.Warn("Could not get link hashes for this block. Evidence will not be generated.")

we should add more information about the block in the warning message

tmpop/tmpop.go, line 386 at r1 (raw file):

	validatorHash, err := t.getValidatorHash(evidenceHeight)
	if err != nil {
		log.Warn("Could not get validator hash for this block. Evidence will not be generated.")

here as well

Comments from Reviewable

at last we have proper evidence! good job!

Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.

Comments from Reviewable

Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.

cs/evidence_tendermint_test.go, line 189 at r1 (raw file):
Previously, such (Adrien Montfort) wrote…
supernit: shouldn't this assert be in its own test case?

I liked making sure that the proof was valid before I was passing it on to the tests that might modify it.
But now that it works, maybe it's not necessary, I'll have a second look at it.

tmpop/tmpop.go, line 376 at r1 (raw file):
Previously, such (Adrien Montfort) wrote…
we should add more information about the block in the warning message

Good idea.

tmpop/tmpop.go, line 386 at r1 (raw file):
Previously, such (Adrien Montfort) wrote…
here as well

Good idea as well :).

Comments from Reviewable

Note that I'd like to work in the next few weeks on setting up a real metrics/monitoring stack for Indigo, this will be the occasion to provide good analytics on what happens in TMPoP.

Review status: 8 of 10 files reviewed at latest revision, 3 unresolved discussions.

Comments from Reviewable

And a first brick for IndigoEntreprise. Nice!

Review status: 8 of 10 files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Reviewed 9 of 10 files at r1, 1 of 2 files at r2.
Review status: 9 of 10 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.

tmpop/tmpoptestcases/evidence.go, line 150 at r1 (raw file):

	}
	tmClientMock.EXPECT().Block(int64(5)).Return(blocks[5], nil).AnyTimes()

nit: can factorize all block initialization

tmpop/tmpoptestcases/evidence.go, line 310 at r1 (raw file):

		err := makeQuery(h, tmpop.GetSegment, linkHash4, got)
		assert.NoError(t, err)
		assert.Len(

nit: assert.Empty()

Comments from Reviewable

Yeah !

Review status: 9 of 10 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.

tmpop/tmpoptestcases/evidence.go, line 150 at r1 (raw file):
Previously, alexppxela (Alexandre Thibault) wrote…
nit: can factorize all block initialization

Not really, because a few blocks aren't built exactly like the others (some don't have votes).
This E2E test is big and a bit hard to follow I'll admit :)

Comments from Reviewable

Review status: 8 of 10 files reviewed at latest revision, 2 unresolved discussions.

tmpop/tmpoptestcases/evidence.go, line 310 at r1 (raw file):
Previously, alexppxela (Alexandre Thibault) wrote…
nit: assert.Empty()

Done.

Comments from Reviewable

Reviewed 1 of 2 files at r2, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Comments from Reviewable

looking great !

Reviewed 7 of 10 files at r1, 1 of 2 files at r2, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.

cs/evidence_tendermint_test.go, line 171 at r3 (raw file):

// generates a valid block and its proof, and returns the link
// and the evidence.
func CreateTendermintProof(t *testing.T, linksCount int) (*types.Bytes32, *evidences.TendermintProof) {

nit: does this need to be exported ?

cs/evidences/evidences.go, line 192 at r2 (raw file):

	// We validate that nodes signed the header.
	if !p.validateVotes(p.Header, p.HeaderVotes) {

as discussed IRL: are the (potential) byzantine votes included in p.HeaderVotes by tendermint ? if yes, then we should make sure than more than 1/3 of the votes are valid, not all of them.

tmpop/tmClient.go, line 86 at r3 (raw file):

	for _, tx := range tmBlock.Block.Txs {
		tmTx, err := unmarshallTx(tx)
		if !err.IsOK() || tmTx.TxType != CreateLink {

why do you check if the transaction was a CreateLink (even though we only have this type) ?

tmpop/tmpoptestcases/evidence.go, line 337 at r3 (raw file):

// vote creates a valid vote for a given header.
// It simulates nodes signing a header and is crucial for the proof.
func vote(header *tmtypes.Header) []*evidences.TendermintVote {

is this the same function as above (cs/evidence_tendermint_test.go) ? if yes, is there a way to factorize ?

Comments from Reviewable

The TendermintProof verification should be updated in JS now! ;)

Reviewed 1 of 2 files at r2.
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.

Comments from Reviewable

The developer named Bastien is not available anymore. Please try another developer.

Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.

cs/evidence_tendermint_test.go, line 171 at r3 (raw file):
Previously, simonvadee (Simon Vadée) wrote…
nit: does this need to be exported ?

I think it's useful yes

cs/evidences/evidences.go, line 192 at r2 (raw file):
Previously, simonvadee (Simon Vadée) wrote…
as discussed IRL: are the (potential) byzantine votes included in p.HeaderVotes by tendermint ? if yes, then we should make sure than more than 1/3 of the votes are valid, not all of them.

Yes good point! I'll dive more into simulating byzantine nodes next.

tmpop/tmClient.go, line 86 at r3 (raw file):
Previously, simonvadee (Simon Vadée) wrote…
why do you check if the transaction was a CreateLink (even though we only have this type) ?

It feels more future-proof when/if we add other TxTypes :)
We most likely only want to create evidence for CreateLink operations (even though I admit it depends on what other operations we add in the future).
But the main usecase was that we might at some point have an AddEvidence operation to store external evidence, and we don't want to generate evidence on evidence...but that's still a bit blurry so we'll see later.

tmpop/tmpoptestcases/evidence.go, line 337 at r3 (raw file):
Previously, simonvadee (Simon Vadée) wrote…
is this the same function as above (cs/evidence_tendermint_test.go) ? if yes, is there a way to factorize ?

Yes it is, but I'm not a big fan of factorizing it yet, as Rob Pike says in Go sometimes a little duplication is better...if more functions need to be shared then we'll reevaluate :)

Comments from Reviewable

cs/evidences/evidences.go, line 192 at r2 (raw file):
Previously, t-bast (Bastien Teinturier) wrote…
Yes good point! I'll dive more into simulating byzantine nodes next.

That's a bit different than byzantine votes. A wrong signature is a bad way to try to mess with the system since it's so easily catchable. I'm pretty sure bad signature are not included in the block header by the Tendermint engine.
A byzantine vote would be voting twice on blocks with the same height for instance.
But yeah we should check that we have at least 2/3+ signatures.

Comments from Reviewable

^^

Comments from Reviewable

authors: alexppxela simonvadee such t-bast

repo: stratumn/go-indigocore


text:
Fix: DjangoOptimizerExtension corrupts nested objects' fields' prefetch objects

Description
This PR aims to resolve issue #379 .
I included a reproducible test and a suggested fix, where the Prefetch object gets deepcopied to avoid the side effects from add_prefix.
Considerations:

There were multiple ways to do this, including copying the OptimizerStore at a higher level in the execution stack, but this should be the least invasive one
I used deepcopy now as Prefetch didn't offer an easier way of copying the object that I know of, I'm happy about suggestions on improving this

I'm also very open for improving the test case included. If you know a better way on how to do it without the custom type setup, please let me know.
Types of Changes

[ ] Core
[x] Bugfix
[ ] New feature
[ ] Enhancement/optimization
[ ] Documentation

Issues Fixed or Closed by This PR

#379

Checklist

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

I love the work you do here, thanks a lot for the really awesome work! ❤

Codecov Report
All modified lines are covered by tests :white_check_mark:

Comparison is base (a17b51b) 87.98% compared to head (c03dc67) 87.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #380   +/-   ##
=======================================
  Coverage   87.98%   87.99%
=======================================
  Files          33       33
  Lines        2971     2973    +2
=======================================
+ Hits         2614     2616    +2
  Misses        357      357

Files
Coverage Δ

strawberry_django/optimizer.py
89.13% <100.00%> (+0.06%)
:arrow_up:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

authors: aprams codecov-commenter


text:
Deprecate starlite

Now that we Litestar support I think we can deprecate Starlite 😊
### Tasks
- [ ] Add notice in the docs
- [ ] Use typing_extensions.deprecated to mark class as deprecated (see https://peps.python.org/pep-0702/)
- [ ] Trigger deprecation warning (with test), this might

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.

@Birdi7 Please feel free to go ahead with this 😊 If you need assistance or a review, feel free to ping me

repo: strawberry-graphql/strawberry


text:
default_factory doesn't work

Hi!
I use default_factory to initialize my variable, but variable always returns the same result. It seems like default_factory doesn't work and it returns always the same result of function.
Here is example to reproduce:
https://play.strawberry.rocks/?gist=a7a5e62ffe4e68696b44456398d11104

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.

I can reproduce this, I think it's because we store the default value when creating the object, see:

I don't think this can be supported (and still be compliant with the spec). GraphQL defaults are statically in the schema. strawberry export-schema ...:
type Mutation {
  update1(fields: MyInputType!): String!
  update2(fields: MyInputType!): String!
}

input MyInputType {
  field1: String = "318fbf6e-73b6-40eb-932f-0b66ba935b75"
}

type Query {
  hello: String!
}

Another issue is that the client sending an explicit null is valid and semantically different. So MyInputType would need logic like
if field1 in (None, UNSET):
    field1 = uuid_pkg.uuid4()

That may seem like a workaround, but is actually the only correct implementation.

@patrick91 and also can I ask in what situations then we need to use default_factory if this field is static, when we can use only default?

@patrick91 and also can I ask in what situations then we need to use default_factory if this field is static, when we can use only default?

I'm not sure to be honest, I'll need to think about this a bit
I do think it might be a flaw, or at least something surprising, so maybe we need to reconsider it

I do understand the schema's default value issue, but I do agree with this comment. I actually had to do workaround a similar issue on strawberry-resources when exporting form data for the field as a dynamic default value would not actually make sense there.
So my vote would be to actually change the behavior to fix this issue, specially since we still are 0.x =P, and mention as a "possible breaking change" in the changelog, mentioning the use of default as the correct way of relying on the older behavior

just throwing out some ideas to make the change less painful

we could a static_factory or schema_factory which will have the current behaviour, default_factory will mimic dataclasses' and pydantic's behaviour
have a configuration option to disable static defaults
just change the behaviour

@coady sorry to ping you again, but do you use default_factory for defaults in the schema level? 😊 what's your use case exactly?

@coady sorry to ping you again, but do you use default_factory for defaults in the schema level? 😊 what's your use case exactly?

The only use I'm aware of (and use) is for mutables, as dataclasses requires. Any valid value is a valid default value, including [] and {}.
I'd be happy with a cleaner alternative for mutables. This is forbidden (but is valid GraphQL):
    q: list[float] = [0.5]

So instead I have to used default_factory or this:
    q: list[float] = (0.5,)  # type: ignore

which mypy complains about.

just throwing out some ideas to make the change less painful

we could a static_factory or schema_factory which will have the current behaviour, default_factory will mimic dataclasses' and pydantic's behaviour
have a configuration option to disable static defaults
just change the behaviour

option 1 could also have a codemod to make the update easier 😊

I think we could do option 2 for the time being


text:
Can't build

In raising this issue I confirm that

[X] I have fully completed the issue template
[X] I have searched open and closed issues for duplicates
[X] I have read the Contribution Guidelines
[X] I have read the Code of Conduct
[X] I have read the Documentation

Describe the bug
Trying to build but failing
Steps to reproduce the behavior
First command of the guide
git clone <https://github.com/streamdeck-linux-gui/streamdeck-linux-gui.git>
Gives file or directory not existing error
If i try
git clone https://github.com/streamdeck-linux-gui/streamdeck-linux-gui.git
and then trying to build i get
/usr/bin/python: No module named build
ALSO
the fedora script results in this error
`      The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html

  Traceback (most recent call last):
    File "<string>", line 852, in <module>
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 989, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/wheel/bdist_wheel.py", line 364, in run
      self.run_command("build")
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 989, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 989, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
    File "<string>", line 687, in build_extensions
  RequiredDependencyException: zlib

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/alessandro/.local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/alessandro/.local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/alessandro/.local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 434, in build_wheel
      return self._build_with_temp_dir(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 507, in run_setup
      super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-s3ikdncm/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in run_setup
      exec(code, locals())
    File "<string>", line 903, in <module>
  RequiredDependencyException:

  The headers or library files could not be found for zlib,
  a required dependency when compiling Pillow from source.

  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pillow
Failed to build hidapi pillow
ERROR: Could not build wheels for hidapi, pillow, which is required to install pyproject.toml-based projects
`
Expected behavior
building from source
Screenshots
No response
System Information
Fedora 39
Stream Deck Version
No response

Could you try
python -m pip install ./
In the streamdeck-linux-gui directory?

python -m pip install ./

ERROR: Package 'streamdeck-linux-gui' requires a different Python: 3.12.0 not in '<3.12,>=3.11'
Also, i had streamdeck installed already, but now gives this error
Traceback (most recent call last):   File "/home/alessandro/.local/bin/streamdeck", line 5, in <module>     from streamdeck_ui.gui import start ModuleNotFoundError: No module named 'streamdeck_ui'

Try installing python 3.11 or change pyproject.toml on line 15 to include
your current version (that's easier in my opinion)
Also remove the old streamdeck_ui it's way out of date.
Razer @.***> schrieb am Mo., 23. Okt. 2023, 17:33:

python -m pip install ./
ERROR: Package 'streamdeck-linux-gui' requires a different Python: 3.12.0
not in '<3.12,>=3.11'
Also, i had streamdeck installed already, but now gives this error
Traceback (most recent call last): File
"/home/alessandro/.local/bin/streamdeck", line 5, in  from
streamdeck_ui.gui import start ModuleNotFoundError: No module named
'streamdeck_ui'
—
Reply to this email directly, view it on GitHub
https://github.com/streamdeck-linux-gui/streamdeck-linux-gui/issues/107#issuecomment-1775471106,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABJEWWX7X7O62ND5552ABSLYA2E3RAVCNFSM6AAAAAA6MDPRCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVGQ3TCMJQGY
.
You are receiving this because you commented.Message ID:
@.***
com>

Try installing python 3.11 or change pyproject.toml on line 15 to include your current version (that's easier in my opinion) Also remove the old streamdeck_ui it's way out of date. Razer @.> schrieb am Mo., 23. Okt. 2023, 17:33:
…
python -m pip install ./ ERROR: Package 'streamdeck-linux-gui' requires a different Python: 3.12.0 not in '<3.12,>=3.11' Also, i had streamdeck installed already, but now gives this error Traceback (most recent call last): File "/home/alessandro/.local/bin/streamdeck", line 5, in  from streamdeck_ui.gui import start ModuleNotFoundError: No module named 'streamdeck_ui' — Reply to this email directly, view it on GitHub <#107 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJEWWX7X7O62ND5552ABSLYA2E3RAVCNFSM6AAAAAA6MDPRCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVGQ3TCMJQGY . You are receiving this because you commented.Message ID: @. com>

Tried uninstalling
pip3 uninstall streamdeck-ui
WARNING: Skipping streamdeck-ui as it is not installed.

Tried installing with the command, but same error as before
 note: This error originates from a subprocess, and is likely not a problem with pip.   ERROR: Failed building wheel for pillow Successfully built streamdeck-linux-gui Failed to build pillow ERROR: Could not build wheels for pillow, which is required to install pyproject.toml-based projects

Fixed installing libjpeg-turbo-devel and zlib-devel


text:
expose Readable & Writable

fixes #1

There is a way to add streams to unionfs, but it is not trivial.
Your implementation is obviously invalid, all it does is it creates some "placeholders".
What is the reason for doing so?

graceful-fs tries to get those streams (fs.prototype.ReadStream, fs.prototype.WriteStream), if they are not there it fails hard.
yes it seems wrong as it still doesnt work correctly here (just a few steps later)

I am OK including this hack. However this introduces a dependency:
import {Readable, Writable} from "stream";

Which may break browser users. It has to be done somehow as to not break browser builds.

Maybe something like this
const isBrowser = typeof __filename === 'undefined';

?

yeah made it conditional...
another question here:
i think im using it alltogether somehow wrong:
const {ufs} = require('unionfs');
const {Volume} = require('memfs');
const fs = require('fs');

ufs
.use(fs)
.use(Volume.fromJSON({"foo.js": ""}, "/tmp"))

console.log(ufs.existsSync(__filename)); // false
console.log(fs.existsSync(__filename)); // true
console.log(ufs.existsSync("/tmp/foo.js")); // true

why does it fail when trying to stat an existing file? the in memory volume is mounted somewhere else __filename shouldnt be affected?!

@streamich any idea on this one?

I will take a look at it this evening.

@streamich thanks for merging and fixing! did you have some time to look into my example above?

@digitalkaoz Sorry, I keep forgetting about this, will create an issue.

@digitalkaoz Should be fixed here: https://github.com/streamich/unionfs/issues/10#issuecomment-350269633
Thanks for the find.

authors: digitalkaoz streamich

repo: streamich/unionfs

license: Unlicense


text:
🛑 WSDL SAM SCS Demo is down

In 77c4f7a, WSDL SAM SCS Demo (https://wsdl-demo.streamlined-scs.cl/api/Scssalidabodega/getcontadorsalidabodega) was down:

HTTP code: 502
Response time: 452 ms

Resolved: WSDL SAM SCS Demo is back up in cdfd912 after 1 hour, 54 minutes.

repo: streamlined-scs/upptime


text:
Is it possible to know how why have 20 seconds delay between issuing the stressapptest command and system running

We run the command to enable the StressAppTest with testing time, take our 100 seconds test for example, after issuing the command it is 04/13 21:02:32, but it start from 21:02:51 so it takes around 20 seconds before running, is it possible to know why we have the 20 seconds before running?
2023/04/13-21:02:32(CST) Log: Prefer plain malloc memory allocation.
2023/04/13-21:02:32(CST) Log: Using mmap() allocation at 0x7f0e4b600000.
2023/04/13-21:02:32(CST) Stats: Starting SAT, 243912M, 100 seconds
2023/04/13-21:02:50(CST) Log: region number 8 exceeds region count 8
2023/04/13-21:02:51(CST) Log: Region mask: 0xff
2023/04/13-21:03:01(CST) Log: Seconds remaining: 90
2023/04/13-21:03:11(CST) Log: Seconds remaining: 80

On Thu, Apr 13, 2023 at 6:12 AM AlecHsiao @.***> wrote:

is it possible to know why we have the 20 seconds before running?
2023/04/13-21:02:32(CST) Stats: Starting SAT, 243912M, 100 seconds

Stressapptest fills memory with patterns before starting the test. You have
a large amount of memory
and it's likely that initializing the memory takes 20 seconds. Do you have
a full log with memory bandwidth indicated?
Message ID: @.***>

Yes, we change the log level to 20 to capture more data, I think you're correct, that is under the process to fill data in that period. Thanks for your help for that.
2023/02/22-08:00:46(CST) Starting Fill Threads 0: 30511 pages
2023/02/22-08:00:46(CST) Starting Fill Threads 1: 30511 pages
2023/02/22-08:00:46(CST) Starting Fill Threads 2: 30511 pages
2023/02/22-08:00:46(CST) Starting Fill Threads 3: 30511 pages
2023/02/22-08:00:46(CST) Starting Fill Threads 4: 30511 pages
2023/02/22-08:00:46(CST) Starting Fill Threads 5: 30511 pages
2023/02/22-08:00:46(CST) Starting Fill Threads 6: 30511 pages
2023/02/22-08:00:46(CST) Starting Fill Threads 7: 30518 pages
2023/02/22-08:00:46(CST) Log: Thread 0 running on core ID 81 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF).
2023/02/22-08:00:46(CST) Log: Starting fill thread 0
2023/02/22-08:00:46(CST) Log: Thread 2 running on core ID 103 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF).
2023/02/22-08:00:46(CST) Log: Starting fill thread 2
2023/02/22-08:00:46(CST) Log: Thread 1 running on core ID 0 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF).
2023/02/22-08:00:46(CST) Log: Starting fill thread 1
2023/02/22-08:00:46(CST) Log: Thread 3 running on core ID 19 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF).
2023/02/22-08:00:46(CST) Log: Starting fill thread 3
2023/02/22-08:00:46(CST) Log: Thread 6 running on core ID 44 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF).
2023/02/22-08:00:46(CST) Log: Starting fill thread 6
2023/02/22-08:00:46(CST) Log: Thread 5 running on core ID 121 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF).
2023/02/22-08:00:46(CST) Log: Starting fill thread 5
2023/02/22-08:00:46(CST) Log: Thread 4 running on core ID 116 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF).
2023/02/22-08:00:46(CST) Log: Starting fill thread 4
2023/02/22-08:00:46(CST) Log: Thread 7 running on core ID 52 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF).
2023/02/22-08:00:46(CST) Log: Starting fill thread 7
2023/02/22-08:01:05(CST) Log: Co
1.0.10.log
mpleted 0: Fill thread. Status 1, 30511 pages filled
2023/02/22-08:01:05(CST) Log: Completed 7: Fill thread. Status 1, 30518 pages filled
2023/02/22-08:01:05(CST) Log: Completed 5: Fill thread. Status 1, 30511 pages filled
2023/02/22-08:01:05(CST) Log: Completed 6: Fill thread. Status 1, 30511 pages filled
2023/02/22-08:01:05(CST) Log: Completed 3: Fill thread. Status 1, 30511 pages filled
2023/02/22-08:01:05(CST) Log: Completed 1: Fill thread. Status 1, 30511 pages filled
2023/02/22-08:01:05(CST) Log: Completed 4: Fill thread. Status 1, 30511 pages filled
2023/02/22-08:01:05(CST) Log: Completed 2: Fill thread. Status 1, 30511 pages filled

1.0.10.log

For whatever reason, initialization uses only 8 threads, which
probably isn't appropriate on large systems such as yours.
I guess a better approach would be to scale the number of initialization
and teardown threads to the number of cores
available, similar to the default for copy threads. I'll keep it in mind as
a feature request, or you can send a PR.
If you just want it to be faster and can compile yourself, you can change
the hardcoded thread counts here:
https://github.com/stressapptest/stressapptest/blob/fd4ae17eaad7fde69e1308abbe5af3181ec6ce15/src/sat.cc#L719
On Sun, Apr 16, 2023 at 9:01 PM AlecHsiao @.***> wrote:

1.0.10.log
https://github.com/stressapptest/stressapptest/files/11246074/1.0.10.log
—
Reply to this email directly, view it on GitHub
https://github.com/stressapptest/stressapptest/issues/107#issuecomment-1510660957,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADMRIIJTDAMGBYSYGA5RHRDXBS6ANANCNFSM6AAAAAAW5CELRA
.
You are receiving this because you commented.Message ID:
@.***>

Thanks, I think that works, now I can reduce the delay time , so I think that would be enough for me, appreciated for your help !!!

authors: AlecHsiao nickjsanders

repo: stressapptest/stressapptest


text:
Update Facebook to use v2 of their API as the current v1 will expire in a few months

facebookTokenURL        string = "https://graph.facebook.com/v2.2/oauth/access_token"
facebookEndpointProfile string = "https://graph.facebook.com/v2.2/me?fields=email,first_name,last_name,link,about,id,name,picture,location"

@tmsoft Was this resolved

Doesn't look like it.  Is anyone maintaining the codebase?

I'm not sure anyone is assigned to maintain the package. Perhaps we should find some new people who are interested?

On 24 Jul 2015, at 05:40, Todd notifications@github.com wrote:
Doesn't look like it. Is anyone maintaining the codebase?
—
Reply to this email directly or view it on GitHub.

@matryer Feel free to add me as one and I'll take a stab at it.

@matryer: I would like to volunteer to be a maintainer if possible.

authors: bscott maggit matryer tmsoft

repo: stretchr/gomniauth


text:
[WIP] Roslyn based serialization source generator

PR Details
Opening draft PR in order to be able to reference it in documentation, once I make some progress on this I'll update the description.
Description
TODO
Related Issue
TODO

Motivation and Context
TODO

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My change requires a change to the documentation.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

what is the current state?
do you need help with it?
i have some expierence with source generators but i struggle with strides structure still.
But it would be a huge step forward.

what is the current state?
do you need help with it?
i have some expierence with source generators but i struggle with strides structure still.
But it would be a huge step forward.

I'm currently busy with another project and haven't made much progress on this. You can see the TODOs in my code. The main hassle is getting parity of output on edge cases. The way I was comparing output: compiling Stride main branch and viewing generated code with DotPeak, then running the source generator and comparing.
Once the GlobalDataSerializer attributes are correctly emitted, the next part is generating the method in the class they're on with the object IDs later used by the runtime serializer.
Since that may be difficult to handle - you could give it a try to refactor my code a bit so that it feels nicer to read (lack of readability was main issue of the previous implementation making it hard to change anything).


text:
[Native] - Implement some existing C++ methods in C#

PR Details
Description
This PR focuses on migrating most of the C++ code in Stride.Native to C#.
My change also applies to Stride.Graphics, so with a few gimmicks it should be possible to build this library outside of Windows.
Related Issue
#1394
Types of changes

[x] Docs change / refactoring / dependency upgrade

TODO

[ ] My change requires testing, so It could break existing code.

Thanks for the PR.
Before we merge this in, I would like to make sure we don't loose much performance. I remember it was in C++ for real perf reason (but at the time mono mobile was very slow so it might not be necessary anymore).

If I remember correctly, the 'FastTextRenderer' is only used for the debug text. Is this correct?
A long time since I've seen this code, but I think the regular spritebatch inherit from BatchBase, and is all C#.

I test the NativeInvoke.xnGraphicsFastTextRendererGenerateVertices with native and cs metod based on .net8.0

Hey @ly3027929699 thanks a bunch for testing this out for us, can you share the benchmark source as well ?

here is the source
TestAOTUnitTests.zip
this is a .rar file.
change .zip to .rar

here is the source TestAOTUnitTests.zip this is a .rar file. change .zip to .rar

the folder is empty, could you make a repo instead?

Nah, it works fine, make sure to change it to rar

is your result similar to me? @Eideren

https://github.com/ly3027929699/TestNativeVSCharp
here is repo of the source
@IXLLEGACYIXL

Fixed the benchmark usage of unsafe, results are still significantly better for c# though
TestAOTUnitTests.zip

Method
num
Mean

NativeMethod
100
30.00 us

CSharpMethod
100
21.51 us

NativeMethod
500
160.88 us

CSharpMethod
500
107.07 us

NativeMethod
1000
299.19 us

CSharpMethod
1000
213.93 us

Here's the result of another benchmark following the suggestions @froce made

Method
num
Mean

NativeMethod
100
32.42 us

Span
100
19.18 us

SpansFor
100
24.21 us

Optimized
100
10.54 us

Ptr
100
18.92 us

NativeMethod
500
163.00 us

Span
500
98.99 us

SpansFor
500
124.67 us

Optimized
500
54.89 us

Ptr
500
96.45 us

NativeMethod
1000
331.56 us

Span
1000
196.77 us

SpansFor
1000
250.98 us

Optimized
1000
107.84 us

Ptr
1000
195.63 us

Where

Ptr is with the fixed VertexPositionNormalTexture* vertexBuffer signature.
Span is using a span instead of a pointer.
SpansFor is a for loop instead of the manually unrolled loop in source.
I wrote an Optimized version where loop-constants are pre-computed, making it almost two times faster than pointer:

public static unsafe void Optimized(RectangleF constantInfos, RectangleF renderInfos, string textPointer, ref int textLength, Span<VertexPositionNormalTexture> vertexBuffer)
{
    float fX = renderInfos.X / renderInfos.Width;
    float fY = renderInfos.Y / renderInfos.Height;
    float fW = constantInfos.X / renderInfos.Width;
    float fH = constantInfos.Y / renderInfos.Height;

    RectangleF destination = new(fX, fY, fW, fH);
    RectangleF source = new(0.0f, 0.0f, constantInfos.X, constantInfos.Y);

    // Copy the array length (since it may change during an iteration)
    int textCharCount = textLength;

    float scaledDestinationX;
    float scaledDestinationY = -(destination.Y * 2f - 1f);

    float invertedWidth = 1f / constantInfos.Width;
    float invertedHeight = 1f / constantInfos.Height;

    Span<(Vector2 Position, Vector2 TextureCoordinate)> baseData = stackalloc (Vector2, Vector2)[4]
    {
        ( new(-destination.Width, +destination.Height), new(0 * source.Width * invertedWidth, 0 * source.Height * invertedHeight) ),
        ( new(+destination.Width, +destination.Height), new(1 * source.Width * invertedWidth, 0 * source.Height * invertedHeight) ),
        ( new(-destination.Width, -destination.Height), new(0 * source.Width * invertedWidth, 1 * source.Height * invertedHeight) ),
        ( new(+destination.Width, -destination.Height), new(1 * source.Width * invertedWidth, 1 * source.Height * invertedHeight) ),
    };

    int j = 0;

    for (int i = 0; i < textCharCount; i++)
    {
        char currentChar = textPointer[i];

        if (currentChar == '\v')
        {
            // Tabulation
            destination.X += 8 * fX;
            --textLength;
            continue;
        }
        else if (currentChar >= 10 && currentChar <= 13) // '\n' '\v' '\f' '\r'
        {
            destination.X = fX;
            destination.Y += fH;
            scaledDestinationY = -(destination.Y * 2f - 1f);
            --textLength;
            continue;
        }
        else if (currentChar < 32 || currentChar > 126)
        {
            currentChar = ' ';
        }

        source.X = (currentChar % 32 * constantInfos.X) * invertedWidth;
        source.Y = (currentChar / 32 % 4 * constantInfos.Y) * invertedHeight;

        scaledDestinationX = destination.X * 2f - 1f;

        // 0
        vertexBuffer[j].Position.X = scaledDestinationX + baseData[0].Position.X;
        vertexBuffer[j].Position.Y = scaledDestinationY + baseData[0].Position.Y;
        vertexBuffer[j].TextureCoordinate.X = source.X + baseData[0].TextureCoordinate.X;
        vertexBuffer[j].TextureCoordinate.Y = source.Y + baseData[0].TextureCoordinate.Y;
        j++;

        // 1
        vertexBuffer[j].Position.X = scaledDestinationX + baseData[1].Position.X;
        vertexBuffer[j].Position.Y = scaledDestinationY + baseData[1].Position.Y;
        vertexBuffer[j].TextureCoordinate.X = source.X + baseData[1].TextureCoordinate.X;
        vertexBuffer[j].TextureCoordinate.Y = source.Y + baseData[1].TextureCoordinate.Y;
        j++;

        // 2
        vertexBuffer[j].Position.X = scaledDestinationX + baseData[2].Position.X;
        vertexBuffer[j].Position.Y = scaledDestinationY + baseData[2].Position.Y;
        vertexBuffer[j].TextureCoordinate.X = source.X + baseData[2].TextureCoordinate.X;
        vertexBuffer[j].TextureCoordinate.Y = source.Y + baseData[2].TextureCoordinate.Y;
        j++;

        // 3
        vertexBuffer[j].Position.X = scaledDestinationX + baseData[3].Position.X;
        vertexBuffer[j].Position.Y = scaledDestinationY + baseData[3].Position.Y;
        vertexBuffer[j].TextureCoordinate.X = source.X + baseData[3].TextureCoordinate.X;
        vertexBuffer[j].TextureCoordinate.Y = source.Y + baseData[3].TextureCoordinate.Y;
        j++;

        destination.X += destination.Width;
    }
}

Thanks !


text:
Go server updates

Used FormValue
Renamed method
Handled Stripe error
Ran gofmt

Thanks!
@andybons

Thanks again @andybons ! 👏

Yay thanks, @adreyfus-stripe! Hope my lack of context in the suggestions or comments came off poorly. Sometimes I forget to say why I'm suggesting changes.

Not at all @andybons! I appreciate attention to detail especially since I'm brand new to Go and still learning best practices.

authors: adreyfus-stripe andybons


text:
Demo for how to Save Card with PaymentIntents

I can't seem to work out a way to save a card when making payment using the new PaymentIntents.
The old way of making a token on the client-side and passing this to the backend meant I could use the token as a source to make a customer and the card would be saved.
With PaymentIntents however, if I try to create a customer from the source returned from the Stripe.js handleCardPayment API call it throws an error: "The source you provided cannot be attached to the customer. It must be chargeable or pending.".
This has left me at an impasse. The only documentation I could find that covers saving a source with PaymentIntents assumes you already have a customer and source.
Edit: Creating a customer when you create a PaymentIntent is the only way I can see to have cards saveable with the new PaymentIntents flow. Although minor it's a little annoying because a customer is made whenever a user hits the checkout rather than when they've made at least one payment.

@vinnyvimto thanks for raising this, we're still actively working on the docs.
When using handleCardPayment[0] it does a couple of things under the hood:

It creates a card source (tokenisation of card details)
It confirms the PaymentIntent with the source at which point the radar and SCA rules[1] are evaluated
Based on the outcome of the rules:

do Strong Customer Authentication with 3D Secure if required & create the charge
if no authentication is required create the charge

For your scenario, do you always want to create a customer object if there was a successful payment, or do you have a checkbox in your checkout form that decides whether a customer object is created or not?
[0] https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment
[1] https://stripe.com/guides/strong-customer-authentication

@thorsten-stripe thanks for coming back to me.
For this scenario, there is a checkbox for saving a card that like you say used to decide whether a customer is created after submitting a form to the backend.
For the most seamless user experience with PaymentIntents, in the end, I just decided it was easier to make a call to my backend before calling handleCardPayment. This 'pre-call' does a number of things such as create a "pending" order on our end, update the PaymentIntent with shipping information, attach other metadata and create a customer if required to save a card.
If a customer leaves that page between this call and handleCardPayment they're then given an option to try and pay again. Moving an order from pending to completed happens via webhook and then updates the frontend via WebSocket.
Because this ended up being the route I took, it actually didn't matter too much what got sent through with the handleCardPayment call. At the time of opening this issue, however, I was really looking for a way to add shipping details and other metadata without having to hit my backend first. Shipping data being something that can only be added with new card sources.
I'd be interested to know what other flows people have generally come up with.

@vinnyvimto that sounds like a great solution for your use-case, thanks for sharing! We're thinking about allowing the creation of a customer object from a successful PaymentIntent which would allow you to shift the customer creation request outside of the checkout path. Would this be of interest to you?

YES, it would be of great interest !

+1 it would be great to be able to create a customer object and attach the source used in the paymentIntent

I think migrating to intents when there's application code already written would be much easier this way. By easier I mean less code and workflow would need to be changed.

+1 👍 I'm in the same position that @vinnyvimto initially described when this thread was opened.
We're using Stripe for charity donations; on the donation page, we're taking both one-off and recurring gifts using Stripe Elements. When the user-facing donation form is submitted, the payment details are checked and, if successful, a client-side Stripe token is return to the donation form and then the whole form (token, donor details and gift details) is passed to the server. The server then creates a customer and, depending on if the gift is a one-off gift or recurring gift, either a charge is applied (for a one-off gift) or a new subscription plan is created and added to the customer (for a recurring gift). If everything has happened correctly, the user is then sent to a 'Thank you' page and sent a receipt e-mail confirming their gift.
With PaymentIntents, I can't see that a corresponding workflow is possible without a serious code re-write. Any thoughts or advice would be very welcome.

@fthuk thanks for outlining your integration path. You can achieve this via the manual confirmation flow: https://stripe.com/docs/payments/payment-intents/quickstart#manual-confirmation-flow
Just note that you will need to go back to the client for performing authentication if required. Alternatively you can use the new Checkout, which also supports subscriptions now: https://stripe.com/docs/payments/checkout/server#create-subscriptions

@thorsten-stripe So I need to create a payment method and not let Elements make an intent out of it straight away?
Then add the method to a customer, subscribe to a plan and then somehow create the intent with or without 3DS?
If so, why can't we just attach intents to a customer and then subscribe them?

Same problem for me with Checkout. I can integrate it in a few minutes, but without proper handling of EU VAT, it useless :(
So right now I'm trying to integrate flow with a subscription manually.

@kernio after hours of messing around I finally figured it out manually. Maybe I can save you some time.
Use Elements, to create a payment method (not intent), send that id to PHP and add it to a customer, also add it as their default payment method otherwise (weirdly) it wont work.
"invoice_settings" => ["default_payment_method" => $paymentMethod]
then create the subscription.

Quick follow-up that post-payment attachment of a payment method to a customer object is now available via the SCA off-session payment APIs: https://stripe.com/docs/payments/cards/saving-cards#saving-card-after-payment

+1 it would be great to be able to create a customer object and attach the source used in the paymentIntent

Hi, is there an update on this one?

@it-creed yes, see the details in my last comment: https://github.com/stripe/stripe-payments-demo/issues/43#issuecomment-508920663
https://stripe.com/docs/payments/cards/saving-cards#save-payment-method

It is crazy how the first (hence the only) added PaymentMethod is not the default and you have to set it explicitly.

@PranayShah thanks for the feedback. While we understand that this adds complexity, we want our users to be more aware and explicit of what method they are charging. Payments regulation is evolving globally and requires merchants in certain regions to explicitly set up new cards via a non-payment authentication during which they have to present the terms of service. You can find more information on this here: https://stripe.com/en-US/guides/sca-payment-flows

We've published a video that specifically looks at customer management / card-on-file with regard to SCA which you might find helpful if you landed here: https://youtu.be/52oinv6BZ34

I am saving PaymentMethod using: https://stripe.com/docs/payments/cards/saving-cards#saving-card-after-payment. However, when I query customer data, I don't see cards under sources. How can I show my users which cards are stored with our platform.

@thandaanda our recommendation is to store a list of your customer's payment methods (including the fingerprint, expiration date, billing address etc) in your own database. That way you don't have to ping the API for that data. Should you need to list the customer's payment methods, you can do so via the payment_methods endpoint: https://stripe.com/docs/api/payment_methods/list

Hi, I might have some issues with saving cards after payment using the PaymentIntents integration. For customers who don't yet have a saved payment method, the flow looks like this:

Customer hits a "Pay" button
UI calls stripe.createPaymentMethod('card', element)
UI calls backend, passing the ID of the payment method obtained in the previous step
Backend calls stripe.paymentIntents.create(), passing in the payment method ID, as well as setup_future_usage: 'off_session', confirmation_method: 'manual', confirm: true
If this fails because the card needs SCA, backend passes the client secret back to frontend, otherwise end
Frontend calls stripe.handleCardAction(clientSecret) and passes the ID of the returned payment intent to backend
Backend calls const intent = stripe.paymentIntents.confirm(intentId)
If payment method isn't saved yet, backend calls stripe.customers.create({ payment_method: intent.payment_method }) and saves customer ID along with payment method ID, otherwise end

Payment using these saved credentials looks like this:

Backend calls stripe.paymentIntents.create(), passing in stored customer ID and payment method ID
Continue from 5) above

The issue is that when charging a saved card, SCA is always triggered - even for the 4000 0025 0000 3155 test card, which should only require SCA the first time around. I think it might be because the first paymentIntents.create() backend call, where I pass in setup_future_usage, fails because it requires SCA and the payment intent is actually really created when I call handleCardAction() - but I can't pass the setup_future_usage to that, so the intent is created without that option.. or is it something else?

@jahudka the setup steps sound correct. For step 1) of "Payment using these saved credentials" are you passing the off_session:true[0] flag to the payment intent creation?
[0] https://stripe.com/docs/payments/cards/charging-saved-cards#create-payment-intent-off-session

@thorsten-stripe omg I wasn't, can't believe I missed that.. It works now! Although the off_session property of Stripe.paymentIntents.IPaymentIntentCreationOptions is missing in @types/stripe version 6.31.23 (which is the latest), so I had to convince TypeScript a little, but that's no biggie.. Thanks a lot!

Okay, now there's another issue - if I test with a card which always requires SCA, during off-session attempts when the card has already been saved, things start to get wonky..
The initial stripe.paymentIntents.create() fails as expected (well, except for the fact that now instead of returning an IPaymentIntent object with the appropriate state, it throws a StripeCardError - but the client secret can be extracted from that too). But then I pass the client secret to the client side and call stripe.handleCardAction() and it fails; my console says that "[t]he PaymentIntent supplied is not in the requires_action state". Inspecting the intent object found on the StripeCardError exception thrown by stripe.paymentIntents.create() indeed shows that the intent is in the requires_source state, but the code of the error is authentication_required and the message says Your card was declined. This transaction requires authentication.. This is in accord with what the docs say: charging a saved card is supposed to fail with an authentication_required code and a requires_payment_method (resp. requires_source, in older API versions) state.
The docs say I should now "follow the on-session payment instructions from step 2". So I pass the client secret extracted from the error object back to my frontend, my frontend calls stripe.handleCardAction().. and fails, telling me in the console that "[t]he PaymentIntent supplied is not in the requires_action state". This, too, is in accord with the docs - namely the fact that handleCardAction() only works with an intent in the requires_action state - but that effectively means that I have to switch to automatic confirmation now, doesn't it, because I'll have to call stripe.handleCardPayment() instead... what am I missing? SCA in off-session payments can't only support automatic confirmation, or does it?

@jahudka off_session is a confirm-time parameter and is not stored on the state of the PaymentIntent. You can extract the PaymentIntent ID from the error object and call confirm on it again with the saved payment method and omitting off_session:true which will default to false (on-session payment) which will then move the PaymentIntent into requires_action state. I'd recommend that you watch our Dev Chat on this topic, especially starting from 26:55[0] where we talk about the recovery flows.
[0] https://youtu.be/52oinv6BZ34?t=1616

Hi everybody !
I have been in the comfortable situation of implementing a checkout flow from scratch today. I wanted to achieve something similar to what @jahudka wanted to migrate: users can either do a one-off payment or go for a subscription.
I ended up with this flow, which looks pretty more lightweight than manual PaymentIntent handling:

Client requests a PaymentIntent to the server as soon as we know the kind of payment we want to go for. For that, I'm sending a payload like this:

{
  userData: {
    name: "Some name",
    email: "some@email.com",
  },
  amount: 123123,
  currency: "eur",
  isSubscription: true,
}

The userData field contains information that I want to attach to the customer I may create later on if the payment succeeds. Note that if you need to charge existing customers you could add to this payload another key to send the customerId to use in the creation of the PaymentIntent.

Server generates the PaymentIntent. The userData is stored temporally in the metadata field and if isSubscription === true we need to set setup_future_usage = "off_session". Also, it's required to send payment_method_types = ["card"]. Something like this:

const payload = {
  metadata: {
    userData: JSON.stringify(userData),
  },
  amount,
  currency,
  payment_method_types: ['card'],
};

if (isSubscription) {
  payload.setup_future_usage = 'off_session';
}

stripe.paymentIntents.create(payload);

Then it sends the client_secret field of the created PaymentIntent to the client.

The client receives the client_secret (setting it in the state or any other medium depending on your technology of choice), captures the values of the inputs (billing address and card data mainly) and uses stripe.handleCardPayment() passing the payment_method_data when the user presses the "pay" button. In my case looks something like this:

const { paymentIntent, error } = await stripe.handleCardPayment(
  clientSecret,
  {
    payment_method_data: {
      billing_details: {
        ... some details
      },
    },
  }
);

Note that handleCardPayment handles the authentication part of SCA for you, so you don't need to do anything else on the client except providing feedback to the user based on the error key returned.

Finally, in a async way, the server receives via a webhook the payment_intent.succeeded event and takes care of creating a Customer using the data saved in metadata and based on the setup_future_usage value of the PaymentIntent creates a subscription or not (which we could use another field in metadata to differentiate). Note that when creating the customer you need to check if it's a subscription or not in order to add to the payload the payment_method:

const customer = await stripe.customers.create({
  payment_method: intent.payment_method, // only if subscription, otherwise it throws an error
});

For the webhooks handling of the events, it was really useful to use the Stripe CLI and this code snippet. The endpointSecret secret is a value that I was actually no able to find anywhere on the dashboard, but the Stripe CLI displays it when executing stripe listen (it has the structure "whsec_....`).
Hope it helps people coming in this SCA storm under deadlines 😄

Hello all, im working with Stripe and cloning cards, everything works for the first step, but when i want to select an stored card im getting "The payment method you provided has already been attached to a customer"
This is what im doing:
$getPaymentMethod = \Stripe\PaymentMethod::retrieve(
                $paymentMethodId
                  );

            $payment_method = \Stripe\PaymentMethod::retrieve(
                $getPaymentMethod->id
              );

            $getPaymentMethod->attach([
                'customer' => $this->customer->getStripeId(),
            ]);

@lucasgsati please reach out to support using the form at https://support.stripe.com/ (preferred) or via email to support@stripe.com.
Closing this out as we now have dedicated demos for this at https://github.com/stripe-samples?q=sav

authors: Fossil01 PranayShah SpaceyRezum dsampaolo enzoferey fthuk it-creed jahudka kernio loctrice lucasgsati thandaanda thorsten-stripe vinnyvimto

repo: stripe/stripe-payments-demo