fix: $env/*/private throws for client-side imports on Windows and Tailwind doesn't freak out

Closes #5723 and closes #5747.
The paths for both Vite and Rollup's module graphs needed to be normalized, along with the illegal import paths.
Because Tailwind needs to analyze basically every file in your project, Vite thinks it imports all of them, meaning it'll almost always import $env/*/private, causing our helpful module analysis to be, well, unhelpful. In dev, we now ignore non-js|ts|svelte files. Rollup doesn't have this problem (because it doesn't have to worry about HMR), so we can be stricter and just analyze all imports. I think this strikes a happy medium. "Provide armor against footguns in dev, and provide even better armor when we try to go to prod."
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[x] This message body should clearly illustrate what problems it solves.
[x] Ideally, include a test that fails without this PR but passes with it.

Tests

[x] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

is it possible to use vite's normalizePath here? https://vitejs.dev/guide/api-plugin.html#path-normalization

I was hoping someone more knowledgeable would come along and make my day.

I'm surprised none of the browser tests failed on Windows. Maybe we need one that uses $env/*/private?

The problem is that these are buildtime/dev-time errors, meaning we'd need a test project dedicated to attempting to build and ensuring the build fails. There are a number of things that'd be useful for -- I'm happy to put an implementation together, but probably not for this PR?

I'm not sure you'd need anything too special or a separate test app. If you fail the build on one of the existing test apps it should turn the CI red

I'm not sure you'd need anything too special or a separate test app. If you fail the build on one of the existing test apps it should turn the CI red

Yes, but we're trying to verify that the build does fail, and the build needs to not fail in order for the rest of the tests to be able to run. Hence, the "metaproject" that tries to build purposefully-failing projects and verifies that they actually do fail.

Oh, right. Yeah, that'd be kind of a pain to test

Rich, there's another env var bug I want to work on tonight, but it might step on this one's toes. Easier to merge this one first, if you think it looks good.

Heads up @Rich-Harris -- I went ahead and fixed the other bug in this PR as well. It was a pretty simple change.

Okay, once we see the green christmas tree list we should be GTM @Rich-Harris

actually i rescind my approval until i'm confident that the firefox tests are just flaking


Bump version to v2.24.0

Is it time for a new release yet?

I was hoping for https://github.com/rubocop/rubocop-rspec/pull/1497 to enter the release 🤷

I was hoping for #1497 to enter the release 🤷

Sure. I think my last comments on that PR can be ignored. Do you want to give it a final review?

Do you want to give it a final review?

unfortunately won’t be able to do so today, so it’s up to you. We can either delay by at least a day or release without the new cops. That PR needs rebase anyway

We’ll park the release until tomorrow or next week, both are fine.

#1497 has been merged 🎉

PR is ready for review.


Owncloud integration does not work for me.

I have two containers running on the same machine one for owncloud and one for the document server.
I started the document server with -p 8085:80. If I visit the document server via webbrowser http://ipAdress:8085 it says the service is running. But when I try to access the document server (v.4.3) via owncloud (onlyoffice integration app v. 1.0.1) I get the error "onlyoffice app not configured, please contact..."
Am I doing something wrong? From ownloud container I can ping the document server, but can not use it from owncloud.

@hpl0815 I have a same problem. Any what solution for issues?

Please try to update ownCloud/Nextcloud ONLYOFFICE integration app

Hello @hpl0815
On the current moment is released integration app 1.0.4. Please update ownCloud/Nextcloud app and Document Server to the latest versions and tell us if it helped or did not.

Hello @JohnPerkin,
yes, with the latest version it finally works for me.
Thanks!


Why submit form values via GET instead of POST?

This is a great project! But why does the generated UI submit form values as URL parameters instead in a GET request, instead of as form POST parameters? Is there a configuration option to make the UI use POST?

A GET makes it easy to hack the url. You are welcome to add a POST
configuration to the project by submitting a pull request.
Be warned that although this project works and you are not the only user,
the code itself is dreadful. And I am extremely sorry about that. If I had
time I would totally rewrite it.
On Sun, 3 Dec 2017, 01:24 Anwar Reddick<EMAIL_ADDRESS>wrote:

This is a great project! But why does the generated UI submit form values
as URL parameters instead in a GET request, instead of as form POST
parameters? Is there a configuration option to make the UI use POST?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/gogo/letmegrpc/issues/39, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABvsLXvnnyTipJfxCz1PKDjxPKlm2JALks5s8epJgaJpZM4QzhwY
.

Noted, and no need to apologize. I understand how other priorities can get in the way. And I'm actually glad to hear your response. This project has inspired me to consider a fork that uses go templates to provide more modularity. Not sure if I'll have time to pursue that though, or the POST functionality.

I would also recommend looking into getting the filedescriptor from a grpc method and generating the form dynamically in the javascript or your frontend language of choice.  I would use Elm :)

Sounds like a good idea. I'm at a Typescript shop though so that would probably be my goto frontend.

fair enough :)


Create co2e data file

Situation
In order to handle calculations we will need a large data blob that will hold the coefficents for each cloud provider/region/resource and which we will use to calculate co2e. This data should be structured and should be stored in such a way that we dont need to load data that is not relevant.

Maybe we do yaml?


Dredd and Examples

Hello all,
I am trying to use Dredd for my integration/api tests: http://dredd.org/
Dredd takes a swagger.json file as input and will run rest requests on all endpoints and check the output values. However for this to work properly I need to be able to provide examples for each endpoint in my swagger définition.
Example of an error I am currently facing: Required URI parameter 'id' has no example or default value.
My endpoint: [HttpGet("{id}"]
Do you know how I could provide an example (I do not want to use a default value) for my endpoint ?
Is it possible with an annotation ?
Regards,
Pierre

You can add or update generated parameters with an operation processor:
https://github.com/RSuter/NSwag/wiki/Document-Processors-and-Operation-Processors
I think you can define defaults with the [Default(5)] attribute... not sure if this works for params though


Update twitter.py

Applications submitted to Twitter's privileged list can now obtain user e-mail address. Fix for #825

up

I've merged this manually and moved the querystring parameter in the URL to the params option in get_json.
Thanks!


Update San Diego County coverage and details

This PR improves the San Diego data source:

Corrected source to say that the data covers the county of San Diego (rather just than the city)
(per the metadata file, ADDRJUR specifies the jurisdiction within the county [city or unincorporated area name] )
Renamed file to denote county coverage
Added US Census coverage data (eg, geoid)
Corrected attribution
Added link to specific license/terms
Added link to metadata in the notes field

cc @palewire since he did a little San Diego work in #743 that had changes related to this but which were not merged

The test failure looks wrong on our end, I’ll try to fix it. Sorry about this!

Actually, I think this might be my bad — looks in the documentation here https://github.com/openaddresses/openaddresses/blob/master/CONTRIBUTING.md#optional-tags that it should be singular "note" and it's enforced in the test here: https://github.com/openaddresses/openaddresses/blob/master/test/sources.js#L47

Yep, just verified that. I’m improving the language in the test output to make this more obvious.

Agree, thanks for that! This should now be good to go.

:+1:

It’s been included in last night’s run: http://data.openaddresses.io


Devel

Lots of fixes and changes. Including #39  =)

Merge with lots of help from others. =) Thanks!


Request protocol version

Property protocolVersion of Request defaults to 1.1. This change makes it change to the actual request protocol version. Is str_replace('HTTP/' sufficient?

:-1: in current form
The 'host' header isn't supported by HTTP/1.0 so you need to make sure you strip it in that scenario.

I don't understand what problem you are having.
The protocol is set via the Environment which merges the information from $_SERVER, so if it's set in $_SERVER, then we pick it up.

@akrabat The protocol version is hard-coded to 1.1 in the message class (I think).
I don't actually think this is the wrong approach. The PSR-7 specification is only for the representation of HTTP/1.1 messages, there are features of it that are incompatible with HTTP/1.0 - so I think it's dangerous pretending to support it.

Although that said, you can still do withProtocolVersion() :/

It's not very hardcoded! https://github.com/slimphp/Slim/blob/3.x/Slim/Http/Message.php#L87-L101

@AndrewCarterUK Yes indeed. That's why I thought it needed to be implemented. Also, this comment is from the MessageInterface: The version string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
@akrabat when I delete the lines of code I added in the constructor of Request the test will fail..That means the protocolVersion is never overwritten with the version in the actual request

Reading this I think @abbert is right - I can't see where the protocol version is extracted from the environment?

Yeah - I understand the issue now.

Thanks very much for this @abbert!

No problem :)


How to stub with webmock

