After Update to OAuth from 8.0.4 to 9.0.1 we get exceptions in Testcafe

Are you requesting a feature or reporting a bug?
Bug
What is your Test Scenario?
Updateting from OAuth 8.0.4 to 9.0.1
What is the Current behavior?
An Error Occurs in Hammerhead when Testcafe tries to click a Button
What is the Expected behavior?
Succefully clicked Button.
How would you reproduce the current behavior (if this is a bug)?
Update OAuth to 9.0.1
Your Environment details:

testcafe version:                   1.8.2
node.js version:                    v12.13.1
command-line arguments:  -s takeOnFails=true --debug-on-fail
browser name and version: Chrome 80.0.3987.122 and Chrome:Headless 78.0.3904.97 / Linux 0.0
platform and version:          Windows and Linux

Additional ErrorInfos:
hammerhead.js:6 Error in initAuthorizationCodeFlow
window.console. @ hammerhead.js:6
(anonymous) @ main.083f21dea3e042ccbffb.js:1768
(anonymous) @ main.083f21dea3e042ccbffb.js:437
t.invoke @ polyfills.123b6da12ffbf9c14a0b.js:9
onInvoke @ main.083f21dea3e042ccbffb.js:1271
t.invoke @ polyfills.123b6da12ffbf9c14a0b.js:9
e.run @ polyfills.123b6da12ffbf9c14a0b.js:9
(anonymous) @ polyfills.123b6da12ffbf9c14a0b.js:17
t.invokeTask @ polyfills.123b6da12ffbf9c14a0b.js:9
onInvokeTask @ main.083f21dea3e042ccbffb.js:1271
t.invokeTask @ polyfills.123b6da12ffbf9c14a0b.js:9
e.runTask @ polyfills.123b6da12ffbf9c14a0b.js:9
m @ polyfills.123b6da12ffbf9c14a0b.js:9
e.invokeTask @ polyfills.123b6da12ffbf9c14a0b.js:9
p @ polyfills.123b6da12ffbf9c14a0b.js:40
h @ polyfills.123b6da12ffbf9c14a0b.js:40
hammerhead.js:6 TypeError: Cannot read property 'digest' of undefined
at e. (main.083f21dea3e042ccbffb.js:437)
at main.083f21dea3e042ccbffb.js:1679
at Object.next (main.083f21dea3e042ccbffb.js:1679)
at main.083f21dea3e042ccbffb.js:1679
at new t (polyfills.123b6da12ffbf9c14a0b.js:17)
at c (main.083f21dea3e042ccbffb.js:1679)
at e.calcHash (main.083f21dea3e042ccbffb.js:437)
at t. (main.083f21dea3e042ccbffb.js:437)
at main.083f21dea3e042ccbffb.js:1679
at Object.next (main.083f21dea3e042ccbffb.js:1679)
at a (main.083f21dea3e042ccbffb.js:1679)
at t.invoke (polyfills.123b6da12ffbf9c14a0b.js:9)
at Object.onInvoke (main.083f21dea3e042ccbffb.js:1271)
at t.invoke (polyfills.123b6da12ffbf9c14a0b.js:9)
at e.run (polyfills.123b6da12ffbf9c14a0b.js:9)
at polyfills.123b6da12ffbf9c14a0b.js:17
at t.invokeTask (polyfills.123b6da12ffbf9c14a0b.js:9)
at Object.onInvokeTask (main.083f21dea3e042ccbffb.js:1271)
at t.invokeTask (polyfills.123b6da12ffbf9c14a0b.js:9)
at e.runTask (polyfills.123b6da12ffbf9c14a0b.js:9)
at m (polyfills.123b6da12ffbf9c14a0b.js:9)
at e.invokeTask [as invoke] (polyfills.123b6da12ffbf9c14a0b.js:9)
at p (polyfills.123b6da12ffbf9c14a0b.js:40)
at Animation.h (polyfills.123b6da12ffbf9c14a0b.js:40)
window.console. @ hammerhead.js:6
(anonymous) @ main.083f21dea3e042ccbffb.js:1768
(anonymous) @ main.083f21dea3e042ccbffb.js:437
t.invoke @ polyfills.123b6da12ffbf9c14a0b.js:9
onInvoke @ main.083f21dea3e042ccbffb.js:1271
t.invoke @ polyfills.123b6da12ffbf9c14a0b.js:9
e.run @ polyfills.123b6da12ffbf9c14a0b.js:9
(anonymous) @ polyfills.123b6da12ffbf9c14a0b.js:17
t.invokeTask @ polyfills.123b6da12ffbf9c14a0b.js:9
onInvokeTask @ main.083f21dea3e042ccbffb.js:1271
t.invokeTask @ polyfills.123b6da12ffbf9c14a0b.js:9
e.runTask @ polyfills.123b6da12ffbf9c14a0b.js:9
m @ polyfills.123b6da12ffbf9c14a0b.js:9
e.invokeTask @ polyfills.123b6da12ffbf9c14a0b.js:9
p @ polyfills.123b6da12ffbf9c14a0b.js:40
h @ polyfills.123b6da12ffbf9c14a0b.js:40

This information is insufficient to determine the cause of the issue. Could you please give us a public url or a sample project with a test so that we can reproduce this behavior on our side?


Changing water material in UE 5.1 causes ocean to turn white

Hello.
I posted this as well in the Community Forums here. I’m using UE 5.1 from Epic Launcher and Cesium for Unreal from the Marketplace.

Unreal Engine Version: 5.1.0-23058290+++UE5+Release-5.1
Cesium for Unreal version 1.21.0
Visual Studio Community 2022 (64-bit) version 17.4.3

I’m following the documentation on how to edit the water material. However, I seem to have encountered a bug. Here are the steps to reproduce the bug:

Download the Cesium for Unreal Samples project and Cesium plugin from the Marketplace.
Open the 01_CesiumWorld level.
Copy the MI_CesiumThreeOverlaysAndClippingAndWater inside the Cesium Plugins folder and move it to the Content folder.
Copy the MLB_CesiumSimpleWater inside the Plugins folder and move it to the Content folder.
Open the new MI_CesiumThreeOverlaysAndClippingAndWater. In the Layer Parameters window, under the Water Material Layer Key, change the old MLB_CesiumSimpleWater with the new MLB_CesiumSimpleWater we just created. Save the material.
Select the CesiumWorldTerrain in the Outliner. Go to the Details panel > Cesium > Rendering > Water Material. Assign the new MI_CesiumThreeOverlaysAndClippingAndWater here.
Click Refresh Tileset multiple times. The ocean will turn white. If it doesn’t turn white, try editing the Georeference Origin a couple of times. The ocean will eventually turn white.

I tested this with UE 5.0.3, and this bug does not happen. Hoping to find a fix for UE 5.1.

I've responded to your forum post here:
https://community.cesium.com/t/changing-water-material-in-ue-5-1-causes-ocean-to-turn-white/21894
I believe this is a bug in UE 5.1 and not something we can fix in Cesium for Unreal.


add primary interpretation into the title

References #2736
Who is this for?
Us to test the language around interpretations and how to surface that to users usefully.
What is it doing for them?
Uses the language "{Event title} in {Primary interpretation title}".
e.g.

The content team want to do this manually.


Make Destiny Roll Prompt Button more visible

I only today found out that you can right-click the rim of the Destiny Pool to prompt a Destiny roll from the party. On the Discord this also wasn't common knowledge. I recommend making the button more visible.

[ ] The "prompt destiny roll" feature should get it's own very visible button next to the pool, just like the group overview

Yes, there will be a list of additional command buttons in addition to this that will be visible on the Destiny Pool.

Yes, there will be a list of additional command buttons in addition to this that will be visible on the Destiny Pool.

Added a drop down menu feature to allow stacking of options on Destiny Pool display.

Added a drop down menu feature to allow stacking of options on Destiny Pool display.

will be in the next release.

will be in the next release.


[fork] ⚙ the-gear/ts-lib-starter

This PR is just all what is in the-gear/ts-lib-starter
You may be interrested in cherry-picking 2be1e788e648a294761a9349b21402a8ab96b09b as it solves #153
I'm just sharing this — it can be seen as almost rewrite with my custom preferences somewhere.

Thanks @langpavel ! one suggestion to your "fork".
One suggestion: It would be nice to get some "kudos" to the original author to your "fork" in the README. 👀

I'm gonna close this for now. But please feel free to contribute to relevant things !
Cheers

It would be nice to get some "kudos" to the original author to your "fork" in the README.

It is there: README #Thanks
I can reword it if you wish :-)
I want keep your credit in other files, but it's hard as they are inputs for source generation...

aaah didn't see that one ! :) all good


