Inconsistent gather_nd behavior on empty tensors

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): N/A
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): v2.5.0-rc3-213-ga4dfb8d1a71 2.5.0
Python version: 3.9.4
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A

Describe the current behavior
Using tf.gather_nd with empty tensors raises an invalid argument error, but works if tensors are not empty. tf.gather does not have this problem.
For example, this raises "Invalid argument: Requested more than 0 entries, but params is empty."
tf.gather_nd(tf.zeros([2, 0, 5]), [[0]])

This alternative using tf.gather should be equivalent, but does not raise any error.
It returns an empty tensor of the right shape (1, 0, 5).
tf.gather(tf.zeros([2, 0, 5]), [0])

The tf.gather_nd example works fine if the tensor is not empty. This returns a tensor of shape (1, 1, 5).
tf.gather_nd(tf.zeros([2, 1, 5]), [[0]])

Describe the expected behavior
tf.gather_nd should be returning empty tensors of the appropriate shape just as tf.gather does. Note that while in this example tf.gather is an alternative, this is not always the case. For example, gathering based on multi-dimensional indices would force using tf.gather_nd, and any code that might face empty tensors now needs to handle these as corner cases.
Standalone code to reproduce the issue
The single line examples above are enough to reproduce the issue.

I am aware of the documentation. That is precisely why I'm reporting this as an inconsistent behavior.

@leandro-gracia-gil,
Can you please let us know why do you want to use Empty Tensors? Thanks!

Rather than using empty tensors, what I want is not to have to code workarounds for tf.gather_nd if one of my tensors happens to be empty.
My use case involves using tf.gather_nd with the tensors in a nested structure. Depending on the situation, some of the tensors might have an inner dimension (not indexed by tf.gather_nd) with size 0, effectively making the whole tensor empty. However, because tf.gather_nd fails with empty tensors even if indexing does not happen in empty dimensions, the code fails in these cases. This is not the case of tf.gather, which correctly returns an empty tensor of the right shape after indexing the appropriate (non-empty) axes.
Unfortunately, I actually need to index 2 dimensions at once based on tensor indices, which means I must use tf.gather_nd.  The fact that tf.gather works fine with empty tensors but tf.gather_nd does not in equivalent scenarios is why I decided to submit this as an inconsistent behavior issue.
Hope this clarifies things a bit. The code I showed above is just the simplest way to reproduce the issue I could find.

Replying to avoid it from closing automatically. Let me know if any further info is required.

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.

I'm closing this. It's been 3 years and I am no longer using TensorFlow. If there's anyone else interested, feel free to reopen.


Live

Test PR

Docs Build status updates of commit 24aa014:
:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Double-fault handler not running correctly

It seems like the double fault handler isn't running with its own stack like is intended. This should be investigated.

In #46, a TODO was added with a test for this functionality that should be updated once the issue is fixed.


Create symlink for the corgi ssl cert verification

Fix the SSL CERTIFICATE_VERIFY_FAILED for connection with corgi

This will try to fix the error: _httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (ssl.c:1125)
The reference: shorturl.at/ahqUX

@huiwangredhat It looks like it's caused by changes in https://github.com/RedHatProductSecurity/openlcs/pull/19 .
Have you verified if this change helps?  I'll also take a close look on httpx documentation and see if this could be fixed via other means..

@rhyw, I verified the fix locally, and it works.

@rhyw, Humm, it hasn't passed the pipeline test. Let me test it to build a container locally first.

@huiwangredhat I think https://github.com/RedHatProductSecurity/openlcs/pull/51 should resolve the issue here.

@rhyw thanks for your reply and fix. Let's close this PR and use #51


We need a way for the user to recover from app crashes

Since stored values in local storage are used when a user logs in, they will immediately be taken to wherever they were when they last used the app. Hence, if the last thing that happened when fully logged in was an app crash, they will go to that same place and experience the same crash every time they log in. They will have to use a different browser in order to continue their work.
There needs to a way for the user to resolve this situation, or for the app to detect and fix it (semi) automatically.

https://kentcdodds.com/blog/use-react-error-boundary-to-handle-errors-in-react

I am no longer able to create the type of error that put the app into the loop, so there is really no way to test this fix.


Added Collector's Edition Bunny Pet for Terraria

Pull Request
Title
Script to update the Mono registry to automatically enable the Bunny Pet for Terraria players.
This should work for both players on Steam and GOG.
Type of Change

[X] New feature
[X] Bug fix
[X] Documentation Update
[X] Refactoring
[X] Hotfix
[X] Security patch
[X] UI/UX improvement

Description
Added a script src/commands/gaming/terraria/collectors-bunny-pet.sh  and updated tab_data.toml accordingly.
Testing
Created a new character in both Steam Terraria and GOG Terraria.
The Bunny Pet appears as described.
Impact
Not relevant.
Issue related to PR
Not relevant.
Additional Information
Not relevant.
Checklist

[X] My code adheres to the coding and style guidelines of the project.
[X] I have performed a self-review of my own code.
[X] I have commented my code, particularly in hard-to-understand areas.
[X] I have made corresponding changes to the documentation.
[X] My changes generate no errors/warnings/merge conflicts.

Sorry for the inconvenience. We had a massive restructure of the codebase to improve future development. Because of this can you update your PR to the new structure. Thank you for your assistance and contribution.

Should be under the latest commit now @ChrisTitusTech.
No worries, glad I could help be a part of this project.


Dynamic SSL buffers