This is more my ignorance than an issue.
I am currently using graphql-client but graphlient's block syntax and info on testing make me want to switch over, but I am still not sure how to test my code.
I have a deployed GraphQL server. I can run a query in Postman and get a JSON response.
I copied that response into a string.
I want to consume that endpoint in my rspec test but I want to use the canned JSON response I copied.
stub_request(:post<EMAIL_ADDRESS>  .to_return(status: 200, body: canned_body, headers: {})

def canned_body
  '{ "data": {"some": "json"} }'
end

This errors:
Schema = GraphQL::Client.load_schema(HTTP)
KeyError: key not found: "data"
from /Users/bgreeff/.rvm/gems/ruby-2.6.1/gems/graphql-1.9.6/lib/graphql/schema/loader.rb:16:in `fetch'

One issue is that my stub runs after Schema = GraphQL::Client.load_schema(HTTP)
This seems like a design flaw, making my test improbable.
I see your example
stub_request(:post, url).to_return(
      status: 200,
      body: DummySchema.execute(GraphQL::Introspection::INTROSPECTION_QUERY).to_json
    )

I am guessing this is because there are actually 2 requests to the server, 1 to load the schema, but I have no idea how this works.
Can you provide a little more info on how I should construct my test please.

I bit the bullet & installed graphlient, and it seems my first stub is insufficient.
WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: POST http://example.com/ with body '{"query":"query IntrospectionQuery {\n  __schema

it does seem that my new non-static code:
      client =<EMAIL_ADDRESS>      response = client.query(my_query, { published: true })

Does in-fact produce an IntrospectionQuery.

The headers contain:
headers: {
       	  'Accept'=>'*/*',
       	  'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
       	  'Authorization'=>'Basic dXNlcjpwYXNzd29yZA==',
       	  'Content-Type'=>'application/json',
       	  'User-Agent'=>'Faraday v0.15.4'
           }).

I am using http basic, but the request made by faraday doesnt have the auth in the url.
If I add:
      stub_request(:post, 'http://example.com').to_return(
        status: 200,
        body: DummySchema.execute(GraphQL::Introspection::INTROSPECTION_QUERY).to_json
      )

NameError:
       uninitialized constant DummySchema

Where do I get this DummySchema or am I being a dummy?

It's probably the case that the client is trying to load the GraphQL schema over network, rather than from the file system. Try setting the schema_path on client creation:
Client.new(url, schema_path: 'config/your_graphql_schema.json')

I tried to dump the schema:
url =<EMAIL_ADDRESS>[7] pry(main)> client = Graphlient::Client.new(url, schema_path: 'config/your_graphql_schema.json')

=> #<Graphlient::Client:0x00007fa82c2c3388
 @options={:schema_path=>"config/your_graphql_schema.json"},
<EMAIL_ADDRESS>[8] pry(main)> client.schema.dump!

Graphlient::Errors::FaradayServerError: 785: unexpected token at 'Temporary Redirect'
from /Users/bgreeff/.rvm/gems/ruby-2.6.1/gems/graphlient-0.3.7/lib/graphlient/adapters/http/faraday_adapter.rb:21:in `rescue in execute'
Caused by Faraday::ParsingError: 785: unexpected token at 'Temporary Redirect'
from /Users/bgreeff/.rvm/gems/ruby-2.6.1/gems/json-2.2.0/lib/json/common.rb:156:in `parse'
Caused by Faraday::ParsingError: 785: unexpected token at 'Temporary Redirect'
from /Users/bgreeff/.rvm/gems/ruby-2.6.1/gems/json-2.2.0/lib/json/common.rb:156:in `parse'
Caused by JSON::ParserError: 785: unexpected token at 'Temporary Redirect'
from /Users/bgreeff/.rvm/gems/ruby-2.6.1/gems/json-2.2.0/lib/json/common.rb:156:in `parse'

The url needs to be a real URL otherwise the client can't download a schema. Or did you replace it with an example URL to post it here?

Yea I replaced it with an example, but I had http instead of httpS. - This now works a dream. Thanks very much for the help.
I am still a bit confused about schemas.
I guess the old graphql-client code is loading the schema at class load time, - and will refresh the schema on a server restart / deploy etc.
Now I had written the schema to disk, it will need to be manually refreshed. I might need to add a rake task for this. I don't have enough experience to know the trade-offs yet.
Are these schema requests actually necessary? - people are going to ask questions in standup.

Good place to start I guess - https://graphql.org/learn/introspection/

This endpoint is going to be under very light load, - my gut feel is that I would prefer to somehow just bypass/ ignore this introspection query in my rspec, and have the introspection just run every time on production (ie not be cached).

Are these schema requests actually necessary?

The schema is the key concept of GraphQL that makes developers productive by adding editor suggestions, early type checks, etc. If you are not using GraphQL schema, introspection query, etc in development you are actually dropping the whole point of GraphQL.
On the other hand, in production, loading a schema is not strictly necessary (assuming you test it with the schema in development and test) since all the client does is to just make a POST call. However, making it possible would require changing how graphql-client operates internally and it might not be that beneficial since all it saves is a few seconds that only happens once.
Whether or not to download a schema or load it from the disk it all up to you, but at least you can't disable it due to how graphql-client works.

I see. thanks for the info. - I guess I need to read the graphlient code to see if I can get the schema to load at class load (statically), but somehow stub this request in tests (so its ignored). -Although introspection is great for /graphiql its not useful as-far-as I can see on production.
At this point though I am not sure under what circumstance we will need to refresh a stale schema on disk, might be a non-issue.

Where do I get this DummySchema

In this project we have both, but for a client app I think we need a better example.
Generally, I think you want to refresh the schema every time it changes. Which you obviously don't control, but hopefully the server doesn't change the schema nilly willy. I recommend doing the same thing in production and development, either have a task that refreshes the schema locally and commits it, then loads, or always load dynamically.
@brentgreeff Would you be so kind to contribute to the README on the testing side for the next person?

@dblock - sorry just noticed this now.

Would you be so kind to contribute to the README on the testing side for the next person?

Yes, I will take a look.

@dblock - Sorry I have not come back earlier, but I no longer have the work laptop I did the work on. I am a bit vague on the details now. I will try come back to this when I touch graphQL again.


Switch New Relic to Environment Variables

Description
Use the new environment variables implementation to manage new relic variables.

Alternatively, we can create a new "app" in New Relic if you'd prefer to set it and forget it.


Error: Assertion failed: isValid is not true

I keep getting this.
Exception has occurred.
"Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/engine/engine/html/path/path_ref.dart:898:12
isValid
is not true
at Object.throw [as throw] (http://localhost:42043/dart_sdk.js:5067:11)
at Object.assertFailed (http://localhost:42043/dart_sdk.js:4992:15)
at _engine.PathRef.shiftedFrom.debugValidate (http://localhost:42043/dart_sdk.js:161437:31)
at new _engine.PathRef.shiftedFrom (http://localhost:42043/dart_sdk.js:161574:10)
at new _engine.SurfacePath.shiftedFrom (http://localhost:42043/dart_sdk.js:159586:21)

I"m getting this in your example project too.
Try flutter web with html renderer
index.html:

I'm can't reproduce this with the example project:

flutter run -d chrome --web-renderer html

make sure your browser and flutter are up to date.


Clarified a pitfall with --merge-paths

Clarified a pitfall with a merge operation, should a node be renamed.

@stefan-egli , any chance of merging this PR? It has been in my queue for a while.

@sbluhm I believe this pitfall is only true for referenceable nodes. Other nodes don't have a UUID property, and thus are not subject to the same uniqueness constraint. Maybe you can verify and include this detail as well?

@jsedding , thank you for your pointer. This indeed applies only to UUIDs. I just verified it. Let me update my statement and re-submit.

@jsedding do you think we should incorporate this PR?

@stefan-egli yes, I think this is helpful information and should be applied!
@sbluhm sorry this fell between the cracks!


[BUG] Llama-7B RLHF occur OOM on  8 * H100

Describe the bug
I followed tutorial of  Llama-7B * Llama-7B RLHF and occur OOM on 8 * H100.
To Reproduce
Steps to reproduce the behavior:
Hardware: 8 * H100 (1 node)
ChatLearn: e1685fa0157a6ceba9c6c72dd72100ad44dd941b
export DATASET_PATH=$DATASET_ROOT/alignment/train.jsonl

cd ${CHATLEARN}/examples/megatron/

export model_size=llama2-7B
export tokenizer_load=/gpfs/public/infra/zhangrb/ChatLearn_research/models/Llama-2-7b-hf

POLICY_LOAD=/gpfs/public/infra/zhangrb/ChatLearn_research/models/Llama-2-7b-mg-lm \
REWARD_LOAD=/gpfs/public/infra/zhangrb/ChatLearn_research/models/Llama-2-7b-mg-lm \
REWARD_LOAD_ITERATION=1000 \
TOKENIZER_MODEL=/gpfs/public/infra/zhangrb/ChatLearn_research/models/Llama-2-7b-hf/tokenizer.model \
bash scripts/train_rlhf_llama.sh

Expected behavior
No OOM
Screenshots

Additional context
log:
log_0.log

It works. Thanks a lot.


Add Support for Class Static Initialization Blocks

This proposal is currently at stage 3 and is supported by default in Chrome for desktop and android  v91+.

The only criteria JSHint has for implementation of language proposals is advancement to stage 2 in the standards process, so "class static initialization blocks" is certainly in-scope.
As for my own efforts, I'll be prioritizing it behind features that are further along in the process. I'll gladly review patches, of course!


Several Operator methods have been modified in PennyLane master

Describe the bug
In the recent PennyLane master commit, several of our operator methods have been modified.
When creating operators:

Matrices: Operators should now define the static method compute_matrix() rather than the class method _matrix()

Decompositions: Operators should now define the static method compute_decompositions() rather than the static method decompositions().

This will require a small re-naming in https://github.com/aws/amazon-braket-pennylane-plugin-python/blob/main/src/braket/pennylane_plugin/ops.py.
When accessing operator information:

Operator.matrix will raise a deprecation warning - use qml.matrix(op) instead
Operator.eigvals will raise a deprecation warning - use qml.eigvals(op) instead
Operator.terms is now a method, Operator.terms().

This will require updates in the following places:

https://github.com/aws/amazon-braket-pennylane-plugin-python/blob/fd5f5f04292840b8fc5e9abfa73c521bcd4bb547/src/braket/pennylane_plugin/translation.py#L392

test/unit_tests/test_ops.py

test/integ_tests/test_apply.py

src/braket/pennylane_plugin/translation.py

Thanks for the heads up @josh146! A couple of questions:

When is the Pennylane release with these changes scheduled to go out?
Are there any tests that Pennylane recommends the plugin integrators to execute, which would help ensure that they have migrated all functionality properly?

No worries @kshitijc!

When is the Pennylane release with these changes scheduled to go out?

The current release is planned for March 15, and we're happy to help out in any way.

Are there any tests that Pennylane recommends the plugin integrators to execute, which would help ensure that they have migrated all functionality properly?

Yes! If you install the master branch of PennyLane, there are device integration tests available under the CLI utility pl-device-tests.
Assuming that the main branch of PL-Braket is installed, the development version of PL-Braket can be tested against the development version of PennyLane like so:
$ pl-device-test --device=braket.local.qubit --tb=short --skip-ops --shots=20000

where --skip-ops just instructs the integration test to skip any tests using operations unsupported by the device.
At the moment, the device integration tests are showing the current failures:
FAILED pennylane/devices/tests/test_measurements.py::TestSupportedObservables::test_supported_observables_can_be_implemented[device_kwargs0-Hamiltonian]
FAILED pennylane/devices/tests/test_measurements.py::TestHamiltonianSupport::test_hamiltonian_diff[device_kwargs0]

which directly relate to the fix needed in src/braket/pennylane_plugin/translation.py.
This is the only fix needed in the main codebase; the other changes simply relate to the plugin unit tests.

No problem @kshitijc! We run these device integration tests daily here: https://github.com/PennyLaneAI/plugin-test-matrix

Some other changes that have since been made in master:

pennylane.measure has been renamed to pennylane.measurements due to an unfortunate naming clash.

pennylane.ops.qubit.four_term_grad_recipe has been removed, as we no longer rely on hardcoded gradient recipes, and instead use the general shift rule. The four term grad recipe can thus be computed programmatically:
>>> op = qml.CRX(0.5, wires=[0, 1])
>>> coeffs, shifts = qml.gradients.generate_shift_rule(op.parameter_frequencies[0])

@virajvchaudhari can this issue be closed now that https://github.com/aws/amazon-braket-pennylane-plugin-python/pull/91 has been merged?

We have addressed the required changes for PL-0.22 with complete tox coverage for PL-Braket plugin in this PR https://github.com/aws/amazon-braket-pennylane-plugin-python/pull/91.


chore(ffe-formatters): Fix non-deterministic tests

On some environments the tests for formatPercentage with negative numbers fail because the minus sign is represented by different characters (char code 45 or 8722).
Fixes #23

I ran Node v9.6.1 on my machine with en_US locale, and the test passes just fine. It also passes on CI. I'm unsure we want to add this workaround if it's only happening on your machines. It seems like fixing a symptom rather than a root cause, but I understand it's frustrating.

It happens on a company issued machine and another system, currently important for our build pipeline. Everything was fine up to now and I predict this will pop up somewhere again.
And this is a really hard to spot issue. The test runner output is: Expected value to be: "-98,765 %" Received: "−98,765 %". This change will save anybody running into this message in the future a lot of confusion and time.
Further, I disagree that this a symptom of a problem. Somewhere inside node's implementation of Number.toLocalString some component thinks it should use this unicode character instead of one from the lower ascii table. Even though I'm not a typography expert, my gut feeling tells me a character called "minus sign"—and − as html entity—is a as valid prefix as "hyphen-minus". It might even be the better option. So this change is not a work around around a bug.


Error on movement.js

I can't run

You are not using the movements class correctly or your mcData is outdated.

this is a code

maybe you see error in my code?

bot.regestry is not a thing so mcData will be undefined. You need to wait for the bot to spawn before importing mcData. Look at the pathfinder examples.

I'll take a look now.

No, it didn't.

You are still doing it wrong you need to wait for the bot to spawn before importing minecraft-data. bot.version will be undefined before the bot spawned. Look at the pathfinder examples and use those.

When I try to use examples, it still does not start

What version is the server you are trying to join? If it is a server between version 1.8 and 1.18 then try running npm update to update minecraft-data.

1.18.2 ,

i updated , but not work

oops, also tested on 1.16.5

This is an issue with your setup. The errors about 'Cannot read property of of null' is because you are using an old version of mcData. The last screenshot has an error because app.start() is not defined.


⚠ Roblox Devforum has degraded performance

In c36e63d, Roblox Devforum (https://devforum.roblox.com) experienced degraded performance:

HTTP code: 504
Response time: 10273 ms

Resolved: Roblox Devforum performance has improved in f5c74e1.


Modifying request body in Zuul pre filter not working

In my app I am using netflix zuul to route a request from a microservice (gateway) to another. The requests are being routed fine but I also want to introduce some parameters in the request body before it is routed to the appropriate microservice. For this I am using Zuul pre filter like this.
public class SimpleFilter extends ZuulFilter {

    	private static Logger log = LoggerFactory.getLogger(SimpleFilter.class);

    	@Override
    	public String filterType() {
    		return "pre";
    	}

    	@Override
    	public int filterOrder() {
    		return 1;
    	}

    	@Override
    	public boolean shouldFilter() {
    		return true;
    	}

    	@Override
    	public Object run() {

    		try {
    			RequestContext context = RequestContext.getCurrentContext();

    			InputStream in = (InputStream) context.get("requestEntity");
    			if (in == null) {
    				in = context.getRequest().getInputStream();
    			}

    			String body = StreamUtils.copyToString(in, Charset.forName("UTF-8"));

    			// body = "request body modified via set('requestEntity'): "+ body;
    			body = body.toUpperCase();
    			context.set("requestEntity", new ByteArrayInputStream(body.getBytes("UTF-8")));

    		} catch (IOException e) {
    			log.error(e.getMessage(), e);
    		}

    		return null;
    	}

    }

For now I am just trying to change the body to upper case but the microservice to which this request is routed doesn't receive the modified body (upper case). Instead it receives the original one. Am I doing something wrong. Any help would be appreciated. Thanks !!

Please don't post your question in multiple places.  We will use SO. https://stackoverflow.com/questions/45412149/modifying-request-body-in-zuul-pre-filter-not-working


No documentation on how to get connector logs

Describe the bug
Lets say you start a connector. It isn't working for some reason. How do you get detailed logging of what is happening? Same goes for functions. There are files on the filesystem, but you have to look at the running process to see what they are. With k8s this is probably even harder.

@tuteng  as discussed offline, could you please write a how to debug Pulsar connector guide (includes getting connector logs)?
You can take Pulsar Function Debug Guide for reference:

https://pulsar.apache.org/docs/en/next/functions-debug/

https://mp.weixin.qq.com/s/3Iz5_GF8V_4gsvVRduophQ

@tuteng Just a soft reminder: you are working on writing the How to Debug Pulsar Connector Guide these days, could you please add how to get connector logs to the guide? Thank you

@ivankelly @tuteng @sijie
Done in https://github.com/apache/pulsar/pull/5041, so we can close this issue.


Highlighting seems broken

It looks like the syntax highlighting in some parts of the file got messed up. Changing the color scheme doesn't fix it, and I've no idea if this was caused by an update or another plugin. Here are some examples:

I'm running the release Neovim version 0.6.0-1 on Linux.

If you have treesitter playground, you should check the tree but I am pretty sure it is due to some parsing errors (due
to this parser and not your file).
I don't think the colon are supported in autocmd (again just on this parser) and that's probably the issue with the
first file.

The colon seems to be a problem indeed.
I am going to add some checks for that and correctly support it.

I have noticed some oddities as well:
Here filetype breaks the highlighting.

Here colorscheme breaks the highlighting.

@vigoux Do you think you can add those issues in the project todos ? I really like the parser and want to help and I think having a nice organized list of things would help me a lot to know from where to start.

Yep, I can do that.
Could you join the nvim-treesitter Zulip so that we can chat together too @Fymyte ?

For a quick follow up, support for colon before command has been added in commit 3b69c99

Hello,
I've have the same problem when it comes to highlighting:

This should have been fixed in latest master.
I'll be adding a few test cases just to be sure.

@BlueDrag0n Most built-in vim commands aren't understood by the parser yet. Most of the tab, buffer, window, and tag related commands aren't understood (like  :tabn[ext] :tabp[revious] :bn[ext] :bp[rev] :sp[lit] :vert[ical] etc).
@vigoux Is this something that's on your radar? Do you think the parser should explicitly support every known built-in command or should there be a "fallback" rule that will match :[a-zA-Z0-9]+ and assume there are no args if its not a command explicitly supported?

That's a good question.
In an earlier version, the parser parsed unknown commands as some kind of "default" command with "sane" parsing.
Unfortunately, nothing is simple with VimL, and it ended up not working at all in most cases, leading to messed up ASTs in many cases.
That was a long time ago though, so it might be good to reconsider this, so that we make integration of the parser easier for the end users.

vertical has been added in latest master.
We still miss buffer and tab related commands.


Ping works from guest(linux) towards internet but Curl/Wget doest not

Describe the issue
I have a very weird networking issue on the guest side, so far all the things looks good and ping  works but curl / wget doesnot works ( network mode is in shared network mode)
I have created a vm ubuntu 22.04 x86_64 which using the official iso image.
After installation and reboot i get the ipaddress from dhcp
and on Guest i see following
routes
 ip r
default via <IP_ADDRESS> dev enp0s1 proto dhcp src <IP_ADDRESS> metric 100
<IP_ADDRESS>/24 dev enp0s1 proto kernel scope link src <IP_ADDRESS> metric 100
<IP_ADDRESS> dev enp0s1 proto dhcp scope link src <IP_ADDRESS> metric 100

I am able to successfully login form hostVM to the guest VM using ssh
ssh<EMAIL_ADDRESS>Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-60-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu May 25 02:20:20 PM UTC 2023

  System load:             0.92626953125
  Usage of /:              41.1% of 13.16GB

I am able to ping towards internet
ping goole.com
PING goole.com (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from 217-160-0-201.elastic-ssl.ui-r.com (<IP_ADDRESS>): icmp_seq=1 ttl=52 time=57.8 ms
64 bytes from 217-160-0-201.elastic-ssl.ui-r.com (<IP_ADDRESS>): icmp_seq=2 ttl=52 time=60.1 ms
64 bytes from 217-160-0-201.elastic-ssl.ui-r.com (<IP_ADDRESS>): icmp_seq=3 ttl=52 time=53.9 ms

However i cannot make Tcp based connection either via telnet or via curl
telnet goole.com 443
Trying <IP_ADDRESS>...
telnet: Unable to connect to remote host: Connection refused

curl -v https://www.google.com
*   Trying <IP_ADDRESS>:443...
* connect to <IP_ADDRESS> port 443 failed: Connection refused
*   Trying 2a00:1450:400f:802::2004:443...
* Immediate connect fail for 2a00:1450:400f:802::2004: Network is unreachable
* Failed to connect to www.google.com port 443 after 51 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to www.google.com port 443 after 51 ms: Connection refused

On my host ( mac os i see this bridge interface)
bridge100: flags=8a63<UP,BROADCAST,SMART,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
	options=3<RXCSUM,TXCSUM>
	ether be:d0:74:94:6f:64
	inet <IP_ADDRESS> netmask 0xffffff00 broadcast <IP_ADDRESS>
	inet6 fe80::bcd0:74ff:fe94:6f64%bridge100 prefixlen 64 scopeid 0x1c
	inet6 fdea:8a95:8314:ecb0:10ec:e47d:9e71:f561 prefixlen 64 autoconf secured
	Configuration:
		id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
		maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
		root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
		ipfilter disabled flags 0x0
	member: vmenet0 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 27 priority 0 path cost 0
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active

Configuration

UTM Version: 4.2.5
macOS Version: 13.4 (22F66)
Mac Chip (Intel, M1, ...): M1

Debug log
debug.log
Additionally , i am unble to make any changes in network mode via UI. ( ie can see all the 4 option ) but only can select shared network mode.

Weird.
I have the same configuration: Ubuntu 22.04LTS x86-64 running under UTM 4.2.5 on macOS 13.3 M1.
When I do curl -v https://www.google.com from the terminal it spews a lot of (javascript) vomit which is actually the contents of the site.
Try sudo apt update && sudo apt update and reinstalling curl.

Thanks for testing,
For me , Since it does not have internet access both sudo apt update && sudo apt update fails.
seems like your macOS is at  13.3, and mine is at 13.4 could that be an issue..
Let me check in another mac of mine to confirm it.


Synapse Release 1.2.0

@wenjiefu is added to the review. #Closed

@RodgeFu is added to the review. #Closed


added AI/ML API record

added AI/ML API record

[x] My submission is formatted according to the guidelines in the contributing guide
[x] My addition is ordered alphabetically
[x] My submission has a useful description
[x] The description does not have more than 100 characters
[x] The description does not end with punctuation
[x] Each table column is padded with one space on either side
[x] I have searched the repository for any relevant issues or pull requests
[x] Any category I am creating has the minimum requirement of 3 items
[x] All changes have been squashed into a single commit

Thank you.


Close side channels in DSA and ECDSA.

Another side channel against DSA and ECDSA has been identified.  This patch addresses it.
The problem was discovered by Samuel Weiser who created the patch.

I suppose this should be applied also to 1.1.1 branch?

Yes.

Shall we add a comment about truncation? The original bn_wexpand does nothing if words < dmax. The new bn_wexpand_top always sets top to words, thus allowing to strip existing upper words. Maybe 'expand' is misleading here and bn_force_top would be more appropriate.

This is all more symptoms of #6640. It may bandaid for some of the side channels here (I have not looked carefully so I have no views there), but it does not fix the root cause. It merely moves it around. Here, bn_wexpand_top leaks the old value of bn->top. Whatever initialized bn->top likely did so too. The fix is to stop storing secrets in bn->top.
I would also caution that much of the BIGNUM library does cannot survive non-minimal BIGNUMs. One must be very careful when introducing them, since the safer path in #6640 hasn't been followed. For instance, 576129cd72ae054d246221f111aabf42b9c6d76d was a consequence an unexpected non-minimal value. This PR calls BN_add after bn_wexpand_top, but BN_add may call BN_ucmp in some codepaths, which assumes minimal representation. Those codepaths are hopefully unreachable here, but it is an example of the fragility of this strategy.
https://github.com/openssl/openssl/blob/master/crypto/bn/bn_lib.c#L567-L569
It also calls dsa->meth->bn_mod_exp on k, which is a user-supplied callback. An application which used DSA_meth_set_bn_mod_exp and then passed k into a random BIGNUM function will likely break under this PR. (Although DSA_meth_set_bn_mod_exp should probably simply be removed.)
Given the number of times this flavor of issue has come up, I would suggest it's time for OpenSSL to work on fixing the root cause. It is doable. After finally figuring out how to do it sanely (which is already written up in #6640), it took me maybe a month or two. This will put OpenSSL on more solid footing, so it can properly address these problems directly, rather than shifting them around each time the problem is rediscovered.

So I think we should properly fix things. But it's doubtful we'll be able to do that in all branches, so we might need to bandaid the other branches.

Properly fixing BN's would be the path I'd choose.

With BIGNUM fixed, none of these BN_add hacks are needed at all. The leaks are a symptom of the bn_correct_top problem, in code which only exists to work around the bn_correct_top problem. It's very circular. :-) The right way to do EC scalar multiplication and DSA signing setup is the simple one: use a fixed-width (relative to group) representation of the scalar, and do the multiplication/exponentiation with fixed windows (relative to group) of that scalar. There's no need to add copies of the group order.
Plus this "bandaid" is questionably backwards-compatible. See note about DSA_meth_set_bn_mod_exp, which I would recommend getting rid of for 3.0.
#6640 details a possible strategy, with a number of incremental steps. You all just need to decide whether you like the strategy and, if so, start working at it the incremental steps. There will always be an older branch. That shouldn't stop you from fixing the problems in the library.

Closing this, it seem that fixing BN properly is the desired path rather than applying band aides.


allow pre-configuring settings.xml

The UI has the nice feature that one can save and restore the settings (region types/colors, autoseg/import switches) via XML file.
It would be very helpful if this was also pre-configurable in larex.config or via some other mechanism at start-up time. Novices would get to see what they should right away, and experts don't have to waste time for loading their settings when they start a new session (which might happen often).

Wait! This feature does not save any of the aforementioned settings, only the autoseg parameters (but not even whether autoseg should run).
Am I really supposed to configure my region colors and auto-seg/auto-import switches each time I open a document?


Bump to latest sqlite3

I'm testing building latest versions of sqlite3. We currently ship with what comes with debian: version 3.34.1.  Questions:

does my build work on all version of the Raspberry Pi?
Is the latest sqlite backwards compatible?

Ideally it's a drop-in replacement

Python is still linked to the old version:
 python -c "import sqlite3; print(sqlite3.sqlite_version)"

and it requires a lot more effort to get it to use a different one: https://sqlite.org/forum/info/233dca76521f207b
Since we almost exclusively use sqlite via Python, this is is a fullstop.


The pretrained ckpt of spformer.

Hello, I would like to know where the pretrained ckpt of spformer you are using comes from, can you share it, thank you very much!

To pretrain the sparse U-net backbone of SPFormer, we add the semantic head and offset head (as in SoftGroup or ISBNet) and train it with the pseudo labels. You can find the checkpoint here.


Addresses SpiceDB issue 1072

According to SpiceDB Issue 1072, --rm  in the shared command for a Docker based installation is causing persistence issues with the SpiceDB docker container.

I have read the CLA Document and I hereby sign the CLA


Request for Java7

I would like to request support for java7 containers; some of the forge servers and plugins did not support java 8+
It can be a one-time spin-off of the java8 container (FROM openjdk:7u211-jre-alpine). I have a PR open: on Custom Server Packs; which would be great to make it onto a java7 branch.
In the future, I would not mind if it was not supported anymore, because these servers probably will not change the plugins. Plus the feature base you have currently for setting up containers is impressive and works very well for older servers;

I can definitely add support for that. I'll wait to confirm my feedback on your PR but will be quick to add after that.

I went ahead and created/pushed itzg/minecraft-server:java7. Verified using:
docker run --rm --entrypoint java itzg/minecraft-server:java7 -version
java version "1.7.0_221"
OpenJDK Runtime Environment (IcedTea 2.6.18) (7u221-2.6.18-1~deb8u1)
OpenJDK 64-Bit Server VM (build 24.221-b02, mixed mode)

Any chance this will be added?


Add parameter base_image and addon_image to BUILD_PLATFORMS

Fixes #145
Adds new parameters in BUILD_PLATFORMS referred as base_image and addon_image with the format image:tag
make push-multiarch BUILD_PLATFORMS="linux amd64; windows amd64 .exe nanoserver:2019 servercore:2019;

List of changes:

made /bin/bash the default shell instead of /bin/sh, I needed to do this to do string addition and indexOf
updated the cloudbuild docker image to a newer version that has 20.10 and this fix: https://github.com/docker/cli/issues/2722#issuecomment-693395773
docker build with multiple build platforms with different base images
created a docker manifest with info about all of these builds including info about the combinations of arch, os and os-version

Output of some snippets used here:
build_platforms=build_platforms="linux amd64; linux ppc64le -ppc64le; linux s390x -s390x; linux arm64 -arm64; windows amd64 .exe nanoserver:1809 servercore:ltsc2019; windows amd64 .exe nanoserver:1909 servercore:1909; windows amd64 .exe nanoserver:2004 servercore:2004; windows amd64 .exe nanoserver:20H2 servercore:20H2"
echo "$build_platforms" | sed -e 's/windows *[^ ]* *.exe *[^ ]* *[^ ]*//g' -e 's/; *;/;/g' -e 's/;[ ]*$//'
linux amd64; linux ppc64le -ppc64le; linux s390x -s390x; linux arm64 -arm64

I used these changes in node-driver-registrar to push all the windows images as well as the manifest:

Manifest contents of the canary manifest:
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:619f0eb76b5b704fe351dacc26b94368e7e0db60a1fefcd8605aeb3e7e81874e",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 950,
         "digest": "sha256:5a21cee79643052c985a0d7073bef60f36711c83d74f58e94605c3e8a1ae6abf",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.17763.1935"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 950,
         "digest": "sha256:b5f11b3fe645a67b3ae2ab3bf32403670c6c454c4ab19e72a41c052035613873",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.18363.1556"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 950,
         "digest": "sha256:fe8327a9e9d3c2c73fa117cb4b635fc2c4f3f501e217ffe4f36bb6918cb63b3e",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.19041.985"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 950,
         "digest": "sha256:fe57e7ddfcec7008290dbf998c131ac5d98c8514326555d8fb24607b17e7ca0a",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.19042.985"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:cd870ccc4e58a592195e3af0cc3e690cc009a6fce7a47deaedc7583ccc335310",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:56e373d03c5a0e00d8e09912d462984bd5169433fca887505310f4b179430386",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:a11755a59d704d2da641794aa31235875f1d2b65d24810831b952220fcdec86f",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      }
   ]
}

/assign @pohly @jingxu97

@pohly I made a small change to the name of the image, from amd64-nanoserver-20H2-windows-canary to `amd64-windows-nanoserver-20H2-canary, the lgtm tag was removed because of this

/release-note-none

@pohly so sorry I lost your comment, are the images in csi-driver-host-path still failing because of this?

@pohly I just checked that you added the missing $ in https://github.com/kubernetes-csi/csi-release-tools/commit/5561780172df4a863139f8677905f112758cea82, thank you and sorry about missing this.


Secure the common Pool

Do not only check the common pool, but also stop threads that are still running (e.g. a parallel stream operation taking too long). This helps both security and isolating the test cases better, as well as making the timeout more robust.
This is a bit more difficult because the common pool cannot repair itself, so currently stopped threads are lost and the common pool will stop to work. We will probably need reflection here.

This might interfere a bit with #68, needs more investigation.

This might interfere a bit with #68, needs more investigation.

Will not happen due to JEP 396, JEP 403 and #113


There is no documentation of access control for aggregated apiservers

This is a Bug Report

Problem:
https://kubernetes.io/docs/reference/access-authn-authz/controlling-access/ describes access control for requests that are served by a kube-apiserver.  There also need to document the access control story for requests that are served by an aggregated apiserver (see https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/ - which also does not contain this information).
Proposed Solution:
Update https://kubernetes.io/docs/reference/access-authn-authz/controlling-access/ or create a new page to contain this information.
Page to Update:
https://kubernetes.io/docs/reference/access-authn-authz/controlling-access/

This is a current and long-standing issue.

This is related to #20071

/sig api-machinery

/kind feature
/priority backlog
/language en


[RFC] add an option to auto-output all vars after the settings are loaded  [was] Is is possible to export all settings of a running service?

It is a great feature that env_vars can override any setting loaded from files.
For diagnose, debug etc. many times it is useful to be able to extract the configuration of a running service (perhaps it loaded it from database, files and env_vars).
Do we have any means to get all DYNACONF settings that a running service is using?
Would it be possible to auto-export all config to env vars after loading?

@jruizaranguren dynaconf loads settings from environment, if you have access to that environment you can export it though the command line.
If the settings are changed dynamically and you need a freeze so you will need some process inspection tool like https://pypi.org/project/pyrasite/

Right now it is possible to output all the vars on a settings object, but it requires manual intervention.
The idea here is to add an explicity option like

settings = Dynaconf(...)
settings.export("/path/output.json")

with that set, right after all the loaders are executed the settings will be saved to a JSON file.

NOTE: It is not possible for a Python application to write back to the console environments variable.


Median

Report median (not mean) open issue duration
Thanks @bclehmann for the idea

Interestingly, reporting the median doesn't look as great as I'd expect. I'll probably proceed continuing to plot the mean. I didn't dig deep enough to determine if there's an error or why there are so many open long-running issues. The recent data from the last few months looks good.

mean
median

This may be a more useful metric

I'm going to open this back up with the idea of "for each day, plot the median open issue time of the last 20 closed issues". This may get around the idea that a few long-running open issues are skewing the results.


Timeout

It times out when creating the instance. Had to use gtimeout/timeout cmd. Please let me know if that's not the case with your testing.
Also, after the initial timeout, I wasn't able to delete the KMS keys and rest of the resource with 'destroy'. Had to create a new project for a fresh start.

Thanks for the heads up.
I haven't observed or heard this yet so my best guess is that this might have been related to an intermittent issue.  Generally the creation of the instance returns within the timeout.
The timeout in the Apigee resource should be 60min according to this https://github.com/hashicorp/terraform-provider-google/blob/main/google/resource_apigee_instance.go#L38. If you observed additional latency then a new issue for the provider resource might be needed.

Closing this as there weren't any follow ups. Assuming it was a transient issue of the underlying API.


vertices.npy

May I ask how to create vertices.npy for my own dataset？

May I ask how to create vertices.npy for my own dataset？

[frame_num, V,3]的格式


Issues with 'Account Monthly Charges Share'

It looks like the main phone line is not being identified correctly in my case, and the 'Account Monthly Charges Share' is being calculated too low.
Would it be possible to specify via a cli flag which phone line is the 'main' one?
I'm attempting to debug this on my end, but so far have not come up with anything.

Yea, somehow att changed the order of the users in the bill details page. I already cut a new version on pypi to fix that (by looking for the account holder name at the top of the page). Can you try upgrading to the latest version?
PS: I do have a friend whose account is bit messed up (the account holder name at the top of the page is incorrect somehow) and the fix is not working for him. So let me know if it works for you.

That was my first attempt at solving this (updating to version 0.4.8).  Is that the latest version?
When you say 'the account holder name at the top of the page', what specifically are you looking for in the page?
I also started looking at the line https://github.com/brianzq/att-bill-splitter/blob/master/attbillsplitter/main.py#L285
It looks like that object does not have a value on my end in a VERY stripped down test of the code
Python Code:
from bs4 import BeautifulSoup, Tag
markup = open("/tmp/MyBill.html")
soup = BeautifulSoup(markup, 'html.parser')
soup.find('span', class_='hidden-spoken ng-binding').parent.next_sibling.next_sibling.text.strip()

Python Shell Output:
>>> from bs4 import BeautifulSoup, Tag
>>> markup = open("/tmp/MyBill.html")
>>> soup = BeautifulSoup(markup, 'html.parser')
>>> soup.find('span', class_='hidden-spoken ng-binding').parent.next_sibling.next_sibling.text.strip()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'next_sibling'
>>>

It looks like, at least on my end, that there is only a value up to soup.find('span', class_='hidden-spoken ng-binding').parent.

Interesting. There is a hack you can do to bypass this, which is hard code your account holder name with something like account_holder_name = 'YOUR NAME' to replace line 285.

meanwhile, I think of a reasonable fix. let me see if I can finish it in the next 15 mins.

Cut a new version 0.4.9. it should be fixed!

That looks much better!
'Account Monthly Charges Share' is at a much more reasonable value now that I can specify the account holder's phone line.
Thank you sir!  :grinning:

you are very welcome. thanks for the idea of user input.


Cycle sort

Adding cycle sort

The cycle sort algorithm doesn't deliver the desired result and Problem https://github.com/Chitresh-code/DSA_Worksheet/issues/7 was solved using Java before your PR in https://github.com/Chitresh-code/DSA_Worksheet/pull/13
Please review your cycle sort algorithm and feel free to try again by adding a new commit to this PR.
Happy coding!


challenge-02

Proposed solution for challenge-02

Hi @MaldoAlberto. Thank you very much for submitting your solution. I am going through your code, but I am having a bit of a hard time following what is happening on each step. Would it be possible for you to maybe add a short explanation before each of the steps you followed, and perhaps explicitly highlight:

What the sample input list looks like
What the expected outcome will be for that list
What the algorithm returned as an outcome

Thanks!

Hello @diemilio I just made the modifications, I hope my answer is clearer, and an apologize for the lack of clarity.

Hello @diemilio I just made the modifications, I hope my answer is clearer, and an apologize for the lack of clarity.

Thanks @MaldoAlberto. It looks to me you are very close to a result. Any chance you can get the probability outputs to be actually representative of the options in the input list? What I mean by this is: take your example, it has four inputs ['0000','1001','1100','1101'], but the output probability distribution is giving a total of 16 solutions:

Any chance you can get your output to actually show only the four items from the list, where the two with the shortest distance are amplified? I know that your items are encoded in QRAM elements, so it would be OK if the output is just the binary position of the list items.

I just modified my program where the output histograms are obtained where it only shows the outputs with minimum distance, for the input ['0000','0001','0010','0111'] it should be considered that
00 01 is equal to [0000,0001]
00 10 is equal to [0000,0010]
01 00 is equal to [0001,0000]
10 00 is equal to [0010,0000]

00 01 is equal to  01 00 as is 00 10 equal to 10 00

Hey @MaldoAlberto, do you mind explaining this section in your hamming2()
    qc.h(distance_h)
    qc.barrier()
    for i in distance_h:
        qc.cx(i,reg_oracle)
    qc.h(distance_h)
    qc.barrier()

    qc.x(distance_h[3])
    qc.mct(distance_h,reg_oracle)

    qc.x(distance_h[3])
    qc.barrier()
    ...

If i understand correctly, this part intended to phase flip the component w/ minimum Hamming distance?
And that distance_h has the XOR of the bit string pairs at the start of that block?
Then you H it for some reason, flip conditioned on each individual bit be 1, then flip again conditioned on specific bis being 0?
I don't see how that picks out the component w/ minimum hamming distance

Hey @MaldoAlberto, do you mind explaining this section in your hamming2()
    qc.h(distance_h)
    qc.barrier()
    for i in distance_h:
        qc.cx(i,reg_oracle)
    qc.h(distance_h)
    qc.barrier()

    qc.x(distance_h[3])
    qc.mct(distance_h,reg_oracle)

    qc.x(distance_h[3])
    qc.barrier()
    ...

If i understand correctly, this part intended to phase flip the component w/ minimum Hamming distance?
And that distance_h has the XOR of the bit string pairs at the start of that block?
Then you H it for some reason, flip conditioned on each individual bit be 1, then flip again conditioned on specific bis being 0?
I don't see how that picks out the component w/ minimum hamming distance

This part generated a qram where the input values are stored and it is done twice to be able to make the comparison between the value of array 0 with array 1 and so on.
qram(qc,address_1,distance_h,array)
qram(qc,address_2,distance_h,array)

This section used the idea of the Bernstein-Vazirani algorithm to find the Hamming distances
qc.h(distance_h)
qc.barrier()
for i in distance_h:
    qc.cx(i,reg_oracle)
qc.h(distance_h)
qc.barrier()

This section is the necessary oracle for the minimum distance
qc.x(distance_h[3])
qc.mct(distance_h,reg_oracle)

qc.x(distance_h[3])
qc.barrier()

qc.x(distance_h[0])

qc.mct(distance_h,reg_oracle)
qc.x(distance_h[0])

qc.barrier()

qc.x(distance_h[2])
qc.mct(distance_h,reg_oracle)
qc.x(distance_h[2])
qc.barrier()

qc.x(distance_h[1])

qc.mct(distance_h,reg_oracle)
qc.x(distance_h[1])

qc.barrier()

This last part, I repeat the process to increase the probability of the oracle and follow the process that occurs in Grover's algorithm with the phase shift.
qc.h(distance_h)
qc.barrier()
for i in distance_h:
    qc.cx(i,reg_oracle)
qc.h(distance_h)
qc.barrier()

qram(qc,address_2,distance_h,array)
qram(qc,address_1,distance_h,array)
qc.barrier()

qc.append(diffuser(2*n),[address_1[0],address_1[1],address_2[0],address_2[1]])
qc.barrier()
qc.x(address_1)
qc.x(address_2)
qc.measure([address_1[0], address_1[1],address_2[0], address_2[1]], [c_1[0], c_1[1],c_2[0], c_2[1]])
qc=qc.reverse_bits()
return qc

This part generated a qram where the input values are stored and it is done twice to be able to make the comparison between the value of array 0 with array 1 and so on.
qram(qc,address_1,distance_h,array)
qram(qc,address_2,distance_h,array)

This section used the idea of the Bernstein-Vazirani algorithm to find the Hamming distances
qc.h(distance_h)
qc.barrier()
for i in distance_h:
    qc.cx(i,reg_oracle)
qc.h(distance_h)
qc.barrier()

This section is the necessary oracle for the minimum distance
qc.x(distance_h[3])
qc.mct(distance_h,reg_oracle)

qc.x(distance_h[3])
qc.barrier()

qc.x(distance_h[0])

qc.mct(distance_h,reg_oracle)
qc.x(distance_h[0])

qc.barrier()

qc.x(distance_h[2])
qc.mct(distance_h,reg_oracle)
qc.x(distance_h[2])
qc.barrier()

qc.x(distance_h[1])

qc.mct(distance_h,reg_oracle)
qc.x(distance_h[1])

qc.barrier()

This last part, I repeat the process to increase the probability of the oracle and follow the process that occurs in Grover's algorithm with the phase shift.
qc.h(distance_h)
qc.barrier()
for i in distance_h:
    qc.cx(i,reg_oracle)
qc.h(distance_h)
qc.barrier()

qram(qc,address_2,distance_h,array)
qram(qc,address_1,distance_h,array)
qc.barrier()

qc.append(diffuser(2*n),[address_1[0],address_1[1],address_2[0],address_2[1]])
qc.barrier()
qc.x(address_1)
qc.x(address_2)
qc.measure([address_1[0], address_1[1],address_2[0], address_2[1]], [c_1[0], c_1[1],c_2[0], c_2[1]])
qc=qc.reverse_bits()
return qc

Hi @MaldoAlberto, it looks like you have a duplicate file. Can you remove this one since it doesn't conform to the correct directory structure?
maldoalberto-challenge-02/challenge-02.ipynb

Hi @MaldoAlberto, it looks like you have a duplicate file. Can you remove this one since it doesn't conform to the correct directory structure?
maldoalberto-challenge-02/challenge-02.ipynb

@amirebrahimi  thank you very much for the observation, I already removed the duplicate

@amirebrahimi  thank you very much for the observation, I already removed the duplicate

Really nice and efficient approach! I have one question tho: In my understanding, you have assumed some initial value of minimum Hamming distance and then implemented the oracle accordingly. Is this correct? If so, how do you suggest we go around this if we don't want to impose an assumption on the distance beforehand?

Really nice and efficient approach! I have one question tho: In my understanding, you have assumed some initial value of minimum Hamming distance and then implemented the oracle accordingly. Is this correct? If so, how do you suggest we go around this if we don't want to impose an assumption on the distance beforehand?

@Shiro-Raven
Thank you very much and yes, you are right, I assumed the value of 1. When making the algorithm I realized that depending on the length of binary strings we can consider the possible distances and condition them in the oracle.
For example, consider half the length of the string as a minimum distance and adder those possibilities in the oracle.

@Shiro-Raven
Thank you very much and yes, you are right, I assumed the value of 1. When making the algorithm I realized that depending on the length of binary strings we can consider the possible distances and condition them in the oracle.
For example, consider half the length of the string as a minimum distance and adder those possibilities in the oracle.

Nice solution! One workaround I came up for considering multiple distances, was to chain various Grover algorithms (one per distance). That is, first you try to amplify the solution with a distance=1, then with a distance=2 and so on. If the oracle doesn't find any state to amplify (that is, there is no state with the given distance), it will just scramble the states. If the oracle finds a solution (say, with distance=3), that state will be amplified and further rounds of amplification/scrambling to the next candidates (states with distance=4,5,etc) won't be enough to overcome the first amplification.
This works well when the amount of solutions is just one (i.e. there is only one pair of states s1,s2 where hamming(s1,s2)=min) as the ideal amount of iterations N only depends on the length of each state/string, but when there is more than one solution, you need to know how many of them are to calculate N to make sure its amplification is strong enough to overcome the rest.
I haven't been able to come up with a workaround for my workaround, but maybe you guys have something in mind

Nice solution! One workaround I came up for considering multiple distances, was to chain various Grover algorithms (one per distance). That is, first you try to amplify the solution with a distance=1, then with a distance=2 and so on. If the oracle doesn't find any state to amplify (that is, there is no state with the given distance), it will just scramble the states. If the oracle finds a solution (say, with distance=3), that state will be amplified and further rounds of amplification/scrambling to the next candidates (states with distance=4,5,etc) won't be enough to overcome the first amplification.
This works well when the amount of solutions is just one (i.e. there is only one pair of states s1,s2 where hamming(s1,s2)=min) as the ideal amount of iterations N only depends on the length of each state/string, but when there is more than one solution, you need to know how many of them are to calculate N to make sure its amplification is strong enough to overcome the rest.
I haven't been able to come up with a workaround for my workaround, but maybe you guys have something in mind

@peguerosdc
For what I understood of your idea, I raised in each iteration to put each oracle, example first the conditions when distance = 1, then a second iteration distance = 2 with its conditions. This will give more probability if there is 1 equal to 1 and less solutions with distance 2, I share the histogram that came out of the example:
[1000, 1001, 0011, 1111]
distance between 1000 and 1001 = 1
indexes
[00 , 01] = [01, 00]
distance between 10001 and 0011 = 2
indexes
[10 , 01] = [01,10]
distance between 10001 and 0011 = 2
indexes
[10 , 01] = [01,10]
distance between 1001 and 1111 = 2
indexes
[11 , 01] = [01,11]
distance between 0011 and 1111 = 2
indexes
[11 , 10] = [10,11]
the other cases their distance is 3, but in this example we are not interested.

@peguerosdc
For what I understood of your idea, I raised in each iteration to put each oracle, example first the conditions when distance = 1, then a second iteration distance = 2 with its conditions. This will give more probability if there is 1 equal to 1 and less solutions with distance 2, I share the histogram that came out of the example:
[1000, 1001, 0011, 1111]
distance between 1000 and 1001 = 1
indexes
[00 , 01] = [01, 00]
distance between 10001 and 0011 = 2
indexes
[10 , 01] = [01,10]
distance between 10001 and 0011 = 2
indexes
[10 , 01] = [01,10]
distance between 1001 and 1111 = 2
indexes
[11 , 01] = [01,11]
distance between 0011 and 1111 = 2
indexes
[11 , 10] = [10,11]
the other cases their distance is 3, but in this example we are not interested.


ConnectionRefusedError

Hi，I used like this, but occur an error like this，do you know the reason about this?

hi,
what is this PyCharm skin or theme which you using for coloring code? its looks nice

Hi，I used like this, but occur an error like this，do you know the reason about this?

You can try to increase this parameter activation_type=None, and I have an effect with the same problem with this configuration
client = DoIPClient(ip, logical_address, activation_type=None)


multiple changes

updated azure-iot-sdk to 0.11.7 to introduce configurable do_work frequency in azure-iot-sdk-c
prolonged watchdog interval to 90s while running update validation

w

Giving it a second thought (and I know there has been some discussion), I'm not 100% sure whether dynamically changing the watchdog period really is the way to address this problem.
To my understanding the issue is, that the update validation may take longer than the watchdog period and thus may block our main event loop longer than the watchdog period? Is this correct?

correct

IMHO we should at least explicitly document this problem in the source somewhere.

there is a comment in update_validation.rs. is this not enough? why do think it is that important?

Furthermore, wouldn't it be possible to address the issue then by spawning the update validation into a background task (tokio::spawn_blocking) and explicitly wait for this to finish. If we don't want other tasks to progress, we can then have some "update validation in progress" flag that would prevent other events from being processed, if we depend on them. Sorry that this idea is somewhat late and after the implementation has already happened, some things have to stew a little :/.

I don't understand the problem or the advantage of the proposed background task over the current implementation.

We do want to fail on a deadlock in update validation but just want to give it a bit more time than the other tasks
The succeeded validation is a precondition for all other tasks to be started
the current implementation is completely async


Update CommonProxy.java Use ore dictionary for glass blocks instead of vanilla only.

Use ore dictionary for glass like you do for silicon for better mod compatability.

Doesn't this require ShapedOreRecipe for recipes that use oredict?

fixed it myself in master, thanks anyway for the patch!


[AMORO-2733] Added db_type configuration check. database.type is mand…

…atory

Why are the changes needed?

Close #2733.
Brief change log

ams/server/src/main/java/com/netease/arctic/server/ArcticServiceContainer.java

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[x] Add screenshots for manual tests if appropriate

[ ] Run test locally before making a pull request

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? not documented

Applied another minor change and fixed the checkstyle error. Pls review it again. Thanks.

      validateConfig(expandedConfigurationMap);
      serviceConfig = Configurations.fromObjectMap(expandedConfigurationMap);

@paul8263 @zhoujinsong
Would it be better if we adjusted the order of these two lines?

SqlSessionFactoryProvider.getInstance().init(serviceConfig) will can use some default values, this will be reduce error.
We can use Configurations#getString() to get value.
WDYT?

      validateConfig(expandedConfigurationMap);
      serviceConfig = Configurations.fromObjectMap(expandedConfigurationMap);

@paul8263 @zhoujinsong
Would it be better if we adjusted the order of these two lines?

SqlSessionFactoryProvider.getInstance().init(serviceConfig) will can use some default values, this will be reduce error.
We can use Configurations#getString() to get value.
WDYT?

Agreed with swapping the two lines of codes. We can first convert the Map to Configurations and then check the validity of it.
Another benefit of converting it to Configurations first is the default value could be resolved by the config option definition.
If applicable I would like to do this job.

@paul8263 Merged first and the improvement can be made in the new PR .

Hi @zhongqishang ,
Thanks. I'll file another issue about the optimization.


Add theming support for the project

Hi, what about adding themes to the app, that make the sites of our users distinguishable, we can also have contributors to create different themes.

Sure


how to deploy this project In IIS

how to run this project In IIS

Actually, you would run this project instead of IIS. It will listen on port 8080 by default. If IIS is already listening on that port, you can run http-server like http-server . -p 8090 (or whatever).
If you have more specific errors, feel free to reopen this issue or file new ones.
Thanks!
🎩

i want run this project in IIS , locally its working fine ,but I want to deploy my Web application in IIS, it's not working properly I am searching 3 to hours but doesn't success.
how to work this project on IIS. if you need anything else for understand I am here. I share Two images for you understand my problem
var app = angular.module('app', ['ui.router', 'ui.bootstrap', 'flash',
       //main modules
       'login', 'dashboard','staffregistration']);

   app.config(['$stateProvider', '$locationProvider', '$urlRouterProvider', function ($stateProvider, $locationProvider, $urlRouterProvider, $modalInstance) {

       //IdleScreenList
       $stateProvider
          .state('app', {
              url: '/app',
              templateUrl: 'app/common/app.html',
              controller: 'appCtrl',
              controllerAs: 'vm',
              data: {
                  pageTitle: 'Login'
              }
          });

       $urlRouterProvider.otherwise('login');

       //$urlRouterProvider.otherwise('app/dashboard');
       //$urlRouterProvider.otherwise('/app/dashboard');
   }]);

   // set global configuration of application and it can be accessed by injecting appSettings in any modules
   app.constant('appSettings', appConfig);

webconfig
 <configuration>
     <system.webServer>
        <defaultDocument>
          <files>
            <clear />
            <add value="index.html" />
          </files>
        </defaultDocument>
    </system.webServer>
    </configuration>

https://stackoverflow.com/questions/46336656/simple-angularjs-application-run-iis?noredirect=1#comment79643331_46336656
https://i.stack.imgur.com/KyI1u.jpg


Handle scope support in JerryScript

Handle scopes greatly simplify variables lifetime management. Also handle scope apis are part of N-API. Would like to have handle scope support in JerryScript natively.
There is a naïve implementation available in ShadowNode project for JerryScript: https://github.com/yodaos-project/ShadowNode/tree/master/deps/jerry/jerry-ext/handle-scope

@LaszloLango sorry for the late response.
Yes I would definitely like to send the PR :)


