Ignoring backspace for empty lines on stdin/stdout mode

PR Summary
Fix #8193.
On stdin/stdout mode (without console), when a backspace was sent, the code tried to remove the last character in the current line string builder. this was true even when the string builder is empty, thus crashing.
I fixed the issue by ignoring the backspace when the string builder is empty, not echoing it, and not trying to remove from the string builder.
PR Checklist

[X] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[X] Summarized changes
[X] Change is not breaking
[X] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[X] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.

User-facing changes

[X] Not Applicable
OR
[ ] User-facing Documentation needed

[ ] Issue filed - Issue link:

Testing - New and feature

[ ] Not Applicable or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

[ ] Add [feature] if the change is significant or affects feature tests

New tests should be in https://github.com/PowerShell/PowerShell/blob/master/test/powershell/Host/ConsoleHost.Tests.ps1
In the file you can find samples with running PowerShell process with redirections.

@bugale for the test, you can do the same as your initial crash report but with PowerShell:
$si = [System.Diagnostics.ProcessStartInfo]::new()
$si.FileName = "pwsh"
$si.RedirectStandardInput = $true
$si.RedirectStandardOutput = $true
$si.RedirectStandardError = $true
$pwsh = [System.Diagnostics.Process]::Start($si)
$pwsh.StandardInput.Write("`b")
$pwsh.StandardInput.Write("`b")

The second write causes a broken pipe on my macBook.  However, it doesn't fail on my Windows machine.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: bugale sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

I have added a test. I validated it fails before my change, and passes after it.
Unfortunately, it takes 10 seconds to pass, but when the crash happens, it takes ~5 seconds, so I couldn't think of a better way.

it takes 10 seconds to pass

Are you sure that it is not timeout?

It is a timeout, for the function WaitForExit.
I do something that crashes the shell without my fix, but it takes ~5 seconds to crash.
So in the test, I wait for the crash with a timeout of 10 seconds. If the timeout was reached, it means the process did not crash and there is no bug.
Without my fix, though, the shell crashes before the timeout passes, which fails the test.

😕 This is not a reliable test - we can get a "race condition". @SteveL-MSFT I believe we should think about xUnit test.

😕 This is not a reliable test - we can get a "race condition". @SteveL-MSFT I believe we should think about xUnit test.

I changed it now to rely on the output

PowerShell-CI-linux termporary failed and was restarted.

@bugale Thanks for your contribution.


upgrade react and related dependencies

replaces #1823 and #1834

Messages

:book:

:sparkles: Thanks for your contribution to Shields, @chris48s!

  Generated by :no_entry_sign: dangerJS

I deployed a review app: http://shields-staging-pr-1840.herokuapp.com/
Something is up with the Heroku–Github connection and the notification is not showing up here; probably a result of me tightening down the app permissions on the badges org. Will look into that.
Review app looks good!

rebased to account for #1833 I'll also get this one merged now to reduce conflict overhead


Improve warning message for defer_stmt_at_block_end

To make the reason for the warning more obvious, I changed the warning message for defer_stmt_at_block_end as follows:
'defer' statement at end of scope always executes immediately; replace with 'do' statement to silence this warning

(replace "before" with "at").
Resolves SR-10581.

Thanks! There are a bunch of tests that need updating too; can you fix those?

@jrose-apple Thank you for checking!  I modified a bunch of tests!

@swift-ci Please smoke test

Thanks, @kagemiku. Welcome to the project!


Fail to install epinio on arm64

Apparently, buildpacks seem to be ready for ARM so I wanted to give it a try on my raspberry 4 with raspian64.
But it quickly failed because epinio-ui is not compiled for ARM yet:
...
cert-manager   cert-manager-cainjector-6bc9d758b-cvf4x   1/1     Running            0               11m
cert-manager   cert-manager-6bbf595697-6m6zc             1/1     Running            0               11m
cert-manager   cert-manager-webhook-586d45d5ff-dpkxd     1/1     Running            0               11m
epinio         epinio-server-74654659f7-k8qjw            1/1     Running            0               9m4s
epinio         kubed-7c87544479-x54m5                    1/1     Running            0               9m3s
epinio         registry-8478dd7dd-28t69                  2/2     Running            0               9m3s
epinio         minio-0                                   1/1     Running            0               9m2s
epinio         epinio-ui-555dcdd58d-bmbpw                0/1     CrashLoopBackOff   6 (2m58s ago)   9m4s

pi@management:~ $ kubectl logs epinio-ui-555dcdd58d-bmbpw -n epinio
standard_init_linux.go:228: exec user process caused: exec format error

If you build for arm64, could you also add s390 ?

It will make sense to build it in the same arch as epinio-server:
epinio-darwin-arm64
epinio-darwin-x86_64
epinio-linux-arm64
epinio-linux-armv7
epinio-linux-s390x
epinio-linux-x86_64
epinio-windows-x86_64.zip

Well, I've tried to compile epinio-ui for arm and s390x but I think that's more complicated.
I think Stratos (epinio-ui is a fork of Stratos) is not compatible with ARM yet.
https://github.com/epinio/ui-backend/pull/7
Unfortunately I don't think QA can do more regarding this ticket.

The backend used by the standalone ui (epinio/ui-backend) is a highly modified fork of stratos. Everything else epinio ui related is rancher/dashboard (with certain flags to enable/disable functionality).
Unfortunately I don't know how golang / it's dependencies work on different architectures, someone epinio dev side might know though

I tried to do the same as we have for epinio-server https://github.com/epinio/epinio/blob/main/.goreleaser.yml

The issue is easily reproducible is you go to the src/jetstream directory and you run:
GOOS=darwin GOARCH=arm64 go build

Given a Dockerfile:
FROM ubuntu

# For GOARCH=arm :
#RUN apt update && apt install -y golang gcc-arm-linux-gnueabihf ca-certificates gcc-aarch64-linux-gnu
# For GOARCH=arm64:
RUN apt update && apt install -y golang ca-certificates gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

# For GOARCH=arm:
#ENV CC=arm-linux-gnueabihf-gcc
# For GOARCH=arm64:
ENV CC=aarch64-linux-gnu-gcc
ENV CXX=arm-linux-gnueabihf-g++

ENV CGO_ENABLED=1
ENV GOOS=linux
ENV GOARCH=arm64

WORKDIR /jetstream

CMD ["go", "build"]

built with:
docker build -t jetstream-arm .

This command works:
 docker run -it -v $PWD:/jetstream  jetstream-arm

I don't have an arm64 machine to try out the binary though.

Someone has this solution already implemented here: https://github.com/goreleaser/goreleaser-cross#examples

I was able reproduce the issue on x86_64:

Trying to build also
I've just added the linux architectures because we are not providing the docker images of Epinio for Mac or Windows. We are building only the binaries for the CLI, but I guess that we are not supporting them from the server side.
@pgonin I was trying to build it also for the s390x but I guess that is not supported. I will ask if they are planning to add the support, or if I'm missing something.

Another issue on aarch64 spotted https://github.com/epinio/epinio/issues/1847

The owner of the goreleaser-cross image opened an issue about the s390x architecture. 👍
We are not able to build for the armv7 arch because the bci-micro base image that we are using doesn't support it:
-> % docker manifest inspect registry.suse.com/bci/bci-micro | jq '.manifests[].platform'
{
  "architecture": "arm64",
  "os": "linux",
  "variant": "v8"
}
{
  "architecture": "ppc64le",
  "os": "linux"
}
{
  "architecture": "s390x",
  "os": "linux"
}
{
  "architecture": "amd64",
  "os": "linux"
}

Wrapping up the issue.
Epinio / UI
The epinio server is built and released for the amd64, arm64v8, armv7 and s390x architectures with Goreleaser.
The UI backend (epinio-ui) is now built for the amd64 and arm64v8 architectures. We are missing the armv7 because the registry.suse.com/bci/bci-micro base image is missing this architecture.
-> % docker manifest inspect registry.suse.com/bci/bci-micro | jq '.manifests[].platform'

{
  "architecture": "arm64",
  "os": "linux",
  "variant": "v8"
}
{
  "architecture": "ppc64le",
  "os": "linux"
}
{
  "architecture": "s390x",
  "os": "linux"
}
{
  "architecture": "amd64",
  "os": "linux"
}

And we are missing the s390x because the goreleaser-cross image that we are using to cross-compile the UI is missing it.
Ref:

https://github.com/goreleaser/goreleaser-cross/issues/15

https://github.com/goreleaser/goreleaser-cross/pull/16

Building phase
Fixing the two previous issues we would have an Epinio that would be possible to release for all the architectures, but the build will still failing, because the Paketo Builder image is available only for the amd64 architecture:

https://github.com/epinio/epinio/issues/1850

I think we can call this closed as it will work if you bring a custom builder image that works on ARM

With the latest PR we are going to support the amd64, arm64 and s390x architectures.
-> % docker manifest inspect ghcr.io/epinio/epinio-ui:latest-next | jq '.manifests[].platform'
{
  "architecture": "amd64",
  "os": "linux"
}
{
  "architecture": "arm64",
  "os": "linux"
}
{
  "architecture": "s390x",
  "os": "linux"
}

-> % docker manifest inspect ghcr.io/epinio/epinio-server:latest | jq '.manifests[].platform'
{
  "architecture": "amd64",
  "os": "linux"
}
{
  "architecture": "arm64",
  "os": "linux"
}
{
  "architecture": "arm",
  "os": "linux",
  "variant": "v7"
}
{
  "architecture": "s390x",
  "os": "linux"
}

As already mentioned we are still missing the armv7 beacuse of the registry.suse.com/bci/bci-micro base image.
Also the building stage will not work in other archs than the amd64 because of the Paketo Builder image. It's still possible to use Epinio with docker images though, or provide a custom builder.


Fix: incomplete promise support