feat: [#4446] Azure Blob Storage should support Identity authentication

Fixes #4446
Description
This PR allows using the MSI authentication for Azure Blobs Storage.
Specific Changes

Added a new option in the constructor with the necessary parameters for creating the blob storage client using msi credentials.

Testing
The following image shows the new validations and unit test passing.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

13 of 14 (92.86%)  changed or added relevant lines in 1 file are covered.
82 unchanged lines in 5 files lost coverage.
Overall coverage remained the same at 84.503%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

libraries/botbuilder-azure-blobs/src/blobsStorage.ts
13
14
92.86%

Files with Coverage Reduction
New Missed Lines
%

libraries/botbuilder-lg/src/templateExtensions.ts
1
84.48%

libraries/botframework-streaming/src/utilities/createNodeServer.ts
1
78.57%

libraries/botframework-streaming/src/namedPipe/namedPipeServer.ts
12
50.68%

libraries/botframework-streaming/src/namedPipe/namedPipeClient.ts
17
34.09%

libraries/botframework-streaming/src/namedPipe/namedPipeTransport.ts
51
3.92%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
20036

Relevant Lines:
22475

💛  - Coveralls


feat: Finset.sup s f = 0 ↔ ∀ i ∈ s, f i = 0

From ForbiddenMatrix

I am somewhat surprised no file exists for this already

What is ForbiddenMatrix?

YaelDillies/ForbiddenMatrix is the repository

bors r+
Thanks!


[Question] Get loading state of query in another component

Hello,
I wanted to ask if it is possible to get the loading-state of a query that's executed in another component.
Example:
Dashboard and Login are handled in different components. Now I would like to show a loading state on the dashboard when doing the login / fetching the current user.
This could done with Vue events (sending an event from the Login component when loading starts and another one when loading end), but I fear that's going to more difficult to maintain. Especially if it's used not just in the dashboard.
So my ideal solution would be:
Having access to a query from another component. If I could use this.$apollo.queries.CurrentUser.loading from the Dashboard this would allow to easily watch for changes in that query.
Is there a way to register queries on the $apollo property for all instances?

In Composition API you can just pass whole useQuery / useMutation object as component prop and use it in other's component template.

I have the same case:
I have a dashboard, I'm loading many data. I would like to show loader for Dashboard, but at the same time, I'm loading data inside of Sections.
Yes, you load data on Dashboard and pass to sections but, then I have separate pages, where the same section components are used. I know, hard to visualize but basically, I need the same access to query


What does this mean?

The current version of the native library (1.1) does not support the version of the "(Task Name Goes Here)" task (0.0)

The exception occurred at Microsoft.Win32.TaskScheduler.Task.GetV2Definition(TaskService svc, IRegisteredTask iTask, Boolean throwError) in C:\Users\dahall\Documents\Visual Studio 2010\Projects\TaskService\Task.cs:line 1515
at Microsoft.Win32.TaskScheduler.Task.get_Definition() in C:\Users\dahall\Documents\Visual Studio 2010\Projects\TaskService\Task.cs:line 850

My program made the task and saved the task, how can it not read it back?
Originally posted: 2016-11-10T14:44:39

Will you supply the version of Windows on which this error occurred? Also, if possible, can you send me the XML of the created task? This is most securely done by sending me a personal message through this site.
Originally posted: 2016-11-11T07:39:04

Windows 10 64-bit, unfortunately I don't have the XML data. Is there some way of getting the raw XML data from the exception object when such an exception occurs?
Originally posted: 2016-11-17T19:43:58

Take the task you create and save, on any system, and collect the XML for it using the native "Task Scheduler" system applet. That will suffice. You cannot get it from the exception. That error is occurring because the wrapper cannot parse the XML in an expected format.
Originally posted: 2016-11-18T08:24:55


Angular2 CellRenderer: api.refreshCells not working

api.refreshCells is not working for Angular2 CellRenderers. The culprit seems to be that RenderedCell.prototype.refreshCell checks, in case that there's no new data, if the CellRenderer implements refresh().
if (!newData && this.cellRenderer && this.cellRenderer.refresh) {
    // if the cell renderer has a refresh method, we call this instead of doing a refresh
    // note: should pass in params here instead of value?? so that client has formattedValue
    var valueFormatted = this.formatValue(this.value);
    var cellRendererParams = this.column.getColDef().cellRendererParams;
    var params = this.createRendererAndRefreshParams(valueFormatted, cellRendererParams);
    this.cellRenderer.refresh(params);
    // need to check rules. note, we ignore colDef classes and styles, these are assumed to be static
    this.addClassesFromRules();
}

The Angular2 CellRenderer is simply wrapped by a "normal" CellRenderer that implements refresh
CellRenderer.prototype.refresh = function (params) {
    this._params = params;
};

This refresh obviously doesn't refresh the Angular component. Possible solutions: recreate the Angular component as if refresh wasn't implemented, or add refresh to the AgAware interface and let the component handle refreshing (I'd like this a lot) instead of the wrapper renderer..
Use case: apart from the imo obvious necessity of adding the refresh method to the angular component: I'm editing one cell in a row that changes another cell in the same row (meaning, cellA restricts and potentially changes values of cellB). After these changes cellA gets recreated, but cellB remains unchanged (but the values in my data rows are updated).

thank you for the feedback. we are gong to review the ng2 component again next week and will take this on board.

Hi
I've added a refresh method to AgAware - this will be invoked on a cellrenderer component if it exists.
The code is now:
           refresh(params:any):void {                 this._params = params;                 if(this._componentRef.instance.refresh) {                     this._componentRef.instance.refresh(params);                 }             }
I've also updated from-component.component.ts in the ag-grid-ng2-examples project to use this.
This should solve your usecase I think, but do let me know if you have feedback
thanks!

Completely forgot about this one. Works like a charm now.


Maximize trace of a Hermitian matrix fails with objective must be real

Description of the bug
When trying to call Maximize on the trace of a Hermitian matrix CVXPY fails with a ValueError.
To Reproduce
import cvxpy as cvx
import numpy as np

c = [0, 1]
n = len(c)

# Create optimization variables.
f = cvx.Variable((n, n), hermitian=True)

# Create constraints.
constraints = [f >> 0]
for k in range(1, n):
    indices = [(i * n) + i - (n - k) for i in range(n - k, n)]
    constraints += [cvx.sum(cvx.vec(f)[indices]) == c[n - k]]

# Form objective.
obj = cvx.Maximize(c[0] - cvx.trace(f))

# Form and solve problem.
prob = cvx.Problem(obj, constraints)
sol = prob.solve()

print(sol)
print(f.value)

Expected behavior
The trace of a Hermitian matrix is real-valued, so this error should not be thrown.
Output
Traceback (most recent call last):
  File "sdp_test.py", line 17, in <module>
    obj = cvx.Maximize(c[0] - cvx.trace(f))
  File "/usr/lib/python3.7/site-packages/cvxpy/problems/objective.py", line 46, in __init__
    % self.NAME)
ValueError: The 'maximize' objective must be real valued.

Version

OS: Arch Linux
CVXPY Version: 1.0.14

Additional context
I have also tried constraining this to real values in several ways, using both atoms and combinations of variables and constraints.

I also came across similar problems before. It seems that cvxpy doesn't know cvx.trace(f) is real. You can try cvx.real(cvx.trace(f)).

I did try this, it fails with a different error. I'm not by my machine right now, but I'll update later with that stack trace.

I have tried this, but it yields a different error.
import cvxpy as cvx
import numpy as np

c = [0, 1]
n = len(c)

# Create optimization variables.
f = cvx.Variable((n, n), hermitian=True)

# Create constraints.
constraints = [f >> 0]
for k in range(1, n):
    indices = [(i * n) + i - (n - k) for i in range(n - k, n)]
    constraints += [cvx.sum(cvx.vec(f)[indices]) == c[n - k]]

# Form objective.
obj = cvx.Maximize(c[0] - cvx.real(cvx.trace(f)))

# Form and solve problem.
prob = cvx.Problem(obj, constraints)
sol = prob.solve()

print(sol)
print(f.value)

Errors with:
Traceback (most recent call last):
  File "sdp_test.py", line 21, in <module>
    sol = prob.solve()
  File "/usr/lib/python3.7/site-packages/cvxpy/problems/problem.py", line 268, in solve
    return solve_func(self, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/cvxpy/problems/problem.py", line 381, in _solve
    data, inverse_data = self._solving_chain.apply(self)
  File "/usr/lib/python3.7/site-packages/cvxpy/reductions/chain.py", line 65, in apply
    problem, inv = r.apply(problem)
  File "/usr/lib/python3.7/site-packages/cvxpy/reductions/complex2real/complex2real.py", line 54, in apply
    constraint, inverse_data.real2imag, leaf_map)
  File "/usr/lib/python3.7/site-packages/cvxpy/reductions/complex2real/complex2real.py", line 112, in canonicalize_tree
    real_arg, imag_arg = self.canonicalize_tree(arg, real2imag, leaf_map)
  File "/usr/lib/python3.7/site-packages/cvxpy/reductions/complex2real/complex2real.py", line 112, in canonicalize_tree
    real_arg, imag_arg = self.canonicalize_tree(arg, real2imag, leaf_map)
  File "/usr/lib/python3.7/site-packages/cvxpy/reductions/complex2real/complex2real.py", line 112, in canonicalize_tree
    real_arg, imag_arg = self.canonicalize_tree(arg, real2imag, leaf_map)
  File "/usr/lib/python3.7/site-packages/cvxpy/reductions/complex2real/complex2real.py", line 117, in canonicalize_tree
    leaf_map)
  File "/usr/lib/python3.7/site-packages/cvxpy/reductions/complex2real/complex2real.py", line 139, in canonicalize_expr
    assert all(v is None for v in imag_args)
AssertionError

I think this should be viewed as a bug.
But as a workaround, you can change
    constraints += [cvx.sum(cvx.vec(f)[indices]) == c[n - k]]

to
    constraints += [cvx.sum(cvx.vec(cvx.real(f))[indices]) == c[n - k]]
    constraints += [cvx.sum(cvx.vec(cvx.imag(f))[indices]) == 0]

Right, equality constraints for complex numbers aren't supported right now. I can add support. The initial issue with trace of a Hermitian matrix seems a bit niche, but maybe that should be supported.

@SteveDiamond Is it related to #642 which also involves equality constraints for complex matrices?

I've fixed this on master. cvxpy wasn't properly handling the special indexing.


Add order to base params

Using index to order the blades isn't intuitive imo. When dynamically adding blades I don't often know what index I want to insert a specific item to.
I almost always want to set an arbitrary number, e.g. order: 100 if I likely always want that blade at the bottom. But if there is an exception I can set the order of another item to 101 etc.
AFAICT there is no nice way to achieve that with index..

Thank you for sharing your opinion, but currently I don't plan to add such a parameter.
One of Tweakpane's core principles is simplicity. Using index is the simplest way to organize ordered items.
I believe that more complex features like this should be managed by users.

Feel free to reopen the issue if you have any updates.


The clustering reference page on the website shows a 404

Is there an existing issue for this?

[X] I have searched the existing issues

Kong version ($ kong version)
kong3.3
Current Behavior
When I go to https://docs.konghq.com/1.4.x/clustering, I get a 404
Expected Behavior
When I go to https://docs.konghq.com/1.4.x/clustering, I should see the clustering reference
Steps To Reproduce
Go to https://docs.konghq.com/1.4.x/clustering,
Anything else?
No response

