LUCENE-10558: Implement URL ctor to support classpath/module usage in Kuromoji and Nori dictionaries

see https://issues.apache.org/jira/browse/LUCENE-10558
This is against 9.x branch, but can be forward ported to main.

In case you ask: This works both with classpath and module usage. The caller-sensitive parts are Class#getResource(String), ClassLoader#getResource(String), and Module#getResource(String). The returned URL is free to use anywhere so it separates concerns like the IOSupplier or Path.

Can someone disable this @sonatype-lift, makes no sense for Lucene as we are no webservers.

@sonatype-lift silence ignore shutup 👎

@mocobeta should be maybe add a note to the deprecated javadocs that the deprecated ctor no longer works with classpath resources and always loads the default one?
Or should we change it to behave like before?

Thank you @uschindler, I am fine with this!

This is against 9.x branch, but can be forward ported to main.

I'm inclined to add these URL-based constructors only to 9.x for the temporal remedy; I'm afraid that people use this abusively. (like opening TCP sockets to load resources from another host...)

should be maybe add a note to the deprecated javadocs that the deprecated ctor no longer works with classpath resources and always loads the default one?
Or should we change it to behave like before?

Actually, I haven't used these constructors on my own. When it is needed, I simply regenerate the resources and rebuild kuromoji jar.
Maybe @msokolov would know what should we do on it?

I'm inclined to add these URL-based constructors only to 9.x for the temporal remedy; I'm afraid that people use this abusively. (like opening TCP sockets to load resources from another host...)

If you supply Path-based ctors, the URL-based are also needed to support both loading resources from anywhere. The problem that @msokolov hit is that you can "offcially" only support Path-based resources, which are not useable with modules or classpath. That's not different in main.

(As for sonatype-lift bot, it repeatedly reports the same warnings per push; I once tried to silence it and gave up... I'd agree with disabling it for lucene.)

But yes, one workaround for Mike is to rebuild the JAR files. An alternative that always works (outside module system) is to place the JAR file with the resources in a separate JAR file added to classpath BEFORE the main kuromoji JAR.
Nevertheless, this is NOT a temporary thing: We must either add URL based ctors or we must remove all specialized ctors and make the IOSupplier one public. Just allowing to use Path (files) to customize is not a well designed API.

(As for sonatype-lift bot, it repeatedly reports the same warnings per push; I once tried to silence it and gave up... I'd agree with disabling it for lucene.)

Especially as those warnings are complete nonsense. If you read the description we are not doing anything mentioned there. We get an URL from outside code. Filtering or ensuing that the URL is not coming from untrused sources is not our responsisbility. One could also pass a Path object with /etc/passwd.

See TikaInputStream for an example that allow URL next to Path (any many others).

Personally, I don't think we should allow users to load resources from anyware... It's not the sensible way to load the dictionary resources as far as I know. If you need external resources that do not on locally accessible paths, you should simply download or install them beforehand, then load them from the file - this is the convention I've seen so far.
However, it's okay with me if we should support them as a general-purpose API.

Personally, I don't think we should allow users to load resources from anyware... It's not the sensible way to load the dictionary resources as far as I know. If you need external resources that do not on locally accessible paths, you should simply download or install them beforehand, then load them from the file - this is the convention I've seen so far.
However, it's okay with me if we should support them as a general-purpose API.

It is also common to have them in JAR files. And if we want people to allow them to be supported in Solr, we would need to support URL, too. SolrResourceLoader also returns URL.

Thanks for explaining, then I don't have an objection to forward porting; maybe we'll need it to make it possible to load the resources from another jar.

OK. I opened this PR against 9.x because it makes it easier to add the changes in deprecation messages. When forward porting just tell the merge/cherrypick on main to "use theirs".

what is going on here? why are we allowing such stuff?

Personally, I don't think we should allow users to load resources from anyware... It's not the sensible way to load the dictionary resources as far as I know. If you need external resources that do not on locally accessible paths, you should simply download or install them beforehand, then load them from the file - this is the convention I've seen so far.

+1, this is how i feel. i don't think we should be supporting Path/URL apis. Sorry this is really wrong. e.g. for ConnnectionCosts, the only ctor that we need is ConnectionCosts(). load from jar.

In short: Some people like Mike Sokolov at Amazon wants to load custom ConnectionCosts and TermInfoDicts and Unk dicts from custom resources. This was working previously with file system and with classloader.
The API of Classloading uses URL as resource, while while files use Path objects.
So IMHO:

either remove both "Path and URL" ctors (my preference)
or add both (like done here to support Solr, Elasticsearch and Amazon to load dictionaries from custom JAR files)
or just add IOSupplier<InputStream> ctor, but that even worse as this is an internal class and should not be in public APIs.

The question I ask also to @msokolov : Why the hell does naybody want to modify the dictioaries that are in highly propiertary format. To generate those files, you need to generate them with Gradle anyways (the FST, the compiler for connection costs). So anybody can just compile and package your own JAR file?
So I agree with Robert here: Why do we need to make it customizable, there's no added value to provide some proprietary, non-standardized file formats to the ctor as external resource. This was a bug already in early versions of Kuromoji.

yes, please, lets remove any File,Path,URL,URL,whatever ctors. The code is open-source if amazon wants to build a custom crazy jar. We can't make all the apis complicated and unusable for such stuff.

Let's give @msokolov a chance to comment.

In case you ask: This works both with classpath and module usage. The caller-sensitive parts are Class#getResource(String), ClassLoader#getResource(String), and Module#getResource(String). The returned URL is free to use anywhere so it separates concerns like the IOSupplier or Path.

I was going to ask about this :) Didn't know about Module#getResource ... Anyway this approach seems sound. Although it's a little less general than the Stream-based approach, it does handle all the known use cases cleanly.

Oh, I missed Robert's objections. Sorry, I don't understand the problem here. The way Kuromoji works, it uses a language model that is trained from a corpus of text to do tokenization. We just want to use a different model trained on a different set of text. I'm not clear why that is seen as a bug.  It's not a new file format; it's different contents using the existing file format. The format is not proprietary, it was promoted by Mecab I think, which is the tool used to train the dictionary, and is open-source.

Oh, I missed Robert's objections. Sorry, I don't understand the problem here. The way Kuromoji works, it uses a language model that is trained from a corpus of text to do tokenization. We just want to use a different model trained on a different set of text.

Use the gradle build to make a jar then.

The format is not proprietary, it was promoted by Mecab I think, which is the tool used to train the dictionary, and is open-source.

It is proprietary because the FST in the TokenInfoDict is a lucene specific version. The format may change and due to changes in the algorithm we may have a different format. We have no version numbers in the file format.

I will leave that PR open for discussion. I just implemented the minimal approach + test to make the API compatible to classpath.
We can still allow to use the IOSuppliers, but then we must remove the Path ctor, too. And we need a PR for both Nori and Kuromoji.

Uwe explains it clearly, such APIs are impossible to support correctly and we don't need to add backwards-compatibility or anything else.
Files such as ConnectionCosts.dat are not standardized or anything like like that, this is internal details. If we want to make a PR to save 1 byte compressing this file a bit better, we should be able to merge it without hesitation or worrying about back compat or any other insanity.
We can't and shouldn't support ctors taking binary versions of this stuff.

Use the gradle build to make a jar then.

Is the idea that we would fork analysis/kuromoji package? That would be sad, but maybe you meant something else? Uwe mentioned some kind of classpath-loading approach, but I think that would depend on the classpath order, which is really fragile and not reliable in my experience. Still I may be missing something. If we are going to remove a feature that was supported in 9.0 (and before), can we please clearly document how we can support the same use case going forward?

Also - I don't really buy the idea that we can't support binary file formats - the entire index is filled with binary files. In this case we provide tools for generating these files, so users are free to regenerate them from source when Lucene version changes. There's no need to backwards-compatibly support old formats.

I have complex feelings about it and I understand both opinions...
Current APIs in 9.x to load custom resources are not perfect (or bad, I dare to say), meanwhile "customizable/switchable dictionary" is a general idea and advanced users would often need it. We still don't have good APIs to support such advanced users - skilled developers who possibly could contribute to Lucene - personally, I'd like to continue discussions of how to improve our current APIs, instead of simply discarding them.

Also - I don't really buy the idea that we can't support binary file formats - the entire index is filled with binary files. In this case we provide tools for generating these files, so users are free to regenerate them from source when Lucene version changes. There's no need to backwards-compatibly support old formats.

This is still odd, because we have not much error handling in those file formats, because the code was written to load it from the JAR file, so it is basically more or less a dump of the FST and ConnectionCosts. Sure you can regenerate them, but what is the issue in then also call gradlew jar? I think that's the main issue here: You need Lucene's source code anyways to build the dictionaries, you have to put the source files somewhere, so you actually forking lucene at that point.
If we really want to support external dictionaries we should refactor the API so you can load just one combined (CFS/ZIP like file) that you can easily drop anywhere. This file would encode some version number in it and if you load a file thats not using actual version it bails out.
What I would propose:

Add a gradle task that builds a dictionary package and that should be the same for Nori and Kuromoji, just different input files
Have the same factory class and exact same implementation for both dictionaries (I think @mocobeta is working on this). So a user should be able to load a single (zip-like) file and pass it to analyzer/tokenizer and it will automatically be Nori or Kuromojo, no matter what. The API is then very simple: MorphologicalModel#load(aSingleFileNameOrURLOrInputStream)
The default Tokenizers shipped in Lucene have no custom ctors, so JapaneseTokenizer behind the scenes loads a single japanese dictionary file from classpath. Anybody wanting to load any other file will use a generic tokenizer impl. The Japanese one shipped with lucene uses its default dictionary. Maybe we could also put the tokenizer in its separate JAR file (for both Japan and Korea) and ship the defacult dictionaries as separate JAR files on Maven central.

The main desaster is the number of files which also makes it very error-prone.

To come back to current issue: I see no problem in this PR it does not make it worse, just better. Path and URI are just holders of a resource. Path is used for filesystem, URL is returned by getResource() methods. I would like URI more, but Java's classloading uses URL also with modue system, so it is the only "correct" way to refer to a resource in a class or module loader. I know, Robert does not like some details of the URL class, but they don't us here. The new API is definitely better than the old deprecated one, which was also broken from beginning leading to the confusion that @msokolov has seen.
We should mark the Path and URL APIs with @lucene.internal and warn users that we provide no garantiees when you use it.

The alternative would be - as said before - remove Path ctors and use IOSupplier only. But that's worse (maybe it prevents people from doing this, haha).

I know, Robert does not like some details of the URL class, but they don't hit us here.

https://twitter.com/tnurkiewicz/status/1519643900423688192
Sorry, couldn't resist

I see no problem in this PR - it does not make it worse, just better.

Thanks @uschindler, I totally agree with that.
I am +1 to this PR and keeping IOSupplier-based ones private.

Ah sorry for my vague comment, I know the difference between URI and URL; and I understand there is no problem in using URL here.
I think we can ship this with 9.2? As an engineer who belongs to a company (the scale of it is very different though), I think I understand Mike's position and argument.

Sure, I would proceed with this plan and merge to 9.x and main. If we have better ideas (like proposed earlier) for main we can change it there.

I still don't know if we can fix the deprecated ctors to handle the CLASSPATH resource name correctly. In my original LUCENE-10335 change it was still working (we had a test for it), but it seemed to have been broken after change to IOSupplier<InputStream>.
Let me look and try to reintroduce the Lucene 9.0 and previous behaviour of the deprecated ctor. I am out of office now, maybe later this evening!

I think I can fix the old ctor so it works again.

I pushed a fix forthe deprecated one (+ test). I will fix Nori when back at home.

I know how to disable lift it by telling him to scan no files at all: we can place a gitignore like file

Liftbot was disabled by INFRA.

Hi @msokolov: I restored the original behaviour of the deprecated ctor. Could you try with your original code of 9.0 using the deprecated APIs that the custom dictionaries are loaded from classpath?
Of course you should move to the URL APIs, but we should ensure that the old deprecated code works correctly. I added a test to verify, but I just want to be sure.

Liftbot was disabled by INFRA.

Many thanks!

I did some more changes to the inconsistent API. We cannot support all "old" usage. If somebody calls the deprecated TokenInfoDictionary ctor with a null path, heshe gets a message to use default ctor instead. We can't support this usage anymore. It was especially not consistent, so some ctors of dict classes broke by this others worked.
I will later add a MIGRATE.txt as asked by @msokolov and will add detailed changes. I hope this now fits the historic usage.
Thanks,
The Backwards Compatibility Policeman

I tried to hide some sonatype noise as Spam but github thought I was calling Uwe's comment Spam - sorry! I don't see how to undo that. Anyway I tested the latest version here with our existing 9.0 kuromoji usage, and it seems to work fine. Thanks everyone! I will certainly switch our code over to the URL version.

OK great, I will add some migration text and a good changes entry. So we have restored 9.0/earlier behaviour. Thanks @msokolov for trying out.
Sorry for the noise, but luckily INFRA disabled the bot spam. We hit some bug that you were not even able to silence it, so it complained after every push. I willl keep my attempt to disable it in the repo (see my commit yesterday to main/9.x), but because bot is disabled its obsolete now.

The Backwards Compatibility Policeman

couldn't resist.

Changes added waiting for precommit checks before merge. Will open another PR for the forward port of the URL APIs.

See #871 for the port to main

here's Jenkins flavoured Policeman. sorry i might be a bit tired.

Do you allow to place this image on the Policeman Jenkins Server as Logo instead of the old picture? 🙏

@uschindler Sure, please feel free to download and use it anywhere. It's a collage of images from Duke Project (BSD), Lucene Logo (AL2), and royalty-free images I got from the Internet (police cap and mustache).

...and here's the Unicode Policeman version (final). Sorry again I need something while I'm waiting for a time-consuming batch.

I couldn't come up with a good idea for "Generics Policeman".

I replaced the logo: https://jenkins.thetaphi.de/
The favicon needs to be transparent, have to figure out how to do this. Problem are the hands have no border.

Oh, thanks!
Yes I filled the hand with white (without border) to put batler's gloves on Duke.
Maybe Lucene's logo should be larger for a favicon. Let me adjust it.

I think this version is more suitable for small icons if you like this.
(transparent)

(gray background)

OK changed it. The transparent one is not good for the headshot icon in the black bar (the color of bar is defined by jenkins and not easy to change). The Image is injected by the frontend reverse-proxy-webserver as replacement for the original Jenkins SVG image. Idid not change the favicon yet, but I tend to think the duke with hat is enough there. Maybe replace the Lucene icon only.
Maybe we should send emails privately to improve the icon.

The favicon looks good to me as is, thanks and sorry for the noise!

The favicon looks good to me as is, thanks and sorry for the noise!

No need to apologize!  This noise (beautiful art works) are the best part of this PR, to me!  I wish all of our PRs/issues ended this way :)

