Update to latest ggml and bring back bindgen as a dev dependency

The latest updates to GGML had introduced changes in lots of functions (many values have changed from i32 to i64) and some structs had its layout changed, which caused UB because our bindings were not up to date.
This PR brings back bindgen, but adds it as a dev dependency so it doesn't impact user builds. What I did is add a generate_bindings.rs as a script, because apparently there's no way to make binaries aware of dev dependencies (only tests, benchmarks and examples).
So, after this PR, the process to update GGML is as follows:

Update the ggml.c and ggml.h in ggml-sys/ggml.
In that same folder, take note of the llama.cpp version these files were taken from  inside the CREDITS.md file.
Run the bindgen script:

$ cd ggml-sys
$ cargo run --example generate_bindings

Fix any compiler errors that pop up due to the new version of the bindings and test the changes.

Looks good to me, but

What I did is add a generate_bindings.rs as a script, because apparently there's no way to make binaries aware of dev dependencies (only tests, benchmarks and examples).

I'd suggest creating a separate binary (generate-bindings or ggml-update-bindings) and bring it in as a dependency there. The example thing is a hack.

So, after this PR, the process to update GGML is as follows:

I'd suggest adding this to a CONTRIBUTING.md or similar.


Use of undocumented Mendix API

Dear Mendix,
The API Documentation does not describe the use of the nullExec function of the boilerplate
https://github.com/mendix/AppStoreWidgetBoilerplate/blob/master/src/WidgetName/widget/WidgetName.js#L180
// The callback, coming from update, needs to be executed, to let the page know it finished rendering
mendix.lang.nullExec(callback);

It should be updated in the documentation https://apidocs.mendix.com/6/client/module-mendix_lang.html
We have also noted that the code is:
mendix.lang.nullExec = function(callback) {
        callback && callback();
};

This bit of code is tries to execute a parameter even if it is not of the type function. It would be better to check if for it.
mendix.lang.nullExec = function(callback) {
     if (typeof callback === "function") {
           callback();
     } else {
          console.warn("nullExec should have a function as argument")
     }
};

This is removed, because it will be considered (still works) deprecated in Mendix 7. The use of undocumented APIs is strongly discouraged.


Improve AccountPickScreen

[ ] When user logout from let's say x realm, then that AccountItem (realm x) should have Signed out tag, instead of tick button.

[ ] When user wants to switch for account then in the AccountList it will be better to show Signed out tag for all those realm where again sign in should be performed.

@zulipbot claim

For the first point, I think we can achieve this by showing a different icon in place of the check mark, instead of adding a third line.
For the second point, I am not sure what you mean. Can you explain more?

For the first point, I think we can achieve this by showing a different icon in place of the check mark, instead of adding a third line. What do you think?

I was thinking to show cross icon (as usual shown for other realm), which will be useful to remove/delete that realm.

For the second point, I am not sure what you mean. Can you explain more?

In the Pick Account screen, account list contains two types of account; first which have valid API key (user can select that realm without re-logging in it) second where API key is empty (which are logged out and again login should be performed). So I was thinking to show Signed out tag for the second one (where API key is empty).
Basically both are same, show tag/or different icon if API key is empty (user have to relogin in order to access that realm)
If we go with icon one they we will loose ability to remove realm (as the current cross icon will be replaced by Signed out icon).

Yeah, you are right, if we show an icon for logged out, we can't remove an account.
But does it really matter if we don't show which account is logged out?

It will just be more informative. (nothing else)
User clicks on logout button => redirected to Pick account screen => user can easily notice that he/she successfully logged off by tag. and some info is cached to easily login again.
yup! by adding the third line will make item long.
Another option can be, dividing list into two

first which have valid API key (user can select that realm without re-logging in it)
second where API key is empty (which are logged out and again login should be performed)

(like administrators and normal user list in Pick a dev account screen)

I am not sure how long will the list become. If it is typically just one or two accounts, splitting the list into two lists is definitely an overkill.
There is another option: we are still not showing stream icons, but when we do, we can make the logged-out ones black and white.

Created https://github.com/zulip/zulip-mobile/pull/556 for the first one.

There is another option: we are still not showing stream icons, but when we do, we can make the logged-out ones black and white.

Did you mean realm icons (instead of stream icons) (https://github.com/zulip/zulip-mobile/issues/392).

Yeah, realm icons.

Something like this

current account => prospero
other logged in account (apiKey is present) => hamlet
logged out account (needs relogin) => iago

I don't think it is that obvious that the styling means.
We are also yet not supporting being signed in, into multiple accounts at once (though we will at some point - it is not trivial).

Closing this.
(outdated now)


Increase width of text on FAQ page for DUP

Description:
This task is to increase the width of the text on the DUP FAQ page.
Acceptance Criteria:
Given that I'm a day use pass visitor
When I'm on the FAQ page
Then I want to see the text fill the page

[x] Increase the width of the text on the FAQ page (use homepage template)
[x] Verify the spacing is working on mobile on desktop

Development Checklist:

[ ] Use homepage template
[ ] ...
[ ] ...

Definition of Ready

[ ] Acceptance criteria are included
[ ] Wireframes are included (if applicable)
[ ] Design / Solution is accepted by Product Owner (if applicable)
[ ] Dependencies are identified (technical, business, regulatory/policy)
[ ] Story has been estimated (under 13 pts)

Definition of Done

In progress:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] UI meets accessibility requirements
[ ] Unit tests are written
[ ] Work is traceable in GitHub
[ ] PR linked to ticket number
[ ] If needed/required - Dev adds flag/label to highlight any migration steps necessary prior to PROD deployment

Code review:

[ ] Code is peer reviewed and has passed CI/CD tests

QA:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] Code is potentially shippable to the production environment
[ ] Functional features have been tested and passed by QA
[ ] UI components tested by designer
[ ] Code is deployed to PROD when moved to 'done' column (unless requested otherwise by PO)

PO Review:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] Reviewed and approved by Product Owner

Notes:

Tested on TEST: Pending

Verified that the width the text would flow has been increased.
After this change the option to navigate to the home has UI issues with the alignment. The arrow is no longer aligned with the "Home" word.
Also, the space between the page heading "Frequently Asked Questions" and the content reduced.
I am noticing font color of the heading has changed as well, I would consult @janemoxd or @meredithom for the correct font colors. (As per my general knowledge H1 font should be in color code "#036")

After looking into this, I've noticed the button is misaligned on the Cancel a Pass page as well so I believe it is unrelated to this ticket:

I'm looking into the spacing now but I'm only seeing the problem when bullet points are involved.. with standard text it looks as I would expect.
Heading text colour should be coming from the bootstrap library, which was updated recently.

Tested on TEST: Passed

Verified that this task has been completed and the issues mentioned in my previous comment have been fixed.
Passing to PO review.

Working as intended, moving to done.


Feature/cesm timing

[ ] ~closes #xxx~
[ ] tests passed
[ ] ~new tests added~
[ ] ~science test figures~
[X] ran uncrustify prior to final commit
[x] ReleaseNotes entry

See #743 for discussion of what this PR addresses (in part).

I think we want these to stay as separate functions. Mostly so we can
initialize the vic_run timer in vic_init. I used this exact functionality
in my last commit.
On Fri, Sep 1, 2017 at 2:51 PM Bart Nijssen<EMAIL_ADDRESS>wrote:

@bartnijssen commented on this pull request.
In vic/drivers/image/src/vic_image.c
https://github.com/UW-Hydro/VIC/pull/744#discussion_r136671837:

@@ -131,9 +131,6 @@ main(int    argc,
// start vic run timer
timer_start(&(global_timers[TIMER_VIC_RUN]));

timer_init(&(global_timers[TIMER_VIC_FORCE]));
timer_init(&(global_timers[TIMER_VIC_WRITE]));

We could combine timer_init() and timer_start(), but just leave as is for
now.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/UW-Hydro/VIC/pull/744#discussion_r136671837, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACVILbamGzeiRajPLlM2C5SQCcKvhA0bks5seHx2gaJpZM4PKpbk
.

--
Joe Hamman
Post-Doctoral Researcher
Research Applications Laboratory
Hydrometeorological Applications Program
National Center for Atmospheric Research
Phone:<PHONE_NUMBER>
Email<EMAIL_ADDRESS>Web:  joehamman.com

What would be the use case of running timer_init() without ever calling a timer_start()? Keep in mind that every timer_start() already includes a call to timer_init()?

@jhamman @bartnijssen the timing tables look good now (for what we're changing in this PR). I'll fix the secs/day columns in a separate PR. For reference:
------------------------------ VIC TIMING PROFILE ------------------------------

  Date                      : Fri Sep  1 18:49:29 2017
  Compiler                  : icc (Intel(R) C++ gcc 4.3 mode)
  Machine                   : r24i4n1
  VIC User                  : gergel
  VIC Version               : unset
  VIC GIT Version           : 5.0.1 February 1, 2017
  VIC_DRIVER                : CESM

  Global Param File         : vic.globalconfig.txt
  Domain File               : /p/work2/projects/rasm/inputdata/share/domains/domain.lnd.wr50a_ar9v4.100920.nc
  Start Date                : 1948-09-01-00000
  Stop Date                 : 0000-00-00
  Nrecs                     : 1
  Model Timestep (seconds)  : 3600
  Snow Timestep (seconds)   : 3600
  Runoff Timestep (seconds) : 3600
  Atmos Timestep (seconds)  : 3600

  MPI Processes             : 64
  OPENMP Threads            : 1
  Total pes active          : 64
  pes per node              : 72

  Overall Metrics
  ---------------
    Model Cost       : 288149 pe-hrs/simulated_year
    Model Throughput : 0.00533057 simulated_years/day

  Timing Table:
|------------|----------------------|----------------------|----------------------|----------------------|
| Timer      | Wall Time (secs)     | CPU Time (secs)      | Wall Time (secs/day) | CPU Time (secs/day)  |
|------------|----------------------|----------------------|----------------------|----------------------|
| Init Time  |              1.68781 |                 0.52 |              40.5075 |                12.48 |
| Run Time   |              1848.57 |              1846.94 |              44365.8 |              44326.6 |
| Final Time |            0.0124612 |                 0.01 |             0.299068 |                 0.24 |
| Total Time |              1850.27 |              1847.47 |              44406.6 |              44339.3 |
|------------|----------------------|----------------------|----------------------|----------------------|
| Force Time |             0.148592 |                 0.18 |               3.5662 |                 4.32 |
| Write Time |              470.665 |               470.31 |              11295.9 |              11287.4 |
|------------|----------------------|----------------------|----------------------|----------------------|

------------------------------ END VIC TIMING PROFILE ------------------------------


How to customize cells so that they have a coloured border like in preview images?

I know the cells are fully custoizable but was wondering if you could help point me in the direction of how to customize the borders of the cells so that the cells are white with coloured borders like in the preview images on the github page.
Cheers

Hey @ryderjack - Look at the UIImage category. You can pass any of these images to the MessageBubbleFactory.

Thanks for getting back to me, so do i have to pass a different image to change the colour/border - there's no properties of the bubbleImage?
Thanks

Do not use bubbles for it, return nil in bubble method.
Then add code in cellForItemAtIndexPath
cell.backgroundColor = [UIColor clearColor];
cell.layer.rasterizationScale = [UIScreen mainScreen].scale;
cell.layer.shouldRasterize = YES;
// * Customization
if (!isMediaMessage)
{
    // * Text color, bubble backgroundColor color
    if (isOutgoingMessage)
    {
        cell.textView.textColor = [UIColor k_mainWhite];
        cell.textView.backgroundColor = [UIColor k_mainBlue];
    } else {
        cell.textView.textColor = [UIColor k_mainBlack];
        cell.textView.backgroundColor = [UIColor k_mainWhite];
    }
    // * Bubble backgroundColor stroke
    cell.textView.layer.borderColor = [UIColor k_blackShadow2].CGColor;
    cell.textView.layer.borderWidth = 0.6;
    cell.textView.layer.cornerRadius = 10;
    cell.textView.layer.masksToBounds = YES;

    // Underline TextAttributes
    cell.textView.linkTextAttributes = @{ NSForegroundColorAttributeName : cell.textView.textColor, NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle | NSUnderlinePatternSolid) };
}

Thanks @bizibizi that code looks useful! However, since you say not to use the bubble image then there's no speech bubble part in the bottom left hand corner (as I'm looking to use this style of cell for incoming messages). Is there a way of getting the cell to look the same as bubble image but just have the borders? thanks!

