Module not found: Can't resolve './Constants' in 'D:\desktop\ant_design_pro\onefox\src\components\Drag'

Describe the bug
A clear and concise description of what the bug is.
Module not found: Can't resolve './Constants' in 'D:\desktop\ant_design_pro\onefox\src\components\Drag'
To Reproduce
Steps to reproduce the behavior:
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { DragSource } from 'react-dnd';
import { ItemTypes } from './Constants';
Where is the Constants? How  can I import the ItemTypes ?
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Browser   chrome
Additional context
Add any other context about the problem here.

@yaoyuande seems like this issue is not related to react-dnd.

In react-dnd, every drag source has a type.  These are things you define in your program.  So in my app I have types "task" and "project", but you might have "contact" and "organization".  If you don't want to type out these strings all the time (since you might misspell theme), you can store them all in a file:
// Constants.js
export default {
  CONTACT: "contact",
  ORGANIZATION: "organization",
}

then in your e.g. Drag/Contact.js you would use:
import ItemTypes from "./Constants";

class Contact extends Component {
  ...
}

Contact = DragSource(ItemTypes.CONTACT, ...)(Contact)
export { Contact };

It looks like your problem is that you didn't define a Constants.js file or it isn't in the Drag directory on your PC!

@amazingmarvin Thank you very much!


[gamepad-controls] Support rotation with secondary WebXR controller

I'm using oculus quest and basically everything is working fine, but usually movement controls allow rotation not only with head movement but also with joystick. For seated situation it's not so pleasant to rotate the head, especially not for movement in space. While the right controller is responsible for the movement, it would be nice to have the left controller to have a rotation function. As far as I can tell it's shouldn't be a too complex of addition - I wanted to add it myself, but I'm not sure from where do I get the second joystick input (the rotation quaternion I can take from head rotation part).

Can you share how your controls are set up, and ideally a demo? Are you doing something like one of these examples? https://github.com/donmccurdy/aframe-extras/tree/master/src/controls#usage
In theory this is already supported, although it's more designed for the gamepad to be a fallback when head movement isn't available, rather than using both at the same time, and I don't 100% know if that will work. See https://github.com/donmccurdy/aframe-extras/blob/master/src/controls/gamepad-controls.js#L122-L165.
It's also possible that the underlying VR controller API has changed since I wrote this, or that the Quest controller is set up differently than other gamepads I've tested.

Not sure if this addresses the topic, but this might be of interest anyhow.
I took the code for the Quest mainly from this example which implements the controls in a straight forward manner:
https://github.com/TakashiYoshinaga/Oculus-Quest-Interaction-Sample

@donmccurdy Oculus Touch controls show up as two separate gamepads when in VR, and there does not appear any consistency as to which is listed first in the gamepads array. Your movement controls as currently written only support one controller at a time, so one hand is always inoperative.

@donmccurdy  Most Oculus titles are set up to use the left stick as forward/backward and strafe, the right stick as rotate, a bit like 1st person gamepad controls albeit with head direction / rotation factored in as you already have.
I wrote some very simple code to grab the left or right stick, not sure if this helps any, but would be great to use aframe-extras to do Oculus Touch movement.
This code doesn't factor in any head rotation, it's just to show left / right stick clarification:
AFRAME.registerComponent('controls',  { 	init: function ()  	{ 		var el = this.el; 		var rig = document.querySelector('#rig'); 		var cam = document.querySelector('#camera'); 		var movementSpeed = 0.015; 		var rotationSpeed = 0.01; 		el.addEventListener('axismove', function (evt) 		{ 			if(el.getAttribute('oculus-touch-controls').hand == 'right') 			{ 				rig.object3D.rotation.y -= (event.detail.axis[2] * rotationSpeed); 			} 			if(el.getAttribute('oculus-touch-controls').hand == 'left') 			{ 				rig.object3D.position.z += (event.detail.axis[3] * movementSpeed); 				rig.object3D.position.x += (event.detail.axis[2] * movementSpeed); 			} 		}); 	}) });

I am not sure how relevant this is, but something that comes to mind... When using this library with a basic 0dof (playstation/xbox-like) gamepad in cardboard, I have noticed that my 'fly' direction is correctly controlled relative to my cardboard's rotation input, but my rotation seems to be interpreted, added, and then immediately overridden almost completely. Sometimes the overriding isn't perfect and I get a slight change.
On the other hand, when using such a gamepad in desktop mode, the rotation input is correctly taken from the second joystick.
Allowing joystick rotation in VR is a pretty common feature for advanced users these days. In Echo Arena, for example, tapping that joystick allows quick changes in direction. I think in action-oriented VR titles (FPS, etc.), it's basicaly standard.
The library should probably be updated to allow this at a basic level in a way it seems designed explicitly not to currently.
With my site as-is, btw, the motion-controls cause my main 'fly' movement to not be relative to my head rotation, but instead to seem 'fixed' (forward on joystick is always the same direction within the virtual space, instead of being forward relative to wherever I am looking, as it should be and as it is on desktop or in cardboard with a 0dof gamepad). I've opened an issue discussing that. I was hoping the demo mentioned above by @dirkk0 was going to address this, as I have yet to see a 'smooth locomotion' example (preferably a minimalist PoC demo) for quest 2, but his only claims to illustrate teleporting.

I am not sure how relevant this is, but something that comes to mind... When using this library with a basic 0dof (playstation/xbox-like) gamepad in cardboard, I have noticed that my 'fly' direction is correctly controlled relative to my cardboard's rotation input, but my rotation seems to be interpreted, added, and then immediately overridden almost completely. Sometimes the overriding isn't perfect and I get a slight change.
On the other hand, when using such a gamepad in desktop mode, the rotation input is correctly taken from the second joystick.
Allowing joystick rotation in VR is a pretty common feature for advanced users these days. In Echo Arena, for example, tapping that joystick allows quick changes in direction. I think in action-oriented VR titles (FPS, etc.), it's basicaly standard.
The library should probably be updated to allow this at a basic level in a way it seems designed explicitly not to currently.
With my site as-is, btw, the motion-controls cause my main 'fly' movement to not be relative to my head rotation, but instead to seem 'fixed' (forward on joystick is always the same direction within the virtual space, instead of being forward relative to wherever I am looking, as it should be and as it is on desktop or in cardboard with a 0dof gamepad). I've opened an issue discussing that. I was hoping the demo mentioned above by @dirkk0 was going to address this, as I have yet to see a 'smooth locomotion' example (preferably a minimalist PoC demo) for quest 2, but his only claims to illustrate teleporting.


Empty record is not being generated from proto

Description:
Consider the following sample.
message Empty {}

This does not get converted to ballerina record with the grpc tool.
I think this is needed as its being used in few scenarios.
https://github.com/GoogleCloudPlatform/microservices-demo
https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto
https://stackoverflow.com/questions/31768665/can-i-define-a-grpc-call-with-a-null-request-or-response
Affected Versions:
SL GA
OS, DB, other environment details and versions:

@xlight05 can you explain the steps you follow. Normally this proto file is a dependent proto for another service proto file, as this contains only message definition. Can you try generating the source code for the service proto file which contains the Empty message?

FYI, we have written a couple of services in the Online Boutique in Ballerina [1].  Please check it out

https://github.com/ballerina-platform/module-ballerina-grpc/tree/master/examples/online-boutique-microservice

@daneshk  I've simply downloaded this proto files and generated ballerina services required, using,
bal grpc --mode service --input demo.proto --output demo_service/

@xlight05, I tried your sample and I encountered the same issue. We'll look into that.

Creating the following record in the stub (i.e., *_pb.bal) file would be the workaround to fix this issue.
public type Empty record {|
|};

Sample to reproduce the issue,
syntax = "proto3";

import "google/protobuf/wrappers.proto";

service ServiceWithEmpty {
    rpc UnaryCall(google.protobuf.StringValue) returns (Empty) {}
}

message Empty {}


Allow Browser Width and Height instead of WindowSize Enum

Convenient though an enum is, it is not suitable for situations like this where customisation may be preferred.
The primary windows size configuration should be (int width = 1366, int height = 768)
add this option to IWebDriverFactory interface and all implementations.
Implement the WindowSize versions as overloads instead.

Checked in to Master


Allow user to add options to when creating application

This issue is big, but I will break down:
In this stage: I need an algorithm/solution to allow users to add different parts/dependencies, e.g
kemboijs-cli myapp fram=express db=postgres, sequelize test=mocha, chai, chai-http

Or
kemboijs-cli myapp fram=express db=mongo,mongoose --no-tests

In the first example, I expect that the framework is set as express, then db to be postgres with help of sequelize ORM. Also, it will set tests based on the tools available.
In the second example, it will not set any tests.
When a user needs coverage reporting, then, he will have to define.
kemboijs-cli myapp fram=express db=mongo,mongoose test=mocha,chai --coverage

Or, nyc/any test runner coverage availability in test argv will show directly that coverage is required.

Great work @ezrqnkemboi however I think that for handling the initialization of an app using a generator that follows predefined steps such as the yarn init script would be better for this as it would avoid many of the edge cases that might arise from the above-said approach.

That is great feedback and will take consideration of that.

@ronaldndirangu I might develop the first instance using the first method, I had proposed.
This is not to say the idea, will not be implemented, but I will leave the issue open until it is resolved.
I will create just a replica of this issue and work on it.
I am working on version 2, which will cover this issue and others that have arisen during the development process.

@ronaldndirangu, can you have some time to check on pull request #40


Tabular View: Keep Indicator and trendline fix whilst allowing the user to scroll through the values

I tried to get something like this working yesterday, but it's tricky. I can separate the left and right sides which makes the scrolling easy, but it makes the drag re-ordering hard. Getting some cells to scroll as a set independently of others (frozen columns) is not something that html tables or css are good at, so it's probably going to require some interesting javascript.


[backport] Update style check tools to the versions compatible with pycodestyle 2.4

Backport of #5643

[automatic post] Jenkins, test this please.