FYI, it's oss with decent licenses so I created a repository for the new mascots.
https://github.com/mocobeta/unofficial-lucene-mascot


Fix scaffold template with namespace and --model-name option

close https://github.com/rspec/rspec-rails/issues/2532
Fixed the behavior of scaffold template when namespace and --model-name option passed.
$ rails g scaffold_controller admin/products --model-name=product

describe "POST /create" do
  context "with valid parameters" do
    it "creates a new Product" do
      expect {
        # Here, I expected `{ product: valid_attributes }` like the test of update action
        post admin_products_url, params: { admin_product: valid_attributes }
      }.to change(Product, :count).by(1)
    end
    # ...
end

This is because ns_file_name method that is called in scaffold template returns admin_product when namespaced.
https://github.com/rspec/rspec-rails/blob/ba2d66abf275fe1f490c3ed219459e42698936d6/lib/generators/rspec/scaffold/scaffold_generator.rb#L79-L83
So, I replaced ns_file_name to singular_table_name in scaffold templates.
Also, I added some tests to ensure that templates works in the old way when the --model-name option is not passed.

Nice, thank you!
What happens if you don't specify  --model-name=card in rails g scaffold_controller admin/cards, will it behave in the old way, will it use admin_cards (admin_products from the ticket's example)?
In case no specs fail, would you please add some examples to prevent from regression to spec/generators/rspec/scaffold/scaffold_generator_spec.rb?

@pirj Thank you for quick response!

What happens if you don't specify --model-name=card in rails g scaffold_controller admin/cards, will it behave in the old way, will it use admin_cards (admin_products from the ticket's example)?

Thanks for pointing that out. If I remove --model-name=card, it behaved in the old way like below:
describe "POST /create" do
  context "with valid parameters" do
    it "creates a new Admin::Card" do
      expect {
        post admin_cards_url, params: { admin_card: valid_attributes }
      }.to change(Admin::Card, :count).by(1)
    end
   # ...
  end
end

Is this the behavior that you expected?

In case no specs fail, would you please add some examples to prevent from regression to spec/generators/rspec/scaffold/scaffold_generator_spec.rb?

OK! I'll try it.

Is this the behavior that you expected?

Yes, perfect. Thank you!

@pirj
When I run rails g scaffold_controller admin/cards --model-name=card  --controller_specs in a example app, the controller spec may have a same situation of this issue.
describe "POST #create" do
  context "with valid params" do
    it "creates a new Card" do
      expect {
        post :create, params: {admin_card: valid_attributes}, session: valid_session
      }.to change(Card, :count).by(1)
    end
    # ...
  end
end

Should this file be fixed as well?
https://github.com/rspec/rspec-rails/blob/d3e7b85877fcbcec63f8a76434d8750e7f3b7aef/lib/generators/rspec/scaffold/templates/controller_spec.rb#L82

It would be great if you're up for it.

We have to change templates/api_request_spec.rb too, there is the same problem.

@pirj @PedroAugustoRamalhoDuarte
Finally, I fixed the following files because they had the same problem.

templates/request_spec.rb
templates/api_request_spec.rb
templates/controller_spec.rb
templates/api_controller_spec.rb

And also, I added some examples to prevent from regression. Please check🙏

Thanks for tackling this


Misleading validation text for UK QR Codes

Describe the bug

When a UK QR code is scanned, the app treats it exactly like an EU Digital Covid Certificate. If it finds one dose of a two-dose vaccine, it says the pass is valid only in Italy. If it finds two doses, it says the pass is valid in Italy and Europe.
However, not all european countries recognize the NHS Covid Pass (UK) as equivalent to the EUDCC.
Expected behaviour

The app should correctly identify the QR code as a valid two-doses vaccine certificate from the UK (or other types), and inform the user that it is valid in Italy and in some european countries that chose to accept the pass, but not all.
Steps to reproduce the issue

Scan any NHS Covid Pass (two doses)

Possible Fix

Change the wording when the issuing country is the UK
Suggested Text
Certificazione valida in Italia e in alcuni paesi Europei
Cosa si può fare con la certificazione verde COVID-19 (same as the original)
Attenzione! Il pass britannico 🇬🇧 è riconosciuto solo da alcuni paesi dell'Unione Europea. (small, orange font)

@cesaregardito I reported this problem to the team, in the next version the app is going to specify it using something like
“il QR è valido in Italia e in Europa, ma per l’Europa l’utente deve verificare i criteri di accettazione del paese di destinazione”


filter condition with string.Empty fails to getRows from table

Which service(blob, file, queue, table) does this issue concern?
Table
Which version of the Azurite was used?
3.22.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What's the Node.js version?
v18.14.2
What problem was encountered?
Noticed a functionality change when calling TableStorage to fetch all rows in it.
When we try calling the Get table client following parameters:
Filter: string.Empty
ContinuationToken: null
maxPerPage: 20
This operation succeeds in our production code against Azure Storage and even succeeds against
Azure Storage Emulator.
However this fails against Azurite.
Steps to reproduce the issue?
Please use the following code snippet as reference:
tableClient = CreateGetTableClient();

