Add bower support

https://github.com/googlemaps/js-info-bubble/pull/19

@smohadjer bower.json was added as part of https://github.com/googlemaps/js-info-bubble/pull/16 - but google still needs to tag the branch master + version for the package to be able to be registered with (and therefore be installed via) bower.
There's a new pull request for google to fix this : https://github.com/googlemaps/js-info-bubble/pull/20 - although tags can't be added via pull request - so it's technically more a minor bug fix + comment.
For info:
If you look at https://github.com/googlemaps/js-info-bubble/releases you'll see there are no releases or tags yet for this package - the "version": "0.8" within bower.json is deprecated and not enough for bower to know which version is being installed.  Bower now relies on git tags instead of version in bower.json.
See https://github.com/bower/spec/blob/master/json.md#version

+1, this would be really convenient - it would be also great, if the bower.io registry http://bower.io/search/?q=js-info-bubble was the real thing and not the fork.

@Andreas-Schoenefeldt i'm assuming that @daniellmb is simply squatting on the bower.io registry name until google gets their act together and tags the master release...
@markmcd @brendankenny @broady any reason why someone at google hasn't tagged the branch master + version of js-info-bubble?

Seems @daniellmb dropped his repository. Now there is no way to use js-info-bubble via bower

I'm very keen to install the lib via bower too

Iactualy managed to use it via bower directly with referencing the git repository:
{
  [...]
  "dependencies": {
    "js-marker-clusterer": "https://github.com/googlemaps/js-marker-clusterer/archive/gh-pages.zip",
    "js-info-bubble": "https://github.com/googlemaps/js-info-bubble/archive/gh-pages.zip",
    [...]
  },
  "version": "0.3.1",
  "license": "MIT",
  "main": [
    "web/css/main.css",
    "web/js/main.min.js"
  ]
}

So it is possible to get this, this ticket might be good to be closed ;).

The above solution by @Andreas-Schoenefeldt stopped working right now. I've been working with js-info-bubble installed with bower for the last month without any issue and today started returning errors 500 when retrieving js-info-bubble.
Definitely I'll drop bower ASAP from all my projects.

Hi @elboletaire , I'm actualy not sure if my solution is realy the correct one, it might be that github has just changed the location of its code export pages.
can you try bower install git@github.com:googlemaps/js-info-bubble.git --save Alternatively you can also just create your own fork with a bower.json of this.
Best wishes
Andreas

As said, I'm not gonna use bower anymore... if I still use bower is just for old projects, but everytime we add a new package we do so with npm + gulp instead of bower.
So, thanks for your suggestion @Andreas-Schoenefeldt, but I'm not gonna give it a try.

I think all the bower tickets can be closed now - it is not working anymore and should be droped.


split prepare

What type of PR is this?

[ ] bug
[ ] feature
[ ] enhancement

What problem(s) does this PR solve?
Issue(s) number:
Description:
How do you solve it?
Special notes for your reviewer, ex. impact of this fix, design document, etc:

Maybe we could rollback changes on README.md? :D
cc @abby-cyber

Maybe we could rollback changes on README.md? :D
cc @abby-cyber

Oops, thank you for the tip.

Maybe we could rollback changes on README.md? :D
cc @abby-cyber

Oops, thank you for the tip.


pqiv: 2.10.3 -> 2.10.4

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/pqiv/versions.
These checks were done:

built on NixOS
ran ‘/nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4/bin/pqiv -h’ got 0 exit code
ran ‘/nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4/bin/pqiv --help’ got 0 exit code
ran ‘/nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4/bin/pqiv help’ got 0 exit code
found 2.10.4 with grep in /nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4
directory tree listing: https://gist.github.com/4743505ebdeb4ef63b3c2637f5d6879d

cc @ndowens for review

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: pqiv
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on x86_64-linux (full log)
Attempted: pqiv
Partial log (click to expand)
glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4
shrinking /nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4/bin/pqiv
gzipping man pages under /nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4/share/man/
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4/bin
patching script interpreter paths in /nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4
checking for references to /build in /nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4...
/nix/store/80y2wx9ga0c647w0m0nhkx2hgfhnwpv5-pqiv-2.10.4

Success on aarch64-linux (full log)
Attempted: pqiv
Partial log (click to expand)
glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/zvc94v7kq1vkcinkh0ip8rly0ssw616d-pqiv-2.10.4
shrinking /nix/store/zvc94v7kq1vkcinkh0ip8rly0ssw616d-pqiv-2.10.4/bin/pqiv
gzipping man pages under /nix/store/zvc94v7kq1vkcinkh0ip8rly0ssw616d-pqiv-2.10.4/share/man/
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/zvc94v7kq1vkcinkh0ip8rly0ssw616d-pqiv-2.10.4/bin
patching script interpreter paths in /nix/store/zvc94v7kq1vkcinkh0ip8rly0ssw616d-pqiv-2.10.4
checking for references to /build in /nix/store/zvc94v7kq1vkcinkh0ip8rly0ssw616d-pqiv-2.10.4...
/nix/store/zvc94v7kq1vkcinkh0ip8rly0ssw616d-pqiv-2.10.4


SQLVisitorFactory should recognize FOR UPDATE from normal SELECT SQL

[ ] I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description
SQLVisitorFactory should recognize FOR UPDATE from normal SELECT SQL.
It's WRONG that it just take any SELECT sql in transaction context as SELECT FOR UPDATE.
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
Just paste your stack trace here!

Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)

xxx
xxx
xxx

Ⅴ. Anything else we need to know?
Ⅵ. Environment:

JDK version :
OS :
Others:

please close this issue as the related problem has been fixed.


Had trouble using own box_algorithm due to resizing

made resizing optional
added requirements.txt
linting & naming conventions

Thanks for the contribution. I'll build this and push it to pypi tonight.


blankline_buftype_exclude does not work

Hey, I have encountered the same issue trying to use neovim as manpager. Here is a minimal init.vim:
call plug#begin(stdpath('data').'/vim-plug')
Plug 'lukas-reineke/indent-blankline.nvim'
let g:indent_blankline_buftype_exclude = ['nofile']
let g:indent_blankline_filetype_exclude = ['man']
call plug#end()

Write that to min.vim and do MANPAGER="nvim -u min.vim -c 'set ft=man' -" man ls.
The output is something like:

and after doing :IndentBlanklineDisable the blue lines dissapear:

Interestingly, the lines do not continue far beyond the "original" buffer section:

and also doing :IndentBlanklineToggle actually enables them to continue:

which makes me think the initial lines are just some visual artifact, but neither :IndentBlanklineRefresh or :redraw! makes them go away.
Notice that the man buffer has both buftype=nofile and ft=man, so neither of the exclusion options work correctly in this case.
Originally posted by @piotr-machura in https://github.com/lukas-reineke/indent-blankline.nvim/issues/113#issuecomment-903013217

I put this into a new issue.
I probably broke this when I fixed lazy loading. I made a PR here #176
Can you check if that works @piotr-machura

Yep, both g:indent_blankline_buftype_exclude and g:indent_blankline_filetype_exclude work correctly now, both in the minimal example above and my full config. Thank you so, so much.


When opening gui, first open prompt should be changed

Current behavior:
First run = only gives option to create new project
Subsequent runs = open project or create new project
If someone has already created a project or copied one from somewhere else, they should be able to open it even if it's first run, and maybe not in project_dir. Should always prompt for open and/or create new project.

Resolved by #73


Constraints inside list, map and union is not checked

When we generate code for .NET and Java, it does not generate code to check for constraints inside list, map and union (Only .NET for union). Because of this, this PR is failing. Example of Failure:
SimpleConstraintsImplTest.TestConstraints: PASSED
WrappedSimpleConstraintsTest.TestConstraints: FAILED
        test/WrappedSimpleConstraintsTest.dfy(389,4): expectation violation
[Program halted] <stdin>(1,0): Test failures occurred: see above.

https://github.com/smithy-lang/smithy-dafny/pull/485 is an example of tests that need to pass for this to work