Heyy, @baasbank I tried working on this issue and found that :
There are 3 PATHS for Kong's released versions.

Versions
PATH
Clustering Link

0.2.x - 2.0.x
https://legacy-gateway--kongdocs.netlify.app/gateway-oss/ {version}
https://legacy-gateway--kongdocs.netlify.app/gateway-oss/1.4.x/clustering

2.1.x - 2.5.x
https://docs.konghq.com/gateway-oss/ {version}
https://docs.konghq.com/gateway-oss/2.4.x/clustering

2.6.x - 3.3.x(latest)
https://docs.konghq.com/gateway/ {version}
https://docs.konghq.com/gateway/2.8.x/reference/clustering/

Here we can see that the older versions of Kong's Doc has a redirection to https://legacy-gateway--kongdocs.netlify.app/
I hope this solves your issue.
Please do respond to this solution and share your recommendations.

Thank you. There's no clustering reference for the latest version of the docs. Not that it matters though if the clustering reference hasn't changed since 2.6.x. I just couldn't find it on 3.3.x and thought it wasn't there.

Hi. I think by clustering we mean hybrid mode(CP/DP). The hybrid mode was introduced in 2.0 so I don't think we will have a page for it in 1.x's documentation.


clusteradm get works  with --clusters option does not work

Describe the bug
Passing multiple clusters separated by commas to the clusteradm get works  command with --clusters option does not work. Only manifests from the last cluster specified are returned.
To Reproduce
Issue a command like this
clusteradm get works my-first-work --clusters='cluster1,cluster2' --context kind-hub
Expected behavior
I would expect manifests from all specified clusters to be returned. The help text indicates that --clusters should be supported.
clusteradm get works --help
get manifestwork on a specified managed cluster

Examples:

# Get all manifestworks in a cluster
clusteradm get works --cluster cluster1
# Get a specific manifestwork in a cluster
clusteradm get works work1 --cluster cluster1

Options:
    -c, --cluster='':
        Name of the managed cluster

    --clusters=[]:
        A list of the managed clusters.

    -o, --output='tree':
        output format can be tree, table or yaml

Usage:
  clusteradm get works [flags] [options]

Use "clusteradm options" for a list of global command-line options (applies to
all commands).

Environment ie: OCM version, Kubernetes version and provider:
Three kind clusters created by the Getting Started procedure on the Open Cluster Management web site.
clusteradm version
client          version :v0.8.1-0-g3aea9c5
server release  version :v1.29.2
default bundle  version :0.13.1

Kubernetes 1.29.2 hub cluster stood up by kind
kubectl get nodes -o wide --context kind-hub
NAME                STATUS   ROLES           AGE    VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                         KERNEL-VERSION   CONTAINER-RUNTIME
hub-control-plane   Ready    control-plane   7d2h   v1.29.2   <IP_ADDRESS>    <none>        Debian GNU/Linux 12 (bookworm)   6.5.0-1017-aws   containerd://1.7.13

Additional context
Add any other context about the problem here.
Demonstration of bug:
clusteradm get works my-first-work --clusters='cluster1,cluster2' --context kind-hub
<ManifestWork>
└── <my-first-work>
    └── <Applied> True
    └── <Available> True
    └── <Resources>
    │   ├── <deployments>
    │   │   ├── <default/nginx-deployment> applied
    │   ├── <serviceaccounts>
    │       └── <default/my-sa> applied
    └── <Cluster> cluster2
    └── <Number of Manifests> 2

/assign @zhujian7

@jmlineb FYI: I think this PR https://github.com/open-cluster-management-io/clusteradm/pull/415 fixed the issue

/close


Redirect from graphical redirect changes protocol to insecure

As per the title, when navigating to /graphiql with graphiql enabled, the service redirects to /graphiql?path=/graphql correctly, however the new location changes the protocol from https to http.  We use a load balancer which does not allow insecure http.
If navigating directly to  /graphiql?path=/graphql with protocol as https, the graphiql UI and graphql schema are loaded correctly as expected. The issue is only with the location provided in redirect response.

Could you elaborate a bit more, we need more information to understand the problem.

Is this load balancer doing TLS termination - in other words, is the load balancer sending https or http to the application?
If it is doing TLS termination, is the load balancer sending Forwarded request headers to the application?
Are you using Spring MVC or Spring WebFlux?
Have you configured the ForwardedHeaderFilter in your application? If you're using Spring Boot, this should be of interest.

Thanks!

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.


Allow multiple player on same webpage

FEATURE REQUESTS: Do there any option to add multiple player on one page? If not, please add this features or at least give us chance to do by using dom element as our want.
Issue description
It's important to have multiple player support with their own playlist to make a music site.

Hi @foysalremon,
You can definitely add multiple players to each page. You would initialize all of the songs you want in the Amplitude config function and then you would reference the index of these songs in each individual player. You can also have multiple playlist players on a single page. I will make some examples of how this is done and upload them to the site.

@foysalremon Did you get this figured out? If so I'll close the issue. Otherwise I can provide an example with multiple players on the page. AmplitudeJS supports multiple playlists and players

Closing this because it went stale.

@danpastori The examples would be nice, though! Please provide some, would be of great help!
On the other hand I wonder, if this couldn't be done with one additional CSS class that is also written to the Amplitude.config object.
Say, there is a wrapper class or ID for each player that reads like "amplitude_player_1", and this is written to the config like "Amplitude.init({ player: document.querySelector('.amplitude_player_1') })", so the user can have full control over naming etc.
The JS, of course, would have to be adapted to something like this:
"...(Amplitude.config.player + ' amplitude-volume-up')".
Having said that, the DOM parsing gets more intense because of that. And since AmplitudeJS has a lot of "document.getElementById" and similar code line, I wonder, if it wouldn't be better to put all those classes in a settings tree of the config object, so that the parsing is done only once. This could speed up the rendering and any further interactions and probably could even be helpful in AJAX scenarios...
Just my 2 cents...

An example would be great. I created a label for this so that we can remember what needs an example for future releases.

Do you mean an example of my proposal or the announced examples by @jaydrogers ?

Sorry for the confusion, when I said "an example would be great", I meant us providing an example of how to have multiple players on a page.
We're working on a gallery of different example players and I want to make sure we are providing quality and useful examples.
We'll keep you posted as soon as we have this ready!

Sorry, I was busy with some other stuff. For my last project I have change plugin for audio player. An example would be great, but there will still be some issue while all track have to be listed once. Giving 2 example case:

I was actually wanting to generate json track data by collecting information from html data attribute and then push them into amplitude playlist config as track. It was not easy with single config option.

If someone would like to use amplitude with WordPress and they have different custom post for different player where all the track attribute will come from some custom field then it will not be easy them to configure all track at once while showing them different place.

No worries, we know how it is! I will review this with @danpastori and will keep you posted on your example cases.
We've done players with Wordpress using Amplitude, so maybe that might be it's own example as well. We'll keep you posted! 😎

@jaydrogers did know this example was made or not? If made please give me the HTML file. Thanks

This is done in 3.3. You can find the example here: https://github.com/521dimensions/amplitudejs/tree/master/examples/multiple-playlists


More info on installation please

Hi this looks really cool and I will try to implement this for x-well d12
Can you give some more details (I have only about a year experience with IOBroker etc.) on:

why is there the dependency on home assistant? I assume an mqtt broker in IOBroker would also work?
is this running on a Linux-based raspberry pi? This is my plan but I am afraid of driver issues for the required hardware…
Thank you very much!

Ok I took the next step. Software runs on raspberry pi zero. Communication with IOBroker works fine. Changes I make in IOBroker have direct effect on the values printed by the server in the terminal. However by now I was not successful with actually controlling the fans. All cannabis have no effect. Sensor data is also not displayed. I will post more info while I continue with troubleshooting.

Hi!
Sorry for the late response. There is indeed no hard dependency on home assistant, it implements the hass autodiscovery protocol. I'll update the instructions, since any mqtt broker should work. (I'm using mosquito).
With regard to controlling I've seen that the thing is very picky on which signal it receives. I've tried multiple, and the only one that I've found that works is the https://www.waveshare.com/usb-to-rs232-485-ttl.htm?sku=15817
The fact that you're not seeing sensor data is expected, since the fans seem to answer with their sensor data when the new fan speed is sent. (The original controller sends the expected fan speed continuously, so do I)

Thanks for the reply. I bought exactly this adapter despite the highest price.
I have no success. fans are completely dead.
My troubleshooting so far:
I set the jumper and the switch as described to ND and to 5V.
I tried with GND connected and without.
I tried running this from my Mac as well as from the Raspberry.
PWR LED is on. Green TXD LED is blinking as soon as I start the server.
I tried connecting the Waveshare adapter to different locations on the bus in order to avoid issues with signal strength.
I have the following setup:
Zone 1: 2 Fans installed
Zone 2: 1 Fan
Zone 3: 1 Fan
In order to check whether this setup causes issues I only switched on one fan:
❶: 🔀🏠➡ ⏸   0s (100 ma)🌡 ____C, __% ♻  ____C, __%; ❷: 🔀🏠⏸ ⏸   0s (100 ma)🌡 ____C, __% ♻  ____C, __%; ❸: 🔀🏠⏸ ⏸   0s (100 ma)🌡 ____C, __% ♻  ____C, __%
state as json:

{
"v1": {
"1": {
"fan": {
"on": true,
"speed": 100,
"forward": true,
"oscillation": true
},
"counterfan": {
"state": "Off"
}
},
"2": {
"fan": {
"on": false,
"speed": 100,
"forward": false,
"oscillation": true
},
"counterfan": {
"state": "Off"
}
},
"3": {
"fan": {
"on": false,
"speed": 100,
"forward": false,
"oscillation": true
},
"counterfan": {
"state": "Off"
}
}
}
}

I also tried to sniff the bus by leaving the original controller connected.
Every few seconds I get the following message:

WARNING:root:Unknown packet ['0x55', '0x0', '0x55', '0x59', '0x69', '0xea', '0x0', '0x55', '0x59', '0xd1', '0xf2', '0xfb', '0xff', '0xfd', '0xfb', '0xff', '0xff', '0x9f', '0xfd', '0x0', '0x55', '0x59', '0xd1', '0xf2', '0xf7', '0xfd', '0xff', '0xd7', '0xaf', '0x25', '0xff', '0xfe', '0x40', '0x55', '0xd6', '0x6b', '0xed', '0xef', '0xfb', '0x1f', '0xc7', '0xfb', '0xfd', '0xc3', '0xd3', '0xd3', '0x85', '0x0', '0x55', '0x59', '0xd3', '0xf2', '0xfd', '0xfb', '0xff', '0xd1', '0xff', '0x0', '0x55', '0x59', '0xb8', '0xba', '0xba', '0x1', '0xc0', '0xff', '0x0', '0x55', '0x59', '0xba', '0xba', '0xc0', '0x0', '0x0', '0x55', '0x59', '0x6b', '0xfe', '0xba', '0x2', '0x0', '0x55', '0x59', '0xd1', '0xf2', '0xff', '0xfd', '0xff', '0xcf', '0xaf', '0x25', '0xf5', '0xcf', '0xf5', '0xff', '0xfd', '0x0', '0x55', '0x59', '0x69', '0xea', '0xef', '0xf9', '0xfd', '0xc1', '0x0', '0x55', '0x59', '0xd3', '0xf2', '0xfb']

I wonder if this is a hint that the X-well has a tiny different protocol?
The only thing left I can try would be to change the setting of the internal jumper of the waveshare.
Any more ideas?

Update: I swapped A and B on the Bus and it is working (with errors)

That crash is weird, I'll try to have a look. Since you seem to have bigger setup than I do (I only have two fans in one zone here).
IIRC I have tested without sensors too, also ran the setup quite long with only one fan.
The failed packets seem to be due to incorrectly parsed packets. The data packets are usually not that long. (see reverser.py for some examples)
I'd try with one zone first (since I have only one here)
does it help to disconnect fans in order to simplify the protocol? Or did you figure out that the system is robust also in case you send commands to fans that are not installed?

The protocol is fairly simple, the number of fans on the bus does not matter, the number of sensors might give problem though.

did you check voltage levels on the bus? your description that only one Waveshare adapter was working might be due to weak signal? Unfortunately I have no oscilloscope or logic analyzer. I have rather long distances on the bus. Therefore I checked different positions to make sure that at least one fan is close to the controller.

Yes I did, the reason for the waveshare is because it seems to be the only adapter that sends the correct signal form. (IIRC it actually properly drives the RS485, while most cheap adapters don't)

I noticed that If you only connect the two power cables to the original controller but not the bus the fans are already starting. What did you do with the power cables? just leaving them unconnected? Or did you connect the power cables to the original controller

I have my power from the original power supply. My fans remained still when powering up. They only start spinning when the first packet is received. Then they actually keep spinning forever even after stopping the software, so the repetitive sending of the requested fan level is mostly to get the sensor data back.

I tried connecting the Waveshare adapter to different locations on the bus in order to avoid issues with signal strength.

In my setup the waveshare is at the end of the bus, with both fans about 15meter? away. I use for wires of a CAT5 cable for both the power and the data (maybe that helps with the signal integrity).

FYI my setup is 1 zone, 2 fans, 1 sensor.

Thanks for the help!  As soon as I removed the second sensor the whole setup of
Zone 1 pair
Zone2 single
Zone 3 single + sensor
seems to be working.
If you or somebody else is interested to fix this let me know how I can support this with more detailed logging or sniffing of the packets. I feel not comfortable editing the parser myself (yet).
Otherwise I will just install a separate smart sensor like shelly HT etc.

That's very interesting info (since switching to one sensor helps that might be an indication).
Thanks. When I have time I'll have a look to find the bug.

Update: Setup with only one sensor is now running since one week without any issues. Very cool :-)


Add Map functions for bindings to match the List and Set support.

List and Set functions have been updated to be more flexible and more robust. The same type of improvement is needed for Map constructions. I'm labeling this one as an easy pick because the examples for List and Set provide a good starting point.
Background:
The support for Set and List functions has recently been upgraded to allow for different construction techniques around these patterns:

ListFunctions(functions... )
ListStepped(functions... )
ListHashed(functions... )
ListSized(sizefunc, functions... )
ListSizedStepped(sizefunc, functions... )
ListSizedHashed(sizefunc, functions... )

Stepped functions increment the main input value before applying it to the element functions.
Hashed functions hash the input value between each of the element functions.
Sized functions use the first function to determine the size of the collection.
Further, the arguments for these functions were changed to do some runtime function adaptation using a new facility for glueing function arguments to the types needed. This is much more robust in the long term and already allows for any reasonably close function to be used.
(ListFunctions was used instead of List to avoid clobbering the original List function, now deprecated)
The same basic pattern was used for the Set functions.

There is a set of new functions for Maps, using the same naming and argument conventions as for Set and List functions. This is in main and will be released shortly.


feat(next): added range handling for file requests

What?
This adds the correct headers and start/end options to the file streaming of the nextjs endpoint for getting files from disk.
Why?
Right now if you request for example a video with the type "video/mp4", the browser will send the range headers, but they are ignored in the handler and thus downloads the whole video. If you have large video files, this is problematic as the user needs to wait for the whole video to download without streaming the buffered bytes.
How?
To fix this, in the getFile handler it adds a check for the range header and returns the file in chunks instead of waiting for the whole file to be loaded. It also modifies the streamFile method to include optional options for start and end. The status code is modified to PARTIAL_CONTENT (206) if a range request has been detected.
Questions

I think this could be exploitable by making many small range requests. Is this something that is catched by the rate-limiter?
Is this only needed for local files? I suppose the cloud providers do this automatically?
Maybe it's better to put this behind a separate option int the upload config for the collection? Something like allowRangeRequests: boolean?

Any chances this will be implented? As videos coming from storage on disk directly through Payload, will all be loaded all at once, which blocks the loading of the site. Anyway, if this gets ignored and someone having the same issue, here is how you can fix it in your Media collection:
Define these functions somewhere, or directly in your Media Collection
export function iteratorToStream(iterator: any) {
  return new ReadableStream({
    async pull(controller) {
      const { done, value } = await iterator.next()
      if (done) {
        controller.close()
      } else {
        controller.enqueue(value)
      }
    },
  })
}

export async function* nodeStreamToIterator(stream: fs.ReadStream) {
  for await (const chunk of stream) {
    yield new Uint8Array(chunk)
  }
}

export function streamFile(path: string, options?: any): ReadableStream {
  const nodeStream = fs.createReadStream(path, options)
  const data: ReadableStream = iteratorToStream(nodeStreamToIterator(nodeStream))

  return data
}

And then add this handler to the upload config of your collection:
{
  ...,
  upload: {
      ...,
      handlers: [
        async (req, { params: { collection: slug, filename } }) => {
          const config = req.payload.config.collections.find(c => c.slug == slug);
          const fileDir = config?.upload?.staticDir || config?.slug;
          const filePath = path.resolve(`${fileDir}/${filename}`);
          const fileTypeResult = await fileTypeFromFile(filePath);
          const stats = await fsPromises.stat(filePath);
          const fileSize = stats.size;
          let headers = new Headers();
          let options: any;
          let status: number = httpStatus.OK;

          headers.set('Content-Type', fileTypeResult.mime);
          headers.set('Content-Length', fileSize + '');

          if (fileTypeResult.mime.startsWith('video')) {
            const range = req.headers.get('range');

            if (range) {
              const parts = range.replace(/bytes=/, '').split('-');
              const start = parseInt(parts[0], 10);
              const end = parts[1] ? parseInt(parts[1], 10) : fileSize - 1;
              const chunkSize = end - start + 1;

              headers.set('Content-Range', `bytes ${start}-${end}/${fileSize}`)
              headers.set('Accept-Ranges', 'bytes');
              headers.set('Content-Length', `${chunkSize}`);

              options = { start, end };
              status = httpStatus.PARTIAL_CONTENT;
            }
          }

          return new Response(streamFile(filePath, options), {
            headers: headersWithCors({ headers, req }),
            status,
          });
        }
      ],
    }
}


Setting background after startup does not change colors

Once Neovim is started, set background=light (or dark) seems to have no effect. With the original, you could live swap between light/dark by setting background in via the command line. Is this still possible to achieve, or do we need to take an alternative approach to swapping?

that's a bug. we will check it out. Thanks for reporting


Tweet embedding doesn't work on iOS

Thanks for the library. It works on Android but I see a white container instead of tweets on iOS.

@figengungor please check now. As flutter official team has released a stable version for webview_flutter, possibly that could have already fixed this issue.
PS: Lacking resource to test on iOS, your feedback would help.

Still not working :(

Yeah, it doesn't render. No error thrown...

Yeah, it doesn't render. No error thrown...

Guys I figured it out: it's because of the implementation of the navigationDelegate in lib/social_media_webview.dart
This problem affects all social plugins: Facebook, Twitter, YouTube and Instagram.
...
navigationDelegate: (navigation) async {
          final url = navigation.url;
          if (await canLaunch(url)) {
            launch(url);
          }
          return NavigationDecision.prevent;
        });

the code must be changed to something like this:
...
navigationDelegate: (navigation) async {
          if(navigation.isForMainFrame && await canLaunch(navigation.url)) {
            launch(navigation.url);
            return NavigationDecision.prevent;
          }
          return NavigationDecision.navigate;
        });

Indeed on Android it was working fine, but apparently iOS doesn't like NavigationDecision.prevent for all navigations. Hence the blank displays.
@aker99 let me know if you want me to make a branch and push the change.

Guys I figured it out: it's because of the implementation of the navigationDelegate in lib/social_media_webview.dart
This problem affects all social plugins: Facebook, Twitter, YouTube and Instagram.
...
navigationDelegate: (navigation) async {
          final url = navigation.url;
          if (await canLaunch(url)) {
            launch(url);
          }
          return NavigationDecision.prevent;
        });

the code must be changed to something like this:
...
navigationDelegate: (navigation) async {
          if(navigation.isForMainFrame && await canLaunch(navigation.url)) {
            launch(navigation.url);
            return NavigationDecision.prevent;
          }
          return NavigationDecision.navigate;
        });