@ryderjack, I do not know, I looking for it but can not achieve with default methods, so I use the code above

@bizibizi I've found a solution just using the category Jesse has provided:
make sure to add
#import "UIImage+JSQMessages.h"

and then when you initialise your image factory:
JSQMessagesBubbleImageFactory *bubbleFactoryOutline = [[JSQMessagesBubbleImageFactory alloc] initWithBubbleImage:[UIImage jsq_bubbleRegularStrokedImage] capInsets:UIEdgeInsetsZero];

The image category has a number of variations - there's more info there

do you get with it custom color of bubble and custom stroke color? (for incoming and out coming )

i think the easiest way is:

create your own bubble image file with customized border color and filled color based on bubble_stroked.png, which you can find it in the bundle.
use @ryderjack 's method to initial the JSQMessagesBubbleImageFactory,
remove the color masking operation in jsq_messagesBubbleImageWithColor.

I hope this won't be a annoying for all the participants in this thread. I just figured out how to use the tailless bubble image of the library properly after reading jess' comment and might help some people in the future. Sample:
 let incomingBubble = JSQMessagesBubbleImageFactory(bubble: UIImage.jsq_bubbleCompactTailless(), capInsets: .zero).incomingMessagesBubbleImage(with: UIColor.jsq_messageBubbleBlue())
and use that inside your messageBubbleImageDataForItemAt
EZ. Thanks.


Remove spacing around braces/brackets in Nickel?

Is your feature request related to a problem? Please describe.
The Nickel formatter currently adds spaces after an opening { /[ and before the closing delimiter }/]  on single line records and arrays (with an exception for single element lists):
{ foo = [ 1, 2, 3 ], bar = "bar" }

This looked unusual to me, as most language formatters I know don't do that and discussing with other members of the team, it seems to us than Nix is the only known precedent.
Describe the solution you'd like
The question part is thus: are you aware of other formatters adding spaces after the opening delimiter and before the closing delimiter of in-line records and arrays, beside Nix (I love Nix but it's clearly not a very good inspiration with respect to syntax/stylistic choices with its many idiosyncrasies :stuck_out_tongue: )? I wonder what Topiary do for OCaml as well. Nickel being an ML-like language with syntax clearly inspired from OCaml, it often makes sense to apply the same rationale to both languages.
If the answer is negative, then I would propose to do the common thing in Nickel as well, and ensure there are no spaces around delimiters.
Describe alternatives you've considered
Keep the current behavior.
cc @Xophmeister

In the OCaml rules, there are no leading/trailing spaces for [...] and [|...|], but there are spaces for {...}:
$ topiary -locaml <<OCAML
let _ = [1;2;3]
let _ = [|1;2;3|]
let _ = {foo=bar;baz=quux}
OCAML

let _ = [1; 2; 3]
let _ = [|1; 2; 3|]
let _ = { foo = bar; baz = quux }

Ah :sweat_smile: so let's base the decision on what other formatters do, so that we're less at risk of a bias loop?

ocamlformat does this:
$ ocamlformat --enable-outside-detected-project --impl - <<OCAML
> let _ = [1;2;3]
> let _ = [|1;2;3|]
> let _ = {foo=bar;baz=quuz}
> OCAML

let _ = [ 1; 2; 3 ]
let _ = [| 1; 2; 3 |]
let _ = { foo = bar; baz = quuz }

It looks like it adds the spacing by default, but it's controllable through command line switches:
   --space-around-arrays
       Add a space inside the delimiters of arrays. The flag is set by
       default.

   --space-around-lists
       Add a space inside the delimiters of lists. The flag is set by
       default.

   --space-around-records
       Add a space inside the delimiters of records. The flag is set by
       default.

   --space-around-variants
       Add a space inside the delimiters of variants. The flag is set by
       default.

I found this Standard ML formatter. I didn't run it, but assuming they've dogfooded it, it looks like it's adding the spaces (e.g., see here).
Ormolu doesn't add the spaces for lists.
I can't find a JSON formatter that doesn't explode an object or list over multiple lines.

The team seems to prefer to remove the space for array delimiters [/] and parentheses (/) but keep them around braces {/} and [|/|] delimiters. Honestly at this stage it's not really driven by a strong rationale but mostly a matter of taste, given that formatters in the wild seem to do various things. I personally don't have any strong opinion :man_shrugging:

Sounds good :+1: We'd obviously favour attested/community backed styles over consistency amongst rules, so I'll make this change...


style guide and library refactor:

60 column max for code
:: headers
rename some expressions for clarity

redundant with recent changes


Let hipcc treats .cpp files as C++ files for HIP-Clang

This is to match nvcc behavior, speed up compilation of C++ programs, and fix some
compilation issue where C++ programs are compiled as HIP programs.
Currently it is controlled by an environment variable
HIP_COMPILE_CXX_AS_HIP. By default it is 1, where
hipcc treats .cpp files as HIP programs. If it is
set to 0, hipcc will treat .cpp files as C++ programs.
This is because some math libraries are still not
ready for the change, however rocBLAS and rocFFT
require this feature for OpenMP, therefore put it
under an environment variable so that rocBLAS
and rocFFT can use it.
Change-Id: I56a51e27079df850ee39d4217fb647c22d79f612

This has been tested to work for rocBLAS for OpenMP issue.

This is merged into amd-master-next


Delete indices files on discord message delete

Problem
When a files is deleted in a discord server of direct message channel, the file's index still remains inside of the indices folder. We would like to remove the indexes of deleted files from the indices folder.
Solution
Edit PastFileSearch.remove_doc to also remove files from indices
Next Steps
Na

I'm thinking of closing this since the current iteration doesn't use indices - lmk what you think

closing (inactivity)


runtimes directory is not documented in Directory structure

When you publish an application with multiple TargetFrameworks a runtime directory is generated with multiple runtime support. This is confusing and not documented on what the purpose of the runtimes are or why are they generated.
Example of runtime directory output:
runtimes/
   - debian.8-x64/
   - fedora.23-x64/
   - fedora.24-x64/
   - opensuse.13.2-x64/
   - opensuse.42.1-x64/
   - osx/
   - osx.10.10-x64/
   - rhel.7-x64/
   - ubuntu.14.04-x64/
   - ubuntu.16.04-x64/
   - ubuntu.16.10-x64/
   - unix/
   - win/

Stackoverflow post related to this https://stackoverflow.com/questions/53507229/when-publishing-how-do-i-target-specific-net-core-runtimes

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 566f8ed0-217e-5125-b0f7-6d93c3a145c1
Version Independent ID: 9fa94395-eff8-3b12-c2d5-c1c6d4142378
Content: ASP.NET Core directory structure
Content Source: aspnetcore/host-and-deploy/directory-structure.md
Product: aspnet-core
GitHub Login: @guardrex
Microsoft Alias: riande

@nicksterx You shouldn't have a runtimes folder when publishing an FDD. The runtime is on the host for an FDD. A runtime (just one of them) is part of the deployment of a self-contained deployment, but it won't be in a runtimes folder.
Anyway ... I'm happy that you opened this issue.
The purpose of the topic is to exhibit the publish output of the dotnet publish command for deployment purposes. Since the publish folder is a child of the runtime for a self-contained deployment, we don't need to address that subject here. However! ......

This is confusing and not documented on what the purpose of the runtimes are or why are they generated.

It's in the .NET Core doc set. We just document the ASP.NET Core (web bits) over here. See :point_right: .NET Core RID Catalog
... so I think what this topic could use is an Additional resources section with links over to that content to help readers find the frameworks and RIDs that pertain to publishing projects. I'd also like to link the dotnet publish topic and the deployment types topic in the new section.
I also discovered looking at the topic here that there's a couple of minor changes in the published output that occurred with the 2.2 (and/or 2.1) release that I need to address.
Thanks for opening, I'll knock these out right now.

@guardrex Thank you for taking a look at this!
The runtimes folder is apart of the output when publishing an FDD.
If I run this command
dotnet publish -c Release -o ..\publish

The published output matches the directory structure I had above.
However if I specify my startup project in the publish command
dotnet publish .\startupProject.csproj -c Release -o ..\publish

it generates a simpler published out but runtimes is still apart of it
- publish/runtimes/
   - unix/
   - win/

I like the idea of the Additional resources I discovered this page trying to find the reasoning for the runtimes publish output.

@guardrex I'm running dotnet version: 2.1.500 but the project was started on 2.0.5

Just took a look ... I can't repro this behavior. I built an app with a project ref to a class lib that targets netstandard2.0 and uses the BCrypt package. Published output of this FDD app doesn't include a runtimes folder.

I don't have anything specific to doc at this point, but we can re-open if more information comes to light.


sharable configuration

gitleaks does not have a builtin functionality to share a configuration, this can be very helpful for sharing the same configuration across many projects. it would be neat that when http(s) url(s) is given to gitleaks, gitleaks will fetch the configuration over http(s) and append it.
alternatives:

config-path can be overloaded to honor http(s) urls or introduce another option for it
support for appending other configurations by urls\names in .gitleaks.toml, such as:

[[append]]
  list = ["default", "https://raw.githubusercontent.com/ShiftLeftSecurity/sast-scan/master/tools_config/credscan-config.toml"]

cc @zricethezav

@foolioo gonna close this issue with the addition of https://github.com/zricethezav/gitleaks/pull/926. If https://github.com/zricethezav/gitleaks/pull/926 does not satisfy your needs than feel free to reopen this issue and update its description. At this time I don't want gitleaks making any network requests but that is subject to change in the future.


feat(power automate): Creating a PA-specific store value/ prevent casting in complex array editor for PA

Power Automate doesn't cast in their complex array editor, added a prop in the redux store to support PA-specific logic

My understanding of the issue here is that LA wants to serialize w/ casting even if suppressCasting is true for that operation, while PA wants to suppress the casting when serializing.
Maybe the more flexible solution here is a flag like suppressCastingForSerialize? In this case, LA would be able to leave a default false and PA could set this to true, which would mean that the suppressCasting value for the operation would apply when serialization occurs.


Get 'pub_url' for each publication

Describe the bug
I need to get 'pub_url' for each publication by a scholar. I found that the 'pub_url' field is only available by running with (free) proxies. It is not available if not turning on the proxy. I wonder how I would get the 'pub_url' in both cases (whether using proxies or not).
To Reproduce
from pprint import pprint
from scholarly import scholarly, ProxyGenerator

useProxy = True

if useProxy:
  pg = ProxyGenerator()
  pg.FreeProxies()
  scholarly.use_proxy(pg)

author = scholarly.search_author_id('4bahYMkAAAAJ')
scholar = scholarly.fill(author,
                        sections=['basics', 'publications'],
                        sortby="year",
                        publication_limit=5)

for pub in scholar['publications']:
  pub_filled = scholarly.fill(pub)
  pprint(pub_filled)

There's no difference in behavior whether you use proxies or not except for the success rate of the requests. Please post the outputs (from the same version of the code of course) in both the cases if there is an issue.

@arunkannawadi Thank you for the clarification. After a few more runs (on Colab), the 'pub_url' issue disappears irrespective of using proxies. However, I did see this field was absent when I reported the issue here, which happened to coincide with switching on/off the proxy option. Issue closed.

@arunkannawadi Hello, the absence of 'pub_url' occurred again. Could you please help find out the reason behind this issue?
I forked scholarly and made a few minor changes related to pub_info: 'author', 'pub_date'. You could see the changes here.
https://github.com/hfchen20/scholarly.git
Here is a Colab test notebook.
https://drive.google.com/file/d/1GbWrHEK7REOWYx7ZNffgOltRu7siYNk1/view?usp=share_link

This issue seems very Google Colab specific. I ran your notebook on colab and did not get pub_url entries, but running it as a script locally gives me the pub_url. Very weird!

@arunkannawadi Okay. Running the Colab notebook did return the pub_url sometimes, but not always. Thank you very much for the testing!


Remove decimal from poll result (eg . 16.3) how

Remove decimal from poll result (eg . 16.3) how

Any  replay

Please provide a code snippet example


Feature: Add new methods to openraft::metrics::Wait

Changelog
Feature: Add new methods to openraft::metrics::Wait
Add log_index(), log_index_at_least(), applied_index() and
applied_index_at_least() to openraft::metrics::Wait to replace
Wait::log() and Wait::log_at_least().
These two methods are deprecated since 0.9.0 because the names does
not imply that they will be blocked by last_applied log index.
Thanks to @tvsfx

This change is

@tvsfx
I hope this PR clears up any existing confusion. :)