This PR fixes a previous one (#28). It uses an improved callback to promise fn that returns a promise. This way the put/del/batch methods end up returning a promise.

Putting this on my todo to review today.  Sorry for the delay and thank you for the fix.

Thanks!

https://github.com/hypermodules/level-hookdown/releases/tag/v3.1.2


Make class method inheritable.

I wanted to create subclass of SSDynamicLabel and provide margins to her.
eg:
@interface PaddedDynamicLabel : SSDynamicLabel
@property (nonatomic, assign) UIEdgeInstets paddingInsets
@end

But when I use my class:
PaddedDynamicLabel *label = [PaddedDynamicLabel labelWithFontDescriptor:fontDescriptor];
label.paddingsInsets = UIEdgeInsetsMake(0.0f, 8.0f, 0.0f, 8.0f);

I get crash ;(
The problem is initialization of objects in class methods:
SSDynamicLabel *label = [SSDynamicLabel new];
which could be easily fix by:
SSDynamicLabel *label = [[self class] new];
([self new] will work also)

Another good catch! This code is really old, it needs the help :)


[SPARK-14627][SQL] Avoid shilfting encoder many times in TypedAggregateExpression

What changes were proposed in this pull request?
JIRA: https://issues.apache.org/jira/browse/SPARK-14627
Every time we call TypedAggregateExpression.update method, we call encoder's shift method. As shift method will copy encoder and underlying BoundReference, we should prepare the shifted encoder in advance, instead of calling shift method every time.
BTW, we can also slightly improve encoder's shift method to return itself when shift delta is zero.
How was this patch tested?
Existing tests.

Test build #55804 has started for PR 12387 at commit 05875ba.

Test build #55804 has finished for PR 12387 at commit 05875ba.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/55804/
Test PASSed.

A minor change. Should be straightforward. cc @marmbrus @cloud-fan @rxin

Thanks for working on it! But unfortunately, we are rewriting TypedAggregateExpression to make it use expressions, see https://github.com/apache/spark/pull/12067, i.e. there will be no shifting stuff anymore, do you mind closing this PR? thanks.

ok. close it now.

Ah. But the change in encoder should not related to #12067, right?

But shift in only used in TypedAggregateExpression ...

ha. got it.


sentence case change

Docs Build status updates of commit 69835ba:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

mixed-reality-docs/gaze-and-dwell.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


fogros2: 0.1.7-1 in 'humble/distribution.yaml' [bloom]

Increasing version of package(s) in repository fogros2 to 0.1.7-1:

upstream repository: https://github.com/BerkeleyAutomation/FogROS2.git
release repository: https://github.com/ros2-gbp/fogros2-release.git
distro file: humble/distribution.yaml
bloom version: 0.11.1
previous version for package: 0.1.6-3

fogros2
* temporarily removing awscli as dependency due to regression

Holding for Humble sync

Hi, the changes in this PR should fix the regression noted here. It would be great to have this in the sync. Thanks!


Pods can't find each other (Raspberry Pi + k3s + gRPC)

Hello team, I am trying to run gRPC on my small Kubernetes cluster made of Raspberry pis. The source code is located here: https://github.com/jazzsaxmafia/productinfo (based on this)
Environmental Info:
K3s Version: k3s version v1.18.9+k3s1 (630bebf9)
(base) taeksoo@taeksoo-X399-AORUS-PRO:~/Development/Practice/productinfo$ kubectl get nodes
NAME      STATUS   ROLES    AGE     VERSION
kmaster   Ready    master   4d10h   v1.18.9+k3s1
knode1    Ready    <none>   4d10h   v1.18.9+k3s1

Node(s) CPU architecture, OS, and Version:  Arm v7 (Raspberry Pi 4) with Raspbian Lite (32bite)

Cluster Configuration: 1 master, 1 worker

Describe the bug: I am launching a gRPC server (+service) and a client using Kubernetes. The server seems to be running fine
(base) $:~/Development/Practice/productinfo$ kubectl get deployment
NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
grpc-productinfo-server   1/1     1            1           15h

(base) $:~/Development/Practice/productinfo$ kubectl get svc
NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)           AGE
kubernetes    ClusterIP   <IP_ADDRESS>       <none>        443/TCP           3d21h
productinfo   NodePort    <IP_ADDRESS>   <none>        50051:30378/TCP   15

(base) $:~/Development/Practice/productinfo$ kubectl logs -f grpc-productinfo-server-58b49d5967-sxcfc
2020/10/04 22:13:33 server listening at port :50051

However, when I launch the client, this is what I am getting:
(base) $:~/Development/Practice/productinfo$ kubectl logs -f grpc-productinfo-client-vzmsz
2020/10/05 13:53:04 Could not add product: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: i/o timeout"

Steps To Reproduce:

Installed K3s:

curl -sfL https://get.k3s.io | sh - // master

export K3S_URL="{server ip:port}"
export K3S_TOKEN="{token}"
curl -sfL [https://get.k3s.io](https://get.k3s.io/) | sh -

Expected behavior: The client receiving an immediate result.

Actual behavior: Receiving a timeout error

Additional context / logs:

I am not sure what the current state of 32bit raspbian is, but have you tried disabling firewalld/ufw and enable iptables legacy mode?


[Callout] documentation uses  instead of

How can we reproduce this bug?

use a  for

What did you expect to happen?
working colouring :-)
What happened instead?
no colouring :-(
How to fix
use a  for
guess that's a documentation bug

Looks like it's fixed! Check it out here: http://foundation.zurb.com/emails/docs/callout.html. Closing this for now. Feel free to reopen this if you have any more problems around this!


Log directly to System.Diagnostics.Debug

Bypass the logging framework and log directly to System.Diagnostics.Debug

Blocked, waiting on #61 to be completed.


[Vector ABI] Type size and alignment for vector types.

The issue of Vector alignment is discussed in #347. It is mentioned that aligning to 128 bits might deliver better performance on some RISC-V cores, but this behavior could lead to considerable stack wastage on zve32 and zve64 cores. For instance, in order to ensure a vector value in the stack conforms to the ABI specification, we could potentially waste up to 96 bits per vector object in stack for zve32, and the performance difference isn't always evident across all core implementations.
Therefore, this proposal sets the alignment of vector types to element alignment, to avoid wasting a significant amount of stack space in zve32 and zve64 configurations. Also, since the ABI only specify the minimum alignment and doesn't limit the compiler from adopting higher alignment for specific CPUs.
Fix #347.

cc. @rofirrim @aswaterman @zhongjuzhe @JeffreyALaw @topperc @preames

I think you meant 128 bits? (later on you say 96 bits which would match with bits).

Yeah, should be bits.

Just to confirm the intent of this change: this is always minimal alignment and a compiler implementation/platform may choose to use a larger value. Also, a user could use attribute((aligned(16))) (or similar mechanisms) to enforce larger alignments.
Now this probably only impacts stack variables but if we ever have aggregates of vector type, the alignment will be used there when computing offsets. Maybe I'm missing some other case.

Yes, compiler always has freedom to use bigger/higher alignment, and this mostly affect stack object, another one that will be affected is attribute(riscv_rvv_vector_bits(N))[1], since with that attribute, rvv type could also live as global variable and live within struct.
[1] https://reviews.llvm.org/D145088

| __rvv_vbool1_t             | vbool1_t             |  VLENB        |  1
| __rvv_vbool2_t             | vbool2_t             |  VLENB        |  1
| __rvv_vbool4_t             | vbool4_t             |  VLENB        |  1
| __rvv_vbool8_t             | vbool8_t             |  VLENB        |  1
| __rvv_vbool16_t            | vbool16_t            |  VLENB        |  1
| __rvv_vbool32_t            | vbool32_t            |  VLENB        |  1
| __rvv_vbool64_t            | vbool64_t            |  VLENB        |  1

I understand LLVM mask type size is adjusted as doc said.
However, GCC byte size of these mask type is not adjusted like this.
GCC configuration for BOOL type
vbool1_t VLENB
vbool2_t VLENB / 2
vbool4_t VLENB / 4
vbool8_t VLENB / 8
vbool16_t CEIL (VLENB / 16)
vbool32_t CEIL (VLENB / 32)
vbool64_t CEIL (VLENB / 64)
I am not sure whether this inconsistency between GCC and LLVM is necessary to be documented in the ABI doc.
Otherwise, LGTM. Thanks.

| __rvv_vbool1_t             | vbool1_t             |  VLENB        |  1
| __rvv_vbool2_t             | vbool2_t             |  VLENB        |  1
| __rvv_vbool4_t             | vbool4_t             |  VLENB        |  1
| __rvv_vbool8_t             | vbool8_t             |  VLENB        |  1
| __rvv_vbool16_t            | vbool16_t            |  VLENB        |  1
| __rvv_vbool32_t            | vbool32_t            |  VLENB        |  1
| __rvv_vbool64_t            | vbool64_t            |  VLENB        |  1

I understand LLVM mask type size is adjusted as doc said.
However, GCC byte size of these mask type is not adjusted like this.
GCC configuration for BOOL type vbool1_t VLENB vbool2_t VLENB / 2 vbool4_t VLENB / 4 vbool8_t VLENB / 8 vbool16_t CEIL (VLENB / 16) vbool32_t CEIL (VLENB / 32) vbool64_t CEIL (VLENB / 64)
I am not sure whether this inconsistency between GCC and LLVM is necessary to be documented in the ABI doc.
Otherwise, LGTM. Thanks.

Yeah, I know GCC has did some more compact way, that's the reason I add the note at the end:
NOTE: The vector mask types utilize a portion of the space, while the remaining content may be undefined, both in the register and in memory.
Thanks for review :)

Changes:

Adjust size for vector mask types

The motivation of updating the vector mask type to more compact size, this allow compiler to store that in compact way without ABI violation.

ping @rofirrim @asb @topperc @preames
I would like to get some feedback from LLVM community before merge :)

ping @rofirrim @asb @topperc @preames
I would like to get some feedback from LLVM community before merge :)

No objections on my side, everything looks reasonable to me.

Changes:

Add simple generator script for gen the table.
Add tuple type.

Going to merge this, thanks everyone :)


Poliastro Test goes with errors; cannot call libraries after

🐞 Tested Poliastro with Python 3.6.7. Cannot call libraries later

🖥 Please paste the output of following commands

conda info -a (only if you have conda)
conda list (only if you have conda)
pip freeze

# Paste your output here:
asn1crypto==0.24.0
astropy==3.1.2
astroquery==0.3.9
atomicwrites==1.3.0
attrs==19.1.0
backcall==0.1.0
beautifulsoup4==4.7.1
bleach==3.1.0
cachetools==3.1.1
certifi==2019.3.9
cffi==1.12.3
chardet==3.0.4
Click==7.0
cryptography==2.7
cycler==0.10.0
decorator==4.4.0
defusedxml==0.6.0
entrypoints==0.3
google-assistant-sdk==0.5.1
google-auth==1.6.3
google-auth-oauthlib==0.3.0
html5lib==1.0.1
idna==2.8
importlib-metadata==0.17
ipykernel==5.1.1
ipython==7.5.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
jedi==0.13.3
jeepney==0.4
Jinja2==2.10.1
jplephem==2.9
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
keyring==19.0.2
kiwisolver==1.1.0
llvmlite==0.29.0
MarkupSafe==1.1.1
matplotlib==3.1.0
mistune==0.8.4
more-itertools==7.0.0
nbconvert==5.5.0
nbformat==4.4.0
notebook==5.7.8
numba==0.44.0
numpy==1.16.4
oauthlib==3.0.1
pandas==0.24.2
pandocfilters==1.4.2
parso==0.4.0
pexpect==4.7.0
pickleshare==0.7.5
pkg-resources==0.0.0
plotly==3.9.0
pluggy==0.12.0
poliastro==0.12.0
prometheus-client==0.6.0
prompt-toolkit==2.0.9
ptyprocess==0.6.0
py==1.8.0
pyasn1==0.4.5
pyasn1-modules==0.2.5
pycparser==2.19
Pygments==2.4.2
pyparsing==2.4.0
pyrsistent==0.15.2
pytest==4.5.0
python-dateutil==2.8.0
pytz==2019.1
pyzmq==18.0.1
qtconsole==4.5.1
requests==2.22.0
requests-oauthlib==1.2.0
retrying==1.3.3
rsa==4.0
scipy==1.3.0
SecretStorage==3.1.1
Send2Trash==1.5.0
six==1.12.0
soupsieve==1.9.1
terminado==0.8.2
testpath==0.4.2
tornado==6.0.2
traitlets==4.3.2
urllib3==1.25.3
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.4.2
zipp==0.5.1

python -c "import poliastro.testing; poliastro.testing.test()"

# Paste your output here:
============================= test session starts ==============================
platform linux -- Python 3.6.7, pytest-4.5.0, py-1.8.0, pluggy-0.12.0
rootdir: /home/lghizoni
collected 752 items