Jenkins CI test (for commit 83459572e69ac893d1f4c953cb1f0b509eb9bc1f, target branch v5) succeeded!


Template.events integration

It would be awesome if this would work seamlessly with Template events. That way they can automatically unsubscribe and it gives a very unified feel to the Template code...

You can easily use the jQuery trigger event for this feature - I use jQ for this.

ok.


Do not incllude 'is is' / 'it is a' prefixes in the final string

The prefix does not really add any information.

I've been using this small modification since forever, and I will keep using it on my local branch for myself, but maybe it's something you might want to consider, in which case here it is the PR. Otherwise feel free to ignore.


Rename all imports to refer to npwg

The project was migrated from kubevirt GitHub org under
k8snetworkplumbingwg, hence renaming all import references. Follow-up
patches should address resource naming and image registry.
Fixes #155

/retest

/retest

/approve cancel

/test dco

/lgtm
(not sure if i can approve though :))

The code change looks good to me.
The description points to a PR 155, while I think want to point to this issue https://github.com/k8snetworkplumbingwg/ovs-cni/issues/152
/lgtm

Thanks all, fixed the description.
/approve

/hold cancel
/release-note-none


Possible faster version of chunk_on

Test to see if this version of chunk_on has mo powah than the previous version using deques.
# -*- coding: utf-8 -*-
# @Author: Cody Kochmann
# @Date:   2018-01-24 11:52:06
# @Last Modified 2018-01-24
# @Last Modified time: 2018-01-24 11:57:27

from itertools import groupby, chain

def chunk_on(pipeline, new_chunk_signal, output_type=tuple):
    ''' split the stream into seperate chunks based on a new chunk signal '''
    assert callable(new_chunk_signal), 'chunks needs new_chunk_signal to be callable'
    assert callable(output_type), 'chunks needs output_type to be callable'

    holder = None
    for signal, group in groupby(pipeline, new_chunk_signal):
        if signal:
            for i in group:
                holder = [i]
                break
            for i in group:
                yield output_type(holder)
                holder = [i]
        else:
            if holder is None:
                yield output_type(group)
            else:
                yield output_type(chain(holder, group))
                holder = None
    if holder:
        yield output_type(holder)

This one might be faster as well...
# -*- coding: utf-8 -*-
# @Author: Cody Kochmann

from itertools import groupby, chain

def chunk_on(pipeline, new_chunk_signal, output_type=tuple):
    ''' split the stream into seperate chunks based on a new chunk signal '''
    assert callable(new_chunk_signal), 'chunks needs new_chunk_signal to be callable'
    assert callable(output_type), 'chunks needs output_type to be callable'

    holder = []

    for signal, group in groupby(pipeline, new_chunk_signal):
        if signal:
            for i in group:
                holder = [i]
                break
            for i in group:
                yield output_type(holder)
                holder = [i]
        else:
            yield output_type(
                chain(
                    holder,
                    group
                )
            )
            holder = []
    if holder:
        yield output_type(holder)


folder or file delete freezes vscode

VSCode Version:  1.33.1
OS Version:  Ubuntu 19.04   Linux x64 <IP_ADDRESS>-generic-snap
using KDE as window environmen

Steps to Reproduce:

Delete a file or a  folder by right clicking in file explorer

Does this issue occur when all extensions are disabled?: Yes
Output of:
code --verbose

...
[21920:0501/131550.722871:INFO:CONSOLE(1408)] "%cTRACE", source: file:///snap/code/6/usr/share/code/resources/app/out/vs/workbench/workbench.main.js (1408)
[21920:0501/131603.038366:INFO:CONSOLE(1408)] "%cTRACE", source: file:///snap/code/6/usr/share/code/resources/app/out/vs/workbench/workbench.main.js (1408)
[21920:0501/131603.039781:INFO:CONSOLE(1408)] "%cTRACE", source: file:///snap/code/6/usr/share/code/resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-01T11:16:04.551Z] update#checkForUpdates, state =  idle
[main 2019-05-01T11:16:04.552Z] update#setState checking for updates
[main 2019-05-01T11:16:04.555Z] update#setState idle
[main 2019-05-01T11:16:04.555Z] telemetry/update:notAvailable { explicit: false }
[main 2019-05-01T11:16:33.096Z] [VS Code]: detected unresponsive
Gtk-Message: 13:16:33.130: GtkDialog mapped without a transient parent. This is discouraged.
[main 2019-05-01T11:16:33.130Z] telemetry/windowerror { type: 1 }
...

This looks like a duplicate of https://github.com/Microsoft/vscode/issues/54493


actions: Add high-level device emulation action

Adds two high-level actions, EmulateViewport and ResetViewport that wrap
the Emulation.setDeviceMetricsOverride and Emulation.setTouchEmulationEnabled
commands. Additionally, modifies the two locations where the device
viewport was being changed modified in the unit tests.

Made the suggested changes.


Add test:DenseMatrix.rand with no rng

What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)
How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
Add test:DenseMatrix.rand with no rng

Can one of the admins verify this patch?

It add for https://github.com/apache/spark/pull/14422

@xubo245 let's back up, and close this PR. This isn't how we go about proposing and making changes in general, and it needlessly forks a discussion from your other PR


WIP: MAISTRA-2309 create CRD for FederationStatus

Please provide a description for what this PR is for.
And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
Please check any characteristics that apply to this pull request.
[ ] Does not have any changes that may affect Istio users.

Hi @rcernich I'm interested with mesh federation feature, will it be available in maistra 2.1? What's the corresponding openshift version we can get this feature?

@jwendell, @dgn, this just needs a couple of reviews and it can be merged.

@dgn, @jwendell, could you please review this?

/test unit


merge from arlac77/template-arlac77-github,arlac77/template-esm-only,arlac77/template-node-app,arlac77/template-vscode

package.json

chore(deps): add ^17.2.3 remove ^17.2.2 (devDependencies.semantic-release)

:tada: This PR is included in version 10.0.51 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Docs for bosh-env describe apply-changes instead

Hi, all. The documentation for the bosh-env sub-command appears to be a stale batch of copypasta from the apply-changes sub-command. Happy to issue a PR if I get around to it before y’all, just wanted to get an issue open so I don’t forget.
Thank you!

Hi! Thanks for opening an issue and apologies for the delay. What changes are you talking about/would want to make in regards to the sub-command?

could you give a little more info about what documentation is lacking? (where) if it's a quick fix, we could edit it, but if you feel comfortable, please submit a PR @clhynfield

@clhynfield could you elaborate a little more on which documentation is fishy?

Just submitted #339, which hopefully does one better than elaborating!

closing this issue due to the merged PR. Thanks!


Added biorxiv embeddings and global analysis

This PR contains TSNE and UMAP embeddings of BioRxiv. The document embeddings are generated via an average of all word vectors within a document. Interestingly enough Word2Vec is able to identify documents that have arguably questionable labels (discussed in biorxiv_visualize_embeddings.ipynb). When viewing the embedding visualization notebook try and see if github can load the document. If not I'll save the annotated figures as separate files to aid review.

Added PCA plots. Seems that there are overlaps between the categories as I'd expect. Good to confirm that the number of dimensions doesn't matter.


Create jenkinsfile

@mikey-1996 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.


[Docs] Updated cookbook for 1.12 and etc.

Related Issues

[Docs] Updated cookbook for 1.12 and etc.
closes #
Short Description and Why It's Useful

Screenshots of Visual Changes before/after (if There Are Any)

Which Environment This Relates To
Check your case. In case of any doubts please read about Release Cycle

[ ] Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
[ ] RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
[ ] Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

[x] No upgrade steps required (100% backward compatibility and no breaking changes)
[ ] I've updated the Upgrade notes and Changelog on how to port existing Vue Storefront sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change
Contribution and Currently Important Rules Acceptance

[ ] I read and followed contribution rules

Please give me a stand-by queue when merge approval since deploy might spit errors from diff2html

Seems like OK judging by vercel preview though..

Hi @pkarw, please review this and merge them if it's OK. Thanks.

 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.0 out of 3 committers have signed the CLA.:x: pkarw:x: gibkigonzo:x: kkdgYou have signed the CLA already but the status is still pending? Let us recheck it.


signalr.js connected callback called multiple times

Monitoring my SignalR js client I often get multiple connected callbacks  (of start()) without the disconnected callback being called before them or at all.
This seems to me to be buggy behavior as my code does various cinits in the connected callback that only make sense if the connection was not connected before.
Any help with this ?

Are you using ASP.NET Core SignalR or ASP.NET SignalR?

.NET core latest preview

Could you share your code?
I don't understand what you mean by multiple connected callbacks as the only "callback" for start is the start promise returning.

yeah sure, my code looks like this:
connection
        .start().then(
            () => fconnected()
            , err => {
                fdisconnected(err);
                setTimeout(connectToHub(fconnected, fdisconnected), 100);
            });

What I get is multiple calls to fconnected (once every few minutes) without a single call to fdisconnected

I may be confused about this, closing this now.


Change variable declaration to const from var and let

It's better to use const for scoping and avoiding unexpected re-assignment.

Sure, let's do that:)

close again:)


Receive request

Hi @lishu, Why nothing request receiving from server?
Client:
Client.OnReceiveRequest<string, string>("ID", (request, c) => Guid.NewGuid().ToString());

Server:
private static void Server_Connected(object sender, ConnectedEventArgs e)
{
     Console.WriteLine("New Client Connected");
     var ID = e.ServerClient.SendRequest("ID", string.Empty, 10000); //10 seconds for localhost? :D
     Console.WriteLine("Client ID: {0}", ID);
}

Exception thrown: System.TimeoutException: 'Response is Timeout!'

I don't know what the problem ...

If only see your pasted code, just about right.
Request & Response has sample code in Test Project use #region New ... in Release 1.0.1 block it, and you can see it work.
Just Make sure your Client call the Start method to run.
Timeout for the complete request and response process.