Pretrained CPM model output resolution is only 24x24

(Debugged using the iOS demo app at https://github.com/tucan9389/PoseEstimation-CoreML)
The output dimension of the pretrained CPM model when converted to CoreML is 96x96; however, the resolution of its prediction is ostensibly only 1/4th of that. All coordinates of predicted keypoint positions are multiples of 4, e.g. (4, 56), (24, 28), etc. This effectively means a prediction whose accuracy is 4 times worse than expected.
In debugging, I looked at the predicted position of the top point. Notice how the position is always a multiple of 4 for both x and y.
Max top point is: (44,24) with confidence 0.68310546875
w/h: 96/96
Max top point is: (44,24) with confidence 0.6572265625
w/h: 96/96
Max top point is: (44,24) with confidence 0.677734375
w/h: 96/96
Max top point is: (44,24) with confidence 0.72900390625
w/h: 96/96
Max top point is: (48,20) with confidence 0.13720703125
w/h: 96/96
Max top point is: (84,84) with confidence 0.021026611328125

Why does this occur? Does this have to do with the pretrained model itself? Should I train the network myself to yield a higher resolution?

Indeed, the network structure has a huge margin of improvement.
We could follow the tips of paper Convolutional Neural Networks at Constrained Time Cost to optimize it....
But it takes time.


Various requests issues when testing features on remote client.

A user on a remote dump cannot upload a profile picture, nginx returns bad request for '/api/user/change-avatar/'
A user cannot see chat messages, BUT can send messages. Nginx returns 500 when GET is requested at /api/chat/private_..../

Following up on this, turns out it works on the server side, the issue is that you cannot see the image on the client. I connected from the host machine on the profile we created on the remote computer, and the profile picture was correctly updated.


feature: regex or wildcards for loading on commands

Did you check the docs?

[X] I have read all the lazy.nvim docs

Is your feature request related to a problem? Please describe.
Some plugins e.g. Hop.nvim or colorizer.lua provide many commands starting with the same string
Describe the solution you'd like
It'd be nice to be able to match them all with a regex if one wants to call them from cmdline or to assign keymaps outside of Lazy.nvim's config
Describe alternatives you've considered
Wildcard matching
Additional context

no

I'd love to see this.  I've got several other plugins with numerous commands, and the commands all start with the name of the plugin.
@folke Out of curiosity, is there a particular reason that wildcard cmd wouldn't fit in lazy.nvim?


Resolving long and short URL formats into Talk ID

The following URLs both point to the event represented by Talk ID 25911. Is there a way via the API to resolve the appropriate talk ID from the URL?

https://joind.in/event/midwest-php-2019/learning-the-php-fig-http-stack
https://joind.in/talk/bf577

If not, would it be possible to add the Talk ID as a <link> or a response header so that it can be discovered that way? I'd be happy to work on such a thing if that was something that would be interesting.

There's some sort of magic going on right now, given that I'm seeing information retrieved from the cache rather than across to the API when viewing short links. There's a website_uri in the talk payload, which matches the short link there, but not the slug-ified longer uri. Seems reasonable to add:

[ ] The long URI as part of the API response
[ ] The ability (if not already available) to search talks in an event by slug
[ ] The ability (if not already available) to search events by slug

The latter two items would require two API calls to determine a talk location given its slug-ified URL, but if both of those are HEAD requests that return a Location header that should be fine.

Two API calls and some dodgy regex that gets the job done is better than no API calls and no job done. :)
Is this something that would be trivial for someone to dive into as an outsider, or would it be better worked on by someone closer to the code?

This assumes that anyone currently on the project is "close to the code" :)
I'd say try your hand at this, and ping in Discord if you get turned around. This is an API repo concern, so I'm moving this over there.


Numeric index type treated as string

Bug Report
🔎 Search Terms
numeric index for in "Argument of type 'string' is not assignable to parameter of type 'number'" 2345
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about index signatures

⏯ Playground Link
Playground link with relevant code
💻 Code
const dates: {[index: number]: Date} = {};
const cleanAll = function() {
	for(let dateID in dates) {
		//Next line has an error:
		//Argument of type 'string' is not assignable to parameter of type 'number'.ts(2345)
		cleanDate(dateID, new Date());
	}
}
const cleanDate = function(dateID: number, threshold: Date) {
	if(dates[dateID].valueOf() < threshold.valueOf()) {
		delete dates[dateID];
	}
}

🙁 Actual behavior
For...in on an object indexed with a number type is treated as if the object was actually indexed with a string type.
🙂 Expected behavior
The dateID parameter, in its first appearance is narrowed to number rather than string, because the object whose properties/keys are being iterated over is indexed with a number type rather than a string type.
Note that this can't be manually annotated because doing so would produce an error:

The left-hand side of a 'for...in' statement cannot use a type annotation.ts(2404)

Also note that the dateID values might not be consecutive integers, so a traditional counter would not be appropriate.

This is actually correct.  dateID is in fact a string at runtime.

And objects are not sealed. It's possible that there are non-number properties defined in your object.

@MartinJohns wouldn't that make the type-checker raise an issue in the type given for dates above?

@MartinJohns I see that works.  My mistaken understanding was based on having repeatedly gotten errors trying to add properties to a type where the index was specified and the property was not consistent with it.  For a numeric-index example:
interface MyObj {
    [index: number]: Date;
    0: string; //Property '0' of type 'string' is not assignable to 'number' index type 'Date'.ts(2411)
}

or more commonly:
interface MyObjectSet {
    [index: string]: MyOtherObject; //the general index follows a pattern that the names below don't match
    propertyOfWholeSet: number; //Error: not assignable to 'string' index type 'Date'.ts(2411)
    otherPropertyOfWholeSet: string; //Error: not assignable to 'string' index type 'Date'.ts(2411)
}