Initial Schema Validation

compare hibernate entities against db schema to:
find missing tables
find missing columns
find duplicate columns
check for bad identifiers.. enforce lower_snake_case
check that identifiers match exactly

Rebasing off Master should restore green CI builds.


Users should not need to launch Console.app to see iOS messages

Console.app just tails log files.  We could run tail -f for the user or syslog or whatever tool is necessary to dump them from the command line.

Closed by #1027


PreParams generation time outs on machines with less than 3 CPU

When running GeneratePreParams on machines with less than 3 CPUs the process timeouts as the generation goroutines are not being started.
It happens when optionalConcurrency is not provided so the runtime.NumCPU() is invoked, or when optionalConcurrency is less than 3.
A number of concurrent execution is taken from runtime.NumCPU():
https://github.com/binance-chain/tss-lib/blob/efd7f5ab41d31ade2dbc274371d07fb1b0dd2512/ecdsa/keygen/prepare.go#L39
Next, this value is divided by 3, which gives us 0 and passed to generate functions:
https://github.com/binance-chain/tss-lib/blob/efd7f5ab41d31ade2dbc274371d07fb1b0dd2512/ecdsa/keygen/prepare.go#L51
https://github.com/binance-chain/tss-lib/blob/efd7f5ab41d31ade2dbc274371d07fb1b0dd2512/ecdsa/keygen/prepare.go#L65
As a result, prime generation routines are not started:
https://github.com/binance-chain/tss-lib/blob/efd7f5ab41d31ade2dbc274371d07fb1b0dd2512/common/safe_prime.go#L144-L149