Dynamic SSL buffers
This commit adds changes from the dynamic_ssl_buffers PR(https://github.com/ARMmbed/mbedtls/pull/1208)
Co-authored-by: Aditya Patwardhan<EMAIL_ADDRESS>Revert the breaking changes introduced by the dynamic SSL buffers PR.
Includes some required changes in the above PR (for rebasing).

Description
Original work done in PR by Andy Green<EMAIL_ADDRESS>, I have rebased and addressed review comments to keep change backward compatible. The PR helps to reduce the amount of heap simultaneously used by mbedTLS. With local testing on esp32 I have noticed that the difference between minimum_heap_used with and w/o dynamic ssl buffers was considerable.

the following results were obtained by running the mqtt/ssl_mutual_auth  example on esp32.

Status
Minimum free heap size

Without Dynamic SLL buffers(current)
180472 bytes

With Dynamic SLL buffers
196544 bytes

Larger value of  minimum free heap size denotes that the Mbedtls used less memory simultaneously. The memory spared by Mbedtls can be used by other tasks.
Status
READY
Requires Backporting
NO
Migrations
NO
Additional comments
Any additional information that could be of interest
Todos

[ ] Tests
[ ] Documentation
[ ] Changelog updated
[ ] Backported

Hi @AdityaHPatwardhan and thanks for your contribution!
Before taking a closer look at the details of the patch, there's a few points I'd like to discuss with you:

Your PR targets mbedtls-2.17, which is not a maintained branch and cannot accept changes. New features go to the development branch. The other maintained branches are 2.16.x and 2.7.x, which are LTS branches and only accept fixes bor bugs an security issues. (By the way, if you're using 2.17, you should switch to one of the maintained branches as soon as possible, since 2.17 has publicly-known vulnerabilities.)

In 2.22.0 we added a new feature, controlled by the config option MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH, which is different from what I think your PR is doing, but related in that it shares a common goal: saving RAM used by SSL connections. Did you have a look at that feature? Could you elaborate on how your PR differs from it (what are the pros and cons of each approach)?

Also, it's worth noting that we are planning to rewrite most of the message processing stack, and while that rewrite is pending, any change in that area runs the risk of duplicating work, so we'd like to avoid working on changes if know they're going to become obsolete when the rewrite comes in. @hanno-arm what do you think of this specific case - does it conflict with or duplicate planned work?

@mpg Thank you for the reply and clarification.

Your PR targets mbedtls-2.17, which is not a maintained branch and cannot accept changes. New features go to the development branch.

Yes I understand the target branch here is mbedtls-2.17 and it does not accept merge requests. It was never my intention to get it merged here ( My bad that I did not mention this in the description). I just rebased this (really old) PR (https://github.com/ARMmbed/mbedtls/pull/1208)  to a release branch which was easier than rebasing it over the development branch. I was hoping to have some discussion regarding the PR i.e. whether this is still useful in Mbedtls and would be allowed in development branch after a few changes.

In 2.22.0 we added a new feature, controlled by the config option MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH, which

No, I have not looked at the feature. Thank you for notifying, I will take a look at the feature and list the points in which this PR is different.

@AdityaHPatwardhan Thank you for your work and for taking a look at the new feature MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH. As @mpg mentioned, we plan to replace the entire messaging layer of Mbed TLS by a rewrite called MPS which is currently developed alongside the TLS 1.3 prototype for Mbed TLS in https://github.com/hannestschofenig/mbedtls/tree/tls13-prototype. The goal is to have a first version of this upstreamed into Mbed TLS by mid-21. MPS will also enhance flexibility of the buffer handling, and in particular allow for dynamic buffer sizes. I'd therefore rather hold back any work in the area of the messaging layer if possible, as there's risk it overlaps with the MPS / TLS 1.3 efforts.

@AdityaHPatwardhan Thanks for clarifying why 2.17! It is indeed a good idea to allow some time for discussion before you spend too much effort on the PR. Especially since it's a rather special time where we're less likely to accept changes in this area (as Hanno just confirmed). However, if you can analyse the differences between this PR and the feature that was introduced in 2.22, I think that would be valuable.

Thank you @hanno-arm and @mpg for your inputs.

As suggested by the reviewers, this is similar to a feature added in the Mbedtls-2.22.0. The feature MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH  serves the purpose of dynamic buffers which is the main goal of this PR. Closing this.

As suggested by the reviewers, this is similar to a feature added in the Mbedtls-2.22.0. The feature MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH  serves the purpose of dynamic buffers which is the main goal of this PR. Closing this.


Hardcoded path in scripts.go

Please don't assume shells are in /bin. This breaks caddy-git on FreeBSD (and probably others that install shells in /usr/local). You could either get a shell path from /etc/shells, or use #!/usr/bin/env {shell}.

Oops. Do you mind submitting a PR for this ?

The change from PR #58  seem to break the plugin for me. I'm getting the below message in the log when Caddy tries to update the git repo. I just rebuilt Caddy with the plugin from the caddy homepage.
/usr/bin/env: ‘bash ’: No such file or directory
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2017/05/12 06:36:44 exit status 1

Distribution: Ubuntu 16.04.2 LTS x86_64

I'll do some testing. It seems like it's looking for bash with a space.
Op vr 12 mei 2017 08:44 schreef Eric Ripa<EMAIL_ADDRESS>
The change from PR #58 https://github.com/abiosoft/caddy-git/pull/58
seem to break the plugin for me. I'm getting the below message in the log
when Caddy tries to update the git repo. I just rebuilt Caddy with the
plugin from the caddy homepage.
/usr/bin/env: ‘bash ’: No such file or directory
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
2017/05/12 06:36:44 exit status 1
Distribution: Ubuntu 16.04.2 LTS x86_64
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/abiosoft/caddy-git/issues/57#issuecomment-300997232,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AATyjEfXTvzDF7a2IRqg9cY-sVrOyNOLks5r4__MgaJpZM4NX0yU
.

Oops. the whitespace most likely. Should be pushing a fix soonest.

I am unable to reproduce this both on Mac and on Linux.
Something looks weird here.

@eripa, what happens if you run /usr/bin/env bash in a terminal?

Strange indeed @abiosoft
@ekollof I updated the original post before, in summary it works fine.

I've downloaded from caddyserver.com, built from source and tested both on linux and windows for both private and public repositories and it works as expected.

@abiosoft What Linux dist are you using?

Good point. I was just using containers based off Alpine. Let me try using an Ubuntu <IP_ADDRESS> image.

I do know Ubuntu is a bit weird when it comes to bash, with them using dash as a default shell. But still, that shouldn't break env. Unless if they mess with the ${PATH}

Ok, I'm thinking maybe it's some systemd environment configuration weirdness. Alpine is much more straight forward!

I just tried in an ubuntu 16.04 image as well. Also works.
Can you try with another distro. While at that. I'll push out a minor fix (remove a whitespace that I do not expect to cause problems) and let me know if that changes anything.

@eripa I've successfully deployed the fix for whitespace removal. Can you try again now ?

Quite strange that it didn't work on my Ubuntu.
@abiosoft your commit fixed the issue, thanks a lot!

You're welcome.
And thanks @ekollof for this issue and fix :)


TST: Add testing for hyp2f1 for complex values in anticipation of move to Cython.

Reference issue

This closes no issues but is a preliminary to future work that will address gh-7340, gh-8054, gh-8083, gh-4894, as well as other defects in hyp2f1 for complex numbers for which there are no existing issues.
What does this implement/fix?

This PR is a follow up to gh-14256, which was an attempt to begin translating hyp2f1 for complex values into Cython to improve maintainability and make it easier to fix the many longstanding issues with this function. It was decided that the previous PR was too unwieldy for prompt review so this is the first in a series that break the previous PR into several smaller ones. As explained below, although the line count of this PR also appears unwieldy, a large bulk of the lines are dedicated to test cases and others to explanatory comments. I've taken steps to save the reviewer from the need to validate each test case individually. These steps are described below. This PR does not contain specialized numerical mathematics and should be accessible to a wider class of reviewers than the previous PR.
Tests are added for hyp2f1 for complex values for a large but not exhaustive set of the special cases that need to be handled when computing this function. Additional tests covering additional cases will be added incrementally as progress is made translating the existing Fortran implementation of hyp2f1 into Cython. The script scipy.special._precompute.hyp2f1_data.py has also been added which compares scipy's hyp2f1 against mpmath's in a grid of points in the complex plane over a range of parameter combinations. This script is useful for assessing the health of hyp2f1, ensuring that no regressions occur when translating into Cython, determining where fixes need to be made, and deciding between different options when making changes to the implementation.
Additional information

Test cases are written in a verbose style using namedtuples and pytest.mark.parameterize.
For example
    @pytest.mark.parametrize(
        "hyp2f1_test_case",
        [
            pytest.param(
                Hyp2f1TestCase(
                    a=0.5,
                    b=0.2,
                    c=-10,
                    z=0.2 + 0.2j,
                    expected=np.inf + 0j,
                    rtol=0
                )
            ),
            pytest.param(
                Hyp2f1TestCase(
                    a=0.5,
                    b=0.2,
                    c=-10,
                    z=0 + 0j,
                    expected=1 + 0j,
                    rtol=0
                ),
                marks=pytest.mark.xfail(reason="gh-7340")
            ),
...

I think this helps with readability. It also makes it easy to mark individual test cases as expected to fail. These failing tests cases demonstrate flaws in the current implementation that will be addressed in future PRs. A large portion of the lines in this PR come from these verbosely expressed test cases. A function scipy.special._precompute.hyp2f1_data.make_hyp2f1_test_cases has been added which can help generate the boilerplate for these test cases.
The following steps have been taken to spare the reviewer the tedium of having to check the validity of all test cases.

Assertions have been added that ensure that a test case's parameters actually satisfy the conditions for the corresponding test. For example

    def test_region2(self, hyp2f1_test_case):
        """|z| < 1 and real(z) < 0."""
        a, b, c, z, expected, rtol = hyp2f1_test_case
        assert abs(z) < 1 and z.real < 0  # Tests the test
        assert_allclose(hyp2f1(a, b, c, z), expected, rtol=rtol)

A test, test_test_hyp2f1, has been added which checks that the expected value for each test case is actually the value that is computed by mpmath. This is written in such a way as to ensure there's a single source of truth for the test cases. It has been marked as slow so that it will be skipped on the continuous integration builds (as far as I'm aware). It will also be skipped if mpmath is not available. At this time, this test is not actually slow because there aren't that many test cases. This test may become slow in the future if more test cases are added.

Thanks @steppi, this looks really good and thorough. My main question right now is about the test strategy. We have slow and xslow decorators, the former is run on a subset of CI jobs (those with full in the name, can also be run with scipy.test('full')) and the latter need to be enabled with export SCIPY_XSLOW=1.
These hyp2f1 tests are really specific though. We don't want regular contributors to have to generate this 700 MB file, nor do we want to commit it to the repo. Given how heavy it is, it's a development tool rather than a test suite addition I'd say. So it may be better to put it behind a separate switch (say a SCIPY_MPMATH_XSLOW env var) than adding it to xslow.
It seems a little tricky to get the right balance here for the test suite. I'd say the division is:

regular tests: fast individual tests (sub-second), total tests for the feature on the order of seconds. We want to run O(40,000) tests in a couple of minutes here. Coverage should be enough to not badly break anything.
full test suite (includes slow): these aren't run by default with scipy.test(), but they are run in CI jobs for each architecture. So the total runtime should still be limited to ~20-30 minutes on CI. Individual tests can take in the 1-10 second range here.
tests marked xslow. Not run in CI, and enables/disables some benchmarks too IIRC. Used for special cases - tests taking in the 10 sec - 30 min range, high-memory tests, etc.

For something that takes 40 minutes on an 8-core machine, I'd say the only comparable thing we have is the optimize global benchmarks suite (which is controlled by SCIPY_XSLOW currently).

@rgommers
Sorry, I should have been more explicit about what's going on. The script,  scipy.special._precompute.hyp2f1_data.py shouldn't be run unless a user explicitly runs it. The data file is not meant to be checked into version control. What I did was put a command line option to specify where the output file will go, so that a user can put it somewhere on their local machine if they want. My workflow was to run this first on the original Fortran implementation to gather a baseline and then again on my translated code. I would then explore the data in the file with pandas to find cases where either the translation was less precise than the original or vice versa and add these to test cases. Then I would work on improving the translation so that all of the cases would pass. There's a function in scipy.special._precompute.hyp2f1_data.py that generates the pytest boilerplate for the test cases, which I then paste into scipy.special.tests.test_hyp2f1.py.

This looks very clean now. Test structure wise I'm happy. I haven't tried to wrap my head around the functionality under test yet, since @person142 understands all that way better. But if it is necessary I'll do that (maybe next weekend), this kind of PR we can get merged in a reasonable amount of time.

Great, thanks. I plan to make the future PRs for hyp2f1 as small and atomic as is reasonable, changing things bit by bit until none of the old hyp2f1 remains. Optimistically, I'd hope to be able to get through everything in around 1.5 years. I read your post on The cost of open source software and will try to keep what you said there in mind and not create unnecessary burden for the maintainers. I can probably help out with some amount of review work along the way.

I should be able to get to this in the second half of this week-no time until after Tuesday for sure though.

Optimistically, I'd hope to be able to get through everything in around 1.5 years.

Ouch, that's a long road ahead.

I read your post on The cost of open source software and will try to keep what you said there in mind and not create unnecessary burden for the maintainers. I can probably help out with some amount of review work along the way.

That's always nice to hear:) I'm not worried about it here though - your PRs and explanations look great, I wish they were all like this!

Optimistically, I'd hope to be able to get through everything in around 1.5 years.

Ouch, that's a long road ahead.

Ah. It's really not too bad compared with the length of time some of the outstanding PRs for hyp2f1 have been open. I have a roadmap planned out and will work on it a little at a time and try to keep a steady trickle of small PRs coming.

I read your post on The cost of open source software and will try to keep what you said there in mind and not create unnecessary burden for the maintainers. I can probably help out with some amount of review work along the way.

That's always nice to hear:) I'm not worried about it here though - your PRs and explanations look great, I wish they were all like this!

Thanks! That's high praise :)

I've added optional arguments to adjust the number of grid points used, restrict the regions for the arguments z, and restrict the parameter groups. The regions and parameter groups are described in the module level Docstring for scipy.special._precompute.hyp2f1_data.py. I added these while working on the fix for gh-8054 while wanting to compute with a larger grid size, but only keeping the relevant regions and parameter groups. By the way, I'm mostly done with the fix for gh-8054. The series from this paper seems to work well, but there are still small adjustments to make. I also have two more PRs queued up that incorporate the rest of the changes from my closed PR, gh-14256.

@person142 Do you think you'll have time to look at this in the next couple weeks?

Thanks @person142. I've made the suggested changes. I have another one ready to go that I'll submit tomorrow. No worries on the time. If we can get through one small PR per month, I think we can get all of hyp2f1's problems resolved in about a year without either of us eating too much into our spare time.


[LCARS] Bugfixes and other improvements

The alarm control (of the sched lib) was broken after the last update. It is fixed now. Also Bangle.getHealthStatus("day").steps is used as fallback if no widget is installed. I still use the steps of widgets to ensure that the behavior does not change with this update.

Thanks!


[WARNING: RANT] initial value of properties of boxed primitive types

why the hell did you haphazardly change the initial value of properties in this commit???
https://github.com/gradle/gradle/commit/dbb85f50bb184cc128949d4eec039b9ed30fc170
why the hell you break my code programmed against gradle 4.10 in the very first release after that???
why didn't you respect you own mandates and added a new method .emptyProperty(Class) and deprecated the one you had instead of needlessly changing the damn semantics of the API? why was my code was intentionally broken on gradle 5.0 when it should have been good though at least gradle 6.0?
why didn't you even document this brain-dead breaking change in the 4.10 -> 5.0 migration guide here:
https://docs.gradle.org/current/userguide/upgrading_version_4.html#changes_5.0
and could you please at least document it now???
i can't believe you guys, this is completely irresponsible. and don't tell me you needed to do this to support property conventions, you didn't. what a waste of time.

I understand you are unhappy with the change in commit https://github.com/gradle/gradle/commit/dbb85f50bb184cc128949d4eec039b9ed30fc170. The change is part of the stabilizing process that every Incubating API goes through. The summary of the contract is when an API is tagged as incubating, the users should be expecting breaking change without notice. You are welcome to submit a PR for this breaking change.
On another note, it would be preferable for your next issue to follow the issue template as well as reading over the Code of Conduct.


Polling something every 20 us

I'm not sure if it's the same problem, but my gitea burns CPU in a loop with a 200 20 ms us timeout, which seems quite absurd:
[pid   796] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid   796] futex(0x5debff8, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=77531654} <unfinished ...>
[pid   811] <... epoll_pwait resumed>[], 128, 1, NULL, 1) = 0
[pid   811] epoll_pwait(3, [], 128, 0, NULL,<PHONE_NUMBER>41208) = 0
[pid   811] epoll_pwait(3, [], 128, 77, NULL, 1) = 0
[pid   811] epoll_pwait(3, [], 128, 0, NULL,<PHONE_NUMBER>41208) = 0
[pid   811] epoll_pwait(3,  <unfinished ...>
[pid   796] <... futex resumed>)        = -1 ETIMEDOUT (Connection timed out)
[pid   796] futex(0xc004e76148, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid   810] <... futex resumed>)        = 0
[pid   796] <... futex resumed>)        = 1
[pid   810] futex(0xc004e76148, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid   796] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0