No, I realized the problem today
Conversely, SendRequest only works in the client and the server can OnReceiveRequest
It would be nice if library was not like HTTP :unamused:
I can't decide about library but SendRequest more used than SendCommand (work in server) :(

In Connected event handler invoke SendRequest will not working because the ServerClient core thread start after this event. This means that network packet processing does not have a chance to occur.
I has changed core thread start before this event, just wait upload.

Thanks @lishu ! Problem solved.


JOSS Review: Point Source Docs + Expand on limitations

It would be good if the following page had a bit more information on how the lens equation is inverted:
https://caustics.readthedocs.io/en/latest/tutorials/InvertLensEquation.html
Methodology:
I had to go to the source code to learn it is done by throwing down points in the image-plane, and then running an optimizer (correct me if I'm wrong).
This is quite different to how many lensing codes work, which instead iteratively ray trace triangles to the image plane and keep those triangles which contain the source centre. I suspect many users from a lensing background would expect this to be the default option.
A visualization showing the process would help a lot (e.g. an image with the initial points, then an image with the final points).
Limitations
All lens equation solvers have limitations, and documenting these clearly is important to ensuring users do not misuse them for science.
For example, in the example above, the central fifth image of the SIE mass profile is not located nor is it mentioned. Whilst it is heavily demagnified (and therefore any emission from an extended source would likely not be observed), the image does still technically exist and I would expect the default behavior to be that the lens equation solver finds it (or has the user provide an input which explicitly removes it).
I think it would be good to add a few of the more extreme cases of lensing which typically break lens inverters, so that a user can understand where the code might infer an incorrect solution. For example, when the source is on the edge of a caustic that two of two multiple images in the image-plane are very close to one another, and thus the solver has to successfully "split" them at sub-pixel resolution. I am guessing whether your solver does this or not successfully depends on the random draw of the image-plane coordinates? Or is something more clever going on?

@Jammy2211 Thanks for catching this! We are going to look into the forward raytracing, make sure it catches all the images, and expand on the documentation. I'll comment here when its ready!

Thanks again for spotting this, it was fun to code up! We have updated the forward_raytrace function to use the triangle method you mentioned, with a root finder to finalize the position. Please see the updated docs on inverting the lens equation and let me know if there is anything else you think we should add!
https://caustics.readthedocs.io/en/latest/tutorials/InvertLensEquation.html


Update k8s/service.yaml

Update service.yaml port to 9999 as laid out on page 62

Thanks for the PR @randoljt! This 9999 VS 8888 port difference was corrected in recent changes to the book, so depending on which version you have it may say 9999 or 8888. The latest version uses 8888 so all new copies going forward will use that. The original idea was to point out that the forwarded port and service port can be different from the pod port, but I think a copy/paste mistake got made somewhere in the editing so sorry that it wasn't caught and cleared up.
Sorry for the confusion and I'll add a note to the Known Issues section of the README and leave a comment in the code here to clarify.
Let us know if you have any questions or other issues with any of the other examples.


Remove keep_env from the test framework

Closes #4592

LGTM, thanks :)

I'm surprised at how much just worked with keep_env removed :) Thanks @miles170!


Package 2016.3

[ ] Redhat 7
[ ] Redhat 6
[ ] Redhat 5
[ ] Debian 8
[ ] Debian 7
[ ] Ubuntu 16.04
[ ] Ubuntu 14.04
[ ] Ubuntu 12.04

upped estimate due to retagging

Changed title, removed RC3 since tag is now available

All rebuilt for new retagged 2016.3.0


Introduce "strict equality" mode for assertEquals() and friends.