Thank for this. We have always used devices with more than 2 cores and must have overlooked it.
Could you have a look at the fix in this commit? https://github.com/binance-chain/tss-lib/commit/15250acd920bbf169243cc0a9ec4eb92ba5ac57b

Thanks for the fix!


Support for inDelay / outDelay

Maybe I was missing something, but I did not see support for inDelay / outDelay.
This patch modifies _setAnimationValuesForItems to add inDelay / outDelay to the animation-delay value in each element in the swagger set. When _listItemElems are iterated, animation-delay receives the combined value of the currentDelay + the in / outDelay.

@techsoldaten You're absolutely right -- this is a total oversight within _setAnimationValuesForItems. Many thanks for the catch!

Glad to help, this is a great addon.


supertest tests always pass

changing any of the expected status codes to other values does not seem to have any impact on whether or not the tests pass.
Digging a bit further, I can't get any done callback based test to work. The only thing that seems to work right is returning the result of the expect call. (After also adjusting the supertest initialisation to point to port 3000).
I'm new to TypeScript, Node and these test frameworks so I might just be missing something but the fact that you can change the status codes for expectations and the tests still pass seems wrong either way.

I agree with you, I had to modify the way supertest is configured to make it work.
e.g:
import * as supertest from 'supertest';
import * as sinon from 'sinon';
import { Neo4J } from '../../src/db';