tableClient.QueryAsync<TableEntity>(
    filter: string.Empty,
    maxPerPage: 20,
    select: null,
    cancellationToken);

_QueryAsync()_  is part of TableClient class under namespace "Azure.Data.Tables;"
If possible, please provide the debug log using the -d parameter, replacing <pathtodebuglog> with an appropriate path for your OS, or review the instructions for docker containers:
-d "<pathtodebuglog>"

Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.
     2023-03-29T13:05:49.662Z 20f76b43-8584-434d-88cb-993bf20324f7 info: TableStorageContextMiddleware: RequestMethod=GET RequestURL=http://<IP_ADDRESS>/devstoreaccount1/ArchiveStreamsTable()?$format=application%2Fjson%3Bodata%3Dminimalmetadata&$top=20&$filter= RequestHeaders:{"host":"<IP_ADDRESS>:10002","x-ms-version":"2020-12-06","dataserviceversion":"3.0","accept":"application/json;odata=minimalmetadata","x-ms-client-request-id":"3df45738-de61-4b0c-8faa-062a52738c79","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.7.1 (.NET 6.0.15; Microsoft Windows 10.0.19045)","x-ms-date":"Wed, 29 Mar 2023 13:05:49 GMT","authorization":"SharedKeyLite devstoreaccount1:qfkZCLgrpopRpOwmPHNKfkG5lacg9vMF4/cxkUj2TU8="} ClientIP=<IP_ADDRESS> Protocol=http HTTPVersion=1.1     2023-03-29T13:05:49.662Z 20f76b43-8584-434d-88cb-993bf20324f7 debug: tableStorageContextMiddleware: Dispatch pattern string: /ArchiveStreamsTable()     2023-03-29T13:05:49.662Z 20f76b43-8584-434d-88cb-993bf20324f7 info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=ArchiveStreamsTable     2023-03-29T13:05:49.662Z 20f76b43-8584-434d-88cb-993bf20324f7 verbose: DispatchMiddleware: Dispatching request...     2023-03-29T13:05:49.662Z 20f76b43-8584-434d-88cb-993bf20324f7 info: DispatchMiddleware: Operation=Table_QueryEntities     2023-03-29T13:05:49.662Z 20f76b43-8584-434d-88cb-993bf20324f7 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.     2023-03-29T13:05:49.663Z 20f76b43-8584-434d-88cb-993bf20324f7 info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.     2023-03-29T13:05:49.663Z 20f76b43-8584-434d-88cb-993bf20324f7 info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Wed, 29 Mar 2023 13:05:49 GMT\n/devstoreaccount1/devstoreaccount1/ArchiveStreamsTable()"     2023-03-29T13:05:49.663Z 20f76b43-8584-434d-88cb-993bf20324f7 info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:qfkZCLgrpopRpOwmPHNKfkG5lacg9vMF4/cxkUj2TU8=     2023-03-29T13:05:49.663Z 20f76b43-8584-434d-88cb-993bf20324f7 info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.     **2023-03-29T13:05:49.663Z 20f76b43-8584-434d-88cb-993bf20324f7 verbose: DeserializerMiddleware: Start deserializing...     2023-03-29T13:05:49.663Z 20f76b43-8584-434d-88cb-993bf20324f7 info: HandlerMiddleware: DeserializedParameters={"options":{"queryOptions":{"format":"application/json;odata=minimalmetadata","top":20,"filter":""},"requestId":"3df45738-de61-4b0c-8faa-062a52738c79","dataServiceVersion":"3.0"},"version":"2020-12-06"}     2023-03-29T13:05:49.665Z 20f76b43-8584-434d-88cb-993bf20324f7 error: ErrorMiddleware: Received a MiddlewareError, fill error information to HTTP response     2023-03-29T13:05:49.665Z 20f76b43-8584-434d-88cb-993bf20324f7 error: ErrorMiddleware: ErrorName=StorageError ErrorMessage="The query condition specified in the request is invalid."  ErrorHTTPStatusCode=400 ErrorHTTPStatusMessage=undefined ErrorHTTPHeaders={"x-ms-error-code":"InvalidInput","x-ms-request-id":"20f76b43-8584-434d-88cb-993bf20324f7","x-ms-version":"2021-12-02"} ErrorHTTPBody="{\"odata.error\":{\"code\":\"InvalidInput\",\"message\":{\"lang\":\"en-US\",\"value\":\"The query condition specified in the request is invalid.\\nRequestId:20f76b43-8584-434d-88cb-993bf20324f7\\nTime:2023-03-29T13:05:49.664Z\"}}}" ErrorStack="\"StorageError: The query condition specified in the request is invalid.\\n    at StorageErrorFactory.getQueryConditionInvalid (***\\\\source\\\\Azurite\\\\dist\\\\src\\\\table\\\\errors\\\\StorageErrorFactory.js:79:16)\\n    at LokiTableStoreQueryGenerator.generateQueryForPersistenceLayer** (***\\\\source\\\\Azurite\\\\dist\\\\src\\\\table\\\\persistence\\\\LokiTableStoreQueryGenerator.js:27:49)\\n    at LokiTableMetadataStore.queryTableEntities (***\\\\source\\\\Azurite\\\\dist\\\\src\\\\table\\\\persistence\\\\LokiTableMetadataStore.js:252:67)\\n    at TableHandler.queryEntities (***\\\\source\\\\Azurite\\\\dist\\\\src\\\\table\\\\handlers\\\\TableHandler.js:316:81)\\n    at ***\\\\source\\\\Azurite\\\\dist\\\\src\\\\table\\\\generated\\\\middleware\\\\HandlerMiddlewareFactory.js:58:18\\n    at ***\\\\source\\\\Azurite\\\\dist\\\\src\\\\table\\\\generated\\\\ExpressMiddlewareFactory.js:77:63\\n    at Layer.handle [as handle_request] (***\\\\source\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\layer.js:95:5)\\n    at trim_prefix (***\\\\source\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:328:13)\\n    at ***\\\\source\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:286:9\\n    at Function.process_params (***\\\\source\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:346:12)\""     2023-03-29T13:05:49.665Z 20f76b43-8584-434d-88cb-993bf20324f7 error: ErrorMiddleware: Set HTTP code: 400     2023-03-29T13:05:49.665Z 20f76b43-8584-434d-88cb-993bf20324f7 error: ErrorMiddleware: Set HTTP Header: x-ms-error-code=InvalidInput     2023-03-29T13:05:49.665Z 20f76b43-8584-434d-88cb-993bf20324f7 error: ErrorMiddleware: Set HTTP Header: x-ms-request-id=20f76b43-8584-434d-88cb-993bf20324f7     2023-03-29T13:05:49.665Z 20f76b43-8584-434d-88cb-993bf20324f7 error: ErrorMiddleware: Set HTTP Header: x-ms-version=2021-12-02     2023-03-29T13:05:49.665Z 20f76b43-8584-434d-88cb-993bf20324f7 error: ErrorMiddleware: Set content type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8     2023-03-29T13:05:49.665Z 20f76b43-8584-434d-88cb-993bf20324f7 error: ErrorMiddleware: Set HTTP body: "{\"odata.error\":{\"code\":\"InvalidInput\",\"message\":{\"lang\":\"en-US\",\"value\":\"The query condition specified in the request is invalid.\\nRequestId:20f76b43-8584-434d-88cb-993bf20324f7\\nTime:2023-03-29T13:05:49.664Z\"}}}" 2023-03-29T13:05:49.666Z 20f76b43-8584-434d-88cb-993bf20324f7 info: EndMiddleware: End response. TotalTimeInMS=4 StatusCode=400 StatusMessage=Bad Request Headers={"server":"Azurite-Table/3.22.0","x-ms-error-code":"InvalidInput","x-ms-request-id":"20f76b43-8584-434d-88cb-993bf20324f7","x-ms-version":"2021-12-02","content-type":"application/json;odata=minimalmetadata;streaming=true;charset=utf-8"}
Have you found a mitigation/solution?
I noticed that the issue does not occur when we set filter = null instead of filter = string.Empty()
However this change needs to be done in our production service code, which is currently working fine when interacting with AzureTableStorage with string.Empty.
So we want to check if there is change needed in Azurite instead to support the same, so that it can accept string.Empty as parameter.

I"ll take a look

Hi
Checking to see if there was any update.
Thank you.

Hi
checking back on this.

Hi Checking to see for any update.
thank you.

Hi @edwin-huber
Checking to see if verifying and fixing the issue would take longer, Just want to review options with my team
for unblocking our azurite migration task.
Thank you.

Thank you, really appreciate it :-D

This is resolved.
Test case is included.


ValueOnly Schema for JSON

Part 2 introduces a ValueOnly Serialization, including a JSON schema. We need to:

[ ] add this schema also to the JSON folder,
[ ] extend the README file of the folder to explain its usage and intention.

@constantinziesche will create a PR for this issue.

@sebbader please don't forget to put all this on the https://github.com/admin-shell-io/aas-specs/tree/draft-V3RC02-schemas branch.

Release and adjustment have already been done with the release


404+cached views

Added cached query sets
updated docs
added 404 page (not viewable until server is fixed)

Django Security Check identified issues:
System check identified some issues:
WARNINGS:
?: (security.W005) You have not set the SECURE_HSTS_INCLUDE_SUBDOMAINS setting to True. Without this, your site is potentially vulnerable to attack via an insecure connection to a subdomain. Only set this to True if you are certain that all subdomains of your domain should be served exclusively via SSL.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W018) You should not have DEBUG set to True in deployment.
?: (security.W021) You have not set the SECURE_HSTS_PRELOAD setting to True. Without this, your site cannot be submitted to the browser preload list.
System check identified 4 issues (0 silenced).


previous-version - Restore feature

close: #7424
Screenshot

Thank you! Would you be able to change the feature to include a label? I feel that it's nearly invisible there. This could be accomplished by using historyButton.cloneNode(true) and then changing the label and icon.

@fregante

Maybe we just need add the label in the a tag?

That works too 👍


Fix title / subtitle bug when embedding quorum

