Add more documentation for the FFI API

In https://github.com/curl/curl/issues/11203 @bagder pointed out that it's hard to know if code using the Hyper FFI interface is correct, because it is under-documented. I've tried to document things better based on my reading of the Rust code, client.c, and my knowledge of the Rust async ecosystem. @seanmonstar please take a look and let me know if I've gotten anything wrong. Thanks!
The general themes are:

I gave each struct a detailed description, including how to get one.
I added a list of methods for each struct. I know users can find the methods by searching for the struct name, but having them all in one place makes it much easier to quickly understand the operations on a struct.
I made task-creation functions consistently say "Creates a task that X" instead of "does X", to make it clearer that nothing happens right away.
I tried to cross-reference functions, to make it easy to figure out "how to get one" and "what to do next."
I specifically documented the relationship between a hyper_clientconn and a hyper_io, and why that means that a hyper_clientconn goes with a TCP/TLS connection for its lifetime.

A general problem is the complete lack of documentation for the C API for C developers. Everything so far is documented for and and the reader is assumed to understand/prefer rust code. I don't.

That's great feedback, thanks! I did try to write this documentation from
the perspective of a C developer, but it sounds like I missed the mark. Can
you give an example or two so I can figure out what went wrong and fix it?

What I understood is that the function signature in the docs is in Rust, not in C. For instance, one shows:
#[no_mangle]
pub extern "C" fn hyper_buf_bytes(buf: *const hyper_buf) -> *const u8

Instead of the what is in the C header file:
const uint8_t *hyper_buf_bytes(const struct hyper_buf *buf);

I wonder if being able to output C for extern "C" functions in rustdoc would be something the maintainers would consider.

I do also hope to add actual usage examples written in C to each function, similar to curl's docs.

I'm even more basic. Where do I find the docs for the C API?

Ah that's a good point. I saw you tweaked things so the header file only
gets the short summary of each function. I was surprised by that. I
consider the header file to be the default source of documentation in the
absence of a full on man page. I think we should include the full docs even
if they are long.
I'm actually a maintainer of rustdoc. :-) I've considered adding support
for documentating C APIs in C syntax because it would be very helpful for
my work in rustls-ffi. But I think it's probably too much complexity and
too niche.
I think the main thing Rust libraries for consumption in C should do is
write man pages or standalone HTML docs. It's kind of a pain compared to
the convenience of automatic doc generation but on the other hand it lets
you manually combine similar methods and document them together.
The other thing I've considered is writing some JavaScript that would run
on the rustdoc pages and replace Rust types with C types for display.

@bagder subject to the issues mentioned above (Rust types vs C types) you
can see the documentation at
https://docs.rs/hyper/latest/hyper/ffi/index.html

They are rendered here: https://docs.rs/hyper/latest/hyper/ffi/
That entry point includes some info about how to build, and then there's a list of structs, constants, and functions. Each one includes some sentences, and is also where examples can be rendered once we add them. The changes merged in this PR won't be available until another version is released.

I saw you tweaked things so the header file only gets the short summary of each function. I was surprised by that. I consider the header file to be the default source of documentation in the absence of a full on man page.

Oh, OK, we can switch it back. I kind of assumed that adding a bunch of bytes that are all comments/examples would bloat the file, and so in my head it made sense to just have the one sentence, and if you want to read more, look at the rendered docs. If that's abnormal, my mistake.

But I think it's probably too much complexity and too niche.

I'm less sure of that. As more and more Rust is used to interoperate with C, I think we (in hyper and rustls) will find places that the Rust tools could do a better job.

@bagder subject to the issues mentioned above (Rust types vs C types) you

Oh right. I think all the rust in those docs made me think those are not the C docs! Like how all the functions have rust prototypes, not C prototypes.

A very reasonable assumption! They are in fact Rust docs but because the functions are extern "C" they can be translated using some basic heuristics. Structs are structs, *mut foo == foo *, *const foo == const foo *, uint8_t == unsigned char, etc. Not ideal but it's something for now at least.
I've generated a copy of the latest docs, including my changes from the PR, and hosted them here:
https://rustdoc.crud.net/jsha/hyper-doc/hyper/ffi/index.html
For instance:
https://rustdoc.crud.net/jsha/hyper-doc/hyper/ffi/fn.hyper_body_data.html
https://rustdoc.crud.net/jsha/hyper-doc/hyper/ffi/fn.hyper_io_new.html

Another note on reading the rustdoc as a C developer: the structs will have a bunch of extra stuff below "Trait Implementations" that you can completely ignore. For instance https://rustdoc.crud.net/jsha/hyper-doc/hyper/ffi/struct.hyper_io.html has impl Read for hyper_io. That's all coincidental leakage from the internal Rust implementation and doesn't affect the C API at all.
What's relevant for the C API is the comment at the top of each struct page, and also the comments at the top of each function page.

I kind of assumed that adding a bunch of bytes that are all comments/examples would bloat the file, and so in my head it made sense to just have the one sentence, and if you want to read more, look at the rendered docs. If that's abnormal, my mistake.

That assumption makes sense, but until we have a better way to render C docs using C types and C function signatures, the header file is the best we've got. And it has the advantage of being automatically generated and fully official (if the function signatures don't match we would get compiler errors).


replace useradd command to direct passwd insert

provide a solution to #1 issue
I have meet this issue because I use a ldap with UID of type 1000000

@vincentDcmps Thanks!


[Breakpad] fix cmake include install

Describe the pull request

What does your PR fix?
Fixes breakpad port not install include dir

Which triplets are supported/not supported?

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

@jiayuehua ,Thanks for your pr, have you tested the usage?

@jiayuehua ,Thanks for your pr, have you tested the usage?

Yes, I have tested.