This leads to having to rewrite a nontrivial amount of working-fine JavaScript code as part of the conversion to TypeScript, making the costs of doing so much less predictable and way higher than just adding type annotations and fixing any typing-related bugs that may exist.  It's also confusing by producing an (incorrect) lesson that all non-index specified properties must be consistent with the index specification.
(I also think JavaScript's behavior of automatically converting numeric indicies to strings for the for...in iteration is confusing, but that's not an issue in TypeScript.)

TypeScript enforces that named properties be consistent with any index signatures because, if, e.g. the index signature is string and you index the object with an arbitrary unknown string, the compiler can’t guarantee it doesn’t clash with one of the named properties; forcing the named properties to be compatible avoids any unsoundness that would otherwise result from that.

You can always write this to achieve "mixed" objects:
type MyObjectSet = {
    [index: string]: MyOtherObject;
} & {
    propertyOfWholeSet: number; // OK
    otherPropertyOfWholeSet: string; // OK
}

Any weirdness that follows from this is, of course, on you.

Having types with an index signature and known properties is always subject to unsoundness, that's why I personally avoid them.
interface MyObjectSet {
    [index: string]: number | string;
    a: number;
    b: string;
}

const key = "a" as string

const myObj: MyObjectSet = { a: 1, b: "" }
myObj[key] = "";

myObj.a // typed number, actually string


Resolve Issue 217

Suggestions for resolving the description of v_call, d_call, and j_call as per Issue 217.
Use this pull request to discuss and finalize a solution...

Looks good to me. I just pushed some minor wording/format changes and added the additional text to c_call. I didn't update the TSV, in anticipation of #255 being merge in soon (but we could).

Hi All,
I had added an extended description for d_call as including the extended naming as per #258. I had only added this to d_call as I wasn't sure we should have this much documentation.
Comments on the change below.
"6 / data (proc. seq.)	D gene	string	Free text	D segment gene and allele. If referring to a know gene in a reference database such as the IMGT/Gene DB, the relevant gene/allele nomenclature should be followed (e.g. IGHD2-201). If the gene/allele is not known, the name should include the locus (e.g. IGH), the domain (e.g. D), the gene subgroup (e.g. 2), and the gene subgroup designations (e.g. 2 delimeted with a -) and the allele (e.g. 01, delimted with a ) to construct the gene name  (e.g. IGHD2-201).	IGHD2-201	d_call"
https://github.com/airr-community/airr-standards/pull/257/commits/46e5e9f754d2f31c0e915764972a9baf595a9ceb

Should this be added to the other v/j/c call values? Or is this too much?

I don't agree with the additional text. It is suggesting/enforcing a nomenclature which we really aren't in the position of enforcing (i.e. IUIS controls this). Furthermore, for less documented species, the correct organization of the genes into groups and subgroups might not even been known. I think we want to avoid documenting any nomenclature ourselves and just reference the appropriate authorities for that.


inverted_index modified

Good work, but we may need support to find the most relevant paragraph given several terms.


Fix broken tokenizer imports

Fixed broken tokenizer imports to match an updated CLTK release.
Updated the requirements.txt with a working CLTK version.

Fixes issue: [https://github.com/dbamman/latin-bert/issues/3]
All other libraries installed as listed in the requirements file.
Verified with an install of PyTorch 1.10.0 and execution of the scripts:
python3 scripts/gen_berts.py --bertPath models/latin_bert/ --tokenizerPath models/subword_tokenizer_latin/latin.subword.encoder
python3 scripts/predict_word.py --bertPath ../../models/latin_bert/ --tokenizerPath ../../models/subword_tokenizer_latin/latin.subword.encoder -d data/emendation_filtered.txt > logs/infilling.log 2>&1

Ready to merge (with small change to README.md > Install with updated method for corpus download based on CLTK v1)

Fixes #3


In distributed mode deploy databases does not work sometimes between cluster nodes.

In distributed mode deploy databases does not work sometimes between cluster nodes.
OrientDB v2.2.4 community edition
Operating System: Linux (Debian 8.4 x64)
RAM: 64 gb
CPU: intel xeon e5 family
Java Version 8
Each cluster node has its own unique name: node1, node2, node3.
Configuration files are identical on all nodes:
default-distributed-db-config.json:
{
  "autoDeploy": true,
  "readQuorum": 1,
  "writeQuorum": "majority",
  "executionMode": "undefined",
  "readYourWrites": true,
  "servers": {
    "*": "master"
  },
  "clusters": {
    "internal": {
    },
    "client_node1": {
      "servers" : [ "node1", "node2" ]
    },
    "client_node2": {
      "servers" : [ "node2", "node3" ]
    },
    "client_node3": {
      "servers" : [ "node3", "node1" ]
    },
    "*": {
      "servers": ["<NEW_NODE>"]
    }
  }
}

hazelcast.xml:
<hazelcast
        xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.0.xsd"
        xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <group>
                <name>test</name>
                <password>test</password>
        </group>
        <network>
                <port auto-increment="true">2434</port>
                <join>
                        <multicast enabled="false">
                                <multicast-group><IP_ADDRESS></multicast-group>
                                <multicast-port>2434</multicast-port>
                        </multicast>
                        <tcp-ip enabled="true">
                                    <member><IP_ADDRESS>:2434</member>
                                    <member><IP_ADDRESS>:2434</member>
                                    <member><IP_ADDRESS>:2434</member>
                        </tcp-ip>
                </join>
        </network>
        <executor-service>
                <pool-size>16</pool-size>
        </executor-service>
</hazelcast>

I modeled the situation.
I stopped all cluster nodes
Delete all directories in the databases directory.
I run each of the nodes.

Did you start 2 nodes at the same time? If yes, this is a known bug we're fixing.

This has been fixed in 2.2.10. Could you please try it?

Hi @kilZHlik, I'm closing this issue. Feel free to reopen it if you encounter further problems. Thanks.

@luigidellaquila Sorry for late response.
Not really :)
Since the constructor is public, AKA public API, according to https://github.com/orientechnologies/orientdb/blob/develop/upgrade.txt  , it's not a small problem to 3rd party developers.
Are there any plans we introduce plugins such as http://www.mojohaus.org/clirr-maven-plugin/ to prevent further incompatible API change?


Rest API failts to boot when rebuilding containers

This is a  Tiago induced bug I think, but the api needs to be refactored to try and load the wallet from the credentials and only if it doesn't exist, create a new one. And remove the unnecessary seed file that gets stored next to the credentials file.

Everything works as requested. good job


feat: :construction: review flow

@KipandaJr
Can not click on the switcher button, because it's wrapped with a link:

can not go back
this is not the item I chose

can not write the whole number at once. I have to write it number per number

Everything else is good

This back arrow is not working

https://www.awesomescreenshot.com/video/18202406?key=6d4ad69c02627029470bdf0a43dd6b30
As you can see in the video, I can't click on the switcher, because the link is covering it. And you should add pointer="cursor" to the back button
@KipandaJr


Credits dynamic update

Hi,
I am using $scope.chartConfig.credits.href to include a dynamic link towards a website. This way, depending on the stats I show on highcharts, this link changes. However, this link never updates when I keep using the same type of chart i.e. if I do not change from 'spline' to 'line'.
The only way I have found to solve the problem is including this watch:
scope.$watch('config.credits', function () {
initChart();
processSeries(scope.config.series);
chart.redraw();
}, true);
I am not sure if it is a good idea to redraw everything just because a small link change on the bottom of the stats.
Thoughts?

Unfortunately there is no method to dynamically change the Credits on an existing chart. http://api.highcharts.com/highcharts#Chart
You should not have to create your own watch though. Have you put the credits config in the right place? Can you show a jsfiddle?


[csharp] native libraries shown in project root layout

What version of gRPC and what language are you using?
1.4.1 but I think this applies to any project using the new csproj targetting a framework greater or equal than net45.
What operating system (Linux, Windows, …) and version?
Windows
What runtime / compiler are you using (e.g. python version or version of gcc)
Doesn't apply.
What did you do?
Include Grpc.Core in a newly formatted csproj.
What did you expect to see?
Linked Content elements not to be shown by default, I would expect this:

What did you see instead?
I got this instead:

Anything else we should know about your project / environment?
I'm using the new csproj approach which by default inspects all the tree down (*.targets included) and make every file/extension pertaining to its whitelist shown by default.
I tried to modify Visibility status through this:
<ItemGroup>
    <Content Update="grpc_csharp_ext.x86.dll" Visible="false" />
</ItemGroup>

But it doesn't seem to work.
I think people would like to avoid seeing grpc native libraries in its project root layout

thanks!


CollectionConfig removes indexes field

Link to reproduction
No response
Describe the Bug
The indexes field has been removed from CollectionConfig in the latest version, but I can't find any description on how to migrate it in the documentation?
To Reproduce
When upgrading from v1.11.1 to v2.2.2, I found that the previously supported indexes field is no longer supported.

Payload Version
2.2.2
Adapters and Plugins
No response

@DanRibbens  In order to migrate to the latest version (v2.2.2), how to adjust the code of 'indexes' for the previous v1.11.0 version? Thanks!

Hey @liulian-13,
We will be adding the indexes property to the mongoose adapter in the near term. If you don't want to wait, you need to follow the migrations documentation that should help you add indexes to your models.
You'll need to create the migration, see https://payloadcms.com/docs/database/migrations.

I hope this helps!

@DanRibbens  Is the indexes property supported in the new version? If it is already supported, please let me know here, thank you.


fix(transformer-plugins) adding Postgres migration to Request and Res…

Full changelog

request-transformer: adding missing PostgreSQL migration
response-transformer: adding missing PostgreSQL migration

lgtm but haven't manually tested it. If either of you ( @p0pr0ck5  @thefosk) tested it then its fine.

I tested it.


Fix(ydr): Import as Asset

fixes https://github.com/Skylumz/Sollumz/issues/771

No repro, can't verify this fixes anything. More so, the issue reports whole blender crashing, that often occurs due to invalid memory accesses which won't be caught by a try/except.


Fix a variety of nested import bugs

Fixes #1088 and #1089 and #1090

Codecov Report

Merging #1092 into develop will increase coverage by 0.06%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #1092      +/-   ##
===========================================
+ Coverage    84.79%   84.86%   +0.06%
===========================================
  Files           41       41
  Lines         3618     3634      +16
  Branches       655      656       +1