const app = require('../../src/server');
const agent = supertest.agent(app);

describe('Health GET /health', () => {
  it('should return 417 Failed', (done) => {
    const stub = sinon.stub(Neo4J, 'checkConnection').rejects('error');

    agent.get('/health')
      .expect(417)
      .then(() => {
        stub.restore();
        done();
      })
      .catch(error => {
        stub.restore();
        done.fail();
      });
  });

I noticed the same behaviour!

Same. Also not sure if jest import is required. I tried adding callback (done) and returning the promise. Both approaches didn't resolve this issue.
A

Same to me. The issue is because the Jest API is used incorrectly.
First of all this cannot work because when running tests (npm test) there is no place where the server is set up – literally there is nothing like http://localhost:8000 because there is no such server.
Moving further, all the tests incorrectly uses the Jest done() callback. As long as in Mocha or Jasmine, we can simply call done(err) to make the test fail, in Jest we must call done.fail(err) instead.
So, after replacing:
    request.get("/contact")
      .expect(200, done);

with
    request.get("/contact")
      .expect(200, (err, res) => {
        if (err) {
          done.fail(err);
        } else {
          done();
        }
      });

or better with
    request.get("/contact")
      .expect(200)
      .end((err, res) => {
        if (err) {
          done.fail(err);
        } else {
          done();
        }
      });

all the tests fail.
At the end I must say, that I spend several hours trying to figure out how the tests are configured that they work, without any configuration of the server under localhost:8000, so I'm a bit frustrated. 😞

BTW @dmt that's why after your change, the tests are failing in #38

It's possible to return the result of setting up the expectation and that seems to behave as it should. I did also update the PR to separate the setup of the app and actually binding to the port. This does make it possible to run the tests, requiring that extracted app setup instead of assuming there is an instance of the server running somewhere.
I'm still not super happy with the changes for various design reasons and the fact that I don't actually know anything about typescript. But at least the tests now actually do something.

This has to do with how Promises are used in JavaScript tests. If you're testing something asynchronous, you must return a promise from the callback in the it function. Alternatively, you add a done parameter and call it at the end of the test. Note that some asynchronous tests will need longer than the default time limit most testing frameworks allow per test, so it's normal to increase that time limit for them.


[Icon Request] Support for yacc/bison file format (.y/.yacc)

[true ] I'm sure this issue is not a duplicate.

[true] I'm submitting an icon request:

Type: file language

Icon Name: yacc/bison icon

Sample original Icon:

Extensions: .y .bison

Language Extensions: .y .bison

More info:
https://marketplace.visualstudio.com/items?itemName=faustinoaq.lex-flex-yacc-bison
https://www.gnu.org/software/bison/

Related to #2265, check out comment for more info.


recent releases

chore: create alpha release branch [skip ci]
feat: pecl, but faster, in JSON and with stale packages stripped out
chore: add release packaging script
chore(release): 1.0.0-alpha.1 [skip ci]
chore: recent-pecl-releases action

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Track homepage as finding page in Google Analytics

Add meta tag which marks the homepage and search as being in the finding (navigation) stage of a user journey, as opposed to the thing (content) stage.
This will enable us to analyse how users navigate the site so that we can work out whether the new navigation pages are helping users find what they need.
https://trello.com/c/SCsj2A9D/425-add-custom-dimension-to-page-view-tracking-on-new-navigation-pages

Closing this PR because we're taking a different approach: defining a document supertype in govuk_document_types.


add active area offsets

i have dovi metadata without active area offsets (no active area section at all) and I want to add ones... is this possible with editor? activearea.json (edited to my needs) does not add them..

Not possible right now.
I tried recently but it didn't work.

The default behavior should now be to add L5 metadata if it's not present.
Implemented in https://github.com/quietvoid/dovi_tool/commit/05c8d190ce66174d7fdcab16a4178aaffabfa1ed


Bad indexes annotation writing

since i updated my framewok i got a new error.
i couldn't create a databse because of this "object_class" & "foreign_key" as in your exemple
https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/translatable.md#advanced-examples
/**
 * @ORM\Table(name="article_translations", indexes={
 *      @ORM\Index(name="article_translation_idx", columns={"locale", "object_class", "field", "foreign_key"})
 * })
 * @ORM\Entity(repositoryClass="Gedmo\Translatable\Entity\Repository\TranslationRepository")
 */

to resolve it, i needed to rewrite all my entities with "objectClass" & "foreignKey" where "_" and the first letter of the firld was removed/changed

yes, the documentation will need some updates.

This is a BC change for whoever makes an update. Maybe it should be listed somewhere in a changelog or in Translatable docs.

it will be, master branch switched to 2.5.x. I recommend you to have a tag ~2.4.0 in your composer.json. thanks for noting about that ;) If you use underscore naming strategy that should resolve fine, otherwise you need to name columns based on default naming strategy. To be consistent with this naming strategy extensions do not set explicit column names anymore


The consolidation seems to be slower than expected

The consolidation seems to be slower than expected (Collection 100k records and log 160 MiB => 54s). Especially with a lot of deletes in the log. I could not find a reason for this, but maybe it has to do with the complete index rebuild after each action. If someone has an idea to speed this process up, please let me know.

Unfortunately, drop is O(n) time complexity.
dropById is O log(n) and so is findOne(). You can probably speed it up a lot by replacing 'drop' with a findOne and dropById. If you try this, please let me know how it goes.

This should be fixed in the 1.2.0 release. drop is O log(n) now.


Use established tag for 'barbecue'

Describe the bug
When doing a feature search in ID for a type of barbecue restaurant, ID suggests "Barbeque Restaurant", which applies a tag cuisine=barbeque.   Although this is an accepted spelling in the English language, the established tag is cuisine=barbecue.
To Reproduce

Select a feature and search for 'barbe'

Expected behavior
Should suggest Barbecue Restaurant
Screenshots

Additional context
Established tag in Wiki for cuisine https://wiki.openstreetmap.org/wiki/Key:cuisine#Style_or_Place

The preset’s name, “Barbeque Restaurant”, is also inconsistent with another barbecue preset:
https://github.com/openstreetmap/id-tagging-schema/blob/2a7faa922a7593b1530c8b577c1e527fa6d85460/data/presets/amenity/bbq.json#L22
Wiktionary says “barbeque” is the Australian English and New Zealand English spelling. American English uses “barbecue” even though it’s abbreviated as “BBQ”.

It should now be consistent after changing the spelling of the preset name in 9c753cc5045e6edc568eed08cc6c54193558088a


Help importing an image the way it appears when designed in software like Inkscape

Godot version
v3.4.2.stable.official [45eaa2daf]
System information
Windows 10, 2 X RTX 2070 Super, AMD 3700X
Issue description
Hi, I have been trying to learn UI and UX and have taken the project to make a calculator app for Android phone (Redmi Poco F1). I am facing a serious issue that I haven't been able to solve for three days now, and hence, I have lost all my hopes and am finally posting it here since this is the last hub I think that should solve my problem. If it does not get solved here, then I most probably will have to close this project and will never look back at Godot ever again. Anyways, here goes my problem:
I have been trying to import an image to use as a texture for a button. I have attached the screenshot below.

If you open up this screenshot (zoom in the image), you will see that none of the image textures are perfect as they should be. For instance, have a look at the 'Converter' button in the screenshot, the letters are badly distorted. Here is the converter button image that I am trying to use (its an original one). (All images are raster, just like this Converter button below, but are perfect when viewed in default photos and image viewer of Microsoft.)

Not only this one, the Degree and Radian button are also badly distorted, you can zoom into the screenshot and see it. I am attaching the Degree buttons image here. The actual button is so badly distorted that both 'e's at the end of degree are not even identical.

As you can see, the image above is so clear and well anti-aliased, its hard to notice any artifacts. The 'Degree', 'Radian', 'Playstore' and many more buttons in the actual app are distorted - you can check by zooming in the screenshot. I have tried all advices available online to import them with clear and non-distorted edges, but none of those methods could give me a non-distorted button.
This was the case with raster images. Now lets come to the fonts - which definitely are something like vector graphic. In the screenshot, the calculation query and answer are fonts - which too are badly anti-aliased. Tried everything with them as well - but only found disappointment in the end.
I kindly request you to please help me find a solution to these problems. Please point me where I am wrong. If you could demonstrate how to use these texture in a way that they appear in the app exactly as they do generally, it would be really helpful. The window screen size that I am using for this app is 1000x500 pixels. I have anti-aliasing turned on. Let me know if you want to know about further settings.
  THERE ARE TOTAL THREE IMAGES IN THIS ISSUE. OR YOU COULD OPEN UP DEVELOPER TOOLS AND CHANGE THE GITHUB'S BACKGROUND COLOUR TO MAKE THE REMAINING IMAGES VISIBLE.]
The pure white areas in the image below are resource images of my app (Coverter and Degree). Right click on them to download the images.

Steps to reproduce
Must be tried in an Android device (phone). Add a texture rect or a button, add one of the images above as its texture and play on Android phone.
Minimal reproduction project
No response

Try enabling Allow Hidpi in the Project Settings, then export the project for Android again.

 Thanks a lot. I was really not expecting the problem to get solved this fast!  This entire thing was almost like you threw a dart in the darkness and hit the target. Your settings have improved the quality, however, minor pixel distortion still remains that is noticeable when paid attention to and only when animation is played because the animated sprites consist of shadows.
This should be closed now, but the issue is that this type of pixel distortion problem persists for graphics of smaller size. The fonts with smaller size are performing well with the settings you have suggested (I just tried them), however, the small-sized graphics are still getting either blurred or pixel-distorted - depending on their import settings. The font size I used for this was '9'. The small sized graphics are not performing to have the same clarity as small-sized fonts.

The fonts with smaller size are performing well with the settings you have suggested (I just tried them), however, the small-sized graphics are still getting either blurred or pixel-distorted - depending on their import settings.

There is no way to completely avoid this. You simply can't render something on screen in a clean manner if it has to be downsized. It either has to be blurry (when mipmaps are enabled) or grainy (when mipmaps are disabled).

Ok. Then I think that this matter is solved.


TargetFileObject clarification

It should be clarified if TargetFileObject is the same as FltObjects->FileObject during the same Pre/PostOp callback.

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

ID: 7b3e6aa0-8301-5b6e-c38b-dc3b31a1a0e7
Version Independent ID: 8a3a371c-9349-0f01-2c3d-dc1681f0227e
Content: _FLT_IO_PARAMETER_BLOCK (fltkernel.h) - Windows drivers
Content Source: wdk-ddi-src/content/fltkernel/ns-fltkernel-_flt_io_parameter_block.md
Product: windows-hardware
Technology: windows-devices
GitHub Login: @lorihollasch
Microsoft Alias: loriwhip

@alfaunits , I've added the clarification that you asked for!


Stale diagnostics

Hey!
I have been using this project instead of nvim-lspconfig's tsserver for quite some time.
I have noticed that from time to time, I have stale diagnostics that I cannot seem to get rid of. Using LspRestart on LspStop on the typescript-tools LSP client does not help. Neither does bd! on the buffer. The only thing that helps is restarting Neovim.
This is annoying, since I lose my loaded buffers and need to open them again.
Example of stale diagnostics:

Let me know how I can help debug this problem if I encounter it again. I haven't looked at the source code of this project yet.

If you will be able to provide more info and steps to reproduce I will do my best to fix it. I use this in my commercial job daily and for me it isn't doing this or maybe I just didn't notice this error.
But if you find way to reproduce then other info can be useful:

nvim version
typescript version
some code/example project to reproduce

I just wanted to chime in and say that I also have this problem in my monorepo setup. I'll try to setup a example repo and get back to you.

+1
nvim: 0.9.4
Ts: 5.3.3

@Gelio @roguesherlock @macstr1k3r
So I added feature which may help debug this:
:lua require("typescript-tools.api").save_snapshot_to("snapfile.js")

this should save current tsserver in memory representation of affected file you can compare it to your file and check if it is same as yours.
If yes it's probably some bug in tsserver or neovim itself because on our side we just translate response from tsserver and push them to neovim, we won't store them or anything.
If files are different probably it is our problem because this is probably sync problem.
Let me know about your findings.
Connected pr:  #212

I just hit this problem. The snapfile.js is identical to the original file that I see stale diagnostics.

You can see stale diagnostics in the original source file on the left. The file on the right is the snapfile.js and it has the  same source code as the original file.
You can ignore the errors in the file on the right. tsserver is complaining about using TypeScript syntax in a js file. The snapfile.js should have been named snapfile.ts.
Your comment suggests that this is a problem in Neovim/tsserver. I never had those problems when using tsserver directly via nvim-lspconfig or when using https://github.com/jose-elias-alvarez/typescript.nvim earlier. Let me know I can help you debug further.

@Gelio So, I started to dig in this but without any reproduction is hard to debug it.
But I started to look for some nvim diagnostic api and I bumped on vim.diagnostic.reset(). As far as I understand code of this function it should fully clear diagnostics, namespaces containing text decorations and diagnostic cache.

But it's worth to try so I created draft PR which use this function to reset diagnostics instead standard lsp notification.
Try to switch on branch from this PR and let me know if problem still appear.

Probably second solution will be to use builtin nvim pull diagnostic but its implementation miss relatedDocuments functionality which is necessary for tsserver. In free time I'll try to extend this in core nvim.

I understand and agree it's hard to analyze and also hard to reproduce. I don't see a set of steps that leads to this bug.
I'll try running vim.diagnostic.reset() when I encounter this problem again and post back with the results.

@Gelio So, I started to dig in this but without any reproduction is hard to debug it. But I started to look for some nvim diagnostic api and I bumped on vim.diagnostic.reset(). As far as I understand code of this function it should fully clear diagnostics, namespaces containing text decorations and diagnostic cache.  But it's worth to try so I created draft PR which use this function to reset diagnostics instead standard lsp notification. Try to switch on branch from this PR and let me know if problem still appear.

can confirm  - :lua vim.diagnostics.reset() actually clears diagnostics and I can continue without restarting vim :)
FYI - this happens quite often to me when working on a larger monorepo project.