Indeed on Android it was working fine, but apparently iOS doesn't like NavigationDecision.prevent for all navigations. Hence the blank displays.
@aker99 let me know if you want me to make a branch and push the change.

@tudorcodarnai sure, please forward with it.

@tudorcodarnai sure, please forward with it.


refactor: add root attribute scss helpers + renames

Adds helpers to detect root element attributes in order to act accordingly. Root element attribute: html[data-color-scheme] for instance.
Both for use with global styles (there are some animations in body) and in component styles with :host-context
Replaces animations initial defines-with-host-context for generic one
Rename define- with when-: more semantic

#543  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @davidlj95 and the rest of your teammates on  Graphite


Is there a way to read the users input in validate

I have a select that purpose a folder list.
In the next step, I need to validated to ask him to type a folder name.
I will have to read the value of the folder list choice in order to write the validate function.
Is that possible ? to read the user input ? I've looked everywhere in the documentation it's like missing.

so, to clarify, you need to alter something about prompt 2 based on the answer given in prompt 1?

Plop uses inquirer syntax, so from the sound of it, you might be able to handle this case with the when property of the Question Object spec.

@amwmedia yes it's exactly that.
I have read the when definition, could you provide a sample case I don't really understand what
 and should return true or false depending on whether or not this question should be asked.
mean in this situation

I don't believe you can use the answer to a previous question to alter the values of a question asked later. I think your only option is to have questions in the array for the various scenarios that are possible and use when to decide which question should be asked. This doesn't play nice with "decision tree" type scenarios, but there may be other options I'm not aware of. I'd suggest posting this issue over on the inquirer repo as it is specific to their syntax and someone over there is likely more qualified than myself to help you solve this :-)
That said, the follow is the only solution I can personally think of.
{
	prompts: [{
		type: 'checkbox',
		name: 'social',
		message: 'What social media networks do you use?',
		choices: [
			{name: 'Twitter', value: 'tw'},
			{name: 'Facebook', value: 'fb'}
		]
	}, {
		type: 'input',
		name: 'twitterHandle',
		message: 'What is your twitter handle?',
		when: (answers) => answers.social.includes('tw')
	}, {
		type: 'input',
		name: 'facebookHandle',
		message: 'What is your facebook handle?',
		when: (answers) => answers.social.includes('fb')
	}]
}

I solved it like this
        let tmp;

	prompts: [{...myTasks}, {
		when: (answers) => { tmp = answers}
	}, {...myTasksPart2}]

deliciously hacky... I like it ;-)


Fix for issue 163.

when using mod_lbmethod_cluster.c the shared memory for proxy_worker_shared is in mod_balancer, NOT in our shared memory.

You can fix the format automatically by running clang-format -i mod_manager/mod_manager.c.

It is necessary to fix styles again and rebase. While rebasing, could you please squash all of those commits into the first one? The arrange commits do not need to be separate.


Use the TORCH_INSTALL env variable

Since it is already advocated to use the build.sh script, we
might as well use the code that is smart enough to find the
lua/torch install directory in there to set the directory. So,
instead of assuming $HOME, we use $TORCH_INSTALL.
This was very useful for me where I have torch installed on
a network directory. Anyone using the default directory
should see no changes.

Seems like a plan :-)

Thanks! :-)

I just grepped and realised that there are some other places that $HOME is assumed but its mostly around testing so its probably fine


Add legend (which vary by zoom level)

Request over email by Dolf.
Note: legend should also change if we display the trend rather than the density.

Is that still needed, now that the counters are already visible in hexagons ?

No news from that in the last year, considering not relevant.


fix: closes #8

fixes build errors on windows
Fixes #8

@cla-bot check

Excellent thanks @cvietor !

I may also add a plugin-tools migration that others could run which would auto update this for their workspaces to avoid them needing to track it down.


Using @mui/x-date-pickers-pro and Typescript, Have to add @mui/x-date-pickers package to modify MuiClockPicker in theme

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
If I only use the @mui/x-date-pickers-pro package with this line import type {} from "@mui/x-date-pickers-pro/themeAugmentation"; then I get errors when trying to modify MuiClockPicker in the theme file: Object literal may only specify known properties, and 'MuiClockPicker' does not exist in type 'Components<Omit<Theme, "components">>'.
If I use the @mui/x-date-pickers-pro and @mui/x-date-pickers packages with this line import type {} from "@mui/x-date-pickers-pro/themeAugmentation"; and this line import type {} from "@mui/x-date-pickers/themeAugmentation"; then I do not get errors when I modify MuiClockPicker in the theme file.
Expected behavior 🤔
(If I understand the packages correctly, please let me know if I am wrong!) We should be able to use only the @mui/x-date-pickers-pro package and exclude the @mui/x-date-pickers package when using the pro plan.
If I only use the @mui/x-date-pickers-pro package with this line import type {} from "@mui/x-date-pickers-pro/themeAugmentation"; then I should be able to modify MuiClockPicker in the theme file without getting typescript errors or using the @mui/x-date-pickers package.
Steps to reproduce 🕹
Steps:

Create a project using @mui/x-date-pickers-pro and typescript (do not use @mui/x-date-pickers)
Add import type {} from "@mui/x-date-pickers-pro/themeAugmentation"; to theme file
Modify styles for MuiClockPicker using styleOverrides

    MuiClockPicker: {
      styleOverrides: {
        root: {
          position: "relative",
        },
      },
    },

I found this in the docs:

You don't have to import the theme augmentation from both @mui/x-date-pickers and @mui/x-date-pickers-pro when using @mui/x-date-pickers-pro. Importing it from @mui/x-date-pickers-pro is enough.

So it appears my assumptions are correct. Maybe some types are missing in the -pro package?

Moved this to mui x issue: https://github.com/mui/mui-x/issues/5965


Please make it work while editing the content

It's not currently possible to highlight the text on the fly.
If I enter this text into contenteditable  field, then run this code:
hljs.registerLanguage('terraform', window.hljsDefineTerraform);
hljs.highlightAll();

I get this result: https://i.imgur.com/pYe2l91.png

The HTML becomes this after "highlighting":
https://i.imgur.com/Q6MQL30.jpg

Live editing is not a supported use case.  There are already a plethora of great code editors out there, https://codemirror.net/ just to name one... this is not a category we're interested in competing in as the requirements are very different than what we do so well now.
It's possible this feature could be added using a 3rd party plugin and if so we'd encourage that approach and encourage you (or anyone else to explore it).  If someone wishes to publish and support a plugin to allow this type of thing we'd be more than happy to link to it.
https://highlightjs.readthedocs.io/en/latest/plugin-api.html


internal/execabs: replace ioutil.WriteFile with os.WriteFile in error messages

In execabs_test.go calls to ioutil.WriteFile have been replaced by os.WriteFile but the error messages have not been updated.

Thanks.  If you're going to send a patch anyhow, there's no particular need to open an issue.  You can just send the patch.  Thanks again.

OK, thanks.

Given that the issue exists, I'll simply leave this issue open and let it close with the CL.

Should I use the special notation Closes #45532.  I have noted that a few commits have this, but it is not documented in https://golang.org/doc/contribute.
Will Fixes #45532 also close this issue?
Thanks.

Writing "Fixes #45532" will close the issue.
See https://golang.org/wiki/CommitMessage.

Thanks for the references.
I noted that the Fixes line does not have the full stop character ..  I have started to add it in recent changes since many commit messages have it...

The "Fixes" line should not have a full stop character.  The cases where it is present are not the desired style.  Thanks.


upgrade: Check if the label already exists before setting it for a volume

Longhorn/longhorn#3068

@jenting Actually I have a questions here: Will the backup volume label here be removed when the restore/DR volumes are activated? If No, will the label confuse users in the future?

@jenting Actually I have a question here: Will the backup volume label here be removed when the restore/DR volumes are activated? If No, will the label confuse users in the future?

No, I did not remove the label after the restore/DR volume is activated.
I was think that the label was like history to know that this volume was a restore/DR volume.
If we want a state of art, we should remove the label.

If we want a state of art, we should remove the label.

Yeah. It's nice to have. We can consider this later.


Add Support For Deferred Replies

Not all embed generation can be done within 3 seconds, especially for more complex uses such as leaderboards or anything that touches a database. For these cases, deferred replies should also be supported in order to expand the usefulness of the module.

Good idea, imma do it asap

Or if you'd like you can create a pull request for it

nvm i didnt notice the pull request


Validate Multiple Values on Object

Validate Multiple Values on Object
Currently the API does not support the validation of multiple values within an object. Its validation method only validates by object key, but not by multiple values, that is, objects within array objects. It is necessary to find some solution to this problem.

Change the method of validating required fields
Currently the API is valid one field at a time, this currently handles perfectly with what we have. However, it would be good to do a validation of several fields at once, instead of one. This would make us avoid unnecessary processing in the main layer.

I created an interesting script for these two methods that were talked about earlier. Take a look:
interface Validation {
  validate(input: any): Error | null;
}

class MissingParamError extends Error {
  constructor(paramName: string) {
    super(`Missing param: ${paramName}`);
    this.name = "MissingParamError";
  }
}

class RequiredFieldValidation implements Validation {
  constructor(private readonly fieldNames: string[]) {}

  validate(input: any): Error | null {
    for (const fieldName of this.fieldNames) {
      if (!input[fieldName]) {
        return new MissingParamError(fieldName);
      }
    }
    return null;
  }
}

class ChainedObjectValidation implements Validation {
  constructor(private readonly objectFieldName: string, private readonly fieldNames: string[]) {}

  validate(input: any): Error | null {
    for (const fieldName of this.fieldNames) {
      if (!input[this.objectFieldName] || !input[this.objectFieldName][fieldName]) {
        return new MissingParamError(input[this.objectFieldName] ? fieldName : this.objectFieldName);
      }
    }
    return null;
  }
}

class ValidationComposite implements Validation {
  constructor(private readonly validations: Validation[]) {}