Originally posted by @lnicola in https://github.com/go-gitea/gitea/issues/7910#issuecomment-802110597

More details:

I'm using a pre-built 1.13.4-p0 on Ubuntu 20.04
this is a slow VPS (the cheapest I found)
even so, it doesn't use a lot of CPU, about 1%
my binary is built with go 1.15.8
I tried to record a profile, but go pprof says parsing profile: unrecognized profile format (both on go 1.16.2 and 1.13.8
the trace file itself starts with a go 1.11 trace magic string
opening a heap dump (http://localhost:6060/debug/pprof/heap) actually works
the gitea instance should be idle (no HTTP connections, nothing new to index)
it's not doing anything else besides the sleep and syncronization syscalls visible in the snippet above (strace prints pages and pages like that)
I couldn't find any 200 us delay in the source code

CC @zeripath since you replied to me in the other issue and thanks for the help!

trace.zip
Oh, I actually needed go tool trace, not go tool pprof. I'm not sure how to read these, but it might be a work queue polling for new items?

This might actually be relatively normal. go seems to have a sysmon thread that wakes every 20 us (or less often, if it has nothing to do), see https://golang.org/src/runtime/proc.go around line 5100. I don't know why it's not going to sleep more often, though.
This is how the threads look like:
Thread 12 (LWP 14924):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0xc0030fe548, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0xc0030fe548) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x0000000000446705 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1924
#4  0x0000000000447edf in runtime.findrunnable (gp=0xc000048000, inheritTime=false) at /usr/local/go/src/runtime/proc.go:2485
#5  0x0000000000448b57 in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2683
#6  0x00000000004490fd in runtime.park_m (gp=0xc002d7e780) at /usr/local/go/src/runtime/proc.go:2851
#7  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#8  0x0000000000000000 in ?? ()

Thread 11 (LWP 14923):
#0  runtime.epollwait () at /usr/local/go/src/runtime/sys_linux_amd64.s:725
#1  0x000000000043bc72 in runtime.netpoll (delay=502843, ~r1=...) at /usr/local/go/src/runtime/netpoll_epoll.go:126
#2  0x0000000000447be5 in runtime.findrunnable (gp=0xc000048000, inheritTime=false) at /usr/local/go/src/runtime/proc.go:2448
#3  0x0000000000448b57 in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2683
#4  0x00000000004490fd in runtime.park_m (gp=0xc000000d80) at /usr/local/go/src/runtime/proc.go:2851
#5  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#6  0x0000000000000000 in ?? ()

Thread 10 (LWP 14922):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0xc002d47d48, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0xc002d47d48) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x0000000000446705 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1924
#4  0x0000000000447edf in runtime.findrunnable (gp=0xc000048000, inheritTime=false) at /usr/local/go/src/runtime/proc.go:2485
#5  0x0000000000448b57 in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2683
#6  0x00000000004490fd in runtime.park_m (gp=0xc000000d80) at /usr/local/go/src/runtime/proc.go:2851
#7  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#8  0x0000000000000000 in ?? ()

Thread 9 (LWP 14921):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0xc002d47948, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0xc002d47948) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x0000000000446705 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1924
#4  0x0000000000447edf in runtime.findrunnable (gp=0xc000048000, inheritTime=false) at /usr/local/go/src/runtime/proc.go:2485
#5  0x0000000000448b57 in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2683
#6  0x00000000004490fd in runtime.park_m (gp=0xc003074180) at /usr/local/go/src/runtime/proc.go:2851
#7  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#8  0x0000000000000000 in ?? ()

Thread 8 (LWP 14920):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0xc002d47548, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0xc002d47548) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x0000000000446705 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1924
#4  0x0000000000447edf in runtime.findrunnable (gp=0xc000048000, inheritTime=false) at /usr/local/go/src/runtime/proc.go:2485
#5  0x0000000000448b57 in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2683
#6  0x00000000004490fd in runtime.park_m (gp=0xc002cfea80) at /usr/local/go/src/runtime/proc.go:2851
#7  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#8  0x0000000000000000 in ?? ()

Thread 7 (LWP 14913):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0xc000daf148, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0xc000daf148) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x0000000000446705 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1924
#4  0x0000000000447edf in runtime.findrunnable (gp=0xc000048000, inheritTime=false) at /usr/local/go/src/runtime/proc.go:2485
#5  0x0000000000448b57 in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2683
#6  0x00000000004490fd in runtime.park_m (gp=0xc003074000) at /usr/local/go/src/runtime/proc.go:2851
#7  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#8  0x0000000000000000 in ?? ()

Thread 6 (LWP 14911):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0xc000daed48, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0xc000daed48) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x0000000000446705 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1924
#4  0x0000000000447edf in runtime.findrunnable (gp=0xc000048000, inheritTime=false) at /usr/local/go/src/runtime/proc.go:2485
#5  0x0000000000448b57 in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2683
#6  0x0000000000449bb6 in runtime.goexit0 (gp=0xc002cff680) at /usr/local/go/src/runtime/proc.go:3010
#7  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#8  0x0000000000000000 in ?? ()

Thread 5 (LWP 14910):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0x5e308b8 <runtime.newmHandoff+24>, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0x5e308b8 <runtime.newmHandoff+24>) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x000000000044661a in runtime.templateThread () at /usr/local/go/src/runtime/proc.go:1902
#4  0x0000000000445128 in runtime.mstart1 () at /usr/local/go/src/runtime/proc.go:1172
#5  0x000000000044502e in runtime.mstart () at /usr/local/go/src/runtime/proc.go:1137
#6  0x000000000230f37c in crosscall_amd64 () at gcc_amd64.S:35
#7  0x00007ffdf1481d10 in ?? ()
#8  0x00000000063c2070 in ?? ()
#9  0x0000000000000000 in ?? ()

Thread 4 (LWP 14909):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0xc00005ad48, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0xc00005ad48) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x0000000000446ead in runtime.stoplockedm () at /usr/local/go/src/runtime/proc.go:2085
#4  0x0000000000448d0c in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2617
#5  0x00000000004490fd in runtime.park_m (gp=0xc001145b00) at /usr/local/go/src/runtime/proc.go:2851
#6  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#7  0x0000000000000000 in ?? ()

Thread 3 (LWP 14908):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0xc00005a948, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x000000000041481f in runtime.notesleep (n=0xc00005a948) at /usr/local/go/src/runtime/lock_futex.go:159
#3  0x0000000000446705 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1924
--Type <RET> for more, q to quit, c to continue without paging--
#4  0x0000000000447edf in runtime.findrunnable (gp=0xc000048000, inheritTime=false) at /usr/local/go/src/runtime/proc.go:2485
#5  0x0000000000448b57 in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2683
#6  0x00000000004490fd in runtime.park_m (gp=0xc002cc1800) at /usr/local/go/src/runtime/proc.go:2851
#7  0x0000000000476bbb in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:318
#8  0x0000000000000000 in ?? ()

Thread 2 (LWP 14907):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043c017 in runtime.futexsleep (addr=0x5debff8 <runtime.sched+280>, val=0, ns=836603) at /usr/local/go/src/runtime/os_linux.go:51
#2  0x00000000004149b9 in runtime.notetsleep_internal (n=0x5debff8 <runtime.sched+280>, ns=836603, ~r2=<optimized out>) at /usr/local/go/src/runtime/lock_futex.go:201
#3  0x0000000000414a91 in runtime.notetsleep (n=0x5debff8 <runtime.sched+280>, ns=836603, ~r2=<optimized out>) at /usr/local/go/src/runtime/lock_futex.go:224
#4  0x000000000044dbba in runtime.sysmon () at /usr/local/go/src/runtime/proc.go:4679
#5  0x0000000000445128 in runtime.mstart1 () at /usr/local/go/src/runtime/proc.go:1172
#6  0x000000000044502e in runtime.mstart () at /usr/local/go/src/runtime/proc.go:1137
#7  0x000000000230f37c in crosscall_amd64 () at gcc_amd64.S:35
#8  0x00007ffdf1481c60 in ?? ()
#9  0x00000000063c1cb0 in ?? ()
#10 0x0000000000000000 in ?? ()