env/lib/python3.6/site-packages/poliastro/tests/test_bodies.py ......    [  0%]
env/lib/python3.6/site-packages/poliastro/tests/test_coordinates.py ...  [  1%]
env/lib/python3.6/site-packages/poliastro/tests/test_frames.py ......... [  2%]
.................                                                        [  4%]
env/lib/python3.6/site-packages/poliastro/tests/test_hyper.py .......... [  5%]
.                                                                        [  6%]
env/lib/python3.6/site-packages/poliastro/tests/test_iod.py ..........   [  7%]
env/lib/python3.6/site-packages/poliastro/tests/test_jit.py ...          [  7%]
env/lib/python3.6/site-packages/poliastro/tests/test_maneuver.py ......  [  8%]
env/lib/python3.6/site-packages/poliastro/tests/test_stumpff.py ...      [  9%]
env/lib/python3.6/site-packages/poliastro/tests/test_util.py .....       [  9%]
env/lib/python3.6/site-packages/poliastro/tests/tests_neos/test_dastcom5.py . [  9%]
........                                                                 [ 10%]
env/lib/python3.6/site-packages/poliastro/tests/tests_neos/test_neos_neows.py . [ 11%]
.....                                                                    [ 11%]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_core.py . [ 11%]
...................                                                      [ 14%]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_misc.py . [ 14%]
...                                                                      [ 14%]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_static.py . [ 15%]
..........                                                               [ 16%]
env/lib/python3.6/site-packages/poliastro/tests/tests_threebody/test_flybys.py . [ 16%]
.                                                                        [ 16%]
env/lib/python3.6/site-packages/poliastro/tests/tests_threebody/test_restricted.py . [ 16%]
                                                                         [ 16%]
env/lib/python3.6/site-packages/poliastro/tests/tests_threebody/test_soi.py . [ 16%]
.....................                                                    [ 19%]
env/lib/python3.6/site-packages/poliastro/tests/tests_twobody/test_angles.py . [ 19%]
........................................................................ [ 29%]
........................................................................ [ 38%]
........................................................................ [ 48%]
........................................................................ [ 58%]
........................................................................ [ 67%]
................................................                         [ 74%]
env/lib/python3.6/site-packages/poliastro/tests/tests_twobody/test_decorators.py . [ 74%]
.                                                                        [ 74%]
env/lib/python3.6/site-packages/poliastro/tests/tests_twobody/test_orbit.py . [ 74%]
........................................................................ [ 84%]
....................................................                     [ 90%]
env/lib/python3.6/site-packages/poliastro/tests/tests_twobody/test_perturbations.py . [ 91%]
xxxx........s.                                                           [ 92%]
env/lib/python3.6/site-packages/poliastro/tests/tests_twobody/test_propagation.py . [ 93%]
.........................xs....                                          [ 97%]
env/lib/python3.6/site-packages/poliastro/tests/tests_twobody/test_states.py . [ 97%]
..                                                                       [ 97%]
env/lib/python3.6/site-packages/poliastro/tests/tests_twobody/test_thrust.py . [ 97%]
s................                                                        [100%]

=============================== warnings summary ===============================
env/lib/python3.6/site-packages/_pytest/mark/structures.py:324
env/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /home/lghizoni/env/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning:

  Unknown pytest.mark.remote_data - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html

env/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /home/lghizoni/env/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning:

  Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html

env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_core.py::test_plot_3d_trajectory_plots_a_trajectory
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_core.py::test_plot_2d_trajectory_plots_a_trajectory
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_core.py::test_show_calls_prepare_plot[OrbitPlotter2D]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_core.py::test_show_calls_prepare_plot[OrbitPlotter3D]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_core.py::test_savefig_calls_prepare_plot[OrbitPlotter2D]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_core.py::test_savefig_calls_prepare_plot[OrbitPlotter3D]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_misc.py::test_plot_solar_system_has_expected_number_of_orbits[True-8]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_misc.py::test_plot_solar_system_has_expected_number_of_orbits[False-4]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_misc.py::test_plot_solar_system_uses_expected_orbitplotter[True-OrbitPlotter3D]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_misc.py::test_plot_solar_system_uses_expected_orbitplotter[False-OrbitPlotter2D]
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_static.py::test_plot_trajectory_sets_label
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_static.py::test_set_frame_plots_same_colors
env/lib/python3.6/site-packages/poliastro/tests/tests_plotting/test_static.py::test_redraw_keeps_trajectories
  /home/lghizoni/env/lib/python3.6/site-packages/poliastro/twobody/propagation.py:230: UserWarning:

  Frame <class 'astropy.coordinates.builtin_frames.icrs.ICRS'> does not support 'obstime', time values were not returned

-- Docs: https://docs.pytest.org/en/latest/warnings.html
======= 744 passed, 3 skipped, 5 xfailed, 16 warnings in 350.79 seconds ========

🎯 Goal

💡 Possible solutions

📋  Steps to solve the problem

Comment below about what you've started working on.
Add, commit, push your changes
Submit a pull request and add this in comments - Addresses #<put issue number here>
Ask for a review in comments section of pull request
Celebrate your contribution to this project 🎉

Hi @leonardoghizoni, thanks for your interest in poliastro! Your test results look fine to me:
======= 744 passed, 3 skipped, 5 xfailed, 16 warnings in 350.79 seconds ========

"xfailed" means "it was expected to fail", and the rest is good. Did you have more problems?

Dear Juan,
Many thanks for the clarifications! I'm glad to know that it's working properly, and really happy to see that now it works with python3!
I wonder if there's place to being part of the development?

Hi @leonardoghizoni! There is a Riot-Matrix poliastro group, you can join it here. Furthermore, there is also a contributor's guide :smile:

I wonder if there's place to being part of the development?

Of course! You are more than welcome to contribute :rocket:


Simplify Utsname string conversion

Use Utsname from golang.org/x/sys/unix instead of syscall to simplify the conversion of the Utsname members to strings. This requires re-vendoring golang/x/sys/unix.
It is then possible to get rid of the marshal.FromUtsname conversion functions and replace them by a simple string conversion (e.g. string(uname.Sysname[:])), because unix.Utsname has byte array instead of the int8/uint8 members that syscall had. Also see golang/go#20753 for details.

Kicked a test run. Something tells me we need to update the tests: https://github.com/weaveworks/scope/blob/c0adf40ad7ff8a6638b07ad693b000418b604046/probe/host/system_linux_test.go#L19
and
https://github.com/weaveworks/scope/blob/c0adf40ad7ff8a6638b07ad693b000418b604046/probe/host/system_linux_test.go#L35

And indeed, from the test run:
# github.com/weaveworks/scope/probe/host_test

probe/host/system_linux_test.go:23: cannot use func literal (type func(*syscall.Utsname) error) as type func(*unix.Utsname) error in assignment

FAIL	github.com/weaveworks/scope/probe/host [build failed]

Sorry, forgot about the test. Fixed now and pushed out, PTAL.


user control label max width

This will be done as part of issue #206 which will improve the configuration language for the label property


Request: Provide API mechanism to return path of extracted result

Currently, there doesn't seem to be an easy method to determine the path of an extracted result. Internally, the path is currently generated by os.path.join(unique_file_name('_' + os.path.basename(path), extension='extracted'), unique_file_name(bname, extension)), which changes depending on the presence of other similarly named files that may already exist on disk. Would it be possible to add an additional field to the results object returned by binwalk.scan() that has an e.g. "path" attribute?

Each module returned by binwalk.scan has an extractor attribute. I've added a directory attribute to this, so you can retrieve the base extraction directory:
for module in binwalk.scan():
   print "Extraction base directory:", module.extractor.directory

module.extractor.directory will be set to None if no extraction directory was created.


[Feature] Support DETR3D in mmdet3d-dev1.x

Motivation
Add detr3d for mmdet3d-dev1.x
Modification
Add DETR3D in projects/detr3d
Checklist

Pre-commit or other linting tools are used to fix the potential lint issues.---Yes
The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness. ---No
If the modification has potential influence on downstream projects, this PR should be tested with downstream projects.  --- Not applicable
The documentation has been modified accordingly, like docstring or example tutorials. --- No

For simplicity， suggesting only having one fold in projects/detr3d/detr3d where all files except config files are placed. You can refer to:https://github.com/open-mmlab/mmdetection3d/pull/2173/files

Remind that fix the lint.

This PR can be merged as soon as the re-trained precision-aligned model of projects/detr3d/configs/detr3d_r101_gridmask.py is provided.

This PR is merged as the inference accuracy is matched.


Implements database/sql driver over ydb-go-sdk

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Pull request type

Please check the type of change your PR introduces:

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Issue Number: N/A
What is the new behavior?

Other information

Codecov Report

Merging #316 (1c60c8a) into master (0c5ece1) will increase coverage by 6.03%.
The diff coverage is 0.37%.

@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
+ Coverage   44.89%   50.92%   +6.03%
==========================================
  Files         136      194      +58
  Lines       16663    20118    +3455
==========================================
+ Hits         7481    10246    +2765
- Misses       8716     9230     +514
- Partials      466      642     +176

Flag
Coverage Δ

1.14.x
38.56% <4.08%> (+2.72%)
:arrow_up:

1.15.x
38.56% <4.08%> (+2.72%)
:arrow_up:

1.16.x
?

1.17.x
?

1.18.x
33.07% <0.37%> (-11.82%)
:arrow_down:

connection
10.02% <0.37%> (-2.00%)
:arrow_down:

discovery
9.36% <0.37%> (-1.91%)
:arrow_down:

e2e
33.07% <0.37%> (+12.71%)
:arrow_up:

integration
33.07% <0.37%> (+12.71%)
:arrow_up:

macOS-latest
?

ratelimiter
11.52% <0.37%> (-2.36%)
:arrow_down:

scripting
12.59% <0.37%> (-2.58%)
:arrow_down:

topic
24.03% <0.37%> (?)

ubuntu-latest
50.92% <0.37%> (+6.06%)
:arrow_up:

unit
38.56% <4.08%> (+2.68%)
:arrow_up:

windows-latest
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

internal/xsql/bad_conn_go1.18.go
0.00% <0.00%> (ø)

internal/xsql/conn.go
0.00% <0.00%> (ø)

internal/xsql/connector.go
0.00% <0.00%> (ø)

internal/xsql/context.go
0.00% <0.00%> (ø)

internal/xsql/doer.go
0.00% <0.00%> (ø)

internal/xsql/errors.go
0.00% <0.00%> (ø)

internal/xsql/isolation.go
0.00% <0.00%> (ø)

internal/xsql/mode.go
0.00% <0.00%> (ø)

internal/xsql/rows.go
0.00% <0.00%> (ø)

internal/xsql/stmt.go
0.00% <0.00%> (ø)

... and 94 more

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 0c5ece1...1c60c8a. Read the comment docs.


As a part of installation install transform-class-properties on the host app.