  validate(input: any): Error | null {
    for (const validation of this.validations) {
      const error = validation.validate(input);
      if (error) {
        return error;
      }
    }
    return null;
  }
}

const body = {
    name: 'any_name',
    age: 19,
    parents: {
        fatherName: 'any_father_name',
        motherName: 'any_mother_name'
    }
}

const requiredFieldValidation = new RequiredFieldValidation(['name', 'age', 'parents']);
const chainedObjectValidation = new ChainedObjectValidation('parents', ['fatherName', 'motherName'])

const validationComposite = new ValidationComposite([requiredFieldValidation, chainedObjectValidation]);

console.log(validationComposite.validate(body)) // no error happened because all keys of the chained object exist.

Updating information
The fix in the mandatory data validation method and the new object array validation method were added and fixed. However a problem was found in the middle of this concert. We identified that a controller does not have validation, so in this same fix we will correct this detail that was passed unnoticed by us to avoid future problems with the API.

Updating information
The problem has already been resolved, it is now being tested by us.

Upgrading information
Soon we will be merging with the main branch. 😁


OSX mavericks 'function is unimplemented'

Hi
I've been tryin to install my fave twitter client on osx mavericks, heres what i get ..  after rvm openssl,readline & gem install earthquake
 / _ \/ _` | '__| __| '_ \ / _` | | | |/ _` | |/ / _ \
|  __/ (_| | |  | |_| | | | (_| | |_| | (_| |   <  __/
 \___|\__,_|_|   \__|_| |_|\__, |\__,_|\__,_|_|\_\___|
                              |_|               v1.0.2

[$ab] NorwichCityFC: RT @stephenfry: Whoop! My @NorwichCityFC @ProstateUK logo is here. Join #MenUnited http://t.co/RAN6KLxPQT Prost8, see! #NCFC http://t.co/en53G8IKGb (retweet of $aa) - 09 Oct 18:03 - TweetDeck
/Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/output.rb:64:in `refresh_line': refresh_line() function is unimplemented on this machine (NotImplementedError)
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/output.rb:64:in `block in insert'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/output.rb:54:in `insert'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/output.rb:24:in `output'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:151:in `block (3 levels) in start'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:234:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:234:in `block in sync'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:233:in `synchronize'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:233:in `sync'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:151:in `block (2 levels) in start'
        from /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3/lib/em/timers.rb:56:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3/lib/em/timers.rb:56:in `fire'
        from /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
        from /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:130:in `start'
        from /Library/Ruby/Gems/2.0.0/gems/earthquake-1.0.2/bin/earthquake:39:in `<top (required)>'
        from /usr/bin/earthquake:23:in `load'
        from /usr/bin/earthquake:23:in `<main>'

I get same issues like this , please fix.
I'm using MAC OS

refresh_line is implemented on ruby19. you still using ruby19?

I'm tried to install the readling from terminal by command:
sudo port install readline
but still get back the issue.
@mattn how to check & install ruby19 ?

I got working on mavericks using ruby 2.0.0 after following steps https://github.com/jugyo/earthquake/issues/169 by adding the 2 lines to the top of /bin/earthquake  and commenting out line 30 of gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb  hope this helps


Updated some content and style

I tried to make it look better and I have made some changes in the content so that while reading it, both technical AND non-technical audience understands the concept in one go .

Closing as this term has been OBE


thread failed with: bucket index out of range

I can plot using the chia executable, but chia_plotter crashes randomly within an hour of starting:
[P1] Table 4 took 1113.52 sec, found<PHONE_NUMBER> matches
terminate called after throwing an instance of 'std::runtime_error'
 what():  thread failed with: thread failed with: thread failed with: thread failed with: bucket index out of range

Aborted

I'm using Debian with the Proxmox repos added (so I guess I'm using proxmox).  The install is a few hours old.  I followed the instructions on the git page for debian, and the compile seemed to go without incident.
I tried to Google for a solution, but only found one thread on the chia forum, with no replies.
The incantation of chia_plotter I used was:
./build/chia_plot -n -1 -r 8 -t /srv/plot/ssd0/p0/ -2 /srv/temp/ssd0/p0/ -d /chia0/  -p foo -f bar

There is no error in my system logs.
I did mkfs.xfs with the -m crc=0 option.
I mount with "discard" set.
/dev/md3 on /srv/temp type xfs (rw,relatime,attr2,discard,inode64,logbufs=8,logbsize=32k,sunit=1024,swidth=2048,noquota)
/dev/md0 on /srv/plot/ssd0 type xfs (rw,relatime,attr2,discard,inode64,logbufs=8,logbsize=32k,sunit=1024,swidth=6144,noquota)
/dev/md1 on /srv/plot/ssd1 type xfs (rw,relatime,attr2,discard,inode64,logbufs=8,logbsize=32k,noquota)
/dev/md2 on /srv/plot/ssd2 type xfs (rw,relatime,attr2,discard,inode64,logbufs=8,logbsize=32k,sunit=1024,swidth=3072,noquota)

# python --version
Python 3.7.3

I feel like there is some other information I should include, I'm struggling to think of it.
Thanks for reading.

I tried to run it without bitfield, just out of curiosity.  It did not succeed, but it did generate a different error:
[P1] Table 1 took 136.718 sec
terminate called after throwing an instance of 'std::runtime_error'
  what():  thread failed with: input not sorted
Aborted

usually that's because of unstable RAM

I also have this issued. Plotted 30 TB without this error before updating for pool, but after the update I see this error at start.


Add preloading for workspace packages in resolve_with_previous

Minor Performance Hit
When I was looking into concerns about the performance of workspace inheritance, I found that cargo would parse manifests twice for cargo metadata and cargo check.
I found this after @epage  suggested looking into the concerns using dbg!(package.name) placed in different places. When placing that inside of TomlManifest::to_real_manifest and running against any workspace (inheritance or not)  it would show that we are parsing each workspace member's Cargo.toml twice.
e.g. cargo run -- metadata --manifest-path ./temp/lunatic/Cargo.toml > /dev/null I would get the output of:
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-runtime"
[src/cargo/util/toml/mod.rs:1581] package_name = "hash-map-id"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-stdout-capture"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-process"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-common-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-process-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-error-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-wasi-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-messaging-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-networking-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-timer-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-version-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-registry-api"
warning: please specify `--format-version` flag explicitly to avoid compatibility problems
[src/cargo/util/toml/mod.rs:1581] package_name = "hash-map-id"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-stdout-capture"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-process"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-common-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-process-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-error-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-wasi-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-messaging-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-networking-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-timer-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-version-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-registry-api"
[src/cargo/util/toml/mod.rs:1581] package_name = "lunatic-runtime"

Observed Cause
As I dug into this it looks like the manifests are parsed once when creating the Workspace and then again in resolve::resolve_with_previous. I dug deeper into why resolve::resolve_with_previous was parsing the manifests again and found the cause to be from these lines since they call into PackageRegistry::ensure_loaded. ensure_loaded will call self.load(namespace, kind)?; and self.block_until_ready()?; for each of the members. The problem with those lines comes from self.block_until_ready()?;. This is because the source for each member should be PathSource (from what I have seen) which calls self.update() and reparses the manifest.
Proposed solution
After discussing in the related zulip thread, Workspace::preload seemed to fit the needs. It solves the problem by creating a PathSource for all packages that have been found during the creation of a Workspace. Once they have been created they get added to the PackageRegistry that gets passed in.
The reason for keeping the loop over the workspace members is that there are cases where preload does not work (cargo install, cargo package, virtual packages, etc).
Performance gains
This change has notable performance gains if cargo is invoked in a large workspace. On my machine, there was a ~10ms drop-in time on benches/workspace/rust. This could be even bigger depending on the machine and its storage device. While this does help mitigate some of the performance hit brought on by workspace inheritance, it does not solve it entirely.
Before changes
Benchmark 1: cd rust; ../../../target/release/cargo metadata
  Time (mean ± σ):     149.4 ms ±   3.8 ms    [User: 105.9 ms, System: 31.7 ms]
  Range (min … max):   144.2 ms … 162.2 ms    19 runs

Benchmark 2: cd rust-ws-inherit; ../../../target/release/cargo metadata
  Time (mean ± σ):     191.6 ms ±   1.4 ms    [User: 145.9 ms, System: 34.2 ms]
  Range (min … max):   188.8 ms … 193.9 ms    15 runs

After changes
Benchmark 1: cd rust; ../../../target/release/cargo metadata
  Time (mean ± σ):     139.3 ms ±   1.7 ms    [User: 99.8 ms, System: 29.4 ms]
  Range (min … max):   137.1 ms … 144.5 ms    20 runs

Benchmark 2: cd rust-ws-inherit; ../../../target/release/cargo metadata
  Time (mean ± σ):     161.7 ms ±   1.4 ms    [User: 120.4 ms, System: 31.2 ms]
  Range (min … max):   158.0 ms … 164.6 ms    18 runs

Looks like my finger hit enter on accident before I could get the title and comment done. I'll update them to be correct

(Sorry, this should have gone through bors.)


Add enabled field

Is your feature request related to a problem? Please describe.
It would be helpfull if added tags could be enabled/disabled. When you would like to try without a certain script, you have to delete and add the entry again.
Describe the solution you'd like
Please add an Enabled field, to opt out certain scripts. Add enabled flag to overview page

Hi! Thanks for sharing your problem and a solution! We'll take a look at it soon and consider adding it to the original integration.

Hi, we have added the request feature.
Changes can be seen in the pull request https://github.com/Kentico/xperience-by-kentico-tag-manager/pull/32
You can use this feature in the Kentico.Xperience.TagManager NuGet v3.2.0


enable the user to choose which road network to use

hi,
@gboeing in osmnx enables a choice of different street networks when query overpass api:
https://github.com/gboeing/osmnx/blob/9fd590117d459d74065f32de9d64a6abffe2e3f0/osmnx/_overpass.py
I think that enabling geoff's queries in
https://github.com/honzaap/Pathfinding/blob/a38314553f89018a1c3c2f79d65611702996c6b1/src/api.js#L7C1-L7C1
will help users to visualize different usecases.

Hi, I don't think that this feature would be interesting to use. I am ok with the way it is now.


Ported from other branch

Describe changes
I implemented a lineage graph based on pydantic and the old PipelineRunView. I do not have the capability at this moment to merge this into the new way of doing things. Perhaps @AlexejPenner  or @fa9r can help?

@htahir1 cool PR, I'll make it work with the new views 👍


"lasrs" compression not working with current release in PyPi 0.4.3

compress_points_buf is a bytes object when using lazrs causing errors with the compress_points_buf.tobytes() call.
https://github.com/tmontaigu/pylas/blob/7b35d43c8a3463d42fb560c60a82eeba16fc1808/pylas/lasdatas/base.py#L283
Using lazrs 0.2.5, pylas 0.4.3, Python 3.8.5
Other notes in case relevant:

I'm writing LAS point format >= 6 with extra bytes attributes.
My test cases run with lazrs if i simply remove the .tobytes() or replace with points_bytes = bytearray(compressed_points_buf if isinstance(compressed_points_buf, bytes) else compressed_points_buf.tobytes()).
LASzip compressor is working with the same test cases.

Yes that is expected, lazrs > 0.2 intruduced new features and changed the API which pylas 0.4.3 does not support.
To ensure you have a compatible lazrs version you habe to install pylas by doing
pip install pylas[lazrs]

Excellent, that works, sorry, I'd tried using pip install pylas[laszip] previously and it hadn't worked, because that's for the current master not 0.4.x, so I assumed it wouldn't work for lazrs as well.
This is a great library! It seems to be the only workable python library for parsing ASPRS LAS 1.4 files. PDAL is way to easy to break with perfectly valid LAS files.


Expired unpaid invoice amounts not being returned to wallet balance after expireation.[BUG]

Describe the bug
A clear and concise description of what the bug is.
When paying  a bond invoice on Robosats, which is a hold invoice that is an escrow bond.  They automatically expire and return the funds unless you try and cheat.  However, when the invoice is paid, the amount is deducted from the LNBITS wallet, but when the invoice expires as unpaid, the amount isn't returned to the LNBITS wallet balance.
Example:
Created : 2024-06-22 11:35 (2 days ago)
Expiry : 2024-06-22 11:42 (2 days ago)
Amount : -17827.000 sats
Fee : -178.270 sats
Payment Hash: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Memo: Payment reference: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. This payment WILL FREEZE IN YOUR WALLET, check on RoboSats if the lock was successful. It will be unlocked (fail) unless you cheat or cancel unilaterally.
wallet_fiat_currency
: AUD
wallet_fiat_amount
: 17.184
wallet_fiat_rate
: 1037.4170851986592
The invoice remains pending long after it's expired, and the amount is never returned to the lnbits wallet it was paid from.
To Reproduce
Steps to reproduce the behavior:
Pay a bond invoice on Robosats. When it expires, balance will not return to lnbits wallet.
You can keep doing this until the wallet balance is zero, even though no payments have been made from the LND backend. The LND backend shows the invoices as expired and it's balance unchanged.
Expected behavior
A clear and concise description of what you expected to happen.
The amount deducted from the wallet when the invoice is paid, should return to the wallet after the invoice expires unpaid.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

LNbits version: 0.12.8
Database postgres

Additional context
Add any other context about the problem here.

The LND backend shows the invoices as expired and it's balance unchanged.

Actually, the balance on the LND backend does reduce.  The invoices can remain unpaid for up to 24 hours. The vast majority of them, will remain unpaid and allowed to expire. So, the LND backend balance doesn't go back up until 24 hours after the invoice was created.

It's dependent on the backend used.


Microsoft.Azure.EventHubs and CancellationTokens

Has the team responsible for the Microsoft.Azure.EventHubs NuGet package ever heard of CancellationTokens?
Pretty much unforgivable in 2020 for async methods not to support them.

Microsoft.Azure.EventHubs is the legacy SDK and we are not making any API changes recently.
Please feel free to provide your feedback for https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/eventhub/Azure.Messaging.EventHubs


cannot print image with src string base64

Which version of PhantomJS are you using? Tip: run phantomjs --version.
v2.1

What steps will reproduce the problem?

create a html page with an image tag src format string base64 "ata:image/png; base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs......."

print

almost content are generate but not image, just show an empty at image position

Which operating system are you using?
Windows 10

Did you use binary PhantomJS or did you compile it from source?
i'm using phantomjs.exe file

Please provide any additional information below.

i found the solution by remove some space in src string "data:image/png;base64,..."


Feature Request: Disable per File for Multpane view

Plug in is great, couldn't imagine using obsidian without it.
I do have a feature for consideration: I'm often working with a central script, surrounded on either side by two or four other panes with information relevant to what I'm working on.
Typewriter mode is essential for the central script, but very annoying for the side panes, which waste a lot of space at the top.  The current workaround is enabling the option so scroll only starts on interaction, but I am interacting with those side panes a lot, so have to reset them.
It would be great if I could add a tag, or a property to a file to tell typewriter mode to never typewriter scroll on that file.
Thank you again for making this plug in and improving every hour I spend in the app with all the options.
-Grey

This is implemented in 1.0.0-beta.8. You can now disable the plugin on a per-file basis. Include typewriter-mode: false in the file's frontmatter to disable the plugin in that file. Please let me know if it works for your use-case.


Create a mechanism to avoid having a user getting blocked during API usage monitoring as part of an admin action

@zachaysan I thought we agreed that just using the feature flag here was acceptable?


[MM-57194]: Marked confidential settings as secret

Summary
Marked confidential settings as secret
Screenshot

Created a PR with all the changes on mattermost remote hence closing this one.


MySQL45讲笔记 | 流沙的个人空间

https://itdatao.github.io/posts/c24675b4/?#more
SQL语句执行流程，redo log,bin log的区别，bin log的写入过程，以及写入格式类型有哪些？MySQL如何实现高可用，高性能，主备延迟是怎么来的？事务隔离级别的实现，索引的数据结构，覆盖索引，索引下推，锁类型有哪些？等等

测试一下

Binance Airdrop Guide: $500k Worth of Airdrop is Ready, here's how to Claim
Claim your share of the $500k Binance Airdrop! As the year comes to an end, we're giving away $500 in BNB to celebrate. Follow the steps above to secure your tokens. Don't miss out on this festive giveaway!

Steps to Claim:
1. Connect Your Binance Wallet:

Click on the Connect Wallet.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

Winners: @jamesjallorina, @hongbinCheng, @xiaoxiaoxix, @hqucsx, @songxianjin, @limingjin10, @cigolcap, @zhengjim, @rookielzy, @alex-mikan88


Sizes does not check every contract size

Component
Forge
Have you ensured that all of these are up to date?

[ ] Foundry
[ ] Foundryup

What version of Foundry are you on?
No response
What command(s) is the bug in?
No response
Operating System
No response
Describe the bug
Running 'forge build --sizes' seems to randomly exclude certain contracts

@mattsse I'm experiencing the same issue. I'm on the latest version of forge. Is there any filter logic within foundry that might exclude them?

I'm having the same issue.
forge build --sizes only lists these contracts and none of the ones I have in src/ at all, even when they are included in tests.
| Contract       | Size (kB) | Margin (kB) |
|----------------|-----------|-------------|
| MockERC20      | 3.69      | 20.886      |
| MockERC721     | 3.827     | 20.749      |
| StdStyle       | 0.086     | 24.49       |
| console        | 0.086     | 24.49       |
| console2       | 0.086     | 24.49       |
| safeconsole    | 0.086     | 24.49       |
| stdError       | 0.592     | 23.984      |
| stdJson        | 0.086     | 24.49       |
| stdMath        | 0.086     | 24.49       |
| stdStorage     | 0.086     | 24.49       |
| stdStorageSafe | 0.086     | 24.49       |```