(Alternately, I'll look at doing that modernization when I am back in the office on Monday, December 27)

(Alternately, I'll look at doing that modernization when I am back in the office on Monday, December 27)

@BillyONeal ,I have helped users complete the function modernization modification

Thanks for the fix and modernization!


Filter DeprecationWarning in test_maniplation.py

rel: #7528

I don't understand the reason why this fix is needed, but it looks #6653 can supersede this?

I should add some comment about this workaround.
Though I'll wait #6653 to be merged for testing for now.

CIs, test this please.

@toslunar Should you hold merging?
https://github.com/chainer/chainer/pull/7824#issuecomment-515898244

Jenkins CI test (for commit 86d0c66a7e5ad81dcbd4e0d63c9a072007fa4b2f, target branch master) failed with status FAILURE.

#6653 did not fix the issue.
Jenkins & flexCI, test this please.

Jenkins CI test (for commit 86d0c66a7e5ad81dcbd4e0d63c9a072007fa4b2f, target branch master) succeeded!

I'll merge the PR.  IMO, it's too strange that adding -W ignore option makes some tests fail.


Only create one isolate VPC instead of creating one per instance.  Identify whether this has been done in an AZ by searching tags.

Network code has been refactored to now use ACLs on the existing VPC instead.


Allow precaching "repair" when using subresource integrity

R: @tropicadri
Fixes #2858
Although unexpected, there are edge cases where the precache might not be in an inconsistent state, most likely due to a developer manually deleting something in DevTools.
When this happens, workbox-precaching defaults to falling-back to using a network response (assuming the device is online) when there's a precaching miss. Up until now, workbox-precaching hasn't attempting to use this network response to repopulate the precache, because there are no guarantees that the network response corresponds to the version of the asset specified in the precache manifest.
However, if the precache entry includes an integrity property, then subresource integrity guarantees that the response does correspond to the same version of the asset in the manifest. So it should be safe to "repair" the cache with that response.
(The revision field can't be used for this purpose, because while it's traditionally set to the hash of an asset's content, it could theoretically be set to anything, and it would be much too expensive to calculate the hash of the response body via JavaScript at runtime.)

(Actually, hold off on the review. I noticed something that needs to be changed when testing locally.)

...I realize now that the code in this PR will work if there's an integrity property on the actual request being made, but the integrity information from the precache manifest is being ignored. I need to find a clean way to pass information about the precache manifest contents (which is stored in PrecacheController) to the code that handles requests (which is in PrecacheStrategy).

I've got a more robust approach, but it's blocked on #2914 (we need to be able to check the integrity property of the incoming request in the PrecacheStrategy, but without that PR, it's lost).


fix typo in args of GenerateBatchTransferMomentScript

seems to be a small typo here, which causes the script to fail with
expected `tokens`, got `token`

error

I'm going to close this because I fixed this along with refactoring all the other transactions in: https://github.com/dapperlabs/nba-smart-contracts/pull/96


Get all submissions fails on Windows

There seem to have some issues with the subprocess library.

when running "make get-all-submissions", error occurs while using start method of SyncManager()
error message
python scripts/leetcode_tools.py get-all-submissions
("Can't pickle local object 'get_all_submissions..mgr_init'",)
Traceback (most recent call last):
File "scripts/leetcode_tools.py", line 197, in
clize.run(get_question, submit_question, leetcode_login, get_all_submissions, remove_question)
File "C:\Users\trian.conda\envs\leetcode\lib\site-packages\sigtools\modifiers.py", line 158, in call
return self.func(*args, **kwargs)
File "C:\Users\trian.conda\envs\leetcode\lib\site-packages\clize\runner.py", line 363, in run
ret = cli(*args)
File "C:\Users\trian.conda\envs\leetcode\lib\site-packages\clize\runner.py", line 220, in call
return func(*posargs, **kwargs)
File "C:\Users\trian.conda\envs\leetcode\lib\site-packages\clize\runner.py", line 262, in _cli
return func('{0} {1}'.format(name, command), *args)
File "C:\Users\trian.conda\envs\leetcode\lib\site-packages\clize\runner.py", line 220, in call
return func(*posargs, **kwargs)
File "scripts/leetcode_tools.py", line 170, in get_all_submissions
manager.shutdown()
AttributeError: 'SyncManager' object has no attribute 'shutdown'
make: *** [Makefile:6: get-all-submissions] Error 1
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\trian.conda\envs\leetcode\lib\multiprocessing\spawn.py", line 107, in spawn_main
new_handle = reduction.duplicate(pipe_handle,
File "C:\Users\trian.conda\envs\leetcode\lib\multiprocessing\reduction.py", line 79, in duplicate
return _winapi.DuplicateHandle(
PermissionError: [WinError 5] 액세스가 거부되었습니다
and error happens in the line below
https://github.com/yurirocha15/leetcode-practice-python/blob/7be075175e566f47d33d76e6065f2b2650b46b3d/scripts/leetcode_tools.py#L115
it seems this stackoverflow link(https://stackoverflow.com/questions/9670926/multiprocessing-on-windows-breaks) is relevant issue.
It seems to me this error occurs because 'mgr_init' passed to start method is not picklable.
I'm working on it but if you have idea, please tell me.
@yurirocha15

Checked with windows machine.
No problem getting submissions from the server.


Automated cherry pick of #7938: bugfix vmware monitor

Cherry pick of #7938 on release/3.3.
#7938: bugfix vmware monitor

Codecov Report

Merging #7939 into release/3.3 will decrease coverage by 2.19%.
The diff coverage is 0.28%.

@@              Coverage Diff               @@
##           release/3.3   #7939      +/-   ##
==============================================
- Coverage         6.78%   4.59%   -2.20%
==============================================
  Files              676     424     -252
  Lines           118955   88109   -30846
==============================================
- Hits              8076    4050    -4026
+ Misses          110267   83784   -26483
+ Partials           612     275     -337

Flag
Coverage Δ

#aFlag
4.59% <0.28%> (-2.20%)
:arrow_down:

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

Impacted Files
Coverage Δ

pkg/cloudcommon/db/adminsharablevirtual.go
0.00% <0.00%> (ø)

pkg/cloudcommon/db/db_dispatcher.go
0.00% <0.00%> (ø)

pkg/cloudcommon/db/domain.go
3.33% <0.00%> (-0.24%)
:arrow_down:

pkg/cloudcommon/db/domainresource.go
0.00% <0.00%> (ø)

pkg/cloudcommon/db/external.go
0.00% <0.00%> (ø)

pkg/cloudcommon/db/infraresource.go
0.00% <0.00%> (ø)

pkg/cloudcommon/db/managed.go
0.00% <ø> (ø)

pkg/cloudcommon/db/modelbase.go
4.77% <0.00%> (-0.04%)
:arrow_down:

pkg/cloudcommon/db/opslog.go
1.58% <0.00%> (+0.08%)
:arrow_up:

pkg/cloudcommon/db/project.go
0.00% <0.00%> (ø)

... and 357 more

Continue to review full report at Codecov.

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


the length of the extracted subtitles longer than the length of the video

Why is the length of the extracted subtitles longer than the length of the video?

Hi, I think I have the same issue. It used to work until a few months ago, everytime I try to run auto_subtitle, the duration read is always so much more than the actual video, eg. one video with a duration of 1:31:16 is being read to have 14+ hours duration and take really long to run.


fix: support for className with whitespace and so on

fix  https://github.com/lit/lit/issues/3095
use classname. a lib be used in vue and react.

Thanks for the PR but we shouldn't have to add a new dependency for this, and this wouldn't work on updates either.
We need to discuss whether the solution presented in https://github.com/lit/lit/pull/3096 works and doesn't add too much weight.


Create Grafana, Promethues, Harvest Docker compose

Make it easier to kick-the-tires

Can what I did with the Ansible playbook help?

hey @schmots1 yeah, i've got some ideas on that. I'll touch base

Fixed in #349


[Op] Missing logical ops

Description

logical_or
logical_xor

Checklist

[x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage
[x] Code is well-documented

cc @awslabs/raf-reviewer

A unit test seems flaky (https://github.com/awslabs/raf/runs/6967238789?check_suite_focus=true#step:6:7709):
FAILED tests/python/op/tvm/test_tvm_unary.py::test_unary_fp16_ops_with_grad[ops5]
[2022-06-20T14:08:27 UTC] E           Not equal to tolerance rtol=0.001, atol=0.001
[2022-06-20T14:08:27 UTC] E
[2022-06-20T14:08:27 UTC] E           Mismatched elements: 1 / 24 (4.17%)
[2022-06-20T14:08:27 UTC] E           Max absolute difference: 4.
[2022-06-20T14:08:27 UTC] E           Max relative difference: 0.001032
[2022-06-20T14:08:27 UTC] E            x: array([[[[-2.467e+01, -3.182e+00,  6.128e-01,  1.581e-01],
[2022-06-20T14:08:27 UTC] E                    [ 2.619e+00, -8.962e+01,  1.956e+00,  6.514e-01],
[2022-06-20T14:08:27 UTC] E                    [-2.229e+00, -1.577e+00,  3.963e+00, -3.398e+00]],...
[2022-06-20T14:08:27 UTC] E            y: array([[[[-2.466e+01, -3.184e+00,  6.128e-01,  1.581e-01],
[2022-06-20T14:08:27 UTC] E                    [ 2.621e+00, -8.962e+01,  1.956e+00,  6.519e-01],
[2022-06-20T14:08:27 UTC] E                    [-2.230e+00, -1.578e+00,  3.959e+00, -3.398e+00]],...

op5 is (torch.reciprocal, raf._op.sym.reciprocal). @whbldhwj could you take a look?


NR-168688: Add support for GCP Vertex AI

Relevant information
Adding support for new Cloud Integration GCP Vertex AI
Checklist

[x] I've read the guidelines and understand the acceptance criteria.
[x] The value of the attribute marked as identifier will be unique and valid.
[x] I've confirmed that my entity type wasn't already defined. If it is I'm providing an explanation above.

Approved


hostapd: apply patch for CVE-2024-3596

Description of changes
Add patches for CVE-2024-3596, see

https://lists.infradead.org/pipermail/hostap/2024-July/042798.html
https://www.blastradius.fail/

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

So, these are really not fetchpatch-able?

So, these are really not fetchpatch-able?

Fair point, one of them needed minor adjustments to apply. I've changed the rest to use fetchpatch.

On dear
error: hash mismatch in fixed-output derivation '/nix/store/g33pphjiqwrhdhlzshnpkdkr48jks2xn-?id=f302d9f9646704cce745734af21d540baa0da65f.drv':
         specified: sha256-F+FQa1Twl8buqc5w4rRY7zS7u2gfptVnFw+qVujOxT8=
            got:    sha256-6i0cq5YBm2w03yMrdYGaEqe1dTsmokZWOs4WPFX36qo=

error: hash mismatch in fixed-output derivation '/nix/store/g33pphjiqwrhdhlzshnpkdkr48jks2xn-?id=f302d9f9646704cce745734af21d540baa0da65f.drv':
         specified: sha256-F+FQa1Twl8buqc5w4rRY7zS7u2gfptVnFw+qVujOxT8=
            got:    sha256-6i0cq5YBm2w03yMrdYGaEqe1dTsmokZWOs4WPFX36qo=

Oh shoot, that was my bad. I forgot to clear a hash from fetchurl which doesn't strip the patch headers. I've updated the hash to the correct value.


bool

hey! found an error
Mousey.h:70:3: error: 'boolen' does not name a type
boolen buttonChange = false;

Awesome! Thanks @hydronics2 for your help!


Fixed subscription / disposables issue

Fixes https://github.com/tcarlsen/atom-jslint/issues/36. I used a CompositeDisposable to track all the subscriptions, which can then just be discarded if the plugin is deactivated.
Another method would be to track the observeTextEditors subscription separately, and modify that when the settings changed (and then also go and modify the onDidSave and onDidStopChanging events in all the editors), but that seemed unnecessary.

thx man! will take a look and test asap

it looks like its working, had to change the config selector but other then that Im happy  thx!
new PR: https://github.com/tcarlsen/atom-jslint/pull/38


Render nothing caused by a comment

Version
4.1.6
Reproduction link
https://github.com/a1mersnow/repro-comment
Steps to reproduce

visit /b
click 'to A'

What is expected?
rendering A
What is actually happening?
rendering nothing

However,  if you remove the comment  '' in Component TheB, the issue gone.
I meet the issue accidentally, it's very hard to discover/debug. At lease, we should warn in console, so the developer know how to fix it.

Duplicate of https://github.com/vuejs/core/issues/4830


added .to_dict() to DidlResource, wrote tests.  Closes #318

Created the to_dict() method for DidlResource.  When called just like the .to_dict() of the objects, it will create a python dictionary with all elements.  There is an optional parameter, optimized that can be set to True and the returned dict will have all elements with a value of None stripped from the return.  This is helpful since there are only 2 or 3 elements that have been seen in the wild and when using to_dict() to format a json return object, those unused elements are just unhelpful baggage.  "uri" is the most important of the lot.
I did not make the DidlObject recursively call .to_dict() on resources because that could end up breaking code.
dct = didlobject.to_dict()
dct['resources'] = [resource.to_dict() for resource in dct['resources']]

Will get the desired effect, without breaking existing code.

Hallo @dundeemt
I think this looks really good. A few things crossed my mind while reading though it:

About the docstring. We have enabled napoleon for sphinx for our autogenerated API docs, which should pick up the arguments (with type) etc, provided that the doc string is formatted according to the google style doc strings. I can understand that you didn't notice, since we haven't really started the conversion of the docstrings yet, but that will happen. So if you don't mind, it would be nice if you could format new docstrings in this way. It should be something along the lines of:

def to_dict(self, optimized=False):
    """Return a dictionary representation of the DidlResource

    Args:
        optimized (bool): Optionally filter dictionary to only with a value other than None.
    """

I'm unsure if optimize is the best (most descriptive name), maybe filter_out_nones or reduced, I'll leave that entirely up to you
I completely agree with your evaluation about it being safe to filter out the Nones. For my part, the important part is that the dict can be used to re-instantiate the object by DidlResource(**resource_dict). In that respect, it should always be safe to filter out the default value, so I think that is a good idea.
Speaking of re-instantiating, would you mind also writing the symmetrical classmethod from_dict (just as the DidlObject has), as we usually prefer to have both there, so the user is not required to have any inside knowledge to be able to use these methods?
With regards to DidlObject.to_dict calling to_dict on DidlResource. I would actually prefer that it did it and I think it is ok to break interface for. My reasoning for this is first and foremost that my main expectation of these methods should be that they are symmetrical, so provided that you modify from_dict on DidlObject too, that would still be the case. Second, I would also usually expect of a to_dict method, that it contains only simple types, so I would actually consider it more of a bug in the first place that a break of API. @lawrenceakka @stefankoegl do you guys have an opinion on the matter? If we do decide to change it, the interface change should be documented in the doc string.

I apologize in advance for the verbose feedback, I don't really do short ;)
Thanks for you work on this.

Agreed.  I'll start work on it this week.
I appreciate your feedback.  I'll keep an eye out for any feedback from the
people you mentioned.
Best,
Jeff
On Mon, Aug 17, 2015 at 1:37 PM, Kenneth Nielsen<EMAIL_ADDRESS>wrote:

Hallo @dundeemt https://github.com/dundeemt
I think this looks really good. A few things crossed my mind while reading
though it:

About the docstring. We have enabled napoleon for sphinx for our
autogenerated API docs, which should pick up the arguments (with type) etc,
provided that the doc string is formatted according to the google style doc
strings. I can understand that you didn't notice, since we haven't really
started the conversion of the docstrings yet, but that will happen. So if
you don't mind, it would be nice if you could format new docstrings in this
way. It should be something along the lines of:

def to_dict(self, optimized=False):
"""Return a dictionary representation of the DidlResource    Args:        optimized (bool): Optionally filter dictionary to only with a value other than None.    """

I'm unsure if optimize is the best (most descriptive name), maybe
filter_out_nones or reduced, I'll leave that entirely up to you
I completely agree with your evaluation about it being safe to filter
out the Nones. For my part, the important part is that the dict can be used
to re-instantiate the object by DidlResource(**resource_dict). In that
respect, it should always be safe to filter out the default value, so I
think that is a good idea.
Speaking of re-instantiating, would you mind also writing the
symmetrical classmethod from_dict (just as the DidlObject has), as we
usually prefer to have both there, so the user is not required to have any
inside knowledge to be able to use these methods?
With regards to DidlObject.to_dict calling to_dict on DidlResource. I
would actually prefer that it did it and I think it is ok to break
interface for. My reasoning for this is first and foremost that my main
expectation of these methods should be that they are symmetrical, so
provided that you modify from_dict on DidlObject too, that would still be
the case. Second, I would also usually expect of a to_dict method, that
it contains only simple types, so I would actually consider it more of a
bug in the first place that a break of API. @lawrenceakka
https://github.com/lawrenceakka @stefankoegl
https://github.com/stefankoegl do you guys have an opinion on the
matter? If we do decide to change it, the interface change should be
documented in the doc string.

I apologize in advance for the verbose feedback, I don't really do short ;)
Thanks for you work on this.
—
Reply to this email directly or view it on GitHub
https://github.com/SoCo/SoCo/pull/330#issuecomment-131920176.

--
Best,
Jeff Hinrichs
<EMAIL_ADDRESS>402.218.1473

PR includes all  except item #4.  I wanted to wait for any input without holding up this issue/pr.  There are some questions I have about #4 and since it will break things and require updated documentation, it might be better to make an issue and pr for just that item.

I had just a few final inline comments. Other than those I am very happy :D

I repull from upstream, to take care of the item_class and fix the
spacing.  Will be later today.
Best.
On Fri, Aug 21, 2015 at 10:53 AM, Kenneth Nielsen<EMAIL_ADDRESS>wrote:

I had just a few final inline comments. Other than those I am very happy :D
—
Reply to this email directly or view it on GitHub
https://github.com/SoCo/SoCo/pull/330#issuecomment-133470442.

--
Best,
Jeff Hinrichs
<EMAIL_ADDRESS>402.218.1473

@KennethNielsen if you have any other concerns, comments with this PR please let me know.

+1 from me.  Happy to commit tomorrow if no other comments.

That would be outstanding.  I ignorantly have the PR going against my main
branch, so I don't believe I can start another PR until after that is
committed.  (I'll make sure and work in a branch other than main. ;)
On Thu, Aug 27, 2015 at 11:46 AM, Lawrence Akka<EMAIL_ADDRESS>wrote:

+1 from me. Happy to commit tomorrow if no other comments.
—
Reply to this email directly or view it on GitHub
https://github.com/SoCo/SoCo/pull/330#issuecomment-135489537.

--
Best,
Jeff Hinrichs
<EMAIL_ADDRESS>402.218.1473

Thanks very much for this. Please make sure to add a comment on #332 which we will use to create release notes

@dundeemt Sorry, was away for a few days. No, no further comments and nice work.
Thanks for the contribution. I'll look forward to the next one.
Regards Kenneth


with DiagnosticableMixin

flutter 1.22.6  报错Error: Type 'DiagnosticableMixin' not found.
class DateTimePickerTheme with DiagnosticableMixin {

You should've migrate to flutter_cupertino_datetime_picker. That solved the problem to me, I found the solution in another thread #152.


Remove History variant in StageEnum

Describe the feature
At the moment, the History variant in StageEnum enum seems to duplicate other variants like AccountHistory or StorageHistory. The History variant can therefore be dropped in favor of a combination of other variants.
https://github.com/paradigmxyz/reth/blob/d8b1609299a4ada2bf57fd4feb62e7042d0ccbf6/bin/reth/src/args/stage_args.rs#L6-L21
Additional context
No response

@tcoratger are you on this?


IDI-150: Added information to site-structure.json for default for tab nav

Added information to site-structure.json so the tab navigation now goes directly to the appropriate content page instead of going to a non-existent index file which redirects to the proper page.

comments from IRC channel:
[1:37pm] danayo: jhung1: your changes look good to me. One question - I noticed you're not using the variables (i.e. "categoryHref" & "defaultPage") in the index.html.md.handlebars file in the way that you are in the header.html.handlebars file - is there a reason for that? should we be consistent?
[1:44pm] jhung: danayo: the index is slightly different because we're adding descriptions along side the icons. We could automate that as well, it would require us to move the descriptions into the site-structure.json file or create a handlebars helper. For now I think it's okay the way it is.
danayo: jhung, I was thinking specifically about the link references (  ) - whether we could use the variables there
[1:59pm] jhung: danayo: we wouldn't be able to do that because we're not iterating through the site-structure the same way we do with the tabs. So for now the index just uses hard coded URLs.


Conflict with the Outline plugin

Installing your plugin destroys the functionality of the Outline plugin. The Outline plugin loses its functionality to toggle the visibility of the panel: The outline button (hamburger icon) disappears, and the shortcut F9 does not work anymore.

@petzi53 Thank you for the feedback, I'm working on an update

I updated the plugin to 2.0.0, please let me know if you still have this issue with the new version.

Yep! (I now believe anyway that the problem is more related to the Outline plugin, as I have noticed conflicts with other plugins as well.)
I noticed that you changed the UI and how to use the plugin. It seems now easier to handle. But has the user to import the variables for each note, as it currently works? That would defy the whole idea of your plugin: time-saving with typing.

Perhaps an idea that could work is that there is a default global variable page. One that does not need to be imported.

I'm closing the original issue.

Perhaps an idea that could work is that there is a default global variable page. One that does not need to be imported.
I'll take into account that for the next version. If you have any more ideas for that please open a new issue.


Filter an Ethereum Firehose for addresses of interest

In order to better support syncing sparse subgraphs (where there are not many events), Graph Node should be able to ask the firehose only for blocks that include calls to a contract of interest. This would radically reduce the number of blocks that the graph node needs to process in order to sync the subgraph.

This should be a simple filter to optimise for performance
When syncing the chain head, graph node will need to update the subgraph's block pointer

This will likely require a similar implementation to #2942

[x] Investigation (Firehose, BlockStream, filters, ...)
[ ] Implementation
[ ] Run/test against real Firehose

In a brief chat with @sduchesneau he mentioned that they still need to implement a filter in the Firehose side (they have a similar old thing there, but it'll probably not apply to what we need today).
The format passed would be something like this:
to in ["0xaaaaaaaaaaaaaa","0xbbbbbbbbbbbb...",...]

Where to is the address of the contract called in any call/subcall. And any transaction that matches this contract (to), will be excluded from the Firehose block (or maybe even the full block, but this might be an optimization for later).
@sduchesneau feel free to correct me if I said something wrong 🙂

Notes
After further code investigation I've noted a couple of things:

In our chain/ethereum crate we have a TriggerFilter structure that contains the addresses, events, etc related to a subgraph (originated from it's data sources). The data that will be sent to Firehose will come from here.
The firehose::BlocksRequestV2 structure will need to accept these addresses/contracts.
And the firehose::BlockStream will need to extract the addresses from the TriggerFilter, to send them in the BlocksRequestV2 structure.

Technical questions

@leoyvens or @maoueh should I just extract all of the addresses contained in the three fields (log, call and block) from the TriggerAdapter structure to send them on the Firehose request? (so it can filter by them)
@leoyvens by looking at our dynamic data source creation in the instance_manager, I don't see how the new addresses will be added to the TriggerFilter contained in the BlockStream. How should I add them? May I create a similar method to the notify_block_consumed for this?

Behavioral questions

@azf20 how should a subgraph specify it's a sparse one? Should it be a flag on the .yaml file? If that's not decided yet I can leave the filter behind a feature flag once the implementation is complete.

This shouldn't be a subgraph-level configuration, I think it should apply to all subgraphs? Unless we anticipate significant performance implications if applied to dense subgraphs?
I know there are some known complications with dynamic data sources (as it may require a new firehose connection if the filters / required position is changed?), but I think @maoueh and Stephane had some ideas (or maybe there wouldn't be filtering in that case to start with)

If a subgraph has templates, then we should not be including contract adresses in the filter. But we can include log and call signatures, making sure to include those in the templates.

@azf20 okay, I guess then this depends on the Firehose implementation itself, if it's performance suffers or not from filtering in non-sparsed subgraphs. Maybe @sduchesneau can answer this one 🙂

I'll start doing the filtering for addresses on the graph-node side.
On the Firehose there are a couple of things that need to be done so this becomes super neat 👌 , they are:

Skipping whole blocks (you would still receive a block with no transactions data in it)
Good performance when you need to skip big block ranges (the Firehose needs to read the whole files to know what to filter)
Implementing an array of addresses directly in the proto request (instead of a dumb "string") to optimize the filtering for large number of accounts (pretty inefficient using the CEL vm...)

According to @sduchesneau point 2 is the most exciting one 😄
On a separate note, soon I'll need to learn how to run Firehose locally for Ethereum, I might talk with SF people or indexers that have done this already.

Also, here's a pseudocode I've made on how the filtering will probably look like:
// Unnecessarily complex pseudocode for the firehose filters.
//
// For now it considers Firehose only has an Address filter (`to in [...]`).
// No filters to event signature yet.

fn build_to_filter(filter: &TriggerFilter) -> BTreeSet<Address> {
    if
        // For now block filters mean -> trigger every block, no need for filters.
        // For the future we should optimize this to
        !filter.block.is_empty() ||
        // If log filter has wildcard_events, it means they have no addresses. For correctness we can't skip any block.
        !filter.log.wildcard_events.is_empty()
    {
        return BTreeSet::new();
    }

    // filter.call is of type: HashMap<Address, (BlockNumber, HashSet<FunctionSelector>)>
    // We just want a list of Addresses.
    let call_filter_addresses = filter.call.contract_addresses_function_signatures.keys();

    let log_filter_addresses = filter
        .log
        .contracts_and_events_graph
        .iter()
        .fold(BTreeSet::new(), |acc, contract_or_event| {
            match contract_or_event {
                Contract(address) => acc.insert(address),
                // Not used for now.
                Event(_) => {},
            };
            acc
        });

    call_filter_addresses
        .append(log_filter_addresses)
}

struct FirehoseFilters {
    // For now firehose only has a `to in [0xaaa, 0xbbb, ...]` filter.
    // This filters for blocks that have calls for these contract addresses.
    to: BTreeSet<Address>,
}

impl FirehoseFilters {
    fn from_chain_filter(filter: &TriggerFilter) -> Self {
        // A filter.has_templates will be needed/used once Firehose accepts
        // event signature filters.
        // When that happens, we should use this boolean to consider:
        // - If there are templates, we should filter for their log/call filters
        //   that include no addresses.
        Self {
            to: build_to_filter(filter),
        }
    }

    // CEL being the query language Firehose uses for it's filtering mechanism.
    fn to_cel(self) -> String {
        let mut cel = String::new();

        if !self.to.is_empty() {
            cel.push_str(&format!(
                "to in [{}]\n",// \n to add each filter per line
                self
                    .to
                    .iter()
                    // Add comma + address.to_string()
                    .map(|address| format!("{}, ", address))
                    .collect()
            ));
        }

        cel
    }
}

impl BlockStream for FirehoseBlockStream {
    fn next(&mut self) {
        let filters = FirehoseFilters::from_chain_filter(&self.filter);

        request_firehose(BlocksRequestV2 {
            // ...
            filters: filters.to_cel(),
        })
    }
}

With https://github.com/graphprotocol/graph-node/pull/3323/files we now push all the filters to the firehose side, but currently there's still calls being made to the tracing rpc api, is this supposed to be removed as well?
https://github.com/graphprotocol/graph-node/blob/d290b43bd9ca8406a197e17c8fdece59c86a42b1/chain/ethereum/src/ethereum_adapter.rs#L192
https://github.com/graphprotocol/graph-node/blob/d290b43bd9ca8406a197e17c8fdece59c86a42b1/chain/ethereum/src/ethereum_adapter.rs#L231

@azf20 are we ok to add these filters by default to firehose instead of behind the new experimental static filters flag?

This is done afaict


Need help : how to use your bundle ?

I use your bundle for scoop.it.
In my controller i create the service
$scoopItService = $this->container->get('apinnecke_oauth.service.scoopit');
When i try
$result = json_decode($scoopItService->request('profile?shortName=myshortname-xx'), true);
I have this error
Failed to request resource.
'HTTP/1.1 401 Unauthorized'
'Server: nginx'
'Date: Wed, 25 Jan 2017 13:47:04 GMT'
'Content-Type: application/x-www-form-urlencoded;charset=UTF-8'
'Content-Length: 28'
'Connection: close'
'WWW-Authenticate: OAuth realm="scoop.it", oauth_problem="token_rejected"'
Could you please help because i didn't find any information/tutorial to achieve this ?
Thank you.

Hey hey,
have you been through the token retrieval before the request is executed? --> As the error says token_rejected there's definitely sth. funky with your token. Did you request one?
This Bundle is just a wrapper around the Lusitanian/PHPoAuthLib library and hasn't been updated for some time. Here is an example of how to use the plain service from Lusitanian/PHPoAuthLib:
https://github.com/Lusitanian/PHPoAuthLib/blob/master/examples/scoopit.php

No i didn't retrieve the token before the execution of the request, how can i do that in a symfony way (controller) because i had a look in the scoopit example but it's not code in sf way. thank you

To be more clear, i only want to display scoop.it topics et curated article on the website. I try 'profile?shortName=myshortname' just to test.
I try :
$scoopItService = $this->container->get('apinnecke_oauth.service.scoopit');
$token = $scoopItService->requestRequestToken();
$url = $scoopItService->getAuthorizationUri(array('oauth_token' => $token->getRequestToken()));
$response = new Response();
$response->setStatusCode(200);
$response->headers->set('Location', 'url=' . $url);
$response->send();
$result = json_decode($scoopItService->request('profile?shortName=myshortname), true);
this return the same oauth_problem="token_rejected"'...

Please add code blocks to your posts when adding code, that makes reading a lot easier. Thanks.
Are you sure you know how OAuth works and how the OAuth Token Cycle works? OAuth isn't meant for you to request data from your Scoop.it account to display them on your website but to load the data of your users from their scoop.IT accounts. Your user signs in by OAuth (which includes request cycles to the scoop.IT API), then you get an access token and token secret back which you need to store. You're using them to authenticate yourself at the scoop.it API afterwards to load the actual data. Does that make things more clear?
The Login bundle I was using is https://github.com/hwi/HWIOAuthBundle. To load your own data from the scoop.it API, use static API tokens.

You're right about OAuth for signing users. but if you look at the sdk given by scoop.it https://github.com/vdemay/Scoopit-PHP, they used an OAut for the example that interessed me : https://github.com/vdemay/Scoopit-PHP/tree/master/examples/curatedTopicFromUser

Yah, for sure. Reading over http://www.scoop.it/dev/api/1/intro makes pretty clear, that the API is for accessing the data of a user of yours. Have you tried running the linked example?

Sorry which one ? HWIOAuthBundle ?

This one: https://github.com/vdemay/Scoopit-PHP/tree/master/examples/curatedTopicFromUser

yes i did run this one with success but can't integrate it in symfony...

Huh? I'm pretty surprised it did what you expected ... I'd assume that the PHPoAuthLib is doing something funky with the consumer token and secret then. Have you set the client_id and client_secret for scoop.it within your config.yaml like described here? https://github.com/apinnecke/OAuthBundle#configuration
If that's the case I'd start debugging the code and see how PHPoAuthLib is handling the unavailability of user details.
Maybe this one helps ya: I've written myself a wrapper around the base oAuth request to fill the token store before requesting. OAuthToken is just a DTO holding the key and secret for a specific user:
<?php

namespace BusyGifts\OAuthBundle\Request;

use BusyGifts\OAuthBundle\Exception\ApiRequestFailedException;
use BusyGifts\OAuthBundle\Model\OauthToken;
use OAuth\Common\Service\AbstractService;
use OAuth\Common\Storage\TokenStorageInterface;
use OAuth\OAuth1\Token\StdOAuth1Token;

abstract class BaseOAuth1Request
{
    /**
     * @var AbstractService
     */
    protected $service;

    /**
     * @var TokenStorageInterface
     */
    protected $storage;

    /**
     * @param AbstractService $service
     * @param TokenStorageInterface $storage
     */
    public function __construct(AbstractService $service, TokenStorageInterface $storage)
    {
        $this->service = $service;
        $this->storage = $storage;
    }

    /**
     * @param OauthToken $token
     * @param string $url
     * @return array
     */
    protected function executeRequest(OauthToken $token, $url)
    {
        $oauth1Token = new StdOAuth1Token();
        $oauth1Token->setAccessToken($token->getToken());
        $oauth1Token->setAccessTokenSecret($token->getTokenSecret());
        $this->storage->storeAccessToken($this->service->service(), $oauth1Token);

        $response = $this->service->request($url);

        try {
            $response = json_decode($response, true);
        } catch (\Exception $e) {
            throw new ApiRequestFailedException('Error during parse of received contacts of api: ' . json_last_error_msg(), 0, $e);
        }

        return $response;
    }
}

Yes i configure the bundle as you told. Thank you for your code. I would like to replicate this part of code in scoopit example from PHPoAuthLib but without the neccesary interaction with link (inside the else), in my controller :
`if (!empty($_GET['oauth_token'])) {
$token = $storage->retrieveAccessToken('ScoopIt');
// This was a callback request from ScoopIt, get the token
$scoopItService->requestAccessToken(
    $_GET['oauth_token'],
    $_GET['oauth_verifier'],
    $token->getRequestTokenSecret()
);

// Send a request now that we have access token
$result = json_decode($scoopItService->request('profile'));

echo 'result: <pre>' . print_r($result, true) . '</pre>';

} elseif (!empty($_GET['go']) && $_GET['go'] === 'go') {
// extra request needed for oauth1 to request a request token :-)
$token = $scoopItService->requestRequestToken();
$url = $scoopItService->getAuthorizationUri(array('oauth_token' => $token->getRequestToken()));
header('Location: ' . $url);

} else {
$url = $currentUri->getRelativeUri() . '?go=go';
echo "Login with ScoopIt!";
}`

How do you want to execute the request without having logged in? Do you already have the data from $_GET['oauth_token']? You will need them to authenticate against the scoop.it API. And doing that login is NOT provided by this Bundle and the underlying library. This is just for executing requests.
Assuming you have retrieved the token and verifier the code would be as follows:
$oauth1Token = new StdOAuth1Token();
$oauth1Token->setAccessToken($_GET['oauth_token']);
$oauth1Token->setAccessTokenSecret($_GET['oauth_verifier']);
$this->storage->storeAccessToken('ScoopIt', $oauth1Token);
$result = json_decode($scoopItService->request('profile'));
die($result);

the token that i have is the one from $token = $scoopItService->requestRequestToken();.
A var_dump give me this
object(OAuth\OAuth1\Token\StdOAuth1Token)[822]   protected 'requestToken' => string '47nT4skNkAUDvSrELExg-etc' (length=43)   protected 'requestTokenSecret' => string 'SKyL6XkTz6MWZYsXT6UXhMjQ3EONkH2HS@etc' (length=50)   protected 'accessTokenSecret' => string 'SKyL6XkTz6MWZYsXT6UXhMjQ3EONkH2HS@etc' (length=50)   protected 'accessToken' => string '47nT4skNkAUDvSrELExg-etc' (length=43)   protected 'refreshToken' => null   protected 'endOfLife' => int -9002   protected 'extraParams' =>      array (size=1)       'oauth_callback_confirmed' => string 'true' (length=4)

and yes i don't have the oauth_token and the oauth_verifier. I shoull have these after calling $url, i imagine :
$url = $scoopItService->getAuthorizationUri(array('oauth_token' => $token->getRequestToken())); header('Location: ' . $url);
But how can i do in symfony way.
I try :
response = new Response(); $response->setStatusCode(200); $response->headers->set('Location', 'url=' . $url); $response->send();
but after that, i'm stuck

Dude, this requestToken is for the authentication process, not to request data from the api.
To send a Response in Symfony have a look here: https://symfony.com/doc/current/controller.html or just use https://symfony.com/doc/current/controller.html#redirecting .
The easiest way for you to achieve your goal would be to use https://github.com/hwi/HWIOAuthBundle for authentication.

I'm gonna close this one since it's not an issue at all but more of a lack of base knowledge. Please read the docs of Symfony and try to integrate the HWIOAuthBundle for authentication.

thank you for your time.


Spindump does not work with tun0 interfaces

Reported by Vicknesan Ayadurai

Better testing added in commit 88e4703.


Line chart datapoint popups

When I hover over my line chart, I'm not getting any data point popups. Are they supported?

I am. D'oh. I missed that nuance. And didn't look at other than line chart examples that had Tooltip specified. Thanks.

No worries! Thanks!


Add example app for LP503x LED driver

Summary
Adds example app for LP5030/LP5036 RGB LED driver chip. Depends on successful merge of related PR in main NuttX repo for the relevant driver
Impact
None
Testing
Custom board with SAMA5D27C-D1G with 2x LP5036 driver chips

@TimJTi please remove the merge patch from PR.

@TimJTi please remove the merge patch from PR.

Oh! That should have been an operation on my fork not that commit. I will fully "get" git operations one day! I'll sort it.

@TimJTi will you fix the remain comment

@TimJTi will you fix the remain comment

@xiaoxiang781216 - I miss one, sorry.

but I don't see any change to add FAR. You can check each comment one by one. If you made the modification, github will mark Outdated at the right side.

@xiaoxiang781216 Yes, I lookd for "outdated" and I looked for one as per your comment. But it looks like there were 7 or 8 actually. Github tends to roll up comments and hides them which doesn't help.

@xiaoxiang781216 - is the general rule that things that could be used for any arch, 8/16/32/64 bit, such as apps or generic drivers, we need the FAR; but if its code that is specific for a 32/64 bit arch we don't need FAR?
Only ever developed for 32bit processors so this is a new (but old!) one for me.

@xiaoxiang781216 Yes, I lookd for "outdated" and I looked for one as per your comment. But it looks like there were 7 or 8 actually. Github tends to roll up comments and hides them which doesn't help.

Yes, you have to expend all comment and check them one by one.

@xiaoxiang781216 - is the general rule that things that could be used for any arch, 8/16/32/64 bit, such as apps or generic drivers, we need the FAR; but if its code that is specific for a 32/64 bit arch we don't need FAR?
Only ever developed for 32bit processors so this is a new (but old!) one for me.

The rule is simple:

You can skip FAR if the source file locate in arch or board and arch/board is 32bit/64bit
All other source files need to add FAR in general since they should work for 16bit arch too.


openpilot feedforward function doesn't match real world data

So I was trying to gather data to make a script that could get the optimal feedforward k_f tuning value based on torque and angle and speed, which it did with least squares/scipy's curve_fit function. However when plotting the data I noticed that the speed ** 2 part of the function didn't align with data plotted from my car. And sure enough, I felt this in my car as well; a value would steer well at 30 mph but oversteer at 70 mph, and vice versa if I tuned at 70 mph (understeer at 30 mph).
You can see from the bottom two graphs the orange line (current op ff function) is applying too much torque at 65 mph and not enough at 25 mph with a single value.

For the upper speed graphs, it also makes sense that torque shouldn't start at 0 from 0 mph, causing speeds like 5-20 mph to have much less torque than needed for a turn, the poly function seems to fix that as well.
I then fitted a model that took in a k_f for angle, and 3 degrees of a polynomial for speed, and fitted against the data (speed and angle as input, torque as output). You can see the purple lines much more closely fit to the data plotted from my car.
(And yes, I offset the torque by my steer delay in the data so that what torque was being commanded matched with the angle that openpilot expected to reach).
Here's the function I fit:
def _custom_feedforward(_X, _k_f, _c1, _c2, _c3):  # automatically determines all params after input _X
  v_ego, angle_steers = _X.copy()
  steer_feedforward = angle_steers * (_c1 * v_ego ** 2 + _c2 * v_ego + _c3)
  return steer_feedforward * _k_f

Is there any chance of getting this upstreamed into openpilot? It really does seem smoother for me, and one other who's tested it says it feels better than stock too.

My next step is going to be able to get these values from a cabana drive, rather than gathering data while in the car, so other cars can more easily be tuned. That would be the hardest part, updating and tuning every car currently in openpilot.

We are certainly interested in this. Submit a PR for a model, and get a couple people to confirm it's better. I think a third order polynomial is a reasonable choice, though I don't know enough controls to say for sure.

The only issue I'm having with getting the LogReader to work with the rlogs is that there seems to be lag in the logs? I use data from three different messages, pathPlan (angle_steers_des to filter out samples where angle isn't near it), carState, and can (for torque and if steer req). Since two are at 100Hz and one is 20Hz the data doesn't match up completely, and the time from carState to the can message grows from 0.001 to 0.2 seconds at times. Is there an easier way to compile data from multiple messages? Iterate through all messages at each point in time?

Yeah the polynomial gives the well needed torque at low speeds, v_ego**2 just wasn't a good fit for all speeds. So is that equation just not what it's supposed to be; realigning tire momentum (~ lateral accel)? Or is lateral accel not what feedforward needs to be?

v_ego**2 should mostly match the physical properties of the realigning force on the tires. But there are probably other things going in the EPS where it tries to compensate for speed leading to the observed behavior.
For the top plot I'm not entirely sure the new function is a better fit. They both look quite arbitrary given the data. I think a statistical test would fail horribly on both FF models. How repeatable is your fitting tool (how much do the values differ if you fit on two different routes)?
I also want to look into an on-line tuning of INDI for all cars. If that's very stable that should also solve a lot of problems.

You're right about the top plot, but I still think the results from the bottom two (how the current function compares at low speed vs. high speed) are something to consider. Even while tuning I could tell that one value didn't work at all speeds, if I tuned kf at 30 mph for sharp curves, it would always oversteer slightly at 60+ mph.
So with the data from the rlogs using the MultiLogIterator, the same exact drives give much noisier data compared to my initial data gathering (writing to a file from carcontroller with everything I needed), for example there's a considerable number of samples where torque is > 1000 and yet angle is < 5 deg. These samples don't show up in the data I gathered myself, using the same exact filtration code. So I decided to use the speed poly from my drives and just have the script fit k_f, replacing v_ego ** 2 with the poly function I fit from my custom data (50+ miles).
I think it at least needs a few miles engaged with curves, just one route won't be enough data to give an accurate result, even just fitting k_f, not the poly for each car.

By the way, here's the poly I found from ~50 miles of data, nearly always engaged with sharp curves:
def _custom_feedforward(_X, _k_f):
  v_ego, angle_steers = _X.copy()
  _c1, _c2, _c3 = 0.34365576041121065, 12.845373070976711, 51.63304088261174
  steer_feedforward = angle_steers * (_c1 * v_ego ** 2 + _c2 * v_ego + _c3)
  return steer_feedforward * _k_f

I also want to look into an on-line tuning of INDI for all cars. If that's very stable that should also solve a lot of problems.
INDI is pretty amazing, 0.1 timeconstant and 0.5 cost on TSS1.5/TSS2 (torque angle sensor) is a dream.

I think there is a fundamental issue with INDI that might only be a problem on older cars (especially TSS1 with its worse angle and torque sensor/motor). I notice that if I'm on a bumpy road with pot holes that while the wheel shakes INDI does not apply any torque whatsoever, causing me to leave the path and eventually the road if it goes on for long enough. I can replicate this behavior on a smooth road at any speed if I just shake the wheel back and forth slightly, I can pull the car out of the lane without any resistive torque against me. When I let go, it takes half a second or so for it to recover, which can be very dangerous.
With PID, while shaking it/going over bumpy road it always tries to apply torque and keep me on path. When letting go after shaking it immediately recovers.
I tried tuning INDI for almost an hour and couldn't get anything nearly as good as PID+F. Maybe it's my car, or my bad tune, but INDI just isn't very safe for my Corolla on bumpy road (or anything external that moves the wheel like camber as well). Just wanted to share an anecdotal experience I had with INDI.


Additional filters for Marktplaats bridge

Hi!
I want to follow up on someone else's request about getting a category filter implemented for the Marktplaats bridge (#1953).
At the time @Park0 said he couldn't figure it out. I found the solution though. I commented that on the closed issue:
https://github.com/RSS-Bridge/rss-bridge/issues/1953#issuecomment-1676825940
https://github.com/RSS-Bridge/rss-bridge/issues/1953#issuecomment-1676833630
I actually looked for it before too and couldn't find it, so just made a simpler implementation at the time for personal use with an input field for l1 and l2 category ID. Haven't used it in a while anymore as I didn't need it anymore for what I got it, and it wasn't convenient to search through other categories this way. But just looked for it again for the heck of it, and pretty much immediately found it.
It's also possible to include more of the filters, like offeredSince. Everything is given in the GET API calls that Marktplaats makes when you load it and search through it (examples in the comments I linked).
If someone can implement this (@Park0 or @ggiessen ?) that would be great!
If not, I'll do this if I find the time to.

Did u also find a way to get the details of a advertisement? That would require a extra call but may be useful given it's cached properly.

Did u also find a way to get the details of a advertisement? That would require a extra call but may be useful given it's cached properly.

I just started using the bridge again.
What details would you exactly need? I assume the description and attributes?
If you do a GET request to the URL of an add, it returns all the info.
The description is under the class "Description-description", and the attributes are in the class "Attributes-list".
I'd suggest a checkbox to choose whether to load the details, and only do the second call if that's checked
I guess pictures would also be possible.
The images are all in the "Thumbnails-scroll" class.
The image URLs here all end with "?rule=eps_14". This loads the thumbnails, limited to 64 pixels in width.
If you change this to "?rule=eps_84", you get the images it loads into the carousel when you hover over a thumbnail, limited to 498 pixels in width.
If you change this to "?rule=eps_86", you get the (as far as I know) highest possible resolution that it loads when you click on an image in the carousel, which is limited to 1024 pixels in width.
Downloading some random images (two per size), the thumbnails came to about 1KB.
The mid-size 16,4KB and 17,3KB, and the max-size 45,0KB and 54,7KB.


adds instance back to Class.ajaxSuccess args. addresses #573

I can't really figure out why it was working as it did in Spine < 1.3.2 but this brings that back in a way. if we want it...

I think the model instance's trigger method added the this object to the arguments before calling the class trigger method. At least that was how it was done before.
https://github.com/spine/spine/blob/b35f901836dd2de2a4a85e143b5bcec92bd4af2e/src/spine.coffee#L486
So something like this would make the events behave as before?
  trigger: ->
    Events.trigger.apply this, arguments
    return true if arguments[0] is 'refresh' # Don't trigger refresh events
    arguments.splice(1,0,this)
    @constructor.trigger arguments...

I tried a handful of things, but the new events system doesn't typically like the instance being spliced in like that. I can make it work that way only for ajaxSuccess of course:
trigger: (args...)->
    # fire off the instance event
    Events.trigger.apply this, args
    return true if args[0] is 'refresh' # Don't trigger refresh events , because...
    args.splice(1, 0, this) if args[0] == 'ajaxSuccess'
    # fire off the class event
    @constructor.trigger args...

but that is not better than the change in the commit above really

hmmm... actually only change doesn't like item... this does alright.
trigger: (args...)->
    # fire off the instance event
    Events.trigger.apply this, args
    return true if args[0] is 'refresh' # Don't trigger refresh events , because...
    args.splice(1, 0, this) unless args[0] == 'change'
    # fire off the class event
    @constructor.trigger args...

looking a little more at the new events code it looks like the 'this' object is a part of the trigger call on most of the internal spine events, so this would be added twice in some cases with the suggestion I made above. Maybe it is simplest to just add it to the ajaxSuccess trigger.


Remove a deadlock during shutdown.

If queries are still running when the shutdown is initiated, they will
finish during the shutdown. In that case, they might request chunk
eviction upon unpinning their pinned chunks. That might completely
fill the evict request queue after draining it during storage
shutdown. If that ever happens (which is the case if there are many
queries still running during shutdown), the affected queries will be
stuck while keeping a fingerprint locked. The checkpointing can then
not process that fingerprint (or one that shares the same lock). And
then we are deadlocked.
@juliusv
@grobie so that he can enjoy the verbose commit description. :)

:+1: though we should seriously also consider whether to not allow any queries at all once shutdown has been initiated.

@beorn7 :heart_eyes:


[topgen,clkmgr] Further tidy-ups paving the way for multiple "hint" clocks in a module

The first two patches in this queue are all about de-duplicating logic to make sure everything matches. The third patch expands some of the names in clkmgr so that it's possible for a block to expose more than one "idle" hint. We don't actually do that yet, but this is a necessary change to make it happen. The final patch is just a tweak to tidy up how we're expand templates.

Hmm, this isn't going to work without doing the wiring work as well. The failing test (clkmgr_smoke) is because we've connected up the HintIoDiv4Otbn signal but not HintMainOtbn (since, alphabetically, that comes first). Unfortunately, we're checking that clk_main_otbn stops, which it doesn't!
I'll close this PR for now and re-open it later with an extra couple of patches earlier in the queue that keep everything working.

let me know if there's anything you want me to help with @rswarbrick.
Can you remind me, is the plan now to expose multiple idle from otbn, or stick with one idle for multiple clocks?
I think for the level of our design, it's fine to simplify to the latter.  Although if you guys prefer to more complete solution that's fine too.

I think the plan is to expose multiple idle signals (because it moves the complexity from clkmgr to the blocks). I've almost got things working here: should be able to push up a proper patch sometime tomorrow.

Oh drat! It looks like I can't re-open this PR because I've force-pushed to the branch in the meantime. Will start again :-)


Boolean converter should return undefined if parameter is optional

Informations
When a optional boolean parameter isn't set in url, boolean converter should return undefined instead of false.
Exemple
My controller :
@Get('/news')
@Description('Get list of news')
@Returns(NewsList)
public async get(
    @QueryParams('forced') forced?: boolean,
  ): Promise<NewsList> {
  console.log('forced', forced) // print forced false if forced == undefined
  return something...;
}

With this url : localhost:3000/news, console.log should print forced undefined but print forced false.
Works perfectly with localhost:3000/news?forced=true, console.log print forced true.
Possible solution
Add if (data === "") return undefined; in the switch case Boolean in this file.
Or just return undefined; instead of return !!data;

Released :)


rely more on SciPy for DPSS tapers

closes #11292
@larsoner @mmagnuski this goes a bit beyond what you two discussed in #11292, but the changes are well-segregated by commit so it will be easy to revert part of it if needed:

[x] deprecate DPSS interpolation in the API; remove associated code and just compute directly for large N
[x] expose SciPy's sym and norm parameters
[x] use sym=False when we are doing spectral estimation
[x] use scipy.signal.morlet2 and scipy.signal.cwt where possible will do in a separate PR

Feel free to review now (just the DPSS changes) and I'll add the morlet / CWT changes in the next couple days (or can bump that to a separate PR if you prefer)

@mmagnuski @larsoner this one is ready for review.  CIs were green before fixing the changelog merge conflict so should hopefully stay that way!

all green, and @larsoner's comments addressed. @mmagnuski do you want to look?

Looks good, thanks @drammock!


Update composer.json

Laravel doesn't follow semver. So having ^5.x, 5.* or >=5.x will mean that composer will install a future version even though that version breaks the package.

Is this an automated PR or something?

@dwightwatson No it is not. I do it manually and use an auto-reply for the message here. (in case you saw it elsewhere)

Oh okay, was just wondering as this repo is still a work in progress without any users so was curious as to how it was found. Thanks for the change though, makes sense.

All laravel repos that recently updated can be found here. I often check that list.

Oh cool, never seen that before. Thanks for letting me know!


Cover art won't update properly some podcasts feeds (feedburner)

CPod version: v1.27.1
Platform: Ubuntu
Install type (.deb, Snap, etc.): deb
Description:
Cover art won't update properly some podcasts feeds.
Appears unrelated images from the feed webpage instead.
On others podcast clients it works so I imagine it is considering something on parsing.
Did the bug only appear after a CPod update? Version before, after: the later 2 version I used.

I suggest adding extra checks and try collect a valid image.
on cbus-server-get-podcast-info.js file adding regex url image check.
function validURL(str) {             var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol               '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name               '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address               '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path               '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string               '(\\#[-a-z\\d_]*)?$','i'); // fragment locator             return !!pattern.test(str);           }
and then starting at line 42
 if (imageElem.tagName === "image" && imageElem.getElementsByTagName("url")[0] && validURL(imageElem.getElementsByTagName("url")[0].textContent)) {                 podcastData.image = imageElem.getElementsByTagName("url")[0].textContent;               } else if (imageElem.tagName === "itunes:image") {                 podcastData.image = imageElem.getAttribute("href");               }else if(imageElem.tagName==="googleplay:image"){                 podcastData.image = imageElem.getAttribute("href");               }


What is different between FlatMap and Map

By FlatMap Documentation

FlatMap applies a function to each item in an input channel, where the function returns a channel of items.
These items are then flattened into a single output channel using n goroutines for concurrency.

However, Map also return a channel Try. We also use a single output channel of Try and iterate the value.
As a user, I don't know what is difference?

The main difference between Map and FlatMap lies in the type of function they accept and how the output is handled:
Map takes a function f that transforms an item of type A into an item of type B directly, i.e., f(A) (B, error). The resulting items are then sent to the output channel.
FlatMap, on the other hand, takes a function f that transforms an item of type A into a channel of items of type B, i.e., f(A) <-chan Try[B]. This allows for more complex transformations where each input item can potentially produce multiple output items. FlatMap then flattens the resulting channels into a single output channel.
Consider the following example:
Suppose you have a hypothetical API that returns a stream of products for a given category ID:
func getProducts(categoryID int) <-chan rill.Try[*Product] {...}

Now, you have a stream of category IDs (categoryIDs) and want to get all products from those categories. If you used a regular Map, you'd end up with a stream of streams, but with FlatMap all product response will flattened into a single stream:
allProducts := rill.FlatMap(categoryIDs, 5, getProducts)

FlatMap is a common operation in functional programming and is not unique to this library. You can find more information about FlatMap in various programming languages, such as this explanation for JavaScript: FlatMap - JavaScript | MDN
Thanks for pointing out the lack of clarity in the current FlatMap documentation. I appreciate your feedback, and I'll make sure to update the documentation in the next release.


Backoffice: Table representation of the records

Design UX friendly ways of representing result row on the search pages in the backoffice
INSPIRATION:
https://help.smartrecruiters.com/Interviewing_and_Hiring/Managing_Candidates/People_List

Make ID field independent from the table key (to be able to display/hide ID field on demand)


FTS: Adds Full Text Search and Indexing Policy

Description
This PR adds a new FullTextPolicy  in ContainerProperties and a new FullTextIndexes in  the IndexingPolicy to enable Full Text Search in Cosmos DB.
Below is a sample for the new ContainerProperties with Full Text Indexing Policy andFull Text Policy highlighted.
{
	"indexingPolicy": {
		"automatic": true,
		"indexingMode": "Consistent",
		"additionalIndexPolicy": "indexpolicyvalue",
		"includedPaths": [
			{
				"path": "/included/path",
				"additionalIncludedPath": "includedPathValue",
				"indexes": [

				]
			}
		],
		"excludedPaths": [
			{
				"path": "/excluded/path",
				"additionalExcludedPath": "excludedPathValue"
			}
		],
		"compositeIndexes": [
			[
				{
					"path": "/composite/path",
					"additionalCompositeIndex": "compositeIndexValue",
					"order": "ascending"
				}
			]
		],
		"spatialIndexes": [
			{
				"path": "/spatial/path",
				"additionalSpatialIndexes": "spatialIndexValue",
				"types": [

				]
			}
		],
		"fullTextIndexes": [
			{
				"path": "/fullTextPath1",
			},
			{
				"path": "/fullTextPath2",
			},
			{
				"path": "/fullTextPath3"
			}
		]
	},
	"computedProperties": [
		{
			"name": "lowerName",
			"query": "SELECT VALUE LOWER(c.name) FROM c"
		},
		{
			"name": "estimatedTax",
			"query": "SELECT VALUE c.salary * 0.2 FROM c"
		}
	],
	"geospatialConfig": {
		"type": "Geography",
		"additionalGeospatialConfig": "geospatialConfigValue"
	},
	"uniqueKeyPolicy": {
		"additionalUniqueKeyPolicy": "uniqueKeyPolicyValue",
		"uniqueKeys": [
			{
				"paths": [
					"/unique/key/path/1",
					"/unique/key/path/2"
				]
			}
		]
	},
	"conflictResolutionPolicy": {
		"mode": "LastWriterWins",
		"additionalConflictResolutionPolicy": "conflictResolutionValue"
	},
	"clientEncryptionPolicy": {
		"includedPaths": [
			{
				"path": "/path",
				"clientEncryptionKeyId": "clientEncryptionKeyId",
				"encryptionType": "Randomized",
				"additionalIncludedPath": "includedPathValue",
				"encryptionAlgorithm": "AEAD_AES_256_CBC_HMAC_SHA256"
			}
		],
		"policyFormatVersion": 1,
		"additionalEncryptionPolicy": "clientEncryptionpolicyValue"
	},
	"id": "2a9f501b-6948-4795-8fd1-797defb5c466",
	"partitionKey": {
		"paths": [

		],
		"kind": "Hash"
	},
	"fullTextPolicy": {
		"defaultLanguage": "en-US",
		"fullTextPaths": [
			{
				"path": "/fullTextPath1",
				"language": "en-US"
			},
			{
				"path": "/fullTextPath2",
				"language": "en-US"
			},
			{
				"path": "/fullTextPath3",
				"language": "en-US"
			}
		]
	}
}

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:

[ ] The pull request does not introduce [breaking changes]
[ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
[ ] I have read the contribution guidelines.

General Guidelines and Best Practices

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

API change check
APIView has identified API level changes in this PR and created following API reviews.
com.azure:azure-cosmos

Can you please list the JAVA usage examples also in the description.

/azp run java - cosmos - tests

/azp run java - cosmos - tests


Missing highlight in assume attribute

Clangd does not highlight the expression in the assume attribute.

System information

Output of clangd --version:
clangd version 19.1.0
Features: windows
Platform: x86_64-pc-windows-msvc

Editor/LSP plugin:
VS Code

Operating system:
Windows 11 27744

true is not the best example because it's not highlighted by clangd, it's highlighted by the client; I would suggest filing an issue at https://github.com/jeff-hykin/better-cpp-syntax about that.
But the problem does also exist for things that clangd highlights, for example:
void foo(int x) {
  [[assume(x > 5)]];
}

Here, the x in the assume should be highlighted by clangd but it's not.
The issue is also not limited to semantic highlighting: go-to-def on that x (or any other semantic feature, like hover) does not work either.


View options (Highlist triggers / font size) only work on chrome

Highlight triggers only work on chrome, with firefox i have black and white background
Same for font size, i cant change font size with firefox
Thank you for your work !

Could you post screenshots? Can't replicate this in my Firefox browser (v 59 on Linux).


Provide a browser version that doesn't require ES modules

Right now I can do:
import YAML from<EMAIL_ADDRESS>
but that requires me to change existing scripts to be modules.
I'd like to be able to use YAML by just doing:
<script src="..."></script>

As this is a source repository that does not package the code for production, what you're asking for is a bit beyond its scope.
You're probably best off by packaging yaml yourself in a shape that suits your use case.


Fix hidden x-scrollbar

fix #184
supersedes #209
related to https://github.com/src-d/sourced-ui/pull/196#issuecomment-508538202
Superset calculates the height of the filtered table with javascript, using hardcoded heights for tabs [1] and buttons [2], so when there is more than one line of tabs, the filtered table does not fit in the available space, appearing a new outer scroll (as it can be seen in the screenshot below) as described by #184.
With this PR, the filtered table is positioned using absolute coordinates, leaving space for all the components in the panel, no matter how much lines of tabs are opened.
If this PR is approved, the SQL Lab would be like this :point_down:

instead of how it was in the previous version without branding: v0.3.0 :point_down:

Only tested in Chrome-Linux; could you please try in other supported browsers?

To add more context: the extra scrollbar that I reported is there even if there is only one row of tabs, since the hardcoded heights do not match the new css.
Which is a different problem to having more than one row of tabs.
Testing this locally, it fixes both problems.
@dpordomingo should this be contributed upstream? The problem will happen with more than one row of tabs, and they might also prefer to have css sizing instead of a hardcoded value that can be more prone to errors.

Yes, this could be contributed into superset.
Do you agree on merging, and postpone the contribution later?
As soon as it's accepted, I'll apply it here.

ok.
But let's first test it with firefox too at least.

I'd say that it's also ok in Firefox :point_down:


set responsive image css custom?

i use --slider-height-percentage 25% ,  image not  not working responsive.

Hi @PokerJava. If by "not working responsive" you mean that it doesn't fit slider properly, you didn't configure styles.scss for react-awesome-slider. You probably have in your styles.scss
// Note: below code starts at line 101 in default file
> img,
> video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

Let's refer to w3schools docs about object-fit cover attribute:

The replaced content is sized to maintain its aspect ratio while
filling the element's entire content box. The object will be clipped to fit

Check this site's slider
If this is the behaviour you expect from react-awesome slider refer to latest issue here

You might wanna look at #147


Does web support offline data sync?

From the docs, it seems like offline data sync only works with cordova, not web. Is that so? If so, why and what advice to get this to work with Angular 2 web, mobile, and desktop app? Thx

technically, offline data sync is available for web as well - all you have to do is write an appropriate synctable implementation for the web.  WebSQL would probably work well here.
reality is that we haven't tried it.  We've just designed the interfaces appropriately to make it possible.  It isn't a functionality available "out of the box"
if you give it a go, then let us know how you get on.  We also accept pull requests if you want to donate your work to the (open source) project.


Date fields causing "Dynamic require of react is not supported"

Payload Version
beta.50
Node Version
18
Next.js Version
15
Describe the Bug
Adding a date field and loading the collection in the admin causes the following error:
Note: this does not happen in the monorepo dev suite

Reproduction Steps

Add collection with date field
Attempt to create new in admin

Adapters and Plugins
No response

Fixed by https://github.com/payloadcms/payload/pull/6833


yaml for easier install

Hi @ojcharles
Thanks for creating this R package.
I found it easier to use conda for nearly all the dependencies. I've created a conda.txt (yaml) file for easy install.
mamba env create -f conda.yaml -c conda-forge -c bioconda

This works for me on a linux system.
Installing manually with R caused some odd issues with some of the bioconductor packages.
Thanks,
Ammar

Nice!
Would you mind making a pull request? It's a nice feature and it's always good to attribute credit!

Sure thing, I would love to contribute.


Removed RegEx Middleware from the Core SDK. Aligns with existing plans and current Node SDK.

Note that the AlarmBot samples needed these components. Rather than re-write or drop them at this time, I've simply moved the code into the sample(s) and updates the namespaces to match.
Current intent is to (soon) drop those samples in favor of others (Contoso-Flowers?), so the work to rewrite them to not need the RegEx library is not worth it at this time.
Pulling the RegEx Recognizer and realted code from the Core Namespaces means the documentation team doesn't need to document the code, which doesn't make sense at this time.

@cleemullins , looks fine by me. I'd be concerned about the use of the FlexObject, but that will just affect this one sample when the FlexObject goes away. (Assuming it still is.)


Error while loading the docx(KeyError: "There is no item named 'word/#_top' in the archive")

Hello Team we are using below code to load the document
from docx import Document

# Path to your DOCX file
docx_file_path = 'myfile.docx'

# Load the DOCX file
document = Document(docx_file_path)

# Example: Print all the text in the document
for para in document.paragraphs:
    print(para.text)

Getting below error:
KeyError                                  Traceback (most recent call last)~\AppData\Local\Temp\ipykernel_13540\1987488543.py in <module>      5       6 # Load the DOCX file----> 7 document = Document(docx_file_path)      8       9 # Example: Print all the text in the document~\Anaconda3\lib\site-packages\docx\api.py in Document(docx)     21     """     22     docx = _default_docx_path() if docx is None else docx---> 23     document_part = Package.open(docx).main_document_part     24     if document_part.content_type != CT.WML_DOCUMENT_MAIN:     25         tmpl = "file '%s' is not a Word file, content type is '%s'"~\Anaconda3\lib\site-packages\docx\opc\package.py in open(cls, pkg_file)    114     def open(cls, pkg_file):    115         """Return an |OpcPackage| instance loaded with the contents of `pkg_file`."""--> 116         pkg_reader = PackageReader.from_file(pkg_file)    117         package = cls()    118         Unmarshaller.unmarshal(pkg_reader, package, PartFactory)~\Anaconda3\lib\site-packages\docx\opc\pkgreader.py in from_file(pkg_file)     23         content_types = _ContentTypeMap.from_xml(phys_reader.content_types_xml)     24         pkg_srels = PackageReader._srels_for(phys_reader, PACKAGE_URI)---> 25         sparts = PackageReader._load_serialized_parts(     26             phys_reader, pkg_srels, content_types     27         )~\Anaconda3\lib\site-packages\docx\opc\pkgreader.py in _load_serialized_parts(phys_reader, pkg_srels, content_types)     51         sparts = []     52         part_walker = PackageReader._walk_phys_parts(phys_reader, pkg_srels)---> 53         for partname, blob, reltype, srels in part_walker:     54             content_type = content_types[partname]     55             spart = _SerializedPart(partname, content_type, reltype, blob, srels)~\Anaconda3\lib\site-packages\docx\opc\pkgreader.py in _walk_phys_parts(phys_reader, srels, visited_partnames)     84                 phys_reader, part_srels, visited_partnames     85             )---> 86             for partname, blob, reltype, srels in next_walker:     87                 yield (partname, blob, reltype, srels)     88
~\Anaconda3\lib\site-packages\docx\opc\pkgreader.py in _walk_phys_parts(phys_reader, srels, visited_partnames)     84                 phys_reader, part_srels, visited_partnames     85             )---> 86             for partname, blob, reltype, srels in next_walker:     87                 yield (partname, blob, reltype, srels)     88
~\Anaconda3\lib\site-packages\docx\opc\pkgreader.py in _walk_phys_parts(phys_reader, srels, visited_partnames)     79             reltype = srel.reltype     80             part_srels = PackageReader._srels_for(phys_reader, partname)---> 81             blob = phys_reader.blob_for(partname)     82             yield (partname, blob, reltype, part_srels)     83             next_walker = PackageReader._walk_phys_parts(~\Anaconda3\lib\site-packages\docx\opc\phys_pkg.py in blob_for(self, pack_uri)     81         Raises |ValueError| if no matching member is present in zip archive.     82         """---> 83         return self._zipf.read(pack_uri.membername)     84      85     def close(self):~\Anaconda3\lib\zipfile.py in read(self, name, pwd)   1470     def read(self, name, pwd=None):   1471         """Return file bytes for name."""-> 1472         with self.open(name, "r", pwd) as fp:   1473             return fp.read()   1474
~\Anaconda3\lib\zipfile.py in open(self, name, mode, pwd, force_zip64)   1509         else:   1510             # Get info object for name-> 1511             zinfo = self.getinfo(name)   1512    1513         if mode == 'w':~\Anaconda3\lib\zipfile.py in getinfo(self, name)   1436         info = self.NameToInfo.get(name)
   1437         if info is None:
-> 1438             raise KeyError(
   1439                 'There is no item named %r in the archive' % name)
   1440

KeyError: "There is no item named 'word/#_top' in the archive"

Let me know am i doing anything wrong, also it will be helpful if u provide some suggestion to resolve this issue

Sounds like a corrupted docx file. Maybe open it with Word or LibreOffice and save as a new name so it rewrites the file.

Hello, Thanks for you response. I tried saving with new name but still got the same error. I revalidated the docs it’s not corrupted

@akash97715 if you can send the file I'll take a look at it. Otherwise I just don't have enough to go on. I've never seen this error before and I've been at it for over a decade, so this is something of an edge case.
Do you know the provenance of the document? Was it generated by some package rather than being authored using Word or LibreOffice?

@scanny I am facing the same issue. I tried renaming the file & saving it again but still getting the issue. I am able to open the file correctly in MS Word.

I also encountered the same problem, unfortunately I couldn't find the cause, but I used the pypandoc library to read it and saved it again to read it normally, although it would lose my necessary file metadata.


Vulnerability roundup 94: jenkins-2.249.2: 3 advisories [5.4]

search, files

[ ] CVE-2020-2229 CVSSv3=5.4 (nixos-20.09)
[ ] CVE-2020-2230 CVSSv3=5.4 (nixos-20.09)
[ ] CVE-2020-2231 CVSSv3=5.4 (nixos-20.09)

Scanned versions: nixos-20.09: 0b8799ecaaf.
Cc @coreyoconnor
Cc @earldouglas
Cc @fpletz

NixOS 20.09 is EOL, so this issue isn't actionable anymore (but fixed in unstable).


[libra-channel] fix race causing channel close to deadlock

We've been experiencing intermittent flaky tests in network related to
simultaneous dial tests. In the simultaneous dial logic, we sometimes
signal an existing Peer instance that it should close by dropping its
libra_channel::Sender<ProtocolId, NetworkRequest> in the active_peers
map. After much investigation, it turns out that dropping the peer
Sender handle would sometimes fail to wake up the Receiver, who
was responsible for tearing down the Peer instance upon observing the
channel shutdown. As a result, the tests would sometimes deadlock,
leading to the observed flakiness in our test suite.
The fundamental issue in libra-channel was using the shared state
Arc's strong_count as a proxy for the number of live Senders and
the resulting race condition between dropping a Sender and waking the
Receiver.
// 1. queue is empty, one Sender, one Receiver
// 2. Sender drop
// 3. Sender acquires lock, wakes Receiver, releases lock.
// 4. Sender gets preempted _before finishing drop_ (so strong_count is
//    not updated yet)
// 5. Receiver wakes up, observes no items in the queue, observes
//    strong_count > 1.
// 6. Receiver registers its waker, and goes back to sleep.
// 7. Sender finally gets run and finishes dropping.
// 8. Deadlock! All Sender's are dropped and Receiver will never receive
//    an external stimulus to wake again.

impl Drop for Sender {
    fn drop(&mut self) {
        // 2.
        let mut shared_state = self.shared_state.lock().unwrap();
        if let Some(waker) = shared_state.waker.take() {
            waker.wake();
        }
        // 3. compiler: shared_state unlock
        // 4. preempted
        // compiler: Arc::drop
        // 7.
    }
}

// ..

impl Stream for Receiver {
    fn poll_next(/* .. */) -> Poll<Option<Self::Item>> {
        // 5.
        let mut shared_state = self.shared_state.lock().unwrap();
        if /* popped item from queue */ {
            // ..
        } else if Arc::strong_count(&self.shared_state) == 1 {
            shared_state.stream_terminated = true;
            Poll::Ready(None)
        } else {
            // 6.
            shared_state.waker = Some(cx.waker().clone());
            Poll::Pending
        }
    }
}

To fix this issue, we add an explicit num_senders field to keep track
of the number of active Sender handles. When num_senders reaches 0
during Sender::drop we can safely wake the Receiver.
Note: unfortunately, using num_senders means we must acquire the lock
to increment num_senders on Sender::clone, which is intended to be a
very cheap operation... If this appears to be a bottleneck, we can try
optimizing it (ideally with the help of a concurrency model checker like
tokio-rs/loom).

@bors-libra delegate+

:v: @phlip9 can now approve this pull request

@bors-libra r=ankushagarwal

:pushpin: Commit 9d80957 has been approved by ankushagarwal

:hourglass: Testing commit 9d80957dd154fbdb9de1c6e3ac1a6a9de2f0cb2d with merge 63b06fb992896e99cd8c38a68459a5e15710ed0b...

:broken_heart: Test failed - checks-actions_land_blocking_test

@bors-libra retry

:hourglass: Testing commit 9d80957dd154fbdb9de1c6e3ac1a6a9de2f0cb2d with merge 38b0f4593e31080c0072dcd4e83a3e55d1a08ca0...

@bors-libra r=ankushagarwal

:bulb: This pull request was already approved, no need to approve it again.

This pull request is currently being tested. If there's no response from the continuous integration service, you may use retry to trigger a build again.

:pushpin: Commit 9d80957 has been approved by ankushagarwal

:hourglass: Testing commit 9d80957dd154fbdb9de1c6e3ac1a6a9de2f0cb2d with merge a2a8f55673db0cc656c30ef81feed9e0fe31a08b...

:broken_heart: Test failed - checks-actions_land_blocking_test

@bors-libra retry

@bors-libra r=ankushagarwal

:pushpin: Commit efcee29 has been approved by ankushagarwal

:hourglass: Testing commit efcee2964722c0e554b24faf19bc3531eae03c5a with merge eaaf50834303010595387d0ef6a9d31f1854b9b4...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: ankushagarwal
Pushing eaaf50834303010595387d0ef6a9d31f1854b9b4 to master...


Unraid template

For those using Unraid will there be an official template for the community store.
Unraid can use docker compose but it's nowhere near as polished as templates from the community store.
Looking forward to trying this project, it looks well designed!

Nope - not at this time. I’d never even heard of it until you mentioned it! Open to a pull request though, if you or someone else with the expertise wants to take a crack at? I will reopen this issue if that is the case. Thanks!


How to do a poll?

I'm trying to create a poll using a slash command.
So basically I just want to do a message with an embed and once people react to that, I want to call a Lambda function which count the vote.
This poll will also have an end date at which another Lambda function will be called to perform an action with the poll results.
I'm using Lambda as the server, with this repository: https://github.com/ytausch/serverless-discord-bot
My main question here is, what's the best way to listen to those events (reaction and poll expiration date) using slash-create? I'm kind of lost in the documentation.
--
I'm thinking that perhaps the most direct way would be creating the poll message using a slash command and then schedule another lambda to be triggered at expiration date, to do the final reaction counting (so counting the votes just at the end), but I'm wondering if there's a smarter way to go about it.

slash-create (or interactions) don't use reactions or have an interaction type for events. If you want to count something for each time someone votes for a poll, I'd recommend using select menus or buttons. You could also fetch the original message to read the reactions after it's over if you want. (although I probably have not exposed that to the Message class, so that could be a PR.)

I was trying to do it this way:
  async run(ctx) {
    // Reply immediately. The scheduling takes more than the timeout
    const response = await ctx.send("The poll goes here", {
      ephemeral: true,
    });

    await scheduleResultsCounting(response);
  }

But response resolves only to true (I'd need the message ID), is this where you mean you haven't exposed to the Message class?

await ctx.fetch() after sending. That should give you the message object.

Just tried, but for some reason that makes the command fail with "This interaction failed". I'm using Lambda.


Blue Science prerequisites

If SCT is enabled, add Cobalt Steel as prerequisite for Blue Science (or just for lab?)

Blue circuits require titanium

Garden processing: add prerequisite on Electronics

Basic chemistry 2: add prerequisite on coal processing (for carbon)


Install required package tpm2-abrmd-selinux

/packit retest-failed

Expected fail due more strict port policy.