@pmizio still getting this from time to time but never in a moment when I have time to investigate further so :LspRestart + :e! is my goto solution

Hello folks, I'm experiencing this exact same issue on a quite large monorepo. I can get at most 10 minutes before the diagnostics go stale. On non monorepo setups works flawlessly. :LspRestart + :e! does not work for me unfortunately.

I suspect something is getting wonky when simultaneously editing files from different packages within the monorepo.

I had a similar issue when working with gopls. What helped is disabling incremental sync, which probably has some negative impact on perfomance but it solved my issue with gopls back then.
			flags = {
				allow_incremental_sync = false,
			},

Also experiencing this issue in monorepos, have not had time to debug in non-monorepos yet.

Just an update @pmizio  I have been using your draft PR for the last week and its definetly fixed any issues with stale diagnostics. Have not had to restart the LSP since
Amazing!


Timeline: Slot sizes

To make timeline shorter in general, let's change slots heights:
Slot's min height: 20pt
Slot's max height: 72pt
Collapsed slot: 20pt first slot, 3 dots 4pt height, 20pt last slot
Sleep slot: 20pt

Until we have an official answer, let's stick the two limits in the question into constants, and set them to 10 and 60 minutes, and see how it looks. We can see about fine tuning it later.

@amulware

I take it by 'slot' you mean the length of the line representing the duration, not the whole time slot (including icon, etc).