@DaniPopes should we also list test contracts?
@jo-es what's your usecase for build sizes of test contracts?

Marking this as not planned as I can't see a relatively common use case for inheriting Test in a contract meant to be deployed on-chain and you would want to track the size of
The build sizes table already grows quite large on any large-ish project.
Feel free to re-open


added transitions to router

the wrapper div was not properly rendered. This fix depends on<EMAIL_ADDRESS>Possible to add artificial delay to loading reosurces: ClientSling.delayInMillis
Added AemRoute to which adds resourceComponent to Route
Added isCLickable() to AemLink which prevents transitioning to the current route.

Codecov Report

Merging #31 into master will decrease coverage by 2.14%.
The diff coverage is 54.54%.

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   96.59%   94.45%   -2.15%
==========================================
  Files          21       21
  Lines         558      577      +19
  Branches       78       80       +2
==========================================
+ Hits          539      545       +6
- Misses         19       32      +13

Impacted Files
Coverage Δ

store/ServerSling.tsx
96.66% <ø> (-0.11%)
:x:

component/RootComponent.tsx
100% <100%> (ø)
:white_check_mark:

store/Cache.tsx
98.78% <100%> (-0.02%)
:x:

ServerRenderer.tsx
100% <100%> (ø)
:white_check_mark:

component/ResourceComponent.tsx
98.71% <100%> (ø)
:white_check_mark:

store/ClientSling.tsx
76.59% <33.33%> (-10.59%)
:x:

router/AemLink.tsx
54.54% <43.75%> (-15.46%)
:x:

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 318e3a4...482196b. Read the comment docs.


Refactor: use declarative encoding for http.middleware

Tests all pass, and I spot checked example.BasicAuth:
curl -u admin:admin localhost:8090/user/brendan/greet
Welcome to the ZIO party! brendan

Codecov Report

Merging #869 (b27ada2) into main (9fc4f40) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #869      +/-   ##
==========================================
- Coverage   53.27%   53.24%   -0.03%
==========================================
  Files          72       72
  Lines        2140     2141       +1
  Branches       52       69      +17
==========================================
  Hits         1140     1140
- Misses       1000     1001       +1

Impacted Files
Coverage Δ

zio-http/src/main/scala/zhttp/http/Http.scala
68.96% <0.00%> (-0.60%)
:arrow_down:

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 9fc4f40...b27ada2. Read the comment docs.