This would be required in case the host app wants to define models in js files with class properties.
In addition to this, if they're using eslint, we'll have to add babel-eslint as a devDep & add the line `parser: 'babel-eslint' to their eslint config file.
Or we could add these to be a part of setup instructions & show how they can define props w/o class properties if they wish to do so.

This would be required in case the host app wants to define models in js files with class properties.

This is not strictly required, but it's more verbose without it for sure. They can always do
class Person {
  constructor() {
    this.firstName = String;
    this.lastName = String;
  }
}

But I agree, transform would be better. Should it be installed via a blueprint?


Place locator app using GeoJson

Proposed title of article
Place locator app using GeoJson
Introduction paragraph (2-3 paragraphs):
GeoJson is a standard format for storing geographic points in a database based on JavaScript Object Notation. GeoJson is based on JSON format making it easy to use with JavaScript. Geographic features encode using GeoJson include Latitude, Longitude, line strings and Polygons.
In this article, we are going to use GeoJson to build a locator application using Nodejs. We will develop an application that adds a location (for instance a school) on a database and be able to display the locations encoded on the database on a map display.
.
Key takeaways:

Understanding GeoJson
Setting up MongoDB with Node.js
Encoding location data into MongoDB using mongoose.
Using Mapbox with Node.js

References:

https://geojson.io/
https://www.mongodb.com/
https://www.npmjs.com/package/mongoose

Templates to use as guides

How To Guide Template
Software Review Template
Tutorial Template

@jamila-laureen
Good afternoon and thank you for submitting your topic suggestion.
Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it.

@jamila-laureen
Just and FYI I will be closing this topic form just to help clear up the queue where possible - can be REOPENED at anytime when ready. 👍

Hello @ahmadmardeni1 , would you please open this issue so that i submit the article. Thanks for your patience as you waited for me to finish up.

Hello @ahmadmardeni1 , would you please open this issue so that i submit the article. Thanks for your patience as you waited for me to finish up.


Total energy pyscf

Hello.
For some time, I've tried to find out how pyscf dft calculates total energy and particle number. I'm trying to take the trace of the product of density matrix with hamiltonian and trace of the square of the density matrix.
I have found some information on this topic, but it seems that whatever I do, I get the wrong answer. For example this issue. It looks like the author says to take the trace of the product of pyscf.pbc.dft.rks.RKS.make_rdm1() with the sum of pyscf.pbc.dft.rks.RKS.get_fock() and pyscf.pbc.dft.rks.RKS.get_hcore(). See for example this example.
from pyscf.pbc import gto, dft
import numpy as np
import pyscf.symm
import ase
import pyscf.pbc.gto as pbcgto
from pyscf.pbc.tools import pyscf_ase
import pyscf.pbc.dft as pbcdft

n = 4 # num atoms

# making random atomic coordinates and unit cell of unit Ångstrøm-volume
d_min = 0
d_max = 100
while d_min<1.5 or d_max > 3.567:
    arr_R = 3*n**(1/3)*np.random.rand(n,3)
    d = [ [ np.linalg.norm(arr_R[j] - arr_R[i])  for j in range(n) if j != i ] for i in range(n)]
    d_min = np.min(d)
    d_max = np.max(d)

arr_cell = (3.567/2)*n**(1/3)*np.eye(3)
atoms = ase.Atoms(n*'C', positions=arr_R, cell=np.diag(arr_cell), pbc=[1,1,1])

cell = atoms.cell[:]
atoms.set_cell(np.array([np.dot(T, a) for a in cell]),scale_atoms=True)
cell = pbcgto.Cell()
cell.verbose = 5
cell.atom=pyscf_ase.ase_atoms_to_pyscf(atoms)
cell.a=atoms.cell
cell.basis = 'gth-szv'
cell.pseudo = 'gth-lda'
cell.build()
mf=pbcdft.RKS(cell)

mf.kernel()

print(f"E = { np.trace(np.dot(mf.make_rdm1(), mf.get_fock() + mf.get_hcore())) }" )
print(f"n = { np.trace( np.dot(mf.make_rdm1(),mf.make_rdm1()) ) }" )

I'm getting the impression it's not me that's the problem because it seems I have tried to change everything in random ways (even in ways that I would not expect it to work) hoping that it would work eventually. But as I have the impression that pyscf can indeed calculate these quantities, can you say what's wrong?

The electronic part of the energy is defined here, which is the standard implementation of the KS-DFT energy. The exchange-correlation (XC) energy in DFT is a functional of the density, density gradients, Laplacians, etc., which is not equal to the product of the XC potential and the density matrix.


About memory usage

Thank you very much for your great job！
I try to train this model on my data, but i found that it takes up a lot of memory. And as the training continues, the memory usage is slowly increasing. Is this normal? If I want to reduce the memory usage , where should I start?

While running the experiments, I have never exceeded the usage of 4gb for the CoNLL dataset and the usage of 5gb for the DREC dataset. FYI, the size of the DREC data is around 4mb for the training set.


halo mythic 3.5 live patch 1

Changes / Comments
:green_square: 1 change speech bubble
:green_square: 2 fix infographic not switching to display on first load
:green_square: 3 fix sheet description in R20 to not show
:green_square: 4 fix melee weapon br pts displaying?00 on load
:red_square: 5 create game settings options for global sheet selection
:green_square: 6 change damage roller desc to hits
:green_square: 7 expose hit mod in roller
:green_square: 8 fix odd tab in placeholder ability text
:green_square: 9 automate calculation of fatigue
:green_square: 10 fix Spts being assigned the value of fatigue in roller
:green_square: 11 improve placeholder for size?
:green_square: 12 add repeating armor desc section to sheet
:green_square: 13 add nav air land space
:green_square: 14 added repeating skills section to NPC sheet
Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[yes] Does the pull request title have the sheet name(s)? Include each sheet name.
[yes] Is this a bug fix?
[yes] Does this add functional enhancements (new features or extending existing features) ?
[no] Does this add or change functional aesthetics (such as layout or color scheme) ?
[only missing attributes were created from defunct attributes] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?

If you do not know English. Please leave a comment in your native language.

updated this push after not being able to add default sheet settings

@Reonin It appears something weird happened to line feeds for these three files. I think the line endings were somehow set to \r. I just did a git merge upstream/master and I have windows so my setting is to pull with CR LF and push using LF (unix style). After the merge, now these three files are showing as being modified, even though I never touched these files before. I also can't Discard the changes, I can't push this to github because it will show that I changed these when I didn't.
This will probably happen to anyone else trying to do an merge upstream/master. Do you have an idea how to resolve this issue?

Hey @MadCoder253 have you tried rebasing the upcoming branch so your newer changes are sitting on top?

Thanks @Reonin. I tried doing:
git rebase upstream/master
But I get an error
error: cannot rebase: You have unstaged changes. error: Please commit or stash them.
I was able to discard changes for Halo_Mythic_3dot5/HaloMythic3dot5.html, but not the other two. I tried git stash, got the following message, but it still shows the other two files as being modified. Maybe they were committed using CR LF?
git stash warning: CRLF will be replaced by LF in Halo_Mythic_3dot5/HaloMythic3dot5.css. The file will have its original line endings in your working directory warning: CRLF will be replaced by LF in Halo_Mythic_3dot5/sheet.json. The file will have its original line endings in your working directory Saved working directory and index state WIP on master: ae1653d85 Merge remote-tracking branch 'upstream/master'

@MadCoder253 if your worried the lines being changed in the PR for future updates it shouldn't be a problem. But if you don't have any local changes look into potentially
git fetch --all
git reset --hard origin/master

Which should pull down the latest changes and overwrite your local version. If the line endings are still there then it's very likely they were committed at some point. I hope this might point you in the right direction!

@Reonin that worked! I'm saving those command lines. Thanks a million.

@Reonin Still something wrong. I tried to do git merge upstream/master and I have the same problem again. It shows that sheet.json, HaloMythic3dot5.html, and HaloMythic3dot5.css were modified. I have no issues with the other 181 files.

@Reonin Oh wait, is it because they are new files? I'm just trying to push up to my fork.

Yep in this very PR that was merged those three files got changed and updated which might be what you are seeing as you try and push your changes to your new branch.

Thanks @Reonin that must be it. Sorry for wasting your time!


Crash on reading NC_VLEN variable with unlimited dimension

(This seems to be again running into issues with reclaiming NC_VLENs and might be possibly addressed by the proposed fix for https://github.com/Unidata/netcdf-c/issues/2143 )
We are using netcdf-c 4.8.1, and ran into this interesting crash. It seems to happen when

there are 2 NC_VLEN variables (the base type doesn't seem to matter), both with the same unlimited dimension
at least one of them has to have offset in the unlimited dimension
crash happens on read of one of the variables (depending on their offsets in unlimited dimension... seems like reading the one with the smaller offset crashes)
offsets in the unlimited dimensions  for two variables must be different

Here is some simplistic reproduction code that both creates the file and then tries to read the variable:
#include <iostream>
#include "netcdf.h"

void checkErrorCode(int status, const char* message){
    if (status != NC_NOERR){
        std::cout << "Error code: " << status << " from " << message << std::endl;
        std::cout << nc_strerror(status) << std::endl << std::endl;
    }
}

int main(int argc, const char * argv[]) {

    // ================ WRITE ==================

    // Setup data
    size_t DATA_LENGTHS[2] = {2, 3};
    nc_vlen_t data[DATA_LENGTHS[0] * DATA_LENGTHS[1]];

    const int first_size = 6;
    double first[first_size] = {65, 66, 67, 68, 69, 70};
    data[0].p = first;
    data[0].len = first_size;

    const int second_size = 6;
    double second[second_size] = {65, 66, 67, 68, 69, 70};
    data[1].p = second;
    data[1].len = second_size;

    const int third_size = 5;
    double third[third_size] = {65, 66, 67, 68, 69};
    data[2].p = third;
    data[2].len = third_size;

    const int fourth_size = 5;
    double fourth[fourth_size] = {65, 66, 67, 68, 69};
    data[3].p = fourth;
    data[3].len = fourth_size;

    const int fifth_size = 8;
    double fifth[fifth_size] = {65, 66, 67, 68, 69, 70, 71, 72};
    data[4].p = fifth;
    data[4].len = fifth_size;

    const int sixth_size = 4;
    double sixth[sixth_size] = {65, 66, 67, 68};
    data[5].p = sixth;
    data[5].len = sixth_size;

    // Open file
    int ncid;
    int retval;

    retval = nc_create("myfile.nc", NC_NETCDF4, &ncid);
    checkErrorCode(retval, "nc_create");

    // Define vlen type named RAGGED_DOUBLE
    nc_type vlen_typeID;
    retval = nc_def_vlen(ncid, "RAGGED_DOUBLE", NC_DOUBLE, &vlen_typeID);
    checkErrorCode(retval, "nc_def_vlen");

    // Define dimensions
    int dimid_x;
    retval = nc_def_dim(ncid, "xdim", NC_UNLIMITED, &dimid_x);
    checkErrorCode(retval, "nc_def_dim (1)");

    int dimid_y;
    retval = nc_def_dim(ncid, "ydim", 10, &dimid_y);
    checkErrorCode(retval, "nc_def_dim (2)");

    int dims[2] = {dimid_y, dimid_x};

    // Define vlen variable 1
    int varid1;
    retval = nc_def_var(ncid, "Var1", vlen_typeID, 2, dims, &varid1);
    checkErrorCode(retval, "nc_def_var (1)");

    // Write vlen variable 1
    size_t start1[2] = {0, 1};
    ptrdiff_t stride[2] = {1,1};
    retval = nc_put_vars(ncid, varid1, start1, DATA_LENGTHS, stride, data);
    checkErrorCode(retval, "nc_put_vars (1)");

    // Define vlen variable 2
    int varid2;
    retval = nc_def_var(ncid, "Var2", vlen_typeID, 2, dims, &varid2);
    checkErrorCode(retval, "nc_def_var (2)");

    // Write vlen variable 2
    size_t start2[2] = {0, 2};
    retval = nc_put_vars(ncid, varid2, start2, DATA_LENGTHS, stride, data);
    checkErrorCode(retval, "nc_put_vars (2)");

    retval = nc_close(ncid);
    checkErrorCode(retval, "nc_close (1)");

    // ================ READ ==================

    // open file
    retval = nc_open("myfile.nc", NC_NOWRITE, &ncid);
    checkErrorCode(retval, "nc_open");

    // read vlen variable with the smaller of the offsets

    // the length of fixed dimension is 10, and
    // the length of unlimited dimension is 5
    // (we wrote 3 datapoints with offset of 2 for 2nd var)
    const int num_items = 50;

    nc_vlen_t* data_read = new nc_vlen_t[num_items];
    retval = nc_get_var(ncid, varid1, data_read);
    checkErrorCode(retval, "nc_get_var");

    retval = nc_free_vlens(num_items, data_read);
    checkErrorCode(retval, "nc_free_vlens");

    retval = nc_close(ncid);
    checkErrorCode(retval, "nc_close (2)");

    return retval;
}

To reproduce the crash outside of our code base I had to use some environment variables that mess with memory allocation and release. I.e. on Debian 10:
% setenv MALLOC_CHECK_ 3
% setenv MALLOC_PERTURB_ 204
% ./a.out
free(): invalid pointer
Abort

And on macOS 11.2.3:
$ export MallocScribble=1
$ ./a.out
a.out(23741,0x10b7fae00) malloc: enabling scribbling to detect mods to free blocks
a.out(23741,0x10b7fae00) malloc: *** error for object 0xaaaaaaaaaaaaaaaa: pointer being freed was not allocated
a.out(23741,0x10b7fae00) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6

The primary problem was that you were not clearing the data_read memory; this left junk in it that was being incorrectly interpreted by nc_vlens_free.

Thanks Dennis! I am not quite clear, what is the expectation for data_read before it goes to nc_free_vlens?
The doc just says "pass the pointer back to this function, when you're done with the data, and it will free the vlen memory"

The problem is that your read does not appear to actually use all the space allocated for data_read.
This means that part of data_read is not overwritten with legal vlen_t instances. WHen nc_vlen_free
is called with the data_read argument and a length that is the whole size of data_read, nc_vlen_free
will assume every vlen_t in data_read is legitimate and it will crash when it attempts to free a vlen_t
instance that was not overwritten by the read call.
You have several options:

zero out all of data_read
change the count passed to nc_vlen_free to exactly cover what was actually read.

Oh ok, I see what you mean - there are unused/not-overwritten elements of data_read because of the offsets in both dimensions and only partially writing data to the dimid_y dimension (that has fixed length of 10).
So to "zero out" data_read, do I have to do something like:
    nc_vlen_t* data_read = new nc_vlen_t[num_items];
    for (int i=0; i< num_items; i++)
    {
        data_read[i].p = NULL;
        data_read[i].len = 0;
    }

such that all nc_vlen_t elements are legitimate ahead of time? Or are there better ways?
I think for option 2, if you don't have prior knowledge of the file, you wouldn't know which portion of the data has actually been written to. So if you want to read all the data, assuming 5x10=50 (going off of the current lengths of dimensions) seems like the best guess.
I am also unsure why this crash doesn't happen in other circumstances when reading back more data than has been written. When I was originally investigating this crash and trying to come up with simplest repro steps possible, I have tried just having one variable with one dimension (either unlimited or fixed-length, in which case writing less elements than the dimension length), and writing it with an offset. Then trying to read back from the variable the number of elements equal to dimension length (so that would mean the first elements would be unused due to offset, and, with the fixed dimension, the last elements would be also unused since I wrote fewer elements than the dimension length). The crash does not seem to happen in those cases. Even with the above code, reading and freeing data from varid2 ("Var2") works fine. I was only able to reproduce the crash with those specific circumstances I listed in the original post.
And I guess the reason that unused elements of data_read contain invalid nc_vlen_t values (with bogus values for len and p fields) goes back to NC_VLENs not having a Fill Value turned on by default (https://github.com/Unidata/netcdf-c/issues/2068)?

One way to zero a block of memory,
#include <string.h> /* need the c header to get memset *.
...
memset((void*)data_read,0,sizeof(data_read);
...

As for this:

...reading back more data than has been written...

It depends on what it is overwriting; it what it overwrote does not contain data
then it is possible that no error would be detected.

Sorry to keep bugging you Dennis, just trying to understand this... I don't think memset is enough, as data_read is an array of nc_vlen_t structs, and memset wouldn't create "legal nc_vlen_t instances" for nc_free_vlens to release.  I still get the crash when I use memset, but I was able to avoid it with the above for-loop setting all nc_vlen_t.len to 0s and all nc_vlen_t.p to NULL.
Trying to understand this:

It depends on what it is overwriting; it what it overwrote does not contain data
then it is possible that no error would be detected.

didn't you say that the issue happens when data is NOT overwritten, so there are "illegal"/bogus nc_vlen_t elements that nc_free_vlens will try to free?
I actually went as far as printing out all the nc_vlen_t elements in data_read before and after nc_get_var call... Looks like nc_get_var DOES overwrite some values that I would think would be unused... For example, it DOES overwrite data_read[0] which should be unused because Var1 was written with offset of 1. It also overwrites data_read[9] through data_read[39] (although we are only writing 6 values with some gaps in between, which should only go up to data_read[8] I think.  But it DOES NOT overwrite data_read[40] through data_read[49], and that's what causing the crash.
 Since the nc_vlen_t instances
in a vector are contiguous, this ends up filling each nc_vlen_t.len with zeros and nc_vlen_t.p with zeros. This equivalent to explicitly setting the len and p fields to 0 and NULL respectively.
My speculation is that the length argument (the last one) to memset is not covering the full
block of memory allocated to data_read. It should look like this:
memset((void*)data_read,0,sizeof(nc_vlen_t)*n)

where n is the number of nc_vlen_t instances in data read.
This should be equivlalent to
nc_vlen_t data_read[n];
for(int i=0;i<n;i++) { data_read[i].len = 0; data_read.p = NULL;

although memset is probably a bit faster.

Looks like nc_get_var DOES overwrite some values that I would think would be unused...

What you need to know is that the portion of the variable written on disk is different
than the portion of memory that is read.
Suppose we have a 1-dimensional variable v on disk, with a dimension of size 5.
Suppose we have a 1-dimensional variable mwrite in memory with a dimension size of 10.
If write 5 elements of mwrite starting at mwrite[5] to v and specify that it begin writing into v[0]
then we will have:
mwrite[5] -> v[0]
...
mwrite[9] -> v[4]
```
Suppose now we have another  1-dimensional variable mread in memory with a dimension size of 10.
If we later read v back into mread but specify that it start reading into mread[0],
then we will have:

