fix sql lab permission issue

This is a follow up PR for https://github.com/apache/incubator-superset/pull/5906. The https://github.com/apache/incubator-superset/pull/5906 did not fix the sqllab user query typeahead permission issue totally.

Codecov Report

Merging #6194 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #6194      +/-   ##
==========================================
+ Coverage   76.92%   76.93%   +<.01%
==========================================
  Files          47       47
  Lines        9388     9389       +1
==========================================
+ Hits         7222     7223       +1
  Misses       2166     2166

Impacted Files
Coverage Δ

superset/security.py
75.67% <100%> (+0.11%)
:arrow_up:

Continue to review full report at Codecov.

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

LGTM


Add Apollo boost

Adds instructions for apollo boost:
https://github.com/apollographql/apollo-client/tree/master/packages/apollo-boost
Also adds example of local state that is more verbose: https://codesandbox.io/s/x2jr96r8pp

@akryum when you do think you will have time to take a look at this?


Listeners Interface Documentation

Contains
Add Listeners Interface Documentation

Can one of the admins please verify this patch?

@GooeyHub: ok to test

Hooray Jenkins reported success with all tests good!

Hooray Jenkins reported success with all tests good!

Hooray Jenkins reported success with all tests good!


Global namespace

This has been discussed before in #32, but I'd like to bring up the issue again.
Currently, with the inclusion of scala-dom-types there are even more identifiers (html tags, attributes, events + css style names) imported into the global namespace by import outwatch.dom._. I think this is likely to cause issues along the way.
How do people feel about breaking compatibility and moving all dom identifiers to outwatch.dom.all._, so the name explicitly shows that everything gets imported and have import outwatch.dom._ only import Attributes, Tags, Styles, Handler...

So... what would be in dom.all but not in dom?

So... what would be in dom.all but not in dom?

import outwatch.dom.all_ would bring in all html tags, attributes, styles, events, essentially what import outwatch.dom._ does now and import outwatch.dom._ would only import the Attributes, Tags, Styles... objects, so one could do
import outwatch.dom.{Attributes => A, Tags => T, Styles => S}

T.div( A.id := "some-id")

I realise that it's currently possible to do import outwatch.dom.{Attributes => A, Tags => T, Styles => S} and not use import outwatch.dom._, but I'm guessing that it's not what typically users are doing and having the all in the import makes it more obvious that all identifiers get imported, so it should be "handled with care" (maybe used only locally where the VDom is constructed).

I realise that it's currently possible to do import outwatch.dom.{Attributes => A, Tags => T, Styles => S} and not use import outwatch.dom._,

Yes, but then you will need the implicits for working with VDomModifier and VNode. Therefore, I agree with this proposal. We should have an import outwatch.dom._, which we can advise people to use without filling up the scope so aggressively. They can still explicitly import all or build up a more fine granular scheme.

Yes, but then you will need the implicits for working with VDomModifier and VNode.

Yes, good point!

If we decide to break compatibility like this, this would be an easy migration command for most situations:
find src -name '*.scala' | xargs sed -i -e 's/^\([ \t]*\)import outwatch.dom._/\1import outwatch.dom._\n\1import outwatch.dom.all._/'

Fixed by #132.


QB: Remove Vocabulary 99 values from Recipient Region dropdown?

It is unlikely that a user would want to filter their results by a Recipient Region that comes from an organisation's internal system (i.e. Vocabulary 99).
As such, I propose that we remove the Vocabulary 99 values from the Recipient Region drop-down as having these among the codes from the DAC and UN Vocabularies is confusing and cumbersome for the user.

I understand the issue here, but this seems to make a distinction between two types of equally valid IATI data. If so, there should be a general policy not to have any 98/99 vocabs accessible via the Query Builder. Alternatively perhaps a dropdown to select the vocab you want to use is needed to filter the options before selecting he exact region. However, if persuing this path, it should be noted somewhere that the QB does not allow searching by all IATI options, and suggest how users may do this instead. Does the same issue also apply to 98/99 sector vocabs etc, or 98/99 results vocabs?

I agree with @JoshStanleyDevInit -- I think including 99-vocabs in the query builder makes the interface confusing.
It is also quite hard to re-use data when organisations have published their data in something other than the DAC region codes (e.g. because of overlapping regions from different vocabularies). Non-99 vocabs can still be searched from the underlying Datastore, if users really need them. But I would favour the query builder being a bit more opinionated here in order to make things simpler for users :)

It's in the Godzilla Release.

It is a valid choice, but it implies that using a 99-vocab is now second class IATI data - and I think that is a very dangerous thing to start doing to a data standard. If it does go that way, then publishers who use 99-vocabs should get a warning (I guess in both the validator and in the guidance) that their data will not be searchable via the query-builder. The idea that if you want vocab-99 data you should be a technical user (and query the DS) I also don't agree with unless we actually look at the use cases (is there a good way to get a list of 98/99 vocabs? Am I right in thinking that e.g. there are approx 120 publishers using 98/99 sector codelists? http://dashboard.iatistandard.org/codelist/2/sector_@vocabulary.html). This is particularly important as 99-vocabs are not available in most other tools so this would be one of the few non-technical ways to access that data.
What about having an 'advanced search' page that gave the full options? That would seem to keep the interface clean, but still offer options for those who need them?

@matmaxgeds so, there are 43 publishers using the 99 vocabulary for recipient region. These are mostly quite small organisations, but also include the Global Fund and UNHCR.
For example, for the Global Fund (e.g. file), the data looks like this:
<recipient-region code="QPB" vocabulary="99" vocabulary-uri="https://data-service.theglobalfund.org/v2.1/odata/geographicareas">
  <narrative xml:lang="en">Multicountry Eastern Africa IGAD</narrative>
</recipient-region>

For UNCHR (e.g. file):
<recipient-region code="AFR" vocabulary="99" vocabulary-uri="http://www.unhcr.org/where-we-work.html">
  <narrative>Africa</narrative>
</recipient-region>

In both these cases, the use of the 99 vocabulary makes the data hard to interpret automatically without making custom workarounds for these particular donors. I think it is incredibly important to maintain as much consistency in the data as possible. See also the recipient-region guidance:

Please note, if using your own vocabulary (i.e. code 99), it is recommended that this is used in addition to the DAC OECD region vocabulary (code 1).

In the case of the UNCHR example, the publisher could presumably have used the DAC region code 298 - Africa, Regional. In the case of the Global Fund example, it might be more tricky, as there is nothing more specific in the DAC region codes than 189 - North of Sahara, regional or 298 - South of Sahara, regional. I guess it would be nice if there were alignment between the UN M49 codelist and the DAC region codes, so that you could use the M49 codes for more specificity than is available through the DAC region codes (it looks like the Global Fund might actually use the M49 regions but give them different codes, e.g. cf Global Fund vs UN M49). But I think overcomplicating the user interface is not a good way of dealing with what is really a data quality issue (and also possibly a standards discussion in the case of UN M49 vs DAC alignment -- possibly something for further discussion?)

Thanks @markbrough for adding some real examples in, totally agreed that there is a data quality/data standard issue here (the auto interpretation could also be solved by requiring users of 99-vocabs to add the codelist data e.g. to their org file, or just require the use of the narrative field for 99-vocabs) but until it is solved, it doesn't seem right/fair to tell publishers who are using the standard in a 100% valid way that their data will not be available to non-technical users. I also don't think requiring users to e.g. use a single codelist e.g. DAC region codes is going to be the answer if IATI wants to appeal non-DAC donors - I think that there will always be multiple vocabs, and so our tools need to be able to work with them - seems to me like having a dropdown that is a) searchable and b) would list sector vocabs in order or number of activities would mean that it was both easy for people to access data via the DAC codes, but still just a scroll down away for those who want to use more niche vocabs.
I also think that we should not just think this is a region-vocab issue, is there also the suggestion to remove 99-vocabs from the sector field, from the results fields?

Whist there are pros and cons for each option, I'm in favour of only having the DAC Region list available.

As it stands this is what the Standard recommends (we will have to reassess if this changes in a future upgrade).

There aren't many organisations using region vocab 99

We want the Query Builder to be user friendly as possible. Having multiple lists on a drop down is confusing.

If you do want region vocab 2 or 99 from the query builder then you shouldn't select region as a filter. Rather once you've downloaded the results, then you can filter them by region vocabulary/code.

If you want to directly filter by region vocabulary 2 or 99 then you should use the API

I also agree with the point that vocab 99's should be removed from other fields. Where IATI currently recommends a codelist this is the one that should be offered.

DAC only means that the region data from 43+14, i.e. 5% of publishers is not searchable, this includes IOM, ECHO, Global Fund etc - I think they should probably be informed in case they therefore want to change how they publish?
I am not sure this is compatible with e.g. the Grand Bargain responsibilities IATI has, and they should also be informed that core IATI tools e.g. the QB will not use e.g. UN codes, but DAC only.
I don't think that to search by UN region code you should have to learn how to use the API. They surely have the same status within IATI as DAC region codes?
I don't understand why the QB needs to be so simple, is that not what D-portal is for, or is this designed to replace D-portal?
I am not sure that downloading all data, and then filtering by vocab 2 or 99 is really an option - it could be a huge download for little data, involves additional steps (so hardly user friendly) and I am not sure that it is possible with CSV format data?
Is the plan to do the same for e.g. Sector, and only allow searching by DAC sector codes? This wouldn't even add more dropdowns as the existing sector category dropdown could be replaced with a sector vocab one, and then the vocab selected appears in the second dropdown?
What about tag vocabularies, I guess it will require multiple codelists there?

Hi everyone, both 98 and 99 are still included as they should be. As they are part of the standard, removing them would have the standard fall prey to arbitrary omissions of selectable and therefore valuable fields at any given time. There are many edge cases I could think of straight of the top of my mind that would deem this selection of 98/99 valuable.
I therefore would like to proceed to close this ticket in the near future, but I'll leave this thread open for the next two weeks.

Hi, I am pushing this to Status Done as we have not received feedback on my previous message.

@siemvaessen  apologies this was missed for a response from our team! I do agree that we should keep all vocabularies, even if some vocabs are not used much. And only once we have more users we will be able to test how they use the region filter :)


[Proposal] React Component Properties

React Component Properties API

State: Draft
Created:
Tags:

Context
Talk about React Components API:

The props should always be named in a way that they always either A) Are states or B) are callbacks;
Avoid imperative properties such as setSomething or filterSomething and rather use onSetSomething or onFilterSomething

Resolution

closed by #27


Support grpc response (mapped to http code) in logs and metrics

Addressing https://github.com/istio/istio/issues/2704
Depends on https://github.com/istio/istio/pull/14186
Still needs testing (and I don't yet know where to put them).
/hold

/assign @douglas-reid

Just adding do not merge since it is blocked by the istio change

What is the status on this ?

@costinm I believe this needs to be updated based on the approved design from the last P&T WG meeting.

We changed our approach (https://discuss.istio.io/t/supporting-grpc-in-telemetry/2616/2)
So closing this.


#10248: Change buf_id type from uint32_t to uint64_t

Ticket
Link to Github Issue
Problem description
buf_id type is uint32_t. Overflow can occur.
What's changed
Describe the approach used to solve the problem.
Summarize the changes made and its impact.
Change buf_id type from uint32_t to uint64_t.
Checklist

[ ] Post commit CI passes
[ ] Model regression CI testing passes (if applicable)
[ ] New/Existing tests provide coverage for changes

Hi @tt-asaigal . I changed buf_id type to uint64_t to prevent overflow. Can you check if i missed somthing?

The changes themselves look okay to me. I'm just wondering, if it might make more sense to use std::size_t instead of an integer with a specified width. This may be better suited for indices/map lookups.

std::size_t can either be 32-bit or 64-bit depending on the platform. Therefore I decided to use uint64_t to to ensure no overflow occurs.

cc. @sangwon-chae


error while getting docker repository name. Artifactory response: 403 Forbidden

Describe the bug
jf docker push return 403 with block policy.

I guess this is an Accept head issue of - https://github.com/jfrog/jfrog-cli-core/blame/39b06f70b0887855cf8fc692a4935da014e23fe8/artifactory/utils/container/image.go#L135

Current behavior
jf docker push failed.
$ jf docker push xx/docker-local/test:v1
...
v1: digest: sha256:e7f0bc939c6fdc86f737267b3d52412401e82c711251f70a02a6bc5bab509477 size: 1776
[🚨Error] error while getting docker repository name. Artifactory response: 403 Forbidden
Reproduction steps
$ create a Dockerfile
FROM nginx:1.21
RUN ls
$ docker build -t xx/docker-local/test:v1 .
$ jf c add xx
$ docker login xx
// create a policy to block download and block unscan artfiacts.
$ jf docker push xx/docker-local/test:v1
...
v1: digest: sha256:e7f0bc939c6fdc86f737267b3d52412401e82c711251f70a02a6bc5bab509477 size: 1776
[🚨Error] error while getting docker repository name. Artifactory response: 403 Forbidden
Expected behavior
jf docker push will return 200
JFrog CLI-Core version
latest
JFrog CLI version (if applicable)
2.52.6
Operating system type and version
Mac/Linux
JFrog Artifactory version
7.x
JFrog Xray version
3.x

Any updates on this I just hit the same issue with jf version 2.71.0 and the Jfrog platform at 7.77.9 rev 77709900


How to save shap.force_plot as a picture?

Hi,
Because I use Ubuntu system, I can't visualize pictures. Is there any way to save them as '.png' or '.jpg'?
shap.force_plot(explainer.expected_value[0], shap_values[0], X_test, link="logit")
I am looking forward to your reply ！
Thanks.

You can use shap.save_html to save plots as HTML objects which can consequently be visualized in any web browser.


Migrate docs to MDX (en-only)

Jump to deploy preview 🚀
What kind of changes does this PR include?

Changes to the docs site code

Description

Migrate the docs to use the MDX integration, switching to .mdx files for content.
Renames all content from .md to .mdx moving any imports out of setup in frontmatter and down the MDX body.
Here’s a gist of the script I used to automate AFMD to MDX migration in case it’s useful to anyone.
Updates layouts, scripts, components, etc. to expect a mixed MD/MDX codebase. Should I just pull the plug and make it MDX-only? (N.B. Spoiler syntax ||text|| now only supports MDX as I couldn’t figure out how to make a micromark syntax-extension handle both MD & MDX.)
Turns off AFMD 😢👋

To-do

[x] Render <Content /> that contains a fragment — 🚫 Currently blocked by https://github.com/withastro/astro/issues/5519
[x] Solve out-of-memory error in Netlify & GitHub Action builds
For now, we’re setting the NODE_OPTIONS environment variable to --max_old_space_size=4096 to increase memory limits in both CI environments.
[x] Fix <Aside /> usage/custom syntax
[x] Probably also fix ||spoiler syntax||
[x] Fix differences in heading IDs between AFMD & MDX

What an amazing job @delucis :rocket: :muscle: :raised_hands:
Admittedly, I haven't clicked through every single page, but I tested a number of our more "interesting" pages, and I haven't yet found anything that looks off! Lots of time for people to click around and verify, and no problem to fix smaller things after the fact. So, I can't see any reason not to approve this! New year, new Docs tech!  :partying_face:


Fix retry cycle time for shoots

What this PR does / why we need it:
This PR fixes an issue which reset the .status.retryCycleStartTime in several cases too often and thus prevented erroneous shoot clusters from transitioning to a Failed state.
The feature confineSpecUpdateRollout (https://github.com/gardener/gardener/pull/2233) for shoots in a failed state is now respected as well. Normally a .spec update resets the failed status and with confineSpecUpdateRollout this should only happen in the maintenance time window.
Additionally, @rfranzke and I suggest to decrease the default value for the Gardenlet setting retryDuration from 24h to 12h with the assumption that shoots failing for ~12h most often need an intervention by the shoot owner, i.e. it isn't reasonable to retry for another 12h w/o any spec update.
Release note:

An issue has been fixed with prevented failed shoots from being excluded from reconciliation after the [retryDuration](https://github.com/gardener/gardener/blob/a46946fdce6bf75e0ce18272e7762f5765cced39/example/20-componentconfig-gardenlet.yaml#L33) is exceeded.

The default value for [retryDuration](https://github.com/gardener/gardener/blob/a46946fdce6bf75e0ce18272e7762f5765cced39/example/20-componentconfig-gardenlet.yaml#L33) has been changed from 24h to 12h. Hence, Gardenlet tries to reconcile shoots with erroneous operations for 12 hours (by default). After this period of time only the `retry` operation, a `.spec` change, or a rollout of a new Gardenlet version re-triggers a reconciliation.

/area/robustness
/kind/bug
/needs/review
/size/xs

/area/robustness
/kind/bug
/needs/review
/size/xs


Use the react-admin-json-view as a separate component

Hi @MrHertal!
Firstly, I would like to send you a big thank you for this project! I have a question related to this code. Can I use this project as a separate component in React app?

If you want to use it as a component without React Admin, just use https://github.com/microlinkhq/react-json-view instead?


ci(): Add Drone CI

The CI verifies that the code is linted and formatted.

Build failure is currently expected since files haven't been formatted.


Missing libnlopt library in Dependencies Docs

Hi David,
This is an excellent piece of work, and it runs very well indeed on my 4Gb, 128Gb SSD setup.
I probably don't spend enough time in Linux Land, because I had no idea what an AppImage was. A bit of Google research sorted that out.
When I first ran it I got an:
prusa-slicer: error while loading shared libraries: libnlopt.so.0: cannot open shared object file: No such file or directory
No worries, an installation of libnlopt-dev sorted it out.
When double clicked the options of executing it, or executing it from a terminal is interesting.
Both work, but the terminal option gives a number of errors, such as:
__(prusa-slicer:7496): Gtk-CRITICAL **: 17:50:28.437: IA__gtk_tree_view_scroll_to_cell: assertion 'tree_view->priv->tree != NULL' failed
(prusa-slicer:7496): Gtk-CRITICAL **: 17:50:28.437: IA__gtk_tree_view_scroll_to_cell: assertion 'tree_view->priv->tree != NULL' failed
[2020-01-24 17:50:28.448357] [0xb1e18010] [error]   Unable to enumerate HID devices
[2020-01-24 17:50:37.030211] [0xb1e18010] [error]   Unable to enumerate HID devices__
Great work, many thanks, I had the pi4 with nothing for it to do, but now ...
Cheers,
Eric

Hey @ericd1949!
Thanks for giving the AppImage a go, it means a lot! You're correct that the AppImage isn't very well explained, and i'm sorry to hear that libnlopt-dev gave you trouble.
It should have been pulled in with the addition of libnlopt-cxx-dev. I've re-tested the AppImage instructions on a both fresh Raspbian Buster install and by removing / reinstalling on my own RPI 4 and that appears to be the correct behavior (where installing libnlopt-cxx-dev pulls in the right dependencies).
While it behaves as expected, i've added libnlopt-dev to the apt command line in the latest release just to be sure nobody else encounters this. The README has also had the out of date dependencies removed too.
As to the terminal output, I believe the Gtk errors are fixed in the PrusaSlicer's latest (as i'm writing: 2.2.0-alpha4-armhf) release. The Unable to enumerate HID devices appears to be for 3DConnexion SpaceMouse support, which i'm not entirely certain how to resolve, but should be harmless (aside from filling the terminal, unfortunately).
If you encounter any other weirdness here, please let me know, and i'll take a look. Thanks!


Implement load balancing

Resolves the first point of #159 WP4.
For load balancing, the partition! function is called after every mesh refinement/coarsening. Then, the solver data is redistributed based on the new partition.
This approach will work with different partition! functions, so for weight-based load balancing (second point of WP4), the partitioning function needs to be adjusted.

@ranocha Do you know why there are no coverage checks reported here?


Update Checkbox tests for M2/M3

Updated unit tests for Checkbox to have M2 and M3 versions.
More info in #127064
Pre-launch Checklist

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

As you update tests, don't forget to also update https://docs.google.com/spreadsheets/d/1TEmxXloSu0cHNQuBn6xjH895-lnSOqH3pln6JVACorc/edit#gid=73177703 per "Step 3" in https://github.com/flutter/flutter/issues/127064


backgroudColor not working properly for ListItem nesting a Link with react-router

Problem description
activeStyle of Link cannot change the backgroundColor of ListItem.
In fact, it sets the background to none.
Steps to reproduce
<ListItem primaryText={action.label}   containerElement={<Link to={action.href} activeStyle={{color: 'red', backgroundColor:'blue'}}/>}/>
The color is changed to red, but background color is always white as it was. I can change fontSize, or fontWeight, but only backgroundColor not working.
Versions

Material-UI: 0.15.4
React: 15.0.2
Browser: Chrome

I am also having this problem. I'm sure it is to do with the fact that hovering changes the style of the element.

I found that the backgroundColor will set to null once the hover is off. Is it a good idea to add a new backgroundColor property to control this behavior?
src/List/ListItem.js#41

We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it.
Still, we will accept PR fixes until v1-beta takes over the master branch.


What Webhook-URL ?

What is this ?

This is a PR. You should have opened an issue.
The webhook url is the link to a discord webhook to send embeds in some customizable text channels.

This is a PR. You should have opened an issue. The webhook url is the link to a discord webhook to send embeds in some customizable text channels.

Sorry i should opened issue but my laptop don't show Issues


Query option is throwing unknown option "view"

This is a regression issue starting on 02/11
query:
db.documents.query(
q.where(
q.directory('/test/query/matchDir/')
).
withOptions({queryPlan: true,
metrics: true,
debug: true,
weight: 2.3,
similarDocs: true,
view: "none",
categories: ['permissions']})).
result(function(response) {
response.length.should.equal(5);
response[1].permissions.should.be.ok;
response[0].results[0].content.should.containEql('similar');
//console.log(JSON.stringify(response, null, 4));
done();
}, function(error) {
console.log(JSON.stringify(error, null, 2));
done();
});
<![CDATA[Error: unknown option view
at QueryBuilder.withOptions (/space/SVN_HOME/HEAD/qa/node-client-api/lib/query-builder.js:4714:15)
at Context.<anonymous> (/space/SVN_HOME/HEAD/qa/node-client-api/test-complete/nodejs-documents-query-options.js:151:7)
at Test.Runnable.run (/usr/lib/node_modules/mocha/lib/runnable.js:196:15)
at Runner.runTest (/usr/lib/node_modules/mocha/lib/runner.js:374:10)
at /usr/lib/node_modules/mocha/lib/runner.js:452:12
at next (/usr/lib/node_modules/mocha/lib/runner.js:299:14)
at /usr/lib/node_modules/mocha/lib/runner.js:309:7
at next (/usr/lib/node_modules/mocha/lib/runner.js:247:23)
at Object._onImmediate (/usr/lib/node_modules/mocha/lib/runner.js:276:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)]]></failure></testcase>

The withOptions clause doesn't support the view option.  Specifying the view would be redundant, given that the specified options already indicate what to return.
For instance, in the test case, the queryPlan, metrics, debug, and similarDoc options indicate that a search summary should be provided, which a view of 'none' would contradict.
I have improved error checking in the query builder, so it's good that this is now being reported as an error.
This test case should be revised not to set the view.

Fixed test case on nodejs-documents-query-options.js


Added option to toggle Show Latest On Top

Please merge this push request. It enables Show Latest Log on top, as it may be difficult to keep scrolling through to the bottom to show the latest log

Thanks for implementing this. However, wouldn't it make more sense to have a "Follow" option? Just like the in-editor console windows? (both the regular Console window and the UberConsole window)
[I also notice that the DrawLogListDescending() and DrawLogListAscending() implementations contain a whole lot of duplicated code. If this PR was to be merged - which I'm not sure about, I think a "Follow" option would be better for UberLogger long term - then it should first be rewritten to eliminate the code duplication.]

I think I agree - I think this is a useful feature, but ideally it would be done the same way as the editor window (unless there's a compelling reason not to?)


the m(matrix data) in  *_param.dat

hi, could you tell me  where are the m(matrix data)  and shape datas come from ?
acording the paper says "With the face profiling technique, Zhu et al. [33] expand the
300W dataset [68] into 122, 450 images with fitted 3DMM shapes and projection parameters m."
but i can't find it,   could you give me  the accuracy network link?

http://www.cbsr.ia.ac.cn/users/xiangyuzhu/projects/3DDFA/main.htm

thanks , i get the link, but there say 7 data:
%% Pose Parameter
phi = Pose_Para(1); % pitch
gamma = Pose_Para(2); % yaw
theta = Pose_Para(3); % roll
t3dx = Pose_Para(4); % translation
t3dy = Pose_Para(5);
t3dz = Pose_Para(6);
f = Pose_Para(7); % scale
are different from the 8 data in the code？
mDim  = idDim + 8
# Convert projection matrix into 4x3 matrices
m = tf.reshape(m, [-1,4,2])                                                                              # batch_size x 4 x 2

m_row1 = tf.nn.l2_normalize(m[:,0:3,0], axis = 1)
m_row2 = tf.nn.l2_normalize(m[:,0:3,1], axis = 1)
m_row3 = tf.pad(tf.cross(m_row1, m_row2), [[0,0],[0,1]], mode='CONSTANT', constant_values=0)
m_row3 = tf.expand_dims(m_row3, axis=2)

m = tf.concat([m, m_row3], axis = 2)                                                                      # batch_size x 4 x 3

I actually estimate 2x4 projection matrix directly

so , i test a sample about the m ,i first output one ground true sample data:  m ,s , image,texture, and mask.  with the code:
m = batch_m[0] * self.std_m + self.mean_m
np.savetxt("./cal/m.txt",m,fmt="%s",delimiter=",")
s = batch_shape[0] * self.std_shape + self.mean_shape
np.savetxt("./cal/s.txt",s,fmt="%s",delimiter=",")
                t2 = _300W_LP_DIR + 'image/'+ batch_300W_images_fn[0]
                t3 = _300W_LP_DIR + 'mask_img/'+ batch_300W_images_fn[0]
                t4 = _300W_LP_DIR + 'texture/'+ image2texture_fn(batch_300W_images_fn[0])
                t5 =  _300W_LP_DIR + 'mask/'+ image2texture_fn(batch_300W_images_fn[0])
                copyfile(t2, '/cal/1.png')
                copyfile(t3, '/cal/2.png')
                copyfile(t4, '/cal/3.png')
                copyfile(t5, '/cal/4.png')

and i use a code slice from your  code ;
import numpy as np
import tensorflow as tf
def get_shape(tensor):
dims = tensor.shape.as_list()
return dims
mshape = np.loadtxt('s.txt')
m = np.loadtxt('m.txt')
m = tf.reshape(m, [-1,4,2])
m_row1 = tf.nn.l2_normalize(m[:,0:3,0], axis = 1)
m_row2 = tf.nn.l2_normalize(m[:,0:3,1], axis = 1)
m_row3 = tf.pad(tf.cross(m_row1, m_row2), [[0,0],[0,1]], mode='CONSTANT', constant_values=0)
m_row3 = tf.expand_dims(m_row3, axis=2)
m = tf.concat([m, m_row3], axis = 2)
n_size = 1
vertex3d = tf.reshape( mshape, shape = [n_size, -1, 3] )                                                  # batch_size x vertex_num x 3
vertex4d = tf.concat(axis = 2, values = [vertex3d, tf.ones(get_shape(vertex3d)[0:2] +[1], tf.float64)])   # batch_size x vertex_num x 4
m = tf.cast(m, tf.float64)
vertex2d = tf.matmul(m, vertex4d, True, True)                                                             # batch_size x 3 x vertex_num
print("vertex2d shape:",vertex2d.shape)
vertex2d = tf.transpose(vertex2d, perm=[0,2,1])                                                           # batch_size x vertex_num x 2
print("vertex2d shape2:",vertex2d.shape)
vertex2d_single    = tf.split(axis = 0, num_or_size_splits = n_size, value = vertex2d)
vertex2d_i = tf.squeeze(vertex2d_single[0], axis=0)
s =224
[vertex2d_u, vertex2d_v, vertex2d_z]   = tf.split(axis=1, num_or_size_splits=3, value=vertex2d_i)
vertex2d_u = vertex2d_u - 1
vertex2d_v = s - vertex2d_v
vertex2d_i = tf.concat(axis=1, values=[vertex2d_v, vertex2d_u, vertex2d_z])
vertex2d_i = tf.transpose(vertex2d_i)
with tf.Session() as sess:
out_v = sess.run(vertex2d_i)
print("out_v.shape:",out_v.shape)
outv = np.reshape(out_v,(-1,))
np.savetxt("rs.txt",outv,fmt="%s",delimiter=",")
finally ,i use the vertexs with the faceindexs, and found the result shape is strange;
the accuracy maxtrix :
0.0007021478967551096
-0.00010672902212836453
-2.7785656540952035e-05
0.000860147641784886
-0.0005394711305846331
-0.00018321523403917045
137.74349847449207
121.92588799400255

If you use groundtruth shape and m, don’t multiply with mean and std.

when i  don’t multiply with mean and std. the matrix :
0.07839612
-2.4697971
1.4430104
4.565652
-1.7359085
-0.09378817
1.6977928
-0.07866878
but the final result ,the final shape is also strange  wrong;

and the shape  basic is ok ,but after matrix ,the shape become bad .

so ,may be the  m(matrix data) in *_param.dat have somewrong ? hope you double check,
thanks.

hi, could you tell me where are the m(matrix data) and shape datas come from ?
acording the paper says "With the face profiling technique, Zhu et al. [33] expand the
300W dataset [68] into 122, 450 images with fitted 3DMM shapes and projection parameters m."
but i can't find it, could you give me the accuracy network link?

hi， Can I ask you some questions? @wangxinjun56

and the shape basic is ok ,but after matrix ,the shape become bad .

Hi, I'm getting a (batch_size, 3*number of vertex) matrix as the estimated shape. Could you please clarify how can I use this to display the shape using meshlab? Do I need anything else other than this matrix?


Kevin/add coverage

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@084c660). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #24   +/-   ##
=======================================
  Coverage        ?   91.54%
=======================================
  Files           ?        4
  Lines           ?      142
  Branches        ?       11
=======================================
  Hits            ?      130
  Misses          ?       11
  Partials        ?        1

Flag
Coverage Δ

unittests
91.54% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Docker Elasticsearch image for K8

The Docker Elasticsearch K8 image has been updated to expose the ES_HEAP_SIZE, NUMBER_OF_SHARDS, and NUMBER_OF_REPLICAS environment variables.  It can also be built and posted to Bintray.

Sorry, I did not meant to make this pull request.  My company is using this image and I have modified it.  I have forked this repo in my own personal Github account and will submit the same changes in a pull request from there (except for the bintray stuff).  Sorry.

Sure, go ahead and open that PR.


Why do we need to add this header?

https://github.com/php-http/cakephp-adapter/blob/master/src/Client.php#L50-L52

Since it's using fopen with a http context, it's required otherwise it throws an error on the PHP Side if not present on a POST request, didnt have the time to see if there is an other way to do this (or if this is required in a POST request for HTTP 1.0 / 1.1)
But i think there may a better default value.


FancyZones cutting off top of pages

Microsoft PowerToys version
0.41.4
Running as admin

[X] Yes

Area(s) with issue?
FancyZones
Steps to reproduce
When 20px space around zones is used, the top of the zone is not correct and it goes off screen by maybe 10px.
✔ Expected Behavior
Top of zone at top of screen should have a 20px border as indicated in settings
❌ Actual Behavior
Top zone at top of page goes off screen by about 10px
Other Software
N/A

Does it happen with any window or with some only? Does it happen only with 20px border or it doesn't depend on the border size? Thanks!

It appears that this relates to the use of Groupy (
https://www.stardock.com/products/groupy).  Hopefully, it is something you
can address given the great number of people who simultaneously use
FancyZones and Groupy.
Remington Smith
On Thu, Jul 22, 2021 at 5:36 AM Seraphima Zykova @.***>
wrote:

Does it happen with any window or with some only? Does it happen only with
20px border or it doesn't depend on the border size? Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/12268#issuecomment-884813307,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABKUNFWHO4TF5SP4W7MMELDTY7YBJANCNFSM477M6QJQ
.

And , it happens with all windows when a 20px border is used because the
extra space above windows for the Groupy tabs appears to be ignored by
FancyZones when snapping to a grid with any border.  When the border is
removed, it FancyZones and Groupy appropriately work together, but,
ideally, I'd like to be able to use FancyZones and Groupy with a border
configured in FancyZones.
Remington Smith
On Thu, Jul 22, 2021 at 9:42 AM Remington Smith @.***>
wrote:

It appears that this relates to the use of Groupy (
https://www.stardock.com/products/groupy).  Hopefully, it is something
you can address given the great number of people who simultaneously use
FancyZones and Groupy.
Remington Smith
On Thu, Jul 22, 2021 at 5:36 AM Seraphima Zykova @.***>
wrote:

Does it happen with any window or with some only? Does it happen only
with 20px border or it doesn't depend on the border size? Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/12268#issuecomment-884813307,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABKUNFWHO4TF5SP4W7MMELDTY7YBJANCNFSM477M6QJQ
.

Thanks for clarifying! I'll close this issue in favor of https://github.com/microsoft/PowerToys/issues/12382


June (previously May) 2022 Nextcloud Tutorial Update

I had a pull request that was very important that was not able to be commited because of, moving to Hugo I guess, back in May. This contains the changes, but in Hugo instead.
I've improved the Nextcloud tutorial. Following the original tutorial, I added parts of importance and also some good tips, like how to improve performance, use the occ utility, downloading the latest release tarball instead of a specific version, and how to set up PHP 7.4, etc..

Tutorials are supposed to be written for Debian 11, where at least most of the first additions are irrelevant.

Tutorials are supposed to be written for Debian 11, where at least most of the first additions are irrelevant.

Adjustments have been made.

Okay great. I'm going to go ahead an add these changes. I have not checked them, but then again the original Nextcloud article never tried myself. I'll make it a thing to validate them and maybe streamline some things as I get the chance.


Can't set a breakpoint by mouse click

Subj. Also codetour icon (css: ced-1-TextEditorDecorationType1-2) overlaps with breakpoint icon.

Hey! Just to confirm: are you saying that when a line of code has a CodeTour step associated with it, you aren't able to set a breakpoint on that line? Because the CodeTour glyph gets in the way? If so, I'll have to look into this to see if there's a way to fix that.
In the meantime, you can hide the CodeTour glyphs entirely, by clicking the little eye icon in the CodeTour tree in the Explorer tab. Let me know if that's a sufficient workaround 👍

you aren't able to set a breakpoint on that line?

true (it is possible with keyboard shortcut)

hide the CodeTour glyphs entirely

thanks, your workaround works fine

Great, I'm going to close this issue.


Library Alpha Discussion: Use Chai or Ava library for assertions?

Hey AoG Devs!
Now that the alpha version of the testing library has been out for a few weeks, we'd like to get feedback on the behavior and API design of the library.
Ava has built in assertions as part of its framework. Right now we use the Chai library. If we use Ava for all assertions there are fewer dependencies. This question is primarily geared toward the example code that we will have for this library as well as tests that may appear in other samples.

I think that we should keep this library more simple. Therefore, +1 to drop the chai dependency. I think that users of this library have the option of whether using the chai or not.


Interaction Style issues

Describe the Bug
I applied the drag method of interaction style, and it doesn't seem to work.
Screenshots
https://github.com/LeoNatan/LNPopupUI/assets/75579438/ce73589e-5923-4c5d-977a-1f0f3398d6a6

The first player is apple music

Hello,
It works in the demo app:
https://github.com/LeoNatan/LNPopupUI/assets/2270433/8707749a-e329-496a-b105-79423ae941ab
Please post some code.

Please post some code.

.popup(isBarPresented: $isPopupBarPresented, isPopupOpen: $isPopupOpen) {
PlayerPageView()
.popupInteractionStyle(.drag)
.popupImage(Image("cover1"))
.popupTitle(verbatim: "Song Name")

Lmao,I'm a newbie,I misplaced the method，I corrected it and it worked.
Thank you!

Great! Happy coding!


[fix][doc] Correcting spelling mistakes in config

Fixes #xyz

Main Issue: #xyz

PIP: #xyz

Motivation

Modifications
Corrected all spelling mistakes I found in the config directory.
Verifying this change

[ ] Make sure that the change passes the CI checks.

(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (10MB)
Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

[ ] Dependencies (add or upgrade a dependency)
[ ] The public API
[ ] The schema
[ ] The default values of configurations
[ ] The threading model
[ ] The binary protocol
[ ] The REST endpoints
[ ] The admin CLI options
[ ] The metrics
[ ] Anything that affects deployment

Documentation

[x] doc
[ ] doc-required
[ ] doc-not-needed
[ ] doc-complete

Matching PR in forked repository
PR in forked repository: https://github.com/daziz/pulsar.git

Merging...
Thank you!


Fix restart behavior

Because start is overridden, subsequent calls to start don't have the previousUrl that would have been saved by BaseLauncher
This fixes it by implementing the onStart listener instead (and fixing the URLs)

So sorry for the...late response, I changed employment and haven't used this since.

comment from #1
Not using karma-selenium-webdriver-launcher I don't have a setup to test this PR :frowning_face:
IIRC I didn't add any tests, so I guess I don't have a way to test this repo in general, actually.

TBH I don't really know the workings of Karma too well, so your knowledge is probably better than mine (exhibit a: start vs _start) If this is still working for you (all of a month later) then I'm good to merge and publish.

And if this doesn't regress the changes from #5 (ex: line #29)

My change should go on top of #5. By switching start_ the ID shows up in the URL.
In other words the change to remove the concatenation of the query parameter was a conscious one, to avoid getting id=2&id=2

@jdmarshall thanks so much!
published as v0.0.4


[1.2.x] Fix hasfiller value for BFiniteType created for const literals

Purpose
BFiniteType were compared using == operator in BSameTypeVisitor. This fails to identify that two BFiniteTypes belong to the same type (eg: int). Due to this reason sample code fails to compile. Failing condition is that a union must have a single basic type for all of its members to have a filler value.
Fixes #21251
Approach
BFiniteTypes value space is flattened recursively and passed to BSameTypeVisitor.
Samples
const FOO = 0;
type Bar FOO|1;
public function main() {
    Bar[2] x = [];
}

List expression now supports this syntax..
Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.
https://github.com/ballerina-platform/ballerina-lang/issues/22403

const FOO_ZERO = 0;
type FOO_FOUR_THREE  4 | 3;
type BarMultiple FOO_ZERO | 1 | FOO_FOUR_THREE;
function createMultipleConstLiteralAutoFilledSealedArray() {
    BarMultiple a = 1;
    BarMultiple[5] sealedArray = [a, a];
    sealedArray[3] = a;
    //assertEqualPanic(0, sealedArray[2]);
}

The compiler still fails to fill arrays with valid values for complex unions. In above code array index 2 is not filled with any value.
Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[x] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

Merging #22364 into ballerina-1.2.x will not change coverage by %.
The diff coverage is n/a.

@@               Coverage Diff                @@
##           ballerina-1.2.x   #22364   +/-   ##
================================================
  Coverage            14.59%   14.59%
================================================
  Files                   51       51
  Lines                 1411     1411
  Branches               219      219
================================================
  Hits                   206      206
  Misses                1189     1189
  Partials                16       16

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 80ef44e...16ce65f. Read the comment docs.


cannot zoom

There are still cases when the viewer refuses to zoom to the geometry
There is no error in chrome console or viewer console
I can see that there is geometry in the attribute table, a single polygon

The positions also look fine

Clicking the zoom button does nothing
The grid is also not visible

close


Support packages using flutter SDK

we have a mono_repo with both flutter, web, and pure dart packages. when we run "mono_repo check" we get this error:
mono_repo check
Unhandled exception:
Invalid argument (data): No clue how to deal with `{sdk: flutter}`.: Instance of 'YamlMap'

I'm interesting in working on this.
But what is the expected behaviour ?

I think our pubspec parser just chokes on the sdk: flutter bit in a package.
I think it'd just be a matter of ignoring those type of entries.

Considering flutter comes with it's own set of tools for builds/test/packages I don't think we can just ignore it.
After all we don't pub get in flutter. We flutter pub get.
And maybe there's some stuff to do on travis too.

Right. There will be work to get all of the bits working...the pubspec parsing is likely just a start...

Submitted a pull request that should remove this error. https://github.com/dart-lang/mono_repo/pull/58
But it should still not work with flutter yet. Simply parsing sdk will still make mono_repo pub get crash.


Development

Description
Merging in development to main.

Login page created but moved into components from pages so its not live yet
Added import/export: 0 to .eslintrc to fix import lint errors
Added BlogPreviewCard reusable component
Updated Next package to v 12
Updated React from 17 to 18
Updated Footer styles
Added rules to tsconfig

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Part of a feature.
[x] Refactor (non-breaking change which does not add functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] Testing-

Checklist

[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings
[x] added new dependencies
[ ] added tests
[ ] updated documentation
[x] Looks good on large screens
[x] Looks good on mobile

Organization

[ ] Have you linked this pull request to a project ticket?

Review

[ ] Is this a work in progress?
[x] Is this ready to be reviewed?
[ ] Have you added two reviewers to this pull request?

 Create Most Recent Post Preview


Adds YPImagePicker library

This adds a link to YPImagePicker which is an Instagram-like Image picker
with albums, camera, video and filters support.
Project URL
https://github.com/Yummypets/YPImagePicker
Category
Camera
Description
Adds the link of this new library
Why it should be included to awesome-ios (optional)
Slick UI and super simpe api :)
Checklist

[x] Only one project/change is in this pull request
[x] Addition in chronological order (bottom of category)
[x] Supports iOS 9 / tvOS 10 or later
[x] Supports Swift 4 or later
[x] Has a commit from less than 2 years ago
[x] Has a clear README in English

          1 Warning

:warning:
Found 3 link issues, a project collaborator will take care of these, thanks :)

Link issues by awesome_bot

Line
Status
Link

299
301
https://github.com/linkedin/RocketData redirects tohttps://github.com/plivesey/RocketData

1646
301
http://componentkit.org/ redirects tohttps://componentkit.org/

2917
302
http://mobilecouch.co/ redirects tohttps://mobilecouch.co/

  Generated by :no_entry_sign: Danger


Add JsonOrPython validator and serializer

We had discussed this a while ago, I think it would be useful to have.

Codecov Report

Merging #548 (48dcc7d) into main (2e2bd34) will decrease coverage by 0.01%.
The diff coverage is 85.45%.

:exclamation: Current head 48dcc7d differs from pull request most recent head b957084. Consider uploading reports for the commit b957084 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
- Coverage   93.99%   93.99%   -0.01%
==========================================
  Files          94       96       +2
  Lines       12841    12951     +110
  Branches       24       24
==========================================
+ Hits        12070    12173     +103
- Misses        765      772       +7
  Partials        6        6

Impacted Files
Coverage Δ

src/input/mod.rs
100.00% <ø> (ø)

src/serializers/shared.rs
90.38% <ø> (ø)

src/validators/json_or_python.rs
80.39% <80.39%> (ø)

src/serializers/type_serializers/json_or_python.rs
87.50% <87.50%> (ø)

pydantic_core/core_schema.py
96.86% <100.00%> (+0.03%)
:arrow_up:

src/validators/mod.rs
98.84% <100.00%> (+<0.01%)
:arrow_up:

... and 1 file with indirect coverage changes

Continue to review full report in Codecov by Sentry.

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

@samuelcolvin please review


Do you know how to set syntax of file without saving it?

I want to save code syntax for highlighting by key shortcut? How can I do it?

You can do that with the grammar-selector:show command, which is bound to ctrl-L by default.
Let me know if I misunderstood your question, and please provide more details about what you want to do exactly.

All this time I've been using Ctrl+Shift+L thinking that was how to enable it...whoops :grimacing:.


Feature/ub 1591 doc for chart

Docs for the helm chart, including,

README.md, a user guide for the chart (In progress, waiting for Dima's input)
NOTES.txt, guide for the next steps after install
Chart.yaml, general information about the chart
license is not included in this PR.

Update:
I separate this PR into two parts, README.md and others (Chart.yaml and NOTES.txt). Since there is no comments for Chart.yaml and NOTES.txt, I have merged them into dev. So this PR only contains README.md, I'll assign it to Dima.

This change is

@27149chen  is this PR relevant?
it look like its stale for long time. Consider to close this PR if not relevant.

@dima-i  \ @27149chen  - please review my comments.


Add favicon + title to app

[x] Add favicon
[ ] Add title

This is done. Can go ahead for merging PR #48


Unable to refine variable type through intersection (&)

In this example I have a BaseType, containing an object bar of type BaseClass. Now I'd like to define a more refined type, where bar is now a subclass of BaseClass:
// @flow
class BaseClass {}
class DerivedClass extends BaseClass {}

type BaseType = {foo: string, bar: BaseClass};
type RefinedType = BaseType & {bar: DerivedClass};

function test(s: RefinedType) {
  (s.bar: DerivedClass);
}

This however fails with (v.0.20.1)
 9:   (s.bar: DerivedClass);
       ^^^^^ BaseClass. This type is incompatible with
 9:   (s.bar: DerivedClass);
              ^^^^^^^^^^^^ DerivedClass

This isn't working because this isn't what an intersection type does. There's no "precedence" here. The type A & B admits only values which are simultaneously both A and B. Consider a smaller example:
/* @flow */
type A = { p: string };
type B = { p: number };
type C = A & B;

// it seems that you'd want this to work
var c: C = { p: 0 };

test.js:7
  7: var c: C = { p: 0 };
                     ^ number. This type is incompatible with
  2: type A = { p: string };
                   ^^^^^^ string

However, there's an error. That's because p is actually string & number, which is uninhabitable, so you can't actually create an instance of C.
We've gotten a few requests for an "object type spread" feature, which would behave more like object spreads, so you could write something like this:
type A = { p: string };
type B = { p: number };
type C = {
  ...A,
  ...B,
}

Nobody is working on that today, but I'll open an issue on GH to track it. Hope this helps!

See #1326

Thanks for the detailed explanation! However it seems to me that there IS a type that is simultaneously the BaseClass and the DerivedClass -- it's the DerivedClass, since it extends theBaseClass.
In fact, if you consider under what circumstances {p: X} & {p: Y} can be sensible, then you'd probably have the following possibilities:

X = Y (trivial);
X is "string", and Y a specific string/union of strings => X&Y = Y;
Y is derived from X (either as class or as an object) => X&Y = Y;
both X and Y are unions of types => X&Y is the intersection of these unions (viewed as sets);
X = ?Y => X&Y = Y;
if X and Y are functions, then & operator should probably be applied between arguments of these functions, and their return types. For example, I'd expect (): string to be intersectable with (x?: number): "foo"|"bar".

OK, I see how this is a different, but related issue.
/* @flow */

class A {}
class B extends A {}
type T = { p: A } & { p: B };

// There's at least some inhabitant

let t0: T = { p: new A() }; // error: A is incompatible with B
let t1: T = { p: new B() }; // OK: B is subtype-compatible with A

// But what should be the value of `t1.p`?
(t1.p : B); // error: A is incompatible with B -- is Flow wrong?

This is pretty edge case-y, in that it's specifically an interaction with unions of objects which share a property where the values have a subtype relationship.
Right now, t1.p comes back as A, which is "wrong." It might be more correct to say that t1.p is A & B, but that wouldn't fix the error. (It would, however, fix another error, which allows us to say t1.p : A which is also wrong.)
To make this code type check as you expect, I believe we'd need to "normalize" the original union to understand that the only possible inhabitant of T has p: B (and never p: A). I think this is possible, and could dove tail nicely into some other work to improve intersections (and unions).
Thanks for laying out your analysis so clearly!
@bhosmer please correct me if I am wrong.

In the 0.21.0, the following is no longer an error: let t0: T = { p: new A() };

Rather, the line is an error, but it's attributed to the union type itself. The following line, which was OK, is now also an error and errors in the same way.

@samwgoldman @pasha-mf sorry for the delayed reply - unfortunately yeah, this is expected behavior. The intuition about types of shared props themselves being intersections is strong and appealing, per your reasoning above, but unfortunately it only holds for immutable props.
See why? Given B <: A and the intersection type { p: A } & { p: B }, then if p were read-only you could indeed safely type the intersection's p covariantly, as the intersection of the constituent types: A & B = B, per your discussion. And dually. write-only/contravariantly/ A | B = A.
But the intersection of a shared mutable property must commit to both a) delivering the intersection of its constituent types in response to a read, and b) accepting the union of its types as arguments to a write,
if the intersection is to be satisfied. Eg here the type of p must simultaneously be A | B and A & B, which is clearly only possible if A = B. Otherwise the entire intersection is uninhabited (since no possible object could satisfy the constraint).

Well put! Thanks Basil!


A bug about python code files to exe files.

Before submitting the issue

[X] I have searched among the existing issues
[x] I am using a Python virtual environment

Description of the bug
I can run my code normally in the Python compiler，but there was an error when packaging it as exe.
No such file or directory: "C:Users\AppData\Loca\Temp\LMEI131242\pyaedt\misc\config.schema.json"
Steps To Reproduce
import os
import sys
from tkinter import filedialog
from PyQt5.QtWidgets import QApplication,QMainWindow,QFileDialog,QMessageBox,QProgressBar
from qt_material import apply_stylesheet,list_themes
from ui import Ui_mainWindow
import pythonnet
import pyaedt
from pyaedt import Edb
from pyaedt import Hfss3dLayout
brd_path = filedialog.askopenfilename()
xml_path = filedialog.askopenfilename()
brd_directory, brd_extension = os.path.splitext(brd_path)
aedb_path = brd_directory + ".aedb"
edb = Edb(edbpath=brd_path)
edb.stackup.load(file_path=xml_path)
edb.save_edb_as(aedb_path)
edb = Edb(edbpath=aedb_path)
signal_list = []
for net in edb.nets.netlist:
if net in user_signal_net:
signal_list.append(net)
power_list = ["GND"]
edb.cutout(signal_list=signal_list, reference_list=power_list, extent_type="Conforming", expansion_size=0.002,
output_aedb_path=None)
edb.save_edb()
edb.close_edb()
h3d = Hfss3dLayout(projectname=aedb_path, non_graphical=False, new_desktop_session=True)
for comp_IC in user_signal_IC:
h3d.create_ports_on_component_by_nets(component_name=comp_IC, nets=user_signal_net)
h3d.delete_setup(setupname="setup1")
setup = h3d.create_setup(setupname="setup1")
h3d.create_linear_step_sweep(setupname=setup.name, sweepname="sweep1", unit=unit, freqstart=freqstart, freqstop=freqstop,
step_size=step_size,save_fields=True, save_rad_fields_only=False,
sweep_type="Interpolating")
h3d.set_meshing_settings(mesh_method="Phi", enable_intersections_check=True, use_alternative_fallback=True)
h3d.save_project()
h3d.release_desktop()
Which Operating System are you using?

@MaxJPRey What do you mean by packaging it as exe file ? Could you describe how to do that ? Do you mean using a shebang and executing the python file as a script ?

@Acaptian Are you using pyinstaller? I faced a similar error in linux when trying to use pyinstaller to create an executable from a python script containing pyaedt.

nathmay
YES. I convert my python script into a standalone executable by pyinstaller, and this issue indeed just occur at the python script aontaining pyaedt. The edb part is normal .

@Acaptian In that case, you may be able to solve it by specifying additional hooks. See this example.
In your case, you'd create a file named hook-pyaedt.py in the same directory where you'd be running pyinstaller. The contents of this file should be:
from PyInstaller.utils.hooks import collect_data_files

# Instruct pyinstaller to collect data files from pyaedt package.
    datas = collect_data_files('pyaedt')

You'd then run pyinstaller as:
pyinstaller --onefile --additional-hooks-dir=. yourscript.py
where yourscript.py your original python script.
This worked for me for python 3.10.14, pyinstaller 6.5.0, pyaedt 0.8.2


if I run oneliner program, how can I get predicted probablity between 0 and 1, not a bining score(greater than 1)

One liner uses five pretrained models which are trained on BindingDB Kd scores. There are two ways: 1. To transform it by selecting a threshold: for example, below 10 is positive and above 100 is negative; or 2. Feed in your training dataset which has binary labels in one liner, it will automatically train five models.

closing for now, feel free to reopen!


Android CI tests w/ Emulator/QEMU

https://github.com/ruslo/hunter/issues/663#issuecomment-277949562
http://www.instructables.com/id/Creating-an-Android-Emulator-Using-Qemu/

Investigate running Android emulator CI tests using QEMU for HW emulation.  This would be a much easier near term path than using Amazon Device Farm.

https://github.com/elucideye/drishti-upload/pull/72

Fixed https://github.com/elucideye/drishti/pull/441


DDC-built Angular app not working in Chrome Canary

When opening in Chrome Canary my Angular app built with DDC I get this error and nothing works.
dart_sdk.js:99588 EXCEPTION: NoSuchMethodError: 'currentIndex'
method not found
Receiver: Instance of 'CollectionChangeRecord'

Full stack trace is available here.
No error is present when opening the same app in ordinary Chrome. Also, opening the app compiled with dart2js in Canary works, too.
I'm not sure who is responsible for this error - AngularDart, DarkSDK or Chrome Canary. I've created an issue in Angular repo but it seems to be a bit dead, so I'm writing to you guys.
Here is the link to the original issue - https://github.com/dart-lang/angular/issues/1905, it has a bit more info on what I've managed to find out myself.

Thanks @missvalentinep for filing this issue and for all the details in the original bug. We need to investigate more closely to see what's happening here. Please keep us posted too if you notice that this changes on the next canary release.

@nshahan @Markzipan - could one of you take a closer look? I labeled P1 just in case this is something that will become a bigger problem once chrome releases the changes to beta/stable (like the issue we had with chrome 81).

Thanks for reporting! This appears to be a much more general issue, as the error you described in your original bug is reproducible with Angular's Hello World app (on Canary):
NoSuchMethodError: method not found: 'get$digestsPath' (J.getInterceptor$x(...).get$digestsPath is not a function)
TypeError: J.getInterceptor$x(...).get$digestsPath is not a function
    at Object.get$digestsPath$x (http://localhost:8080/dwds/src/injected/client.js:3536:43)
   ...

We're continuing the investigation.

interesting - could we be facing 2 different issues?
The exception in this last comment appears to be affecting the dwds's client compiled with dart2js /cc @rakudrama @grouma
Is the DDC issue reproducible with the hello world app if you run webdev with  --no-injected-client ?

I'll dig in from the webdev side. The tracking similar issue is: https://github.com/dart-lang/webdev/issues/1087

The bug disappears with --no-injected-client with DDC on Canary. It's probably the same issue as: https://github.com/dart-lang/webdev/issues/1087

@missvalentinep - do you have any pointers or an example you could provide for us to reproduce the .currentIndex error?

This issue stems from window.performance.memroy.constructor no longer returning a MemoryInfo constructor (and instead a standard Object constructor), which breaks some assumptions about how we attach runtime caches in client.js's initNativeDispatchContinue operation. No idea if this is the Chrome team's intent, however.
See: https://github.com/dart-lang/sdk/blob/master/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart#L80

interesting... seems like a couple things to look into:

if the API is gone, should we remove it from dart:html altogether
Is there something in both DDC and dart2js we can do to be more robust when the lookup of the native constructor seems invalid?

/cc @srujzs @rakudrama

I can confirm that removing all instances of MemoryInfo from both the DDC runtime and dart:html resolves the issue. This would obviously break anything that currently depends on those, however. If we want to retain access to this, we'd need a new disambiguation structure in the DDC runtime that isn't the JS constructor (since that's now shared with Object's).

if the API is gone, should we remove it from dart:html altogether

I don't think MemoryInfo is removed from Chrome (even though it's non-standard) yet. I don't mind the breaking change if necessary, but we'll need a workaround for wherever it's being used. There's a handful of usages in google3 from what I can tell.

Yeah, that part's odd. Judging from the Chrome IDL (https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/core/timing/memory_info.idl#L35), MemoryInfo's constructor hasn't been exposed for a while now. Wonder why we're only seeing this issue now.

@missvalentinep - do you have any pointers or an example you could provide for us to reproduce the .currentIndex error?

@sigmundch the issue is easily reproduced on my company's projects, but unfortunately I can't share them.
Seeing that the error didn't appear on the hello world app got me a bit intrigued. I decided to check it on the Tour of Heroes repo (toh-1), and suddenly it didn't reproduce there, too. Same on a very small project that has only one component. Perhaps these small projects lack something that is causing the error.
So I'm attaching the smallest project where I am able to catch the error - https://github.com/missvalentinep/angular-balloons.

do you have any pointers or an example you could provide for us to reproduce the .currentIndex error?

@sigmundch the issue is reproducible in Tour of Heroes 2 - https://github.com/angular-examples/toh-2. What's interesting, that it's not reproduced on toh-1. Perhaps the second part adds some complexity, that starts to cause the problem.

@missvalentinep - @Markzipan landed e33f84d which should fix DDC after this chrome breaking change. Dart2js still needs more work, so this should only unblock the issue during development and with the --no-injected-client tag.
For dart2js we need a very different fix.
@rakudrama - can you share pointers to where we'd need to modify the caching of interceptors to detect that we are not accidentally caching anything on Object.contructor.prototype? For example, would that be on _prototypeForTag in native_helpers?

@sigmundch is there any way that this problem can be fixed in SDK 2.8? Not everyone is using the latest SDK version and moving to it so rapidly to get this fix can pretty be painful.

@sigmundch I can confirm that the DDC fix also fixes the issue for Dart2JS (for the ToH sample). We can close after the SDK versioning is figured out.

Awesome, thanks for following up @Markzipan !
For context @missvalentinep , we discovered that dart2js was working properly, but was tripping on a cascading issue caused by DDC's bug. There is a longer goal to prevent this kind of interference, but for now the fix we landed will be enough to address this problem altogether. Yay!
I'll follow up on a cherry-pick request to get e33f84d on the current stable version. My understanding is that it will get to 2.9, but might not be possible to include it with 2.8. However, it is possible to workaround this by adding a couple lines of JavaScript in the page serving the application with practically the same logic as the change above:
<script>
if (typeof window.MemoryInfo == "undefined") {
  if (typeof window.performance.memory != "undefined") {
    window.MemoryInfo = function () {};
    window.MemoryInfo.prototype = window.performance.memory.__proto__;
  }
}
</script>

And here is the cherry-pick request: https://github.com/dart-lang/sdk/issues/43287

@sigmundch Is it possible that other class beside ´MemoryInfo´ had similar changes? Since upgrading to Chrome 87 I run into multiple strange issues when using DDC. With the above workaround I could resolve one of them, but there are more.
I have some code like this:
import 'dart:js' show context;

...
  context['console'][type].apply([
    '%c[$level] %c$name${message.contains('\n') ? ':\n' : ': '}%c$message',
    'color: #9E9E9E',
    'color: #${randomColor(name)}',
    ''
  ], thisArg: context['console']);

This fails with:
  at Object.throw_ [as throw] (http://localhost:60993/dart_sdk.js:4322:11)
    at js.JsObject._fromJs.[dartx._get] (http://localhost:60993/dart_sdk.js:102067:70)
    at Object._checkAndCall (http://localhost:60993/dart_sdk.js:4513:16)
    at Object.callMethod (http://localhost:60993/dart_sdk.js:4575:17)
    at Object.dsend (http://localhost:60993/dart_sdk.js:4578:17)
    at Object._printToConsole
...

Interesting is that this doesn't happen during the first calls to _printToConsole. There seems to be some other code in my project that has a side effect and makes later calls fail.
Even if I replace it with a simple print I run into another issue, a NoSuchMethodError for a case were I know that the accessed field exists 🤔

@Fox32 sorry to hear you are seeing additional failures in Chrome 87.
Do you know if this only relates to code that uses dart:js? On a related note - we normally recommend using package:js instead of dart:js, it tends to have much lower performance overhead.
Let us know if you find more details as you investigate, and please feel free to open a new bug if you have some simple steps that we could use to reproduce the problem locally.

@Fox32 the GamepadList in the prototype chain was a good clue. I'm not sure if this is the only issue, but it does appear that the APIs around that changed in Chrome 86. I filed https://github.com/dart-lang/sdk/issues/43750 to track that.

@sigmundch The GamepadList seems to be the root cause in our application. If I resolve the issue, everything seems to work fine again. We have a workaround in place for #31017 that broke too, but that is not a new issue. I had to change that workaround a bit.

On a related note - we normally recommend using package:js instead of dart:js

Yeah we have some code from the time before you recommended it. Looks like it's time to migrate them to package:js. Just did that and it was pretty easy 🤔 I remembered that my last tries on package:js were quite painful...
Thank you for taking a look!


Issue with Browserify bundle

Hi!
I found a JSPerf test from 2015 that is using your library to test the performance of Virtual-Dom however it appears that there is a problem with the browserified bundle of vdom-virtualize.
https://wzrd.in/bundle/vdom-virtualize@latest
https://wzrd.in/standalone/vdom-virtualize@latest
---FLAGRANT SYSTEM ERROR---

(logs uuid: 44b82b80-c401-11e5-ab1a-5789981fbb2a )

Error: "npm exited with code 1"

code: 1
stdout:
stderr: npm ERR! Linux 3.8.0-19-generic
npm ERR! argv "node" "/home/admin/browserify-cdn/node_modules/.bin/npm" "install" "--production" "--registry" "http://registry.npmjs.org/"
npm ERR! node v0.10.26
npm ERR! npm  v2.14.15

npm ERR! Cannot read property 'virtual-dom' of undefined
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/vdom-virtualize116026-18761-sgvwxu/node_modules/vdom-virtualize/npm-debug.log

dirPath: /tmp/vdom-virtualize116026-18761-sgvwxu

This is probably an issue with the package, and not browserify-cdn itself.
If you feel differently, feel free to file a bug report at:

    https://github.com/jfhbrook/browserify-cdn/issues

Include the ENTIRETY of the contents of this message, and the maintainer(s)
can try to help you out.

Have a nice day!

This seems to be an npm bug. See https://github.com/npm/npm/issues/6581

Fixed. See<EMAIL_ADDRESS>

Thanks a lot! The JSPerf test is working again.
http://jsperf.com/replacement-v-diffpatching/10


Retry test-fixtures loading in case of transaction rollback

In some circumstances, the transaction in the test fixture loading function would rollback when a transaction conflict occurs.
Retry it five times to at least reduce the chance of failures.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@47e4efe). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master    #5125   +/-   ##
=========================================
  Coverage          ?   37.39%
=========================================
  Files             ?      307
  Lines             ?    45558
  Branches          ?        0
=========================================
  Hits              ?    17038
  Misses            ?    26063
  Partials          ?     2457

Impacted Files
Coverage Δ

models/test_fixtures.go
100% <100%> (ø)

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 47e4efe...bc4776b. Read the comment docs.


async zarr

A quick sketch of how we can couple zarr with async code. This is aimed slightly ad pyscript, but can be useful in its own right: for instance, I asked the question a while ago what it would take to be able to fetch concurrent chunks not just from one array but, say, one chunk each from multiple arrays in a dataset.
This sketch is only for reading...
Outline:

we subclass Group, so that __getitem__ produces an AsyncArray
we subclass Array as AsyncArray and overwrite its _get_selection (which calls IO) up to __getitem__ (which is the user-facing API)
we have three stores:

a synchronous HTTP one for the dataset metadata. This can be based on requests for standard python or pyfetch under pyodide. Note that sync calls in pyodide are limited to text, which is perfect for this use case.
a fake synchronous store which merely stored the paths that are attempted, but returns FileNotFound for all of them
a fake synchronous store in which we have prefilled all the keys it will ever need, i.e., this can be a simple dict

The flow goes as follows:

A zarr AsyncGroup is made by reading JSON files synchronously
When we attempt to get data, we make a coroutine in which first we use the fake store and zarr's existing machinery to record all the keys that will be needed (this will temporarily make an array of NaN); then we fetch all these keys concurrently, then we populate a dict and have the existing zarr machinery read from the dict

For interest, this is an fsspec async filesystem for pyodide. We don't need it to be this verbose for zarr.
Note that in the browser, no fetches can ever be done without considering CORS, but any dataset known to work with zarr.js will work for this case too.

(I'm not sure if this needs any specs discussion, since it provides an alternative user API, but it doesn't actually change what zarr does or what the metadata looks like)

I think this might be more appropriate to discuss under the zarr-python repository, since it is just about the zarr-python API.
You might find it interesting to look at the tensorstore python API for ideas, as tensorstore provides an async API.
An alternative to consider would be to just address the limitation in pyscript directly:
I think with the help of a separate webworker thread it is possible to emulate sync fetch requests.
I think there are also options for compiling c code to "async" web assembly, though that does hurt performance.

I am happy to have this in zarr-python instead.
How do you imagine using the tensorstore model? The problem we are facing, is being forced to call zarr's synchronous code in an async context, so using another Futures abstraction sounds like even more complexity.

I think with the help of a separate webworker thread it is possible to emulate sync fetch requests.

In general, getting IO to work well in pyscript is an unsolved problem, and websorkers-as-thread might be part of the solution. Certainly, that's the only way that the browser allows binary sync connections. To be sure, though: we do not want sync requests and pay the latency cost for every single chunk.

I think there are also options for compiling c code to "async" web assembly, though that does hurt performance.

We are stuck with the sync python API, being called from an async context, so this is a python programming problem. Anything lower level will not help us.
As I said at the start though, pyscript is not the only reason to want this.

I am happy to have this in zarr-python instead.
How do you imagine using the tensorstore model? The problem we are facing, is being forced to call zarr's synchronous code in an async context, so using another Futures abstraction sounds like even more complexity.

I think from an API perspective futures are the most natural choice.
You can always create an async API on top of a sync API using a thread pool.  In general it might be best to gradually add async apis to zarr-python from the top down, using thread pools as needed to convert lower-level components from sync to async.  Ultimately would want to add async store implementations so that there are no sync i/o components left.  The codecs are pure computation and don't need to be converted --- they would just always require a thread pool.

I think with the help of a separate webworker thread it is possible to emulate sync fetch requests.

In general, getting IO to work well in pyscript is an unsolved problem, and websorkers-as-thread might be part of the solution. Certainly, that's the only way that the browser allows binary sync connections. To be sure, though: we do not want sync requests and pay the latency cost for every single chunk.

I think there are also options for compiling c code to "async" web assembly, though that does hurt performance.

We are stuck with the sync python API, being called from an async context, so this is a python programming problem. Anything lower level will not help us.

My understanding is that pyscript is built by compiling cpython to webassembly, where sync Python corresponds to sync webassembly/javascript.  I was proposing that instead it could be compiled such that sync Python corresponds to async JavaScript.  Thinking about it more though, I realize that in addition to being a major re-architecting of pyscript, it would also come with major restrictions on "re-entering" python during other operations, and therefore wouldn't really be practical.

As I said at the start though, pyscript is not the only reason to want this.

You can always create an async API on top of a sync API using a thread pool. In general it might be best to gradually add async apis to zarr-python from the top down, using thread pools as needed to convert lower-level components from sync to async.

The fsspec store and indeed the JS HTTP fetch methods are async, so we actually already have this already at the bottom of the stack. Making the compute part "concurrent" isn't useful, it's the IO that matters. You are advocating a completely async alternate codepath all the way through zarr? I am trying to make use of zarr's simplicity to implement something that works quickly without changing the core.
Question to everyone: what does the the zarr.js API look like, is there any async there? I would assume there must be.


added style to fix background color of instruction code in 'Dark' theme

Background of code div didn't change in 'Dark' theme and code was unreadable.

I signed it!

LGTM Thanks!


Allow normal YAML comments

Currently ytt hates normal YAML comments.
If it processes this file:
hello: world # this is a normal comment

$ ytt -f sample.yml
ytt: Error: Unknown comment syntax at line sample.yml:1: ' this is a normal comment': Unknown metadata format (use '#@' or '#!')

This makes it impossible to apply ytt to YAML files that are maintained by 3rd parties who do not care about ytt, or simply oblivious to potential ytt use cases.
Could # be added as a valid comment in addition to #!?
I'm new to ytt, so I'm still trying to use it for stuff. Perhaps I'm going to use it for activities it can't do. For example, I was going to take a https://github.com/cloudfoundry/cf-for-k8s/blob/master/vendir.yml, rewrite the includePaths to get the entire repos (for git contents), and I'd have a vendir.yml that could fetch all the source code. Still trying to figure out how to get ytt to do this. The comments throwing errors might be a red herring.

you can use --ignore-unknown-comments flag to let ytt know it's safe to ignore regular comments. the reason why it's important for ytt to be strict is to catch any accidental missing @ to indicate that it's ytt template code.

Thanks.


Add fluent cancelable method

([x] becomes a filled in checkbox, [ ] is an empty one)

[x] I have verified there are no duplicate active or recent bugs, questions, or requests
[x] I understand that versions below 2.0.0 will no longer be supported for updates.
[x] I have given my issue a non-generic title.
[x] I have read over the documentation (before asking questions on how to do something).

I would like a feature where we can prevent dismissal of dialog if a tap occurs anywhere outside the dialog. This will be useful if we need some input from the dialog and it can't be ignored.

Material Dialogs version: 2.0.0-alpha6

For now, you can just use setCancelable(boolean) on your Dialog instance.
It isn't fluent (doesn't return the dialog) so it would have to be called on its own:
val dialog = MaterialDialog(...)

dialog.setCancelable(false)


OAuth Multiuserfix

WIP PR to fix multiple user sign up using OAuth when using the LDAP backend.
One of the issues with multi-user support is that the email field is not returned by the OCP users endpoint so it was previously unset by default, this makes it so more than 1 user cannot enroll. My solution for the LDAP backend is to parse the identity field and use the user's LDAP dn which is base64 decoded to reconstruct the user's email.

@noseka1 @vpavlin this is tested to work on my cluster, at least it is properly authenticating multiple users whose identities are provided via the LDAP provider. Unfortunately I don't have another cluster configuration to test so I can't add support for other IdPs right now.


Kong performance test, why 10 cores of 20 core CPUs utilization 40-50%, the remaining 10 cores utilization is 0 or very few? ? ?

Additional Details & Logs

Kong version :0.14.1
Kong debug-level startup : kong start     / error level
Kong configuration :

/usr/local/kong/nginx.conf
worker_processes auto;
worker_cpu_affinity auto;
daemon on;

pid pids/nginx.pid;
error_log /opt/data/kong/logs/error.log error;

worker_rlimit_nofile 300000;

events {
    worker_connections 102400;
    multi_accept on;
}

http {
    include 'nginx-kong.conf';
}

/usr/local/kong/kong-nginx.conf
charset UTF-8;

error_log syslog:server=kong-hf.mashape.com:61828 error;

error_log /opt/data/kong/logs/error.log error;

server_tokens off;
include       mime.types;
default_type  application/octet-stream;
client_header_buffer_size 32k;

keepalive_timeout  300s 300s;
keepalive_requests 10000;

log_format main '$time_local $remote_addr $status $server_addr $http_host  "$request" $body_bytes_sent "$http_referer" $http_user_agent $upstream_addr $request $upstream_addr $upstream_response_time $request_time $http_x_forwarded_for $http_tenant_id';

sendfile on;
tcp_nopush on;
tcp_nodelay on;

#reset_timeout_connection on;
#limit_conn_zone $binary_remote_addr zone=addr:5m;
#limit_conn addr 100;
gzip on;
gzip_disable "msie6";
# gzip_static on;
gzip_proxied any;
gzip_min_length 1000;
gzip_comp_level 4;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

open_file_cache max=100000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
client_max_body_size 50m;
client_body_buffer_size 128k;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_buffer_size 64k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_ignore_client_abort on;

# client_max_body_size 50m;
proxy_ssl_server_name on;
underscores_in_headers on;

lua_package_path './?.lua;./?/init.lua;;;';
lua_package_cpath ';;';
lua_socket_pool_size 30;
lua_max_running_timers 4096;
lua_max_pending_timers 16384;
lua_shared_dict kong                50m;
lua_shared_dict kong_db_cache       256m;
lua_shared_dict kong_db_cache_miss 120m;
lua_shared_dict kong_locks          80m;
lua_shared_dict kong_process_events 500m;
lua_shared_dict kong_cluster_events 50m;
lua_shared_dict kong_healthchecks   50m;
lua_shared_dict kong_rate_limiting_counters 120m;
lua_socket_log_errors off;

# injected nginx_http_* directives
lua_shared_dict prometheus_metrics 5m;
.....

@taotao2014,
Please do not cross post on Kong Nation and here.
It seems like this discussion belongs to Kong Nation since it is not a bug report.

@taotao2014 Is this a hyperthreaded CPU? If so, perhaps worker_processes auto setting of nginx is setting according to the number of physical cores, and not HT ones. You can try setting the number yourself, in kong.conf using nginx_worker_processes or directly in the nginx configuration if you use a custom nginx config.

is hyperthreaded CPU
[root@local_11p21 ~]# kong start
[root@local_11p21 ~]# ps -ef | grep nginx
root      2603  2038  0 10:25 pts/3    00:00:00 grep --color=auto nginx
root     21153     1  0 Nov26 ?        00:00:00 nginx: master process /usr/local/openresty/nginx/sbin/nginx -p /usr/local/kong -c nginx.conf
nobody   21154 21153  7 Nov26 ?        01:07:27 nginx: worker process
nobody   21155 21153  8 Nov26 ?        01:16:40 nginx: worker process
nobody   21156 21153  7 Nov26 ?        01:07:59 nginx: worker process
nobody   21157 21153  7 Nov26 ?        01:07:59 nginx: worker process
nobody   21158 21153  7 Nov26 ?        01:10:20 nginx: worker process
nobody   21159 21153  7 Nov26 ?        01:07:28 nginx: worker process
nobody   21160 21153  7 Nov26 ?        01:10:00 nginx: worker process
nobody   21161 21153  6 Nov26 ?        01:02:26 nginx: worker process
nobody   21162 21153  6 Nov26 ?        01:01:11 nginx: worker process
nobody   21163 21153  6 Nov26 ?        01:04:26 nginx: worker process
nobody   21164 21153  6 Nov26 ?        01:05:01 nginx: worker process
nobody   21165 21153  7 Nov26 ?        01:13:22 nginx: worker process
nobody   21166 21153  7 Nov26 ?        01:12:34 nginx: worker process
nobody   21167 21153  7 Nov26 ?        01:14:17 nginx: worker process
nobody   21168 21153  8 Nov26 ?        01:15:09 nginx: worker process
nobody   21170 21153  8 Nov26 ?        01:19:40 nginx: worker process
nobody   21171 21153  8 Nov26 ?        01:22:30 nginx: worker process
nobody   21172 21153  8 Nov26 ?        01:24:04 nginx: worker process
nobody   21173 21153  9 Nov26 ?        01:27:30 nginx: worker process
nobody   21174 21153 10 Nov26 ?        01:34:18 nginx: worker process
Total number of nginx worker process 20

accept_mutex on;

Since there is an existing post on the forums (https://discuss.konghq.com/t/kong-performance-test-why-10-cores-of-20-core-cpus-utilization-40-50-the-remaining-10-cores-utilization-is-0-or-very-few/2336), I will close this here. Please do not cross-post in the future, and please reserve opening Github issues for actual bugs with Kong, as per the issue template. Thanks.


fix: rename swap

Checklist

[x] I have read the coding guide.
[ ] My change requires a documentation update, and I have done it.
[ ] My change requires updating the Open API specification and/or changing its version, and I've done it.
[ ] I have added tests to cover my changes.
[ ] I have filled out the description and linked the related issues.

Description
Rename swap-endpoint to rpc-endpoint.  #3263
Motivation and context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

This change is

There may additionally be the time where the resolver-options actually specifies an rpc-endpoint, and this would be an ethereum mainnet endpoint, as opposed to Gnosis Chain.
Perhaps something like settlement-endpoint, or incentives-endpoint to highlight the use of said endpoint?
------- Original Message -------
On Wednesday, September 28th, 2022 at 6:56 AM, mrekucci @.***> wrote:

@mrekucci commented on this pull request.
Not a good idea, especially renaming it to rpc-endpoint as it has a broad meaning. The prefix swap is narrower, though I agree it's not the best name either. It would be better to come up with a more specific and suitable name.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

Now the endpoint name will be blockchain-rpc-endpoint as finalized in #3263

This PR contains 106 files, most of which are unrelated. Also, some checks are failing.

Done

@umerm-work can you please also update this in Docs?
https://github.com/ethersphere/bee-docs/blob/master/docs/working-with-bee/configuration.md#--swap-endpoint
(there might be other places where this is mentioned as well)

@umerm-work can you please also update this in Docs? https://github.com/ethersphere/bee-docs/blob/master/docs/working-with-bee/configuration.md#--swap-endpoint (there might be other places where this is mentioned as well)

Sure will update it as well.

Thanks, and actually now looking at the code, could there be also a warning in logs that the user is using the old and deprecated flag?


ionViewDidLoad fires before childs components have been loaded

Short description of the problem:
ionViewDidLoad fires before childs components have been loaded.
What behavior are you expecting?
ionViewDidLoad fires after childs components have been loaded, so I can access it's properties that are loaded in ngOnInit
Steps to reproduce:
1.
2.

    #####################

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.x or 2.x
2 RC.0
Run ionic info from terminal/cmd prompt: (paste output below)
Your system information:

Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID: Debian Description: Debian GNU/Linux 8.6 (jessie)
Node Version: v4.5.0

Note to team: I can easily reproduce this in a starter using the above example of trying to access an element directly in ionViewDidLoad.

+1

So after messing about, it looks like if I set a timeout on anything in the ionViewDidLoad method, the time between where I get a white screen and where I get my content is between 30 and 40ms.

@manucorporat Is this just me or this breaks everything?
I use ionViewDidLoad to load all the the items that are being render in the page..
And after I have updated to rc2 everything breaks.
For example

class SomePage {
     items;
    ionViewDidLoad() {
        this.items = [];
    }
}

This thing worked in rc1 and now im getting create read property length of undefined
I guess that angular is trying to draw the page before i initialize the array.
If this is the case where should I put that logic? in the constructor?

I need to rewrite some of the documentation but now the lifecycle makes a lot more sense than before:
ionViewDidLoad, means that everything has been already loaded! including children.
so if you template uses items and it undefined, it will print create read property length of undefined.
You can use two solutions:

Use the new ionViewWillLoad (sorry about that, we are working right now to write more docs):

    ionViewWillLoad() {
        this.items = [];
    }

or you could just do:
class SomePage {
     items = [];
    ionViewDidLoad() {
        // populate items with more items
    }
}

^ I think the second approach is the one I would choose.


Guided Tour Plugin issues selecting panel from other plugin

What happened:
Appreciate this plugin is experimental but wanted to report, when selecting a panel from plugin "Flowcharting" the tour stops without selecting the panel. I see there is an option for Custom CSS target, but no help on what this is supposed to be or how it works
What you expected to happen:
Tour selects panel
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

Grafana version:
Data source type & version:
OS Grafana is installed on:
User OS & Browser:
Grafana plugins:
Others:

it would be great if grafana did something with this plugin, it seemed to be brought in house but then never touched


Updating docs-server docs and making it more reliable.

Updating start_docs_server.sh with README instructions and making it work more broadly.

@robotrapta This was ready to go but I think we forgot to merge it!

I fixed all the merge conflicts by manually re-basing.  So I think this is ready again @sunildkumar


kiali chart should not depend on global.yaml

Task for https://github.com/istio/istio/issues/25184
Find all occurrences of .Values.global in istio-discovery chart
rg -o -e ".Values.global(\.\w+)*" | awk -F\: '{print $2}' | sort -u
Take values from global.yaml into values.yaml
[ ] Configuration Infrastructure
[ ] Docs
[X] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

@jacob-delgado: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
9b3ef6e36fd17d4774546f5e1072ddd801966986
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@jacob-delgado: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
9b3ef6e36fd17d4774546f5e1072ddd801966986
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest


Fix kubeconfig --user value

Recent changes to set the kubeconfig user to user@cluster aren't
taking effect due to a default always being present and not triggering
the logic. This removes the default and allows the proper behavior
to work.
Fixes #125
Signed-off-by: John Harris<EMAIL_ADDRESS>

Ah! Good cath @johnharris85.
LGTM but will let @stevesloka review + merge.

Don't disagree, although it looks like part of the original refactoring process was to leave in some graceful deprecation logic. If we don't care about that then sure we can just kill the field, although if we want to maintain the deprecation path / warning for a version or so, this restores that.

@johnharris85 I think it's fine to remove. If you want to log an error if that field is set then that works so the user is aware of its deprecation.
We'll just need to make sure we have a clear release note as well.