Note that the implementation for Rust (#582) will also be affected.


Enhancement: Allow compact one-line representation of some fields

In some cases, the author may know for sure that the structure of a field will be compact enough to be representable as a one-liner:
name: My geometries
bounds: [ -10, -23, 15, 22 ]
tags: [tag1, tag2]

The bounds field is known to always have four numbers, so it would be good to force serde to NOT serialize it like this:
name: My geometries
bounds:
    - -10
    - -23
    - 15
    - 22
tags:
    - tag1
    - tag2

I do not plan to support this in this crate, but someone else should feel free to pursue creating a more fully-featured YAML library that could serve this use case.


Allow the user to overwrite the default git committer name and email

The action is getting the committer info (name and email) from git configuration (commit command argument/env-var, local config, global config, system config). The same way Git does.
For testing, we are using a specific committer (A committer <committer@example.com>). We do it using options when we build the SimpleGit instance:
export async function newSimpleGitWithCommitterIdentity(
  gitRepoDir: GitRepoDir
): Promise<SimpleGit> {
  const options: Partial<SimpleGitOptions> = {
    baseDir: gitRepoDir.getDirPath(),
    config: [
      `user.name=${testConfiguration().git.user.name}`,
      `user.email=${testConfiguration().git.user.email}`
    ]
  }
  const git = simpleGit(options)
  return git
}

All you add to the config attribute will be passed to git commit command withe the option -c.
Should we allow the action user to overwrite the commit with a new input @yeraydavidrodriguez @da2ce7 ?
git_committer_name
git_committer_email

Right now it's possible to overwrite it by using environment variables which is the other what Git allows you to do it:
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL

We are passing all process env vars to the child git process.
I think we can implement it. It's a very easy feature and it could be helpful in some cases.

Hello Jose,
I trust that if you think that it is an easy and good feature, then go ahead and implement it. 👍
In our case, we only care about the author, as we rewrite the commiter automatically when we sign the commits from the main workflows.
😊
Cam.
Von meinem iPhone gesendet

Am 21/2/2022 um 13:18 schrieb Jose Celano @.***>:

The action is getting the committer info (name and email) from git configuration (commit command argument/env-var, local config, global config, system config). The same way Git does.
For testing, we are using a specific committer (A committer @.***>). We do it using options when we build the SimpleGit instance:
export async function newSimpleGitWithCommitterIdentity(
gitRepoDir: GitRepoDir
): Promise {
const options: Partial = {
baseDir: gitRepoDir.getDirPath(),
config: [
user.name=${testConfiguration().git.user.name},
user.email=${testConfiguration().git.user.email}
]
}
const git = simpleGit(options)
return git
}
All you add to the config attribute will be passed to git commit command withe the option -c.
Should we allow the action user to overwrite the commit with a new input @yeraydavidrodriguez @da2ce7 ?
git_committer_name
git_committer_email
Right now it's possible to overwrite it by using environment variables which is the other what Git allows you to do it:
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL
We are passing all process env vars to the child git process.
I think we can implement it. It's a very easy feature and it could be helpful in some cases.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.

I've just moved it to milestone 1.1.0 int the roadmap. Even if it's simple maybe it is not useful. I can't think now a workflow example where you might need to use a different committer in the same workflow. We can wait until we or someone else has the need.
I also tagged it as good-first-issue. It could be a good opportunity to collaborate with the repo.


What are steps to update component?

Hi,
I'm following your document and I'm able to run these commands in order:
1 ./gantryd.py setconfig "my project name" "configuration file"
2 ./gantryd.py update "my project name" -c "my component name"
3 ./gantryd.py run "my project name" -c "my component name"
and it seems Gantryd starts monitoring the container because there are log like:
Checking HTTP address in container 8bc73c619485: http://<IP_ADDRESS>:80/health (/health is my health check path)
I wonder if I have an update on the image, what would I need to run? What I tried is
1 Open another termnal, because the current one is being used by previous Gantryd
2 On the new terminal, I can call ./gantryd.py update "my project name" -c "my component name"
What I got is new image id, and I wait for a while. What I'm expecting is on the first terminal, Gantryd should be able to detect an update an try to start it up. Unfortunately, there is nothing change, it's still monitoring the same container.
So, I need to run this command on my second terminal
1 ./gantryd.py run "my project name" -c "my component name"
And now, the new image is started and replaced the old one. However, I was expecting that the Gantryd in my first terminal would be stopped (since the container is stopped), but what I got is the Gantryd in my first terminal change to monitor the new container instead, and Gantryd on my second terminal is also monitoring the same container. Now, I got two Gantryd process doing the same thing.
My questions are:
1 Should I have only one Gantryd run at a time?
2 What did I do wrong which caused two Gantryd process doing the same thing?

update should indeed cause the first container to be changed, but only if the actually image in your registry has been updated. Otherwise, the component is treated as having not been updated.


Excel format download data

Summary
Please provide the feature to download the data in excel format
One paragraph explanation of the feature.
Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?
Describe alternatives you've considered
A clear and concise description of the alternative solutions you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Hi, thanks for your submission. Since you can already download the data in csv format, I dont get why you need a xlsx format ? Can you tell me more pls ?


binance.us

please help get client from binance.us, I want to get orders, and make orders

Its not merged, but you can use this version of python-binance:
https://github.com/sammchardy/python-binance/pull/470
For websocket only you can use also this: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api


[cli] docker events 'hangs' / stops working

Hello. Sorry to have to report this!
Calling the docker events command --> while read … loop. Via a FIFO (unix socket). It is meant to prints to stdout a new line of infos, whenever a container starts.
My code is here:
https://github.com/dreamcat4/docker-images/blob/master/pipework/entrypoint.sh#L368
To begin with, it works as it should. If I start 1 container, the while loop is triggered 1 time. Soon after that, I may restart the container (to generate a 2nd start event). And docker events will print out another line, triggering my while read … loop correctly once again. That is great. Well done.
However if I go away and leave the docker containers alone for "a while" (such overnight, or just 1 hour, or perhaps less <  1hour). Then I come back and start a container. There is nothing received in the unix pipe. And it seems almost like docker events is hung, or not flush anymore it's stdout. Or else not printed a newline \n for to trigger the next read line.
If I kill $PID of docker events command's process id.  Then sometimes doing that will prompt the hung docker events process to finally spit out whatever missing line(s) e.g. like a flush. Presumably during it's cleanup, and then quit. Else sometimes it may not print anything and just dies / go away. Sorry that sounds very vague. But it is difficult to understand why this inconsistent behaviour.
My main point is that I really need some help here. Because I am not sure how to progress from this point, and debug further the problem going forwards. It is an important bug for me to solve, one way or another (and without dropping the functionality!).
Is there any new tests I can make to catch it red-handed? What else can I do? Perhaps write some test example script (not my 'real' code), with a loop, to print out 'SUCCESS' / 'FAIL' record. And a constantly re-starting container in another loop? E.g. with some date / time elapsed recorded?
How else to get more infos about the bug? What about strace command on docker events? Or how about if we try to attach gdb and get a live stacktrace when it stops responding? What can be honed in on first of all?
$ docker info
Containers: 4
Images: 70
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 78
Execution Driver: native-0.2
Kernel Version: 3.16.0-33-generic
Operating System: Ubuntu 14.10
CPUs: 2
Total Memory: 3.792 GiB

Well I just caught it out - mere seconds after starting it up. With strace and a pipe | to tail -f.
None of my own script code / while loops or anything like that. It played up right from the bat. I really hope that this strace output may reveal something to us and give any clues regarding the nature of this problem?
Below is a relevant condensed section, which is at the very end of the strace output.
PLUS a simple <----- annotation lines.
Full GIst: https://gist.github.com/dreamcat4/5081dc03919066c68164
getsockname(3, {sa_family=AF_LOCAL, NULL}, [2]) = 0
getpeername(3, {sa_family=AF_LOCAL, sun_path="/var/run/docker.sock"}, [23]) = 0
epoll_wait(4, {{EPOLLOUT, {u32=3727392840, u64=140002481373256}}}, 128, 0) = 1
read(3, 0xc208091000, 4096)             = -1 EAGAIN (Resource temporarily unavailable)
write(3, "GET /v1.17/events HTTP/1.1\r\nHost"..., 91) = 91
epoll_wait(4, {{EPOLLOUT, {u32=3727392840, u64=140002481373256}}}, 128, 0) = 1
epoll_wait(4, {{EPOLLIN|EPOLLOUT, {u32=3727392840, u64=140002481373256}}}, 128, -1) = 1
read(3, "HTTP/1.1 200 OK\r\nContent-Type: a"..., 4096) = 116
read(3, 0xc208091000, 4096)             = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(4, {}, 128, 0)               = 0
epoll_wait(4, {{EPOLLIN|EPOLLOUT, {u32=3727392840, u64=140002481373256}}}, 128, -1) = 1
futex(0x12eb440, FUTEX_WAKE, 1)         = 1
read(3, "90\r\n{\"status\":\"start\",\"id\":\"9aef"..., 4096) = 150
write(1, "2015-04-02T11:20:34.000000000+01"..., 36) = 36
write(1, "9aefebf40bddefeb00ea3f828f39a5d7"..., 66) = 66
write(1, "(from dreamcat4/tvheadend:latest"..., 34) = 34
write(1, "start\n", 6)                  = 6
read(3, 0xc208091000, 4096)             = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(4, {}, 128, 0)               = 0
epoll_wait(4,
{{EPOLLIN|EPOLLOUT, {u32=3727392840, u64=140002481373256}}}, 128, -1) = 1
futex(0x12eb440, FUTEX_WAKE, 1)         = 1
futex(0x12eb3c0, FUTEX_WAKE, 1)         = 1
read(3, "8e\r\n{\"status\":\"die\",\"id\":\"9aefeb"..., 4096) = 148
write(1, "2015-04-02T11:20:42.000000000+01"..., 36) = 36
futex(0x12ec138, FUTEX_WAIT, 0, NULL

<------- here i run multiple container start-stop. And no new output from docker events process
 is 'seems' hung.

<------- here i kill the `docker events` process with `kill $pid` (SIGTERM)
<------- it flushes all of the missed events during process exit
Process 28503 detached
 <detached ...>
2015-04-02T11:20:34.000000000+01:00 9aefebf40bddefeb00ea3f828f39a5d7aace2ff6d52a1a7ecde61c4f3f24befb: (from dreamcat4/tvheadend:latest) start
2015-04-02T11:20:42.000000000+01:00 9aefebf40bddefeb00ea3f828f39a5d7aace2ff6d52a1a7ecde61c4f3f24befb: (from dreamcat4/tvheadend:latest) die
2015-04-02T11:20:42.000000000+01:00 9aefebf40bddefeb00ea3f828f39a5d7aace2ff6d52a1a7ecde61c4f3f24befb: (from dreamcat4/tvheadend:latest) stop
2015-04-02T11:20:55.000000000+01:00 9aefebf40bddefeb00ea3f828f39a5d7aace2ff6d52a1a7ecde61c4f3f24befb: (from dreamcat4/tvheadend:latest) start
2015-04-02T11:21:15.000000000+01:00 9aefebf40bddefeb00ea3f828f39a5d7aace2ff6d52a1a7ecde61c4f3f24befb: (from dreamcat4/tvheadend:latest) die
2015-04-02T11:21:15.000000000+01:00 9aefebf40bddefeb00ea3f828f39a5d7aace2ff6d52a1a7ecde61c4f3f24befb: (from dreamcat4/tvheadend:latest) stop
2015-04-02T11:21:42.000000000+01:00 9aefebf40bddefeb00ea3f828f39a5d7aace2ff6d52a1a7ecde61c4f3f24befb: (from dreamcat4/tvheadend:latest) start
id@emachines-e520:~/docker-images$
id@emachines-e520:~/docker-images$
id@emachines-e520:~/docker-images$
id@emachines-e520:~/docker-images$

@cpuguy83 If you are interested: This may be a duplicate of #11207 - where you needed for more info than 'doesn't work'. It was a different guy who raised the other bug report. But I suspect it could the same issue he had. Please see the strace log above ^^. And please request me any further testing you need if you cannot reproduce it. Many thanks.

FYI: Checked my docker version of 1.5.0 and it happens to be the same as the other guy a8a31ef.
 docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

It would be great to move over and test behaviour on 1.6.x also. I'm just a bit scared to, and also since we don't actually know what the problem is yet with docker events CLI command.

Hi @dreamcat4 ,
I used the following commands:
for i in {1..1025};do docker run --rm ubuntu:latest echo 'hello'>/dev/null;sleep 300;done
and used docker events in another terminal.

It is a slightly different docker version. We see only on git commit a8a31ef to our current testing.
It is slightly newer go version (ours was 1.4.1).
It is slightly newer docker api version (ours was 1.17.

If you have any further opportunity, then please re-run your success case test again, but this time with strace cmd in front of it. and pipe to tail -f too. e.g. like this:
strace docker events | tail -f

Many thanks.
@Mashimiao  I will eventually upgrade myself, to re-test. However I was waiting until 1.6.0 comes released. But now I would like to re-test with your version. How is your 1.5.0 dev version currently available? In docker APT repository?

I just clone docker's source code, then build and install by myself.
I will retest with strace docker events | tail -f

@Mashimiao Thanks. I can't be bothered to recompile myself, but will jump further forwards pas that one, and upgrade to 1.6.0-RC5 soon-ish. As that is available in APT testing repo.

Hello again!
Sorry to say: but I upgraded my docker and re-tested. It reproduced again this same exact issue on latest official docker-1.6.0-RC5. Problem appeared immediately, when running like this: strace docker events | tail -f. The strace output looks to be the same:
https://gist.github.com/dreamcat4/537877f7b5a088797b4f
Bug did not happen with just docker events cmd only (e.g. in interactive terminal). You must be sending the output through a UNIX pipe | to be received by some other command.
@Mashimiao You may not need to sleep of such long times to see this bug. Just start-stop your container a few times manually. While in a 2nd window listening with docker events to PIPE to | tail -f.
Please also provide your docker info. Many thanks.
root@emachines-e520:~# docker info
Containers: 7
Images: 170
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 184
Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 3.16.0-33-generic
Operating System: Ubuntu 14.10
CPUs: 2
Total Memory: 3.792 GiB
Name: emachines-e520
ID: NG2B:QLY4:W2SH:6FQF:FYGU:TVLX:3IQL:CQ4S:N5DL:CTND:52ZD:GCDH

As previously. We have epoll_wait it hangs there. Some thread blocking or something like that. Presumably Go has epoll wrapped in it's own API library.
read(3, 0xc2080cd000, 4096) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(4, {}, 128, 0) = 0
futex(0x134e1b8, FUTEX_WAIT, 0, NULL

<--------- here are multiple container start-stop. No new output from docker events process. It seems 'hung'.

<--------- here i keill the `docker events` process with `kill $pid` (SIGTERM)
<--------- it flushed some or all of the missed events during it's process cleanup handler) = 0
epoll_wait(4, {}, 128, 0) = 0
futex(0x134d480, FUTEX_WAKE, 1) = 1
epoll_wait(4, {}, 128, 0) = 0
futex(0x134e1b8, FUTEX_WAIT, 0, NULLProcess 5197 detached
<detached ...>

I am guessing in the docker source code it is at here:
https://github.com/docker/docker/blob/v1.6.0-rc5/api/client/commands.go#L1877
Sorry I don't understand that code where it goes into the function cli.stream. It is under the surface. Probably relying upon whatever standard GOlang I/O libraries to achieve that.
In addition, when I add a unix pipe on command line (to the end of that chain). Then somehow we end up in trouble and something breaks. As per the strace output. Where the futex(0x134e1b8, FUTEX_WAIT, 0, NULL  . Does not finish printing that strace message.
I guess this is the relevant part of (new) strace output:
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/docker.sock"}, 23) = 0
epoll_create1(EPOLL_CLOEXEC) = 4
epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=1040633704, u64=140442176245608}}) = 0
getsockname(3, {sa_family=AF_LOCAL, NULL}, [2]) = 0
getpeername(3, {sa_family=AF_LOCAL, sun_path="/var/run/docker.sock"}, [23]) = 0
read(3, 0xc2080cd000, 4096) = -1 EAGAIN (Resource temporarily unavailable)
write(3, "GET /v1.18/events HTTP/1.1\r\nHost"..., 95) = 95
epoll_wait(4, {{EPOLLIN|EPOLLOUT, {u32=1040633704, u64=140442176245608}}}, 128, 0) = 1
read(3, "HTTP/1.1 200 OK\r\nContent-Type: a"..., 4096) = 116
read(3, 0xc2080cd000, 4096) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(4, {}, 128, 0) = 0
epoll_wait(4, {{EPOLLIN|EPOLLOUT, {u32=1040633704, u64=140442176245608}}}, 128, -1) = 1
futex(0x134d480, FUTEX_WAKE, 1) = 1
read(3, "96\r\n{\"status\":\"start\",\"id\":\"fbc9"..., 4096) = 156
write(1, "2015-04-09T11:12:07.000000000+01"..., 36) = 36
write(1, "fbc922fbb30bb7c8eaf84cb87daec1a8"..., 66) = 66
write(1, "(from dreamcat4/tvheadend.debug:"..., 40) = 40
write(1, "start\n", 6) = 6
futex(0x134d480, FUTEX_WAKE, 1) = 1
futex(0x134d400, FUTEX_WAKE, 1) = 1
read(3, 0xc2080cd000, 4096) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(4, {}, 128, 0) = 0
futex(0x134e1b8, FUTEX_WAIT, 0, NULL

@vieux @shin- If you can please tell us where this line goes to?
if err := cli.stream("GET", "/events?"+v.Encode(), nil, cli.out, nil); err != nil

https://github.com/docker/docker/blob/v1.6.0-rc5/api/client/commands.go#L1877

I can reproduce same behavior with tail -f logifle | tail -f. I think this is how tail -f working.

It's not just the tail -f command. I write the output to a unix socket with mkfifo file.sock, then docker events > file.sock. And it still gets the same bug -
https://github.com/dreamcat4/docker-images/blob/master/pipework/entrypoint.sh#L368

I still assume that the buffering is being left to some go IO library underneath, sorry I cannot follow to where in docker's code.
Perhaps an IO reader / writer object may not be flushed properly for some reason. The eventing for outputting (IO writer) may occur in same thread that is being used to gobble (IO read) the input from docker daemon response. Or might the IO object require a different configuration (different options or flags) for non-interactive (no-tty) situation. A 3rd possibility may be some genuine error in the go library underneath. Or error in the docker handler object which wraps around these IO calls. There is nothing really to see directly in the foremost cli.go / events.go file.
We need to see deeper in docker source code. Where is it happening? Please help if you can.

@dreamcat4 client-side is using cli.streamBody where it just doing io.Copy from io.ReadCloser which is basically response body to cli.out, which is os.Stdout. On daemon side it uses ResponseWriter wrapped in utils.NewFlusher and json.NewEncoder. Because of utils.NewFlusher I think that from daemon side all flushed okay.
Flush problems can be with os.Stdout, because it is basically *os.File.

@dreamcat4 Also you need to read other side of pipe to write to pipe. It works for me.

I think that from daemon side all flushed okay.

Yes I agree.  Because then the missing messsages appear.

Flush problems can be with os.Stdout, because it is basically *os.File.

@LKD4

If it works for you, please provide an example here so I can try to reproduce that.

Please provide source code references on client side? E.g. where the cli.streambody, and io.ReadCloser get invoked?

@dreamcat4 cli.streamBody is in api/client/utils.go. You should get go-to-definition plugin for go - it'll simplify your life a lot.
I took reader example from http://www.linuxjournal.com/content/using-named-pipes-fifos-bash
And in other terminal run docker events > /tmp/testpipe

Ok. So if way you called read was like this:
while true
do
    if read line <$pipe; then
        if [[ "$line" == 'quit' ]]; then
            break
        fi
        echo $line
    fi
done

Wheras the way I call read is like this:
    while read event_line; do
        container_id="$(echo -e " $event_line" | grep -v "from $_pipework_image_name" | tr -s ' ' | cut -d ' ' -f3)"
        [ "$container_id" ] && _process_container ${container_id%:};
    done < $_docker_events_fifo &

https://github.com/dreamcat4/docker-images/blob/master/pipework/entrypoint.sh#L368
Then you would have me do this instead:
while true; do
    if read event_line < $_docker_events_fifo; then
        container_id="$(echo -e " $event_line" | grep -v "from $_pipework_image_name" | tr -s ' ' | cut -d ' ' -f3)"
        [ "$container_id" ] && _process_container ${container_id%:};
    fi
done &

I can try that tomorrow. Sorry, it is late here now.

Hi @dreamcat4 ,
I used docker events in terminal A, strace docker events in terminal B and strace docker events | tail -f in terminal C with the above testcase in parallel. But lessen sleep time to 3s.
Well, it's very interesting.
Command in terminal A and B will work very well.
But command in terminal C will hung after running for a while.
And then, in terminal D, I used docker event > /tmp/event_log &  and tail -f /tmp/event_log, run the testcase again.
Commands in terminal D also work very well.
So I think the problem occurs because you used pipeline directly to read output of strace docker events.

@LK4D4 This is weird. Not expected. Because today when I try either socket ways (mine or yours) in an interactive terminal - they seem to both work.
Nevertheless I have made your suggested change inside my docker image. Because that is a not interactive - it is shell script. So we shall see (after a while more) if it makes any difference.
@Mashimiao Thanks for the tip. About writing to log file. I am not actually using tail -f command in real code. That was just a simple test case to reproduce the problem. So you guys did not need some special shell script.
Sorry I cannot reproduce (my ways). But here was the test I ran:
    # Setup Test 1 - In window 1 - dreamcat's way
    _docker_events_fifo1="/tmp/docker-events.sock1"
    mkfifo --mode 0600 $_docker_events_fifo1

    _docker_events_fifo1="/tmp/docker-events.sock1"
    while read event_line; do
        echo $event_line
    done < $_docker_events_fifo1 &

    _docker_events_fifo1="/tmp/docker-events.sock1"
    docker events > $_docker_events_fifo1 &
    fg 1

    # Setup Test 2 - In Window 2 - by KD4D4 - correct way
    _docker_events_fifo2="/tmp/docker-events.sock2"
    mkfifo --mode 0600 $_docker_events_fifo2

    _docker_events_fifo2="/tmp/docker-events.sock2"
    while true; do
        if read event_line < $_docker_events_fifo2; then
            echo $event_line
        fi
    done &

    _docker_events_fifo2="/tmp/docker-events.sock2"
    docker events > $_docker_events_fifo2 &
    fg 1

    # Window 3 - Start / Stop some container a few times
    my_container=tvh.debug
    docker start $my_container
    docker stop  $my_container
    docker start $my_container
    docker stop  $my_container
    docker start $my_container
    docker stop  $my_container
    docker start $my_container
    docker stop  $my_container

@LK4D4 OK:
With that small change to the while read line. Put inside of my non-interactive shell script (the real code), I have tried catching the error again. The testing was not extremely thorough. However no issue to be seen so far. Continued to work for multiple start / stop events.
To my memory, the bug should have occurred after the first newline \n character. So I am happy for the time being with this resolution and push this change up to my official docker image on dockerhub. Many thanks. I just hope that it continues to work without coming back again.
Still docker events | tail -f does not work. However not concerned about that myself. Thanks again. Appreciate the help.

I think we can close this, because tail -f file | tail -f not working as well.
Feel free to open new issue if you find something interesting.

Nope. Didn't work. Problem still exists.

@Mashimiao Using your log file in /tmp - that works in conjunction with the polling method that was pointed to by @LK4D4's reference read example;
    _docker_events_log=/tmp/docker-events.log
    while true; do
        if read event_line < $_docker_events_log; then
            echo $event_line
        fi
    done &

However the constant polling is very bad and cannot be used. Docker daemon writes a log line for every loop, each call to read. That causes all available HDD space to be quickly consumed by the -json.log file in containers/ subfolder. And also the Daemon process ended up consuming approximately 2.6GB of ram.
So no choice but to be going back to relying upon stdio and EOF like this:
    while read event_line; do
        container_id="$(echo -e " $event_line" | grep -v "from $_pipework_image_name" | tr -s ' ' | cut -d ' ' -f3)"
        [ "$container_id" ] && _process_container ${container_id%:};
    done < $_docker_events_log &

And hey presto - back to being broken again. In same manner / symptoms as per the original bug report - no flush. Thus no new lines fed to read.
Problem not solved. In these circumstances all the fingers are pointing to the underlying Go libraries. Since not any Docker code to look at. But, @LK4D4 do you feel maybe it's justified to write a test case to reproduce this? Surely I can't be the only person experiencing this problem?
Actually I must say it is not at all unreasonable both your suggested solutions. Just except ^^ for the if polling eating all {hdd, ram} resources on the local machine.

OK. I think maybe I should try switching over to using the Docker API GET /events endpoint request instead of the CLI tool.
In fact, curl is being used in such a manner shown by this ticket:
https://github.com/docker/docker/issues/12216
I just need to figure out how to translate these "curl" API requests onto the docker.sock. Hmm, never done that before.

This seems better ways:
http://stackoverflow.com/a/11291927/287510
Just testing it now.

Problem found: Don't use fifo (unix socket) - that causes the hangs. Since I tried both using curl / netcat and the CLI command. Both broken with socket.
Polling problem has been solved for reading docker log.
_cleanup ()
{
    [ "$_while_read_pid" ]     && kill  $_while_read_pid
    [ "$_docker_events_pid" ]  && kill  $_docker_events_pid
    [ "$_tail_f_pid" ]         && kill  $_tail_f_pid
    [ "$_docker_events_log" ]  && rm -f $_docker_events_log
    exit 0
}
trap _cleanup TERM INT QUIT HUP

    # Create docker events log
    _docker_events_log="/tmp/docker-events.log"
    rm -f $_docker_events_log
    touch $_docker_events_log
    chmod 0600 $_docker_events_log

    # http://stackoverflow.com/questions/1652680/how-to-get-the-pid-of-a-process-that-is-piped-to-another-process-in-bash
    tail_f_pid_file="$(mktemp -u --suffix=.pid /var/run/tail_f.XXX)"
    ( tail -f $_docker_events_log & echo $! >&3 ) 3>$tail_f_pid_file | \
    while true
    do
        read event_line
        echo event_line=$event_line
    done &
    _while_read_pid=$!
    _tail_f_pid=$(cat $tail_f_pid_file) && rm -f $tail_f_pid_file

    # Start to listen for new container start events and write them to the events log
    docker events $_pe_opts --filter='event=start' --filter='event=die' \
        $_pipework_daemon_event_opts > $_docker_events_log &
    _docker_events_pid=$!

    # Wait until 'docker events' command is killed by 'trap _cleanup ...'
    wait $_docker_events_pid
    _cleanup;


Save post progress and prevent data loss on cancel

Work in progress
Preview URL: https://near.org/devgovgigs.petersalomonsen.near/widget/gigs-board.pages.Feed

On submit, the editor contents will be saved in Storage ( private for the widget )
Not confirming or cancelling the transaction in the wallet will restore the draft when returning to the page
If posting a reply or editing an existing post, the reply/edited post is expanded and put to edit mode
The presence of transactionHashes in the query string will indicate that the post was submitted successfully and the draft can be cleared from the local storage.

In order to make sure that the draft is cleared upon successful submission, a confirmation is introduced with a link back to the feed. Going back to the feed will ensure that transactionHashes is cleared from the query string. Ideally going back to the feed should happen immediately without an intermediate manual step, but there is no way to day in NEAR BOS to automatically redirect.

resolves #87

Hi @petersalomonsen – thanks for working on this. This feature unforutnately introduced a critical bug:
https://github.com/near/neardevhub-widgets/issues/199
Since you're out, I asked @near-akaia-root to work on it. But feel free to share any insights if you have any.
CC: @ailisp @frol

Check out my reply here: https://github.com/near/neardevhub-widgets/issues/199#issuecomment-1631768052


Select/Deselect All Collection filter button in Hoover

since there is UI work in progress for integrating the deduplication, could you also add the de/select all collections button as explained here @mgax  ?

Fixed in https://github.com/hoover/ui/commit/43b59e4004b1c58a8c6040a6f2418b805027a5c6


Listings

All methods in listing routes working

Two of the conflicts are resolved. Not sure what to do with package-lock.json.

@norbadboy I have resolved the conflicts and merged a PR to remove the coverage files. You can now see there are only 10 changes down from 40 which is much easier to manage in a PR :)


Remove set-as-default dialog from experiment notification

Task/Issue URL:
Description
Steps to test this PR
Feature 1

[ ]
[ ]

UI changes

Before
After

!(Upload before screenshot)
(Upload after screenshot)

Current dependencies on/for this PR:

develop

PR #3620   👈

This comment was auto-generated by Graphite.


Paramiko ssh config file support

Picked up from https://github.com/StackStorm/st2/pull/3032.
TODO

[ ] Figure out if Paramiko SSH config parser is case sensitive or not?
[ ] Does paramiko work with glob expressions for host in SSH config file?
[ ] More tests
Docs changes.

Current coverage is 20.70% (diff: 2.27%)

Merging #3058 into master will decrease coverage by 56.31%

@@             master      #3058   diff @@
==========================================
  Files           430        430
  Lines         22017      22051      +34
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits          16955       4564   -12391
- Misses         5062      17487   +12425
  Partials          0          0

Diff Coverage
File Path

0%
st2common/st2common/runners/paramiko_ssh.py

•••••••••• 100%
st2actions/st2actions/config.py

•••••••••• 100%
st2common/st2common/constants/runners.py

Powered by Codecov. Last update d2777e1...39dbb66


ESLint linebreak style

I feared this would happen,
when I say 'this' I mean ESLint wasting my time 🙃

Is the linebreak-style needed, I use Windows and have either had to use editor config 🐭  or not use ESLint 🙃 to get rid of this warning in the past.
I spent my morning trying to find a solution to an issue we didn't have before introducing ESLint.

This solves a lot of my issues:

I can't say that I don't like eslint.
However, I'm not happy to get the errors about undefined theme props or undefined graphql. :angry:
Ok, there are solutions, like importing graphql. But shall I do that if it works without import?
Also we switched from importing the ColorPalette in every component to the Theme. Now I eslint pushes me to declare the usage of the  theme in props of every component which I'd like to colour.
It's going crazy.  :angry:
I have one more issue where eslint doesn't like the indentation of a component but prettier finds it very legal. :thinking:
Besides that, eslint has lots of pros. :upside_down_face:
My conclusion:  I can continue using it, but accepting that it has a constant of errors in stuff we have got from styled-components and gatsby or prettier (like theme, graphql, indentation) .

I've edited my dotfiles [I'm Windows and Ubuntu user via Windows Subsystem Linux so two .giotconfig's] I was going to make a patch PR but after following this guide and branching all the line ending errors seem to have gone

Here is my final thought about eslint with gatsby :upside_down_face:
All this long story looks for me like the Yack Shaving :ox: :scissors:
And I'm not a good barber :upside_down_face:

Closing with reference to https://help.github.com/articles/dealing-with-line-endings/
From https://github.com/chingu-voyage3/grad.then/issues/118#issuecomment-353558527


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_0d7e7b21-4814-4165-8304-71f2bace4be4/pull/1 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-target_0d7e7b21-4814-4165-8304-71f2bace4be4.git

Docs Build status updates of commit 432d89f:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-GitBranchDeletedOrForcePushed] Cannot sync git repo to specified commit because branch Release_Archive_master_2021-08-05-03-09-45 has been deleted or has been force pushed

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Finally, really, fixed clipping

@BDisp  and @migueldeicaza - Please do a code review of all this...
I started over by first reading every line (and comment) in View and Window. I re-wrote all the documentation to ensure I actually understood the intent. I found that either originally, or over time, the code had gotten confused on Frame vs. Bounds and view-relative, screen-relative, and superview-relative coordinates. I fixed all of that, renaming internals to be consistent and updating all XML documentation.
One of the most confusing parts was the internal API RectToScreen which is used extensively across the project. This API was mis-named (and the comment was not clear) and it was obvious people didn't know whether it took view-relative or super-view-relative coordinates. Some usages were RectToScreen (Bounds) and others were RectToScreen (Frame). I decided to rename this API to ViewToScreen and change the parameter name from rect to region. I also updated the comment:
		/// <summary>
		/// Converts a region in view-relative coordinates to screen-relative coordinates.
		/// </summary>
		internal Rect ViewToScreen (Rect region)

I fixed all usages across the project (sorry; touches lots of stuff and might make merging hard) to correctly call this using superview-relative coordinates (Frame).  This fixed several visual bugs (and exposed others...see FileDialog).
Similarly, I noted that implementations of Redraw were confused on what coordinates were passed in the region parameter. I made it clear by changing the parameter name to bounds and fixing the docs:
		/// <summary>
		/// Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
		/// </summary>
		/// <param name="bounds">The view-relative region to redraw.</param>
		/// <remarks>
		/// <para>
		///    Views should set the color that they want to use on entry, as otherwise this will inherit
		///    the last color that was set globaly on the driver.
		/// </para>
		/// <para>
		///    Overrides of <see cref="Redraw"/> must ensure they do not set <c>Driver.Clip</c> to a clip region
		///    larger than the <c>region</c> parameter.
		/// </para>
		/// </remarks>
		public virtual void Redraw (Rect bounds)

Of course, almost every file in the project references Draw so that's why 21 files have changed with this PR.
I was confused by what the internal RelativeLayout API did. After studying the code I noted it SETS THE FRAME. So I renamed it to SetRelativeLayout and added better comments so future contributors aren't as confused as I was.
The key to fixing clipping was to utilize Rect.Intersects() to ensure the Driver.Clip that gets set is never larger than the previous clip. I did this in the SetClilp API to keep the code centralized:
/// <summary>
/// Sets the <see cref="ConsoleDriver"/>'s clip region to the current View's <see cref="Bounds"/>.
/// </summary>
/// <returns>The existing driver's clip region, which can be then re-eapplied by setting <c><see cref="Driver"/>.Clip</c> (<see cref="ConsoleDriver.Clip"/>).</returns>
/// <remarks>
/// <see cref="Bounds"/> is View-relative.
/// </remarks>
public Rect ClipToBounds ()
{
	return SetClip (Bounds);
}

/// <summary>
/// Sets the clip region to the specified view-relative region.
/// </summary>
/// <returns>The previous screen-relative clip region.</returns>
/// <param name="region">View-relative clip region.</param>
public Rect SetClip (Rect region)
{
	var previous = Driver.Clip;
	Driver.Clip = Rect.Intersect (previous, ViewToScreen (region));
	return previous;
}

Typical Redraw code now does this when calling Redraw on subviews (or contentViews):
// Clip the sub-view
var savedClip = ClipToBounds ();
view.Redraw (view.Bounds);
Driver.Clip = savedClip;

I expanded several Scenarios in UICatalog to help me test. And I added a clipping specific test scenario named Clipping.

This is magnificent. Congratulations on your beautiful work. However, there is something that causes Application.Top not to be designed well and that should always be the first to design and lastly the active top-level (see bellow). I already noticed that you solved the clipping problem in the ScrollView way, which I think was the best option. A strange behavior that I see in the ScrollView of the Scrolling.cs scenario is that it does not respect the continuous pressed click to scroll faster and in the Example project this works well.

Whoa!    Great patch!   Will review tonight!

I, personally, think it's silly that Window can be dragged. But this behavior is not due to clipping. It is due to the fact that Window is not calling NeedsDisplay on the windows it moves over as it's dragged.

A strange behavior that I see in the ScrollView of the Scrolling.cs scenario is that it does not respect the continuous pressed click to scroll faster and in the Example project this works well.

This has nothing to do with clipping either. I was able to change the Scrolling Scenario to reproduce the correct behavior by adding a AddTimeout based progress bar to it. See the PR I just submitted.

I, personally, think it's silly that Window can be dragged. But this behavior is not due to clipping. It is due to the fact that Window is not calling NeedsDisplay on the windows it moves over as it's dragged.

 In Windows when sometimes when I receive a modal message box I need to drag it to see some content underneath before closing it. We are not talking about fixed windows like on the web, you can't move them. When I worked in dragging I always tested on the console with at least three TopLevel. The active modal, a smaller windows and Application.Top. The incorrect color overlapping sometimes happened and I had to deal with the design sequence from the inside to the outside.

This has nothing to do with clipping either. I was able to change the Scrolling Scenario to reproduce the correct behavior by adding a AddTimeout based progress bar to it. See the PR I just submitted.

@tig this is really strange behavior because in Threadings.cs async / await is working very well by calling the public override void Post method (SendOrPostCallback d, object state) when it is already available for the Gui to manage the Task. Now the Task in MouseEvent ToDriverMouse (WindowsConsole.MouseEventRecord mouseEvent) is not triggering the above method. It only works with AddTimeout because it will perform everything that is pending (timers and idlehandlers). I don't know why the Post method is not called as in Threading.

Let us get this merged - Charlie, I am going to let you do the honors, given how large this patch is.
Longer version - I truly appreciate the work that went into this, the clearing up of the naming and conventions is clearly a problem that was going to keep biting us down the line as both time takes a toll on memory and new contributors bring controls to the project.    I love this patch.
Regarding @BDisp comments on repainting - initially when Gui.cs was brought up, I did not really do much work to "queue" the damaged region on the parent view, and this might be just a side-effect of moving a window not sending the right setNeedDisplay to the container.

Glad you like this. I've got a mondo PR coming that includes this one and the others; this will make merging easier and the history more clean.
Note, I already merged #590 into that mondo and it'll be a pain to back out. So i'd appreciate it if @migueldeicaza would look at #590. It's another fairly big set of changes.

I, personally, think it's silly that Window can be dragged. But this behavior is not due to clipping. It is due to the fact that Window is not calling NeedsDisplay on the windows it moves over as it's dragged.

@tig the issue is in Window.cs. You changed to Application.Top.Redraw (Bounds) but it must to be Application.Top.Redraw (Frame), otherwise it will only redraw from (0, 0, w, h) of the Toplevel.
				if (dragPosition.HasValue) {
					if (SuperView == null) {
						Application.Top.SetNeedsDisplay (Frame);
						Application.Top.Redraw (Frame);
					} else {
						SuperView.SetNeedsDisplay (Frame);
					}

I, personally, think it's silly that Window can be dragged. But this behavior is not due to clipping. It is due to the fact that Window is not calling NeedsDisplay on the windows it moves over as it's dragged.

@tig the issue is in Window.cs in the MouseEvent method. You changed to Application.Top.Redraw (Bounds) but it must to be Application.Top.Redraw (Frame), otherwise it will only redraw from (0, 0, w, h) of the Toplevel.
				if (dragPosition.HasValue) {
					if (SuperView == null) {
						Application.Top.SetNeedsDisplay (Frame);
						Application.Top.Redraw (Frame);
					} else {
						SuperView.SetNeedsDisplay (Frame);
					}

Good catch.
However, Redraw is defined to take view-relative coords, meaning the coords that are received will always be Rect(0,0, h, w).
As noted in above, people have confused Frame (SuperView-relative) and Bounds (View-Relative) throughout this project. This is why I renamed the parameter to DrawFrame to be DrawFrame(Rect **bounds**).
ALWAYS CALL Redraw with Bounds. Never Frame.
Based on you identifying this call chain, I found that the REAL cause of this dragging bug is in Toplevel.Redraw():
///<inheritdoc cref="Redraw"/>
public override void Redraw (Rect bounds)
{
	Application.CurrentView = this;

	if (IsCurrentTop || this == Application.Top) {
		if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
			Driver.SetAttribute (Colors.TopLevel.Normal);
			Clear (frame);
			Driver.SetAttribute (Colors.Base.Normal);
		}
		foreach (var view in Subviews) {
			if (view.Frame.IntersectsWith (bounds)) {
				view.SetNeedsLayout ();
				view.SetNeedsDisplay (view.Bounds);
			}
		}

		ClearNeedsDisplay ();
	}

	base.Redraw (base.Bounds);
}

Note View.Clear is defined as:
/// <summary>
///   Clears the specified region with the current color.
/// </summary>
/// <remarks>
/// </remarks>
/// <param name="regionScreen">The screen-relative region to clear.</param>
public void Clear (Rect regionScreen)
{
	var h = regionScreen.Height;
	var w = regionScreen.Width;
	for (int line = regionScreen.Y; line < regionScreen.Y + h; line++) {
		Driver.Move (regionScreen.X, line);
		for (int col = 0; col < w; col++)
			Driver.AddRune (' ');
	}
}

Clear takes screen-relative coords. Since in this call chain the View in question is THE Top level, it's Bounds are 0, 0, w, h. So Clear (bounds) should be Clear(Frame).
I'll fix this before I submit again.

@tig please see my comment here https://github.com/migueldeicaza/gui.cs/pull/601#discussion_r434685570

This was incorporated in #600. Closing.


Hide BackgroundImageMode when BackgroundImage not set

1. Why is this change necessary?
Instead of disabling backgroundImageMode, we should hide it when BackgroundImage is not set. Showing disabled and inherited options will only confuse users.
2. What does this change do, exactly?
Hide backgroundImageMode when BackgroundImage is not set.
3. Describe each step to reproduce the issue or behaviour.
4. Please link to the relevant issues (if any).
5. Checklist

[x] I have written tests and verified that they fail without my change
[x] I have squashed any insignificant commits
[x] I have written or adjusted the documentation according to my changes
[x] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfil them.

Hello,
thank you for creating this pull request.
I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/issues/NEXT-10400
Please use this issue to track the state of your pull request.

@tinect, i talked to our Design-Team and the disabling is the correct behaviour(we do not want to hide it)). What you could do to make it more clear would be renaming the field to e.g. "Background image mode" and adding an on hover tooltip saying that the field will be enabled when an background image is selected.

This PR was closed due to inactivity. If this change is still important to you, feel free to create a new pull request.
For more information about our contribution guidelines, see https://docs.shopware.com/en/shopware-platform-dev-en/contribution/contribution-guideline


Resolve preloading of multiple images

Thanks for this great library - I've found it very useful. One thing I thought might be great for my app would be to know when multiple images have been preloaded so I can then safely display the page content.
I can see imageLoader.preload() returns a Promise but it only accepts a single image or asset URL. Could this also accept an array of URLs or is there a better approach to detecting when multiple images have been loaded and ready to display?
Cheers

Have you tried executing all your imageLoader.preload() calls in parallel, and awaiting the result of all of them, using Promise.all()?
let p1 = imageLoader.preload(...);
let p2 = imageLoader.preload(...);
let p3 = imageLoader.preload(...);

await Promise.all([p1, p2, p3]);
// at this point all images are preloaded and ready to display

Note: I haven't tested this.

The approach above should work.


feat(grafana): default users role is Editor

@vquiby I read this blog post yesterday: https://chris.beams.io/posts/git-commit/#why-not-how
The author suggests that "a properly formed Git commit subject line should always be able to complete the following sentence: If applied, this commit will ". I think we should adopt this best practice to have homogeneity in our commits.
Hence, your commit subject should be: "feat(grafana): set default users role to Editor" or something like that.
This is just nitpicking though :-). Nice job otherwise.


oldPassword is not checked when changing passwords

... in ChangePassword.vue / auth module

Seems to need a backend implementation. I'm tempted to add a separate /api/auth/user/change-password, because the old_password field is not part to the user model.


Provide a way to decorate Thrift services via annotation

Thanks to @ta7uw, we can use decorator annotation to decorate gRPC services. #4041
It would be also very useful if we can use the annotation in Thrift services.

@AmosDoan might be interested in this issue. 😆

Let me leave some additional information for those interested.
The goal of this pull request is to add support for @Decorator annotation for thrift services.
Assume that we define a class called MyThriftClass in the following snippet.
We may add decorators like the following to MyThriftClass.
    @Decorator(ClassDecorator.class)
    private static class MyThriftClass implements HelloService.AsyncIface {

        @Override
        @Decorator(MethodDecorator.class)
        public void hello(String name, AsyncMethodCallback<String> resultHandler) throws TException {
            resultHandler.onComplete(name);
        }
    };

where the decorators may be defined as follows:
    private static class ClassDecorator implements DecoratingHttpServiceFunction {
        @Override
        public HttpResponse serve(HttpService delegate, ServiceRequestContext ctx, HttpRequest req)
                throws Exception {
            return delegate.serve(ctx, req);
        }
    }

    private static class MethodDecorator implements DecoratingHttpServiceFunction {
        @Override
        public HttpResponse serve(HttpService delegate, ServiceRequestContext ctx, HttpRequest req)
                throws Exception {
            return delegate.serve(ctx, req);
        }
    }

For a little more background:
Thrift was developed as a way to enable communication across different programming languages. Thrift also provides its own server, client implementation.
Armeria supports thrift by implementing its own server, client stack.
In detail, the following decorators are applied in order.
Armeria server -> DecoratingHttpService -> THttpService -> DecoratingRpcService -> ThriftCallService

We can know what class/method will be used at THttpService since the thrift request needs to be parsed to know this information.
For this reason, THttpService is probably the location where we want to

Check what decorators should be applied for a request.
Apply the decorators.
Call the downstream RpcService.


How are components pulled in?

I see this:
<script>
export default {
  name: 'ip-uploader',
  data: {
    ips: ''
  },
  methods: {
    upload: (ips) => {
      alert(ips)
    }
  }
}
</script>

but I am used to this:
Vue.component('symbols-table', {
    data: {
        symbols: []
    },
    created: function(){
        axios.get('symbols.json').then(response => this.symbols = response.data);
    }
});

For what I can see in the code, components are never registered like this. Can anyone explain me the flow?

Hi,
There are several ways to define a component in Vue.js, please check this: https://medium.com/js-dojo/7-ways-to-define-a-component-template-in-vuejs-c04e0c72900d.
We use single page components.


da.std and da.var handle complex values incorrectly

Contrary to what the documentation claims ( std, var ), complex values are not handled correctly by taking the absolute values in std and var, yielding a inconsistency with numpy:
np.random.seed(10)
npdat = np.random.random(5) + 1j*np.random.random(5)
dadat = da.from_array(npdat)
print(da.var(dadat).compute(), np.var(npdat))
print(da.std(dadat).compute(), np.std(npdat))

-0.11412793596866759 0.13328806992961623
nan 0.3650863869409762
C:\ProgramData\Anaconda3\lib\site-packages\numpy\core_methods.py:38: ComplexWarning: Casting complex values to real discards the imaginary part
return umr_sum(a, axis, dtype, out, keepdims, initial, where)
C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:90: ComplexWarning: Casting complex values to real discards the imaginary part
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
C:\ProgramData\Anaconda3\lib\site-packages\numpy\core_methods.py:38: ComplexWarning: Casting complex values to real discards the imaginary part
return umr_sum(a, axis, dtype, out, keepdims, initial, where)
C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:90: ComplexWarning: Casting complex values to real discards the imaginary part
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
C:\ProgramData\Anaconda3\lib\site-packages\dask\array\core.py:3923: RuntimeWarning: invalid value encountered in sqrt
result = function(*args, **kwargs)

These errors are not captured by the tests of reductions, as they only check for 32-bits float and int, see: https://github.com/dask/dask/blob/c3367b47c0d5ce4b68cab7f2f0ad33b03f592693/dask/array/tests/test_reductions.py#L157

Contrary to what the documentation claims ( std, var ), complex values are not handled correctly by taking the absolute values in std and var

Our docstrings are autogenerated from the numpy docstrings, small inconsistencies do occur (apologies). See #1815 for more info.
In this case this looks like a bug, the implementation of std and var should be adjusted accordingly. Would you be interested in making a PR?

@TAdeJong are you interested in working on this? If so, need any help getting started?

When I reported it I actually had a look, but got a bit lost in the very general moment calculation code, but that should be doable on second look. Higher order moments seem not necessarily well-defined for complex input. Should we add a case for variance and throw an exception/error otherwise?

Seems fine by me.
On Tue, Dec 17, 2019 at 3:16 AM Tobias de Jong<EMAIL_ADDRESS>wrote:

When I reported it I actually had a look, but got a bit lost in the very
general moment calculation code, but that should be doable on second look.
Higher order moments seem not necessarily well-defined for complex input.
Should we add a case for variance and throw an exception/error otherwise?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/5679?email_source=notifications&email_token=AAKAOIVBKGAKJL5M5P6U5JDQZCKIBA5CNFSM4JVXVJYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHBWMTI#issuecomment-566453837,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKAOIV63AU3IEXJ474DQODQZCKIBANCNFSM4JVXVJYA
.

This issue is still relevant.
Where would be a starting point to understand what's going?

The source code of da.std and dat.var. as mentioned above, those use some generalized moment calculation code, which should gain a special case for complex input and throw an error otherwise. Unfortunately, I had forgotten about this issue and I will not be able to spend time on it in any near future, so if anyone wants to pick it up, please feel free! (I would offer to help with questions but fear that it has been so long that I have not much to offer beyond this explanation)

I am also willing to help, but would require some guidance around dask codebase

Great move @wkrasnicki, I hope you're PR will swiftly go through !

@apatlpo doesn't look like it unfortunately. We've worked around this problem by simply creating a var gufunc using Numba and its guvectorize decorator. It's actually even more efficient, because our complex numbers are stored as two int16 numbers, so we don't waste memory on upcasting to complex128.


feat: add database parameter

We will add db parameter to http interface in next weekly build. This patch adds support for it. You can merge it next week.

Thank you! Just let me know if there are any other features needed to be supported.
By the way, I am glad to move this repo into @GreptimeTeam github organization now or after this plugin being more available

@DiamondMofeng Sorry for late response. Thank you for working on this plugin. For now, I suggest to keep this plugin independent and our developer will work with you to improve it.

@DiamondMofeng Sorry for late response. Thank you for working on this plugin. For now, I suggest to keep this plugin independent and our developer will work with you to improve it.

I got it


Fix broken migration on webhook

This will fix the bug #13907 which introduced in #13664.

make lgtm work


Numeric Data upload using custom mapping file

@moshe I'd like to write my own custom mapping file to upload numeric data with relevant fields for me to visualize in Kibana. Could you possibly show me an example of a mapping file that I'd have to reference with the --index-settings-file so that I can do the same?

hey @siddharthdivi,
Take a look at the attached minimal mappings I supplied, the type is typeNameHere and the name of the field is metric.
More info here
{
    "settings": {
        "mappings": {
            "typeNameHere": {
                "properties": {
                    "metric": {
                        "type": "float"
                    }
                }
            }
        }
    }
}

Please close the issue if issue is solved

Ref #39

@moshe the following is my mapping :

@moshe the following is my mapping :
{
"settings": {
"mappings": {
"incident": {
"properties": {
"FlightDate" : {"type" : "date"},
"Quarter" : {"type" : "int"},
"Year" : {"type" : "int"}
}
}
}
}
}
I save it in a file called 'index.json', and run the following command :
elasticsearch_loader --index-settings-file ./index.json --index incident --type incident csv 2017MergedandProcessed.csv
but I get the following error :
elasticsearch.exceptions.TransportError: TransportError(500, 'not_x_content_exception', 'Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes')
I understand that if I were to send the mapping via a CURL request I'd have to do the following, which works :
curl -XPUT  'localhost:9200/ml_project?pretty' -H 'Content-Type: application/json' -d '
{
"mappings": {
"ml_project": {
"properties": {
"FlightDate" : {"type" : "date"},
"Quarter" : {"type" : "integer"},
"Year" : {"type" : "integer"}
}
}
}
}'

@siddharthdivi can you please supply:

elasticsearch version (curl eshost:9200)
python version python -V
elasticsearch python version pip show elasticsearch
esl version pip show elasticsearch_loader

I suspect your elasticsearch client is old and not sending the Content-Type header, the commands above will let me better understand the issue

Output of ElasticSearch Version obtained by 'curl -XGET localhost:9200'* :

{
"name" : "5RfcR_1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "nrIJQuQySXCGtkVNTqyt-w",
"version" : {
"number" : "6.6.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "a9861f4",
"build_date" : "2019-01-24T11:27:09.439740Z",
"build_snapshot" : false,
"lucene_version" : "7.6.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
Python Version :
Python 3.6.8 :: Anaconda, Inc.
Output of 'pip show elastisearch' :
Name: elasticsearch
Version: 6.3.1
Summary: Python client for Elasticsearch
Home-page: https://github.com/elastic/elasticsearch-py
Author: Honza Král, Nick Lang
Author-email<EMAIL_ADDRESS><EMAIL_ADDRESS>License: Apache License, Version 2.0
Location: /opt/anaconda/lib/python3.6/site-packages
Requires: urllib3
Required-by: elasticsearch-loader
Output of 'pip show elasticsearch_loader' :
Name: elasticsearch-loader
Version: 0.2.19
Summary: A pythonic tool for batch loading data files (json, parquet, csv, tsv) into ElasticSearch
Home-page: https://github.com/Moshe/elasticsearch_loader
Author: Moshe Zada
Author-email: None
License: UNKNOWN
Location: /opt/anaconda/lib/python3.6/site-packages
Requires: elasticsearch, click, click-stream, click-conf
Required-by:

Found it!
{
    "settings": {
    },
    "mappings": {
        "incident": {
            "properties": {
                "FlightDate" : {"type" : "date"},
                "Quarter" : {"type" : "integer"},
                "Year" : {"type" : "integer"}
            }
        }
    }
}

In my previues comments the mapping section was inside the settings, while it should be outside of it.
elasticsearch_loader  --index-settings-file ./mappings.json --index incident --type incident csv 2017MergedandProcessed.csv works for me with same ESL, elasticsearch python and ES server.
@siddharthdivi can you check with the new settings json?

@moshe I've tried the same, but the issue still persists. But I'm able to send a CURL request which creates a mapping with the exact same index configurations. The problem is that I'm not able to read mappings from a custom json file, which leads to the above-mentioned error ('Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes')

@siddharthdivi I will try to take a closer look in the next days.
in the meanwhile, can you please provide the full stacktrace of the error? (the last 12~ lines of the output)

@moshe The below is the stack trace. Just to be clear, I'm able to create a mapping by explicitly sending a CURL request but not able to read a custom mapping from a json file.
PUT http://localhost:9200/incident [status:500 request:0.005s]
Traceback (most recent call last):
File "/opt/anaconda/bin/elasticsearch_loader", line 11, in
load_entry_point('elasticsearch-loader==0.2.19', 'console_scripts', 'elasticsearch_loader')()
File "/opt/anaconda/lib/python3.6/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/opt/anaconda/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/opt/anaconda/lib/python3.6/site-packages/click/core.py", line 1063, in invoke
Command.invoke(self, ctx)
File "/opt/anaconda/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/anaconda/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/opt/anaconda/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/anaconda/lib/python3.6/site-packages/elasticsearch_loader/init.py", line 102, in cli
ctx.obj['es_conn'].indices.create(index=opts['index'], body=opts['index_settings_file'].read())
File "/opt/anaconda/lib/python3.6/site-packages/elasticsearch/client/utils.py", line 76, in _wrapped
return func(*args, params=params, **kwargs)
File "/opt/anaconda/lib/python3.6/site-packages/elasticsearch/client/indices.py", line 88, in create
params=params, body=body)
File "/opt/anaconda/lib/python3.6/site-packages/elasticsearch/transport.py", line 318, in perform_request
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore,timeout=timeout)
File "/opt/anaconda/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py", line 186, in perform_request
self._raise_error(response.status, raw_data)
File "/opt/anaconda/lib/python3.6/site-packages/elasticsearch/connection/base.py", line 125, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.TransportError: TransportError(500, 'not_x_content_exception', 'Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes')

@siddharthdivi I suspect that there is an issue in the mapping file. I think that ES unable to parse it as json, I've added json load in the latest version (0.2.24) of ESL in order to check it. can you upgrade ESL and let me know if you get different error?

@moshe The fix works. Thank you!!


AvoidInlineConditionalsCheck

added AvoidInlineConditionalsCheck

Personally I like using inline conditionals but this is for the developers/teams who don’t

Hm, that's a strange name for it, I know this as "ternary". I guess it's consistent with the original checkstyle though.

Yes thought about it, but don't want to deviate too much... http://checkstyle.sourceforge.net/config_coding.html#AvoidInlineConditionals


ability to switch between staging and production facebook app id's

Right now, the production app id is in our info.plist. This is the id we want to ship with our app. In our cocoapods keys, I think we're using the staging app id. Ideally we should be able to switch between the two app ids at runtime, specifically when invoking the dev menu and switching between artsy's staging and production servers.
I think @ashfurrow's auth pod will solve this but i'm putting this issue here for good measure so we don't forget that this is an issue.

I'm going to take a wild guess and say this isn't relevant anymore but @mennenia can you confirm? If so can you close?

I don't think this an issue anymore.


fix: [DebugBar] scroll to top

Description
Fixed #8594
Checklist:

[x] Securely signed commits
[ ] Component(s) with PHPDoc blocks, only if necessary or adds value
[ ] Unit testing, with >80% coverage
[ ] User guide updated
[x] Conforms to style guide

Thanks, however, this does not fix issue across the debugbar. Only fixes the toggle icon. I have uploaded 2 files in #8594 which seem to fix it for me across all links in the debugbar. Please refer to #8594 to download a zip with the changed files.

@acpadhi Updated all button

Line Number : 31 - role="button" missing, so when debugbar is closed, cursor change not working when hover on toggle button.

@acpadhi

when debugbar is closed, cursor change not working when hover on toggle button.

What do you mean? What is the toggle button?

@acpadhi Can you record?

@kenjis
Bottom right corner in development mode in debugbar closed state.

MouseOver on that icon does not change as exepected, since role=button is missing for that anchor tag.

@ddevsr
Since you are working on the CSS/SCSS, please look into this as well :

In debugbar when someone clicks on the Views button to show the views higlighted in the page, the button in the toolbar should also have a darker background to highlight that the views button has been toggled to an ON state, just like how the other buttons in the debugbar behave. If this is confusing, please let me know and I will write back again to explain.

@acpadhi
https://github.com/codeigniter4/CodeIgniter4/assets/87955/678971b1-d264-438f-ac77-fbb7cf2999db

In debugbar when someone clicks on the Views button to show the views higlighted in the page, the button in the toolbar should also have a darker background to highlight that the views button has been toggled to an ON state, just like how the other buttons in the debugbar behave.

"Views" tab shows nothing, so isn't the behavior intentional?
At least, the behavior is the same in v4.0.1.
Clicked "Files":

and clicked "Views":

"Views" tab shows nothing, so isn't the behavior intentional?
At least, the behavior is the same in v4.0.1.

In my Opinion, it is kind of not directly imminent that that the view button is clicked, I understant that there is border highlithing on page view areas, but when working on a large pages, visually it can be distracting to see gaps in design and wondering if some css is causing it. A dark background in the button will immediately convey "Oh my debugbar view button is toggled, so I see the gaps" . This is not a pressing thing, just a suggestion to keep consistency, since afterall it is a  toggle, irrespective of whenther showing additional content or not.

@acpadhi Ah, I got what you say. You say it is better that when the "Views" is on, the "Views" is darker.
It would certainly be better that way.

Ah, I got what you say. You say it is better that when the "Views" is on, the "Views" is darker.
It would certainly be better that way.

Yes, that way this Views button will be conistent with other buttons on the visual aspect, and also make it exlicit that it is in ON state.

@acpadhi I agree with your opinion. But the current behavior is not a bug. So changing it will be an enhancement.
This PR seems good to me.

@acpadhi Ah, i see. If view button already click, marking is ACTIVE right?
@kenjis Next PR?

@ddevsr It is an enhancement, not a bug fix. Please send a new PR to 4.5 if you send.

The following error will be fixed by #8612.
 Error: Ignored error pattern #^Cannot unset offset string on array\<int, int\>\|null\.$# in path /home/runner/work/CodeIgniter4/CodeIgniter4/system/Test/Mock/MockCache.php was not matched in reported errors.
 ------ ----------------------------------------------------------------------------
  Line   system/Test/Mock/MockCache.php
 ------ ----------------------------------------------------------------------------
         Ignored error pattern #^Cannot unset offset string on array<int,
         int>\|null\.$# in path
         /home/runner/work/CodeIgniter4/CodeIgniter4/system/Test/Mock/MockCache.php
         was not matched in reported errors.
 ------ ----------------------------------------------------------------------------

https://github.com/codeigniter4/CodeIgniter4/actions/runs/8210351538/job/22457631537?pr=8595


Help wanted (for EAD algorithm)

I'm trying to use the Elastic-Net algorithm implemented in Cleverhans to generate adversarial samples in a classification task. The main problem is that i'm trying to use it in a way to obtain an higher confidence at classification time on a target class (different from the original one) but i'm not able to reach good results.
The system that i'm trying to fool is a DNN with a softmax output on 10 classes.
For instance:

Given a sample of class 3 i want to generate an adversarial sample of class 0.
Using the default hyperparameters implemented in the ElasticNetMethod of cleverhans i'm able to obtain a succesful attack, so the class assigned to the adversarial sample became the class 0, but the confidence is quite low(about 30%). This also happens trying different values for the hyperparameters.
My purpose is to obtain a quite higher confidence (at least 90%).
For other algorithm like "FGSM" or "MadryEtAl" i'm able to reach this purpose creating a loop in which the algorithm is applied until the sample is classified as the target class with a confidence greater than 90%, but i can't to apply this iteration on the EAD algorithm because at each step of the iteration it yields the adversarial sample generated at the first  step, and in the following iterations it remains unchanged. (I know that this may happens because the algorithm is different from the other two metioned, but i'm trying to find a solution to reach my purpose).

This is the code that i'm actually using to generate adversarial samples.
ead_params  = { 'binary_search_steps':9, 'max_iterations':100 , 'learning_rate':0.001, 'clip_min':0,'clip_max':1,'y_target':target}
adv_x = image
founded_adv = False
threshold = 0.9
wrap = KerasModelWrapper(model)
ead = ElasticNetMethod(wrap, sess=sess)

while (not founded_adv):

    adv_x = ead.generate_np(adv_x, **ead_params)
    prediction = model.predict(adv_x).tolist()
    pred_class = np.argmax(prediction[0])
    confidence = prediction[0][pred_class]

    if (pred_class == 0 and confidence >= threshold):
        founded_adv = True

The while loop may generate a sample until the target class is reached with a confidence greater than 90%. This code actually works with FGSM and Madry, but runs infinitely using EAD.
Library versions:
Tensorflow: 2.2.0
Keras: 2.4.3
Cleverhans: 2.0.0-451ccecad450067f99c333fc53592201
Anyone can help me ?
Thanks a lot.

I've founded a solution to this problem.
I hope that it can be useful for other peoples that faces my problem and maybe to update the EAD method.
I think that the main problem is that the EAD method doesn't allow to increase the output probability when the target class is the same class predicted by the model.
For instance :
-Supposing that our model classify an input image to the class "0" with a probability of 0.5 . If i want to generate the adversarial sample using the "0" as target class to increase the probability to the class "0", the EAD algorithm yield the same image, so it actually does not increase it (This can be useful if we face a rejection system, as in my case).
-With the following code, this became possible.
-Initial_predicted_class is the class predicted by the model on the benign sample ( "0" for our example ).
-In the parameters of the algorithm (ead_params) we don't insert the target class.
-Then we can obtain the perturbation given by the algorithm calculating pert = new_adv_x - adv_x  where "adv_x" is the original image (in the first step of the for loop), and new_adv_x is the perturbed sample generated by the algorithm.
-The previous operation is useful because the EAD original alghoritm calculate the perturbation to maximize the loss w.r.t the class  "0", but in our case we want to minimize it.
-So, we can calculate the new perturbed image as new_adv_x = adv_x - eps_hyp*pert (where the eps_hyp is an epsilon hyperparameter that i've introduced to reduce the perturbation), and than we normalize the new perturbed image.
-I've tested the code for a large number of images, and the the confidence always increase, so i think that can be a good solution for this purpose.
-Maybe the same effect can be obtained directly extending the algorithm in the library or maybe modifying the loss function.
Modified code:
prediction = model.predict(image)
initial_predicted_class = np.argmax(prediction[0])

ead_params   = {'beta':5e-3 , 'binary_search_steps':6, 'max_iterations':10 , 'learning_rate':3e-2, 'clip_min':0,'clip_max':1}
threshold = 0.96
adv_x = image
founded_adv = False
wrap = KerasModelWrapper(model)
ead = ElasticNetMethod(wrap, sess=sess)

while (not founded_adv):

    eps_hyp = 0.5
    new_adv_x = ead.generate_np(adv_x, **ead_params)
    pert = new_adv_x-adv_x
    new_adv_x = adv_x - eps_hyp*pert
    new_adv_x = (new_adv_x - np.min(new_adv_x)) / (np.max(new_adv_x) - np.min(new_adv_x))
    adv_x = new_adv_x
    prediction = model.predict(new_adv_x).tolist()
    pred_class = np.argmax(prediction[0])
    confidence = prediction[0][pred_class]
    print(pred_class)
    print(confidence)

    if (pred_class == initial_predicted_class and confidence >= threshold):
        founded_adv = True

I think that this modification can be also useful for the CarliniWagnerL2 algorithm since it is a special case of EAD for beta=0.
Hope that this can be helpful.
@carlini @ysharma1126  (Sorry for the tag, but i've seen that you're the authors of the algorithms).

Increase the 'confidence' parameter in EAD until you reach your desired threshold. Thanks @lorder95 for the suggestion, the 'confidence' parameter aims to achieve the same ends. By default, the attack's objective is to have the target logit be marginally larger than the rest, increasing the 'confidence' parameter increases the gap in logits required for success, thereby yielding higher-confidence adversarial examples. The above applies for C&W as well.

Thanks a lot @ysharma1126  for your answer.
I thought (mistakenly) that the confidence parameter was a value between 0 and 1, so i was not successful in my intent. Instead, increasing it by 1 at each step of the cycle I succeeded perfectly in the goal.
For anyone intrested in this problem the previous code can be modified in this way to works properly:
prediction = model.predict(image)
initial_predicted_class = np.argmax(prediction[0])
ead_params  = { 'binary_search_steps':9, 'max_iterations':100 , 'learning_rate':0.001,'confidence':1, 'clip_min':0,'clip_max':1,'y_target':target}
adv_x = image
founded_adv = False
threshold = 0.9
wrap = KerasModelWrapper(model)
ead = ElasticNetMethod(wrap, sess=sess)

while (not founded_adv):

    adv_x = ead.generate_np(adv_x, **ead_params)
    prediction = model.predict(adv_x).tolist()
    pred_class = np.argmax(prediction[0])
    confidence = prediction[0][pred_class]

    if (pred_class == initial_pred_class and confidence >= threshold):
        founded_adv = True
    else:
        ead_params['confidence'] += 1

Thanks again, problem solved !


Update README.md

Linked CODEOFCONDUCT.md to README.md
Issue: #1

Hello @lukeocodes, can you please review my recent update?


ElementProxy is missing in the docs

The ElementProxy class does have a doc string but is missing in the API documentation.
You can find just the sourcecode.
https://python-docx.readthedocs.io/en/latest/_modules/docx/shared.html?highlight=elementproxy

Hmm, yes, so it is. I assume I did that because it's subclassed by so many objects and its couple of methods should show through on them. What was interesting about it from your perspective? Like why did you want to know more about it? It's strictly a base class.
I'm happy to consider giving it a more prominent position, but it's not really intended to be used directly, so I expect that's the main reason I didn't include it directly. In fact I expect I had to explicitly exclude it.


Exception when filtering by non-existed tags

How to reproduce: site.com/en/tags/wrong-tag

fixed in gh-85


Adjust bar corner style

Should remove rounded corners from bars when displaying them.
Acceptance criteria: When visualising bars the style of the corners should be firm (90degree) edges.
Planning poker score: 2 (0-89 Fibonacci)

The corner styling has been changed based on the acceptance criteria.


I'm not sure if it's a replacement for Vetur, or..

Or kind of some "big brain" for that..
Please add some explanation and code demonstrations on README..

Thank you for your attention to this project! I didn't think too much about the positioning of this project, it was just created to solve vetur was too slow on my vue 3 project(and convenient added the features I needed). If vetur works well for you just keep using vetur :)

This is a worthy replacement to vetur on my part. The only thing I miss in volar is the html tag suggestions are not coming unless I initiate the tag with a < as prefix
e.g.
<span after typing this the suggestion comes.
span.classname this doesn't work.
I think the integration of emet should be rechecked!.
Another problem is in  template the$event param is throwing error.
<template>
<button @click="someMethod($event)" >YOLO</button>
</template>

The $event param throws not defined error. But in vetur this doesn't throw an error. Please have a look into that
again thank you @johnsoncodehk  for this amazing project.

@soulsam480 Thank you for your feedback and bug report! It has been updated to 0.14.9 :)

I have added some introduction to readme, but I didn't say how to choose because will like a competing product, this is not my purpose and I just create this tool to resolve my own problems.
Hope is answered you question. :)


route53_record fails to delete A record

Cookbook version
1.2.1
Chef-client version
12.13.37
Platform Details
Ubuntu 16.04 LTS, AWS OpsWorks
Scenario:
Error when deleting Route53 record.
Steps to Reproduce:
I'm trying to clean up some DNS via:
route53_record "deleting internal record" do
  name  instance['hostname'] + node['internal_dns']['domain_name']
  zone_id node['internal_dns']['private_zone_id']
  type  "A"
  action :delete
end

Expected Result:
The A record should be deleted.
Actual Result:
The DNS record is not removed and an error in the logs. Looks like an underlying API call is failing:
[2017-01-27T18:33:29+00:00] ERROR: Error with DELETErequest: {:hosted_zone_id=>"/hostedzone/Z38DPBBF3IW9B0", :change_batch=>{:comment=>"Chef Route53 Resource: french-toast.test-domain.", :changes=>[{:action=>"DELETE", :resource_record_set=>{:name=>"french-toast.test-domain.", :type=>"A", :ttl=>3600, :resource_records=>[]}}]}} :::
[2017-01-27T18:33:29+00:00] ERROR: Unexpected list element termination

I was running into a similar issue. i found that to delete a record I had to do the following:

route53_record "create a record" do
name  'venkata.example.com'
value 'test'
type  "A"
ttl   60
zone_id   'ZJHSKJD891KKQ'
fail_on_error true
action :delete
end

It seems like the name, value, type, and ttl attributes must be exactly the same values as what's active.
I hope this helps as a work around.

@VenkataMutyala that seemed to do the trick. Seems odd you should have to include the value and the ttl. Shouldn't just providing the name be sufficient?

Hey folks,
This looks like you've discovered a limitation of the aws sdk that is used for the delete action. Could you confirm that I'm understanding this correctly? Thanks!

The route53_record resource in this cookbook has been merged into the aws cookbook itself and improved quite a bit. There's also been a new aws_route53_zone resource added for creating / deleting zones. At this point in time we're deprecating this cookbook in favor of the aws cookbook. If you're still having this issue feel free to open it up in the aws cookbook.


Add patch-flutter script

The idea is to be used as a fallback in case flutter or dart doesn't work.
This script patches the official binaries from Flutter SDK. It is kinda messy to use (since flutter command downloads the binaries in the first run, and also there is some binaries downloaded only after a project setup, so you need to run this command twice), but it works.

For now, to run this script you need to:
$ nix-shell patch-flutter.nix
$ patch-flutter FLUTTER_SDK_PATH

But ideally, we should expose this script to the user path.


[Forge 1.20.1] Ingot should auto-disable themselves if another mod adds them

Bit annoying to have multiple of the same ingot.
Alternatively, adding a whitelist in the config that lets us specify mod favour order would be nice (like Tinker's Construct did - by default, it would make TConstruct ingots before looking for ones from other mods).

Sorry for late reply.
Due to the way this mod works, even if there is no mod, at least one ingot is required,
So one ingot was added for each type.
I will keep the current method for now, and will improve this at next Minecraft version update.


HDDS-4365: SCMBlockLocationFailoverProxyProvider should use ScmBlockLocationProtocolPB.class in RPC.setProtocolEngine

What changes were proposed in this pull request?
In SCMBlockLocationFailoverProxyProvider, currently it is
private ScmBlockLocationProtocolPB createSCMProxy(
    InetSocketAddress scmAddress) throws IOException {
  ...
  RPC.setProtocolEngine(hadoopConf, ScmBlockLocationProtocol.class,
      ProtobufRpcEngine.class);
  ...

it should be
private ScmBlockLocationProtocolPB createSCMProxy(
    InetSocketAddress scmAddress) throws IOException {
  ...
  RPC.setProtocolEngine(hadoopConf, ScmBlockLocationProtocolPB.class,
      ProtobufRpcEngine.class);
  ...

What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4365
How was this patch tested?
CI

+1. Thanks Glen for working on this. Merging


[MacOS] Segmentation Fault on LightGBM w/ Torch

LightGBM Issue: https://github.com/microsoft/LightGBM/issues/4897
MacOS segmentation faults if torch is imported before LightGBM and LightGBM trains:
import torch
import lightgbm
lightgbm.train(...)  # <--- Segmentation Fault

OS Details:
macOS Big Sur
Version 11.6

MacBook Pro (16-inch, 2019)
Processor: 2.6 GHz 6-Core Intel Core i7
Memory: 16 GB 2667 MHz DDR4

Minimal Reproducible Script:
First create python venv, then:
pip install lightgbm
pip install torch

import sys
python_version = f'{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}'
print(f'\nPython Version: {python_version}')
import platform
print(f'Operating System: {platform.system()}\n')

from pip._internal.operations import freeze
x = freeze.freeze()
for p in x:
    print(p)

import numpy as np
data = np.random.rand(50_000, 10)
label = np.random.randint(2, size=50_000)
test_data = np.random.rand(50_000, 10)

# This import order works:
# import lightgbm as lgb
# import torch

# This import order fails on MacOS when calling lgb.train: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
import torch
import lightgbm as lgb

train_data = lgb.Dataset(data, label=label)
print('\nStarting Train')
model = lgb.train({}, train_data)
print('Training Finished')

Example output:
Python Version: 3.8.10
Operating System: Darwin

joblib==1.1.0
lightgbm==3.3.1
numpy==1.21.5
pip==21.1.2
scikit-learn==1.0.1
scipy==1.7.3
setuptools==57.0.0
threadpoolctl==3.0.0
torch==1.10.1
typing-extensions==4.0.1
wheel==0.36.2

Starting Train

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

This is problematic in AutoGluon because depending on the order models train, if a torch model trains before LightGBM, LightGBM will cause a segmentation fault.

The issue is present on MacOS 10.15.7 (Catalina)

Problem is due to libomp version (I was using 12.0.1). This issue also affects XGBoost.
libomp 12 and 13 cause segmentation faults on MacOS.
The fix is to install libomp 11.1.0:
# brew install wget
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/fb8323f2b170bd4ae97e1bac9bf3e2983af3fdb0/Formula/libomp.rb
brew uninstall libomp
brew install libomp.rb
rm libomp.rb

Still an issue on macOS 13.2.1 (22D68).
And the fix also still worked, thanks!

Sonoma 14.5
Same issue.  The brew uninstall and re-install did not work.
rmination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [97195]
VM Region Info: 0x600 is not in any region.  Bytes before following region:<PHONE_NUMBER>
REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT                      109e51000-109e55000    [   16K] r-x/r-x SM=COW  /Library/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python
Thread 0::  Dispatch queue: com.apple.main-thread
0   lib_lightgbm.so               	       0x149215a10 LightGBM::BinMapper::BinMapper() + 0
1   lib_lightgbm.so               	       0x1492b6fdc .omp_outlined. + 956
2   libomp.dylib                  	       0x148c5ac53 __kmp_invoke_microtask + 147
3   libomp.dylib                  	       0x148c0e02b __kmp_invoke_task_func + 358
4   libomp.dylib                  	       0x148c098bd __kmp_fork_call + 6154
5   libomp.dylib                  	       0x148bfda2f __kmpc_fork_call + 285
6   lib_lightgbm.so               	       0x1492b4a28 LightGBM::DatasetLoader::ConstructFromSampleData(double**, int**, int, int const*, unsigned long, int, long long) + 1672
7   lib_lightgbm.so               	       0x1491a09fe LGBM_DatasetCreateFromMats + 3774
8   lib_lightgbm.so               	       0x14919fb30 LGBM_DatasetCreateFromMat + 64
9   libffi.dylib                  	    0x7ff81cbc7892 ffi_call_unix64 + 82
10  libffi.dylib                  	    0x7ff81cbc720e ffi_call_int + 808
11  _ctypes.cpython-311-darwin.so 	       0x10a837336 _ctypes_callproc + 678
12  _ctypes.cpython-311-darwin.so 	       0x10a8319eb PyCFuncPtr_call + 267
13  Python                        	       0x10b28b3b1 _PyObject_MakeTpCall + 129
...