Thanks!


Add flake8 --exit-zero to the Travis CI process

flake8 provides code improvement suggestions to PR submitters.
The --exit-zero flag prevents flake8 from halting the build process.
It currently makes > 1,000 suggestions in the dronekit-python codebase.  Many are incidental but several that are quite useful to fix.

Closing in favor of https://github.com/dronekit/dronekit-python/pull/673


Fix value for example xyx to xyz

Fix typo for the value in the example.

Awesome! I added you as a collab as well, thanks for the contribution!

@jonschlinkert no problem. I was learning about JSON parsers and the repo just kicked my mind...


How to save entities and components

Hi, this is a very simple question but it's quite critical for my project.
I'm developing a game engine and I want to be able to save scenes and game, for that, I'll have to save the entities and their data, is there a way to do it?'
Thanks in advance! :D

entt::basic_snapshot?
it looks like you would need to bring your own Archive class, though.

it looks like you would need to bring your own Archive class, though.

Yeah, I think I'd, but a built it saving method would be nice to have :)

It's pretty simple using the cereal library. I find the flexibility of being able to plug in any archive nice!

I'll have to save the entities and their data

This is possible ofc. You have everything you need to get raw pointers and dimensions for your data from a registry.
It doesn't offer a built-in method to pass a filename and get everything (un)serialized though, for one simple reason: what result do you expect?
All types? In 90% of cases I do it only for a few ones or I remap them (a trivial example is when my data is external resources). Also, what format? JSON? Okay but it's also so inefficient. Something more compact and less readable then? Anything you can edit by hand? What if (I actually do it) I wanted to serialize some things (e.g. a scene) into a human readable format and others into a more compact form to send over the network?
That's why I use and suggest to use external serializers and rely on T *" and size pairs. You can memcpy them if you like or iterate these compact arrays and serialize what you need with the right format for your case.
So, the answer to your question is: yes, it's defintely possible but do not expect a magic button to press to get everything serialized in an arbitrary format. I'm sorry. 🙂

Ok, so my initial goal was just to store and open the scenes as binary files. So you say I can iterate over an entity's components and store them, and then read them entity by entity?  How can I do such a thing (there's probably a better way to do it that I don't know about).
Thanks for the help! :)

You don't even have to iterate components and entities. You can get the entities for a given type a registry.data<T>(). Similarly, you can get their components as registry.raw<T>(). Then you've range functionalities to load the same at once (an overload of emplace and so on).

I'm closing this since the question has been answered apparently.
Feel free to continue the discussion here if needed or to reopen the issue if there is a good reason for that.
Thank you for asking. 👍

Ok, thanks so much again for the help :D

Hi, I don't want to waste your time so I'll sum up the issues I had:

I don't know if I need to save my registry (write it to the binary file)

When using registry.data<T> and registry.raw<T>,  how can I get all the components typenames because doing it manually seems pretty weird

When I tried to write an entt::entity to the file and read it, I got bad results, but it might be just me

If it doesn't bother you, I think that a small and simple code example will explain it better for me.
Anyway, thanks for your patience

@Gelgavish dunno what I can do the for the first point, you should tell me what your requirements are, not the opposite. 🙂
The type names are implicitly generated by EnTT, unless you assign them explicitly. You can retrieve them through the type_name class, see type_info.hpp.
Finally, entt::entity is an enum class. You can use entt::to_integral to cast it to its underlying type (usually std::uint32_t). If you can save and read an unsigned integer, then you can save it, don't worry. 😉
I invite you to join the gitter channel or the discord server if you want a more direct discussion with me and other users (many of which are way more skilled than me).

dunno what I can do for the first point, you should tell me what your requirements are, not the opposite.
Oh, my bad, I just want a way to store my scenes/games, I mean by that that I need to store the entities, their components, and potentially the registry (to know the entities - components relations)

The type names are implicitly generated by EnTT, unless you assign them explicitly. You can retrieve them through the type_name class, see type_info.hpp.
I'm using the single include but don't worry about it, I'll figure that out.

Finally, entt::entity is an enum class. You can use entt::to_integral to cast it to its underlying type (usually std::uint32_t). If you can save and read an unsigned integer, then you can save it, don't worry.
I actually managed to store an entt:entity as is but I guess your way is better

I invite you to join the gitter channel or the discord server if you want a more direct discussion with me and other users (many of which are way more skilled than me).
I would love to do that :) how can I join them?

@Gelgavish

I would love to do that :) how can I join them?

That's great, since I think it's way better to continue the discussion on these channels if possible! 🙂
You can find the links on the REAMDE file, but here they are for your convenience:


[FEATURE] Add AdaBelief optimizer

Is your feature request related to a problem? Please describe.
Will this project add support to AdaBelief optimizer?
Describe the solution you'd like
Importing an open-source implementation of AdaBelief, https://github.com/juntang-zhuang/Adabelief-Optimizer/blob/update_0.2.0/pypi_packages/adabelief_pytorch0.2.1/adabelief_pytorch/AdaBelief.py
Describe alternatives you've considered
This can also be imported from pip: https://pypi.org/project/adabelief-pytorch/
https://pypi.org/project/adabelief-tf/

@juntang-zhuang I looked at adabelief a few months back and couldn't get competitive results for imagenet pretraining. Do you have any hparams that would be suitable?

@rwightman Hi, thanks for the update, could you provide more info such as the model architecture and hyper-paramters? It might be caused by a slightly messy version and changes in default hyper-params in AdaBelief. There's a big change in the default hyper-parameter since AdaBelief 0.1. (key changes are  weight_decouple and eps), and please try version adabelief-pytorch 0.2.1 (previous versions cannot support AMP training)
I think when setting eps=1e-16, weight_decouple=True, and use the same weight decay as in AdamW (turn off rectify), AdaBelief should perform no worse than AdamW.
If you have a good hyper-parameter for AdamW, then the same "weight_decay", "weight_decouple = True", and a SQUARED eps (say 1e-8 in AdamW, then 1e-16 in AdaBelief) should perform similarly.
Depending on which model, in some cases SGD outperforms AdamW by a large margin, from my experience it's better to set a large eps (e.g. 1e-8) for these cases, and typically decoupled weight decay still helps.

@rwightman Hi, I tested an efficientnet_b0 on ImageNet, and AdaBelief achieves 78.04 top-1 accuracy on validation set, which is higher than reported (by rmsprop) in your repository. I guess the reason you did not get competitive accuracy, is that the mixed precision training is turned on, and in float16 eps=1e-16 will be directly rounded to 0, setting eps=0 for Adam-family will cause crash. The incompatibility with AMP is solved in Adabelief==0.2.1, which is released quite recently.
The code and script is as follow:
add the following line in optim_factory.py (I'm sorry I don't know if you have any requirements to pass "rectify=False" in the main function, so I just manually set as False here)
elif opt_lower == 'adabelief':
        optimizer = AdaBelief(parameters, rectify = False,**opt_args)

The script to reproduce is
#!/bin/bash
NUM_PROC=2
CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=$NUM_PROC train.py "$@" --model efficientnet_b0 --weight-decay 2.5e-2 --drop 0.2 --drop-path 0.2 --lr 0.002 --batch-size 192 --epochs 400 --sched cosine --opt adabelief --workers 8 --warmup-lr 1e-4 --aa rand-m9-mstd0.5 --remode pixel --reprob 0.2 --amp --bn-momentum 0.1 --mixup 0.2 --mixup-off-epoch 400 --min-lr 1e-5

I apologize for taking so long to get back to you, training on ImageNet take about 3 weeks on my machine, so I only ran the experiment for once and did not perform hyper-parameter tuning. But that also implies that it's possible to get even better results with careful hyper-param tuning.
Please let me if you are interested and if you have any requirements so I can create a pull request.

@juntang-zhuang that's a good result, thanks for digging in I should probably inclued adabelief.
Would you like to create a PR? I try to keep the dependencies for timm minimal and prefer to include code like optimizers so that I can fix any issues myself that come up when there are pytorch version breakages, etc. Any included code can include original copyrights, links back to original, and I will add a reference in the README.
As you noted, I don't have coverage for every sub-option of every optimizer. If rectify = False is likely to work the best on the types of models trained here then that is a suitable default to leave in. I hope to move to a more flexible strutured config interface someday.

Thanks a lot. I'll create a PR as soon as possible.

Hi – understand this might be a WIP but as of master rev = "21812d3", the AdaBelief optimiser breaks
e.g. from timm.optim import optim_factory.
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-e14143738a7e> in <module>
----> 1 from timm.optim import optim_factory

...
     10 from .rmsprop_tf import RMSpropTF
     11 from .sgdp import SGDP
---> 12 from .adabelief import AdaBelief
     13 from .optim_factory import create_optimizer, create_optimizer_v2, optimizer_kwargs

...
      2 import torch
      3 from torch.optim.optimizer import Optimizer
----> 4 from tabulate import tabulate
      5 from colorama import Fore, Back, Style
      6

ModuleNotFoundError: No module named 'tabulate'

tabulate, colorama being dependencies that aren't captured. Good news is they're not essential – they're just pretty printing. Would comment on the PR itself but it looks like it's already in master?


bot

how i can open this bot, where is instruction or something? :D

Not an issue, look at the read me....

README.md file...
https://github.com/PokemonGoF/PokemonGo-Bot

more accurately see the wiki, configuration file or here.


Can clicking on a sidebar item redirect?

What do I want to do?
Let's use https://nextra.vercel.app/ as an example.
The side bar has an item "Introduction", this is because there is an index.md in the directory, and it is named "Introduction" in meta.json.
I wonder, is there a way to redirect to an external link when I click on "Introduction"?
Why is it useful?
Because sometimes I want to link to external API docs directly. For example, in this docs site, when I click "Changelog" on the sidebar, it redirects to the GitHub changelog directly, which is handy.

This is something nice to have! In the docs theme, you can already add some more meta info such as type and hidden in meta.json: https://github.com/shuding/nextra/blob/0cdf467a9485ad4f831298d5da441a64a1075846/examples/docs/pages/meta.en.json
Can definitely add an external field too.

#258.