yes

Are you sure that limiting things so much will still make relative sizes a good intuitive indicator for duration?

yes

(Alternative: Why not use some sort of function for duration->height that grows less and less as the duration increases?)

it would make sense actually but then duration will always affect the height, right? i mean heights will change when i suddenly have eg 10 hour slot?

If such a function was used, yes, the only limit to height would be 24h in the day. The function could stop growing much quickly though, be it an arctan or exponential fall off. Maths. :D


Cassandra consistency TWO prevents Kong startup on 0.11.0

Summary
Upgrading a working Kong cluster from 0.10.3 to 0.11.0 fails to start when Cassandra consistency is TWO. Prior to upgrade consistency TWO worked fine.
kong[25128]: Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:28: [cassandra error] could not retrieve current migrations: [cassandra error] [Unavailable exception] Cannot achieve consistency level TWO
Changing consistency level to ONE allows Kong to start correctly. Upgrading from 0.10.3 may not be required to reproduce this bug.
May be related to #1913
Steps To Reproduce
Environment: RHEL7 using packages from the Kong RPM repository

Setup Kong 0.10.3 with a 3-node Cassandra cluster with the kong keyspace replication set to { 'class' : 'SimpleStrategy', 'replication_factor' : 3 }
Upgrade Kong package to 0.11.0
Update kong.conf (remove old cluster config, add db_update_propagation)
Run Kong migrations up (succeeds)
Start Kong