Small little bug where the overload function is never called so the original function will always have the title and subtitle be undefined.
Also refactored it a bit to utilize javascript default arguments instead of undefined checks.

Thank you for the change. We took a look and it seems good to us.


Yosys-vivado failure on picosoc-spimemio

There is a yosys-vivado toolchain failure in one of the test projects, which is causing CI to fail. This is most probably due to the latest yosys package, which has been updated to use upstream yosys:
ERROR: picosoc-spimemio yosys-vivado basys3 test has failed (build type generic, build nr. 000)

ERROR MESSAGE:  [...]
7d04310e132\$lut for cells of type $lut.
Using template $paramod$5678aabaf38638ff6c60e03d865caa8704f4fb95\$lut for cells of type $lut.
Using template $paramod$500825ce3d3051f95f0970672a43b19de1ca0012\$lut for cells of type $lut.
Using template $paramod$3752cc190b504e0d74d40c2d0e5e82c39cb5ff29\$lut for cells of type $lut.
Using template $paramod$21efccf29b21389022231a5ef010f482e0b353f1\$lut for cells of type $lut.
No more expansions possible.

3.48. Executing XILINX_DFFOPT pass (optimize FF control signal usage).
terminate called after throwing an instance of 'std::out_of_range'
  what():  dict::at()
Aborted (core dumped)
picosoc-spimemio.mk:13: recipe for target 'picosoc-spimemio.edif' failed

If this is happening with unmodified upstream Yosys, please report it as a bug there - this definitely shouldn't be failing this way even if hypothetically there is a problem with the design/flags.

@daveshah1 Sure, I wanted to keep track of this here, and,  before opening an issue upstream I wanted to debug what might be the cause of the failure (maybe is a flags/design issue indeed).


Median detection

This is closely related to #89 but there is no issue that details the requirement, hence this issue.
The game does not have any concept of medians. They are purely visual, generated by the road prefab mesh. In other cases, it's not even the mesh that depicts the median, but the road texture (think striped line lane in middle of road).
This poses issues for both pathfinding and DLS. Vehicles should not be able to cross medians; medians should be treated as barriers.
In #243, the proposed solution is to identify medians based on distance between adjacent vehicle lanes.
Note that a road could have median between lanes in same direction. Some examples and illustrations are shown in #89.
What is required:

Agree on how to identify medians

We should document this as it's important for asset creators

Scan road prefabs on startup to work out which have medians (and where)

This should be cached, and needs to be available to pathfinder, DLS, parking AI, etc

We might need some sort of "fudge list" to deal with unusual roads

Some roads might look like they have medians, but don't have medians
Others might appear not to have medians, but they actually do (how to specify where?)

