Install/Setup Issues

Couldn't find PIA /AB folder under python site-packages. Only installed lxml

Is your issue occurring when trying to run pip install allen-bradley-toolkit? If so, can you post what error is being thrown on the terminal?

Make sure you have Microsoft Visual C++ Build Tools Installed before running pip install allen-bradley-toolkit.  Doing this may resolve your issue.  Please let me know if this was helpful or if something else is causing your issue.

I initially got the error "setup.py egg_info failed with error code 1" when
installing using pip install.  So I tried installing it locally using *pip
install -e "path to toolkit" * that seemed to be successful except the
package isn't in the site-package folder. Now when I try installing it
using pip install it says it's already there.
I'll try C++ Build tools
On Mon, Feb 26, 2018 at 9:59 AM, Canaan Seaton<EMAIL_ADDRESS>wrote:

Make sure you have Microsoft Visual C++ Build Tools
http://go.microsoft.com/fwlink/?LinkId=691126&__hstc=268264337.20dfe66f0053415ec618cc41e1e5ebee.1519654047676.1519654047676.1519656772032.2&__hssc=268264337.1.1519656772032&__hsfp=2795554280&fixForIE=.exe
Installed before running pip install allen-bradley-toolkit. Doing this
may resolve your issue. Please let me know if this was helpful or if
something else is causing your issue.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/cmseaton42/Allen-Bradley-Toolkit/issues/2#issuecomment-368530447,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZbLHA6gzoAfNjTK71bWDP5V70MYjGzXks5tYsbXgaJpZM4STS1U
.

If you run pip freeze is allen-bradley-toolkit or lxml listed? If so, I would go ahead and run pip uninstall <package> on those two packages to ensure a clean start.  I checked the install on my PC and got the error you are describing setup.py egg_info failed with error code 1. Installing the C++ build tools seemed to fix it.  What version of Python are you running?  This package is tested on Python 2.7. You may also want to run pip install --upgrade setuptools before reinstalling the toolkit.

both allen-bradley-toolkit and lxml are listed when running pip freeze.
I'm running version 2.7, I'll try uninstalling, make sure C++ is installed
and install it again see if that works.
Thanks for the help!
Mike
On Mon, Feb 26, 2018 at 12:53 PM, Canaan Seaton<EMAIL_ADDRESS>wrote:

If you run pip freeze is allen-bradley-toolkit or lxml listed? If so,
I would go ahead and run pip uninstall  on those two packages to
ensure a clean start. I checked the install on my PC and got the error you
are describing setup.py egg_info failed with error code 1. Installing the
C++ build tools seemed to fix it. What version of Python are you running?
This package is tested on Python 2.7. You may also want to run pip
install --upgrade setuptools before reinstalling the toolkit.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/cmseaton42/Allen-Bradley-Toolkit/issues/2#issuecomment-368589164,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZbLHNE23LysRU19WypnesXFviNRLRTqks5tYu-VgaJpZM4STS1U
.

Also, I found another bug that resulted from the name change and fixed it so you may need to run pip install allen-bradley-toolkit -U to update to the latest version once you do get it installed.
Keep me posted and not a problem!

Hi Canaan,
I installed the C++ Build tools and tried installing the allen bradley
toolkit again but am still getting the same error - python setup egg_info
failed with error code 1.
I'm running windows 7, can't think of why it's not working
Mike
On Mon, Feb 26, 2018 at 1:36 PM, Canaan Seaton<EMAIL_ADDRESS>wrote:

Also, I found another bug that resulted from the name change and fixed it
so you may need to run pip install allen-bradley-toolkit -U to update to
the latest version once you do get it installed.
Keep me posted and not a problem!
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/cmseaton42/Allen-Bradley-Toolkit/issues/2#issuecomment-368602758,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZbLHBeKXK7pHloGEeBeLxwEdnBZ5_3Kks5tYvmsgaJpZM4STS1U
.

Hmmm, did you uninstall the instances you had before trying to reinstall?

Yeah I uninstalled everything and started from scratch then reinstalled
everything.
Worst case I can just paste the libraries into the site packages folder -
Just wondering if you had an easy solution
On Thu, Mar 1, 2018 at 12:35 PM, Canaan Seaton<EMAIL_ADDRESS>wrote:

Hmmm, did you uninstall the instances you had before trying to reinstall?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/cmseaton42/Allen-Bradley-Toolkit/issues/2#issuecomment-369668750,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZbLHPAbpqtQcCSVG1JVeFHu6jq9imKeks5taDFOgaJpZM4STS1U
.

Can you screenshot the complete error you are getting in the terminal. I am recreating your issue in a windows 7 VM and getting a similar issue.  I want to verify that it is the same one so I can get to the root.

I think I fixed the issue... You should be able to install now. If it doesnt work with pip install allen-bradley-toolkit then you may need to run with the ignore cached downloads flag by running pip install --no-cache-dir allen-bradley-toolkit

It looks like it installed properly. Thanks for looking into it!
On Thu, Mar 1, 2018 at 4:33 PM, Canaan Seaton<EMAIL_ADDRESS>wrote:

I think I fixed the issue... You should be able to install now. If it
doesnt work with pip install allen-bradley-toolkit then you may need to
run with the ignore cached downloads flag by running pip install
--no-cache-dir allen-bradley-toolkit
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/cmseaton42/Allen-Bradley-Toolkit/issues/2#issuecomment-369738133,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZbLHKxw13j4mTcdYqOgu4CIQAm3LSNiks5taGkOgaJpZM4STS1U
.

No problem, The API changed so let me know if have any questions regarding it.  Also, Feel free to request new features via a new issue! Happy Hacking!


On django 1.9, the instructions when ssh-ing into the vagrant box are incorrect

I just tried to follow the instructions that are listed when ssh-ing into the vagrant box or when running 'menu'. During the pip install command, django 1.9 was retrieved. Running django-admin startproject works as expected, however when running manage.py runserver you get an import error:
"No module named django"
To fix, I had to substitute pip install with pip3 install within the virtualenv.

Thank you, 1.9 was just released. I'll get this fixed up tomorrow.


docker-bench-security.sh shows v1.3.0 for v1.3.1 tag

Description
The docker-bench-security.sh script for the v1.3.1 tag displays Docker Bench for Security v1.3.0 in the output.
Steps to reproduce the issue:

Download the code for the v1.3.1 release.
Run docker-bench-security.sh.

Describe the results you received:
The second line of output is: # Docker Bench for Security v1.3.0
Describe the results you expected:
The second line of output should be: # Docker Bench for Security v1.3.1

Correct @kinghuang, a miss from my part.  I will update as soon as possible.

Updated the version to 1.3.2 before release.


Missing File for Model Training

Where is the "colongpt/train/train.py" mentioned in guideline-for-ColonGPT.md?

We are working on integrating and training more models in our framework. Please stay tuned, and I will let you know if we've done. Probably next month.


Provide an easy way to disable the wishlists feature

This is along the lines of https://github.com/tangentlabs/django-oscar/pull/673
It appears that the work for wishlists was not done during the work stream above. As https://github.com/tangentlabs/django-oscar/blob/master/oscar/defaults.py#L86 suggests that this is supportted and it would indeed be a very nice feature, I'm documenting it here.

@c00lz3r0 @maikhoepfel Done, PR #1782.

But how do disable wish list? Does not found in settings http://django-oscar.readthedocs.io/en/latest/ref/settings.html

@LennyLip https://github.com/django-oscar/django-oscar/blob/739ab701789de3baae45ac0ed9eb0627b14be941/src/oscar/defaults.py#L95

Closing, since it's already available to disable wishlists by the OSCAR_HIDDEN_FEATURES setting.

@sasha0, thiese option isn't in the official documentation.

Yes, but this already logged into another issue #2194.


Lots of nodes causing slowdown

I have a large collection of nodes (1000+) and it seems to slow down heavily.
I think I might have made several mistakes along the way, but I wanted to know if there was a way to improve performance, that ive overlooked.
Still love the Project by the way.

Yes, this is a known issue that is unfortunately not that easy to fix. If you profile your application you will probably see this is caused by a LayoutUpdated event handler in PortView. This is used to synchronize the position of the port with the viewmodel, which is then used to correctly draw connections. Its implementation is, frankly, inefficient. However, optimizing this is non-trivial as it is constrained by WPF which does not have functionality to track the transform of a view relative to another one. Last time I checked, the mechanisms to do this exist at least partially, but are not available publicly in the API.
The good news is, this is now more solvable than before now that WPF is open source. However, I do not currently have plans to engineer this fix. I am currently actively working on issue #24, which will allow the grouping of nodes into subnetworks. This mostly resolves this problem because grouping nodes reduces the node count in a single network.

Yes, this is a known issue that is unfortunately not that easy to fix. If you profile your application you will probably see this is caused by a LayoutUpdated event handler in PortView. This is used to synchronize the position of the port with the viewmodel, which is then used to correctly draw connections. Its implementation is, frankly, inefficient. However, optimizing this is non-trivial as it is constrained by WPF which does not have functionality to track the transform of a view relative to another one. Last time I checked, the mechanisms to do this exist at least partially, but are not available publicly in the API.
The good news is, this is now more solvable than before now that WPF is open source. However, I do not currently have plans to engineer this fix. I am currently actively working on issue #24, which will allow the grouping of nodes into subnetworks. This mostly resolves this problem because grouping nodes reduces the node count in a single network.

Thank you for the quick and informative answer.
Sorry for troubling you and once again thanks for the aid.


Can you add a "Watch and Download Movie online" option in your app?

I'm a big fan of your web app - it's incredibly user-friendly and visually appealing! I have a suggestion that I believe would significantly enhance its functionality and user experience: adding a seamless "Watch Movie" feature directly within the app.
This feature would allow users to stream movies without ever leaving the app, increasing convenience and overall engagement. It would also broaden the app's appeal to a wider audience who enjoy in-app entertainment options.
To ensure a smooth and efficient implementation, I recommend considering the following:
Proper Schema and Metadata: Implementing a well-defined schema for movie data, including details like title, genre, director, cast, release date, and ratings, would enable efficient movie organization and searching within the app. This would require defining data types and relationships between data points to ensure accuracy and consistency.
For reference, I found this repository containing code for movie streaming: https://github.com/movie-web/movie-web. While not a plug-and-play solution, it might offer valuable insights and inspiration for your development process.
I'm confident that adding a well-executed "Watch Movie" feature, supported by strong data structuring and integration options, would significantly enhance your app's value proposition and user engagement. Thank you for considering my suggestion! I'm excited to see how your app continues to evolve and impress.