===========================================
+ Hits          3068     3084      +16
  Misses         414      414
  Partials       136      136

Impacted Files
Coverage Δ

tests/test_isort.py
99.24% <100%> (ø)
:arrow_up:

isort/api.py
90.19% <100%> (+0.29%)
:arrow_up:

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 fbe1ab9...3e77dc6. Read the comment docs.


Issues with yAxisLabelTexts in BarChart with negative values

Hi!
Firstly, thanks for your work on this project! 🙂
I have a BarChart that can have both positive and negative numbers. When I try to set the yAxisLabelTexts prop with negative numbers included, e.g. [-60, -40, -20, 0, 20, 40, 60], the wrong labels are picked (they are duplicated).  I also tried entering the numbers in an other order as well, but with similar results. noOfSections and noOfSectionsBelowXAxis are both set to 3 in this example.
I'm on version 1.2.41 and I patched the package (for now) with this small fix:
diff --git a/node_modules/react-native-gifted-charts/src/BarChart/index.tsx b/node_modules/react-native-gifted-charts/src/BarChart/index.tsx
index f9688b6..592705d 100644
--- a/node_modules/react-native-gifted-charts/src/BarChart/index.tsx
+++ b/node_modules/react-native-gifted-charts/src/BarChart/index.tsx
@@ -753,7 +753,7 @@ export const BarChart = (props: PropTypes) => {
     }
     horizSections.push({
       value: props.yAxisLabelTexts
-        ? props.yAxisLabelTexts[noOfSections - i] ?? value.toString()
+        ? props.yAxisLabelTexts[noOfSectionsBelowXAxis + noOfSections - i] ?? value.toString()
         : value.toString(),
     });
   }

Is this a bug or am I using the prop the wrong way?

Hi @elinljunggren 👋
Thanks for pointing out the issue. Can you please share the code that you are using to render the chart. Charts with negative values have some issues, I will fix them in the next release.

Ah that's great!
Here's an example component I tested:
import React from 'react';
import { View } from 'react-native';
import { BarChart } from 'react-native-gifted-charts';

export const TestBarChart = () => {
    const data = [
        {
            label: '10',
            hour: 10,
            value: 55.7,
        },
        {
            label: '11',
            hour: 11,
            value: 14,
        },
        { label: '', hour: 12, value: -2.35 },
        {
            label: '',
            hour: 13,
            value: -1.8599999999999999,
        },
        {
            label: '',
            hour: 14,
            value: -57.36,
        },
        { label: '', hour: 15, value: -32.9 },
    ];

    const yAxisLabels = ['-60.0', '-45.0', '-30.0', '-15.0', '0.0', '15.0', '30.0', '45.0', '60.0'];

    return (
        <View>
            <BarChart
                hideRules
                barWidth={38}
                noOfSections={4}
                noOfSectionsBelowXAxis={4}
                barBorderRadius={6}
                data={data}
                yAxisThickness={0}
                xAxisThickness={0}
                yAxisLabelTexts={yAxisLabels}
                yAxisLabelWidth={35}
                labelWidth={30}
                spacing={3}
                initialSpacing={4}
                width={275}
                height={140}
                maxValue={60}
                minValue={-57.36}
                disableScroll
                autoShiftLabels
            />
        </View>
    );
};

I also updated the patch a bit to work with charts that only has positive numbers as well:
diff --git a/node_modules/react-native-gifted-charts/src/BarChart/index.tsx b/node_modules/react-native-gifted-charts/src/BarChart/index.tsx
index f9688b6..e6d4cf8 100644
--- a/node_modules/react-native-gifted-charts/src/BarChart/index.tsx
+++ b/node_modules/react-native-gifted-charts/src/BarChart/index.tsx
@@ -401,7 +401,7 @@ export const BarChart = (props: PropTypes) => {

   const stepValue = props.stepValue || maxValue / noOfSections;
   const noOfSectionsBelowXAxis =
-    props.noOfSectionsBelowXAxis || -minValue / stepValue;
+    props.noOfSectionsBelowXAxis ?? -minValue / stepValue;
   const disableScroll = props.disableScroll || false;
   const showScrollIndicator = props.showScrollIndicator || false;
   // const oldData = props.oldData || [];
@@ -751,9 +751,15 @@ export const BarChart = (props: PropTypes) => {
     if (props.showFractionalValues || props.roundToDigits) {
       value = parseFloat(value.toFixed(props.roundToDigits || 1));
     }
+
+    let startIndex = noOfSections;
+    if (noOfSectionsBelowXAxis > 0) {
+      startIndex += noOfSectionsBelowXAxis;
+    }
+
     horizSections.push({
       value: props.yAxisLabelTexts
-        ? props.yAxisLabelTexts[noOfSections - i] ?? value.toString()
+        ? props.yAxisLabelTexts[startIndex - i] ?? value.toString()
         : value.toString(),
     });
   }

Hi @elinljunggren
I checked and found that it's a bug and your solution is a good fix, thanks for that. You are welcome to contribute to this library.
I am working on refactoring the codebase, so please raise a PR for this fix after I am done with the refactoring. I will add a comment here when my refactoring changes are merged.
As a side note, I think for your example you don't need to use the yAxisLabels. Instead you can use yAxisLabelSuffix={'.0'}.
Anyways, the bug is genuine, and I insist you to raise a PR with the fix after my refactoring changes are merged.

Thanks @Abhinandan-Kushwaha!
I'd love to, add a comment when it's time and I'll open a PR :)
Thanks for the tip, but it will not always be 0 even though it was in the example. I also need number localization (e.g. different delimiters) on the labels. The most practical thing for me would be to just send in a format-function for the labels instead of prefix/suffix/yAxisLabelTexts really, but that would be another issue!

Hi @elinljunggren
The refactoring is done. Now please use the latest version of the library and raise a PR for this.


Chat that was made unread upon request shows (-1) counter

I mark a chat as unread, it looks like this:

When I see it in unread list it looks like this:

should be just a green circle

Team assessment: 1 hours.
In our experience, the team exceeds the grade in 30% of cases. Optimistic estimate: 1x 1.3 = 2 hours.
Our safety stock is 30% taking into account the coefficient for various force majeure situations. Pessimistic assessment: 2 x 1.3 = 3 hours.

fixed in <IP_ADDRESS>


Rename e2e tests with -s rather than _s.

Oh boy! My laptop chokes trying to open the "Files changed (258)" tab 😂

Oh boy! My laptop chokes trying to open the "Files changed (258)" tab 😂

Sorry! The vast vast majority are "file renamed without changes". The ones that aren't are fixing the ps1 to have the matching names.


make upper_padding minimum of 1

Try

fortune | figlet | ./center

and you'll find errors when the text is too high, which means that the $upper_padding variable is less than 1, which then makes sed confused about what it's doing.
This fixes the problem, though I suspect there's a better way to fix this problem.

I would write this:
# if upper padding is negative, sed gets confused
[ "$upper_padding" -lt 1 ] && upper_padding=1

as the author uses && and || elsewhere in the script.

I would write this:
# if upper padding is negative, sed gets confused
[ "$upper_padding" -lt 1 ] && upper_padding=1

as the author uses && and || elsewhere in the script.

Yep like this would be more acceptable.
If changes are made will merge.

Mutatis mutandis.


Evaluate AS PR 5015

We closed https://github.com/apollographql/apollo-server/pull/5015 to move it to this repository. We should look to see if the change is still applicable.

Tracking this in #73 (the issue that the PR addresses)


fix for removing in slice of  pointers

In this atricle is described the case when 'the type of the element is a pointer' have a potential memory leak problem. The suggested soultion was implemented. @PotterDai what do you think about it?

@alexpantyukhin Wow, good catch! Didn't even notice that.Thank you very much! =D

@PotterDai Yes :) thank you too! I found this hint recetly, I think if the order is not important, it's possible to avoid Copy method also, just swap the last one and i element and 're-length' slice. But I see that GetAllMembers() which shows the members outside. Is this important to keep the order? If no, I can prepare the new one PR.


docs: add context doc

What type of PR is this?

docs
Check the PR title.