Previously, MUnit had a subtyping constraint on assertEquals(a, b) so
that it would fail to compile if a was not a subtype of b. This was
a suboptimal solution because the compile error messages could become
cryptic in some cases. Additionally, this API didn't integrate with
other libaries like Cats that has its own cats.Eq[A,B] type-class.
Now, MUnit uses a new munit.Compare[A,B] type-class for comparing
values of different types. By default, MUnit provides a "universal"
instance that permits comparison between all types and uses the built-in
== method. Users can optionally enable "strict equality" by adding the
compiler option "-Xmacro-settings.munit.strictEquality" in Scala 2.
In Scala 3, we use the Eql[A, B] type-classes instead to determine
type equality (per http://dotty.epfl.ch/docs/reference/contextual/multiversal-equality.html)
Note: the first few commits are unrelated to this feature, I cleaned up
a few small quirks I noticed while working on this feature.
Fixes #189

Big thanks to @gabro who helped a lot with getting this PR into shape 🙏

Copy-pasting the last commit message explaining the latest approach, which I think comes out quite nicely. Kudos to @gabro for spotting this approach was possible!

Drop strict equality, allow comparison between supertypes/subtypes
This is a fourth attempt at improving strict equality in MUnit
assertEquals() assertions.

First attempt (current release version): require second argument to be
a supertype of the first argument. This has the flaw that the compile
error message is cryptic and that the ordering of the arguments affects
compilation.
Second attempt: use Eql[A, B] in Scala 3 and allow comparing any
types in Scala 2. This has the flaw that it's a regression in some
cases for Scala 2 users and that Eql[A, B] is not really usable
in its current form, see related discussion
https://contributors.scala-lang.org/t/should-multiversal-equality-provide-default-eql-instances/4574
Third attempt: implement "strict equality" for Scala 2 with a macro
and Eql[T, T] in Scala. This improves the situation for Scala 2,
but would mean relying on a feature that we can't easily port to Scala 3.
Fourth attempt (this commit): improve the first attempt (current
release) by allowing Compare[A, B] as long
as A <:< B OR B <:< A. This is possible thanks to an observation
by Gabriele Petronella that it's possible to layer the implicits to
avoid diverging implicit search.

The benefit of the fourth approach is that it works the same way for
Scala 3 and Scala 3. It's very nice that we can avoid macros as well.

Summarizing the contributors thread in https://contributors.scala-lang.org/t/should-multiversal-equality-provide-default-eql-instances/4574/26?u=olafurpg
The Compare[A, B] type-class that's introduced in this PR does not satisfy compile-time transitivity. For example
class A
B extends A
C extends A

B == A // OK
A == C // OK
B == C // Error

While I agree it's necessary to have transitivity for runtime equality, I am not convinced it's necessary for compile-time equality. The worst-case scenario is that users get a compile-error and need to upcast one of the arguments into the LUB. This is only necessary for classes with custom override def equals() semantics, because it's otherwise always an application bug when you compare two sibling subtypes.

Closing this as it was revived and merged in https://github.com/scalameta/munit/pull/521


Document how to override views of anything in the backend (widgets, controllers, etc)

In Winter it's very easy to override specific view files for anything that uses the ViewMaker trait.
\Backend\Widgets\Filter::extend(function ($widget) {
     $widget->addViewPath(__DIR__ . '../widgets/filter/partials');
});

now you can override any existing partial or even provide a new partials for that widget. You can also get fancier by controlling when exactly you call addViewPath() and on which specific instances of whichever class you're trying to override. The above example was placed in a controller's constructor in order to only extend the filter widget for that specific controller, but it could have easily been placed in the index() method to further limit, or various events could have been listened to in order to further limit the overriding of the partials.
^
TODO: Document that in an easy to find and easy to read way. @damsfx @WebVPF any suggestions?

@LukeTowers There is a proposal to merge the develop branch into 1.2 and update documentation on the site
https://github.com/wintercms/docs/compare/1.2...develop

@LukeTowers Not really!
Maybe in the "Backend (Admin) > Views & Partials" section or in the "Plugins" section under a new heading "Extending Backend".
¯\(ツ)/¯


Fix some grammar and typos in documentation

@BruceForstall,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Tagging @vancem for final acceptance.

LGTM


Regression: build-dependencies and dependencies should not have features unified

Problem
It appears that cargo regressed on https://github.com/rust-lang/cargo/issues/4866 -- when a dependency exists as both a build-dependency and normal dependency, but they use different features, the features are unified. The documentation around features explicitly states otherwise:

The version "2" resolver avoids unifying features in a few situations where that unification can be unwanted. The exact situations are described in the resolver chapter, but in short, it avoids unifying in these situations:

Features enabled on platform-specific dependencies for targets not currently being built are ignored.
Build-dependencies and proc-macros do not share features with normal dependencies.
Dev-dependencies do not activate features unless building a target that needs them (like tests or examples).

Avoiding the unification is necessary for some situations. For example, if a build-dependency enables a std feature, and the same dependency is used as a normal dependency for a no_std environment, enabling std would break the build.

Steps
Reproducer 1

Setup the following workspace:

<directory layout>
crates/
- foo/
  - src/
    - main.rs
  - Cargo.toml
- bar/
  - src/
    - lib.rs
  - Cargo.toml
Cargo.toml

crates/foo/src/main.rs
fn main() {
    println!("Hello from foo");
    bar::lib();
}

crates/foo/Cargo.toml
[package]
name = "foo"
version = "0.1.0"

[dependencies]
bar.path = "../bar"

[build-dependencies]
bar = { path = "../bar", features = ["build_feature"] }

crates/bar/src/lib.rs
pub fn lib() {
    println!("Hello from bar");
    #[cfg(feature = "build_feature")]
    println!("  bar build_feature on!");
}

crates/bar/Cargo.toml
[package]
name = "bar"
version = "0.1.0"

[features]
build_feature = []

Cargo.toml
[workspace]
members = ["crates/*"]

Build the workspace: cargo build
Run the foo binary: ./target/debug/foo

Expected Result:
Hello from foo
Hello from bar

Actual Result:
Hello from foo
Hello from bar
  bar build_feature on!

Reproducer 2
The above is a simplified version of what I found was happening in our code base. Just in case there's a difference I'm not aware of, the specific issue I noticed in our code base was structured as follows:

foo has a featured called "build_feature".
foo has a dev-dependency of bar.path = "../bar"
bar has a build-dependency of foo = { path = "../foo", features["build_feature"] }
Running cargo test -p foo builds foo's tests with "build_feature" enabled.

crates/foo/src/lib.rs
pub fn lib() {
    println!("Hello from foo");
    #[cfg(feature = "build_feature")]
    panic!("foo build_feature on!");
}

#[cfg(test)]
mod test {
    #[test]
    fn basic() {
        bar::lib();
        super::lib();
    }
}

crates/foo/Cargo.toml
[package]
name = "foo"
version = "0.1.0"

[features]
build_feature = []

[dev-dependencies]
bar.path = "../bar"

crates/bar/src/lib.rs
pub fn lib() {
    println!("Hello from bar");
}

crates/bar/Cargo.toml
[package]
name = "bar"
version = "0.1.0"

[build-dependencies]
foo = { path = "../foo", features = ["build_feature"] }

Cargo.toml
[workspace]
members = ["crates/*"]

Expected Result:
<test succeeds>

Actual Result:
---- test::basic stdout ----
Hello from bar
Hello from foo
thread 'test::basic' panicked at 'foo build_feature on!', crates/foo/src/lib.rs:4:5

Possible Solution(s)
No response
Notes
No response
Version
$ cargo version --verbose
cargo 1.71.1 (7f1d04c00 2023-07-29)
release: 1.71.1
commit-hash: 7f1d04c0053083b98fa50b69b6f56e339b0556a8
commit-date: 2023-07-29
host: aarch64-apple-darwin
libgit2: 1.6.4 (sys:0.17.1 vendored)
libcurl: 7.88.1 (sys:0.4.61+curl-8.0.1 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1t  7 Feb 2023
os: Mac OS 13.4.1 [64-bit]

So I haven't had the chance to run this to verify but don't you need workspace.resolver = "2"?

So I haven't had the chance to run this to verify but don't you need workspace.resolver = "2"?

I think this solves the issue. Is this something specific to virtual workspaces? Just confirming before closing the issue.
I had reduced the example too much. The original code-base has edition = "2021" in each of the member crate's Cargo.toml files. But I guess this has no effect in virtual workspaces?

I guess this has no effect in virtual workspaces?

Yes, and sorry for the inconvenience. We had some efforts around this, e.g. #10910 and #12388. Please read the doc here and here for more.

The resolver is a global option that affects the entire workspace. The resolver version in dependencies is ignored, only the value in the top-level package will be used. If using a virtual workspace, the version should be specified in the [workspace] table, for example:

I see. Thanks for the assistance! Using workspace.resolver = "2" in the root Cargo.toml solved my issue.


Policy Update Check

Just wanted to check on this policy:
ADMX_PowerShellExecutionPolicy/EnableScripts
It states "Available in the latest Windows 10 Insider Preview Build" and this document was last updated on 10/26/2020.
Wanted to check that this is up to date, and still not included in the current release of Windows 10 21H1?

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

ID: 462317b9-37a4-cb4d-e2bb-1fbe4deda4a4
Version Independent ID: 9866e3c5-1d9e-e40f-8f3a-beffb77087d6
Content: Policy CSP - ADMX_PowerShellExecutionPolicy - Windows Client Management
Content Source: windows/client-management/mdm/policy-csp-admx-powershellexecutionpolicy.md
Product: w10
Technology: windows
GitHub Login: @ManikaDhiman
Microsoft Alias: dansimp

Hello @ivassallo19 ,
these policies are still only in preview.
Thank you


cmake: Support SDK versions more broadly

The SDK version is of the form X.Y.Z.  Change the cmake scripts to be
based on X.Y of the version.  This allows us to easily support newer
toolchains without having to explicitly add cmake files for the version
as well as removes duplication between those files.
Signed-off-by: Kumar Gala<EMAIL_ADDRESS>

@galak can you rebase please?

@galak I rebased it myself to save time. Merging.


only id supported?

Looks great!
From the readme, am I to understand that the search_submissions method only supports the ids parameter?

Hi @gobbedy , currently only the ids parameter is supported for search_submissions.
v0.1.0 is being released this week which will include the full functionality for this method

@mattpodolak that's awesome! then i may be your first user for v0.1.0

Hi @gobbedy, I'm closing this ticket as v0.1.0 was released today which includes non-id based search for comments and submissions. Please open another ticket if you have any issues or feature requests.


estimate_next_risk and residuals

StatsModelLinearRiskFactorModel includes functions for estimating next risks. These next risks do not include the residual distributions.
Other classes that also include next risks estimations (linear probability, rounded linear risk factor model) do utilize the residual normal distribution.
Classes that utilize next risk estimations of StatsModelLinearRiskFactorModel include ASCVDOutcomeModel, cvOutcomeDetermination (stroke partition model), cohortRiskModelRepository (which includes bmi, trig, totChol, waste etc).
The stroke partition model and ascvd outcome model have residual standard error equal to 0, but the cohort risk models include nonzero residual standard errors. So, including a residual draw in estimate next risk of StatsModelLinearRiskFactorModel will, I think, affect several distributions.
I checked past commits of this class and did not see any point in time where next risks included a residual draw.
For now, in the NIHSS model, I am drawing a residual after the estimate next risk calculation and adding it to it.

Included the residuals on the StatsModelLinearRiskFactorModel class by using a flag that defaults to False, so that it does not affect the calls that we do not want to affect.


Release a new version

I'm enjoying this library, but would like to use the New constructor that accepts an interface.
I'd rather not pin an exact commit version in my go.mod.
https://github.com/thejerf/slogassert/commit/0ef72e755de72a047ef352a5d9ef82d521e696c5#diff-e84855bd78a66ae45838facb13ab7a2e1be7154973e74dea23824ce5604d0040
Cheers!
Edit:
Actually... maybe this won't help me. I'm trying to use a *rapid.T, but testing.TB has a private method.
https://pkg.go.dev/pgregory.net/rapid
Could this library use an interface that explicitly only requires the things that it needs?

A fresh new v0.3.4 just for you. The testing interface is now just Helper(), which can be a no-op if your test system doesn't care about that, and Fatalf, which shouldn't be hard to shim around even if your system doesn't have that.


(urql-graphcache) - default to empty object just like urql itself does

Description
This brings the types up to speed, urql defaults variables to an empty object.
Type of change

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Test Environment:

OS:  Windows 10
@graphql-codegen/...: urql-graphcache
NodeJS: 14.15.0

Checklist:

[x] I have followed the CONTRIBUTING doc and the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Thank @JoviDeCroock ! This looks great. Can you please take a look at the CI? I think some checks are failing.

Available in<EMAIL_ADDRESS>


Additional Marker Types

Summary
Need a way to distinguish various marker meta types
Problem Definition
In the former version of PB the MarkerTypes enum of MarkerAccounts used to be a broader list:
ACCOUNT,
POOL,
FUND,
SECURITIZATION,
COIN,
PARTICIPATION,
SYNDICATION,
STOCK,
OPTION,
WAREHOUSE <-- New

Looking at the new definition of MarkerType it appears that has been repurposed.
Proposal/Question
Is there an alternative property where these meta types can be set? If not, is this something markers are imagined to support or has that concept been phased out?

For Admin Use

[ ] Not duplicate issue
[ ] Appropriate labels applied
[ ] Appropriate contributors tagged
[ ] Contributor assigned/self-assigned

The marker type field was not ever intended for unrestricted use... the type indicates what specific behaviors and logic the marker module should enforce on chain... sounds like you might want to use an attribute or perhaps we need to further explore if there are additional behaviors the module would need to handle which would mean we need to add another type beyond coin/restricted–coin

Ah. Yes, I think attributes will work well. Thanks for pointing me in that direction


what I am doing wrong here

I am trying click (Command line interface package for Python), while running the following code I get error Error: No such command "abcd"
@click.group()
@click.option('--source', required=True)
@click.pass_context
def cli(ctx, source):
    ctx.obj = "pass it"

@cli.command()
@click.argument('abcd')
@click.pass_context
def hello(ctx, abcd):
    click.echo("Hello, World")

if __name__ == '__main__':
    cli()

I am running it as follows
python playclick.py --source this abcd

Please ask questions on StackOverflow.


Tracking tutorial video clicks

Please always provide the JIRA issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):
No JIRA issue provided.
Test URLs:

Before: https://main--express-website--adobe.hlx.page/express/
After: https://tutorial-analytics--express-website--webistry-development.hlx.page/express/learn/express-your-brand

When clicking on video tutorials, we should be able to track click events related to the video.

@rofe and @williambsm , I have reviewed this and it looks good to me.  No problem with merging it.


Migration from Trust Wallet to other Ton wallets

Hi thereI had set up Trust Wallet and I have its 12-words seed phrase. I know that for other chains (ethereum for example) I can use this phrase to get access from another wallet (metamask).I see that when I want to receive Ton coin, Trust shows address in Ton network, not erc-20. But if I want to get access from another Ton wallet, I need to provide 24-words seed phrase, while Trust gives me only 12-word seed phrase.The question is: how I can get access to my Ton wallet if I have tokens on trust wallet? I know I can transfer tokens, but I want to have a way to get an access to my wallet from another dapp.
 Kindly Talk to Support on the Live support page so that your issue can be looked into. CLICK HERE

Hi thereI had set up Trust Wallet and I have its 12-words seed phrase. I know that for other chains (ethereum for example) I can use this phrase to get access from another wallet (metamask).I see that when I want to receive Ton coin, Trust shows address in Ton network, not erc-20. But if I want to get access from another Ton wallet, I need to provide 24-words seed phrase, while Trust gives me only 12-word seed phrase.The question is: how I can get access to my Ton wallet if I have tokens on trust wallet? I know I can transfer tokens, but I want to have a way to get an access to my wallet from another dapp.

Thank you for reaching out! hi, it seems your address was blacklisted: kindly refresh your wallet, if the issue persists,then your query would be best dealt with by the support team.

I’ll have to refer you to the official support Team with the ticket ID TON7463

Please see the link below to our dedicated support line:

Ton Network Dapps Support Ticket Requests

Note; Click on the live chat icon at the bottom corner of the page to initiate chat with a live support agent for immediate assistance.

Hi @akegaviar,
It looks like you're encountering a transcript error. For assistance with this issue, I'll need to refer you to our support team. Please use the ticket ID TUT07638 when contacting them.
You can reach our dedicated support line through this link: Trust wallet Support Requests. Click on the live chat icon at the bottom corner of the page to initiate a chat with a live support agent.


add deployment slot guidance in README

Codecov Report

Merging #248 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #248   +/-   ##
========================================
  Coverage    56.16%   56.16%
========================================
  Files           53       53
  Lines         1663     1663
  Branches       188      188
========================================
  Hits           934      934
  Misses         666      666
  Partials        63       63

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 19a8597...3b7337b. Read the comment docs.


Windows command interop in WSL does not work, reports not found for all commands

Environment
Windows build number: Microsoft Windows [Version 10.0.18363.1198]
Your Distribution version: [On Debian or Ubuntu run `lsb_release -r` in WSL]
Whether the issue is on WSL 2 and/or WSL 1: Linux version 4.19.128-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Tue Jun 23 12:58:10 UTC 2020

Steps to reproduce
Installed Docker Desktop and the patch to update WSL to 2 by following these instructions WSL Install Instructions but then installing Docker Desktop instead of a standalone distro.
Then:
    C:\Users\User>wsl -l -v
      NAME                   STATE           VERSION
    * docker-desktop         Running         2
      docker-desktop-data    Running         2

Note I have no additional distribs installed other than what Docker installs itself.
Run wsl to start the default distrib which wsl -l -v indicated was docker-desktop. Then from inside that distrib execute a simple Windows command using interop as described in the documentation Run Windows Tools From Linux
C:\Users\User>wsl
DESKTOP-SDE0C3N:/tmp/docker-desktop-root/mnt/host/c/Users/Martin# cmd.exe /C dir
-sh: cmd.exe: not found

<--
Collect WSL logs by following these instructions: https://github.com/Microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs
-->
That's a 15 minute process! Don't you have a half reasonable method of getting some logs?
Expected behavior
I'm expecting cmd.exe to run.
Actual behavior
It fails with Not Found.

You will need to install an actual distribution like Ubuntu or Debian. The docker distributions are intended to support the docker product and are not for general-purpose use.

Fair enough. But in that case surely either wsl -l shouldn't list the Docker distros as distros at all, or the WSL interop documentation should be clear that the features it describes applies to some distros and not others, and WSL should ideally provide some means of identifying "real" distros from ones in which key features will not work as described.

There is open #6024 which is nearly sufficient as an open landing zone for all things "docker is my default", but this submission could be coerced into a standalone feature-request "do not list docker distros in wsl -l -v" or somesuch.

Not sure if this is the same issue, but WSL interop doesn't appear to work when running in a root shell, like in the example you gave above. I am running Ubuntu-20.04 distro with WSL2. For example, if I am in a root shell and run notepad.exe I get notepad.exe: command not found. So then I run /mnt/c/windows/system32/notepad.exe and I get no output, and nothing happens. I originally tried it with quser and I got the same results. When I am not in a root shell, and just in a regular user shell, the WSL interop stuff works fine.


Check if multicodec table is in sync with the multiaddr table

Summary

Adds a simple check to make sure codecs defined in the multiaddr table are in sync with the multicodec table. See the github workflow run for this PR as an example.
Before Merge

[ ] Allow at least 24 hours for community input

https://github.com/multiformats/multicodec/pull/294 should fix the failing workflow.

This test seems useful. I’m a bit hesitant since I’m not familiar with Clojure, and this code could become hard to maintain.

Would you prefer bash instead ;) ?
Joking aside, I considered doing this in many other languages, but found the Clojure version more concise and simpler (and more fun!). The code is 60 lines, and there's no esoteric features here. However, if you want to write the Go version, feel free!