Thread 1 (LWP 14906):
#0  runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:588
#1  0x000000000043bfa6 in runtime.futexsleep (addr=0x5e309c0 <runtime.sig>, val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45
#2  0x0000000000414906 in runtime.notetsleep_internal (n=0x5e309c0 <runtime.sig>, ns=-1, ~r2=<optimized out>) at /usr/local/go/src/runtime/lock_futex.go:182
#3  0x0000000000414b2c in runtime.notetsleepg (n=0x5e309c0 <runtime.sig>, ns=-1, ~r2=<optimized out>) at /usr/local/go/src/runtime/lock_futex.go:236
#4  0x000000000047517d in os/signal.signal_recv (~r0=<optimized out>) at /usr/local/go/src/runtime/sigqueue.go:147
#5  0x0000000001616e05 in os/signal.loop () at /usr/local/go/src/os/signal/signal_unix.go:23
#6  0x00000000004789c1 in runtime.goexit () at /usr/local/go/src/runtime/asm_amd64.s:1374
#7  0x0000000000000000 in ?? ()

This all looks like it is happening at the go runtime level and is nothing particularly special to gitea.

I guess you're right, I'm new to this. I still think it should throttle down a little, but it seems to work as designed.


Consume telefunc end point from another telefunc apps ?

Hi,
I just dig into telefunc documentation. I am curious how to share telefunc end point between two apps.
Let's say we have 2 apps that developed using telefunc, eg : Master Data and Attendance.
How the Attendance app get employee from Master Data without rewrite / copy paste Master Data's telefunc ?
Same question I had asked to trpc's discussion too https://github.com/trpc/trpc/discussions/2496

You can do that by setting config.telefuncUrl to an absolute URL, see https://telefunc.com/telefuncUrl.

Closing, but let me know if you have further questions.

If you set it to an absolute URL, there are complaints from validateUserConfig() in /node/server/serverConfig

I have this exact specific use case so I tried to set the telefuncUrl to http://localhost:3000/_telefunc where I have a telefunc server running but it doesn't let you.
If you comment out that assertion line the app will start but then attempting to use the telefunc function fails with:
Error<EMAIL_ADDRESS>Usage] telefunc({ url }): The pathname of `url` is `/_telefunc` but it's expected to be `http://localhost:3000/_telefunc`. Either make sure that `url` is the HTTP request URL, or set `config.telefuncUrl` to `/_telefunc`.
    at assertUrl

Commenting a final line (below) fixes the issue but I hate patching node modules unless I have to... is there are reason they urls were asserted like this that I'm not aware of and would break something?

@Irrelon Let me fix those assertions.

Actually I spoke too soon. On the client-side the telefunc call seems not to respect the telefuncUrl config setting. I'm 3-hours new to vike and telefunc so I could entirely be being a numpty though, but when the page loads in the browser and I trigger an event that calls a telefunc action, the post request is going to the browser's current domain, not the one I set in the telefuncUrl config entry.

Did you apply it twice? Once for the server-side import { config } from 'telefunc' and a second time for the client-side import { config } from 'telefunc/client'.

Did you apply it twice? Once for the server-side import { config } from 'telefunc' and a second time for the client-side import { config } from 'telefunc/client'.

I set up vike via Bati and modified the vite.config.ts file to add the telefuncUrl like this:

When I read the telefunc docs for this config option https://telefunc.com/telefuncUrl, the location of the config files that should be modified was unclear. Do I just create two new files? Where in the tree should they go? What should they be named? I'm sure I'm missing something obvious or likely something auto-magically abstracted by the vike-react plugin.


Associative arrays with dashes in keys

declare -A outputs
outputs[HDMI1] = "--auto"
outputs[HDMI-1] = "--auto"

The former is fine, the second is not.
Furthermore, if you try to assign a value that has spaces in it, it really messes up your syntax highlighting:
outputs[HDMI-1]=" "
# syntax broken from now on
echo "hello world "

Thanks. Should be fixed in 1.2.22.


new features

new features come to in mind

gvm use without arg shows current using version
gvm list shows with the index, and that index can be used in use commmand

example gvm use 1

implemented
change the mind. I will not implement


PLANNER-1024: Generate time slots according to builtin patterns

@Christopher-Chianelli could you please add some tests?

@rsynek This PR has been merged into https://github.com/kiegroup/optashift-employee-rostering/pull/75; I'll add tests for the Generator + Rotation API in a different PR since that PR is big enough already.


Documentation?

I know this is a long shot since it looks like the last commit was 2+ years ago, but what do you guys think about adding pythonic documentation?

Hi @kennes913 - are there some examples of what you'd like to see in the way of documentation?
The tests in https://github.com/pokitdok/gremlin-python/blob/master/tests/test_gremthon.py and https://github.com/pokitdok/gremlin-python/blob/master/tests/test_pipeline.py are likely the best "documentation" right now as far as Python examples/snippets for the different things that have been supported.  (beyond what's in https://github.com/pokitdok/gremlin-python#rexster )
I admit that I'm not using this library as much in day-to-day work.  I am definitely interested in what other folks may be doing with it so that we can make sure they have helpful documentation.

@corbinbs, which steps are available or which are not ? If there are that are not and the equivalent function name. For example, to use as() step we need to use as_().

Hi  @cscetbon  - things should be named as expected in Gremlin except for those that conflict with Python keywords.   When there's a keyword conflict, you'll see that trailing _ on the end of the name.
So things like:

in_: https://github.com/pokitdok/gremlin-python/blob/master/gremthon.py#L331
property_: https://github.com/pokitdok/gremlin-python/blob/master/gremthon.py#L356
except_: https://github.com/pokitdok/gremlin-python/blob/master/gremthon.py#L392
or_: https://github.com/pokitdok/gremlin-python/blob/master/gremthon.py#L403
as_: https://github.com/pokitdok/gremlin-python/blob/master/gremthon.py#L575

I think those were the main things that had to be slightly adjusted to avoid naming hard times.

Yeah @corbinbs I understand. Just saying that'd be great if it's added to the README file.


selected label shouldn't overlap with bubble

I checked the branch :+1: Thanks...
Can you update the PR?
I found the following problems:

Not vertically centered when hovering the label. It needs to be centered in all screen profiles (small, medium and large screens)

Label is not within chart. When we drag the label outside the chart, it stays at this position:

And it should be at this position:

@arthurcamara1 About hovering label: text align center for me. What browser are you use?

@sergey-filipenko  we mainly use Google Chrome on Mac and Windows.
we also check that things work and look nice in Firefox on Mac and Windows, and in Safari on Mac
also in Google Chrome on Android and iOS devices

Aha! I saw you solved this though #550

Great! Awesome. I think if you just center the work vertically we can merge.
And then we solve the other issue #552 :)

:smile: :open_mouth: AAAAALMOST THERE
In the current version, if we select a bubble, let's say Colombia, and then drag the timeslider from 1800 to 2015, with the trails option selected, the label stays pointing to the first bubble. In case the bubble is not in the visible area, the label still is:

And this behavior is correct.
However, in this Pull Request, this feature is disabled, so it disappears when the first trail is not visible:

The label should be visible at all times. :)

Also, see how the text label is vertically centralized in the current version:

And in your version (no padding at the top of the label):

Awesome. It now works here.
There are two little problems:

The vertical center
The close button is cropped then the label is at the very top

But since those are just two little visual glitches and easy to fix, I'll merge this PR.


Link error in README

The link of "todos_repository" in Project-Repository-Readme can not be found.

Should be fixed now... thnx


Add additional shortcut validation logic in Remap Shortcuts UI

Summary of the Pull Request
This PR adds extra validation logic to the remap shortcuts UI to prevent the crash in #4046 which is caused by an invalid JSON state. The error was occurring because of the scenarios where a warning is displayed and the drop down gets reset, but the resultant shortcut also has an error.
Example:

Add shortcut remap Ctrl(L)+Alt(L)+A -> Ctrl(L)+A
Change Alt(L) to Ctrl. Warning will appear and UI becomes Ctrl(L)+Blank+A -> Ctrl(L)+A. This is actually invalid and a warning should appear again, but our logic was getting executed only once.
Pressing OK saves the changes even though it is invalid. After this is done, opening Remap Shortcuts always causes runner to crash, and the user has to delete their JSON settings file.

PR Checklist

[X] Applies to #4046
[X] CLA signed. If not, go over here and sign the CLA

Detailed Description of the Pull Request / Additional comments

Moved the shortcut validation to a separate function so that it can be called multiple times. Earlier it was hardcoded into the selection handler lambda function.
CheckRepeatedModifier and GetKeysFromStackPanel were made static as they are independent of the current object.
In order to fix the issue, after validating the shortcut in the current drop down's selection handler, if an error was observed, we iterate over all the drop downs which aren't blank and run the validation logic on them as well, to ensure that another error is not present.

Known issues

Though it fixes the problems for these situations where multiple errors occur, appropriate warnings do not get shown because WinUI only shows the last activated flyout. Since the validation is almost immediate, only the last flyout warning is visible to the user.

Validation Steps Performed
Manually validated by adding shortcuts with all basic warning scenarios and with the above cases where 2 warnings are coupled.
Screenshots
Before fix

After fix

I can get to a state where the check repeat modifier function does not work as expected.
Steps to repro -

I get to the following state : blank + blank + C -> Ctrl(L) + V.
Now I try to set the second blank to Ctrl(L) or any other modifier as well and it says that it should not contain a repeat modifier which it doesn't contain now but previously did.

It seems like we're not clearing up the modifier cache before checking or we should delete one of the blanks?

Not sure what's happening, but seems to be a bug and I can repro it too. I'll look into it. I don't think we should delete the blank because it would just suddenly disappear and the user would be confused.

Turns out it was a bug unrelated to this PR and it existed before this as well, but less noticeable. There was a bug in the CheckRepeatedModifier logic in a specific scenario where there its a 3 key shortcut, and if the first one is blank, then if you try changing the modifier in the second drop down will always throw the repeated modifier since it was checking for itself and not skipping itself. This was happening because a wrong index was being used. I've pushed the fix and it should work now. Great find @alekhyareddy28! 🚀


Remove required id from spaces API

Current coverage is 69.64% (diff: 100%)

Merging #649 into master will not change coverage

@@             master       #649   diff @@
==========================================
  Files            74         74
  Lines          4266       4266
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           2971       2971
  Misses         1010       1010
  Partials        285        285

Powered by Codecov. Last update 563e42b...ea53cc9


Create CODEOWNERS

Initial version of CODEOWNERS, so incomming PRs are automatically assigned for review.

Codecov Report