Pathfinder, DLS, Parking AI and and anything else which must respect medians (eg. reckless driver AI?) will need updating
As AIs will be using it, it needs to be very high performance (do not assume viability of moving all the AIs to different threads)
Some roads have "toggleable medians" at junctions (see #89). Usually the toggle is traffic lights; the median is shown unless the junction has traffic lights.

Would need a list of workshop ids (and specific prefabs in that asset) to determine which roads are applicable
Different elevations, Elevated, Bridge, Slope, Tunnel, might behave differently than Ground elevation

Several tools would need updating to handle medians properly - in particular lane arrows/connector and timed traffic lights, but possibly also others.

Just looking through code of the PR referenced above:
A median is defined as:

Gap of 1 meter or more between adjacent lanes
Lane of different vehicle type (although bear in mind things like trams, and also on some crazy roads even trains!)

Also, it can affect much more than just path finder, for example:

Routing manager
Lane connector
etc...

Tagging #89

Gap of 1 meter or more between adjacent lanes

I am wondering how this 1-meter threshold was determined. All of new CSUR, old CSUR, and part of CSUE roads have lane widths of 3 m while their lanes are separated by 3.75 m. This gives a 1.5 m gap between adjacent lanes. If the 1 m median threshold were implemented, lane changing in all CSUR roads (old/new) and some CSUE roads will be entirely forbidden. For compatibility with these existing assets on the Workshop, I would suggest increasing the median threshold to 1.5 or 2 meters.
If there is indeed a strong reason against using a larger threshold than 1 m, we may make the new CSUR compatible with the future TM:PE version by either rebuilding all road assets or a hot fix after loading the game. However the 1-meter median detection will likely make all of the old CSUR roads unusable.

The 1m gap thing came from #243 I think (author of NExt2). It's not set in stone, it's just what was propposed by that PR. If there is a better value we'll use that.
This is the main problem with medians; we have no freaking clue how to reliably identify them (other than something crazy like building a massive list of road asset IDs and manually defining the medians on them all).
There are some potential indicators (I guess, I don't really know that much about road assets) - things like spotting a prop/tree lane (I assume those exist?) or a pedestrian lane could indicate median between road lanes. But in many cases central medians on avenue roads are just empty spaces between lanes.
Maybe for the empty spaces we could look at median gap between road lanes and anything bigger than that treat as a median?
Any info you could provide that could help us narrow down a reliable way to identify medians in general for any road would be much appreciated. Also if there's any way to determine if a median allows crossing at a junction or whether it's a "hard median" (eg. a barrier across it as seen with some workshop roads) that would be extemely useful for guiding bulk junction policy applicators that are currently being developed.

I see you already posted some info that can help with continuous median detection: https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/649#issuecomment-583793405
@kianzarrin this might be useful for the stuff you're working on?

I'm not very familiar with roads outside CSUR, so these are my general ideas about road assets based on how CSUR was made. Let's just assume that most road asset creators are responsible and don't randomly mess with parameters in their roads, such as a 4 m wide lane next to a 3 m wide lane.
Median detection using lane spacing
Starting with vanilla roads, the lane separation is about 3 m in regular (non-highway) vanilla roads and about 4 m in vanilla highways, and these lanes are correspondingly 3 m wide in regular roads and 4 m wide in highways. Then, a car lane in a road asset is likely 3 m wide if it used a regular road as template and is likely 4 m wide if it used the highway as template. For skinnier highway assets, like the SHUTO expressway, the lane width is likely decreased from the 4 m default.
Among road assets using regular roads as template, CSUR likely has the largest lane separation of 3.75 m. The narrowest hard median in CSUR is 1.875 m separating local and express roadways in a road, giving a 2.625 m spacing between two non-cross-able lanes. Solely based on compatibility with CSUR (old and new), a threshold between 1.5 m and 2.625 m can be used to detect medians.
For roads without dedicated bus or tram lanes, case in #89 would be much rarer, and the major concern of median detection is to prevent cars from crossing between local and express roadways in roads with "planting strip" medians. As far as I know, there are very few roads with separated local and express lanes outside CSUR. Typically, the local/express median would be narrower than central medians, which also justified that 1.5 m -- 2.625 m is a reasonable range for the median detection threshold.
Median detection using additional lanes
In vanilla 4-lane roads with medians, there is a prop lane at 0 position for road light and trees with laneType None and vehicleType None. The lane at 0 position is also used by Network Skins 2 to customize trees on the median. If an asset creator makes a road from the 4-lane road template, it is very likely that they keeps the median lane in the road asset. Therefore, a non-traffic lane between two opposite car lanes is a very strong indicator of the existence of a median.
Hard medians at intersections
CSUR extensively implements continuous medians at intersections when a divided road intersects another road (see #649). Solely for the CSUR case, when the traffic lights are turned off for an intersection with at least 2 roads with medians, traffic should not cross any median (both central median across incoming traffic and local-express median) when passing the intersection. The same logic may be applicable to any road asset with medians and traffic lights on by default, because continuous medians only make sense when traffic lights are off. (For vanilla roads one may manually plop a median across a non-trafficlight intersection to achieve this effect) A more robust way is to just apply this to roads with continuous medians. This can be done by searching for a direct connect node with TrafficLights in its m_flagsForbidden property. For highways with continuous medians, the direct connect node may always exist regardless of traffic lights on/off, but the median crossing problem can be probably fixed by just applying the highway rule.

Just a random note for anyone who works on this: With regards to non-vehicle lanes, just a note that some decorative networks might show as false positives (appear like a road but actually not containing any vehicle lanes at all). See #510 and #513

My direct connect mods can change median connection at junctions based in TMPE rules. so there is median if There are no criss crossing lanes at junctions.

Given Kian's mods, can this issue #503 now be closed?

Mod: Continues Junction Median

Also, a bunch of other median-related stuff is now being tracked in #1223 (any remaining node-specific stuff will be added to #1223 too).

Closing this as it's now all tracked in #1223


Add a new rule to check the location of dynamic references

Issue #, if available:
#297
Description of changes:

Add rule E1027 to check if dynamic references are being used with the correct properties.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Hi! This is awesome, but the limitation is only for ssm-secure dyn refs.


dracut: run emergency.target on ignition/torcx service unit failure

dracut: run emergency.target on ignition/torcx service unit failure
This PR isolates emergency.target when ignition units fail, ensuring that we don't end up with a boot loop in initramfs.
How to use
emerge-amd64-usr bootengine coreos-kernel

Testing done
Tested with invalid ignition configs from https://github.com/kinvolk/Flatcar/issues/434 and https://github.com/kinvolk/Flatcar/issues/468. In both cases the boot now stops and the user sees the ignition error on the console.

Wonderful, it stops with a red error message about the wrong configuration, and shows the dracut emergency shell prompt :heart:


fixed settings.py

Fixes: issue #18
-> Updated settings.py file
-> Ran tests locally: Successfull
-> Database Migration: True
-> local settings: to be added by admin
GSSOC' 2021

initialized variable because in line 166 and 168 value of those variables are assigned to themselves without any initial value so I have added an initial value to those variables


Missing View Proposing Phase

According to Paxos Made Practical, the first phase of leader election is proposing a new view. The current implementation skips this phase. Thus, for the leader election process under the current implementation, only two nodes will be involved. The restarted node will be blocked outside due to the mismatch of view id. Since two nodes still can come into consensus, I'll skip this problem for now.

Hi Rui:
The restart node won't be blocked out, if it sees a higher view id, it will
update to the higher view. Because we only care about static node group.
On Sun, Feb 22, 2015 at 12:22 AM, Rui Gu<EMAIL_ADDRESS>wrote:

According to Paxos Made Practical, the first phase of leader election is
proposing a new view. The current implementation escape this phase. Thus,
for the leader election process under the current implementation, only two
nodes will be involved. The restarted node will be block outside due to the
mismatch of view id. Since two nodes still can come into consensus, I'll
skip this problem for now.
—
Reply to this email directly or view it on GitHub
https://github.com/milannic/libevent_paxos/issues/8.

--
Cheng Liu
Candidate For The Master Of Computer Science In December 2014
Department Of Computer Science
Columbia University In The City Of New York, United States 10025
+1(347)-409-3268

the insight is that, if there is a view with higher id, it means at least
the quorum has agreed to that, then node can safely switch to that view
because there won't be any divergence. please check the logic when the node
sees a different view in the source code.
On Sun, Feb 22, 2015 at 12:22 AM, Rui Gu<EMAIL_ADDRESS>wrote:

According to Paxos Made Practical, the first phase of leader election is
proposing a new view. The current implementation escape this phase. Thus,
for the leader election process under the current implementation, only two
nodes will be involved. The restarted node will be block outside due to the
mismatch of view id. Since two nodes still can come into consensus, I'll
skip this problem for now.
—
Reply to this email directly or view it on GitHub
https://github.com/milannic/libevent_paxos/issues/8.

--
Cheng Liu
Candidate For The Master Of Computer Science In December 2014
Department Of Computer Science
Columbia University In The City Of New York, United States 10025
+1(347)-409-3268

Hi Cheng,
Thank you so much for the reply. Really appreciate it.
Let me put more details into this. So the current problem is, the view_id of restarted node won't be updated until the new leader is elected or at least view_id won't update in phase 1 and 2.  Thus, the view_id of the restarted leader will be outdated even when other nodes enter phase two. I found this because the other nodes keep throwing away the messages from the restarted node. I agree that the view_id will be updated eventually.
Btw, I'm assuming you don't expect the restarted node update its view by handling leader_election_close msg right?

Hi Rui:
Yes, since the leader election is very rare in our test environment, I
focus more on the safety. the leader is very powerful, and it can change
the boundary request of current view, then it may cause some divergence. I
made the decision that if a new leader is elected out, the leader election
cannot be canceled.  A insight is that as long as we have the quorum of the
nodes available, we can progress. When does the failed node return won't
affect the performance in most circumstances.
On Sun, Feb 22, 2015 at 10:29 AM, Rui Gu<EMAIL_ADDRESS>wrote:

Hi Cheng,
Thank you so much for the reply. Really appreciate it.
Let me put more details into this. So the current problem is, the view_id
of restarted node won't be updated until the new leader is elected or at
least view_id won't update in phase 1 and 2. Thus, the view_id of the
restarted leader will be outdated even when other nodes enter phase two. I
found this because the other nodes keep throwing away the messages from the
restarted node. I agree that the view_id will be updated eventually.
Btw, I'm assuming you don't expect the restarted node update its view by
handling leader_election_close msg right?
—
Reply to this email directly or view it on GitHub
https://github.com/milannic/libevent_paxos/issues/8#issuecomment-75449617
.

--
Cheng Liu
Candidate For The Master Of Computer Science In December 2014
Department Of Computer Science
Columbia University In The City Of New York, United States 10025
+1(347)-409-3268


[gym/rllib] WIP: Update checkpoint_dir so it is dependant on iteration number

Sorry I should have tagged the previous PR "WIP:". Can you do a quick review ? I am not certain to understand why Ray team made the changes that I am reporting here. I may have missed something.

Sorry I have no idea :/ I stopped keeping track of ray updates. I got bored that everything changes every month.


Question: What is a line image?

Regarding: "Place ground truth consisting of line images and transcriptions in the folder data/MODEL_NAME-ground-truth."
and "Transcriptions must be single-line plain text"
Is it possible for my line images and single-line plain text to consist of just 1 word? Will this impact training at all? Or do I have to use a line with several words for the ground truth? Thank you!

Don´t know man, i think in this case the only way to obtain this answer is by performing the full training followed by tests.

Is it possible for my line images and single-line plain text to consist of just 1 word? Will this impact training at all? Or do I have to use a line with several words for the ground truth? Thank you!

Sure, lines can be a single word or even a single character (like page number) but the less content is in the line, the less context available for the neural network to learn. Some very short lines don't hurt the training AFAICT but the overall training set should be representative of the data to detect later on.
The only thing really forbidden is ground truth text with newlines in them, i.e. multi-line "line" images.

performing the full training followed by tests

That is always best, obviously, and feel free to share your findings here as well if you do.

@NeilduToit13, I think your question was answered, so I close this issue.


[unitaryhack] Adding a power wrapper for Gates.

Description
Fixes orquestra-core/#14 by adding a power wrapper for Gate instances. The wrapper allows arbitrary powers of existing gates to be used without having to explicitly define them in code. This adds additional flexibity for those using Orquestra.

Codecov Report

Merging #27 (1275574) into main (6e1b5c5) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
+ Coverage   94.23%   94.28%   +0.04%
==========================================
  Files          68       68
  Lines        5519     5563      +44
==========================================
+ Hits         5201     5245      +44
  Misses        318      318

Impacted Files
Coverage Δ

src/orquestra/quantum/circuits/_gates.py
94.39% <100.00%> (+1.16%)
:arrow_up:

src/orquestra/quantum/circuits/_serde.py
98.21% <100.00%> (+0.10%)
:arrow_up:

src/orquestra/quantum/wavefunction.py
96.06% <0.00%> (-0.04%)
:arrow_down:

...questra/quantum/openfermion/chem/molecular_data.py
97.17% <0.00%> (-0.01%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e1b5c5...1275574. Read the comment docs.

Thanks for the review @AthenaCaesura! With regards to the formatting, which version of Black are you using? Maybe there are is some custom Black configuration that isn't included in pyproject.toml, if the version turns out not to be the discrepancy?

@upsideon you can find versions of the dev packages we're using here – we keep it there to make it easier to have it consistent across multiple repos :)
So for black it's black~=22.3, I think you might be using 21, as I think they changed the spacing around ** in between these versions.

Thanks, @mstechly! I've updated to Black 22.3 and applied the resulting style updates.

@upsideon maybe instead of providing your address here, just send me an e-mail at<EMAIL_ADDRESS>;)


Jupyter op powerup

You can have the source code and notebooks be symbolically linked or copied, you choose
If you choose to copy the notebook, you can overwrite the original using commit, optionally formatting your code
Automatically exports HTML when you're done
You can run in interactive or non-interactive mode (the latter will only show you the HTML export when finished)
Doesn't create temporary files for Python startup

Good changes! I really like the fact that you point to a notebook instead of a folder, and the optional clean argument :slightly_smiling_face:
It doesn't seem to be closing the notebook server/guild operation properly when I ctrl+c out of the run, it just sort of hangs until I repeatedly click ctrl+c. Does this happen for you? Would be kinda nice to fix.

I think it's guild which detects the ctrl+c on its own so I don't think that's possible to fix sadly. If you want the nice HTML export, you need to go to the Jupyter homepage and press "Quit" like a good boy

This could be made into a package at some point? Doesn't seem like we'll be changing it per project, and that way it's easier to keep track of versions.

Is this ready? @malyvsen @FelixAbrahamsson

Is this ready? @malyvsen @FelixAbrahamsson

We have an issue that needs to be solved before we can merge. The IPython kernel launches in the notebooks folder so it doesn't have access to any of the guild resources (prepare, model etc). The only reason the sourcecode symlink works is because guild (or something, we dont really know) appends the path to the root directory to sys.path, we're not actually using the sourcecode-symlink resource.
In the previous version this was solved by creating a python startup script which would change working directory to the guild run directory. It's kind of an ugly solution and it was one of Nick's ambitions with this change to remove that script, so it would be nice to solve it in some other way. I haven't been able to come up with a better solution though.
Another thing is that the working directory right now is the notebooks folder in root which means that anything you write to disk from your notebook at a relative path will be stored in the root directory. It's (imo) much nicer if it gets saved in the run directory.


Allow linking external services to the Load Balancer Service

To add support for adding Ips as targets to the LB

Looks like I've added a support for it already at some point

Tested with server version - v0.30.0-rc2
Able to link Load balancer services to external services using rancher-compose.
UI support is tracked in #1651


Improve Accessibility of application

Target: Achieve a perfect score for iati.cloud https://web.dev/measure/
Please remember to run an audit on all url's as this does not crawl the whole application.

Home: https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Ftest-datastore.iatistandard.org%2Fhome
About: https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Ftest-datastore.iatistandard.org%2Fabout
Documentation: https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Ftest-datastore.iatistandard.org%2Fdocumentation


Installation problem

Hi there!
I have zero knowledge of Rust, and I am trying to compile your code but I'm getting a lot of errors. My question: is there a method to run or install your program?
Thanks bro!
I am running Zorin 16 kernel 5.11

what is the content of /sys/class/dmi/id/board_name
and which version are you using (g14-perf-control --version). Background: I published 0.1.1 this morning because one of the rog libraries was updated to support more boards. Can you verify you are using 0.1.1?


Proposal: Lint JSDoc with Typescript

I think I can make this PR a bit cleaner by shuffling around some code, but this is the basic idea.
#65

this patch is currently blocked on https://github.com/Microsoft/TypeScript/issues/17953

That doesn’t work quite yet. .d.ts files from js will throw error.
I have a PR that I need to finish.
On Sun, Sep 3, 2017 at 11:29 AM Mohsen Azimi<EMAIL_ADDRESS>wrote:

@mohsen1 commented on this pull request.
In tsconfig.json
https://github.com/GoogleChrome/puppeteer/pull/219#discussion_r136722986
:

@@ -0,0 +1,11 @@
+{

"compilerOptions": {

do you want to enable "declaration" to get .d.ts files
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/GoogleChrome/puppeteer/pull/219#pullrequestreview-60302073,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA-JVMHz4M5WfyYPgGnOY9xDejYrzkA6ks5sevAHgaJpZM4OwQ4-
.

Closing in favor of #986 (which is a rebaseline of this one)


Managing calibration and other software options and parameters

As pointed out by @edsmall-bodc in euroargodev/argodmqc_owc#23 :

Currently the user has to define many things for the OWC toolbox to run:
For the update salinity mapping, they need to define:

Which data set they want to use from each WMO box (argo/CTD/bottle data) [though we have discussed how the WMO boxes could be phased out!]
The float name they want to analyse
The maximum number of historical casts they want to use during analysis
Whether or not they would like to use potential vorticity
Whether or not they would like to use special constraints around the subantarctic front
The latitude and longitude scales used for decorrelation (4 values)
The cross isobath scales (2 values)
The age scales (2 values)
The exclusion depth
The age exclusion parameter
Many of these parameters have a default value, but I know operators change them regularly

That brings variables for salinity mapping to 15, which is somewhat tricky to manage in a usable way. Either we will need to group some of these variables together (into classes or dictionaries?), OR we can split the update salinity mapping routine up into separate routines that can be called?

We may want to consider a set of options (as a dictionary) used throughout the package that users can set or change within context and in their script.
Most of the time, users will only need to modify a subset of the parameters.
This is a mechanism used in matplotlib (they also use files) and xarray that I implemented in http://www.github.com/euroargodev/argopy as well
It is very easy to manage and I think is rather elegant and intuitive in terms of user experience:
Optional parameters can be set 3 ways:

at the beginning of a script, notebook:

argopy.set_options(src='erddap')

in a temporary context:

with argopy.set_options(src='erddap'):
    loader = ArgoDataFetcher().profile(6902746, 34)

I love this one, because it will make very easy for users to test different parameters in a single script

or with options when calling methods:

loader = ArgoDataFetcher(src='erddap').profile(6902746, 34)

I'm afraid we gonna need to deal with this for the 1st Pypi release


feat(aws-lambda) supporting more regions

Supporting more AWS regions.

Opened against master at https://github.com/Mashape/kong/pull/2769.


Git repo checked in?

The most recent changes from a few hours ago result in this on successive npm installs:
npm ERR! path /Users/jcroft/Dropbox/GitHub/thebloxoffice-native/node_modules/react-native-masked-text
npm ERR! code EISGIT
npm ERR! git /Users/jcroft/Dropbox/GitHub/thebloxoffice-native/node_modules/react-native-masked-text: Appears to be a git repo or submodule.
npm ERR! git     /Users/jcroft/Dropbox/GitHub/thebloxoffice-native/node_modules/react-native-masked-text
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR!      /Users/jcroft/.npm/_logs/2019-04-08T01_54_41_908Z-debug.log
Thanks for a great package!

I have same issue

Hey @jcroft could you provide more info how to reproduce this issue?
What I did:

I created a new expo project
I installed the dependency
I tested with a CPF mask

It worked properly.

Will have more time to give you exact steps later, but what I was noticing was that it only happened on repeat installations of a project's deps. So, when I created a new project and installed react-native-masked-text, saving it to my package.json, there was no problem. But the next time I needed to npm install, I would get this error. I could uninstall the package, and again it would work on the first install but not on successive ones. Hope this helps for now. I downgraded to 1.11.1 and have no problems with it. :)

I have the same problem, only works in the first install.
Environment

Windows 10 1809
node 10.15.3
npm 6.9.0

Ok guys what I did:
I added the .git folder to the .npmignore.
I tried to install and reinstall and it worked properly but probably you need to remove the react-native-masked-text folder from the node_modules and install it again.
Sorry for the inconvenience =/


Different layout in C++'s composition and inheritance

Input C/C++ Header
class A {
  double X;
  int Y;
};

class B : public A {
  int Z;
};

Bindgen Invocation
bindgen test.hpp

Actual Results
ERROR:bindgen::codegen::struct_layout: Calculated wrong layout for B, too more 4 bytes

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct B {
    pub _base: A,
    pub Y: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_B() {
    assert_eq!(
        ::std::mem::size_of::<B>(),
        16usize,
        concat!("Size of: ", stringify!(B))
    );

C++ demonstration:
https://gist.github.com/not-fl3/1e2d478b6c74230c313fb4e1716b937b
Size of class is different  for composition and inheritance, also with different field's visibility.
Expected Results
Probably, correct represntation of c++ memory layout will be with embedded public fields from base class to derived class. Not actually sure about this.

Dupe of #380, thanks for the report though!
See there for details and a bit more analysis.


[WIP] Enable namespaced broker with webhook

Fixes #

Proposed Changes

Enable namespaced broker again
Enable webhook
Adjust tests for the new validation rules per webhook

Release Note

Docs

/retest

/retest

/retest

/test integration-tests-namespaced-broker_eventing-kafka-broker_main

/close
Closing in favor of https://github.com/knative-sandbox/eventing-kafka-broker/pull/2603


message_bus crashes rails server sporadically in development environment

Hard to say what exactly is happening right before it crashes but it's happening consistently for our developers. Most of the devs do not actually interact with message_bus. The JavaScript client may be loading but that would be it.
Most common thing I hear is, "It crashes after a while." I don't usually have my server running all the time, but I have seen this happen firsthand.
Also we were using Passenger 4 up until recently and we were seeing the exact same behaviour.

-
version

ruby
2.1.6-p336

puma
3.4.0

rails
<IP_ADDRESS>

message_bus
81619838aa54313faf278831b092db6126d3fcd9 (v2.0.0.beta.11)

Puma crash
Global messages on 12953 timed out, restarting process
- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2016-06-17 12:09:40 -0400 ===
- Goodbye!
Exiting

Stack trace that follows
message_bus-81619838aa54/lib/message_bus.rb:484:in `kill': No such process (Errno::ESRCH)
      from message_bus-81619838aa54/lib/message_bus.rb:484:in `block (2 levels) in new_subscriber_thread'
      from message_bus-81619838aa54/lib/message_bus.rb:481:in `fork'
      from message_bus-81619838aa54/lib/message_bus.rb:481:in `block in new_subscriber_thread'
      from message_bus-81619838aa54/lib/message_bus/timer_thread.rb:98:in `call'
      from message_bus-81619838aa54/lib/message_bus/timer_thread.rb:98:in `do_work'
      from message_bus-81619838aa54/lib/message_bus/timer_thread.rb:29:in `block in initialize'

the fix is fine, but I am concerned this is a different issue, maybe keepalive is not working for you in dev? you can disable that feature if you must.


LUCENE-9907: Make MonotonicBlockPackedReader/writer depend on DirectReader/writer

MonotonicBlockPackedReader and MonotonicBlockPackedWriter  are used in the FixedGapTermsIndexReader and FixedGapTermsIndexWriter respectively. Those readers/ writers from internally from PackedInts#getReader. This PR removes that dependency by using internally DirectReaders and DirectWriters instead.

Thanks @jpountz, I did not realise about that constraint.
I took a different approach: Similarly to Packed64, I read the data into a backing byte array and implement a get method that works directly on that array. MonotonicBlockPackedReader seems to be always used on heap (direct = false), therefore I remove the flag.


Cannot locate bc executable

Hi i always get an error i dont really understand.
Cannot locate bc executable
[Error] in command: exit $err

Remove Tor temporary configuration
Killing Tor process
Killed
Remove Tor DataDirectory: /tmp/orjail-orjail
Remove in-orjail network interface
Cannot find device "in-orjail"
Delete network namespace orjail
Cannot remove namespace file "/run/netns/orjail": No such file or directory
Cleaning up iptables rules...

You should install the program bc in the package manager odf your Linux distribution.
In Debian/Ubuntu/Linux Mint is easy as:
sudo apt-get install bc


Wire event watcher for LateConnections events

This wire event watcher for LateConnections event that increase the openshift_kube_apiserver_lateconnections_count prometheus metric.
A follow up would be to add Prometheus Alert.
Blocked on https://github.com/openshift/origin/pull/25126
/hold

/lgtm

/hold cancel

(we don't have to wait for origin, this will be no-op until that PR merge and this can get some testing cycles meanwhile ;-)

/retest


Buttons don't splash when hovered, turning black for one frame if 'unhovered'.

Hi,
I just updated flutter to the curret version (3.1.0-0.0.pre.2481) and checked my flutter web application if everything is still fine.
Unfortunately it is not. In the real application I experienced that the flash on a button click has some black glitches. So I hover, I click, it splashes, but the "outside area of the splash" is black. Or lets say a darker color than bevore the update. Can't tell for sure it is back.
I tried to produce  a minimal working example but was not able to reproduce the exact behaviour.
But there are till some strange things. Here is my code:
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {

    return MaterialApp(
      title: _title,
      home: Scaffold(
        appBar: AppBar(title: const Text(_title)),
        body: const MyStatefulWidget(),
      ),
      //theme: themeSettings,
    );
  }
}

class MyStatefulWidget extends StatefulWidget {
  const MyStatefulWidget({Key key}) : super(key: key);

  @override
  State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}

class _MyStatefulWidgetState extends State<MyStatefulWidget> {

  bool inFocus = false;

  @override
  Widget build(BuildContext context) {
    ButtonStyle buttonStyle = ButtonStyle(
        overlayColor: MaterialStateProperty.resolveWith<Color>(
                (Set<MaterialState> states) {
              if (states.contains(MaterialState.focused)) {
                return Colors.white;
              }
              if (states.contains(MaterialState.hovered)) {
                return Colors.orange;
              }
              if (states.contains(MaterialState.pressed)) {
                return Colors.yellowAccent;
              }
              return null; // Defer to the widget's default.
            }),
    );

    return Center(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[

          Container(
            color: Colors.blue,
              child: SizedBox(
                height: 100,
                width: 100,
                child: TextButton(
                  child: Text("Hi", style: TextStyle(color: Colors.black)),
                  onPressed: () {  },
                  style: buttonStyle,
                ),
              ),
          ),
        ],
      ),
    );
  }
}

So if I move the mouse on to the button the collor changes. Fine BUT:

If I move the mouse away from the button, the button color is black for one frame. This should not happen.
If I click the button, there is no splash. If I click the button and quickly move the mouse away from the button, I can see the rest of the splash animation. So somewhere there is a splash animation. But why there is no one if I leave the mouse on the button?

Maybe solving these problems solves also the problem in my main application.

it doesn't even compile, is it pre null safety stuff?
    ButtonStyle buttonStyle = ButtonStyle(
        overlayColor: MaterialStateProperty.resolveWith<Color>(
                (Set<MaterialState> states) {
              if (states.contains(MaterialState.focused)) {
                return Colors.white;
              }
              if (states.contains(MaterialState.hovered)) {
                return Colors.orange;
              }
              if (states.contains(MaterialState.pressed)) {
                return Colors.yellowAccent;
              }
              return null; // Defer to the widget's default.
            }),

does this code sample do what you intended?

I have migrated the code to null safety and I can reproduce this issue.
Reproducible on

Master (3.1.0-0.0.pre.2481)

Info

Screenshot

Code Sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _title,
      home: Scaffold(
        appBar: AppBar(title: const Text(_title)),
        body: const MyStatefulWidget(),
      ),
    );
  }
}

class MyStatefulWidget extends StatefulWidget {
  const MyStatefulWidget({Key? key}) : super(key: key);

  @override
  State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}

class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  bool inFocus = false;

  @override
  Widget build(BuildContext context) {
    ButtonStyle buttonStyle = ButtonStyle(
      overlayColor: MaterialStateProperty.resolveWith<Color?>(
        (Set<MaterialState> states) {
          if (states.contains(MaterialState.focused)) {
            return Colors.white;
          }
          if (states.contains(MaterialState.hovered)) {
            return Colors.orange;
          }
          if (states.contains(MaterialState.pressed)) {
            return Colors.yellowAccent;
          }
          return null; // Defer to the widget's default.
        },
      ),
    );

    return Center(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          Container(
            color: Colors.blue,
            child: SizedBox(
              height: 100,
              width: 100,
              child: TextButton(
                onPressed: () {},
                style: buttonStyle,
                child: const Text(
                  "Hi",
                  style: TextStyle(color: Colors.black),
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}

Flutter Doctor
flutter doctor -v (Stable)
[✓] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.856], locale en-IN)
    • Flutter version 3.0.5 at C:\Users\Nabeel\fvm\versions\stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (6 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.2.32630.192
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[✓] VS Code (version 1.70.2)
    • VS Code at C:\Users\Nabeel\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.856]
    • Chrome (web)      • chrome  • web-javascript • unknown
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 104.0.1293.63

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.

flutter doctor -v (Master)
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2481, on Microsoft Windows [Version 10.0.22000.856], locale en-IN)
    • Flutter version 3.1.0-0.0.pre.2481 on channel master at C:\Users\Nabeel\fvm\versions\master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 91fdbfa7c8 (4 hours ago), 2022-08-25 03:07:06 -0400
    • Engine revision 9600c6c39b
    • Dart version 2.19.0 (build 2.19.0-137.0.dev)
    • DevTools version 2.16.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\android-sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Java\jdk-17.0.4\bin\java
    • Java version Java(TM) SE Runtime Environment (build 17.0.4+11-LTS-179)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.2.32630.192
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[✓] VS Code (version 1.70.2)
    • VS Code at C:\Users\Nabeel\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.856]
    • Chrome (web)      • chrome  • web-javascript • unknown
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 104.0.1293.63

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

This is related to https://github.com/flutter/flutter/commit/180566f2e59928912c893cc0e8a12f97e653c206
@HansMuller

The flash appears to be due the fact that the button's grey default hover color is inherited from ThemeData which defines it unconditionally. It looks like you can workaround the problem by having the ButtonStyle overlayColor return Colors.transparent instead of the null.

@Wissperwind Is the solution proposed above suitable for your use case?
@HansMuller Is this intended or still considered a bug? If it's intended, would it make sense to document this behavior?

About the splash not showing, it is related to this change https://github.com/flutter/flutter/blob/180566f2e59928912c893cc0e8a12f97e653c206/packages/flutter/lib/src/material/ink_well.dart#L858
When the InkWell is focused and pressed, statesController.value contains both MaterialState.hovered and MaterialState.pressed so if the resolveWith’s callback checks for MaterialState.hovered before MaterialState.pressed, the hover color is always returned.
While waiting for a fix in the framework, a workaround is to reorder the if statements in the resolveWith’s callback.

Updated code sample with splash workaround
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _title,
      home: Scaffold(
        appBar: AppBar(title: const Text(_title)),
        body: const MyStatefulWidget(),
      ),
    );
  }
}

class MyStatefulWidget extends StatefulWidget {
  const MyStatefulWidget({Key? key}) : super(key: key);

  @override
  State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}

class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  bool inFocus = false;

  @override
  Widget build(BuildContext context) {
    ButtonStyle buttonStyle = ButtonStyle(
      overlayColor: MaterialStateProperty.resolveWith<Color?>(
        (Set<MaterialState> states) {
          if (states.contains(MaterialState.pressed)) {
            return Colors.yellowAccent;
          }
          if (states.contains(MaterialState.focused)) {
            return Colors.white;
          }
          if (states.contains(MaterialState.hovered)) {
            return Colors.orange;
          }
          return null; // Defer to the widget's default.
        },
      ),
    );

    return Center(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          Container(
            color: Colors.blue,
            child: SizedBox(
              height: 100,
              width: 100,
              child: TextButton(
                onPressed: () {},
                style: buttonStyle,
                child: const Text(
                  "Hi",
                  style: TextStyle(color: Colors.black),
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}

Changing the return null to a return Colors.transparent does not change anything as far as I observe.

@Wissperwind - this flaw isn't easy to see since hovering in and out of a brightly colored button creates a bit of an optical illusion around the button's color. I was watching the return value of getHighlightColorForType() (material/ink_well.dart) and it appeared that returning the default grey correlated with the flashing you've brought up.
Does @bleroux 's workaround work for you? https://github.com/flutter/flutter/issues/110266#issuecomment-1228240006
@exaby73 - this is still a bug.

@HansMuller Thanks for the clarification :)

@bleroux - (https://github.com/flutter/flutter/issues/110266#issuecomment-1228240006), the original test case did not show the pressed (yellow) overlay color because - as you pointed out - the button's state is {hovered, pressed} when it is pressed.  There's no bug - the widget is WAI -  although your version of the test makes more sense.
@Wissperwind - I'm not really sure what failure mode you're reporting. You said "I experienced that the flash on a button click has some black glitches" but you were "not able to reproduce the exact behaviour" (in a small test case). To fix the problem you've run into we really need a test case, a description of the failure mode, and the interaction needed to reproduce the problem.

Ok, let's just fix the problems that were reproducable in the code Example I provided. The one that someone migrated to null saftety:

If you move mouse away from the button, the button is black for one frame. It should rather change from the hover color directly to the normal button color.
The splash animation in not displayed if you leave the mouse on the button. Only if you click and than remove the mouse fastly from the button, you can see the rest of the splash animation.

If you move the mouse away from the button, the button is black for one frame. It should rather change from the hover color directly to the normal button color.

The test case below demos the problem. If you quickly slide the mouse in and out of the square on top there does appear to be a black flash in between frames. However the button on the bottom is configured in the same way, except that the background and overlay colors have alpha=0.25. In that case I don't see any black flash (or any flash at all).  Is the black flash just an optical illusion?

hover test case
```dart
import 'package:flutter/material.dart';
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
color: Colors.blue,
child: SizedBox(
height: 100,
width: 100,
child: TextButton(
style: ButtonStyle(
overlayColor: MaterialStateProperty.resolveWith<Color?>(
(Set states) {
if (states.contains(MaterialState.hovered)) {
return Colors.orange;
}
return null;
},
),
),
onPressed: () {},
child: const Text('Hello', style: TextStyle(color: Colors.black)),
),
),
),
SizedBox(height: 16),
Container(
color: Colors.blue.withOpacity(0.25),
child: SizedBox(
height: 100,
width: 100,
child: TextButton(
style: ButtonStyle(
overlayColor: MaterialStateProperty.resolveWith<Color?>(
(Set states) {
if (states.contains(MaterialState.hovered)) {
return Colors.orange.withOpacity(0.25);
}
return null;
}
),
),
onPressed: () {},
child: const Text('Hello', style: TextStyle(color: Colors.black)),
),
),
),
],
),
),
);
}
}
void main() {
runApp(MaterialApp(home: Home()));
}
</details>