Doing this is not legal and will result in DMCA.


[Bug] Many imported Relay models fail to parse when saved in the text format

The naming conventions of many other deep learning frameworks do not play together nicely with the Relay text format. For example, many PyTorch models include dots in variable names, which are parsed as index operators in Relay. What is curious is that the imported programs (when they are referenced as the directly imported AST objects) will work initially, but will not work once written to the text format and are attempted to be parsed back (at which point they fail to type check).
For example, with the PyTorch importer (used in the unit tests):
import torch
import tvm
from tvm import relay

model = torch.nn.Transformer(d_model=256, nhead=8, num_encoder_layers=6, num_decoder_layers=6)
model = model.eval()
src = torch.rand((10, 32, 256))
tgt = torch.rand((10, 32, 256))
trace = torch.jit.trace(model, [src, tgt])
trace = trace.float().eval().cpu()
input_shapes = [("src", (10, 32, 256)), ("tgt", (10, 32, 256))]
mod, params = relay.frontend.from_pytorch(trace, input_shapes, {})

# writes successfully
with open("transformer.relay", "w") as fp:
    fp.write(mod.astext())

# attempt to parse...
with open("transformer.relay", "r") as fin:
     tvm.parser.fromtext(fin.read())

The parsed model fails to read because many of the model parameters have dots in the name, e.g., %decoder.layers.0.self_attn.in_proj_weight. This yields the error expected a local variable found '.'
I see two approaches for addressing this:

Sanitize variable names in the text format pretty-printer
Sanitize variable names in the importers

In principle, the first approach would be good on the grounds that it would not require modifying all of the importers. However, importers typically provide both a modified Relay module and a parameter dictionary and the sanitizer would have to also sanitize the names in the parameter dictionary. So the importers themselves may make more sense as the place for sanitizing names.
I also think it would be a good idea to include text-format roundtripping in importer tests to ensure this will not be an issue in the future.

I checked and the PyTorch importer has a "parser-friendly" flag that replaces only dots, which is reasonable. I will see if this problem exists in other importers


FDS-GmSafir

Hello,
I write not to report a problem, but to clarify two doubts I have regarding how to use the radiation intensities I obtained on FDS with SAFIR.

I couldn't find the answer online about how I should prepare the FDS output (radiation intensities txt) as input for thermal analysis in GmSafir. Is there a predefined format?

After having the txt prepared, should I change the "Flux constraint" of a cross section in Thermal 2D from "HASEMI" to "CFD" or "User-defined"?

Regards

yes, flux constraint shall be "CFD", and then the preparation of FDS output in dedicated files is not managed by GmSAFIR, but has to follow the specifications found in SAFIR documentation


Add regex matches as placeholders

What this PR does / why we need it:
Adds regex matches as placeholders
Which issue this PR fixes:
fixes #148
Special notes for your reviewer:
I've passed pathSlice as a pointer to zoneFromPath because I didn't want to return more than 3 variables. If it's ok to be more than 3, can change it.
Release note:

/LGTM
I'm neutral on the pointer. It makes the function a bit harder to understand, but let's wait for @alarsyo on this too.

I agree that having a pointer is more ugly and complex than 4 return values. @stp-ip What do you think? Should we go with returning 4 values? As Antoine mentioned, that way we can avoid passing empty slices to function too.


Allowance in swap ui showing higher than normal value for allowance

Link:
https://voi.observer/explorer/transaction/RAFSAMNY7PYV5M4X3KBJWF4ZLTZQ2OVOOWXJPIGVYNWXKCRODKBQ


Binary at for field locators

A followup to #408 - field locators don't have to specify a dword index, they can just use msb/lsb.

@mjcaisse-intel :tada:


error - Failed to download Inter from Google Fonts. Using fallback font instead.

error - Failed to download Inter from Google Fonts. Using fallback font instead.
Tried running this app as bare as it came with no configuration and this happens within my codespace.

Most probably it's your internet connection. The project uses Inter font from google fonts being loaded using next/fonts package.

Most probably it's your internet connection. The project uses Inter font from google fonts being loaded using next/fonts package.

I'm getting the same error. My internet is fine for everything on my pc, including apps I build and run locally, yet I still get this error for Inter. Why would my internet block google fonts and nothing else?

Most probably it's your internet connection. The project uses Inter font from google fonts being loaded using next/fonts package.

I'm getting the same error. My internet is fine for everything on my pc, including apps I build and run locally, yet I still get this error for Inter. Why would my internet block google fonts and nothing else?

Hey there, I sometimes face same issue. Here is what I do to solve it - I have npkill install to I use that to delete the node_module file and then reinstall using pnpm i.


[Bug]: Postgres | BigInt & Numeric datatypes returning wrong values

Is there an existing issue for this?

[X] I have searched the existing issues

Description
BigInt & Numeric datatype columns are inserting wrong value into table column:
Actual values:
bigint -<PHONE_NUMBER>854775807
numeric -<PHONE_NUMBER>.2147483647
Inserted values:
bigint -<PHONE_NUMBER>854776000
numeric -<PHONE_NUMBER>.2147484

Steps To Reproduce

Connect to a Postgres ds
Create table - create table numeric (id smallint not null primary key, bigintId bigint not null, demimalId decimal not null, numericId numeric not null)
Insert values -  INSERT INTO public."numeric" ("id", "bigintid", "demimalid", "numericid") VALUES (1,<PHONE_NUMBER>854775807,<PHONE_NUMBER>54567,<PHONE_NUMBER>.2147483647);
Run select query on the table & map to a table widget for viewing
Observe the values of column : Wrong values are displayed
Expected: If within the range - actual values inserted by user should be stored in table & retrieved as-well

Public Sample App
No response
Version
Prod/Release v1.7.2

Root Cause
According to my findings, I think the problem solely lies in the presentation layer. I have found that the data are being inserted into Postgres database without being truncated. Also, the /execute API returns the data from the Postgres database keeping it unchanged.
And the problem turns up due to an early rounding issue on the client side. (IMO)

Datatype
Expected
Actual
Findings

bigint
9223372036854775807
9223372036854776000
For bigint datatype ,the client-side rounds it at the 16th digit (from left to right)

numeric
2147483647.2147483647
2147483647.2147484
For numeric datatype, the client-side rounds it up to 7 digits after the decimal point

Postgres DB (Checked with Datagrip tool)

Server returning data properly (/execute API Response)
Side by side
In the Network->Response Tab we can see that the server is returning the data as expected.

Response Tab (Chrome)
(Zoomed In)

Lowering the priority of this issue from critical to High since the impact of the issue is limited and it does not break any application.

Related issue: https://github.com/appsmithorg/appsmith/issues/5743


these are the IMDA changes

two changes to IANA_IPFIX_TYPES.java and 1 change to NetflowParser.java

The only change is in IANA_IPFIX_TYPES.java and NetflowParser.java. No other changes
Vijay Narayanan
Partner Solution Engineer|Hortonworks
M:+919845445812
From: Simon Elliston Ball<EMAIL_ADDRESS>Reply-To: simonellistonball/nifi-netflow<EMAIL_ADDRESS>Date: Wednesday, November 28, 2018 at 6:47 PM
To: simonellistonball/nifi-netflow<EMAIL_ADDRESS>Cc: Jayasankar Vijay Narayanan<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [simonellistonball/nifi-netflow] these are the IMDA changes (#1)
@simonellistonball requested changes on this pull request.
Why the additional copies of the java files in the root? Are the real changes just in the package based diffs?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/simonellistonball/nifi-netflow/pull/1#pullrequestreview-179289374, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ae-ENiAU84uG1DDJEEcWmQT5lIXuql6vks5uzozqgaJpZM4Y28y8.


Use AsyncHTTPClient package as a replacement for HTTPClient

Is your feature request related to a problem? Please describe.
Following the programmers principle: "The less code I write, the less bugs I produce", I think it would be great to switch the internal implementation to remove the HTTPClient and use the AsyncHTTPClient package instead.
Describe the solution you'd like
Depend on the AsyncHTTPClient and use it in the AWSClient.
Describe alternatives you've considered
Everything stays as is.
Additional context
Further it should be investigated, if it makes sense to keep one HTTPClient in the AWSClient around (as a property). Currently with each request a new HTTPClient is created. Even if the HTTPClient would support connection-pooling the AWSClient currently would not make any use of this.
Since the SSWG has mentioned that they are working on connection-pooling for the AsyncHTTPClient, I propose, that a changed implementation of the AWSClient initializes it's HTTPClient in the init and keeps the HTTPClient around for its lifetime.

Vapor’s AsyncKit package, AsyncHTTPClient, and others are working on connection pool implementations. There are lots of interesting questions coming up already around concurrency and performance. Can there be one connection pool to rule them all, or should there be many separate ones that follow well considered best practices? If you have ideas on how connection pooling in Swift should work, let’s combine forces.

If the maintainers are okay with this I would like to try my best to provide a PR.

I have looked into this and I have had a build running using it but this would break builds using nio-transport-services ie iOS and macOS (although we could use NIOSSL for macOS). I have looked at the option of using async-http-client when not linking with nio-transport-services. Not overly keen on the diverging code paths between macOS and Linux though but think this is a probably going to have to happen at least with iOS.
Regarding the HTTPClient being initialised once, there is one issue if you do this.  This will need to be done for the HTTPClient inside the AWSClient. Will we require users to call an equivalent AWSClient.syncShutdown()?

I have looked into this and I have had a build running using it but this would break builds using nio-transport-services ie iOS and macOS (although we could use NIOSSL for macOS). I have looked at the option of using async-http-client when not linking with nio-transport-services. Not overly keen on the diverging code paths between macOS and Linux though but think this is a probably going to have to happen at least with iOS.

I think we can completely hide the HTTPClient implementation from the user. I would assume that the async-http-client should also support nio-transport-services sooner or later.
I asked in the #async-http-client channel in the swift-server slack:

Not sure if this a completely stupid question, but is there a plan to use swift-nio-transport-services as the underlying framework for the async-http-client on Darwin?

Artem Redkin replied:

hi! completely not a stupid question, we don't have immediate plans to add this, but it's on our radar, just want to concentrate on connection pool first

For the time being we could use the current AWSClient.HTTPClient on Darwin and use the async-http-client on Linux. When the time comes for async-http-client to support Darwin as well we could switch completely. But I'm quite sure, that using the async-http-client will benefit this package in the long run.

Regarding the HTTPClient being initialised once, there is one issue if you do this.  This will need to be done for the HTTPClient inside the AWSClient. Will we require users to call an equivalent AWSClient.syncShutdown()?

Yes. I guess, that this methods was created to end any running operation. In a normal server use-case I would guess that the AWSClient is created at server bootup and destroyed on shutdown. Creating a client for every request should IMHO be seen as an antipattern (for connection pooling reasons).
Currently this method is called on every invoke. Especially the naming of sync and running this in the EventLoop should be a big nono. Sadly there is no async option at the moment.
    fileprivate func invoke(_ nioRequest: HTTPClient.Request) -> Future<HTTPClient.Response> {
        let client = HTTPClient(eventLoopGroupProvider: .shared(AWSClient.eventGroup))
        let futureResponse = client.connect(nioRequest)

        futureResponse.whenComplete { _ in
            do {
                try client.syncShutdown()
            } catch {
                print("Error closing connection: \(error)")
            }
        }

        return futureResponse
    }

But if we are going forward to make this change, we should consider the following: Right now every AWS Service has its own facade (which is awesome). The facade creates its own AWSClient and uses that one. Maybe we should consider creating an AWSClient only with credentials and the region. Then we could inject this client into every service facade. The service facade would then inject all the other information (amzTarget, service, serviceProtocol, apiVersion, endpoint, middlewares, possibleErrorTypes) for every call. This way we could use a single AWSClient basically for all service facades within one region and we would only need to call syncShutdown once.
public struct ECS {

    public let client: AWSClient

    public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = []) {
        self.client = AWSClient(
            accessKeyId: accessKeyId,
            secretAccessKey: secretAccessKey,
            sessionToken: sessionToken,
            region: region,
            amzTarget: "AmazonEC2ContainerServiceV20141113",
            service: "ecs",
            serviceProtocol: ServiceProtocol(type: .json, version: ServiceProtocol.Version(major: 1, minor: 1)),
            apiVersion: "2014-11-13",
            endpoint: endpoint,
            middlewares: middlewares,
            possibleErrorTypes: [ECSErrorType.self]
        )
    }

    ///  Creates a new Amazon ECS cluster. By default, your account receives a default cluster when you launch your first container instance. However, you can create your own cluster with a unique name with the CreateCluster action.  When you call the CreateCluster API operation, Amazon ECS attempts to create the service-linked role for your account so that required resources in other AWS services can be managed on your behalf. However, if the IAM user that makes the call does not have permissions to create the service-linked role, it is not created. For more information, see Using Service-Linked Roles for Amazon ECS in the Amazon Elastic Container Service Developer Guide.
    public func createCluster(_ input: CreateClusterRequest) -> Future<CreateClusterResponse> {
        return client.send(operation: "CreateCluster", path: "/", httpMethod: "POST", input: input)
    }

    ...
}