v[0] -> mread[0]
...
v[4]->mread[4]
At this point the contents of mread[5-9] are garbage and if we then make the mistake
of calling nc_vlen_free(mread,10), it may fail.
Note that although we wrote into v with offset 5, the reading back will by default
go into mread[0].

Memset works because it sets the whole block of memory to zero. Since the nc_vlen_t instances
in a vector are contiguous, this ends up filling each nc_vlen_t.len with zeros and nc_vlen_t.p with zeros. This equivalent to explicitly setting the len and p fields to 0 and NULL respectively.

Ah, right! Thanks for explaining!

What you need to know is that the portion of the variable written on disk is different
than the portion of memory that is read.

Thank you, I think I understand. Although I would have thought mwrite and v should be switched around (i.e. offset should be in terms of the variable we are writing into (v) , not the variable we are copying from (mwrite)? If we started to write to v from v[1] and only wrote 4 elements, shouldn't then mread[0] also contain gabage? Sorry if I am just confusing myself)
More importantly, while qualifying the workaround of setting all elements to nc_vlen_t.len=0 and nc_vlen_t.p=NULL before reading the variable, I still observe the crash if I try to turn on the fill value for both NC_VLEN variables and try to set it to default (which I believe is also nc_vlen_t.len=0 and nc_vlen_t.p=NULL).
The code is exactly the same as the original except it has
    // set fill value
    nc_vlen_t fillValue;
    fillValue.p = NULL;
    fillValue.len = 0;
    retval = nc_def_var_fill(ncid,varid1,NC_FILL,&fillValue);
    checkErrorCode(retval, "nc_def_var_fill (1)");

and
    // set fill value
    retval = nc_def_var_fill(ncid,varid2,NC_FILL,&fillValue);
    checkErrorCode(retval, "nc_def_var_fill (2)");

right after defining each variable. And the extra print statements.
Looks like the values data_read[40] through data_read[49] are re-filled with bogus pointers upon read:
Before reading the variable (but after memset)
data_read[0].len: 0
data_read[0].p: 0x0
data_read[0].p is NULL
data_read[1].len: 0
data_read[1].p: 0x0
data_read[1].p is NULL
data_read[2].len: 0
data_read[2].p: 0x0
data_read[2].p is NULL
data_read[3].len: 0
data_read[3].p: 0x0
data_read[3].p is NULL
data_read[4].len: 0
data_read[4].p: 0x0
data_read[4].p is NULL
data_read[5].len: 0
data_read[5].p: 0x0
data_read[5].p is NULL
data_read[6].len: 0
data_read[6].p: 0x0
data_read[6].p is NULL
data_read[7].len: 0
data_read[7].p: 0x0
data_read[7].p is NULL
data_read[8].len: 0
data_read[8].p: 0x0
data_read[8].p is NULL
data_read[9].len: 0
data_read[9].p: 0x0
data_read[9].p is NULL
data_read[10].len: 0
data_read[10].p: 0x0
data_read[10].p is NULL
data_read[11].len: 0
data_read[11].p: 0x0
data_read[11].p is NULL
data_read[12].len: 0
data_read[12].p: 0x0
data_read[12].p is NULL
data_read[13].len: 0
data_read[13].p: 0x0
data_read[13].p is NULL
data_read[14].len: 0
data_read[14].p: 0x0
data_read[14].p is NULL
data_read[15].len: 0
data_read[15].p: 0x0
data_read[15].p is NULL
data_read[16].len: 0
data_read[16].p: 0x0
data_read[16].p is NULL
data_read[17].len: 0
data_read[17].p: 0x0
data_read[17].p is NULL
data_read[18].len: 0
data_read[18].p: 0x0
data_read[18].p is NULL
data_read[19].len: 0
data_read[19].p: 0x0
data_read[19].p is NULL
data_read[20].len: 0
data_read[20].p: 0x0
data_read[20].p is NULL
data_read[21].len: 0
data_read[21].p: 0x0
data_read[21].p is NULL
data_read[22].len: 0
data_read[22].p: 0x0
data_read[22].p is NULL
data_read[23].len: 0
data_read[23].p: 0x0
data_read[23].p is NULL
data_read[24].len: 0
data_read[24].p: 0x0
data_read[24].p is NULL
data_read[25].len: 0
data_read[25].p: 0x0
data_read[25].p is NULL
data_read[26].len: 0
data_read[26].p: 0x0
data_read[26].p is NULL
data_read[27].len: 0
data_read[27].p: 0x0
data_read[27].p is NULL
data_read[28].len: 0
data_read[28].p: 0x0
data_read[28].p is NULL
data_read[29].len: 0
data_read[29].p: 0x0
data_read[29].p is NULL
data_read[30].len: 0
data_read[30].p: 0x0
data_read[30].p is NULL
data_read[31].len: 0
data_read[31].p: 0x0
data_read[31].p is NULL
data_read[32].len: 0
data_read[32].p: 0x0
data_read[32].p is NULL
data_read[33].len: 0
data_read[33].p: 0x0
data_read[33].p is NULL
data_read[34].len: 0
data_read[34].p: 0x0
data_read[34].p is NULL
data_read[35].len: 0
data_read[35].p: 0x0
data_read[35].p is NULL
data_read[36].len: 0
data_read[36].p: 0x0
data_read[36].p is NULL
data_read[37].len: 0
data_read[37].p: 0x0
data_read[37].p is NULL
data_read[38].len: 0
data_read[38].p: 0x0
data_read[38].p is NULL
data_read[39].len: 0
data_read[39].p: 0x0
data_read[39].p is NULL
data_read[40].len: 0
data_read[40].p: 0x0
data_read[40].p is NULL
data_read[41].len: 0
data_read[41].p: 0x0
data_read[41].p is NULL
data_read[42].len: 0
data_read[42].p: 0x0
data_read[42].p is NULL
data_read[43].len: 0
data_read[43].p: 0x0
data_read[43].p is NULL
data_read[44].len: 0
data_read[44].p: 0x0
data_read[44].p is NULL
data_read[45].len: 0
data_read[45].p: 0x0
data_read[45].p is NULL
data_read[46].len: 0
data_read[46].p: 0x0
data_read[46].p is NULL
data_read[47].len: 0
data_read[47].p: 0x0
data_read[47].p is NULL
data_read[48].len: 0
data_read[48].p: 0x0
data_read[48].p is NULL
data_read[49].len: 0
data_read[49].p: 0x0
data_read[49].p is NULL

After reading the variable
data_read[0].len: 0
data_read[0].p: 0x0
data_read[0].p is NULL
data_read[1].len: 6
data_read[1].p: 0x7fa254509670
data_read[1].p is NOT NULL
data_read[2].len: 6
data_read[2].p: 0x7fa2545096d0
data_read[2].p is NOT NULL
data_read[3].len: 5
data_read[3].p: 0x7fa254509740
data_read[3].p is NOT NULL
data_read[4].len: 0
data_read[4].p: 0x0
data_read[4].p is NULL
data_read[5].len: 5
data_read[5].p: 0x7fa2545096a0
data_read[5].p is NOT NULL
data_read[6].len: 8
data_read[6].p: 0x7fa254509700
data_read[6].p is NOT NULL
data_read[7].len: 4
data_read[7].p: 0x7fa254509770
data_read[7].p is NOT NULL
data_read[8].len: 0
data_read[8].p: 0x0
data_read[8].p is NULL
data_read[9].len: 0
data_read[9].p: 0x0
data_read[9].p is NULL
data_read[10].len: 0
data_read[10].p: 0x0
data_read[10].p is NULL
data_read[11].len: 0
data_read[11].p: 0x0
data_read[11].p is NULL
data_read[12].len: 0
data_read[12].p: 0x0
data_read[12].p is NULL
data_read[13].len: 0
data_read[13].p: 0x0
data_read[13].p is NULL
data_read[14].len: 0
data_read[14].p: 0x0
data_read[14].p is NULL
data_read[15].len: 0
data_read[15].p: 0x0
data_read[15].p is NULL
data_read[16].len: 0
data_read[16].p: 0x0
data_read[16].p is NULL
data_read[17].len: 0
data_read[17].p: 0x0
data_read[17].p is NULL
data_read[18].len: 0
data_read[18].p: 0x0
data_read[18].p is NULL
data_read[19].len: 0
data_read[19].p: 0x0
data_read[19].p is NULL
data_read[20].len: 0
data_read[20].p: 0x0
data_read[20].p is NULL
data_read[21].len: 0
data_read[21].p: 0x0
data_read[21].p is NULL
data_read[22].len: 0
data_read[22].p: 0x0
data_read[22].p is NULL
data_read[23].len: 0
data_read[23].p: 0x0
data_read[23].p is NULL
data_read[24].len: 0
data_read[24].p: 0x0
data_read[24].p is NULL
data_read[25].len: 0
data_read[25].p: 0x0
data_read[25].p is NULL
data_read[26].len: 0
data_read[26].p: 0x0
data_read[26].p is NULL
data_read[27].len: 0
data_read[27].p: 0x0
data_read[27].p is NULL
data_read[28].len: 0
data_read[28].p: 0x0
data_read[28].p is NULL
data_read[29].len: 0
data_read[29].p: 0x0
data_read[29].p is NULL
data_read[30].len: 0
data_read[30].p: 0x0
data_read[30].p is NULL
data_read[31].len: 0
data_read[31].p: 0x0
data_read[31].p is NULL
data_read[32].len: 0
data_read[32].p: 0x0
data_read[32].p is NULL
data_read[33].len: 0
data_read[33].p: 0x0
data_read[33].p is NULL
data_read[34].len: 0
data_read[34].p: 0x0
data_read[34].p is NULL
data_read[35].len: 0
data_read[35].p: 0x0
data_read[35].p is NULL
data_read[36].len: 0
data_read[36].p: 0x0
data_read[36].p is NULL
data_read[37].len: 0
data_read[37].p: 0x0
data_read[37].p is NULL
data_read[38].len: 0
data_read[38].p: 0x0
data_read[38].p is NULL
data_read[39].len: 0
data_read[39].p: 0x0
data_read[39].p is NULL
data_read[40].len: 0
data_read[40].p: 0x7fa254506990
data_read[40].p is NOT NULL
data_read[41].len: 0
data_read[41].p: 0x7fa254506990
data_read[41].p is NOT NULL
data_read[42].len: 0
data_read[42].p: 0x7fa254506990
data_read[42].p is NOT NULL
data_read[43].len: 0
data_read[43].p: 0x7fa254506990
data_read[43].p is NOT NULL
data_read[44].len: 0
data_read[44].p: 0x7fa254506990
data_read[44].p is NOT NULL
data_read[45].len: 0
data_read[45].p: 0x7fa254506990
data_read[45].p is NOT NULL
data_read[46].len: 0
data_read[46].p: 0x7fa254506990
data_read[46].p is NOT NULL
data_read[47].len: 0
data_read[47].p: 0x7fa254506990
data_read[47].p is NOT NULL
data_read[48].len: 0
data_read[48].p: 0x7fa254506990
data_read[48].p is NOT NULL
data_read[49].len: 0
data_read[49].p: 0x7fa254506990
data_read[49].p is NOT NULL
a.out(68435,0x10b566e00) malloc: *** error for object 0x7fa254506990: pointer being freed was not allocated
a.out(68435,0x10b566e00) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Thank you again for all your help!

Hi, just wanted to check for any updates! I know this is a very-very edge-case scenario, but we do still see the crash even with the suggested workaround:

More importantly, while qualifying the workaround of setting all elements to nc_vlen_t.len=0 and nc_vlen_t.p=NULL before reading the variable, I still observe the crash if I try to turn on the fill value for both NC_VLEN variables and try to set it to default (which I believe is also nc_vlen_t.len=0 and nc_vlen_t.p=NULL).

Hi, just wanted to check - has there been any updates on this issue?

My belief is that your example falls into one of the known bugs described in PR https://github.com/Unidata/netcdf-c/pull/2179. Namely, bug #1 on vlen fillvalue. I still do not have a fix for this case since my suspicion is that it is an HDF5 failure. You might try again with the very latest version of HDF5 on the off chance that they fixed it.


update collection name

The Uffizi has let us know that it should be called:
Gabinetto dei Disegni e delle Stampe delle Gallerie degli Uffizi

Good to know! I think I took the name we have in the system from the VIAF record: https://viaf.org/viaf/131952597/

all set


[RFC] Moving server configuration in a separate file

Hi,
First, thank you for this Plum library and its associated bundle. Both of them rock and are very well coded.
As deployment information are sensitive, I suggest to move them to another configuration file instead of config_dev.yml. The file that contains server information should not be deployed for security reasons. I think we should expose such an app/config/deployment.yml.dist or app/config/deployment.ini.dist file that contains the servers information and add this file to the excluded files list.
What do you think?
Cheers.

Thanks a lot!
You're absolutely right. Deployment informations must not be deployed. I have two solutions in mind :

Instead of having informations in the config_dev.yml change for
  imports:
      - { resource: deployment.yml }

But it brings a problem: when the application is deployed, the dev env does not work anymore because the deployment.yml file is not present.

Or this solution which is a little be more tricky :
  // AppKernel.php
  public function registerContainerConfiguration(LoaderInterface $loader)
  {
      $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');

      if (in_array($this->getEnvironment(), array('dev', 'test'))) {
          if (file_exists($deployment = __DIR__.'/config/deployment.yml.dist')) {
              $loader->load($deployment);
          } elseif (file_exists($deployment = __DIR__.'/config/deployment.yml')) {
              $loader->load($deployment);
          }
      }
  }

Something like this. And with an empty configuration for the dist file.

Hum, I think you should just provide a sample config file in Resources/config/deployment.yml.dist.
In the config_dev.yml you can just add the following lines:
madalynn_plum:
    deployers:
        - Plum\Deployer\RsyncDeployer
    servers: %kernel.root_dir%/config/deployment.yml

In your Extension class, you can just get the path to the file and check if it exist or not, so that you can load it. The big gain is that you can load the bundle for any environment and move the server configuration anywhere.


Drop support for unsupported versions of PHP

Drop support for PHP < 7.1.
https://www.php.net/supported-versions.php
This will make possible to add strong typing and return types everywhere.

Also this is probably a requirement to fix #38

Yeah, you're right. Fixed in #40


porting of programs between Wasmer and Cowasm

I wonder, how easy or difficult  will it be to port programs

from Wasmer to Cowasm
from Cowasm to Wasmer

// I plan to study and do experiments
EDIT:
related:

https://github.com/sagemathinc/cowasm/issues/43

Hi @martin12333 , the way the CoWasm.sh runs subprocesses in the browser is implemented here:
https://github.com/sagemathinc/cowasm/blob/main/packages/kernel/src/wasm/worker/posix-context.ts#L159
It's basically an implementation of "fork + exec" but entirely within a single WASM instance, which is I think simple, flexible and fast, but of course has drawbacks.  The way it works is:

Make a copy of all state -- memory, WASI, etc.
Load the program to run as a dynamic library -- for this to work, the program needs to be built -fPIC, which most WebAssembly programs aren't.
Runs the main (or similar) function in the dynamic library
After termination of the program, restores state from the copy.
Also keep track of unloading dll's from memory.

When running under node.js there's also a different fork/exec implementation, but it's less accurate.  There's also an implementation that works very well for Python.  (These are for running native subprocesses, and I care about this mainly so I can use pip to install and building C compiled Python packages from source...)
The steps above are just one neat way of efficiently running programs without the complexity of multiple WebAssembly instances, which leverages this packages https://www.npmjs.com/package/dylink that I wrote.  It has drawbacks, of course.   cowasm could also be extended to run programs in other ways.
Thanks for noticing CoWasm!


Save all transaction data

Save the seed, tx_hash and all other data that you obtain from Originstamp in user's phone, in case the Originstamp goes down, user has enough data to prove authenticity.

Refer, 85cb3126646a630c115a13477e327303fa0f89c3


add --no_skip_missing option to carthage-verify

Adds an option to not skip but rather abort if a missing dependency is found inside the build folder.

LGTM

@blender Feel free to merge anything here that you think is appropriate. This repo is pretty lightly maintained. ☺

@t-unit Thanks for the contribution!


iTwin.js support for Apple Silicon Mac

The native package of iTwin.js does not currently support Apple Silicon Macs without using a Rosetta terminal in order to run the x64 version.
A new version of the Node addon needs to be created specifically for Apple Silicon native support.
Discussed in https://github.com/iTwin/itwinjs-core/discussions/3470

Originally posted by PeterJBassett April  5, 2022
Hello, a question, is there a plan for the itwin imodel.js libraries to support M1 Macbook OSX?
Do you know what the timescales are for this?

Apple Silicon for MacOS has been released with 3.3.0.


Added a shapes lib, added to comment practice, extended sumOfNumber input range

Added Shape.js, a basic shape library
Added test code to comment-practice.js
Extended input range of sumOfNumber function in sumOfNumber.js
Added a new test to sumTest.js to test new feature

Sorry for the longer/altered pull request! I wasn't aware that pushing new commits to my fork would append to my original pull request.


permanent borders around pages

i have this permanent border around this page and it won't go away.

if you open the page in a non-enhanced version of notion (e.g. a private browser tab) are those borders there? could you share a link to a page where i can reproduce that?

the issue is gone with the update! i don't know what happened but i enabled the extensions one by one and the problem didn't come back.


Don't skip all tests

This toggle caused us to skip all tests and just run the TCPH dask benchmarks.
This toggle will either be obsolete or has to change after https://github.com/coiled/benchmarks/issues/1099 is done

Closes #1097


haiku mmap/madvise new flags

r? @JohnTitor
(rust-highfive has picked a reviewer for you, use r? to override)

Thanks!
@bors r+

:pushpin: Commit 10681f2b1587e9cf028d79e80263b7d1240f92e5 has been approved by JohnTitor

:hourglass: Testing commit 10681f2b1587e9cf028d79e80263b7d1240f92e5 with merge 94bf82a6bc51d79c21a7e232a1b66f1a5026bacf...

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing 94bf82a6bc51d79c21a7e232a1b66f1a5026bacf to master...


Error with freegeoip: response was not valid JSON

When using the FreeGeoIP provider, I get this error message:
Geocoding API's response was not valid JSON: ({"ip":"<IP_ADDRESS>","country_code":"FR","country_name":"France","region_code":"O","region_name":"Nord-Pas-de-Calais","city":"Lumbres","zip_code":"62380","time_zone":"Europe/Paris","latitude":50.7069,"longitude":2.1208,"metro_code":0});

I guess it's because of the parenthesis.
I've opened this issue on the freegeoip repository to get more info about why the API is returning this payload.
From the Geocoder side: is there something we can do?

On hold until we see what happens with freegeoip.

freegeoip.net is down now.
Available freegeoip.io


Cross build on Travis

@jeffreyolchovy @nrinaudo

Ah, right, if you're going to run both 0.13 & 1.0 in the same build, then you don't need the voodoo :)