No, it is not. I will post a video tomorrow morning.
Try on web. I don't know why there is a desktop lapble on this issue. I said I am working on web. If you start chrome from android studio it renders slower than in production and you can clearly see a black flash. I'll do a highspeed video with my phone tomorrow and post it here.

I'd appreciate that. I've tried running the test case on Chrome/macOS and if there's a flash it's not obvious.

Here's a version of the test case with timeDilation increased from 1 to 10. In this case it's much clearer that there is an unexpected overlay color transition. The problem reproduces equally well on macOS and web.

hover test case with timeDilation=10
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart' show timeDilation;

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            Container(
              color: Colors.blue,
              child: SizedBox(
                height: 100,
                width: 100,
                child: TextButton(
                  style: ButtonStyle(
                    overlayColor: MaterialStateProperty.resolveWith<Color?>(
                      (Set<MaterialState> states) {
                        if (states.contains(MaterialState.hovered)) {
                          return Colors.orange;
                        }
                        return null;
                      },
                    ),
                  ),
                  onPressed: () {},
                  child: const Text('Hello', style: TextStyle(color: Colors.black)),
                ),
              ),
            ),
            SizedBox(height: 16),
            Container(
              color: Colors.blue.withOpacity(0.25),
              child: SizedBox(
                height: 100,
                width: 100,
                child: TextButton(
                  style: ButtonStyle(
                    overlayColor: MaterialStateProperty.resolveWith<Color?>(
                      (Set<MaterialState> states) {
                        if (states.contains(MaterialState.hovered)) {
                          return Colors.orange.withOpacity(0.25);
                        }
                        return null;
                      }
                    ),
                  ),
                  onPressed: () {},
                  child: const Text('Hello', style: TextStyle(color: Colors.black)),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

void main() {
  timeDilation = 10;
  runApp(MaterialApp(home: Home()));
}


docs(Notification): add Notifications props and config

🔗 Linked issue

❓ Type of change

[x] 📖 Documentation (updates to the documentation or readme)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

notification mentions about UNotifications but doesn't enlist it's props and config which is different than UNotification
📝 Checklist

[ ] I have linked an issue or discussion.
[x] I have updated the documentation accordingly.

Thanks 😊


UML diagram

Added UML diagram - also attempted to capture proposed changes discussed during 10/23/18 conference call.

I think the UML diagram looks much better and cleaner now, great improvement, thanks. I know the reason behind it, but it could be a little confusing that several of the entities are not in plural forms.
More a general question, but link:rel=derived_from is specified as (1..1). Why is that? I think it should be (0...*). Data could be derived from multiple datasets and may not be derived from another dataset (=original dataset).
Also, the rel types root and parent are not required and should be 0..1, I think. Only the self rel type is required. The collection rel type can't be modeled correctly due to its one way requirement, I think.

@m-mohr, thanks for the input on the cardinalities - have updated the diagram accordingly. I used Visio to create the diagram - it is powerful and convenient, but requires a license. In the future, we may want to move to one of the free online UML tools that uses a markup language to describe the relationships. Then, we could archive the markup file here so that anyone could edit it. Does anyone have a preference on one of these free UML tools?

Thanks, @hgs-msmith . The cardinality for link:rel=derived_from is now specified as (0..1). Was that on purpose? I still think it should be (0..*). Yes, this is nitpicking from my side.
I'm currently not using any UML tools myself so I can't give any advice.

@hgs-msmith sorry for the late review. The only issue I found is the need to change 'provider' to 'providers' in collection. I have no current experience on open source UML tools, the last I used was dia but this hasn't been updated for a while.


Analysis is looping with omelette setup

Given the following setup ms python language server analyses the same package over and over again until crashing in version 0.2.37.
My settings:
"python.jediEnabled": false,
"search.exclude": {
    "**/parts": true,
},
"python.autoComplete.extraPaths": [
    "${workspaceFolder}/parts/omelette",
],
"python.pythonPath": "/path/to/projects/bin/python",
"files.maxMemoryForLargeFilesMB": 12288,
"python.analysis.downloadChannel": "daily",
"python.analysis.downloadChannel": "beta",

The extraPaths included are all symlinks to another location on my computer, so I can use the same egg more than once.
This might be related to this issue

I believe it is working now. Thanks a lot for fixing.


C code for Kyber

[ ] Get it through charon
[ ] Get it through eurydice
[ ] Cleanup C code
[ ] Improve C code
[ ] #145
[ ] cryspen/hacl-packages#436
[x] cryspen/hacl-packages#437

unwrap should be doable
setp_by not clear yet
match on integers
enumerate/chunks we may have to rewrite
Debug could maybe stay (charon with errors as warnings)


added delay for killaura and some random fixes

i noticed that the killaura is really bad so fixed that
this also closes #21

It seems that I was really tired when making this lol, I will fix the issues when I get back home

Is this fine now?

Okay I implemented these changes in https://github.com/gaucho-matrero/altoclef/commit/8fe1f5978fb01202755ff0df7cff11bac16294bf, I think you were credit in the commit.
Since there were tons of changes in the repo after your initial PR, there would be a lot of merging to get this in. That's my bad, sorry about not being able to merge this and writing it myself, but thank you! This will definitely be a useful addition.


boolean answers always have quotes for false and no quotes for true in answers.yaml

Rancher versions: 2.0 master 6/4
Steps to Reproduce:

Create a answers.yaml where it has defaults to "true", true, "false", false
Add helm chart to rancher catalog
Open the catalog app and look at the answers.yaml

Results:  true never has quotes and false always has quotes.  Is there a reason for this?

@loganhz is this UI or backend/

Tested with latest build from master:

There is no quotes for True/False.


I can't find "BasicRequestHelper" anywhere

I've tried this in python 2.7.x and 3.X and it tells me that its not defined. This is imported in many of these files. any ideas?

That is a file in the repository.  See:  https://github.com/mindbody/API-Examples/blob/master/Python/BasicRequestHelper.py
Also, there is an example of it being used here:
https://github.com/vacoj/MINDBODY-Django/blob/master/helpers/mbosoap/BasicRequestHelper.py
Let me know if you hit any more snags after looking at those.  I'm happy to help.

Thanks so much @vacoj ! I've got everything working now except for that bloody message about the Engine not being configured correctly in the settings file for Django. I did a manage.py diffsettings and here's what it says. Can I use a dummy database with this or do I for sure need to use Postgres?
DATABASES = {'default': {'USER': '', 'ENGINE': 'django.db.backends.dummy', 'OPTIONS': {}, 'AUTOCOMMIT': True, 'TEST': {'NAME': None, 'MIRROR': None, 'CHARSET': None, 'COLL

No problem.  You should be able to replace that with any DB back-end you want.


Edit the project summary in the proposal for clarity

@abdullahnaeemmalik I deleted the UX and legal KPIs for now.

Hi all,
If there is no objection by the end of today, I will merge the PR.

It looks great Mao! Thanks for preparing it. There are no objections from myself or Ece.


Does anyone know what the login account password is?

The login page needs to enter the account and password

@Thoye it is root / root

It didn't work. "Couldn't connect to the API"


Support for JSON body types

I wonder if body:s with JSON content-type are supported?
I've imported an OpenAPI file where requestBody content is application/json, but the content type in the imported entry is instead application/x-www-form-urlencoded. When I import the same file in other software (such as Postman and SwaggerUI) the body content type is handled properly.
I am not familar with the source code of this extension, but in ExtensionHelper.convertContentTypeToBurpCode it looks like it's just not implemented, but mostly wanted to double-check if I have missed something. One of the mentioned features is "fully compliant with OpenAPI 2.0/3.0 Specifications", but as I understand it only specific parts of the OpenAPI specification is implemented.

Now JSON parameters should in theory be supported with my port to the Montoya API. Please compile and test the latest version of the plugin and let me know if it fixed your problem.


[CLSA-50] Separate bridge files based on OS/branch

🍪

Don't merge this yet, I have just noticed that macOS builds are not ran.

@jagajaga this is ready for review and merge (CI passes).


Const eval for some math procs

Added only those that BYOND considers const-evaluable (no round for example).

Huh, locally tests were passing. Will check what's wrong tomorrow. Also I should remove the native proc implementations now.

The unit test uses approximate equality because of the fact that .NET's trigonometry functions can and do behave differently on different platforms. See the remark here. There is apparently a 1.1920929E-07 difference between Windows and Linux (or at least between my computer and the github actions server). Maybe at some point we will have to use something else than MathF and Math to avoid this issue.


mgr: enable pg_autoscaler by default

Otherwise, even though we set the pg autoscaler attribute on a pool, the
feature won't be working as expected.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1836431
Signed-off-by: Guillaume Abrioux<EMAIL_ADDRESS>

jenkins test centos-container-all_daemons

jenkins test centos-non_container-all_daemons

jenkins test centos-container-all_daemons

jenkins test centos-container-purge


Can I decrease MemoryStream capacity in FileTarget somehow?

Hi!
Here is my target configuration
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <targets>
      <target name="logfile" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
        <target xsi:type="File" layout="${message}" keepFileOpen="true" openFileCacheTimeout="30" encoding="UTF-8" createDirs="true" fileName="${appsetting:name=LOG_PATH}${appsetting:name=INSTANCE_NAME}/Logs/${shortdate:universalTime=True}/External/${appsetting:name=INSTANCE_NAME}_API/${logger}_${level}.txt"/>
      </target>
    </targets>
    <rules>
      <logger name="*" minlevel="Trace" writeTo="logfile">
      </logger>
    </rules>
    <extensions>
      <add assembly="NLog.Extended"/>
    </extensions>
  </nlog>

FileTarget uses ReusableStreamCreator that internally working with MemoryStream. Turns out that when you log big message, capacity of MemoryStream gets increased and that capacity is never being recalculated as far as I can tell, so there will be wasted memory space after unusually big message.
We could always try slicing up long messages to smaller ones on our side of things so that MemoryStream never becomes big at all. So my question, is there another way to free up memory space taken by MemoryStream with configuration or something?
Sorry for the grammar!

NLog FileTarget attempts to perform the file-write in single operation as this works with atomtic-append.
I guess NLog could change its logic to throw away "very large" file-streams and string-builders. This is already implemented in StringBuilderPool.
But usually the idea is to adapt the reusable-objects to match the actual work-load. What is considered a "big message" for you ? (Notice that #3857 has been implemented to avoid huge object, but it will not protect against a single message)

I guess you could "cheat" and create your own custom Target that did the following:
[Target("MyFirst")]
public sealed class MyFirstTarget: TargetWithLayout
{
        [RequiredParameter]
        public string FileName { get; set; }

        protected override void Write(LogEventInfo logEvent)
        {
                var logFile = RenderLayout(logEvent, FileName);
                var logMessage = RenderLayout(logEvent, Layout);
                using (var textWriter = File.AppendText(logFile))
                {
                    textWriter.WriteLine(logMessage);
                }
       }
}

Alternative one could use the MethodCallTarget with a lambda.

I'll keep that in mind, thank you!

NLog v5.3.3 introduces an upper-limit for the reusable MemoryStream / StringBuilder inside the NLog FileTarget. Thus memory usuage should remain below 15 MByte even after handling a huge LogEvent:

https://www.nuget.org/packages/NLog/5.3.3