Would you prefer bash instead ;) ?

This could be a sharness test! 🤪

CI now passes after https://github.com/multiformats/multicodec/pull/294 was merged

This test seems useful. I’m a bit hesitant since I’m not familiar with Clojure, and this code could become hard to maintain.

I think this is an important point.  I'm worried about us introducing new languages without it being deliberate.  JS or Python seem more likely for new folks to understand than Clojure.

Thanks for sharing @MarcoPolo - the reasoning makes sense.
Completely agreed about not using Bash.
I'm less-worried about this specific instance given this is not an area where we're we expect to be adding a lot more scripting.
My biggest worry is about the precedent as I want to make sure that introducing new languages and technologies is very deliberate and thought through from a long-term view.
I don't think we need to discuss more now, as long as we have the takeaway for an upfront conversation for the next time, especially if it is in an area we expect to build on or expand.
Thanks.


Searching array fields doesn't work

The IndexDB search logic used right now assumes all fields being searched are scalar (maybe even strings).   The location field is stored in IndexDB as an array, and the search code doesn't handle this currently.

Switched to smoothness weblib in v4.6.0 so this issue is now obsolete.


Migrate to nox

Tox is a bit aged and quite slow. Nox offers a more modern alternative.

We did this already. Can be closed.


Name pcd is not defined.

The (docstring) examples for cp.orth_svd, cp.orth_pcd, and cp.orth_hybrid don't work for me.
In [1]: import chaospy as cp
In [2]: Z = cp.Normal()
In [3]: print cp.orth_pcd(2, Z)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-078656d1e4da> in <module>()
----> 1 print cp.orth_pcd(2, Z)
/usr/local/lib/python2.7/dist-packages/chaospy/orthogonal.pyc in orth_pcd(order, dist, eps, normed,     **kws)
    343     N = len(basis)
    344
--> 345     L, P = pcd(C, approx=1, pivot=1, tol=eps)
    346     Li = np.dot(P, np.linalg.inv(L.T))
    347
NameError: global name 'pcd' is not defined

Are these deprecated? From what package did that pcd use to come?
Additionally, the example for orth_hybrid refers to orth_chol instead.

Yes, those three are all deprecated. I've updated the three methods to give deprecation warnings.
The PCD method is taken from a open source project called pymmf written by Michael Forbes. I specifically use the method based on the paper:
``What to do When Your Hessian is Not Invertable: Alternatives to
Model Respecification in Nonlinear Estimation,''
J. Gill and G. King
Socialogical Methods and Research, Vol. 32, No. 1 (2004):54--87
As for use of PCD in polynomial chaos expansions, it isn't yet. We are currently working through a second revision of a paper that uses the method to solve a specific task. Hopefully it will be published during the spring.


MINOR: KAFKA-5742 follow-up, fix incorrect method name

@ewencp @ijuma, also needs backport to 0.11.0

Merged to trunk and 0.11.0.


Percy usage notification for Orange

We received the following notification:

Percy notification for Orange
You have used all the snapshots included in your free plan
You can review existing builds, but no new snapshots wil be processed until your next billing cycle starts.
To continue using Percy this month, upgrade your account.

Study if we should:

Upgrade our account / Pay
Limit the type of actions that triggers Percy
Make the trigger manual

Our current plan includes 5000 screenshots/month

I added a skip:ci label intended to prevent some actions to run for every PR, but it requires to add the said label when opening PR.
Can probably be improved 😉

I added a skip:ci label intended to prevent some actions to run for every PR, but it requires to add the said label when opening PR.
Can probably be improved 😉

You even created a skip:percy. Don't know if it is possible, but maybe it could be set by default for each PR.

Tried a different approach with https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/pull/1004. If considered sufficient, close this PR.


[BUG] Danalock V3 disconnection

Describe the bug
As noted in these two threads:
https://community.home-assistant.io/t/integration-for-danalock-v3-zigbee/179574/85
https://forum.phoscon.de/t/danalock-v3-new-fw-0-20-0-losing-connection/1838/43
And in this PR:
https://github.com/dresden-elektronik/deconz-rest-plugin/pull/6057
The Danalock V3 remains connected to the Zigbee network for 12-36hrs and then disconnects, the batteries must then be removed to reboot the device.
As noted in the PR linked above: after some time, the lock seemingly prefers to connect directly to the coordinator. When the lock changes its parent from a router to the coordinator, the zigbee connection then drops.
Could a similar change as described in the linked PR "adding DDF" be applied to ZHA to help with the Danalock V3 connection issues?
There is also a separate issue that the Phoscon/Deconz devs are attempting to resolve with Danalock (and will require Danalock to issue a firmware update), as noted in the linked PR: "The lock detects than a parent is not reachable (aka powered off) and correctly rejoins via another parent. But it doesn't detect if the parent router plays nice, when commands are send to the gateway via a router the lock doesn't rejoin the network if it doesn't receive APS ACKs or ZCL Default Reponses from the gateway for a few times. The fix should be fairly simple and bring robustness like the Philips Hue motion sensor has."
To Reproduce

Add Danalock V3 to ZHA in Home Assistant.
After 12-36hrs lock disconnects from the zigbee network and can no longer be locked or unlocked via ZHA. The lock state and battery level are no longer reported.
Remove batteries from the device to reboot the lock.
The lock will reconnect to the Zigbee network and functions as expected for the next 12-36hrs.

Expected behavior
Stable connection to the Zigbee network.
Screenshots
If applicable, add screenshots to help explain your problem.

Device signature
{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4444, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x000a",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0x0009",
        "0x0020",
        "0x0101",
        "0x0b05",
        "0xfcff"
      ],
      "out_clusters": [
        "0x0019"
      ]
    }
  },
  "manufacturer": "Danalock",
  "model": "V3-BTZBE",
  "class": "zigpy.device.Device"
}