I don't think we can rely on a nio transport services version of async http client appearing in the near future. I had a look at doing my own version a month back and gave up. Trying to keep both TS and NIOSSL versions together and making them readable was very trying. I gave up.
Regarding the creation/deletion of HTTPClient (in both the aws-sdk-swift-core and the async-http-client versions). The syncShutdown() is basically there to shutdown the eventLoopGroup. If you initialise them with a shared eventLoopGroup, the initialiser and syncShutdown basically don't do anything. So creating and deleting them isn't that much of an issue. Of course this is reliant on implementation details.

Just for reference. https://github.com/swift-server/async-http-client/issues/127

I don't think we can rely on a nio transport services version of async http client appearing in the near future. I had a look at doing my own version a month back and gave up. Trying to keep both TS and NIOSSL versions together and making them readable was very trying. I gave up.

Well that way code should become even more readable if we just have an NIOTSClient for Darwin 😉
Would it make sense to put your already done work in a Draft Pull Request?

I'll go find it

Found old code and rewrote to include the HTTPClient selection #141

done


Update ERD

Describe the bug
The ERD here: https://github.com/CircuitVerse/CircuitVerse/blob/master/erd.pdf is outdated.
Are you working on this issue? (Yes/No)
It can be a first-time issue.

What Can we update in here? I would like to work on this issue

Many new tables like notifications taggings have to be added.

Can you please explain more on this so that I can Update this.

It is difficult to maintain such a file, we can just remove that file instead

Should I open a PR for that ?

It is difficult to maintain such a file, we can just remove that file instead

I think we must not completely remove the file, instead, we can use some other method to share database details.

Something like https://erdplus.com/ would be helpful.

This still takes effort. I agree with @tachyons we should remove the file.

So @shubhankarsharma00 and @tachyons should I open a PR for the same?

The issue is still an open discussion but go ahead open the PR.


make 1d texture from lists result in incorrect data uploaded

(make-texture '((255 0 0)
                                 (0 255 0)
                                 (0 0 255))
                               :element-type :rgb8)