[ ] This PR title match the format: <type>(optional scope): <description>
[ ] The description of this PR title is user-oriented and clear enough for others to understand.
[ ] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.
添加上下文文档
(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: add context doc
zh: 添加上下文文档
基于 https://github.com/cloudwego/cloudwego.github.io/pull/450 上添加的上下文文档 @li-jin-gou
(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

thanks

@a631807682 plz rebase and resolve conflicts, thanks

@a631807682 plz rebase and resolve conflicts, thanks

done

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.3 out of 4 committers have signed the CLA.:white_check_mark: li-jin-gou:white_check_mark: a631807682:white_check_mark: rogerogers:x: chaoranz758You have signed the CLA already but the status is still pending? Let us recheck it.

看了一下没什么问题了，辛苦 @a631807682 @GuangmingLuo @welkeyever @rogerogers  再看下，没什么问题的话打算合了。

LGTM

@a631807682 @chaoranz758 High-quality output! Thank you very much for your contribution 🫡


fix(checkbox): Emit event when checkbox's indeterminate value changes

Fixes #2004
R: @jelbourn

Comments addressed. Please take another look. Thanks!

when will this change released?
@tinayuangao @jelbourn


Hover Dropdown Has a Problem...I cannot interact with the dropdown.

I am using a hover dropdown to add some content into the dropdown. In F5 I could use this and when I moused into the dropdown it would stay open. In F6 it doesn't do this. The moment you mouse out of the element that opens the dropdown (after the set delay) it closes even if the mouse is inside the dropdown.
For me, with the way I use hover dropdowns, makes it almost useless.
Is this a bug or intended behavior?
Toggle dropdown works as expected.
(Note: I am using v6.0.3 of the JS.)

@zurbchris - Any ideas when this may be fixed or updated to work? I have a site I want to upgrade to F6 as it is still in development but need this working before I do. Thank You!

Hi everyone, any news about this bug?

This is an important issue for me as well. Any workarounds?

@bwydev - Thank you for the tip. This should be added to the docs. This does seem to help, however, I'm still running into problems with it not staying open properly as well as z-index issues. If I increase the z-index the dropdown pane loses it's width and becomes full width! I've never seen that happen.

By adding the data parameter data-hover-pane="true" I can get it to work, however, there is an issue and I'm unsure if it is a Foundation issue or a problem with my code.
When I hover over a dropdown it pops open and I can interact with it, as expected. When I hover out of the dropdown pane, it closes but there is a moment where the contents of the dropdown pane are still visible for a second, then the content hides as well.
Since the site is still in development and not public yet, here is a video of the issue: http://screencast.com/t/zcPzdzan
Here is the code I am using:

    <button href="#" type="button" data-toggle="involved" class="button brand dropdown header-button">Get Involved</button>

Item 1

Item 2

Item 3

Item 4

Etc.

Not seeing that happen here http://codepen.io/rafibomb/pen/KVYPrJ I wonder what would cause that.

@rafibomb - I just sent you an email with a URL that shows the problem. The site is still under development so I don't want to post a link here in Github.

@rafibomb - I found the problem:
a {
-webkit-transition: all .5s;
transition: all .5s;
}
Removing this code fixes the problem but should a fix for this be applied in the Foundation framework? I ask that because I've seen this same code as part of other systems and it would be great if Foundation can account for this code?
Here is a fork of your pen showing the problem: http://codepen.io/Lynda333/pen/MKRXgV

I don't understand. The transition on the  is not part of the framework, right?. If you're looking to animate the dropdown, there is a different way. In the last comment here - John was able to use MotionUI to create the animation http://foundation.zurb.com/forum/posts/37397-animation-for-dropdown-menus

@rafibomb - The transition is for my links throughout the site, not the dropdown. It creates a smooth transition for any links on the site, which looks and works well. This is the first time I've ran into problems with any Foundation element. For some reason the transition on my links conflicts with the drop down causing it to display weird.


Homescreen empty states

If a page content is empty, it will simply be an empty page. It should have some sort of empty state.
TODO:

[ ] #336 Schedule
[x] Favorites (done in #188)
[ ] #337 Tweets

Added the Zeplin preview as well as a design asset in Dropbox
https://zpl.io/awq3Ae7
https://www.dropbox.com/s/mn6znrbeczk32ax/img_emptystate.svg?dl=0

Nice one! Do we have one for the tweets screen too?

@rock3r No. I will sort that :D

Done, but we're still missing a nicer icon for Twitter from @ScribblyPixels

Closing for now, as swapping the drawable will be an easy task and the core is done here


Create a convenience function to feed df to a Vespa app

df = DataFrame(data={"id": [0,1,2], "title": ["x", "y", "z"]})

app.feed_df(df) # assumes 'id' is part of the fields to be fed

app.feed_df(df, include_id = False) # 'id' is used only to identify a vespa doc

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Fixed transformers library temporarily to 4.10.3 because there was a major Pipeline rewrite on 4.11.0 that broke code from the ml module that is unrelated to the changes of this PR.


Plugin install on Windows a WinError 32 show up related to some constraints file when exiting napari

Trigger an operation from the plugin dialog and, at napari exit, some error related to not having access to a constraint file appears:
A preview

Traceback/error message
Exception ignored in atexit callback: <built-in function unlink>
PermissionError: [WinError 32] El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso: 'C:\\Users\\dalth\\AppData\\Local\\Temp\\tmpx5py0rxw-napari-constraints.txt'

I think we can add some kind of ignore errors keyword in the atexit registration. I wonder why that file was still open; it should have been closed on exit :thinking:

Gave this a check and I think the issue is related with ignoring the file descriptor returned when using tempfile.mkstemp when creating the constraints file used for pip operations. Created #66 with a possible fix


Zero-initialize masked loads if "other" argument is not present

Given the following kernel (generated by inductor):
@triton.jit
def triton_(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 5
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = tl.full([1], -100, tl.int64)
    tmp2 = tmp0 != tmp1
    tmp3 = tl.full([1], 0, tl.int64)
    tmp4 = tl.where(tmp2, tmp0, tmp3)
    tmp5 = tmp4 + 5
    tmp6 = tmp4 < 0
    tmp7 = tl.where(tmp6, tmp5, tmp4)
    tl.device_assert((0 <= tmp7) & (tmp7 < 5), "index out of bounds: 0 <= tmp7 < 5")
    tmp8 = -1.0
    tl.store(out_ptr0 + (tmp7 + (5*x0)), tmp8, xmask)

tmp0 is a masked load using tl.load which accepts a mask and other parameter (https://triton-lang.org/main/python-api/generated/triton.language.load.html#triton.language.load). In this instance, the mask parameter is used but the other parameter is unspecified, meaning the value loaded for a false value in the mask is undefined. Cuda semantics 0-initialize this mask as part of the masked load instruction:
	setp.lt.s32 	%p1, %r2, 5; // this is the predicate which determines the true/false value for the mask
	.loc	1 24 30
	mul.wide.s32 	%rd6, %r2, 8;
	add.s64 	%rd4, %rd5, %rd6;
	.loc	1 24 35
	// begin inline asm
	mov.u64 %rd3, 0x0; // the value to use if the mask is false
	@%p1 ld.global.b64 { %rd3 }, [ %rd4 + 0 ]; // the predicated masked load
	// end inline asm

but we do not have a masked load instruction, and in our XPU implementation we translate the load to llvm IR conditional branches:
%11 = icmp slt i32 %10, 5, !dbg !22
  br i1 %11, label %12, label %16, !dbg !23

12:                                               ; preds = %3
  %13 = sext i32 %10 to i64, !dbg !24
  %14 = getelementptr i64, ptr addrspace(1) %0, i64 %13, !dbg !24
  %15 = load i64, ptr addrspace(1) %14, align 8, !dbg !23
  br label %16, !dbg !23

16:                                               ; preds = %12, %3
  %17 = phi i64 [ %15, %12 ], [ undef, %3 ]

where the load is simply skipped and the value "loaded" is undefined if the mask is false and the "other" value to use when the mask is false is not specified.
This PR changes that behavior to match CUDA by adding an explicit "other" value to load when other is not specified. The value chosen is a zero value for the specified return type of the load, effectively resulting in a 0-initialized vector that is filled based on the mask, even if the vector is constructed one load at a time.
%11 = icmp slt i32 %10, 5, !dbg !22
  br i1 %11, label %12, label %.thread5, !dbg !23

12:                                               ; preds = %3
  %13 = sext i32 %10 to i64, !dbg !24
  %14 = getelementptr i64, ptr addrspace(1) %0, i64 %13, !dbg !24
  %15 = load i64, ptr addrspace(1) %14, align 8, !dbg !23
  %.fr = freeze i64 %15, !dbg !25
  %.not = icmp eq i64 %.fr, -100, !dbg !25
  br i1 %.not, label %.thread5, label %16, !dbg !26

16:                                               ; preds = %12
  %17 = add nsw i64 %.fr, 5, !dbg !27
  %18 = icmp slt i64 %.fr, 0, !dbg !28
  %spec.select = select i1 %18, i64 %17, i64 %.fr, !dbg !29
  br label %.thread5, !dbg !29

.thread5:                                         ; preds = %16, %12, %3
  %19 = phi i64 [ 0, %3 ], [ 0, %12 ], [ %spec.select, %16 ]

where %11 is the computation of the mask, %12 is entered if the mask is true, and %16 is the result of LLVM optimizations merging the true branch for the mask and the true branch for the comparison with -100 (tmp2).
The previous code had the result of running a comparison with an undef value. I wondered why this was not caught in the unit tests and it turns out we don't test masked loads if with no other parameter - so I modified the unit tests to add this to the parameters list.
There does not appear to be documentation in Triton to define the behavior when other is not present, but for purposes of working well with inductor and matching the reference implementation zero-initialization seems to be the right answer.
Close #1125

I asked the Triton maintainers what the expected behavior for tl.load is and the behavior is expected to be undefined if a mask parameter is supplied and no other parameter is provided. So, our previously behavior is technically more correct, and inductor is possibly wrong here (I might look into fixing that separately). But, CUDA's behavior is also arguably correct (they just picked their undefined value to be zero, but you shouldn't rely on it) and it might be valuable for us to match CUDA semantics.
Let me think about it for a bit before we merge this.

Given CUDA is the reference backend, explicitly zero-initializes, and that behavior is being relied upon by an unknown number of users (one of which is PyTorch Inductor) I think we should go ahead and merge this. Separately I will open a ticket to Inductor to discuss whether or not other should be added to all masked loads.


Change copyright year in README.md to 2022

Pretty sure it's supposed to be 2021-present because catppuccin first release in 2021.


Request: Support for Rival 5

I already received my Rival 5 which was released a few days ago. I think I'm one of the first who is not a brand ambassador/influencer.
sudo lsusb -d 1038:183c --verbose
Bus 001 Device 008: ID 1038:183c SteelSeries ApS SteelSeries Rival 5
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1038 SteelSeries ApS
  idProduct          0x183c
  bcdDevice            1.00
  iManufacturer           1 SteelSeries
  iProduct                2 SteelSeries Rival 5
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x006d
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              200mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      37
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      98
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000c  1x 12 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      21
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      76
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

rivalcfg --print-debug
RIVALCFG
========
Version: 4.3.0
udev rules installed: True
udev rules up to date: True
Installation path: /usr/local/lib/python3.9/site-packages/rivalcfg

OPERATING SYSTEM
================
OS: Linux
Platform: Linux-5.11.20-300.fc34.x86_64-x86_64-with-glibc2.33
Version: #1 SMP Wed May 12 12:45:10 UTC 2021
Distribution issue: \S
Kernel \r on an \m (\l)

PYTHON
======
Python version: 3.9.5
HIDAPI version: 0.10.1

PLUGGED STEELSERIES DEVICES ENDPOINTS
=====================================
1038:183c | 00 |  (firmware v0)
1038:183c | 01 |  (firmware v0)
1038:183c | 02 |  (firmware v0)
1038:183c | 03 |  (firmware v0)

I guess someone has to do more reverse engineering because of the new hardware (e. g. the “switch” button).
Is this method still the way to go?
At the moment I'm a little bit short on time but will try to do my best to provide information for adding it to rivalcfg.
Edit: Configuring via Steelseries Engine 3.20.0 in a Windows 10 VM worked as expected. Sadly, whenever I unplug the mouse, my settings for LED and the CPI toggle button gets reset. I'm still investigating why this happens.

Hello,
Yes someone should do some reverse engineering, and yes you can find some documentation in this article and in that one too.
Strange that the settings are not saved when you unplug the mouse... Have you clicked the "Save" button on the SSE? (else it does not save the setting in the mouse)

Yes someone should do some reverse engineering, and yes you can find some documentation in this article and in that one too.

Okay, I will look into it (The two articles you mentioned have the same link).

Strange that the settings are not saved when you unplug the mouse... Have you clicked the "Save" button on the SSE? (else it does not save the setting in the mouse)

Yes, that's a bit strange. Especially because the other settings (for example, for the thumb keys or the toggle switch) are retained. Only the settings for the illumination and the CPI button are lost as soon as you unplug the mouse. I've clicked "Save" on SSE.
For example: I've bind Win + PageUp and Win + PageDown to thumb buttons 6/7 to switch between workspaces in gnome-shell and those setting are retained even after reconnecting the mouse. Thumb button 5, which I've bind to WinKey for app expose also works. It's only the CPI-button and lighting that get's lost.
At first I suspected that this was related to the usb port (the mouse was connected to my monitor, which is connected to my laptop via usb-c). But that doesn't seem to make a difference. I guess it has something to do with gnome/mutter/wayland/libinput (as always).
If I unplug the mouse and then reconnect it, LEDs turns on again and the CPI-button is back to it's default setting (switching between sensitivity levels). I can press the CPI button once to get a higher sensitivity although I've only set up one level in Steelseries Engine (1200 CPI). If I press it again, I can no longer move the mouse.
Nevertheless, so far I'm really happy with my purchase. Weight, sensor, shape and buttons are great. QC, mousefeet and cable are above average. I am optimistic about the problems. The mouse has already received a firmware update.

Okay, I will look into it (The two articles you mentioned have the same link).

Oops sorry I did not saw that the ling does not change while navigating in translated version... The original links to article are:

https://blog.flozz.fr/2016/03/27/steelseries-rival-100-reverse-engineering-dun-peripherique-usb/
https://blog.flozz.fr/2020/05/25/reverse-engineering-recuperer-le-niveau-de-batterie-du-casque-sans-fil-steelseries-arctis-7/

I am optimistic about the problems. The mouse has already received a firmware update.

I hope updates will fix that

Got a rival 5, did some preliminary poking.
I set the 'reactive' color to 'Steady' #704ca6 and then the active zones to f997c[1-a], like so:

This produces a corresponding SET_REPORT data fragment of:
0000  21 ff 03 f9 97 c1 f9 97  c2 f9 97 c6 f9 97 c3 f9   !······· ········
0010  97 c7 f9 97 c4 f9 97 c8  f9 97 c5 f9 97 c9 f9 97   ········ ········
0020  ca 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ········ ········
0030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ········ ········

So it looks like it orders them strictly left to right and my guess was wrong :)
Unsure about where the 'reactive' color is set. These config packets are basically constantly sent (while the SSE is open?), and the mouse doesn't seem to retain anything after hitting 'save' when I then plug it into my linux laptop. Notably, like the other guy, if I hit the palm 'switch profile' button once, its colors switch back to what I had set, for about 5 seconds or so, and the buttons do not update to their 'saved' values from the saved profile.
If I then hit the 'Cycle CPI' button again, the mouse stops responding until I un/replug it. So that's great, definitely a solid firmware on this mouse.
I'll get to the button binding in a bit (tomorrow, hopefully).  My guess here is that the 'reactive' effect (zones flash a color from top to bottom) and animations are just computed in their software and it just updates the active color 60 times a second or something) or if the software/driver just do that, and it holds colors on its own just fine, or what.
The button binds do seem to at least be send-once and it's set until the mouse is power cycled, at least, so configuring them should be fine. My to-do list for this thing is:

figure out how the buttons are configured
investigate the RGB shit a bit more closely: figure out the rate of updates in the windows driver, animations, etc.
investigate the Cycle CPI button. The first step is figuring out how DPI is set, then figuring out if the mouse is asking the driver for a DPI to switch to or what - my guess is that it locking up is a symptom of pressing the button again after it didn't get a response from the host.

Just FYI, I've had a lengthy discussion with the Steelseries support about my issues. At some point I've asked for a refund and purchased a Steelseries Prime which has real On-Board-Memory and therefore does not need any software. (The first one I got had a faulty scrollwheel, the second one was fine. Because scrolling was still a bit noisey for my taste, I applied some Krytox 205g0. Since then I am very happy with this mouse).

Some statements by the customer service may be of interest for you:

May 27, 2021
This is due to the Rival 5 only having one onboard profile. Whatever profile is active when you unplug/quit Engine, is designated as the onboard profile.
These features require Engine to be running in order to function:
* All button mappings EXCEPT keyboard and mouse button functions
* Angle snapping
* Accel/Decel
* Lighting EXCEPT disabled lighting, reactive lighting, and device brightness
Changes made to these features should be saved to the mouse, even when Engine is quit or uninstalled:
* Keyboard and mouse button function mappings
* CPI
* Polling rate
* Disabled lighting
* Reactive lighting
* Lighting brightness

This answer was later corrected:

Jun 15, 2021
I have been advised that the Rival 5 does need Engine to run for the lighting settings on the mouse to work. Once you quit Engine, the mouse will go back to defaults. This means that if you plug the mouse to a PC that does not have Engine installed, it will only have the default settings.

Jun 18, 2021
The default being LED off is not currently a feature in Engine. Apologies for any inconvenience.

Jun 25, 2021
I am very sorry for the delayed response. I have sent this ticket to our team who works directly on mouse effects. I understand installing software on multiple PCs is not always feasible. In addition, I reviewed the CPI button issue and I have been informed that this is actually a known issue on the mouse and we have our development team working on a firmware update to correct the issue. We do not currently have an ETA for the firmware update release but I am happy to follow up with you when released.

In my experience not all firmware updates are mentioned in the release notes at https://techblog.steelseries.com/. But according to your observations it seems like this firmware update is still not available.

oh that's incredibly cursed
I might end up returning it and switching to a Rival 600 (since the only functional difference is the two extra side buttons on the 5, and those are annoying enough to just not matter to me), in that case. Still probably going to figure out the button config packet though, since it seems like a minor amount of active management of the mouse isn't too hard.

I checked the two links posted above about the reverse engineering, are similar instructions available in English? I'd like to help out here, but I'm not sure if something will be lost if I just throw the pages through Google Translate.

FYI: Only one year after the release of this mouse they fixed some of the bugs I reported. At least according to the changelog of GG 17.1.0. Almost every release of GG had some bugfixes for Rival 5. Just take a look at GG 18.0.0  🤦♂. Well, I guess it wasn't their best device…

Any news?

Any hope for support for the Rival 5? Just got one as a gift, looks and feels like a nice enough mouse to give it some love. Been reading into it a for the afternoon ... don't have a clue how to try some code for myself.

No idea if this has been tried, or if it has any chance of working,
but the Aerox 5 Wireless (and wired mode) are already supported and except for the wireless parts,
that one seems to be build identical to the Rival 5.
So using the Information in this thread and throwing it into the Aerox 5 Device file, might yield some results.
Or it might not, no idea.
I dont actually know how to add a Device file to rivalcfg, to try this out tho.

Well, i have done some poking my self and came up with this here file.
Not all information contained within is new and CPI and Button-Mapping is still missing, but i would like to test, what i have.
However under Windows it seems to be hard to talk to a USB-Device directly, if just there was a handy little tool to do that...
oh well.
That said, i have no idea how to throw that into a incomplete device file and even less of a clue on how to get rivalcfg to actually use that device file, to test this.
If a test with the whole LED and Polling-Rate stuff would be successful, i would poke around with the CPI and Button-Mapping stuff.
Any help is appreciated.
Rival_5_LEDs_Pollingrate.txt

I have now modified the Aerox5_Wireless_Wired device file.
rival5.txt
Now i would like to test it, because there is a chance, that some things might work and most wont.
Still, how would i go about adding this to rivalcfg and testing it? @flozz
Sorry for the multiple rambling posts and thanks in advance.

Hello,

First setup the project for development:
# clone this repository
git clone https://github.com/flozz/rivalcfg.git

# go to the project directory
cd rivalcfg

# create a virtualenv (note: this require to install the `python3-venv` package on Debian / Ubuntu)
python3 -m venv __env__

# activate the virtualenv
source __env__/bin/activate        # Linux / Bash
source __env__/Scripts/activate    # Windows / Git bash
__env__\Scripts\activate.bat       # Windows / CMD.exe
__env__\Scripts\activate.ps1       # Windows / PowerShell

# Install dependencies etc.
pip install -e .

[LINUX ONLY] On Linux, you will need to add udev rules to have the permission to communicate with the device. Create or edit /etc/udev/rules.d/99-steelseries-rival.rules and add the following lines:
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="183c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="183c", MODE="0666"

Then reload udev rules:
udevadm control --reload-rules

And finally unplug/replug the device

To test you Rival 5 profile:

create the rivalcfg/devices/rival5.py file with your code in it
edit rivalcfg/devices/__init__.py to add the import to your file (just add rival5 here: https://github.com/flozz/rivalcfg/blob/master/rivalcfg/devices/init.py#L220-L248

Then you should be able to test with commands like:
python3 -m rivalcfg --help  # should display the options specific to you device
python3 -m rivalcfg --color red  # shoud turn the LEDs to red color
...

NOTE: I have not many time to work on this project currently and I may not be able to work on my open source projects at all for a while (probably for few weeks)... so I may not answer quickly

Hello,
thank you for providing the above post, it made it possible for me, to create this device file:
(As .txt here, cause i am new to Github.)
rival5.py.txt
However, creating this device file was the "easy" part and only half the battle, because the Rival5 is special
when it comes to giving color values to the LEDs.
First of all, the LED color is the only thing, the mouse wont remember (e.g. DPI, Buttonmappings... will stay).
If you close SteelSeriesGG, it will default to rainbow.
If you use rivalcfg, the mouse will only keep the color values, as long as it is connected to the PC, while it is running.
On reboot you will have to call rivalcfg again once.
Secondly and more important:
Other mice, with multiple LEDs use different commands for different LEDs in their datafragments, like this:
(no actual device, just demonstration):
LED_1 green:
02aa01 00ff00
LED_2 green:
02aa02 00ff00
...
The Rival5 knows only one command for all 10 LEDs at once:
example, for color green:
[command] [LED1] [LED2] [LED3] ...
21ff03    00ff00 00ff00 00ff00 ...

So even if one would use --z1-color, --z2-color, ... like in the Aerox5 device file and just change the position of the value,
you would not only set that one LED to the desired color, but also set all others to "000000", wich turns them off.
So you have to set ALL LEDs at once in one datafragment.
The handler "rgbcolor" does unfortunately not support the needed in and outputs, even if I played around in the device file.
None of the other handlers seemed to fit as well.
So I wrote a new handler, based on the "rgbcolor "handler and called it "onestr_rgbcolor":
(As .txt here, cause i am new to Github.)
onestr_rgbcolor.py.txt
Because of me being a total beginner to Python and programming in general, it is probably really janky, but it does work.
(I have not tested the python.api suff with the [0, 255,0] type color values tho, because I dont know how.)
For the color values it takes the same inputs like the "rgbcolor" handler (00ff00, "yellow", "#f00...) and checks them for validity.
It also checks for the number of inputs and compares them to the number of LEDs, wich you can specify in the device file.
If the number of inputs exceeds the number of LEDs, it will throw an exception, however if the input is less, it will only set the first LEDs (as many as values are given) and sets all others to "000000", wich turns them off.
If the input of all LEDs should be forced, then the handler can be easily modified.
The input is as follows:
--c / --color
rivalcfg --c  "COLOR_LED_1; COLOR_LED_2; COLOR_LED_3; ...   COLOR_LED_10"
An example, for setting all 10 LEDs to green:
rivalcfg --color "00ff00; 00ff00; 00ff00; 00ff00; 00ff00; 00ff00; 00ff00; 00ff00; 00ff00, 00ff00"
The physical layout of the LEDs is this:

The physical Buttonlayout is this:

(Sorry for the German in there)
Note: that Buttons 6, 7, 8 are disabled by default.
I have tested everything reasonably and it works well enough, tho the -e and -d commands dont like to be used consecutively, wich disables -e and to fix this you need to replug the mouse.
I woould recommend removing the -e functionality in the device file, because you can get "rainbow" witch -d instead.
It would be nice, if someone, preferably a Rival5 owner, could test and verify tho.
I did my own poking around with Wireshark and the USB stuff, but the information and links contained within this thread
where really helpful.
Hope, this helps and will lead to the eventual addition of support for the Rival5 in rivalcfg.
Cheers,
-blob

I have tested everything reasonably and it works well enough, tho the -e and -d commands dont like to be used consecutively, wich disables -e and to fix this you need to replug the mouse. It is recommend to remove the -e functionality in the device file, because you can get "rainbow" witch -d instead.
It would be nice, if someone, preferably a Rival5 owner, could test and verify tho.

I just got a Rival5 and while I haven't tested everything, I can confirm the color settings are working perfect with your changes. Thanks a lot for your work!


Add support for 3<IP_ADDRESS>.92

I think we should also support at least the latest beta and stable as well. Thoughts? Ok you just merged it while i was typing

You can contribute as much as you want.
However note that the users once they use our module and enable is employee options, they would be able to update to whatever version they want...

The thing which makes us update the supported versions, is that sometimes some of the versions becomes out dated that it won't let you use instagram unless you update it...

I thought of having latest stable and beta support for people who don't wanna use alpha, but maybe it's not that important.

Maybe you are right.
Last time I checked (2xx versions) stable were having some type of obfuscation, but if (3xx versions) stables were ez to do I would support ur call


Expose envoy metrics service config via envoy pilot agent

We currently run mainline envoy as sidecars with a limited in-house implementation of the control plane in production.We are in the process of migrating to Istio. Metrics are published from envoy to the metrics service that in turn publishes to our company’s telemetry backend. We will need to support this flow during the migration at the very least along with telemetry via mixer.
Therefore we would like the metrics service config (https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/metrics/v2/metrics_service.proto) exposed via envoy pilot agent so that we can configure istio proxy to publish metrics to the metrics service.
We would like this exposed in the ProxyConfig as well.

This is done now


Correct recursive type detection

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@c7774bb). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage        ?   79.06%
=======================================
  Files           ?       13
  Lines           ?     2942
  Branches        ?        0
=======================================
  Hits            ?     2326
  Misses          ?      616
  Partials        ?        0

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 c7774bb...1e3c5bd. Read the comment docs.


chore(master): release 0.8.10

:robot: I have created a release beep boop
0.8.10 (2024-10-19)
✨ Polish

factor out statistics computation from samples (3c2a41f)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

0.8.10
:sunflower:


Logging failing to reach output set in rancher due to fluentd crashing repeatedly

Rancher Server Setup

Rancher version: v2.6-9801a059cf239934f5093ba8e3d15bd3fd9460d5-head
Installation option (Docker install/Helm Chart): docker

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): RKE1, RKE2

Proxy/Cert Details:

Information about the Cluster

Kubernetes version: v1.21.5-rancher1-1 and v1.20.11-rancher1-2
Cluster Type (Local/Downstream):

If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider):

Describe the bug
Installed logging on a 2.6-head rancher server with ec2 rke1 and rke2 clusters. The fluentd logging crashes and fills the buffer, never sending logs to the desired output
To Reproduce

created a rancher server with v2.6-9801a059cf239934f5093ba8e3d15bd3fd9460d5-head
added clusters - ec2
installed logging v2
created secret
created cluster output
created cluster flow

Result
logging does not flow
Expected Result
index appears in elasticsearch and logging flows
Screenshots

Additional context
conversation with izaac:
let's keep that until eventually fluentd crashes again or the connection error still happens after some time. It's getting a bit late but if you can reach Jacob  and share the setup.
You can tell him that the fluentbit pods are getting connection refused from the fluentd service
And that sometimes the fluentd crashes in your setup
And that this seems to be fine with 3.9.400 but not wiuth 3.12.0 (edited)
6:27
These are the errors I saw when the fluentd pod was crashing:
Events:
Type     Reason     Age                      From     Message

Warning  Unhealthy  6m38s (x147 over 3h12m)  kubelet  Liveness probe failed: dial tcp <IP_ADDRESS>:24240: connect: connection refused
Warning  BackOff    111s (x564 over 3h2m)    kubelet  Back-off restarting failed container
6:28
this is the command: k describe po  -n cattle-logging-system rancher-logging-fluentd-0
from jacob:
oh that is why fluentd is crashing - the buffer is full
this is fluentd so it may not be patched for fluentd yet -
curl and nslookup do not work either

This works with Logging v2 chart 3.9.400 and this also seems to not happen all the time.
I have this Rancher version v2.6.1 with chart version 100.0.0+up3.12.0 and it's fluentd is not crashing there.


Upgrade Falcor to v2

See https://github.com/thegazelle-ad/gazelle-server/pull/357/commits/35ab250af92618d596cb01b2fe14410bc9a328a2 for a first try


align AKS baked patches on 1.27

What type of PR is this?
/kind bug

What this PR does / why we need it:
baseline alignment for AKS flavored kubernetes 1.27
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
no, this is already carried in any AKS released 1.27 patches.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

/retest


Use PR branch ref SHA for presubmits instead of base ref

Using the PULL_BASE_SHA environment variable for simulating the changes in the presubmit jobs could cause issued since it would essentially be trying to replace the existing tag with the same new tag value. This causes git add to not add any files, hence git commit fails with exit code 1 since there are no files to commit.
Hence for presubmits, we could use PULL_PULL_SHA, a job environment variable from the presubmit CI environment which refers to the SHA of the head commit of the PR against which the job runs.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

/lgtm


Implement multi workspace/multiple crate cargo check support

While trying to fix #2780 I had some thoughts about how cargo check watching interacts with multi-workspaces and multiple-project-in-single-workspace setups.
Having multiple workspaces is in theory simple: Just launch a watcher for each workspace, and then figure out how to multiplex the result channels. Should be doable, with not too large an amount of work.
The main issue comes with having multiple projects inside a single workspace. Because multiple crates that don't share a cargo workspace could depend on each other, we can't naively run a cargo check instance for each crate.
And here's where i need somebody to check my thoughts: It seems that the thing we need to do, to solve both issues, is to run a check watcher for each crate where:

The crate lives in an open workspace.
The crate is a purely a root in the crate graph, that is, not other crate depends on it.

Which doesn't sound too bad. There is one small problem, which is probably a solved problem in graph theory: For the second condition to be checked quickly, we need to be able to invert the crate graph, so that instead of mapping from crate -> dependencies it maps crate -> crates depending on it.
The above seems to make sense in my head, but I'd love hear peoples opinions. These things tend to turn out better and simpler when multiple heads come together.

Hmm, we'd still have problems with locking per cargo workspace, but the above would ensure that every crate would eventually get diagnostics.

Any progress here? Lack of diagnostics for all but the first VSCode workspace is a frequent pain point for me.

For the single-workspace, multi-project setup, wouldn't it trigger the cargo check locks (Blocking waiting for file lock on build directory), and thus hurt performance? If so, what about adding an option to cargo where it wouldn't stop checking whatever it can check even if one project failed? This way, even with a single cargo check on the workspace, every crate that can compile or is the cause of non-compilation would still get diagnostics.

Would be nice to have the support for this like in the IntelliJ plugin. Or at least a way to switch the "current" Cargo project in the workspace.

Since https://github.com/rust-analyzer/rust-analyzer/pull/6027 we support multiple cargo check processes, and will spawn one per client workspace. I don't think it supports multiple Cargo workspaces (or crates without workspace) in the same client workspace though.

I don't think it supports multiple Cargo workspaces (or crates without workspace) in the same client workspace though.

@jonas-schievink hm, my understanding is that this issue is completely fixed though? We spawn cargo check for each separate linked project, and that's all there's to do, no?
I'd close this issue, but I am confused by your comment, so maybe I am missing something?
If anything, this works too well: https://github.com/rust-analyzer/rust-analyzer/issues/8631 :rofl:

Hmm, yeah, I think this might be a case of confusing terminology. Workspace can mean "Cargo workspace", "client workspace", or "whatever rust-analyzer considers a workspace".

If anyone comes from google, the way to do this is:
In .vscode/settings.json:
{
    "rust-analyzer.linkedProjects": [
        "path/to/Cargo.toml",
        "another/path/to/Cargo.toml"
    ]
}