Diagnostic information
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.6.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.12",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/London",
    "os_name": "Linux",
    "os_version": "5.15.41",
    "supervisor": "2022.05.3",
    "host_os": "Home Assistant OS 8.1",
    "docker_version": "20.10.14",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.25.5",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "dukaone": {
      "version": "1.0.6",
      "requirements": [
        "dukaonesdk==1.0.4"
      ]
    },
    "feedparser": {
      "version": "0.1.7",
      "requirements": [
        "feedparser==6.0.8"
      ]
    },
    "browser_mod": {
      "version": "1.5.3",
      "requirements": []
    },
    "average": {
      "version": "2.2.3",
      "requirements": []
    },
    "wiser": {
      "version": "3.0.23",
      "requirements": [
        "wiserHeatAPIv2==0.0.25"
      ]
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "requirements": [
      "bellows==0.30.0",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.75",
      "zigpy-deconz==0.16.0",
      "zigpy==0.45.1",
      "zigpy-xbee==0.14.0",
      "zigpy-zigate==0.7.4",
      "zigpy-znp==0.7.0"
    ],
    "usb": [
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*2652*",
        "known_devices": [
          "slae.sh cc2652rb stick"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*zigstar*",
        "known_devices": [
          "ZigStar Coordinators"
        ]
      },
      {
        "vid": "1CF1",
        "pid": "0030",
        "description": "*conbee*",
        "known_devices": [
          "Conbee II"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8A2A",
        "description": "*zigbee*",
        "known_devices": [
          "Nortek HUSBZB-1"
        ]
      },
      {
        "vid": "0403",
        "pid": "6015",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate+"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8B34",
        "description": "*bv 2010/10*",
        "known_devices": [
          "Bitron Video AV2010/10"
        ]
      }
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga"
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      }
    ],
    "after_dependencies": [
      "usb",
      "zeroconf"
    ],
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp"
    ],
    "is_built_in": true
  },
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 8802,
    "manufacturer": "Danalock",
    "model": "V3-BTZBE",
    "name": "Danalock V3-BTZBE",
    "quirk_applied": false,
    "quirk_class": "zigpy.device.Device",
    "manufacturer_code": 4444,
    "power_source": "Battery or Unknown",
    "lqi": null,
    "rssi": null,
    "last_seen": "2022-06-04T01:48:38",
    "available": false,
    "device_type": "EndDevice",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4444, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": 260,
          "device_type": "0x000a",
          "in_clusters": [
            "0x0000",
            "0x0001",
            "0x0003",
            "0x0009",
            "0x0020",
            "0x0101",
            "0x0b05",
            "0xfcff"
          ],
          "out_clusters": [
            "0x0019"
          ]
        }
      }
    },
    "entities": [
      {
        "entity_id": "button.front_door_lock_identify",
        "name": "Danalock V3-BTZBE"
      },
      {
        "entity_id": "lock.front_door",
        "name": "Danalock V3-BTZBE"
      },
      {
        "entity_id": "sensor.front_door_lock_battery_level",
        "name": "Danalock V3-BTZBE"
      }
    ],
    "neighbors": [],
    "endpoint_names": [
      {
        "name": "DOOR_LOCK"
      }
    ],
    "user_given_name": "Front door lock",
    "device_reg_id": "8d5506ad14fe41cae4efa3ce8625b070",
    "area_id": "4f23624c4a4d489fa5fd0e62097bdf74"
  }
}

Additional logs
Paste any additional debug logs here.
Don't remove the extra line breaks outside the ``` marks.

Additional context
Add any other context about the problem here.

I have the same lock with the exact same issue.
I am also following the Phoscon work on this issue, hopefully Danalock company will issue an update soon.

👍


Add --strict to generate z.object().strict()

Description
Add --strict to generate z.object().strict()
Related issue
#8
Blocked by
https://github.com/colinhacks/zod/issues/390
Todo

[ ] Add strict flag to example and config

Will close this for now, .strict() is not really necessary and have some problem with .and()

Hey @notflip, sorry, nothing so far, you can add .strict() to the generated schema.
The main problem was the .strict() combined with .and() if I remember well, you can try to fork this branch and see if this is working for your usecase.

No worries! Thanks for letting me know!


Investigate Ceph for use in Nebari

Context
Rook Ceph might help with Conda store worker scaling issues caused by slow NFS as mentioned in https://github.com/nebari-dev/nebari/issues/2505.  It also might help with making the user home directory more performant and give us an option of replacing the minio pods with ceph's object storage as well.
I've successfully deployed the rook operator helm chart on an AKS cluster with Nebari and created a shared file system between 2 pods on different nodes.  The steps were roughly as follows:

Install Rook helm chart on cluster
create a CephCluster object
create a CephFileSystem and CephFilesystemSubVolumeGroup (in same namespace as your cluster I think)
create a StorageClass referencing the CephFileSystem
create a PVC which references the StorageClass (any namespace)
Create a pod/deployment/etc. that mounts the pvc

We'll need at least 3 nodes running for ceph to take advantage of high availability and resiliency features of Ceph.  We should be able to make them smaller than the current general node.  We may want to create a separate node group for just the ceph storage with 3 small-ish nodes.  I think min node size for Ceph would be 2vcpu, 4Gi RAM per node.
The storage class names we'll use to back Ceph storage will likely be different on each cloud provider.  This should also be tested on the local deployment.
Eventually, it'd be nice to set up auto expansion of storage as space fills up.  It seems to be possible on some cloud providers at least according to these docs.

A few issues encountered:

Ceph let's you make a PVC larger than you have storage backing it which is a little confusing if you aren't aware of that.
I've had a hard time deleteing CephFilesystem objects.  They tend to linger.

I tested the PR linked to this issue and ran the following and it took 10-17 seconds on that Nebari deployment while it took 1 minute on a standard GCP deployment (no Ceph).
import os

# Define the directory where the files will be created
dir_path = "/home/ad/fio-test"
# dir_path = "/tmp/fio-test"

# Create the directory if it doesn't exist
os.makedirs(dir_path, exist_ok=True)

%%time
# Define the size of each file in bytes (1 KiB = 1024 bytes)
file_size = 1024

# Create 10,000 files
for i in range(10000):
    # Define the file path
    file_path = os.path.join(dir_path, f"file{i:04d}.txt")

    # Create the file and write random data to it
    with open(file_path, "wb") as f:
        f.write(os.urandom(file_size))

I tested a single node ceph setup and the script above took 5-10s.  I assume the speedup is due to not having replication on a single node setup.


Adding 1.3 to the cli reference

Content must go through a pre-merge checklist.
Pre-Merge Content Checklist
This documentation has been checked to ensure that:

[ ] The title, template, and date` are all set
[ ] Does this PR have a new menu item (anywhere in templates/*.hbs files) that points to a document .md that is set to publish in the future? If so please only publish the .md and .hbs changes in real-time (otherwise there will be a menu item pointing to a .md file that does not exist)
[ ] File does not use CRLF, but uses plain LF (hint: use cat -ve <filename> | grep '^M' | wc -l and expect 0 as a result)
[X] Has passed bart check
[ ] Has been manually tested by running in Spin/Bartholomew (hint: use PREVIEW_MODE=1 and run npm run styles to update styling)
[ ] Headings are using Title Case
[ ] Code blocks have the programming language set to properly highlight syntax and the proper copy directive
[X] Have tested with npm run test and resolved all errors
[ ] Relates to an existing (potentially outdated) blog article? If so please add URL in blog to point to this content.

Closing in favor of #702, which included these changes.


Refactor proposal: move from javascript to Typescript

In order to facilitate readability of front-end code, I suggest moving from javascript to Typescript. It would greatly help people understand the code even if they are new.
I can do the setup & rewrite for you if you want.  It would also help me for the feature proposed in #485.

Hi @GerkinDev ,
An excellent proposal! We'd love to review (and assist your with) your rewrite.


Run Mac_arm64_ios run_debug_test_macos in presubmit

Reland https://github.com/flutter/flutter/pull/133788.
Fixes https://github.com/flutter/flutter/issues/118830.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Confirmed it ran on flutter-devicelab-mac-38 and passed: https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64_ios run_debug_test_macos/345/overview


any one can help me i tried to import visio diagrame in cset but i got nothing cset couldn't recognize the visio diagram,  what i have to do

💬 Questions and Help
Please note that this issue tracker is not a help form and this issue will be closed.
For questions or help please see:

✉ Email CSET support

Visio is not currently supported as a diagram import type.   You will need to go back to version 8.1 to import a diagram


Main instance support

To ease integration it might be a good idea to have a main instance so that proper management is guaranteed.
Unlike what we did with Letterbox maybe a service is not strictly necessary. We could e.g. have a become active method like what we have on MPNowPlayingSession.

Duplicate of #211. Closed.


Question: what would be a use-case for this?

First of all: thank you for your lib!
This is not meant as a rude question just to better understand when it would make sense to use your lib.
When I have a pretty big JS object (client) and I want to send it to the server, is it useful then or is gzip doing the same thing and I don't really have to worry about it. Does zipson+gzip still save more than just gzip?
Or does it "only" make sense when you are streaming big chunks of data to/from client <> server?

As an example, in my case I want to save a json file to avoid generating it every time on the browser, so instead of taking the raw data and transforming it verytime, now I take the pre-made json object and start from there
That object is ~50mb when stored in a file, my use-case here is to use zipson to make it a <3mb file
I'm reading it through a local fetch
*and I'm figuring out how I can import it within react (it doesn't seem to be possible)

Usually, compression on the Web is best done with the platform features: content-encoding, CompressionStream, etc. And I wouldn’t use Zipson for compressing large <form> uploads, like blog posts or <input type="file" accept=".csv"> (seriously, how is <form accept-encoding> not a platform feature???)
But for my constraints, Zipson ended up perfect. I found it works great to compress uploaded RUM data (performance monitoring/analytics/error tracking/etc.) via navigator.sendBeacon():

navigator.sendBeacon() and its modern replacement fetch('…', { keepalive: true}) don’t accept streams, promises, or anything else that would require spinning the event loop again. (This is because sendBeacon is designed to fire at the last possible moment before the page unloads, so there won’t be that JS execution context once the current event loop is over.) The worst part? That means the new built-in CompressionStream API won’t work at all.
Zipson can compress synchronously, so that’s no problem.

However, Zipson can compress incrementally, which is great for analytics: over the page lifetime, tiny bits of data can be compressed as they happen, instead of locking up the main thread right before the beacon. That way I can fit a great deal of highly-repetitive data into only a few network requests, respecting the user’s battery and data plan.

Zipson’s algorithm isn’t quite as “just do it, it always works” as general-purpose compression, but for repetitive strings and object shapes it’s a heck of a lot faster and simpler. RUM data has exactly those characteristics: the same Error happening multiple times, scroll events, PerformanceEntry, etc.

That simpler compression algorithm also means that import { stringifyTo, ZipsonStringWriter } from 'zipson' doesn’t hurt bundle size as much as other JS compression libraries. I’m also going to experiment with having my bundler predefine configuration constants like fullPrecisionFloats to see if I can eliminate the branches I’m not using.


Failed to build on windows ROS2

Hi there,
I encountered an issue while trying to install sick_scan_xd on Windows 10 with ROS2 Humble.
The error message I received is as follows:

I have ensured that the path C:/sick_scan_ws/src/sick_scan_xd/include exists.

Thanks for your feedback. The path C:/sick_scan_ws/src/sick_scan_xd/include_directories looks strange as include_directories is not a subfolder in sick_scan_xd. Maybe it is from a previous build?
Please remove all temporary build folders, i.e. run
cd C:\sick_scan_ws
rmdir /s/q .\build
rmdir /s/q .\install
rmdir /s/q .\log
del /f/q .\src\CMakeLists.txt

and rebuild as described in Build on Windows ROS2:
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
call C:\opt\ros\humble\x64\setup.bat
colcon build --packages-select sick_scan_xd --cmake-args " -DROS_VERSION=2" --event-handlers console_direct+
call .\install\setup.bat

Please post a logfile of the entire build process if the problem persists.

Many thanks for following up. We have adapted CMakeLists.txt for ROS-2 humble on Windows. Please use the update in branch feature/windows_ros2_humble and rebuild.


Remove quantifier ("+") from branch production

The quantifier is not necessary because a single occurrence of either union or branch will suffice. The "+" has already been removed in the grammar, but not the paper.

Closed by c64883074a7c988167ff8f00080831b872fb3d55


Add documentation for TopographicHachures tool

Hi @jblindsay, this PR adds the detailed docs for the TopographicHachures tool which were missing in the initial PR for the tool.

Looks good! Thanks for adding this.


macOS: Error: ENOENT: no such file or directory, lstat '/private/tmp/ ...

Based on the readme:

realpath: Resolve symlinks using realpath, defaults to true (note that if true, the file must exist previously)

This explains that the setting is true by default, and because /tmp is symlinked to /private/tmp on macOS, it produces this ENOENT problem whenever we try to use a lockfile in /tmp.
What is the official workaround for this? Disabling realpath works for me in testing. But I am unclear on what are the drawbacks of specifying realpath: false and why exactly this fails. Is realpath intended as a security measure or a convenience measure that has lower security?
I was beginning to think that manually creating the lockfile is what I'm supposed to do, but on second thought that seems to go against the notion of the lockfile itself...

Error on Windows as well.
How to use this library?
Want my.lock file so process only runs once at a time...

@unphased

I was beginning to think that manually creating the lockfile is what I'm supposed to do, but on second thought that seems to go against the notion of the lockfile itself...

Four years later, I find myself in the same boat.


IRI strategy for the specifications

Eventually we need to decided our IRI strategy for the different modules of the specifications.
Any suggestions?

I'll move this to the readme if all agree

moved


Stop Start camera

I think there may be an issue with stop_all not releasing all the resources so that stop_all followed by start_all does not always fully clear out and restart the MMAL interface.
I noticed this because occasionally I can get the system to freeze using parameter commands that use a stop_all start_all to ensure the change takes place. When this happenes manually issuing a stop camera / start camera does not recover the system and raspimjpeg itself has to be stopped and started.
There seems to be some components and connections created that are not destroyed in the stop_all.

I updated stop_all in the MotionDetection branch yesterday to include all
resources, I hope this fixes it.

I saw those. Thanks.
I tried to fit a subset of those to the pre-split version. It works but I get the same error as the spliiter version, that a component can't be disabled because it isn't enabled. I am not sure how we test for that if we want want to make the stops dependent on waht state they are in.

How does it work with the new update?

I'll retest with changes made last night/today


maxDuration props✨

What feature or enhancement are you suggesting?
I think it would be great if we have maxDuration props.
What Platforms whould this feature/enhancement affect?
iOS, Android
Alternatives/Workarounds
I mean using JS Timer is not good enough.
Additional information

[X] I agree to follow this project's Code of Conduct
[X] I searched for similar feature requests in this repository and found none.

I mean using JS Timer is not good enough.
Why?

Because the JS timer does not guarantee the exact delay [somewhere around 300ms -1000ms missing/redundency]. I need high precision [around 2-5ms is ok].

Where did you get the info from that a Timer has a 1000ms inaccuracy?

I got it from my company project.
Close this issues because I have already fork and do my own custom.


Fix OSX compilation of Trireme

Codecov Report

Merging #173 into master will increase coverage by 0.16%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
+ Coverage   52.18%   52.35%   +0.16%
==========================================
  Files          33       33
  Lines        4179     4179
==========================================
+ Hits         2181     2188       +7
+ Misses       1845     1835      -10
- Partials      153      156       +3

Impacted Files
Coverage Δ

monitor/linuxmonitor/linuxMonitor.go
68% <ø> (+7%)
:white_check_mark:

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 f1a3b94...a0379a2. Read the comment docs.


Run Hoverfly in simulate mode as web server

The proposition would be to configure Hoverfly as a web server as opposed to a proxy when using it in a development.  The reason behind this is it's a property change for applications to point to a new web server, as opposed to proxy configuration.  The applications are the left untouched and behave in the same way (ie, not talking via a proxy).   My instincts tell me this would only make sense when simulating - during capture seems like it would be easier to remain as a proxy.  I'd be interested to get some input.

I've been thinking about such a change. A developer is likely to use Hoverfly in capture mode on existing services for short periods (hours) but is likely to want to use Hoverfly in simulation mode in testing and development for much longer (days). Having to have proxy settings set to use Hoverfly permanently could be an imposition.

For me there are two real use cases:

To record traffic of an existing API
To simulate the contract of an API which is yet to be written

When it comes to testing my preferred approach is to mock out any HTTP calls in my unit tests and only hit a real endpoint during integration tests.  For integration testing I prefer to use cucumber so I would write a test something like this...
@dataapi
Feature: Data API
	In order to ensure my service integrates correctly
	As a developer
	I want to be able to test the service handles requests to the data api

Background:
Given hoverfly is running and using the recording 'data_api.json'

Scenario: Requesting data fetches the data from the data API
	Given I make a request to '/data/34'
        Then the service should make an upstream request to the data api # validates call to hoverfly
	And the service should return the correct data # check response from my api

Scenario: When the upstream returns no data return not found
	Given I make a request to '/data/badrequest'
        Then the service should make an upstream request to the data api # validates call to overfly
	And the service should return status code 404 # check response from my api

This is obviously quite a simplified example but it allows me to spin up a stack including the system under test with docker and then execute an integration suite written BDD style.
I have been playing round this morning and wrote a little application which sits in front of hoverfly as a mock api which proxies all requests to hoverfly.  This enables me to make requests to http://myserver/myurl without the requirement for setting an http_proxy.
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
)

var (
	proxyURL    string
	simulateURL string
)

func main() {
	proxyURL = os.Args[1]
	simulateURL = os.Args[2]

	fmt.Println("running on port 9000")

	http.HandleFunc("/", rootHandler)

	fmt.Println("Listening for connections on port", 9000)
	http.ListenAndServe(fmt.Sprintf(":%v", 9000), nil)
}

func rootHandler(w http.ResponseWriter, req *http.Request) {

	proxyURL, _ := url.Parse(proxyURL)
	client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)}}

	defer req.Body.Close()

	path := fmt.Sprintf("%v%v", simulateURL, req.URL.Path)
	fmt.Printf("Making request for: %v\n", path)

	request, err := http.NewRequest(req.Method, path, req.Body)
	if err != nil {
		http.Error(w, "Unable to create request", http.StatusInternalServerError)
	}

	resp, err := client.Do(request)
	if err != nil {
		http.Error(w, "Unable to execute request", http.StatusInternalServerError)
	}

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		http.Error(w, "Unable to read body", http.StatusInternalServerError)
	}

	w.WriteHeader(resp.StatusCode)
	w.Write(body)
}

One other thing I would add is that given I have a request like this...
"request": {
                "path": "/events/v1/register",
                "method": "POST",
                "destination": "dev.acet.io",
                "scheme": "http",
                "query": "",
                "body": "{\"event_name\":\"test\", \"callback_url\":\"http://test\"}"
            }

it would be good to be able to specify regex in the request options such as...
```json
"request": {
                "path": "/events/v1/register",
                "method": "POST",
                "destination": "dev.acet.io",
                "scheme": "http",
                "query": "",
                "body": "{\"event_name\":\"regex(.*)\", \"callback_url\":\"http://regex(.*)\"}"
            }

Ok so I see I should really use middleware in this instance, one problem with ruining in docker is that the go run is not possible on your container as you are using busy box I will try to mock something up including my server above when I get back from walking the dogs.

As of v0.7.0 (9bf0b1f172a1f239576fd70f52ae79afafc4cef7), Hoverfly can be ran as a webserver with support for simulate mode. The use case we imagine is that you use the proxy to capture simulation data and then would then deploy Hoverfly with the data as a webserver along side their application in a test environment.

As of v0.7.0, this feature has been implemented.


Use stevedore to enable third-party linters

Codecov Report

Merging #6 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master     #6   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           2      2
  Lines          70     72    +2
=====================================
+ Hits           70     72    +2

Impacted Files
Coverage Δ

jenkins_job_linter/linters.py
100% <100%> (ø)
: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 21e5fad...718f78d. Read the comment docs.