PLAY-WITH-VERTS> (pull-g *)
(#(103 203 81) #(167 203 81) #(231 203 81))

PLAY-WITH-VERTS> (setf tmp0 *)
#<C-ARRAY :element-type :UINT8-VEC3 :dimensions (3)>
PLAY-WITH-VERTS> (pull-g *)
(#(0 0 0) #(0 0 0) #(176 95 105))
PLAY-WITH-VERTS> (push-g '((255 0 0) (0 255 0) (0 0 255)) tmp0)
#<C-ARRAY :element-type :UINT8-VEC3 :dimensions (3)>
PLAY-WITH-VERTS> (pull-g tmp0)
(#(23 91 45) #(87 91 45) #(151 91 45))

Ok, so the problem is:
(let ((carr (make-c-array (list (v! 255 0 0)
                                       (v! 0 255 0)
                                       (v! 0 0 255))
                                :element-type :uint8-vec3)))
         (prog1 (pull-g carr)
           (free carr)))

> (#(0 0 127) #(0 0 0) #(0 0 0))

failure..
TESTS> (let ((carr (make-c-array `(,(v!uint8 255 0 0)
                                    ,(v!uint8 0 255 0)
                                    ,(v!uint8 0 0 255))
                                :element-type :uint8-vec3)))
         (prog1 (pull-g carr)
           (free carr)))
(#(255 0 0) #(0 255 0) #(0 0 255))

Works. So when the element is a list we need to look at the element-type to work out what constructor to use

Ugh, this is just all a bit janky, maybe we bite the bullet, go with the changes in https://github.com/cbaggers/cepl/issues/218 and ditch this whole janky list populating thing.

Check this again. Recent changes may have affected this

Rewrote the make-c-array from list logic. We no longer allow lists for vector args, only for structs, however now we can infer more things e.g.
LARK> (make-texture (list (v! 1 2) (v! 3 4)))
#<TEXTURE-1D (2)>
LARK> (texref *)
#<GPU-ARRAY :element-type :RG32F :dimensions (2) :backed-by :TEXTURE>

Merged to master


Make StargateClient.queryClient public

Looking at the IBC query support (and staking as well), I see lots of extensions on the queryClient:
private readonly queryClient: QueryClient &
    AuthExtension &
    BankExtension &
    DistributionExtension &
    IbcExtension &
    StakingExtension;

Which adds the IBCExtension to the private queryClient. But I see no way to use the queryClient from outside, except through eg:
  public async getBalance(address: string, searchDenom: string): Promise<Coin | null> {
    const balance = await this.queryClient.bank.balance(address, searchDenom);
    return balance ? coinFromProto(balance) : null;
  }

How can I access all the query extensions (eg. staking and distribution as well as IBC)?

I propose modifying  private readonly queryClient ->  public readonly queryClient. I see no harm there and a bit help for consumers of the class

This should not be done. Rather the app should create it's own custom QueryClient with all extensions it needs, rather than forcing those upstream for each additional package.
TODO: document this approach when used in an app

This should not be done. Rather the app should create it's own custom QueryClient with all extensions it needs, rather than forcing those upstream for each additional package.
TODO: document this approach when used in an app


Pyb command failure

Hi,
since this morning and without any particular change in our code we are experience this error when we try to build our project:
Build started at 2020-10-19 15:22:53
------------------------------------------------------------
------------------------------------------------------------
BUILD FAILED - OSError: Command /home/jenkins/agent/...2.final.0/bin/python - setuptools pip wheel failed with error code 1 (site-packages/pybuilder/_vendor/virtualenv.py:962)
------------------------------------------------------------
Build finished at 2020-10-19 15:22:57

Unfortunately error happens only in our CI/CD pipeline and I'm not able to reproduce in local.
Thanks in advance for your help

Please run the build with -v -X and post the full log.
Looks like you're on Linux so recent Windows craziness on Travis should not affect you.

PyBuilder version 0.12.10
Build started at 2020-10-20 04:25:49
[DEBUG] Loading project module from ./build.py
[DEBUG] Setting up plugins VEnv at '/home/jenkins/agent/workspace/DEV_test-artefact_develop/module/.pybuilder/plugins/cpython-3.8.4.final.0'
BUILD FAILED - OSError: Command /home/jenkins/agent/...4.final.0/bin/python - setuptools pip wheel failed with error code 1 (site-packages/pybuilder/_vendor/virtualenv.py:962)
Build finished at 2020-10-20 04:25:52

That's really bizarre. What happens is that the virtualenv fails to install. Are you sure you guys didn't run out of space or something like that?

That's all we can see in the error. If you know which os command pybuilder is trying to execute we can test that separately.

I can't because it's not the PyB failure, it's a failure inside virtualenv that is bundled with PyB. The failure setuptools pip wheel failed with error code 1 looks like failure to install most basic venv tooling (pip, setuptools, wheel etc).
This looks to me purely environmental. Please check if you have enough storage in your Jenkins and let me know what you find.

@arcivanov we used setup tool to build python code in the pipeline. I've no way to verify anymore having removed that env.

Understood, thanks.


Motion controllers Grab Mechanics scene changes colour doesn't grab

Overview
I am using the Holotoolkit Demo scene "GrabMechanics" with a Samsung Odyssey HMD.
Once adding a rigid body and collider to the ControllerRect prefabs, I could change the colour of the cubes by intersecting with them. However, I could not grab them.
I am still able to teleport around, as well.
Expected Behavior
Be able to grab the cubes
Actual Behavior
Can not grab the cubes
Steps to reproduce

Import holotoolkit package
Import holotoolkit examples package
import holotoolkit preview package
open GabMachanics scene
go to Motion Controllers in hierachy

I did try it with "always use alternate" unticked, but this resulted in the WMR controllers coming up, and with no collision detected, so no cube colour change.
click on ControllerRect prefabs
add box collider and rigidbody
set rigidbody to "trigger" and "is kinematic"

Hit play!

Unity Editor Version
2018.2.0b3
Mixed Reality Toolkit Release Version
HoloToolkit 2<IP_ADDRESS>

ack, so after remaking the preoject, I tried it without doing the
Windows Mixed Reality Toolkit-> Configure -> Project + scene
and it works when I DON'T do that!
Apologies for panic!


ClientScene::InternalAddPlayer: playerControllerId higher than expected: 0

I get a warning "ClientScene::InternalAddPlayer: playerControllerId higher than expected: 0" when NetworkManager has set Auto Create Player to false and you then spawn a player on the server.
Although its only a warning there is a simple fix in NetworkManager.cs :
        public override void OnClientConnect(NetworkConnection conn)
        {
            if (!clientLoadedScene)
            {
                // Ready/AddPlayer is usually triggered by a scene load completing. if no scene was loaded, then Ready/AddPlayer it here instead.
                if (autoCreatePlayer)
                {
                    ClientScene.Ready(conn);
                    ClientScene.AddPlayer(0);
                }
                else
                {
                    ClientScene.localPlayers.Add(new Mirror.PlayerController());
                    ClientScene.Ready(conn);
                }
            }
        }

        public override void OnClientSceneChanged(NetworkConnection conn)
        {
            if (autoCreatePlayer)
            {
                // always become ready.
                ClientScene.Ready(conn);

                // vis2k: replaced all this weird code with something more simple
                // add player if all existing ones are null (or if list is empty, then .All returns true)
                if (ClientScene.localPlayers.All(pc => pc.gameObject == null))
                {
                    ClientScene.AddPlayer(0);
                }
            }
            else
            {
                ClientScene.localPlayers.Add(new Mirror.PlayerController());
                ClientScene.Ready(conn);
            }
        }

This is probably a duplicate of #25 and should be closed if that is the case. It has been silenced now.

@TimPickup can you give us a simple example script to reproduce the error? Or a step by step instruction?

Hi, Its not related at all to #25
I gave the solution to the problem above but I guess I wasnt clear enough how to reproduce. You have since removed the ability to have multiple controllers so the only change to my solution I provided is to remove the "0" in "ClientScene.AddPlayer(0);"
To reproduce you add a NetworkManager and set Auto Create Player to false in the inspector.
Then after starting the server, spawn a player on the server manually - after they load the scene etc via AddPlayerForConnection.

Could you possibly create a small example project?

Hi, I have got around to creating a project with the latest build and the issue is gone after the controller code you removed. I will close this case

Thanks for letting us know @TimPickup


fields=excerpt requires underlying knowledge

The excerpt field is a calculated field based on plaintext at the moment if you request e.g. ?fields=title,excerpt you won't receive the excerpt field unless you also supply ?formats=plaintext.
To Reproduce

Visit https://demo.ghost.io/ghost/api/v2/content/posts/?key=22444f78447824223cefc48062&fields=title,excerpt
Notice excerpt is missing completely
Add &formats=plaintext https://demo.ghost.io/ghost/api/v2/content/posts/?key=22444f78447824223cefc48062&fields=title,excerpt&formats=plaintext
Now we get the excerpt and the plaintext field.

It's unexpected that I am only able to get the excerpt field whilst the plaintext format is also included. This logic should be "behind the scenes" much the same as the url field.
Technical details:

Ghost Version: master

I've noticed that the excerpt retrieved with the workaround is also different than the excerpt that I get when retrieving the whole post. When querying with fields=excerpt&formats=plaintext, it will give me the first so many characters of the post, but when querying the whole field, I will get the custom excerpt if it was specified.
I'm trying to use the API to get a list posts with their titles, authors, excerpts, etc. for a home page, but I didn't want to download the entire page contents so that I could save on bandwidth. This is a blocker for that. For now I'll have to resort to downloading the whole post. :slightly_frowning_face: I'm pretty sure it is still fast enough without the optimization, but it would be nice to get this fixed. :+1:

@zicklag can you try with fields=excerpt,custom_excerpt&formats=plaintext? I believe the fields parameter limits what's fetched from the database so if the custom_excerpt isn't included then it can't be used for the excerpt generation (this is similar to what the original bug report is about)

Ah, that did work, but now I'm also downloading the plaintext render for the whole post, which means I'm probably not saving much in the way of bandwidth.

Thanks for this bug report, saved me some time figuring out why excerpts wasn't working as a field. It is pretty annoying, though that formats=plaintext also serves the full text of the article though, especially on a JAMstack / SPA app where I am showing things dynamically via frontend pulls.
I think it's a pretty common use case where you'd want to pull down JUST the article excerpt and not the whole text.
Overall though, still loving ghost as a CMS for my site. I fought with strapi.io for awhile, but ghost is a better solution for writing articles for my site. Thanks for your hard work folks!

@ErisDS As we can not get field reading_time without getting the whole plaintext / article, I would not consider this a low priority. If we have 100 articles, show the user a list with titles, reading_times and the publication_date, we need to fetch each time 100 full posts?  It gives a serious performance hit and overload the client's mobile phones...

This issue is really related to performance. we wish it could be returned from the API. There are some areas where I just want to get the title, slug without having to get the html

@microvn getting just the title and slug is already possible, here's an example:
https://demo.ghost.io/ghost/api/v3/content/posts/?key=22444f78447824223cefc48062&fields=title,slug
This issue is related to computed fields, such as the excerpt and reading_time

@vikaspotluri123,
I mean, returning reading_time from the API will the font-end working with great performance. it will not need to do calculations to predict read time on font-end

I am reopening this issue as it has been reported again here and here.
The issue is that for calculated fields such as url, excerpt and reading_time, requesting them via fields causes an issue as we then don't have the data available for calculating the property, and so we cannot include them. For url there is already code in place to mitigate this. The same fix needs to be applied for other calculated fields. excerpt and reading_time are the two I'm aware of, there may be others.
Note, that the workaround is to also include the necessary fields for calculating the property in the ?fields= list. It's not performant but it is pretty simple.
For that reason, this bug is not something I see the core team prioritising any time soon. If you are someone who has run into this and want a performant solution instead of a workaround, a to fix this PR would be very welcome.
Note that if the issue sees no activity again stale bot will close it again in due course.

Facing the same issue. I don't think this is a small bug. I am unable to use the reading_time field on the main page where I need to show 20-30 articles. Please don't expect me to include the HTML field as well. No rationale justifies that.

I just retested this issue right now and it seems that reading_time is now broken. Am I missing something ?
I tried using the official Ghost demo API. The workaround for excerpt is still valid but no reading_time is returned. Same issue on /posts/<id> and /posts. Same result with API v3 and v4.
curl 'https://demo.ghost.io/ghost/api/v3/content/posts/605360bbce93e1003bd6ddd6/?key=22444f78447824223cefc48062&fields=title,id,reading_time,excerpt&formats=plaintext' | jq
{
  "posts": [
    {
      "id": "605360bbce93e1003bd6ddd6",
      "title": "Start here for a quick overview of everything you need to know",
      "plaintext": "Hey there, [...]. Have fun!",
      "excerpt": "Hey there, [...], colors, navigati"
    }
  ]
}

I just retested this issue right now and it seems that reading_time is now broken. Am I missing something ?
I tried using the official Ghost demo API. The workaround for excerpt is still valid but no reading_time is returned. Same issue on /posts/<id> and /posts. Same result with API v3 and v4.
curl 'https://demo.ghost.io/ghost/api/v3/content/posts/605360bbce93e1003bd6ddd6/?key=22444f78447824223cefc48062&fields=title,id,reading_time,excerpt&formats=plaintext' | jq
{
  "posts": [
    {
      "id": "605360bbce93e1003bd6ddd6",
      "title": "Start here for a quick overview of everything you need to know",
      "plaintext": "Hey there, [...]. Have fun!",
      "excerpt": "Hey there, [...], colors, navigati"
    }
  ]
}

The work around for that is to include html in formats. So the query params will look like this &formats=plaintext,html.
Thanks to @ErisDS for the explanation

Currently the workarounds are,
For reading_time -> include html in formats
For excerpt -> include 'plaintext' in formats
I am using the Client Side Content API JavaScript SDK and this is my code,
api.posts     .browse({       limit: "all",       fields: "id, title, url, excerpt, published_at, reading_time",       formats: ["html", "plaintext"],     })     .then((posts) => {       posts.forEach((post) => {         console.log(post);       });     })     .catch((err) => {       console.error(err);     });

Currently the workarounds are,
For reading_time -> include html in formats For excerpt -> include plaintext in formats
I am using the Client Side Content API JavaScript SDK and this is my code,
api.posts
    .browse({
      limit: "all",
      fields: "id, title, url, excerpt, published_at, reading_time",
      formats: ["html", "plaintext"],
    })
    .then((posts) => {
      posts.forEach((post) => {
        console.log(post);
      });
    })
    .catch((err) => {
      console.error(err);
    });

There is some difference between the reading_time returned by this and the reading time we get when we request for all the fields.

@ErisDS Can I work on this one ?

Of course if you have a solution by all means send a PR - you don't need permission :)

I actually have a WIP fix for this that didn't quite make it into code freeze. Will follow up soon.

Is there any update on this issue?
The workaround for excerpt defeats the purpose of the fields idea. I'm limiting the fields I want but still loading the entire post.


Foursquare Badge Support

Adds badge fetching and storing to Foursquare.

Woo!  Looks like you got it working!  Made one comment on the frequency. Otherwise looks great.

No problem, I left the debug value in by mistake. I bumped it to 3600.

Awwwesome!


AIRAVATA-3592 use jackson2

https://issues.apache.org/jira/browse/AIRAVATA-3592

@smarru could you review this if you time?


Define RFC to revert index changes on the REST API

After assessing the situation with indexes we concluded we will revert the changes made to the API because of it.
We need an RFC that describes these changes.

See #41


logged out when renaming facility group

Current behavior

https://jam.dev/c/3fadec84-29c4-4d63-9a7e-d41e1a63377c

https://jam.dev/c/b080d1ef-f07c-49d9-81fa-4a59d35acda1
Tried again and was unable to rename facility.

Renaming Facility Group is working fine on dev-oms. The demo-oms instance is not on the latest, which is why API is not available on that instance hence failing the rename operation.
I am unable to reproduce the 'logged out' issue when renaming the facility group. It is possible that the token expires and redirects you to the login page. Marking it as closed as of now.
@dt2patel


WIP Trying to get BlankStringDeserializer to ignore certain annotated fields

WIP Trying to get BlankStringDeserializer to ignore certain annotated fields
Try to override findDeserializer

#2191  👈
main

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

Join @nickgraz and the rest of your teammates on  Graphite


Early stopping in Hugging Face models

I am trying to enable early stopping of models derived from Hugging Face - specifically, Whisper. I am curious if ONNX models generated via Olive respect this setting in the generation config, as it seems like if I set this
If I follow the conditional generation of Whisper on Hugging Face, I get the following:
>>> import torch
>>> from transformers import AutoProcessor, WhisperForConditionalGeneration
>>> from datasets import load_dataset
>>>
>>> processor = AutoProcessor.from_pretrained("openai/whisper-tiny.en")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")

ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")

inputs = processor(ds[0]["audio"]["array"], return_tensors="pt")
input_features = inputs.input_features

generated_ids = model.generate(inputs=input_features)
>>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
>>>
>>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
>>>
>>> inputs = processor(ds[0]["audio"]["array"], return_tensors="pt")
It is strongly recommended to pass the `sampling_rate` argument to this function. Failing to do so can result in silent errors that might be hard to debug.
>>> input_features = inputs.input_features
>>>
>>> generated_ids = model.generate(inputs=input_features)
/Users/victor/anaconda3/envs/transformers-v2/lib/python3.9/site-packages/transformers/models/whisper/modeling_whisper.py:2035: FutureWarning: The input name `inputs` is deprecated. Please make sure to use `input_features` instead.
  warnings.warn(
>>> generated_ids
tensor([[50257, 50362,  1770,    13,  2264,   346,   353,   318,   262, 46329,
           286,   262,  3504,  6097,    11,   290,   356,   389,  9675,   284,
          7062,   465, 21443,    13, 50256]])

As you can see, generation stops at the <|endoftext|> token, 50256.
However, if I run the optimized Olive file in a C++ environment, I get something like:
<|notimestamps|> to see if this<|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|><|endoftext|>

The <|endoftext|> token seems to be continuously generated. I would have possibly expected the <|endoftext|> token to be generated only once, as it becomes pointless to continue generation after that. I am not sure if the ONNX model already does this, and the extra <|endoftext|> tokens are just padding?
I have branched from the Whisper example provided in the examples folder and added the early stopping parameter to the dataset, so my inputs look like this:
inputs = {
                "input_features": data['input_features'],
                "max_length": np.asarray([200], dtype=np.int32),
                "min_length": np.asarray([0], dtype=np.int32),
                "num_beams": np.asarray([1], dtype=np.int32),
                "num_return_sequences": np.asarray([1], dtype=np.int32),
                "length_penalty": np.asarray([1.0], dtype=np.float32),
                "repetition_penalty": np.asarray([1.0], dtype=np.float32),
                "early_stopping": np.asarray([True], dtype=np.bool_)
            }

Other information

OS: MacOS 13.5
Olive version: [e.g. 0.4.0 or main]
ONNXRuntime package and version: 1.16.2

Early stopping for the ort beam search op is an attribute and not input. https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#commicrosoftbeamsearch
In Olive, we already enable early stopping https://github.com/microsoft/Olive/blob/main/olive/passes/onnx/insert_beam_search.py#L145.
So, I don't know if there is anything else that can be done from Olive or during inference for it. Maybe you could open an issue in the ort repository if you cannot just ignore the special tokens at the end of the generation?
For the full olive model that also has model pre-post processing using ort-extensions, it is already enabled https://github.com/microsoft/Olive/blob/main/olive/passes/utils/whisper_prepost.py#L17.

@vymao do you have any follow up questions or comments? Or can we close this issue?

I have the exact same problem. The problem is that it seems the model does not take into account the end of sequence token id (eos_token_id) at all.

There is a new PR in the onnxruntime repo where the token_ids will be set explicitly while creating the beam search node https://github.com/microsoft/onnxruntime/pull/19509
Previously, only a few token ids were set and the rest were inferred using hard-coded offsets. This did not work for all models since the vocabs are not always the same across the different variants of whisper.
Once the PR is checked in, I will test the changes using the ort-nightly build. Will keep you posted once I get to try it out.

I am not sure if the ONNX model already does this, and the extra <|endoftext|> tokens are just padding?

Yes, this is exactly what is happening. Once the model generates the EOS token id, early stopping is detected and the output is then automatically padded with the EOS token id until the max length is reached. This is done by design because the output shape is already predefined to the max length. The extra EOS token ids can easily be removed during post-processing.

@kunal-vaishnavi thanks for the clarification! I was not aware of the padding behavior since the final model in olive uses the post processor which strips the special tokens.
Then the ort PR I linked above the PR is unrelated to this issue since we always had the eos_token_id in the beam search node https://github.com/microsoft/Olive/blob/b96fb29567ca444a16fc1350086f51011a5a75a1/olive/passes/onnx/insert_beam_search.py#L141. For some reason, I thought the offsets were calculated of another token id.

Closing issue since early stopping is already enabled.
Please see response from Kunal above for more clarification.


Bug: Image display from assets in Layout field broken

Hello,
When adding images to a layout field. If the image is selected from assets, then the preview will not display because the url is malformed. However, selecting an image directly from the right folder under the 'select image' option will have a well formed preview url.
The preview url from an image from assets will have a missing domain name:
http://storage/..... instead of http://domain.com/storage/....

I have also struck upon this problem. If we make the asset-manager strip out the leading / everything works as expected.
So here in field-image.tag it should read
$this.image.path = ASSETS_URL.replace(SITE_URL+'/', '')+assets[0].path;
I'm not really getting the whole riot-thing, otherwise I could do a pull-request


added docstring & example to iam.py

added policy examples
added docstring

merge conflict, please merge trunk and resolve conflict.

the documented filters have been tested & validated
some of the filters can/should be cleaned up a little more (no reason for used/unused filters when a boolean addition can simplify down to 1).
also noticed that the remove-keys action doesn't seem to work.
i can do that in a separate pr

the issue is that once something is in the publicly exposed interface it creates migration problems for extant users, exposed interfaces require careful thought and consideration... most of the ones your noting here are the ones you added.

added in #775 for defining a policy and mechanism to clean up up bad/obsolete filters/actions

the docstrings in here (at least for now) are valid

PR is badly out of sync. Closing this PR & will open a new one as it will probably be faster once other changes are merged.


[Feature request] Support for python 3.8+ versions.

I had gone through the packages associated with fastapi-azure-auth and found that none of them needs a python version higher then 3.8. And if we can import some of the type hints from typing instead of using inbuilt type hints(as per the new feature in python 3.9 and a few other changes, we can serve a bit wider audience with this nice package. Are you open for a PR in this context?

Hi! Yes, I'd gladly accept a pull request for this! 😊


Create ViewPropTypes

Due to the deprecation of View.propTypes, we are now supposed to use ViewPropTypes imported from react-native. This library doesn't support that yet, so this PR adds ViewPropTypes. It should resolve issues like https://github.com/RealOrangeOne/react-native-mock/issues/139 and https://github.com/RealOrangeOne/react-native-mock/issues/132. In it, I've:

Removed propTypes from being defined in View.js
Created ViewPropTypes which matches https://github.com/facebook/react-native/blob/master/Libraries/Components/View/ViewPropTypes.js minus TVViewPropTypes
I've also moved AccessibilityTraits and AccessibilityComponentTypes to a ViewAccessibility file. Let me know if this should go somewhere else.
Expose ViewPropTypes

Hi guys,
sorry for the newbie question but how to build my project with your master branch?
I tried in my project
npm install --save github:RealOrangeOne/react-native-mock#master
cd node_modules/react-native-mock/
npm install

but it must be wrong because my test still fails, I get

Cannot find module 'setupDevtools' from 'setup.js'
  at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
  at Object.<anonymous> (node_modules/react-native/jest/setup.js:30:1)

while in https://github.com/facebook/jest/issues/3822 they advise to remove the npm modules I just installed manually..

Hi guys,
sorry for the newbie question but how to load the master branch of react-native-mock in my project?
I tried
npm install --save github:RealOrangeOne/react-native-mock#master
cd nodes_modules/react-native-mock
npm install
rm -rf nodes_modules

but it must be wrong because I get this issue after:

● Test suite failed to run
TypeError: Cannot read property 'shape' of undefined

  at Object.<anonymous> (node_modules/react-native-mock/build/propTypes/EdgeInsetsPropType.js:8:33)
  at Object.<anonymous> (node_modules/react-native-mock/build/propTypes/ViewPropTypes.js:6:25)
  at Object.<anonymous> (node_modules/react-native-mock/build/components/View.js:7:20)

Thanks!

@jcharlet if I understand correctly you shouldn't be rm -rf nodes_modules in the nodes_modules/react-native-mock directory. Those are the dependencies that react-native-mock has. By deleting them, React is probably becoming undefined and hence, PropTypes.shape will not work.
Try it again without deleting the node_modules directory after installing the modules.

@newtonry great thanks! I have many warnings mentioning that I have duplicates of modules in my project and react-native-mock but it now works :) !

@newtonry great thanks! I had conflicts between react-native module of my project and react-native-mock (they use different versions). so I simply removed react-native from react-native-mock/node_modules (but still kept the rest) and it now works :) !

I am running into issues with this PR as well.
After running:
npm install --save-dev github:RealOrangeOne/react-native-mock#master
Then npm run ava
Looks like the package.json and mock.js expect a file to be present: Error: Cannot find module './build/react-native'
$ grep -H build/react-native node_modules/react-native-mock/*
node_modules/react-native-mock/mock.js:const ReactNativeMock = require('./build/react-native');
node_modules/react-native-mock/package.json:  "main": "build/react-native.js",

but there is no build/ directory relative to the files:
$ls node_modules/react-native-mock
LICENSE      README.md    mock.js      package.json src

@gardner same problem here, did you find a solution for this?

@gardner @lucascarvalho You need to build react-native-mock if you install it via npm install --save-dev github:RealOrangeOne/react-native-mock#master

cd node_modules/react-native-mock
Add the following to package.json

"babel": {
  "presets": [
    "airbnb",
    "react-native"
  ]
},

Run npm run build


I need help I am having a problem with XMLHttpRequest.

After d deploying my Laravel with inertiajs vue3 to heroku. Navigating to page this error shows up.

Havning the same problem but it occurs when I try to create a database entry with form.post. Solutions for laravel don't work.

Sorry, going to close this one I actually solved it, I have router missing syntax,...

Just wanted to add that my problem was that I had a trailing / in my form.post('/route/') which I had to change to form.post('/route') to solve it.


Support overriding the default path in ingress template

Issue:

https://github.com/rancher/rancher/issues/44160
Problem

Currently the helm chart Ingress template hard code path to /, and pathType to ImplementationSpecific. Unfortunately this doesn't work with AWS Load Balancer Controller, because if we intend the path definition here to be Prefix, we need path to be /*.
Solution

This change here would allow user to override paths based on individual need (which would match the pathType of ImplementationSpecific). It uses ["/"] as default which maintains backward compatibility
Testing

Engineering Testing
Manual Testing

Automated Testing

Test types added/modified:

Unit (helm unittest)

QA Testing Considerations

Test a values file against the helm chart with .ingress.paths defined as well as with no .ingress.paths set. In the latter case, the generated Ingress resource should by default use "/" as path, same as current behavior
Regressions Considerations

TODO
Existing / newly added automated tests that provide evidence there are no regressions:

it: should create a http rule with path (existing test) validates no .ingress.paths set
it: should create a http rule and override path (new test) validates .ingress.paths set overrides the default value

Close as this is resolved by https://github.com/rancher/rancher/pull/42014


Question about color channel order (gray background) in video demos

Hi, thanks for the great work! I am new to OpenCV and I feel a little bit confused about the channel order for your video. The visualization replicated by myself has yellow background instead of the gray background in your demos. Is there anything wrong with my color channels? Or did you manually edit those rendered videos? Millions of thanks in advance.

@DeeDive, all the simulation videos for the website were recorded with the record.save_video=True option. I just added some instructions here: https://github.com/cliport/cliport#recording-videos
Regarding the yellow background in PyBullet: I have also noticed this sometimes. I am not sure what is happening here because the rendered videos seem fine. You might have to mess around with the plane asset to fix this.

Yeah, thanks for your explanation! I find that there is no color specified in the plane.urdf. It is wired that if you turn the render=True, then the background will be yellow in the window opened pybullet. But actually, the video saver uses the same observation image... However, other objects' colors remain unaffected.

Have you tried record.save_video=True with disp=False? Do the recorded videos still have a yellow background?
Actually, I am not too familiar with PyBullet, so maybe check here: https://pybullet.org/Bullet/phpBB3/ ?


Form.Checkbox body variants are miscolored.

AC:

The form.checkbox danger and success variants should have the variant color as the body, not just the border.

This is because:
https://github.com/openedx/paragon/blob/dce246d411de779e995ac16fab77bb8abf3c3142/src/Form/_Form.scss#L452 we set the background using an image. That image does not allow 1. for easy modification. 2. for variants to work.

@adamstankiewicz  this is an interesting bug beginning to block our team. @rayzhou-bit is going to look into this, Do you have any ideas for easy solutions?

The form.checkbox danger and success variants should have the variant color as the body, not just the border.

@connorhaugh @rayzhou-bit What design spec are you referring to that shows the checkbox fill color changing based on the variant?
In the official Paragon Figma library, there is no example spec for a checked success/danger checkbox so I wouldn't necessarily call this a bug per se: https://www.figma.com/file/eGmDp94FlqEr4iSqy1Uc1K/Paragon-Design-System?node-id=5957%3A4083&t=mMUwLPqgyCHLvqFM-4
If a designer would like to propose the change described in this issue, they should also make the change in the Paragon Figma library directly as Paragon components are implemented to that spec and ideally bring it to Paragon Working Group.
Related, for consistency across input types, I would also consider whether this change should apply for Form.Radio as well:

going to reach out to design about this. Thanks Adam!

@connorhaugh Was there a decision made about this by your designer? It looks like the PR implementation was updated, but I don't see any cncrete next steps described in the Paragon Working Group Slack thread started by Jonathan.
If so, can Jonathan update update the official Figma spec for Form.Checkbox and Form.Radio to document this design decision there as well (i.e., there is no example in Figma currently of a checked success/danger checkbox)?

Agree @adamstankiewicz @connorhaugh that the danger and success variants should have the variant colors as the body, not just the border.


Bundle transaction processing should replace all local references, not just ones that start with "urn:"

Is your feature request related to a problem? Please describe.
From https://www.hl7.org/fhir/http.html#trules

A transaction may include references from one resource to another in the bundle, including circular references where resources refer to each other. When the server assigns a new id to any resource in the bundle which has a POST method as part of the processing rules above, it SHALL also update any references to that resource in the same bundle as they are processed (see about Ids in a bundle). References to resources that are not part of the bundle are left untouched. Version-specific references should remain as version-specific references after the references have been updated. Note that when building a transaction, a client can use arbitrarily chosen version references since they will all be re-assigned anyway. Servers SHALL replace all matching links in the bundle, whether they are found in the resource ids, resource references, elements of type uri, url, oid, uuid, and <a href=“” & <img src=“” in the narrative. Elements of type canonical are not replaced.

Today, the IBM FHIR Server only updates literal references when they start with the "urn:" prefix.
Describe the solution you'd like
Update all literal references in the bundle when they match a fullUrl in the bundle that is associated with a resource being POSTed.
To determine whether a literal reference needs updating or not, we should follow the guidance at
https://www.hl7.org/fhir/bundle.html#references and I believe that we already have code for this.
Describe alternatives you've considered
Acceptance Criteria

GIVEN a transaction bundle with resources A and B
AND resource A is a POST
AND resource B is a POST or PUT with a literal relative reference to the fullUrl for resource A
WHEN the bundle is posted to the server
THEN the literal reference in resource B is updated to the assigned resource id of resource A

GIVEN a transaction bundle with resources A and B
AND resource A is a POST
AND resource B is a POST or PUT with a literal absolute reference to the fullUrl for resource A
WHEN the bundle is posted to the server
THEN the literal reference in resource B is updated to the assigned resource id of resource A

Additional context

This should be taken care of in #1869. Need to double-check the implementation.

#1869 was closed, but I don't think we got this one in there.  Sound right, @punktilious ?

The scope of this issue is to replace all local references (not just those starting with the urn: prefix) in elements of type Reference only. Issue #2993 has been opened to address replacing local references in the following element types, per the FHIR spec:

resource ids
elements of type uri, url, oid, uuid
<a href=“” and <img src=“” tags in the narrative

I posted the following transaction bundle (adapted from the a smart health card example):
{
  "resourceType": "Bundle",
  "type": "transaction",
  "entry": [
    {
      "fullUrl": "resource:0",
			"request": {
        "method": "POST",
        "url": "Patient"
      },
      "resource": {
        "resourceType": "Patient",
        "name": [
          {
            "family": "Anyperson",
            "given": [
              "John",
              "B."
            ]
          }
        ],
        "birthDate": "1951-01-20"
      }
    },
    {
      "fullUrl": "resource:1",
			"request": {
				"method": "POST",
				"url": "Immunization"
			},
      "resource": {
        "resourceType": "Immunization",
        "status": "completed",
        "vaccineCode": {
          "coding": [
            {
              "system": "http://hl7.org/fhir/sid/cvx",
              "code": "207"
            }
          ]
        },
        "patient": {
          "reference": "resource:0"
        },
        "occurrenceDateTime": "2021-01-01",
        "performer": [
          {
            "actor": {
              "display": "ABC General Hospital"
            }
          }
        ],
        "lotNumber": "0000001"
      }
    },
    {
      "fullUrl": "resource:2",
			"request": {
				"method": "POST",
				"url": "Immunication"
			},
      "resource": {
        "resourceType": "Immunization",
        "status": "completed",
        "vaccineCode": {
          "coding": [
            {
              "system": "http://hl7.org/fhir/sid/cvx",
              "code": "207"
            }
          ]
        },
        "patient": {
          "reference": "resource:0"
        },
        "occurrenceDateTime": "2021-01-29",
        "performer": [
          {
            "actor": {
              "display": "ABC General Hospital"
            }
          }
        ],
        "lotNumber": "0000007"
      }
    }
  ]
}

I expected the transaction to be process and for the patient references in resource:1 and resource:2 to be replaced with the db-assigned id for resource:0.
Instead, I got a 400 Bad Request:
{
	"resourceType": "OperationOutcome",
	"issue": [
		{
			"severity": "fatal",
			"code": "invalid",
			"details": {
				"text": "FHIRProvider: Invalid reference value or resource type not found in reference value: 'resource:0' for element: 'patient' [Bundle.entry[1]]"
			},
			"expression": [
				"Bundle.entry[1]"
			]
		}
	]
}

I think what is happening is we're doing our reference type validation before rewriting the references.
I think that reference type checking is actually performed during our parse validation, which makes this a lot trickier.
We can verify this by configuring the server to skip reference type checking, but I don't think suggesting users to turn that off is a suitable solution.
We might need to make a change on this one.

If we agree that we should support transaction bundles like this one, here's the simplest solution I could think of:

do the bundle parse without parse validation
do the reference rewriting and ensure parse validation is ON when we reconstruct the objects with the new reference values

Robin brought up a different option which would be to make or parse validation smarter about what is a valid bundle...probably by making it conditional on the type of bundle (e.g. special reference type checking for bundles of type batch or transaction)

neither of those options are real simple/clean.
Bundle parse validation actually happens in the FHIRProvider.readFrom (a JAX-RS provider for the application/fhir media types).  To skip parse validation there would require some special-case logic where we introspect the uriInfo and take special action on a post the base url.  Bleh.
Making our parse validation smarter isn't a real simple win either because the ValidationSupport.checkReferenceType calls are in the individual resource types and backbone elements that have Reference data types and those methods are clueless about whether they happen to be getting parsed/validated as part of a larger batch/transaction bundle or not.
To be honest, the option I'm leaning most towards now is moving reference type checking from parse validaton to secondary validation (FHIRValidator).
@JohnTimm feel free to weigh in on this one if you're interested :-)

Before going much further with this, I decided to re-read the latest proposed wording on bundle reference resolution:  https://jira.hl7.org/browse/FHIR-29271?focusedCommentId=183020&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-183020
To me, this wording makes it more clear that if you have a fullUrl that doesn't begin with http:, https:, or urn:, then there should be no expectation of reference replacement.
I decided to ask for further clarification at
https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Allowed.20uri.20schemes.20for.20Bundle.2Eentry.2EfullUrl/near/271621146

Closing after successful QA testing with the following transaction bundle:

{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "resource:0",
"request": {
"method": "POST",
"url": "Patient"
},
"resource": {
"resourceType": "Patient",
"name": [
{
"family": "Anyperson",
"given": [
"John",
"B."
]
}
],
"birthDate": "1951-01-20"
}
},
{
"fullUrl": "resource:1",
"request": {
"method": "POST",
"url": "Immunization"
},
"resource": {
"resourceType": "Immunization",
"status": "completed",
"vaccineCode": {
"coding": [
{
"system": "http://hl7.org/fhir/sid/cvx",
"code": "207"
}
]
},
"patient": {
"reference": "resource:0"
},
"occurrenceDateTime": "2021-01-01",
"performer": [
{
"actor": {
"display": "ABC General Hospital"
}
}
],
"lotNumber": "0000001"
}
},
{
"fullUrl": "resource:2",
"request": {
"method": "POST",
"url": "Immunization"
},
"resource": {
"resourceType": "Immunization",
"status": "completed",
"vaccineCode": {
"coding": [
{
"system": "http://hl7.org/fhir/sid/cvx",
"code": "207"
}
]
},
"patient": {
"reference": "resource:0"
},
"occurrenceDateTime": "2021-01-29",
"performer": [
{
"actor": {
"display": "ABC General Hospital"
}
}
],
"lotNumber": "0000007"
}
}
]
}


feat: update network params, deployment hash and contracts version

Updated the contracts version to the latest available (support for L2, updated contracts addresses, etc).
Updated subgraph deployments to the latest non-ipfs codebase deployed (Mainnet, Goerli)
Updated network params for mainnet (epoch block length)
Added another fallback API for the graph-network subgraph on mainnet

Old, closing


chore(NODE-4250): update formatting options

Updates formatting for both js and rs.

https://github.com/mongodb-js/zstd/pull/7 needs to go in first.


3 new features

We used your tabledata script in a project and added some small features which we thought might come in handy for future users.

a pagesize selector to change the number of displayed rows dynamically
an option to use externally defined comparision functions for sorting columns ( we needed a comparision function which replaced german umlaut with corresponding vowels)
an option to use an externally defined function to call when pagesize is changed ( we used it to store the value of the pagesize)

These additions are backward-compatible, we added a small example to show how our new options are applied.

<title>Example</title>
<link rel="stylesheet" type=""text/css" href="css/datatable.css"/>

loading

Items per Page:

letter	number	stable

p	2	1

n	2.2	1

ö	22	1

o	22.2	2

n	2.2	2

Thanks for the PR, I'm glad to see that this plugin is used in concrete applications!
I'll take a look at this PR as soon as I can, but I probably won't have time before next week-end.

We forgot about one use-case.
Each row in the datatable was clickable, and led to a page where the data could be edited.
On that page it was important that the clicked row was highlighted.
The one feature that was missing, was starting the paginator on the page with the highlighted row.
The code for that use-case was still inside the datatable.js.
I removed the use-case specific code and added an option called selectedRow.
In the example I used the following options to demonstrate the behaviour:
	lineFormat: function (id, data) {
		var res = document.createElement('tr');
		res.dataset.id = id;
		if(new URLSearchParams(window.location.search).get('index') == id) {
			res.setAttribute('bgcolor', '#00ff00');
		}
		for (var key in data) {
			if (data.hasOwnProperty(key)) {
				res.innerHTML += '' + data[key] + '	';
			}
		}
		res.addEventListener('click', function() {
			window.location.href = '?index=' + id;
		}, false);
		return res;
	},
	selectedRow: function(index, data) {
		return index == new URLSearchParams(window.location.search).get('index')
	},

-- Samuel Kirschner


Create Guangyu.jpg

The profile is missing the education information. Check other profiles and fill out the education information (eg BS, MS).
The picture quality is not acceptable. See the quality and composition (relative size of the face vs size of the picture) of other profiles and submit a better picture that will fit well into the people page.


Remove need for ssh_ip flag from tls_authentication_over_grpc_test

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 57.219%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1181

Relevant Lines:
2064

💛  - Coveralls


Set email to "read"?

Hey there
I like your gem, but I'm definitely missing some way to mark an email to "read" after having received it. Please add this support.
Thank you

For me this doesn't work,
The processed mails show up again on next instance (restarting of the script) of Mail.last / Mail.first


Performance Team Meeting #1

This is going to be the new home of the @nodejs/performance team. Thank you for all your warm messages and interest towards making Node.js faster. Feel free to create issues about things you care about and ask feedback on the current task you're working.
I created a poll for the first meeting of the performance team. The agenda will be determined in the following days, but for now I appreciate if people planning to attend the first meeting comments on this issue, and fills the poll on Doodle.
Poll: https://doodle.com/meeting/participate/id/bq7M01pe

Would love to be on the team :)

I won't be able to attend additional meetings. However here is a goal: make fetch fast https://github.com/nodejs/undici/issues/1203. This also means making WHATWG Streams fast.
@RafaelGSS can likely fill you in.

I think one of the choice was today for the kickoff. Can you display / reveal when should be held this first meeting @anonrig  ?

I opened a meeting issue @sheplu: https://github.com/nodejs/performance/issues/7


CJSON version <IP_ADDRESS> reports <IP_ADDRESS>

In lua_cjson.c , CJSON_VERSION is defined as  <IP_ADDRESS> instead 2.1.07 causing print of cjson._VERSION in lua to shows the wrong version.

The same is true for <IP_ADDRESS>  release. It still contains #define CJSON_VERSION   "<IP_ADDRESS>"

The most recent version have the version string set correctly. I don't think anyone is going to go back and re-release the older versions, so I recommend sticking with the most recent version to avoid any issues with incorrect version string within the library.


Add support for 'PlugInDimmer' to Lutron Caseta component

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
Python release (python3 --version):
Component/platform:
Lutron Caseta component
Description of problem:
When using the lutron_caseta component plugInDimers are not set up in the light platform.
Expected:
PlugInDimmers should be set up as lights.
Problem-relevant configuration.yaml entries and steps to reproduce:

Traceback (if applicable):

Additional info:
originally identified here:  #6806

@tflack I separated out the issue with supporting the PlugInDimmer here.  Ill leave the other issue open incase there is something else to fix with the setup of component.

Feature requests should go in the forum.

So if @gurumitts or myself wanted to update the component to support PlugInDimmer we should submit a feature request forum post for ourselves to work on it?  Seems a bit roundabout especially considering this component "feels broken" if all you have is PlugInDimmer devices.

We have to be strict with issues because even as it is right now it is pretty much useless. By limiting it to just issues on existing functionality, we are able to keep traffic manageable.

Feature requests go in the forum
If you are going to open a PR, no need to open an issue too.
Issues not following the template will also be closed

@balloob will keep this in mind going forward.  The PR is out to add support for the plug in dimmer hardware.
Thanks


Update docs/setup/production-environment/windows/intro-windows-in-kubernetes.md

resolve: #26521

/lgtm

/approve


Added metadata for token contracts based off etherscan.io/tokens

Non-svg images are < 300x300 (9 PNG & 1 JPG)
Couldn't find image for vSlice
Many svg images are large

Looking forward to your feedback & how I can improve my submission process 😃

I've added you as a contributor to the repo so that you can push your branches to the main remote (which is required for the test suite to trigger).
The test suite caught a JSON error (yay test suite!)
Thanks for adding extra data for tokens. Like I'd said in #1, this is really useful for rendering tokens that don't follow the human-readable standard (providing methods for getting name/symbol/precision).
That said, we're probably including more metadata here than we need to. Especially if this database grows very large, we're going to want to try to keep it as lean as possible.
I'm also happy to help prune fields that we agree aren't "universally useful", but here let's discuss what fields we might actually find useful to include.
The obvious fields that we already include for ENS are:

logo
name

I think some additional fields are easily merited for tokens. To help readers know whether an item is a token, I was thinking we could have a field like erc20: true.
Other fields that are special for human-readable tokens but aren't universal to tokens (making them useful off-chain data) are:

name (duplicate)
symbol
decimals

Beyond that, I see a lot of fields here that are either specific or unique to that contract, or are really contract methods for all tokens, and so they shouldn't need to be stored in a permanent-ish file like this.  Running a quick script I found 116 unique keys here, and most of them are only used once. I think that's too many to be useful for standard consumption, so I think we should maybe enforce a strict set of permitted keys, and add it to the test suite.
How does that sound?

I've added a fix and some new tests on this branch.
Thank you so much for submitting this btw!  I just want to make sure we have it tight and clean, but this is going to be a huge boost for MetaMask's UX!

Thank you for the awesome, clear, and actionable feedback. I am on the same page about keeping things lean and will clean things up with respect to the permitted fields. Should I push up the changes from this same branch (mintheredonethat:bug/add-special-fields-for-tokens-#2) & submit another PR to Metamask:master?

Pushed up to main's bug/add-special-fields-for-tokens-#2 branch

I think the only way we can get a branch where we both get tests running on it is if you open a new PR from the master branch, so I'll close this one and open that.


unexpected keyword argument 'facility_capacities' in the p-median notebook

Hi all,
I ran through the P-median notebook. The first part works fine but the capacitated part gives me errors as below:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[35], line 1
----> 1 pmedian_capacity_from_cm = PMedian.from_cost_matrix(
      2     cost_matrix,
      3     ai,
      4     p_facilities = 8,
      5     facility_capacities=cj,
      6     name="capacitated-p-median-network-distance"
      7 )

TypeError: PMedian.from_cost_matrix() got an unexpected keyword argument 'facility_capacities'

I use a new conda environment with python=3.11, spopt=0.5.0, pulp=2.7.0 and the installations are via
conda create --name spatialopt python=3.11
conda install -c conda-forge spopt
conda install -c conda-forge pulp

Best,
Qunshan

@qszhao I just realized you say you are installing spopt via conda-forge. While we have merged the new functionality into spopt@main (#397, #399), we have not yet cut a release. We want to resolve #386 before another release and it is being especially troublesome to figure out. In the meantime you can install by:
pip install git+https://github.com/pysal/spopt.git

Thanks @jGaboardi. This is very good to know.


Re-inject a packet from forward layer to local machine

First I would like to thank you for this awesome .Net binding.
I would like to capture a tcp packet at the forwarding layer and then re-inject it with the local machine as the destination while changing also the destination port, So I've opened two windivert handles one for the network layer and one for the forwarding layer, the packets are captured on the forwarding layer but it seems they are not injected properly (I've a tcp listener on the new destination port and it is not receiving the packets nor wireshark is capturing it)
I've modified the sample coming with Divert.net by opening another windivert handle using the following code:
     networkDiversion = Diversion.Open("tcp", DivertLayer.Network, 0, 0);

And modified the open arguments for the sample to the following:
     diversion = Diversion.Open(filter, DivertLayer.NetworkForward, -1000, 0);

And on the main loop which handles the forwarding packet I've added this code:
                    if (tcpHeader.DestinationPort == 80)
                    {
                        ipHeader.DestinationAddress = IPAddress.Parse("<IP_ADDRESS>"); //Ip of the local machine
                        tcpHeader.DestinationPort = 87;
                        address.Direction = DivertDirection.Inbound;
                        networkDiversion.CalculateChecksums(buffer, receiveLength, 0);
                        networkDiversion.Send(buffer, receiveLength, address, ref sendLength);
                        continue;
                    }

So is there something wrong i'm doing?
Btw DestinationPort property of the tcp header has an issue and always sets the port to zero, it is missing a casting to short:
		void TCPHeader::DestinationPort::set(uint16_t value)
		{
			if (m_tcpHeader != nullptr)
			{
				m_tcpHeader->DstPort = System::Net::IPAddress::HostToNetworkOrder((short)value);
			}
		}

Thanks

Hey @rockvider , so where you're putting IPAddress.Parse("<IP_ADDRESS>") and saying local machine I'm assuming you're just trying to divert the packets on your own machine back to your own machine yes? For something like an intercepting proxy?
Also, thanks for the bug report! Let me know when you find something else because there probably will be, I brought this code together really fast.

So my setup involves 2 machines:
<IP_ADDRESS>: Which is doing a request to <IP_ADDRESS>:80 (for example)
<IP_ADDRESS>: the machine which has my application running with Divert.net
On <IP_ADDRESS> I receive a packet on the forwarding layer going from <IP_ADDRESS>:5000 --> <IP_ADDRESS>:80
I want to drop this packet, modify then inject it to the local machine tcp stack using a network layer Diversion to be <IP_ADDRESS>:5000 --> <IP_ADDRESS>:87
So yes what i'm trying to do is something like an intercepting proxy, I've a tcp socket listening to <IP_ADDRESS>:87 which will receive the request from <IP_ADDRESS> then send it to another remote machine which will then send it finally to <IP_ADDRESS>:80 and vice versa.
Thanks for your help and sorry for the long post.
Sure I'll report any issue I come around.

@rockvider So the machine <IP_ADDRESS> wants to intercept, direct the packet inbound on to itself, where I assume you have a socket or something listening on 87 that will read the incoming request, then write a response back out? Sorry I just want to make sure I fully grasp the issue before I start throwing suggestions around.

Exactly

I'd be helpful if I could see the full source code, I can only guess really. I'm leaning towards it being that your own Diversion filters are catching the packets after you send them to your local machine, port 87. Notice how your network layer filter is simply "tcp".
This is going to eat up both inbound and outbound TCP connections of any kind on your local machine. You need to heavily use the Address.Direction parameters plus ip/port params to decided which packets to modify and not modify properly.
Also remember that you need to have code which is providing a reverse back to the original host. Somewhere in your networkDiversion loop you're going to need to check for conditions where you need to pop that packet out and modify the IP ports and direction back to the correct values that the original host machine is expecting for a response.

Ugh, disregard the last bit about process ID.  See, coffee isn't kicking in yet. ;)

This is the netdump sample modified quickly with everything hardcoded, also I've a socket listenting on 87 and I never get any tcp connections, though I get packets coming from local machine (<IP_ADDRESS>:87) going to <IP_ADDRESS> where I've this comment: " //I DO GET PACKETS HERE??":
    Diversion diversion;
            Diversion networkDiversion;
            string filter = "true";

            try
            {
                diversion = Diversion.Open(filter, DivertLayer.NetworkForward, -1000, 0);
            }
            catch(Exception e)
            {
                Console.WriteLine(e.Message);
                return;
            }

            try
            {
                networkDiversion = Diversion.Open("tcp", DivertLayer.Network, 0, 0);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                return;
            }

            Thread thread = new Thread(() =>
            {
                Address networking_address = new Address();
                byte[] networking_buffer = new byte[65535];

                uint networking_receiveLength = 0;
                uint networking_sendLength = 0;
                IPHeader networking_ipHeader = new IPHeader();
                TCPHeader networking_tcpHeader = new TCPHeader();
                while (running)
                {
                    if (!networkDiversion.Receive(networking_buffer, networking_address, ref networking_receiveLength))
                    {
                        Console.WriteLine("Failed to receive packet with error {0}", System.Runtime.InteropServices.Marshal.GetLastWin32Error());
                        continue;
                    }

                    networkDiversion.ParsePacket(networking_buffer, networking_receiveLength, networking_ipHeader, null, null, null, networking_tcpHeader, null);

                    if (networking_ipHeader.Valid && networking_tcpHeader.Valid)
                    {
                        Console.WriteLine( "{0} - (Network layer) IPv4 TCP packet captured destined for {1}:{2} from {3}:{4}.",
                        networking_address.Direction == DivertDirection.Inbound ? "Inbound" : "Outbound",
                        networking_ipHeader.DestinationAddress.ToString(), networking_tcpHeader.DestinationPort.ToString(),
                        networking_ipHeader.SourceAddress.ToString(), networking_tcpHeader.SourcePort.ToString()
                        );

                        if (networking_tcpHeader.SourcePort == 87 && networking_ipHeader.DestinationAddress.ToString() == "<IP_ADDRESS>")
                        {
                            //I DO GET PACKETS HERE??
                            networking_ipHeader.SourceAddress = IPAddress.Parse("<IP_ADDRESS>");
                            networking_tcpHeader.SourcePort = 80;
                            networkDiversion.CalculateChecksums(networking_buffer, networking_receiveLength, 0);
                        }

                        if (networking_ipHeader.SourceAddress.ToString() == "<IP_ADDRESS>" && networking_tcpHeader.DestinationPort == 87)
                        {
                            Console.WriteLine("Intercepted packet");
                        }
                    }

                    networkDiversion.SendAsync(networking_buffer, networking_receiveLength, networking_address, ref networking_sendLength);
                }
            });

            thread.Start();

            if(!diversion.Handle.Valid)
            {
                Console.WriteLine("Failed to open divert handle with error {0}", System.Runtime.InteropServices.Marshal.GetLastWin32Error());
                return;
            }

            IPHeader ipHeader = new IPHeader();
            IPv6Header ipv6Header = new IPv6Header();
            ICMPHeader icmpHeader = new ICMPHeader();
            ICMPv6Header icmpv6Header = new ICMPv6Header();
            TCPHeader tcpHeader = new TCPHeader();
            UDPHeader udpHeader = new UDPHeader();

            Address address = new Address();

            byte[] buffer = new byte[65535];

            uint receiveLength = 0;
            uint sendLength = 0;

            string processName = "";

            uint pid = 0;

            while (running)
            {
                pid = 0;

                receiveLength = 0;
                sendLength = 0;

                if (!diversion.Receive(buffer, address, ref receiveLength))
                {
                    Console.WriteLine("Failed to receive packet with error {0}", System.Runtime.InteropServices.Marshal.GetLastWin32Error());
                    continue;
                }

                diversion.ParsePacket(buffer, receiveLength, ipHeader, ipv6Header, icmpHeader, icmpv6Header, tcpHeader, udpHeader);

                if (ipHeader.Valid && tcpHeader.Valid)
                {
                    Console.WriteLine(
                        "{0} IPv4 TCP packet captured destined for {1}:{2} from {3}:{4} {5}.",
                        address.Direction == DivertDirection.Inbound ? "Inbound" : "Outbound",
                        ipHeader.DestinationAddress.ToString(), tcpHeader.DestinationPort.ToString(),
                        ipHeader.SourceAddress.ToString(), tcpHeader.SourcePort.ToString(),
                        address.Direction == DivertDirection.Inbound ? string.Format("to process {0}", processName) : string.Format("from process {0}", processName)
                        );

                    if (tcpHeader.DestinationPort == 80)
                    {
                        ipHeader.DestinationAddress = IPAddress.Parse("<IP_ADDRESS>");
                        tcpHeader.DestinationPort = 87;
                        address.Direction = DivertDirection.Inbound;
                        networkDiversion.CalculateChecksums(buffer, receiveLength, 0);
                        networkDiversion.Send(buffer, receiveLength, address, ref sendLength);
                        continue;
                    }
                }

                diversion.SendAsync(buffer, receiveLength, address, ref sendLength);
            }

            networkDiversion.Close();
            diversion.Close();

There's a few things but honestly I'd have to rewrite a lot of your code to fix it all. You can solve the issue by drawing out the network flow. In your loop for capturing the local network traffic and diverting it to your socket, you don't change the direction of the packet to Inbound. The direction is most likely outbound, but for it to go to your socket instead, it needs to be injected as an inbound packet.
It seems you only have a condition where the packets are outbound from your socket, which seems to be correct. If its outbound from your socket, leave the direction as outbound, but modify the source and destination IP addresses and ports to match what the client is expecting. Remember you need to have two routing mechanisms, one to route outbound traffic back inbound to your intercepting proxy, one to provide the correct return route. Fixing the missing direction code and see if that help. Beyond that, stackoverflow might be a good place to post.
I'm going to leave this issue open because the fix for the bug you reference hasn't been committed yet. I'll close it once I commit. Thanks again for the report. :)

Discovered lots of issues with value conversion. Hard to diagnose this issue due to not having everything needed to replicate. Suggest re-trying from latest version and if the question isn't a bug, but rather a question of "how to", to post one StackOverflow.