/usr/local/share/lua/5.1/kong/cmd/start.lua:62: /usr/local/share/lua/5.1/kong/cmd/start.lua:28: [cassandra error] could not retrieve current migrations: [cassandra error] [Unavailable exception] Cannot achieve consistency level TWO
stack traceback:
        [C]: in function 'error'
        /usr/local/share/lua/5.1/kong/cmd/start.lua:62: in function 'cmd_exec'
        /usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
        [C]: in function 'xpcall'
        /usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
        /usr/local/bin/kong:7: in function 'file_gen'
        init_worker_by_lua:38: in function <init_worker_by_lua:36>
        [C]: in function 'xpcall'
        init_worker_by_lua:45: in function <init_worker_by_lua:43>

Hi,
Have you tried

Tried ONE, TWO and THREE, conclusion just ONE working. same error reported.

I guest must be related to cassandra_contact_points

Hi,
The consistency setting of Cassandra isn't remotely related to the
contact points property.
The consistency setting that you chose depends entirely on your
Cassandra cluster, how you configured it, and the way you want your
application to behave (availability vs. consistency). I suggest that you
read some online literature if you wish to use Kong with Cassandra and
aren't familiar with it, or consider switching to PostgreSQL.
--
Thibault
On 11/24/17 7:24 AM, jgava wrote:

I guest must be related to cassandra_contact_points
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Kong/kong/issues/2871#issuecomment-346851518, or
mute the thread
https://github.com/notifications/unsubscribe-auth/ABEsN8moefp0lNCzg82wYbjZM-WWOCPSks5s5t-TgaJpZM4PQj5V.

Sorry for the slow reply, I experience the same issue on 0.11.1 as well.

This is either a mis-configuration of your cluster, or an issue that we encountered with migrations that has been solved in Kong 0.12/0.13. Closing it and considering it resolved.