npm run install:oni-plugin-typescript failes

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'run',
1 verbose cli   'install:oni-plugin-typescript' ]
2 info using<EMAIL_ADDRESS>3 info using<EMAIL_ADDRESS>4 verbose config Skipping project config: /home/olle/.npmrc. (matches userconfig)
5 verbose stack Error: ENOENT: no such file or directory, open '/home/olle/package.json'
5 verbose stack     at Error (native)
6 verbose cwd /home/olle
7 error Linux 4.4.0-47-generic
8 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "install:oni-plugin-typescript"
9 error node v4.2.6
10 error npm  v3.5.2
11 error path /home/olle/package.json
12 error code ENOENT
13 error errno -2
14 error syscall open
15 error enoent ENOENT: no such file or directory, open '/home/olle/package.json'
16 error enoent ENOENT: no such file or directory, open '/home/olle/package.json'
16 error enoent This is most likely not a problem with npm itself
16 error enoent and is related to npm not being able to find a file.
17 verbose exit [ -2, true ]

I get this error when running npm install -g oni-vim

Interesting, I haven't seen this - and it looks like the npm install step is working okay on TravisCI (which is Linux).
If you clone & build the repo, does it work?

Yes, I could build it manually.

I get the same problem on Ubuntu 16.04, but even using sudo:
sudo npm install -g oni-vim
For some reason a global install is trying to write to ~/.npm in my home folder, with the following error:
npm ERR! Error: EACCES: permission denied, mkdir '/home/erahhal/.npm/oni-plugin-typescript'
There's definitely something wrong here.

Getting the same error as @erahhal. A little more info: it's trying to open $HOME/package.json when I try and run sudo npm run install:oni-plugin-typescript.

Same problem on Ubuntu 16.04.  Missing write access to /usr/local/lib/node_modules ...
I found when install by sudo npm install -g oni-vim, the oni-plugin-typescript dir's owner in $HOME/.npm is nobody, does it matter?

Hmm, I think I need to get rid of the postinstall script that runs npm install in the oni-plugin-typescript directory, and push those dependencies up.

I've published version 0.1.2 at npm, so please try sudo npm install -g oni-vim again. The postinstall script that was causing problems was removed with #40. Thanks!

Works for me :)

verified that this fix worked.


Is there a way to preserve indention in markdown code blocks?

Not really a toto issue, but I was thinking that one of you might have dealt with this.
I'm not sure if this something simple I'm missing, but when I put a block of code in markdown it left aligns all of the lines.  This makes it a bit hard to read.  Is this an option, or formatting issue?

Basically default rdiscount mrkdown renderer have some options but I don't remember which ones you need to pass in order to achieve your goal. I propose you to switch to redcarpet instead.This is really easy...
Just add following line into your Gemfile:
gem "redcarpet"

And pass some cool options to the toto config:
toto = Toto::Server.new do
  # ...
  set :markdown,    [:gh_blockcode, :strikethrough, :fenced_code, :no_intraemphasis]
  # ...
end

This will make your markdown really simialr to github's

Adding that line into my config causes this error:
!! Unexpected error while processing request: undefined method `gh_blockcode=' for #<RDiscount:0x007ff442549cf8>

Also, does redcarpet replace rdiscount? Or simply add to it?

The options I have provided are valid to redcarpet only.
When you'll add redcarpet gem into your Gemfile it will "substitute" rdiscount, so just add thta gem line and run bundle

Hmm that's what I did.  Still throwing the error.

can you show your config.ru file?

Sure thing: https://github.com/benjamincharity/Toto-Site/blob/master/config.ru
Note: the markdown line is commented in my current file as it was causing the app error.

replace second line Bundler.setup with Bundler.require

Still have the same error.
!! Unexpected error while processing request: undefined method `gh_blockcode=' for #<RDiscount:0x007f9cbbb1e450>

Sorry I was a little bit unclear.
You need to put redcarpet above toto gem. And of course above rdiscount gem.
Also, if you use Bundler.require - there's no ned for manual require.
See gist: https://gist.github.com/1327302

That fixed it! Thanks.

np :))


Xamarin forms: Badge control doesn't exist in Nuget Plugin.MaterialDesignControls

I added the latest version of the Plugin.MaterialDesignControls nuget version 3.0.0 into xamarin app and registered it in ios and android.
added the xmlns:material3="clr-namespace:Plugin.MaterialDesignControls.Material3;assembly=Plugin.MaterialDesignControls"
tried to add badge control
<material3:MaterialBadge Text="1" /> but it doesnt recognize the materialBadge  - am i missing something here?

Hi! yes, unfortunately we haven't released the MaterialBadge yet, as you can see it on the samples we have it ready, but we are solving a few pendings on others controls and we will be releasing a new version with all controls in a few days.
Your feedback is greatly appreciated. Thank you for being part of our journey!

hi @AgustinBonilla, I'm just curious to know when you think the latest version will be released.

Hi @pasha-o! We're still hard at work on the final touches. Anyway, we've gone ahead and released an alpha version (prerelease) that includes the badge control feature.
https://www.nuget.org/packages/Plugin.MaterialDesignControls/3.0.1-alpha
We would love to hear your thoughts, so please share your feedback with us.
Thank you!

hi @AgustinBonilla thanks for the update. yes it worked perfectly.
do you also have any timelines for Maui controls?


0.3.0

Coverage increased (+0.4%) to 98.45% when pulling 75557b50d3e11fe941fbb281a0ed90390eb323c6 on development into ac11eae0a4b0f5b18564a4be32e34cd476920d08 on master.


[Discussion] Spleeter-based apps Using TFLite on iOS have large size

Hello, using the latest model file "2stems.tflite" and the newly released TensorFlow Lite C++ APIs (https://github.com/jinay1991/spleeter/releases), I have successfully completed vocal separation on the iOS platform, and it works very well. The work of the Spleeter team is amazing. (I did not test 4stems, 5tems, etc.)
But I found another troublesome problem. The model file "2stems.tflite" requires that the TensorFlowLite we use must support SELECT operation, and the latest TensorflowLite version of the iOS platform does not support SELECT ops.
In order for TensorflowLite on the iOS platform to support SELECT ops, we need to use the library "TensorFlowLiteSelectTfOps" (https://github.com/aiswaryarajm/tensorflow/blob/9cef7b78b0e9f20cd828111477e35b619d59617d/tensorflow/lite/experimental/ios/TensorFlowLiteSelectTfOps.md). But this binary library is about 1.5GB in total, which is very large. For this reason, spleeter-based apps cannot be released to the App Store on the iOS platform because the final binary file/app is too large.
I tried some ways to make spleeter work without using the "TensorFlowLiteSelectTfOps" library on the iOS platform. I tried deleting the "tf.lite.OpsSet.SELECT_TF_OPS" in the conversion script "tflite_converter.py", and then generate a new tflite model file. But the final model file still needs "TensorFlowLiteSelectTfOps" to work properly.
Is it possible to solve this problem from the source model file? I have no idea.

@jinay1991 Hello, thank you for providing tflite model files and TFLite C++ APIs. Are the above issues known issues? Or is there a solution?

@jinay1991 Hello, thank you for providing tflite model files and TFLite C++ APIs. Are the above issues known issues? Or is there a solution?

Yes they are known issues and exists for my TFLite C++ APIs as well. I had build libtensorflowlite.so manually with delegates linking to this statically.
Original Model may need to adapt in this case.

@jinay1991  Thank you for your reply.
Checking out the data on TensorFlow official website (https://www.tensorflow.org/lite/guide/ops_select), the size of the TFLite binary file containing "Built-in ops + TF ops" on Android is 23.0 MB, and the APK size is 8.0 MB. But on iOS, the size of the binary file/app that only contains the arm64 architecture exceeds 150MB, which drives me crazy.
What's more regrettable is that TFLite does not currently support cropping for iOS versions. I will try to find ways to reduce the binary size of TFLite-related libraries.

I've found a way to use pretrained models in Android / iOS APPs.

hi @arlins
May I ask which tflite model you used? can you provide a link to it?
Whenever I try to load the tflite models on Android, they have wrong data shapes: [1, 1] instead of [1, 512, 1024].

hello @vlatkozelka @arlins can someone please point me towards what to give the model as input? I also converted the 4stems models to tflite and the input shape is [1, 2]. I have seen lot of places that shape is [1, 512, 1024, 2] 1 and 2 being the batch size and channels. but what does I input in 512 and 1024 I can't seem to understand that

Did you fixed this?


Fluent config validation

API for complex fluent validators

would like to see some examples in readme at least - if possible please describe in readme previous thing and add usage examples of this Options validation please


register as share target

One feature that prevents me from using Phanpy as my only Mastodon client on an Android device is that it cannot be the target of a share so doesn't let me share an image as easily as it happens with native applications. But it looks like it could do that by adding some additional directives in the PWA manifest file:
https://developer.mozilla.org/en-US/docs/Web/Manifest/share_target

Additional info:

https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/How_to/Share_data_between_apps#handling_shared_data_from_other_apps
https://developer.chrome.com/docs/capabilities/web-apis/web-share-target?hl=en

I've seen this working in Enafore PWA.
Its manifest.json has a share_target member having this value:
{
	"share_target": {
		"action": "/share",
		"method": "POST",
		"enctype": "multipart/form-data",
		"params": {
			"title": "title",
			"text": "text",
			"url": "url",
			"files": [
				{
					"name": "file",
					"accept": [
						"audio/*",
						"image/*",
						"video/*"
					]
				}
			]
		}
	}
}

The nice thing about Enafore support is that it lets me share images too (and Video I guess, looking at that "accept" member.
NOTE: it does NOT work when the PWA is installed via Firefox. In my case I saw it working when installed via Chrome

NOTE: it does NOT work when the PWA is installed via Firefox. In my case I saw it working when installed via Chrome
@strk The share_target API is still marked as "experimental" and currently only supported by Chrome, Edge, Opera and Samsung Internet Browser on Android.