[Draft] Add Nighthawk docs

Signed-off-by: Navendu Pottekkat<EMAIL_ADDRESS>Description
This is a draft PR
This PR adds docs for using Nighthawk, Using GetNighthawk APIs and using Nighthawk with Meshery and SMP to run performance benchmarks.

[x] Yes, I signed my commits.

@amino19 label commenter workflow is failing.

Updated this page: https://deploy-preview-181--getnighthawk.netlify.app/docs
Will add more docs as we update Performance Management docs in Meshery

@amino19 label commenter workflow is failing.

I went ahead and fixed this workflow.

@leecalcote Made the suggested changes. Good to merge?


Fix the arguments being passed to kubectl patch

The kubectl patch will fail if the --type merge argument is not
passed. It also requires for the patch manifest to be enclosed in single
quotes.

This also updates the k8s resource example

Resolves https://github.com/argoproj/argo/issues/1223

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@ian-howell -  @sarabala1979 explained that this is the intended behavior which I agree with. We want the default behavior to use strategic merge patching (which is the kubectl default). If we need other merge types, we can supply it as a different field.

The kubectl patch will fail if the --type merge argument is not
passed. It also requires for the patch manifest to be enclosed in single
quotes.

This should be working for strategic merge patching.

@jessesuen I understand. I'll take a second look at this tomorrow to suss out why patches are failing in my workflows