Merging #179 (8db6d50) into main (59316c1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #179   +/-   ##
=======================================
  Coverage   54.81%   54.81%
=======================================
  Files          32       32
  Lines        5010     5010
=======================================
  Hits         2746     2746
  Misses       1853     1853
  Partials      411      411

Continue to review full report at Codecov.

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

Should probably require an approval from @liamsi


Was the Export interface deprecated?

Is your feature request related to a problem? Please describe.
Export interface for adding new export formats to the tool.
Describe the solution you'd like
In the case that new formats are created. Developers should be able to support them through an exporter interface so that users don't have to worry about writing custom scripts to transform their data from the VoTT Json format.

@aribornstein The export interface has not been deprecated, but extended!  Export providers now support custom UI fields to configure relevant fields within the export provider.  All project export options are availalble in the export area.


Cropping RGB values with ImageStacks throws an error

Step to reproduce: This works.

Select a few RGB files in Imagestacks.
Set the ROI to full volume
Uncheck Grayscale option
RGB stacks loads fine.

Repeat the steps with setting an ROI and see that it throws the error below,  even if you explicitly specify to create a VectorVolume as the output volume.
Loading failed: Select a vector volume as output volume or force grayscale output.
Traceback (most recent call last):
  File "C:/Users/murat/AppData/Local/NA-MIC/Slicer 5.0.2/NA-MIC/Extensions-30822/SlicerMorph/lib/Slicer-5.0/qt-scripted-modules/ImageStacks.py", line 395, in onLoadButton
    outputNode = self.logic.loadVolume(self.currentNode())
  File "C:/Users/murat/AppData/Local/NA-MIC/Slicer 5.0.2/NA-MIC/Extensions-30822/SlicerMorph/lib/Slicer-5.0/qt-scripted-modules/ImageStacks.py", line 697, in loadVolume
    raise ValueError("Select a vector volume as output volume or force grayscale output.")

@pieper @lassoan @smrolfe

Repeat the steps with setting an ROI and see that it throws the error below, even if you explicitly specify to create a VectorVolume as the output volume.

Actually, it doesn't have anything to do with ROI. I think int he second and subsequent steps vectorvolume node is not created correctly. Because subsequent attempts fail with the same error even without an ROI (which clearly works for the very first run).

Pushed a fix.

Still getting an error:
Switch to module:  "ImageStacks"
After downsampling, /home/docker/mydata/Downloads/all/DSC_1000.jpg size is 2320 x 2728
/home/docker/mydata/Downloads/all/DSC_1097.jpg size is 2232 x 2312 (3 scalar components)
Loading failed: 'tuple' object has no attribute 'shape'
Loading failed: 'tuple' object has no attribute 'shape'
Traceback (most recent call last):
File "/home/docker/mydata/Downloads/Slicer/NA-MIC/Extensions-30822/SlicerMorph/lib/Slicer-5.0/qt-scripted-modules/ImageStacks.py", line 395, in onLoadButton
outputNode = self.logic.loadVolume(self.currentNode())
File "/home/docker/mydata/Downloads/Slicer/NA-MIC/Extensions-30822/SlicerMorph/lib/Slicer-5.0/qt-scripted-modules/ImageStacks.py", line 673, in loadVolume
firstArrayFullShape.shape[2] if len(firstArrayFullShape.shape)==3 else 1,
AttributeError: 'tuple' object has no attribute 'shape'

Probably you need to remove .shape (it will be just firstArrayFullShape[2]).

It works now but we still need to an error catching for corner case:  Load successful an RGB imagestack, follow this by a second image selection with mismatched dimensions and choose to overwrite the original RGB volume. This generates an error.


CR Yaml for QuickStart example may need some fix

Hi there,
I have followed the instructions in User Guide to try the flink k8s operator. However, after directly typing commands from the guide, I met such error:
kubectl apply -f config/samples/flinkoperator_v1beta1_flinksessioncluster.yaml
kubectl apply -f config/samples/flinkoperator_v1beta1_flinkjobcluster.yaml

My k8s client version is v1.23.1.
After checking our codes and API doc, I add those missed fields in the sample yaml and both of these 2 commands can work as expected. As a beginner of this community, I am not sure if my modification are necessary. If I miss something, please let me know. If the samples yaml should be updated due to newer k8s version for sure, I am welcome to contribute my fix.
Thanks!

I'm working on this, see https://github.com/spotify/flink-on-k8s-operator/pull/204
welcome to give some ideas

I'm working on this, see #204 welcome to give some ideas

hi haoxin, thanks a lot for the reply. It is great to know that you have done some work on this!
I have one follow up: have you ever met any validation error like my post when running the example?
Besides, for your #204, due to my experience of using flink, for example job like WordCount, 1GiB for both JM and TM should be enough. But I also met same resource problem when setting TM's memory to be 1024MiB for running the example. I increase TM's memory to 2048 as well. But I think for JM, 1024 should be fine.

Maybe you need to decrease the default config?
Below conf is copied from the Flink image 1.14.2
flink@9f93f0c3891c:~$ cat conf/flink-conf.yaml | grep memory
# The total process memory size for the JobManager.
# Note this accounts for all memory usage within the JobManager process, including JVM metaspace and other overhead.
jobmanager.memory.process.size: 1600m
# The total process memory size for the TaskManager.
# Note this accounts for all memory usage within the TaskManager process, including JVM metaspace and other overhead.
taskmanager.memory.process.size: 1728m
# To exclude JVM metaspace and overhead, please, use total Flink memory size instead of 'taskmanager.memory.process.size'.

You are right about the flink config. My bad for forgetting the default JM memory config in flink yaml.
But I think my problem is not about flink. Instead, it is something wrong in the flinkoperator_v1beta1_flinkjobcluster.yaml in my environment. It seems that you have not met such error. It may be due to my k8s version or something else. I may keep this issue open for 1 or 2 weeks to see if there are any other people facing this problem. If not, I will close this issue.
Again, @haoxins thanks for your help~

It may be due to my k8s version or something else.

I use K8s 1.21 for this testing~

close this issue as there are no other relevant cases.


Update test_network.md

Change version at the beginning of the tutorial, because old version numbers lead to abortion in following steps.
Type of change

Documentation update

Thanks for the update. We can merge this one, but I think ultimately we should remove the version reference in this doc and simply point to the main install doc page, like we've done in later release branches and main.
Please sign the commit using the instructions at: https://github.com/hyperledger/fabric/pull/3204/checks?check_run_id=4996692476

No response from PR creator, closing...


Question about File format?

Hello, I am waiting on my sensor board to arrive in order to finish building this. I just wanted to

Thank you! This is an awesome project! I had wanted to do one along these lines for sometime! I am planning on trying to add a speaker, and mp3 module to play random taunts and insults at the player LOL!
I was curious, what program is the PCB-Gerber.zip file made for? it looks like it's for manufacturing the PCB. In the past I had a version of Eagle that I did that from, but recently got Fritzing, so that is my new go to. I have always used the process of thermal transfer from laser print to the copper, then etched it with some home brew CuCl2. However I am considering trying to make my own tool mount for my 3d printer to make it a miniature 2D CNC. If these files are for some opensource or free milling app that would be really good to know!

Anyhow thanks again!
Cheers!

LOL Nevermind, I realized it was in the documentation.


INT-1906: fix & refactor core inbound & outbound channel adapters

These are my combined commits:

rename MethodInvokingInboundChannelAdapterParser to DefaultInboundChannelAdapterParser
rename MethodInvokingOutboundChannelAdapterParser to DefaultOutboundChannelAdapterParser
InboundChannelAdapterInnerBeanWithExpression-fail-context.xml
add ExpressionEvaluatingMessageHandler, impl INT-1906 and their tests
BeanFactoryTypeConverter check returned value in void condition

But I think, that the work isn't in the end.

For reference https://jira.springsource.org/browse/INT-1906

Well, I've made some improvements & fix 'former' MethodInvokingInboundChannelAdapterParser.
Also, especially for Oleg: Still, I was right yesterday in our personal conversation about enforce Void for MethodInvokingMessageHandler.
On th background it will be a confused problem on:
https://github.com/SpringSource/spring-integration/blob/master/spring-integration-core/src/main/java/org/springframework/integration/util/MessagingMethodInvokerHelper.java#L166
when I pass expectedType = Void.class...
So, I think it is new issue.
And about current PR: I see only adding some description into manual about expression attribute ability of these two channel adpters.


Support paymentSummaryItems in PaymentFlow

Is your feature request related to a problem? Please describe.
Support of paymentSummaryItems in PaymentFlow.
Describe the solution you'd like
As some countries requires setting this for setupIntent, extending the flow to support paymentSummaryItems would make the onboarding flow for customers easier.
Usage Product
If you adopt this plugin, please let us know which product you are using.
Product Name: Two products that still are in beta.
Product URL :
Using Function:

[X] Payment Sheet / Payment Flow
[X] Apple Pay
[X] Google Pay
[ ] Identity Verification Sheet

Here's Stripe's example:
https://docs.stripe.com/apple-pay?platform=ios#create-payment-request
The paymentSummaryItems seems already implemented on createApplePay https://github.com/capacitor-community/stripe/tree/main/packages/payment#createapplepay via the option prop paymentSummaryItems (https://github.com/capacitor-community/stripe/tree/main/packages/payment#createapplepayoption)
Wouldn't it be possible to use the same functionality?

This is a method for Apple Pay and cannot be used with PaymentFlow.
https://developer.apple.com/documentation/passkit_apple_pay_and_wallet


iOS 13.0 Crash

Create the project with the XCode latest version, the key window has change,just show code:
SVProgressHUD.m