I'm not sure I understand. Without the --type merge flag, I get the error
Error from server (UnsupportedMediaType):
the body of the request was in an unknown format - accepted media types include:
application/json-patch+json, application/merge-patch+json

@jessesuen @sarabala1979 Could one of you provide an example patch to be used with this feature?

Closing in favor of https://github.com/argoproj/argo/pull/1269

yes, correct. strategic-merge-patch is  supported only standard resources
https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/


chore: optimize dockerfile order for caching

Rearranged the Dockerfile to speed up rebuilding.  Basically moved all the dependencies ahead of the code copying, so it is more likely to be able to reuse cached layers unless the dependencies change.
 => CACHED [ollama-webui base  2/11] WORKDIR /app/backend                                                                                0.0s
 => CACHED [ollama-webui base  3/11] COPY ./backend/requirements.txt ./requirements.txt                                                                                0.0s
 => CACHED [ollama-webui base  4/11] RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --no-cache-dir                      0.0s
 => CACHED [ollama-webui base  5/11] RUN pip3 install -r requirements.txt --no-cache-dir                                                                                0.0s
 => CACHED [ollama-webui base  6/11] RUN apt-get update     && apt-get install -y pandoc     && rm -rf /var/lib/apt/lists/*                                             0.0s
 => CACHED [ollama-webui base  7/11] RUN mkdir -p /root/.cache/chroma/onnx_models/all-MiniLM-L6-v2                                                                      0.0s
 => CACHED [ollama-webui base  8/11] COPY --from=build /app/onnx.tar.gz /root/.cache/chroma/onnx_models/all-MiniLM-L6-v2                                                0.0s
 => CACHED [ollama-webui base  9/11] RUN cd /root/.cache/chroma/onnx_models/all-MiniLM-L6-v2 &&    tar -xzf onnx.tar.gz                                                 0.0s
 => [ollama-webui base 10/11] COPY --from=build /app/build /app/build                                                                                0.2s
 => [ollama-webui base 11/11] COPY ./backend .                                                                                0.2s
 => [ollama-webui] exporting to image                                                                                1.8s
 => => exporting layers                                                                                1.7s

LGTM, Thanks!


[SPARK-41074][DOC] Add option --upgrade in dependency installation command

What changes were proposed in this pull request?
Add option --upgrade in dependency installation command
Why are the changes needed?
for the packages whose version are not pinned, pip install -r dev/requirements.txt can not upgrade them
Does this PR introduce any user-facing change?
No
How was this patch tested?
manually check

cc @HyukjinKwon @Yikun

Merged to master.

thank you @HyukjinKwon @LuciferYang


Ionic2 - Can't use ion-select while toast is still active

Short description of the problem:
App crashes if I open ion-select while toast is still active.
What behavior are you expecting?
Open the ion-select.
Steps to reproduce:

Create ion-select
Add toast in constructor
Select something while toast is still floating

**Other information:** (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

![screen shot 2016-09-19 at 13 52 34](https://cloud.githubusercontent.com/assets/9280636/18629804/c057f084-7e70-11e6-9d97-69e476c8f672.png)

**Which Ionic Version?** 1.x or 2.x
2

**Run `ionic info` from terminal/cmd prompt:** (paste output below)
Your system information:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.36
Ionic App Lib Version: 2.0.0-beta.19
ios-deploy version: Not installed
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v0.12.4
Xcode version: Xcode 7.3.1 Build version 7D1014

Hello, thanks for using Ionic! So the first issue here is that you should not open overlay components or do anything else UI related in the constructor of a component in Angular 2 / Ionic 2. The constructor is called before the template has been rendered. You can use our Lifecycle events to call logic when the template loads using ionViewDidLoad. The second issue is a navigation bug in beta.11 that i can confirm has been fixed in beta.12. Thanks for using Ionic!


Coverage on Landing Page says "Unknown"

Expected Behavior
Coverage on the README landing page: https://github.com/bluesky/bluesky should reflect data from https://app.codecov.io/gh/bluesky/bluesky (currently about 88%)
Current Behavior

Possible Solution
Start by investigating links in the README
Steps to Reproduce (for bugs)
Open https://github.com/bluesky/bluesky

Seems to be self-cured?

The risks of dynamic badges 🤷🏻 .


how to close telnet

如何通过配置关闭相关telnet命令(ls invoke等)?

filter="-telnet"，注意“-”号
2018-03-08 10:54 GMT+08:00 thanks0rf<EMAIL_ADDRESS>
如何通过配置关闭相关telnet命令(ls invoke等)?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/alibaba/dubbo/issues/1433, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG-CAs822yG7A4b1qp16Q03Q4_fPcUhks5tcJ19gaJpZM4SiDsx
.

feel free to reopen if @liangfei0201's suggestion doesn't work.

请问filter="-telnet"是在哪里设置呢，dubbo version 2.5.3


kubctl rollout restart deployment/xyz functionality

Is your feature request related to a problem? Please describe.
The one missing feature in botkube for me is the ability to have users run @BotKube rollout restart deployment/staging-app
Describe the solution you'd like
I cannot get BotKube to support the rollout kubectl verb. I've tried adding it, but it keeps telling me "Command is not supported"
Describe alternatives you've considered
Not sure how to work around this.
Additional context
@BotKube rollout restart deployments/staging-app
Command not supported. Please run /botkubehelp to see supported commands.

@juneeighteen Could you please share kubectl command config you added to allow this command. For every command BotKube maps it to @BotKube [verb] [resource] .....  format and checks if verb and resource exists in the configuration. You can try with adding rollout in the verb and restart in the resource. Also, keep in mind to update botkube-clusterrole to give permission to BotKube SA to execute this command

Thanks @PrasadG193 !!
We can now send the Slack command "BotKube rollout restart deployments/appName". 🥳
This is what I ended up with and it's working!
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: botkube-clusterrole
  labels:
    app: botkube
rules:
  - apiGroups: ["*"]
    resources: ["*"]
    verbs: ["get", "watch", "list", "rollout"]
  - apiGroups: [""]
    verbs: ["delete"]
    resources: ["pods"]
  - apiGroups: [""]
    resources: ["deployments"]
    verbs: ["get", "list", "watch", "create", "update", "patch"]
  - apiGroups: ["apps"]
    resources: ["deployments/scale", "deployments"]
    verbs: ["get", "patch"]

ConfigMap:
commands:
          verbs: ["api-resources", "delete", "api-versions", "cluster-info", "describe", "diff", "explain", "get", "logs", "top", "rollout", "scale"]
          resources: ["deployments", "pods", "nodes", "restart"]


Broken link fixed

Thanks for contributing to fastlane! Before you submit your pull request, please make sure to check the following boxes:

[ ] Run bundle exec rspec from the root directory.
[ ] Run bundle exec rubocop -a to ensure the code style is valid
[ ] Read the Contribution Guidelines
[ ] We currently don't accept new actions, please publish a plugin instead, more information in Plugins.md

Before submitting a pull request, we appreciate if you create an issue first to discuss the change :+1:

Hi @andersonpaac,
Thanks for bringing this to our attention and submitting your PR 🚀 The link was supposed to go to YourFirstPR.md though, not CONTRIBUTING.md. I also found a couple more instances where the wrong link was used. I'm closing this, since all of this is addressed in #7637!


Update README.md

Replacing black checkmarks with green ones. Green checkmarks are more visible on dark theme and it's easier to see if achievement is earnable or not.

Funny you mention that, because it's complicated as (raw) Emoji are different for everyone basically:

https://emojipedia.org/check-mark/
https://emojipedia.org/check-mark-button/

For example, for me ✔ is still green, being mostly on Win10:

Also impulsively I didn't use Check Mark Button ✅, because Cross Mark ❌ isn't a box then, a bit mismatching.
Cross Mark Button ❎ is a whole other mess…
But I'm open to the discussion, maybe you or anybody has anything to swing me to one pattern?
Maybe adding plain old Englisch "Yes" and "No" before whatever icon is useful anyway for accessibility reason and ease of understanding? Making the icon less important?
Or other symbols outside of Unicode Emoji? E.g. ☒ (https://unicode-table.com/en/2612/).

✅👍 any one of these for YES
❌👎⛔ any one of these for NO

✅👍 any one of these for YES
❌👎⛔ any one of these for NO
also see this Specify theme context for images in Markdown GA

👌

test


Update GitHub App used to enable device flow

As described here https://github.blog/changelog/2022-03-16-enable-oauth-device-authentication-flow-for-apps/
This is causing users to hit issues when adding components in WGE

That has been fixed now. Thanks @sbernheim !


Write up iteration and release jar file on Github

Do a release

release notes done

Hi, the jar file should not be released yet as we still haven't fix all the test cases.

release notes done

LGTM !!


How can I convert extension result to HTML or Printview?

When I use IPython-notebook-extensions, it works well on IPython Screen as Follows:

However, when I press 'printview button', I only see the original result (not applying Extension) as follwows:

Is the any method to make printview to print results shown after applying IPython-notebook-extensions?
Or is there any plan to make extension having this function?

As described in the Wiki here, you need to add a preprocessor for nbconvert.
This can by done by adding this line to the ipython_nbconvert_config.pyfile:
c.Exporter.preprocessors = [ 'pymdpreprocessor.PyMarkdownPreprocessor' ]

Thanks to your comment, I succeeded.

copy 'pymdpreprocessor.py' to python path (or, PYTHONPATH).
copy 'ipython_nbconvert_config.py' to 'C:\Users\login_ID.ipython\profile_default', and edit it as follows:

c = get_config()

c.NbConvertApp.notebooks = ['*.ipynb']
c.Exporter.preprocessors = ['pymdpreprocessor.PyMarkdownPreprocessor']

Printview result is as follows.

Thanks for the feedback.


Startup at boot. before login?

So I was wondering shouldn't the program be starting when the pc boots before I log in?.

No, doing so would require it to be started as administrator, and even then programs aren't supposed to start before log in.


Deadlock in version 1.9.3 and a full test for reproducing the issue

This is related to #1440
I got a simple test function to reproduce the scenario.
package playground_test

import (
	"fmt"
	"testing"
	"time"

	"github.com/sirupsen/logrus"
)

type XXX struct {
	X string `json:"x"`
}

func (x XXX) MarshalJSON() ([]byte, error) {
	fmt.Println("aaa")
	logrus.Info("second")
	return []byte(`{"x":"y"}`), nil
}

func TestLog(t *testing.T) {
	jsonFormatter := &logrus.JSONFormatter{TimestampFormat: time.RFC3339Nano}
	logrus.StandardLogger().SetFormatter(jsonFormatter)

	x := XXX{}

	logrus.WithFields(logrus.Fields{
		"a": "b",
		"c": x,
	}).Info("first")
}

This case is like when we want to log something, the fields contains a value which has its own function for marshaling, and in that marshal function, it logged again. It's like log in log.
From the test output, we can see aaa printed, and second will not be printed.

If we comment out line logging second, we can see both aaa and first in output

Internally, it is caused in the second time of calling log and it trying to acquire Logger.mu in Entry.log.

The lock is held by the first call, so here it will blocked.
Further more, it is caused by the change in write function

lock is moved from after format to before format. So when it's running the format function, logger is locked and that time when people want to log another content, it cannot get lock and do logging.
For a log lib, people may want to log anywhere they want. So such case is really a possible daily usage for people. We cannot stop people from call log function inside a log call. We cannot review every structure in log field to ensure it's marshaling function has no log call. So I think this worth be fixed.

relate to this PR #1263


Implementing pstr

Implement string as input:
Ex:
query user(id:"idStr") {
idAlias : id,
nameAlias : name,
account {
id
}

Looks great, thanks for this!
Sorry for taking a while to merge, I've been on vacation at a friend's wedding.


SIP-40: Temporary freeze/unfreeze objects

A couple of thoughts:

I doubt it’s possible to implement “unfreeze” operation due to the inherent races between the update transaction and potential concurrent fast-path reading transactions.
This problem seems similar to the DenyListV2, for which @tnowacki has implemented a bespoke “PerEpochImmutable” solution: we could generalize the "PerEpochImmutable" objects for general-purpose usage in future (though no one is working on it right now), and that would provide a way for the Version and Config objects to be used in the fast path transaction with a caveat that their updates would be visible in the next epoch only.
Note that since Mysticeti rollout the latency benefits of by-passing consensus have been significantly reduced to 250-350 ms. The usage of owned objects in the transactions that go through consensus might turn out to be a decent long-term solution for as long as the shared objects are not congested via concurrent mutations.


use triangulation library

note expected build fail because triangulation library dependency not ready yet

want use this library any time soon, closing pull request


Comment about fixes inline in code.

Merging the PR, so I can do a new beta release.
The AppVeyor issue isn't a problem our end


Add message to v1 on startup

Have v1 Proxy output a message upon startup mentioning v2 Proxy is recommended for improved stability, observability, features (PSC, DNS, lazy refresh) and link to migration guide.

Fixed via #2301


I think there is something wrong with steps in softargmax

    heatmaps = heatmaps.reshape((heatmaps.shape[0], num_joints, z_dim, y_dim, x_dim))

    accu_x = heatmaps.sum(dim=2)
    accu_x = accu_x.sum(dim=2)
    accu_y = heatmaps.sum(dim=2)
    accu_y = accu_y.sum(dim=3)
    accu_z = heatmaps.sum(dim=3)
    accu_z = accu_z.sum(dim=3)

    accu_x = accu_x * torch.cuda.comm.broadcast(torch.arange(x_dim), devices=[accu_x.device.index])[0]
    accu_y = accu_y * torch.cuda.comm.broadcast(torch.arange(y_dim), devices=[accu_y.device.index])[0]
    accu_z = accu_z * torch.cuda.comm.broadcast(torch.arange(z_dim), devices=[accu_z.device.index])[0]

    accu_x = accu_x.sum(dim=2, keepdim=True)
    accu_y = accu_y.sum(dim=2, keepdim=True)
    accu_z = accu_z.sum(dim=2, keepdim=True)

    x = x / float(hm_width) - 0.5
    y = y / float(hm_height) - 0.5
    z = z / float(hm_depth) - 0.5

as your code showed below, the torch.arange(x_dim) is results in [0, 1, 2, 3, ..., x_xim-1]. The max num of  sum of  accu_x is x_dim-1 as well as accu_y and accu_z.
so I think it is invalid to do  x / float(hm_width) - 0.5,
you should change  x = x / float(hm_width) - 0.5 to  x = x / float(hm_width-1) - 0.5

@bucktoothsir  Could you be more specific?

@lck1201 check my updates

Yes, you are correct. We will fix the problem in the future. However, currently we generate ground truth heatmap in consistent way, see function
https://github.com/JimmySuen/integral-human-pose/blob/536a7b33cb87c15e1c9a3411a8cc0df87c4f9510/pytorch_projects/common_pytorch/loss/integral.py#L86
So it would not occur big problem.

@lck1201  Hi~ .  Is it better to modify these three lines of code as shown below?
accu_x = accu_x * torch.cuda.comm.broadcast(torch.arange(1, x_dim+1), devices=[accu_x.device.index])[0]
accu_y = accu_y * torch.cuda.comm.broadcast(torch.arange(1, y_dim+1), devices=[accu_y.device.index])[0]
accu_z = accu_z * torch.cuda.comm.broadcast(torch.arange(1, z_dim+1), devices=[accu_z.device.index])[0]

@fabro66  Hi, in essence, range shoule be [0, dim]. But I don't know whether performance will differ if changed to torch.arange(1, x_dim+1) or x = x / float(hm_width-1) - 0.5. Maybe you can give a try.


Connection refused on initial url

hello,
I am building a web app with flutter and I need to have a user log in. I am doing this by hitting a authentication endpoint on an azure AD so I can get a code and subsequently get a token. here it what the initial URL looks like. line breaks added for readability. Also anything in <> is info that I would rather keep private.
https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/authorize?
client_id=<client_id>
&redirect_uri=$redirectUrl
&response_type=code
&response_mode=query
&scope=https://graph.microsoft.com/user.read
&code_challenge=<code_challenge>
&code_challenge_method=<code_challenge_method>
obviously this isn't of much help to anyone but i just wanted to give a sense of the structed or the URL. but if you would like to do you own test you can just use the link below which has the same result.
https://login.microsoftonline.com/
my webapp is hosted on firebase but also works on local host. however neither firebase or an azure ad are necessary to to reproduce the bug as you would just need a microsoft account and can use  https://login.microsoftonline.com/ as the URL in WebViewX and make sure the flutter project has web.
Any clue as to how to get this working? any help would be greatly appreciated.
as for the set up of me WebViewx refer to code below
`@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("o365 login"),
actions: [
Padding(
padding: EdgeInsets.only(right: 20),
child: GestureDetector(
child: Icon(Icons.home),
onTap: () => _setUrl(), //I also has a method setup to set the same url as above to see if it was the initial URL causing the problem
),
)
],
  ),
  //Builder is wrapped around the webview to allow SnackBar to access the build context of the scaffold.
  // Without this the context would be from AuthLogin which does not contain a scaffold.
  body: Builder(builder: (context) =>
      WebViewX(
        key: ValueKey('webviewx'),
        initialContent: _initialUrl_noredirect,
        initialSourceType: SourceType.URL_BYPASS,
        onWebViewCreated: (controller) => webviewController = controller,
        onPageStarted: (url) => print('A new page has started loading...\n'),
        // onPageFinished: _getAuthCode,
        javascriptMode: JavascriptMode.unrestricted,
        webSpecificParams: WebSpecificParams(additionalSandboxOptions: ['allow-top-navigation', 'allow-top-navigation-by-user-activation', 'allow-downloads',
          'allow-popups',
          'allow-popups-to-escape-sandbox',
          'allow-presentation',
          'allow-same-origin',])
      )
  ),
);

}
`

Hi, it's hard to tell what went wrong and/or if what you're trying to do (auth) is going to work through a proxy (because that's what this package uses - CORS-avoiding proxies, which AFAIK don't keep cookies when used).
Also please note that altough the web version of this package works for some use cases, it doesn't (and should NOT) be used for security-related things, like auth.

Hi, please check this out https://github.com/adrianflutur/webviewx/issues/27
Here I explain the limitations of this package, and what are you trying to do seems like one of them.
Also, there's a new version available with multiple (breaking) changes available here: #26. Maybe you can use the new features to work-around your issue.
Closing this for now, please open a new issue if you encounter anything else.


how to clean cache only when data changes

hi, i have two projects, front and admin, front to C and admin to B. front C use cache fully, but data in B
often changes , so only want to clean cache where data changes in B, and query request in B do't use cache.skip the package, i don't know how to resolve it . please hope your reply. thanks.

thanks for your reply
yes i have 2 projects, but all of them use caching.2 projects share cached data.one can use caching data and update caching data.the another one hope only updating caching data, so that all data in cache changes.
hope your answer.

@guangdao428 Sorry, that scenario is not supported. The cache can only be updated from the same project.