(SVProgressHUD*)sharedView {
static dispatch_once_t once;
static SVProgressHUD *sharedView;
#if !defined(SV_APP_EXTENSIONS)
dispatch_once(&once, ^{ sharedView = [[self alloc] initWithFrame:[[[UIApplication sharedApplication] delegate] window].bounds]; });
#else
dispatch_once(&once, ^{ sharedView = [[self alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; });
#endif
return sharedView;
}

can't use [[[UIApplication sharedApplication] delegate] window].bounds]

change to [UIScreen mainScreen].bounds or [UIApplication sharedApplication].keyWindow.bounds

@Reinoal :  change to [UIScreen mainScreen].bounds or [UIApplication sharedApplication].keyWindow.bounds
This solution is not working for me.

@Reinoal : change to [UIScreen mainScreen].bounds or [UIApplication sharedApplication].keyWindow.bounds
This solution is not working for me.

I also experienced a crash as soon as any SVProgressHUD call was done.
For me it worked by changing the following lines in SVProgressHUD.m to:
Line 72:
dispatch_once(&once, ^{ sharedView = [[self alloc] initWithFrame:[UIApplication sharedApplication].keyWindow.bounds]; }); // SV Fix 2020
Line 657
self.frame = [UIApplication sharedApplication].keyWindow.bounds; // SV Fix 2020
Line 1231
CGRect windowBounds = [UIApplication sharedApplication].keyWindow.bounds; // SV Fix 2020

@Reinoal : change to [UIScreen mainScreen].bounds or [UIApplication sharedApplication].keyWindow.bounds
This solution is not working for me.

I also experienced a crash as soon as any SVProgressHUD call was done.
For me it worked by changing the following lines in SVProgressHUD.m to:
Line 72:
dispatch_once(&once, ^{ sharedView = [[self alloc] initWithFrame:[UIApplication sharedApplication].keyWindow.bounds]; }); // SV Fix 2020
Line 657
self.frame = [UIApplication sharedApplication].keyWindow.bounds; // SV Fix 2020
Line 1231
CGRect windowBounds = [UIApplication sharedApplication].keyWindow.bounds; // SV Fix 2020

Once I did this I still had a crash, just in a different place. I resolved it by adding back the missing selector to my AppDelegate. In other words:
- (UIWindow*) window{
    return _window;
}

I just ran into this again running iOS 14.5 on XCode 12.5 RC. Are there any solutions to this?


Add ModelType export

We are using the ModelType inside our NestsJs application like this:
export class SomeCoolService {
  constructor(
    @InjectModel(SomeEntity)
    private readonly someModel: ModelType<SomeEntity>,
)
}

This change would support the backward compatibility with 5.x.x and the typing should be also correct for these use-cases.

I made this change to ReturnModelType, because the normal ModelType is not fully what it should be (at least when i made verison 6, the normal ModelType somehow didnt give the right types, thats why ReturnModelType is there, because this is what gets actually returned)
PS: you could just use import {} from 'typegoose/types';

Okay, sounds great - correct typing is always good ;)
I  just tried to change it to ReturnModelType but encountered a problem with the current typing.
We defined a constructor on our base class something like this:
  public constructor(data?: DeepPartial<T>) {     super();     if (data) {       Object.assign(this, data);     }   }
ReturnModelType  required a constructor without any param. Do you think we can change this to a constructor with only optional params?

this would be how to use it:
https://github.com/hasezoey/typegoose/blob/a871d9b00ac4f24cdb8e3ecb3034e46abe387927/test/models/user.ts#L77-L79
Please note that the typeof cannot be left out

@B-Stefan could you get it fixed?
PS: do you mean you use a Typegoose model with a constructor? when yes, sorry for requiring a class without a constructor / empty constructor, i'm open for PR's on this, im not the best at Typescript's types

ReturnModelType required a constructor without any param. Do you think we can change this to a constructor with only optional params?

got fixed in 5a6f94db4fa2c7f17bf34d8cea1dcfb7b636412a
@B-Stefan does everything work now?

@hasezoey  Thanks for this. Had the same solution in my mind but unfortunately, this doesn't work as expected.

export class SomeCoolService {
  constructor(
    @InjectModel(SomeEntity)
    // Typeof is still neccecary
    private readonly someModel: ModelType<typeof SomeEntity>,
   )
}

// Test utils

export function getModelForEntity<T extends AnyParamConstructor <T>>(
  Entity: new () => T,
): ReturnModelType<T> {
  const entity = new Entity() as ReturnModelType<T>;
  return entity
}

// Test class

// @ts-ignore --> Here we have the Problem.
const someModel = getMockedModel<SomeEntity>(SomeEntity)

new SomeCoolService()

I will manage with this solution but I think for new developers that are not used to complex typescript typings this could be a burden. Maybe mark this issue as an enhancement and look into this typing issue later with low prio?

shouldnt
export function getModelForEntity<T extends AnyParamConstructor <T>>(
  Entity: T, // here
): ReturnModelType<T> {
  const entity = new Entity() as ReturnModelType<T>;
  return entity
}

work?

Yes, it should but it didn't :/
I will investigate the reason for this at some point but with a low prio.

Found the root cause of this problem:
https://github.com/Microsoft/TypeScript/issues/1213

class A<T> {
   constructor: (arg = {}){
   }
}

class B extends A<B> {

}

const model : ReturnModelType<typeof B> = getModelForClass(B) // should fail
```

Found the root cause of this problem:
microsoft/TypeScript#1213
class A<T> {
   constructor: (arg = {}){
   }
}

class B extends A<B> {

}

const model : ReturnModelType<typeof B> = getModelForClass(B) // should fail

why should this fail? i dont see a problem with it ... or is it the typeof one?

@hasezoey  Sorry - this was misunderstandable.
It should not fail but it does ;) The reason for this is that B extends A and A is a generic class.
The Typescript type InstanceType<T> doesn't support generic classes, see: https://stackoverflow.com/questions/52655236/typescript-instancetype-with-generic-parameter
In the ReturnModelType we use excetaly this syntax the InstanceType
export type ReturnModelType<U extends AnyParamConstructor<T>, T = any> = ModelType<InstanceType<U>> & U;
So I think with the ReturnModelType we can't use generic classes right now.

i still dont really understand why it is not working, is it because A i generic, but B is not? or should typescript inherit the generic from A?

I'm closing this because it is not "relevant" anymore (can just be imported via @hasezoey/typegoose/types or @hasezoey/typegoose/lib/types, i dont know)

@hasezoey I'm running into the same problem when trying to migrate to typegoose 6.0.0-28 in one of my projects. Will try to prepare a sample tomorrow.

@Ben305 @B-Stefan i made "ReturnModelType" to make a unified return type of functions (getModelForClass & setModelForClass), but i never really understood "ModelType", thats why i left it as-is, with "no documentation" and i never found a case where ReturnModelType didnt work, so i assume (to this day) that "ModelType" is very cryptic and not really needed, but i will look into it again tomorrow

and i never found a case where ReturnModelType didnt work

additonal context: i always just saw that the return type of (getModelForClass | setModelForClass) wouldnt be enough & "ModelType" didnt had any documentation on what it really did over the other types

I'm having the same issue using this with nest. But I can't seem to be able to even import ModelType from @typegoose/typegoose anymore? this is quite annoying as I was using 'typegoose' the deprecated package directly and then decided to update to this but I've been hit with this breaking change.

@michaelbats ModelType is still available @typegoose/typegoose/lib/types import it from there, if ReturnModelType<typeof Class> dosnt work for you

@hasezoey
ReturnModelType doesn't work for some reason in nestjs, B-Stefan seems to know a lot more about it than me, I've tried to import it initially from @typegoose/typegoose/types which didn't exist, now that I've went with your import structure it works! thanks!

which didn't exist, now that I've went with your import structure it works! thanks!

this is probably because the project structure is as below:

all source is in src/
all tests are in tests/
"npm export" is into lib/, which many packages do, but i dont understand how they make it without needing to include the /lib/ in some imports...


LALLALALALAL

Describe the feature
[A clear description of the feature.]
Use Case
[Explain the use for this feature and how it might benefits the project.]
Implementation Details
[Provide any details or suggestions on how this feature could be implemented.]
Visual Concepts
[Does it imply any visual changes to the application? Visual elements are required in the issue]
Additional Information
[Provide any additional information, such as context that might be relevant to the implementation of this specific feature.]

Obrigado por abrir a issue
Verifique os nossos guidelines:

Código de conduta
Contribuição
Guia de Estilo


Adding outAddress for each output

This would help with data for the colored coins explorer, and be used by
cc-scanner's RPC interface

Two lines are erroneously missing; will try again


Image->iptc('attribute') returns Image instead of null

The problem is here:
https://github.com/Intervention/image/blob/2.3.8/src/Intervention/Image/Image.php#L107
IPTC tests don't catch it since, they're using IptcCommand directly:
https://github.com/Intervention/image/blob/2.3.8/tests/IptcCommandTest.php
In normal usage developers would use Image->iptc('attribute') as it is described in the documentation here:
http://image.intervention.io/api/iptc
To reproduce this, just try to get an iptc attribute that is not set inside the image.
IptcCommand will set output to null, but Image __call will return Image object

Can't reproduce the described bug.

The IptcCommand sets the output to false if the attribute is not found.
__call will check if command hasOutput, in this case false is output.
$command->getOutput() is returned, which will resolve to null in this case.


Allow running tests locally without Pkg.test

Use julia -E 'include("src/AmplNLReader.jl"); include("test/runtests.jl")'.

Coverage increased (+0.003%) to 99.448% when pulling 80b635cb1b5bfbe40e5cb3327bcdacab78ca207f on abelsiqueira:fix/run-local into e4473edfb07d891e9f6b12b499278421e15f7fd2 on JuliaOptimizers:develop.

Force-pushed with modification.

Coverage remained the same at 99.444% when pulling 264826521db01a8aa5c916722725b039391dcefa on abelsiqueira:fix/run-local into e4473edfb07d891e9f6b12b499278421e15f7fd2 on JuliaOptimizers:develop.


No start value for create / alter sequence (PG 13)

Hi, it seems that there is missing information about sequence start position.
For example, in my production database I have in pg_catalog.pg_sequences on my table media

Command:
pg_datanymizer -c ./config.yml -f ./dumpl.sql -- postgres://xxx:xxx@<IP_ADDRESS>:5432/db-name
Config.yml:
tables:
  - name: member
    rules:
      username:
        username:
          uniq:
            required: true
            try_count: 5
      email:
         email:
           kind: Safe
           prefix: 20
           affix_separator: "__"
           uniq:
             required: true
             try_count: 5
      first_name:
        first_name: {}
      last_name:
        last_name: {}
      postal_code:
        post_code: {}
      phone:
        phone: {}
filter:
  only:
    - public.media

When dump only the media table and I inspect the dump file :
--
-- Name: hd_capture_id_seq; Type: SEQUENCE; Schema: public; Owner: prodUser
--

CREATE SEQUENCE public.hd_capture_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;
--

Is it a bug ? or I miss something ? Thanks !

Ok I found the issue, it's because some sequence was created manually...
I have to to do: ALTER SEQUENCE my_sequence OWNED BY my_table.my_column;


Added support for datetime-local input

Added support for datetime-local input
Updated ng-show to ng-if in template themes.  This reduced the watcher memory leak by 1.
Fixes #266, #325

Nice job @ckosloski


Firefox XML view: JavaScript and other output

Description
Firefox XML view broken; contains JavaScript and other extraneous output.
Steps to Reproduce

Open Firefox
Add/enable this extension
View an XML feed or file

Expected behavior:
Standard XML browser.
Actual behavior:
Mangled output with JavaScript.
Versions

Extension: 2020.10.13
Browsers: Firefox 82.0 (64-bit) and Firefox 83.0b2 (64-bit)
OS: macOS

Additional Information
Screenshot attached showing expected (left; plugin disabled) versus what happens (right; plugin enabled). Have tested this with all other plugins disabled.

This is an issue even when the URL/file ends with *.xml e.g., https://feedforall.com/sample.xml

Thanks for reporting!
This looks like it's a result of the anti-fingerprinting features we released recently. I just made a PR which should fix this by filtering out xml and json content types.
If you have some sites I can test with, I would appreciate it, otherwise this should go out in a future release.

I don't have any specific sites but I've been noticing it on anything with an RSS/XML feed. Noticed it first when setting up our new company site/blog and testing Gatbsy's RSS generation (via https://merit-network.github.io/rss.xml).
Thanks so much!

What is date for this merge(fix xml/json data) to be released?

Also, is there any chance to have a gui switch to turn off that antifingerprint injection feature?

Unfortunately there isn't a disable toggle at this time for that feature.
Though I don't have an exact date yet, this fix will be included in the next feature release, which is likely to be in the next couple of weeks.
I know it's not an ideal solution, but until then, disabling the site protections when you want to use the XML view should work.
Thanks!

Main issue for me is not just direct xml view. It injects into ajax loaded xml-data on some services I use and leaks into gui =)

We're planning to release this fix next week (assuming the holiday doesn't bump the release back). I'll comment here once it's fully released.

Thanks @Charlie-belmer !

This has been fixed for quite some time. Closing out.


RFE : Request for Remove-RubrikSnapshot

Expected Behavior
Currently there is no dedicated cmdlet to remove a Rubrik backup.  Invoke-RubrikRESTCall can support this task, but having a cmdlet that can take a pipeline input from cmdlets such as Get-RubrikVM or Get-RubrikFileset and remove a backup(s) would simplify a workflow.
For example, if I want to be able to remove backup of relics that are 30 days or older, I want to be able to do something like this:
Get-RubrikVM TestVM1 |  ?{$_.isRelic -eq $true} | Get-RubrikSnapshot | {$_.date -lt (Get-date).adddays(-30).tostring("yyyy-MM-ddTHH:mm:ssZ")} | Remove-RubrikSnapshot
Current Behavior
Currently, we have to produce a snapshot ID and then feed it into Invoke-RubrikRESTCall.  It's not impossible, but it's not as intuitive as it would be if a cmdlet to remove a backup that can take a pipeline input were available.  For example, my line to invoke the forementioned REST call looked like this:
Invoke-RubrikRESTCall -Endpoint 'vmware/vm/snapshot/d7d8dd59-3e5c-4f23-88aa-b6b5cadb0f4d' -Method DELETE -Query (new-object -typename psobject -property @{'location'='all'})
This is specific to VM backups.  I suspect the endpoint path would look different for databases and filesets.

Hello @dewbrik,
We have started developing the requested feature, our apologies for the delay in picking this up. This functionality will be available within a couple of days.

Resolved by PR https://github.com/rubrikinc/rubrik-sdk-for-powershell/pull/308


Settings for - Closing the files shouldn't change height OpenEditors Window.

We have a feature for setting the height of the open editors window but it behaves like a max-height. It would be nice to have a fixed height that would remain even if we closed the files so that the panel under it doesn't shift up as we close the files.

Have you tried explorer.openEditors.minVisible

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


camelCase and snake_case for custom getter and setter

It's suggestion  for Yii3
PSR is not say you what notation use for class property. I  (and I think many programmer) use snake_case.
But if you want create custom read only property for Yii in snake_case notation, you need create something like this:
public function getFull_Name()
{
   return $this->first_name . ' ' . $this->last_name;
}

It's not look good, I think =)
I want to create only fullName() and have access to this like
//User model
public function getFullName()
{
   return $this->first_name . ' ' . $this->last_name;
}

//Some code
$user->getFullName(); //Ivanov Ivan
$user->fullName; //Ivanov Ivan
$user->full_name; //Ivanov Ivan

And setter for same principle

why?

Because you use camelCase for methods and functions so using snake_case for property and variables is good practice to visual divide them.
I think.

Why do you need to divide them?

I am against adding more magic getters or setters.
As it is they already violate visibility. (protected getter will be publicly accessible)...
Let's not add more mess to the framework.
Instead, if you want it you can easily implement this in a behavior (which will be even slower).
Or override your base classes (AR / model) to implement this.

Agree.

Hi @samdark,
I wonder if you can clarify something for me.
It says in the PSR2 guidelines that property names must be declared as camelCase. And alot of extensions written for yii2 (and I assume yii3) conform to this.
However, the use of the magical getters and setters when using db columns means in code we have a mixed use of
$this->somePropertyInCode and $this->some_column_in_database
Is there any direction with regards to yii3 as to whether the standard will be altered so that properties have to be declared snake case?
As @Inkognitoo suggests - using camelCase for methods and snake_case for properties makes perfect sense - but the yii2 guidelines specfically says to use camelCase for property names and therfore we have a mix of convention when using AR. My OCD is going mental.
Wouldnt $this->some_property_in_code and $this->some_column_in_database be more consistent?

Bonus points for using OCD as an argument :-D
I'd say that database conventions should be updated too then?

Yes, they should.
But I do think they should match so there isnt a mix of convention when accessing properties.
I realise its not an actual property when you are calling $this->some_column_from_database
as it uses the getters and setters. But obviously my classes are starting to look a mess as I access properties and db columns in the same block of code.
I also realise its probably a wasted effort doing this on yii2 - but having something agreed and outlined as best practice for yii3 would be awesome. At present I am going against the yii2 standard and coding all my code to use snake_case properties. But then when I am using other developers modules and extensiosn they are using cameCase - so I am back to square one.
I believe lavarel have a mapping feature - which I think is not even needed.
If it could just be agreed that in yii3 the prefered way of declaring  properties was to use snake_case then I think, over time, it would take care of itself?

Is there any direction with regards to yii3 as to whether the standard will be altered so that properties have to be declared snake case?

Yes. Yii 3 will, most likely, use Cycle ORM as a DBAL and it has a mapper so PSR-12 naming will be our go to standard.

Is there any direction with regards to yii3 as to whether the standard will be altered so that properties have to be declared snake case?

Yes. Yii 3 will, most likely, use Cycle ORM as a DBAL and it has a mapper so PSR-12 naming will be our go to standard.

Wonderful! My request is redundant in that case! Thanks

Just for completelness and clarification - PSR-12 does not appear to force you to use snake_case for properties. Its just an extension of PSR2 which states to declare properties in camelCase?
So will Yii3 use camelCase or snake_case as a preferred naming convention (apologies if this is going slightly off topic of this issue - happy to open up a new one)

camelCase for properties. snake_case or for fields in DB.

OK, so for people with OCD like myself, you would just map your snake_case db fields to camelCase object properties?
Seems the most flexible, so that's good!
Assume GII will allow you build such mappings automatically if you checked something along the lines of "use camelCase for field properties".

It says in the PSR2 guidelines that property names must be declared as camelCase.

Where? AFAIK PSR-2 does not force any convention for properties names. PSR-1 explicitly avoids any recommendation in this matter:  https://www.php-fig.org/psr/psr-1/#42-properties

It says in the PSR2 guidelines that property names must be declared as camelCase.

Where? AFAIK PSR-2 does not force any convention for properties names. PSR-1 explicitly avoids any recommendation in this matter: https://www.php-fig.org/psr/psr-1/#42-properties

Apologies, its not PSR-2 that forces this convention - its the yii2 standard that is forked from PSR2. Found here

Property names MUST be declared in camelCase


Separating the JS and CSS into different files

Two questions, seeing as the documentation doesn't clearly state it:

I am are trying to make separate files for the JS and CSS sections of an element. I cannot find anything in the docs the specifies the official way of doing this for both the JS and CSS. A CSS example is available here: https://www.polymer-project.org/1.0/docs/devguide/feature-overview.html.
Does the JS code go inside the dom-module or after it. Again, the documentation lists both ways.

The documentation really needs to be updated as I feel this is making people believe that you cannot separate these out.

You can put the <script> anywhere after the <dom-module> is defined. One reason Polymer({is: 'my-element') takes the name of a dom-module as the is property is to associate the script with your markup.  Potentially, this means you can have a single compiled <script> at the bottom of your page. The calls to Polymer() dont need to be in the element's dom-module. We typically just do that for readability and modularity.

@arthurevans @kaycebasques  for the docs FYI

Thanks. So what's the official way of moving the inline CSS into separate files without having to create intermediate html files with <style> that house the CSS just for that module?

Are you talking about moving <style> that polymer elements define into separate files? We don't have a tool for that. However, one issue with moving styles outside of the <dom-module> in general is that they would no longer be scoped to the element's shadow dom.
Given your own elements, we have a websevice (and there's a gulp plugin) that takes a .css file and wraps it in a style-module: https://www.polymer-project.org/1.0/tools/overview.html#polystyle

Thanks. I mean, using https://www.polymer-project.org/1.0/docs/devguide/feature-overview.html as an exampe, what's the defacto way of moving the css defined in the the style tags to a separate file:
  <template>
    <style>
      /* CSS rules for your element */
    </style>

    <!-- local DOM for your element -->

    <div>{{greeting}}</div> <!-- data bindings in local DOM -->
  </template>


feat(store/configure-store): Add routerMiddleware

This is exactly the same change in https://github.com/rangle/react-redux-starter/pull/183.
This PR adds the routerMiddleware from react-router-redux. Now, the following will change the browser's route (before it didn't):
import { push } from 'react-router-redux';

store.dispatch(push('/top'));

Thanks @rsnara . :shipit:


Adding scope for getting most viewed for Day, Week, Month and all time

Great gem.
I am using the gem on Rails 4.2.4. Is it possible to get list of most viewed posts of Day, Week, Month and All Time. If so, how can I manage to pull it?
Thanks in advanced!

We really need this feature, because I'm having trouble with queries for the gem & using it alongside chartkick.


Uploaded A pattern in cpp

@raghavguptaa I'm closing the PR as it is not fulfilling the requirement...you can send a PR again after maintaining all the steps and eligibility criteria for a valid PR...


Meeting Day - notify group without showing in tags

Find a way to notify a group about a published article, without showing the group name in the article tags

One possible solution is to only display tags if the group is one of the filtering groups


command 'swift' is unrecognized

OS: ubuntu 16.04
I installed swift env and used it to install swift 4.0, and found that swift command is unrecognized, then I tried installing 3.1, and still the same result

nvm, working now


In the blog lists, also include the "description" element

This gives some hint on what it is and perhaps provides a nicer
overview?
Review: worth checking the preview

This is great. Thanks!


add Swift 5.5 job

I added https://ci.swiftserver.group/job/swift-nio-extras-swift55-prb/

this should work once we've got 5.5 docker images:
21:22:05 Service 'runtime-setup' failed to build: manifest for swiftlang/swift:nightly-5.5-focal not found: manifest unknown: manifest unknown

I didn't see this before I made #129


Do I need a GPU? I just want to run a demo

Yes, the current renderer is dependent on CUDA extension. So a low-end GPU is the minimal requirement for inference.

thanks。


Book section improved and used Googles Books Api

The following changes have been made:
A new search bar has been added to the books section.

A new function has been created to fetch the books from the Google Books API.

The views have been updated to display the search results.

Book cards made responsive and added good enough CSS to display books.

These are the changes done :

Tip : Replace my personal generated API KEY with your api key for better user experience in future.
Please review the changes and let me know if you have any questions.
Thank you for your time.

There are still conflicts

@M-A-N-I-K resolve conflicts!


Proposal: StableTagPlugin should allow multiple tag types

Hi!
I wanted to try to use the new StableTagPlugin to replace my somewhat messy plugin for handling mentions in the editor. However, it seems like it doesn't support using two different tag/mention types. In our app, we allow the users to mention other users (via the @ symbol), and hashtags (via the # symbol). Trying to use two instances of StableTagPlugin breaks everything.
I tried to retrofit a solution that would allow two instances of StableTagPlugin to co-exist with eachother, but I couldn't really get it to work.
This will probably require a large rewrite of some of the functions that act upon tags, so I'm not sure about this idea's feasibility. But currently we're still sticking to my messy plugin to handle stable tags :P

In general, we probably should make it possible to use different triggers for stable tags.
With regard to your specific use-case, are your hash tags truly stable tags? We also have a pattern tag plugin, which was designed around typical hash tag usage. Let me know if you're able to use a single stable tag plugin with a single pattern tag plugin to meet your needs.

@kekland did you get a chance to try my comment above?


[Proposal/WIP] Create System.Devices.I2c API

cc\ @joshfree @richlander @terrajobst
Initial Rambles...
This proposal is to define a new API for I2C devices.  It is somewhat related to the new System.Devices.Gpio work.  However, the intent is to remove and separate into different APIs to focus on each specific type of I/O instead of one gigantic library (with a mix/match of unneeded dependencies.  There are many ways to accomplish this and hope others would chime in.  This proposal is opinionated and related to my initial thoughts here (#2388).  Also, this issue is a WIP and I will be making updates over the next few days/weeks during spare time.
As mentioned before, I believe we could take advantage of some of the work that came from the Windows.Devices.XXX APIs.  It should be possible to have similar namespaces like System.Devices.Gpio, System.Devices.I2c, System.Devices.Spi, etc..  Later, we could have more advanced APIs following the same thinking like System.Devices.Serial, System.Devices.Bluetooth, System.Devices.Usb, etc..  I plan to create a PR soon with initial code, but is only a starting point.  Samples, tests, docs and such will be added overtime if this approach seems like a good path to research/implement.
This proposal is focused on System.Devices.I2c to verify capabilities and limitations.  However, I also have started some other work related to other APIs mentioned above (e.g. SPI, GPIO, etc.).
System.Devices.I2c API
While GPIO is general (hence the name) and can reference I2C-type pins, I like having the option of separate APIs based on functionality and project requirements.  Sometimes you might only need to toggle a few pins and other times you need to communicate with just a bus (I2C/SPI) device such as temperature, real-time clocks or EEPROMs.  The System.Devices.I2c API will provide the basic classes and interfaces related to I2C.  This includes enums like bus speed and sharing modes.  It also will include advanced helpers to support off-loading I2C Bus Providers (e.g. Ardruino, etc.).
System.Devices.II2cDevice
Within System.Devices.I2c, there should be an II2cDevice interface to allow different types of I2C device implementations based on OS, hardware platform, etc.  While it would be ultimately awesome to have a single I2cDevice class that works everywhere, I have not seen a good solution (with my limited knowledge/research).  Therefore, you could easily create implementations such as UnixI2cDevice, WinRtI2cDevice, etc.. I noticed how Unix implementation call into libc/ioctl, but not sure if it is possible to do this for Windows flavors.  Again, if anyone knows a good approach (including someone from the Windows team), please chime in that would allow a better solution of having one preferred I2cDevice implementation that could be referenced/work across various OS & hardware platforms.
Update 9/20/2018.  I have most of the code setup in a project with the core I2C code.  I'm still working on the XML documentation and such and plan to create a PR in the near future.  Afterwards, I will followup with a UnixI2cDevice implementation project (some of which is based on the work already added for (#2426).
// TODO: Lots more to come.  Please be patient 😄

Thank you @shaggygi for the I2c/I2cDevice proposal.  @ianhays will be back late next week and should be able to collaborate on this then. 😄   Our goal is to get the API shape through https://aka.ms/api-review by November and into the dotnet/corefx repo by then.

Tried another go at it...  #2505

@joperezr @ianhays PTAL


Code generator does not emit a valid field name for an empty strings in enum class values

Example of schema that limits allowed value to "" (empty string) for the foo field value:
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "foo": {
      "type": "string",
      "enum": [
        "",
        "bar"
      ]
    }
  }
}

Command to generate schema models:
generatejsonschematypes "empty-string-value-enum-schema.json" --outputPath "." --rootNamespace "TestSchema" --outputRootTypeName "IssueDemonstration"
A field name is missing for the empty string value in the IssueDemonstration.FooEntity.EnumValues class:

public readonly partial struct IssueDemonstration
{
    /// <summary>
    /// Generated from JSON Schema.
    /// </summary>
    public readonly partial struct FooEntity
    {
    ...
        /// <summary>
        /// Permitted values.
        /// </summary>
        public static class EnumValues
        {
        ...
            /// <summary>
            /// Gets "" as a JSON value.
            /// </summary>
            public static readonly FooEntity =  FooEntity.Parse( "\"\"" ) ;
                                         /* ^ Field name is missing */

A potential fix would be to emit a well-known name for an empty string value, something like EmptyString or "_". The problem with this approach is that we might encounter a case where enum is defined as ["", "EmptyString"] which will cause a naming conflict.
I understand that it is very unlikely to devise a good naming strategy for all non-digit or non-letter values. However, perhaps there is room for special treatment of empty string enum values?

A workaround is to use "anyOf" with a "maxLength" constraint for the "empty string" value:
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "foo": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 0
        },
        {
          "type": "string",
          "enum": [
            "bar"
          ]
        }
      ]
    }
  }
}

The issue with this workaround is that it produces two times more files and makes it somewhat less intuitive to work with the model because now one needs to use an empty string literals/constants side-by-side with generated enum class values.

Good catch! I'll get a fix for this out today, with the usual de-duplication logic for name collisions.

One appealing (and frequently recommended) way of creating string enums is not to use enum at all, but to use
{
  "anyOf": [
     { "$ref": "#/$defs/Value1" },
     { "$ref": "#/$defs/Value2" },
     { "$ref": "#/$defs/Value3" }
  ],
  "$defs": {
    "Value1": {
      "title": "Documentation title Value1",
      "description": "Longform documentation for the enum value",
      "type": "string",
     "const": ""
  },
  "Value2": {
      "title": "Documentation title Value2",
      "description": "Longform documentation for the enum value",
      "type": "string",
     "const": "Foo"
  },
  "Value3": {
      "title": "Documentation title Value3",
      "description": "Longform documentation for the enum value",
      "type": "string",
     "const": "Bar"
  }
}

This is the best way to also be able to document the enum values, and you still get a single Match() pattern-matching function for consumption.
As you say, the structure is more verbose if you need to explicitly access the const values: (Value1.ConstInstance, Value2.ConstInstance) , but it is much better for documentation.

Pleasantly surprised by such a quick turnaround. This fix significantly simplifies my work, as I won't have to go through nine circles of hell rewriting an existing schema that people already got used to. Thank you!

Thanks for a really clear bug report!
It is churning through the release process right now. Should be up on nuget in about 15 minutes.


Crash when adding and moving new marker

Steps to reproduce

open a model
in Navigator, right-click Markers and select Add New
hold <Ctrl> and left-click marker circle in Visualizer window

Expected result
Marker's axes appear, allowing user to drag Marker around visualizer.
Actual result
Marker's axes automatically appear, disappear, appear, disappear, … (approx. 2 cycles/second), and a list of the text "Marker:NewMarker_2" fills the status bar.

Environment and GUI version
OpenSim-2416f17a-2018-02-25.zip ("OpenSim 4.0 User Experience and Feedback Session" version)

Also occurs just by clicking the marker (i.e., no <Ctrl>). Marker is selected after first click, but immediately becomes deselected. After clicking again, the GUI enters a loop of selecting and deselecting the marker.

This seems to be working, except for the first marker that I add is bigger than subsequent markers.
Load gait2354
Add marker
Move it around (it gets bigger)
Add a second marker
Move it around (it doesn't get bigger)

At the UEFS, Hannah had an issue where the GUI autonomously toggled between two markers in the navigator at 1 or 2 cycles per second.

@chrisdembia indeed that was an issue due to circular notifications being sent between the navigator and visualizer but that was fixed (by utilizing a master list of selected objects as was done in 3.3 and earlier).

Markers can be added and selected without crashes. However, when you try to move it the marker gets scaled- I have opened a new issue for this at #695


Add support for specific minor version of the API.

pickup from where #22 was left

@thgreasi do you think you will have some time this week to review the changes?

I'm sorry this takes so long, I will do my best to do it this week.

No problem! Thank you

@umayr Can we release the current master as v2.5.0 please?

@thgreasi I have added you as an owner for this package. You can also publish releases now.

@umayr Cool thanks! 👍