Write changed-path Bloom filters during commit-graph write

The upcoming version of Git includes changed-path Bloom filters which speed up history performance.
We need to respond by updating the commit-graph maintenance step to write these paths.
Some research is required to determine how long this takes to update the commit-graph in a deep history. Should we update Git to have a maximum batch size?

Instead of having this change inside Scalar, I would prefer something like my current PR in https://github.com/gitgitgadget/git/pull/633 where we introduce something like commitgraph.writeChangedPaths=<boolean> config in git. This way, in scalar, the only change needed is to set that config to true.
I prefer this approach as it would also benefit non-scalar users who often only rely on fetch.writeCommitGraph and gc.writeCommitGraph to have their performance boost.

I support a commitgraph.writeChangedPaths config option, but that's not enough for what I need to do here.
I need to do serious performance timings for how long it takes to compute changed-path Bloom filters on a repo with 4 million commits (the Windows OS repo) and see if that's appropriate for an all-in-one write in the background, or if we need to somehow split that computation across multiple steps.
Also, our current incremental commit-graph writes need to be changed. Currently, we have no idea when the layers will collapse and then the --changed-paths would actually apply to the whole commit-graph chain. So, we need to create a strategy to collapse the layers on purpose to make sure every user has filters on every layer.
Finally, Scalar is supposed to work against all Git versions v2.25.1.vfs.1.1 and later. All of the above investigation needs to be gated behind a version compatibility check. (Although, your config idea does solve that, assuming nothing else needs to change.)

Removing no-activity label because @ttaylorr has been doing some critical work in Git to make this possible.

because @ttaylorr has been doing some critical work in Git to make this possible.

I am? :). It is the case that --split=no-merge will help avoid blow-ups in computation time when the commit-graph machinery decides to collapse some layers. There are some bug-fixes in my tb/bloom-miscellaneous branch that should help make the rest of this possible.

because @ttaylorr has been doing some critical work in Git to make this possible.

I am?

I'm specifically talking about --max-new-filters in your tb/bloom-miscellaneous, which unblocks this work.

https://github.com/git/git/blob/master/Documentation/git-commit-graph.txt#L72-L77
https://git-scm.com/docs/git-config#Documentation/git-config.txt-commitGraphmaxNewFilters
The flag has made it to master a while ago... but other than searching the mailing list, I don't see what is the recommended value of this setting or how can we use it

Since Scalar is moving onto the new git maintenance run command (and git maintenance start eventually, too) we will want to engage with the commit-graph task to do this properly.
My current thoughts:

We already have the detection of existing filters to determine if we should continue writing filters. This means that if a user runs git commit-graph write --changed-paths then future maintenance runs should continue writing those changed paths.
If a user sets commitGraph.maxNewFilters, then that will be respected during maintenance. Users will likely want to set it to be a small value so the (default) hourly commit-graph task doesn't take too long.
There are some questions as to how to make a very large repo "catch up". If we rely only on the commit-graph task, then we are waiting for the default split commit-graph merge strategy before computing filters for old commits. Pair that with commitGraph.maxNewFilters setting, then we might be waiting a very long time before large repos actually benefit from this setting.

We haven't had time to do the necessary testing to know what is a good strategy for computing these filters on clients in the background without disrupting their foreground activities. A fleeting idea I've had is to create a commit-graph-full task that flattens all layers of the commit-graph, perhaps at a daily or weekly frequency. That task could also write changed-path filters by default, along with a recommended default for --max-new-filters (being aware of commitGraph.maxNewFilters, if set).
cc: @ttaylorr for his thoughts here.

I wonder if this question should goes to the mailing list instead:
It's not apparent to me how to determine the value of commitGraph.maxNewFilters by reading git official documentation, or what does it even do.
It would takes a bit of time digging through the git mailing list to find a magic max value of 512 (not clear whether this is inclusive <= 512 or exclusive < 512.
Given a repo, how would one calculate what would be a sensible default value for this config?

It's not apparent to me how to determine the value of commitGraph.maxNewFilters by reading git official documentation, or what does it even do.

The value of this configuration is how many Bloom filters a git commit-graph write will compute from scratch before stopping. To write changed-path Bloom filters, we first have to compute them, which is really just doing a first-parent tree diff on all of the commits that are going into the commit-graph layer that we are writing.
Since computing lots of tree diffs can be expensive, it may sometimes make sense to limit the number of them that can be computed. If such a limit is in place and exceeded, Git will write the "uncomputed" filter, which indicates to a future run that Git hasn't tried to compute the CPBF belonging to that commit.
Note that this only applies to the current layer being written, i.e., a previous layer's "uncomputed" filter does not get computed in a subsequent write unless we are combining with that layer (e.g., with --split=replace or via an auto-merge).

It would takes a bit of time digging through the git mailing list to find a magic max value of 512

I'm not sure what you're referring to. Could you link what you are looking at?

Given a repo, how would one calculate what would be a sensible default value for this config?

There is no single magic recommended value. If you are interested in setting this value, you should run a git commit-graph write and see how long it takes to generate changed-path Bloom filters (you can do this easily with GIT_TRACE2_PERF=1 in your environment). This is all highly dependent on the trees in the layer that you are writing.

3. There are some questions as to how to make a very large repo "catch up". If we rely only on the commit-graph task, then we are waiting for the default split commit-graph merge strategy before computing filters for old commits. Pair that with commitGraph.maxNewFilters setting, then we might be waiting a very long time before large repos actually benefit from this setting.

Right; but I think that this is probably fine. I would assume/hope that the normal maintenance task accumulates no more commits than it can comfortably compute Bloom filters for and write into an incremental layer. Setting a high-but-not-unreachable limit would be a good way to ensure that not too many commits occur between maintenance runs.
Is there an "expensive" maintenance run that rolls up all of the accumulated layers into one? If so, maybe setting a higher limit (or none at all) makes sense for that run. Otherwise, if you don't run with --split=no-merge, then it probably makes sense to stick with the same limit and use it even when we are catching up and computing Bloom filters that were skipped during earlier runs.

Ah, the 512 number is the maximum SIZE of one filter, which is indeed a magic number. There is no way to modify this value outside of GIT_TEST_* environment variables (intended only for testing).
As @ttaylorr mentions, commitGraph.maxNewFilters is a different number that defaults to "compute all filters for every commit I'm writing to the commit-graph".

I can't un-no-activity this issue, but this shouldn't be closed since the maintenance builtin doesn't yet set commitGraph.maxNewFilters.

In the case of "no-activity" It's not "closed because done" but instead "closed because fell off the back of the backlog." We have a different item tracking this internally, so I'll close this one.


enumerate all capabilities in setpriv

Using -all in setpriv requires the libcap to be in sync with the host kernel.
Since we don't control the host kernel, we can't ship a working libcap.
Instead, we check how many caps the kernel supports (from /proc) and drop all of those.

build didnt like it


Improve startup performance by lazy-compiling mashumaro serialization…

resolves #97
Description
Mashumaro compilation consumed considerable startup time, by configuring it for lazy-compilation instead we get that time back.
Before:
dbt --help.   1.5s
dbt --version 1.7s

After:
dbt --help    0.7s
dbt --version 0.9s

Checklist

[x] I have read the contributing guide and understand what's expected of me
[x] I have signed the CLA
[x] I have run this code in development and it appears to resolve the stated issue
[x] I have opened an issue to add/update docs, or docs changes are not required/relevant for this PR
[x] I have run changie new to create a changelog entry

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 55.53%. Comparing base (a1a223d) to head (6b0065a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   55.51%   55.53%   +0.01%
==========================================
  Files          50       50
  Lines        3064     3065       +1
==========================================
+ Hits         1701     1702       +1
  Misses       1363     1363

Flag
Coverage Δ

unit
55.53% <100.00%> (+0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Documentation? How to use WebApplicationFactory without CreateClient?

2.1.0 current version.
I am writing integration tests and for the simple reason of "this is how a framework we use is desigend" that I can not change, I can not use the CreateClient method.
I need to have a URL that I pass into the framework so it can create it's own HttpClients. The WebFactory itself also has no property that can be used to create a valid URL.
Simple as it is - how do I create my own HttpClient to run against a WebFactory hosted website? Any documentation? Seems not.

Thanks for contacting us, @NetTecture.
@javiercn, can you please look into this?

Thanks for reaching out.
@NetTecture Can you provide more details on what you are trying to do? I’m not sure I understand.

@NetTecture If your third party component doesn't accept a given instance of HTTP client there is nothing we can do about it. The HTTP Client is the central piece to talking to the server in memory.
You can access and define the url used by the server in WAF.ClientOptions.BaseUrl or by calling CreateClient(new WAFClientOptions)
It's also considered a good practice to take in HTTP client as a dependency and not blindly new one up as its meant to be a singleton and allows for people customizing the HTTP pipeline.
Closing this issue as there's nothing we can do here and the URL is already exposed. See https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-2.1#aspnet-core-integration-tests for docs


GAM-362

I have just installed GAM 362-, created project with all API's I require, have authorized API clients, however I am getting this error:
D:\gam\gam-362\gam-64>gam info domain
Google Apps Domain: xxxx.ca
ERROR: 403: Access Not Configured. The API (Admin Directory API) is not enabled
for your project. Please use the Google Developers Console to update your config
uration. - accessNotConfigured
If this is referring to the Admin SDK, it is enabled

The error is coming from Google so Google seems convinced it's not enabled. Try running:
gam oauth info
and confirm your client id matches the one for the project you're looking at in console.developers.google.com.
Jay

I ran
gam oauth info
The Client ID has access to the following below, I want it to have access to everything, since I am the only one who will be running the scripts
Email (Read/Write/Send)  https://mail.google.com/
https://www.googleapis.com/auth/activity
https://www.googleapis.com/auth/admin.datatransfer
https://www.googleapis.com/auth/admin.directory.customer
https://www.googleapis.com/auth/admin.directory.domain
View and manage the provisioning of users on your domain  https://www.googleapis.com/auth/admin.directory.user
https://www.googleapis.com/auth/admin.directory/activity
https://www.googleapis.com/auth/admin.directory/calendar
https://www.googleapis.com/auth/admin.directory/contacts
https://www.googleapis.com/auth/admin.directory/drive
https://www.googleapis.com/auth/admin.directory/email
https://www.googleapis.com/auth/admin.directory/group
Calendar (Read-Write)  https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/classroom.courses
https://www.googleapis.com/auth/classroom.profile.emails
https://www.googleapis.com/auth/classroom.profile.photos
https://www.googleapis.com/auth/classroom.rosters
https://www.googleapis.com/auth/cloudprint
https://www.googleapis.com/auth/contacts
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/email
https://www.googleapis.com/auth/group
https://www.googleapis.com/auth/plus.login
https://www.googleapis.com/auth/plus.me
https://www.googleapis.com/auth/siteverification
Can i also ask another question related to this.  When I install GAM, whether it be 35, 361 or 362 how many Client ID can it be associated with this gam.exe.  If I create another project and update the oauth2service.json and the client_services.json does this mean the other projects with no longer work.  How do I have more than one project running within GAM with different oauth2service.json and the client_services.json
Thank-You

Ok, the above scopes are from the Admin console, after running
gam oauth info
Results:
Scopes:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/admin.directory.group
https://www.googleapis.com/auth/admin.directory.orgunit
https://www.googleapis.com/auth/admin.directory.user
https://www.googleapis.com/auth/admin.directory.device.chromeos
https://www.googleapis.com/auth/admin.directory.device.mobile
https://apps-apis.google.com/a/feeds/emailsettings/2.0/
https://www.googleapis.com/auth/admin.directory.resource.calendar
https://apps-apis.google.com/a/feeds/compliance/audit/
https://apps-apis.google.com/a/feeds/domain/
https://www.googleapis.com/auth/apps.groups.settings
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/admin.reports.audit.readonly
https://www.googleapis.com/auth/admin.reports.usage.readonly
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/apps.licensing
https://www.googleapis.com/auth/admin.directory.user.security
https://www.googleapis.com/auth/siteverification
https://mail.google.com/
https://www.googleapis.com/auth/admin.directory.userschema
https://www.googleapis.com/auth/classroom.rosters
https://www.googleapis.com/auth/classroom.courses
https://www.googleapis.com/auth/classroom.profile.emails
https://www.googleapis.com/auth/classroom.profile.photos
https://www.googleapis.com/auth/cloudprint
https://www.googleapis.com/auth/admin.datatransfer
https://www.googleapis.com/auth/admin.directory.customer
https://www.googleapis.com/auth/admin.directory.domain
https://www.googleapis.com/auth/admin.directory.rolemanagement
https://www.googleapis.com/auth/plus.me
They are different not sure why


Uncaught TypeError on Menus

Problem description
When I create a Menu element with material-ui and click on it, it seems to be working, but gives errors in the console:
bundle.js:58496 Uncaught TypeError: Cannot read property 'children' of null
    at siblings (bundle.js:58496)
    at hideSiblings (bundle.js:58515)
    at Object.add (bundle.js:58601)
    at Modal.handleShow (bundle.js:59176)
    at Modal.componentDidUpdate (bundle.js:59128)
    at measureLifeCyclePerf (bundle.js:32440)
    at bundle.js:33073
    at CallbackQueue.notifyAll (bundle.js:27140)
    at ReactReconcileTransaction.close (bundle.js:37043)
    at ReactReconcileTransaction.closeAll (bundle.js:28115)

bundle.js:58637 Uncaught TypeError: Cannot read property 'style' of null
    at Object.remove (bundle.js:58637)
    at Modal.handleHide (bundle.js:59184)
    at Object.handleTransitionExited [as onExited] (bundle.js:59403)
    at bundle.js:58138
    at bundle.js:58176

I tried with two different sample code from the docs and they have all the same problem.
Link to minimal working code that reproduces the issue
https://material-ui-1dab0.firebaseapp.com/component-demos/menus
E.g. the "Selected menus" example.

Versions

Material-UI: 1.0.0-beta.3
React: 15.6.1
Browser: Chrome 59.0.3071.115 (Official Build) (64-bit)

It seems like when the following code is executed, window.document.body is null:
var defaultContainer = _inDOM2.default ? window.document.body : {};
[...]
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      _ref$container = _ref.container,
      container = _ref$container === undefined ? defaultContainer : _ref$container,
      _ref$hideSiblingNodes = _ref.hideSiblingNodes,
      hideSiblingNodes = _ref$hideSiblingNodes === undefined ? true : _ref$hideSiblingNodes;

And so defaultContainer and later container will be null. My guess is that bundle.js starts to run in the head, while the body is not yet loaded.

I can't reproduce :/

I reduced the code to minimal, so now I only have:
the server code:
app.get('*', (req, res) => {
  console.log();

  res.send(`
      <!DOCTYPE html>

    `);
}

Client entry (index.js):
import { render } from 'react-dom';
import React from 'react';
import App from './components/App.jsx';

window.addEventListener('load', () => {
  render(<App />, document.getElementById('root'));
});

And the App.jsx:
import React from 'react';
import SingleSelect from './SingleSelect.jsx';

export default class App extends React.Component {
  render() {
    return (
      <SingleSelect />
    );
  }
}

(The SingleSelect.jsx contains exactly the example from the docs site)
And the problem remains. Can you send me a working example of this code, so I can compare them?

Ok, I think that we should add a warning for when people are evaluating the drawer code before the body is parsed by the browser.

For a workaround I added a line to internal/modalManager.js to return if the container is undefined:
function add(modal) {

    if (!container) return;

    var modalIdx = modals.indexOf(modal);
    [...]

And I don't get the error anymore.

-

I have added a warning?

@geiszla, if you want to keep the

See more here http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html


After upgrading Meilisearch from 1.2.0 to 1.3.3 breaks search result

Describe the bug
After upgrading from 1.2.0 to 1.3.3, a test failed and I am curious why the search results has been changed.
To Reproduce
Add index and update:
{
	"uid": "user",
	"primaryKey": "user_id"
}

Update index:
{
	"displayedAttributes":["user_id"],
	"rankingRules": [
		"typo",
		"proximity",
		"attribute",
		"sort",
		"exactness",
		"words"
	],
	"searchableAttributes": [
		"username"
	],
	"filterableAttributes": [
		"username"
	],
	"typoTolerance": {
		"minWordSizeForTypos": {
			"oneTypo": 3,
			"twoTypos": 6
		}
	}
}

Add this user:
		{
			"username": "Pietjuh_Bell",
			"user_id": "e7998ff3-fe7a-4291-8220-982ae604444d"
		}

Previously, searching for Pietj_Bell gave 1 result at Meilisearch 1.2.0, as expected by the configured type tolerance (2 typos allowed for 6 characters or more). Now it gives 0 results.

Hello @Jasperav,
It's an expected change, Meilisearch now splits the words around _ (underscore), allowing the users to search for bell.
However, this change implies that Pietj is now too small to allow 2 typos, so Pietjuh can't be found.
The next version, V1.4, will introduce separator customization allowing the user to remove _ (underscore) from the separators.
Don't hesitate to ask more questions if you need them, or close the issue if my comment answered it,
Thanks for your report,
See you!

@ManyTheFish Ok seems like 1.4 will fix my issues than, these are usernames and shouldn't be separated at all, thanks!

@ManyTheFish I still have a question about the PR and your comment: https://github.com/meilisearch/meilisearch/pull/3946#issuecomment-1668153942. Here you are mentioning that users should provide the list of nonSeparatorTokens themself (you could eventually set the exhaustive list of separators).
For my usecase (username search where usernames can contain any character, which should never mean separation), should I first query the separator tokens myself and than update Meili? What if Meili updates with a new set of characters? Why isn't there an option to disallow token separating at all?

Hello @Jasperav

should I first query the separator tokens myself and than update Meili?
You just have to send the separators you want to add, not to query the original separators of Meilisearch

What if Meili updates with a new set of characters?
If a new Meilisearch version adds new separators, it will be automatically added to the "original" list. But it does not happen often, and you will be informed in the changelogs

Why isn't there an option to disallow token separating at all?
You will be also able to remove separators 😊

Check out the changelogs we create for the first RC of v1.4.0 to be fully aware of what will happen in v1.4.0 next Monday

Hello @Jasperav,
when you speak about username, do you speak about a specific field that contains characters that could be considered separators but shouldn't be in this specific field?
Or, do you have usernames anywhere in your documents and you want some default separators like underscore (_) or dash (-) to no more be considered separators?
Thanks!

@ManyTheFish I have an index which contains a username field. Usernames can contain any characters, this means that I don't want any separators to be used.


Fix export bug around isIE

isIE() returns false when using browsers other than Internet Explorer,
but it worked as if using IE.
I tested in IE 11, Firefox 36.0, and Chrome 40.0.2214.115 m.
This pull request is related with #2312 and #2873.

Thanks for this fix @tanak, very useful.  Sorry for the breakage, I didn't pick it up when reviewing @alexandery's code fragment.

Sorry about that guys. I've posted a reply to: https://github.com/angular-ui/ng-grid/issues/2312 but am seeing now that @tanak has actually fixed the issue in the source code already.


feat: display list of users who retweeted a post in modal

Closes #42

Screenshot

Test plan
See demo video

@0xtsukino
just rebased on main


Cmake deps fix

cmake changes from Venkata.

@gleehokie We should probably re-assign this and have someone fix the issues.

@gleehokie  We should probably re-assign this and have someone fix the issues.

I agree @wanderingbort, assigned to @larryk85.

Closing this, its tracked in JIRA


[Storage] Storage data-plane track 1 SDK triggers SyntaxWarning on Python 3.8

Package Name and Package Version:
https://pypi.org/project/azure-storage-blob/2.1.0/

Operating System:
All

Python Version:
3.8

Describe the bug
When the source of Storage data-plane track 1 SDK is compiled for the first time (no __pycache__ folders present), Python 3.8 gives warning:
>>> import azure.storage.blob
d:\cli\env38\lib\site-packages\azure\storage\blob\_upload_chunking.py:403: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if n is 0 or self._buffer.closed:
d:\cli\env38\lib\site-packages\azure\storage\blob\baseblobservice.py:1009: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if lease_duration is not -1 and \
d:\cli\env38\lib\site-packages\azure\storage\blob\baseblobservice.py:2660: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if lease_duration is not -1 and \
d:\cli\env38\lib\site-packages\azure\storage\common\_connection.py:82: SyntaxWarning: "is" with a literal. Did you mean "=="?
  self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme

This usage is against the Python 3.8 definition:
https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior

The compiler now produces a SyntaxWarning when identity checks (is and is not) are used with certain types of literals (e.g. strings, numbers). These can often work by accident in CPython, but are not guaranteed by the language spec. The warning advises users to use equality tests (== and !=) instead.

To Reproduce
Clear azure\storage\blob\__pycache__ and azure\storage\common\__pycache__, then run
import azure.storage.blob

Expected behavior
No warning should appear.
Additional context
Internal ticket and screenshots: https://dev.azure.com/azuretracking/Azure tracking/_workitems/edit/1271

a note: this is an issue discussed with @jiasli offline, this is a issue for track1. storage will discuss about whether this will be fixed by a release or not


fix(cdk/a11y): clear active item in key manager if it is removed from the list

The active item in the ListKeyManager gets updated on keyboard events, but if the list changes between them, we may end up in a state where it's pointing to an item that's not in the DOM anymore. This can cause something like aria-activedescendant to point to an invalid element.
These changes add some logic that clear the active element if it's removed from the list and there's nothing at its new index.

I don't remember, it might be because activeItem can be null too. I went for -1, because it's what we use in other places when we want to clear the active item.

Thank you @crisbeto for fixing this!! @jelbourn Can this be merged soon? My team needs this logic.

@vanessanschmitt looks like there are ~5 failing tap targets that need debugging for this one

Oh shoot, okay! Thank you for letting me know, and for bumping the priority!

LGTM. Related question: do you know why the activeItemIndex getter is typed to return null while we use -1 here?

I actually had a similar question! Seems like activeItemIndex is always a number from initialization... except for on QueryList.changes.  What confuses me is that both QueryList.toArray() and QueryList.toArray().indexOf() returns any. 🤷♂

I did another presubmit of this, and it seems like there's a change after check error in some cases:
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'aria-activedescendant: mat-option-136'. Current value: 'aria-activedescendant: mat-option-139'

That team's logic is a little hard to follow, there's some observable that causes the options to change.  Maybe if we just set aria-activedescendant directly instead of through a binding it would help?

I did another presubmit of this, and it seems like there's a change after check error in some cases:
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'aria-activedescendant: mat-option-136'. Current value: 'aria-activedescendant: mat-option-139'

That team's logic is a little hard to follow, there's some observable that causes the options to change.  Maybe if we just set aria-activedescendant directly instead of through a binding it would help?

Setting it directly in their code should help, but is it the only place where it fails like this? I wonder whether it isn't a symptom of a deeper issue.

Setting it directly in their code should help, but is it the only place where it fails like this? I wonder whether it isn't a symptom of a deeper issue.

I've tried debugging the ~5 failures but have not been able to figure out the issue. For some reason, the updateActiveItem seems to be called during change detection. If I change it to setTimeout(() => this.updateActiveItem(this._activeItemIndex)); then things pass again.

Is it happening for a specific component?

Yeah its for autocomplete - I tried to make a reproduction but couldn't manage it. We have a different change detection strategy in Google that makes it hard to simulate it in our spec

It's worth noting that the autocomplete is also a bit of a special case, because it hides some logic behind a Promise.resolve which has to be flushed in tests.

Hmm interesting, I wonder if that's causing the syncing issue? I tried adding detect changes in several places, especially throughout the tests but it didnt work

Flushing those promises requires calls to tick as well. There are some examples in the autocomplete tests: https://github.com/angular/components/blob/master/src/material/autocomplete/autocomplete.spec.ts#L250.

Unfortunately adding tick and flush after each line of the test didn't work

Would it be crazy to just get this in by making it use a timeout to escape the change detection? We could leave a note saying its suboptimal but necessary to just get it in. Is it possible we could get into bad race conditions if we did that?

My concern with the timeout is that it could cause even more fakeAsync tests to fail since they'll have a new timeout that needs to be flushed.

This may be a good example for future team discussion on how we should handle PRs that are too time-consuming to merge. I'd love to spend more time debugging what the issue is, but it's hard to prioritize that work over other stuff =\

This has the same issues as #14471 - there is a chance of an ExpressionChangedAfterItHasBeenCheckedError for components using the active option for aria-activedescendent (autocomplete trigger, select, others?). This is because components directly bind to the active item in the key manager and it appears to be changing during change detection.
It looks like a way to fix this is to save the active item when the key manager emits the active item index in the change stream.
For example, in autocomplete.ts add something like this:
  /** The latest active option set by the key manager. */
  _activeOption: MatOption | null;

  ngAfterContentInit() {
    ...
    this._activeOptionChanges = this._keyManager.change.subscribe(index => {
      if (this.isOpen) {
        this._activeOption = this.options.toArray()[index] || null;
        ...
      }
    });
    ...
  }

And then in the autocomplete-trigger.ts, change get activeOption so that it uses this property instead of directly accessing the key manager's values:
  /** The currently active option, coerced to MatOption type. */
  get activeOption(): MatOption | null {
    return this.autocomplete?._activeOption || null;
  }

There's a few more tests to debug but this gets rid of the difficult expression issues

Unfortunately after several attempts of fixes, this PR just won't be able to land. Initially this presents some ExpressionChangedAfterItHasBeenCheckedError errors when autocomplete and select update the aria-activedescendants attribute. Changing this to a manual setter fixes those, but reveals that theres another issue with MatOption's active and selected class state. Even with those all changed to direct setters through the DOM, many tests fail because of assumptions about the component states during change detection.
Also its not clear whether updateActiveItem or setActiveItem should be set. If its the latter, some clients might have receive unexpected events where the select changes even though the user didn't actually change something.
The root issue here seems to be that it is not safe to change the active item during change detection, which this may be doing. Changes to the value could have side effects to bindings that have already been checked in another view template.
My recommendation is that this PR becomes the addition of a comment in the ListKeyManager that this is a known issue and does not have a good solution.


Fix size-1 Jacobian with Enzyme

DI extensions

Use onehot instead of chunkedonehot to initialize shadows for Enzyme's Jacobian when the batch size is 1

DIT source

Add functions from $R^1$ to $R^1$ to the default scenarios

Codecov Report
Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 50.88%. Comparing base (5419f9a) to head (25797a8).

Files
Patch %
Lines

...ifferentiationInterfaceEnzymeExt/forward_onearg.jl
0.00%
3 Missing :warning:

:exclamation:  There is a different number of reports uploaded between BASE (5419f9a) and HEAD (25797a8). Click for more details.
HEAD has 37 uploads less than BASE

Flag
BASE (5419f9a)
HEAD (25797a8)

45
8

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #374       +/-   ##
===========================================
- Coverage   96.57%   50.88%   -45.69%
===========================================
  Files          99       71       -28
  Lines        4876     2641     -2235
===========================================
- Hits         4709     1344     -3365
- Misses        167     1297     +1130

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Question: Does this work with multiple domains?

Hi,
GnG can be used as centralized fleet managemnet with users in different domains? (i.e A coworking space)
Thanks

We haven't heard anything further about this, so I'm going to resolve this issue.

Hello,
I refloat the thread.
I currently have an external helpdesk team that needs access to GnG administration.
Being external they have a different domain to the main one, they are both within the same G Workspace console.
I have reviewed this section https://github.com/google/loaner/blob/master/docs/gngsetup_part2.md#step-5-customize-the-app-constants, changed the APP_DOMAIN variable and deployed the code again but I still can not access with the new domain, I get an error saying that "ERROR<EMAIL_ADDRESS>is not an authorized user for one of the domains: domain.net".
Does anyone know what can be happening? Is it possible to access with different domains?
Before making this change, the user did not directly log in to the administration by returning a FORBIDDEN message.
Thanks in advance.


Posibility to add a new project straight from the editForm

I'm integrating a new service with Toggl. I always provide both description and projectName, but I've found out that project is ignored when it can't be associated with any existing project at the server side. In that case, edit form shows a default label of "Add project", but all you can do is picking any of existing ones.
You are forced to switch to Toggl App and to manually add the project for use with Toggl Button.
My proposal is to include an additional option: "Create a new project" with a value of projectName as a default (which can be obviously be changed).

This feature would make the button integrations so much smoother.

I agree, I had recommended it a while ago as well.

On 22.02.2016, at 16:59, Jeff Behnke<EMAIL_ADDRESS>wrote:
This feature would make the button integrations so much smoother.
—
Reply to this email directly or view it on GitHub https://github.com/toggl/toggl-button/issues/401#issuecomment-187243928.


fix: fixed node14 support

Please describe the changes this PR makes and why it should be merged:
This plugin cannot be ran in a Node 14 environment, i.e. in CI.
This solution is ported directly from my esbuild-plugin-version-injector which you've looked at before.
Status and versioning classification:

Code changes have been tested and working fine, or there are no code changes. Tested with volta pin node@14 and yarn link ... combination.

@all-contributors please add @favna for code


MRG, BUG, ENH: Add window option

Closes #8660

CIs complain though

Beautiful - thanks @larsoner!


Decompression broken?

How do you decompress the stacks? Placing a full single compressed cobblestone doesn't give an output in the crafting table or inventory window  shapeless crafting area.
Thanks.
Tested with a minimal instance and Compression 0.0.4

So, as of right now, its a keybinding type deal. However, the algorithm I use for this needs to be tweaked a bit.


[9.x] Tap into query for refresh() and fresh()

Ex-PR (#39333) was closed because it was unsuitable for 8.x. The entire explanation is in #39333

@dennisprudlo That's why I submitted this PR for 9.x

@rennokki Was answering to this:

it changes the function signature although it is reverse compatible. 🤦


helm: Add network policy

Our default installation steps tells you to install weave-gitops in flux-system. Flux-system already contains network policies, and weave-gitops doesn't extend them to work, so if you enable network policies and follow our manual, gitops wouldn't work.
This creates enough network policies for weave gitops to work, even if your system default is to deny everything.
This creates network policies for

Ingress access to the regular dashboard port, and optionally the metrics port - no other ingress should be required.
Unrestricted egress access - when installed into flux-system this is redundant (flux already provides all pods in the namespace unrestricted egress), but in case it's installed into other namespaces this would make gitops work.

We could look into shrinking the egress permissions, but some of those can be configured (e.g. by configuring the cluster pool), so I'm not going to get into that today.
This resolves #2600.

To test, I was stubborn and stuck to kind, which requires a bit of a complicated setup:
Create a new cluster using this config:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  disableDefaultCNI: true # disable kindnet
  podSubnet: <IP_ADDRESS>/16

Then run kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.1/manifests/calico.yaml and you end up with a network overlay that supports network policies.
I then created a namespace to use and created this reject-all policy:
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-all
  namespace: <the-namespace>
spec:
  podSelector: {}
  policyTypes:
  - Ingress
  - Egress

and then made sure I could install and access weave-gitops in that namespace (easiest way: add namespace parameter to the main helm() function call in the Tiltfile).


Add input manager of handling priority

Need some central manager that can distribute input events and allow consuming them so they can't be handle by other input handlers.
Priority can be based on an integer sorting value

Hey team! Please add your planning poker estimate with ZenHub @inabe-a @Kryptos-FR @sinkingsugar


Get duration of non-debug Apex tests

We currently get duration of Apex test execution only when debug is enabled. This should be possible for non-debug tests too, through the tooling API. Query for the field "RunTime" on the Apex test result.

due to debug log trimming, we should grab all limits data from the tooling api as well.

I don't think the tooling api pulls out SOQL and DML limits. If the debug logs are trimmed due to size what's the best way to pull those out - short of turning off all other debug log settings before executing tests?

The tooling api produces limits data for test runs, see https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apextestresultlimits.htm

/services/data/v40.0/tooling/query?q=select+id,cpu,dml,dmlrows,soql,queryrows,ApexTestResult.ApexClass.Name,ApexTestResult.MethodName,ApexTestResult.Outcome+from+ApexTestResultLimits+where+ApexTestResultId='07M41000009gaTTEAY'

SELECT Id,ApexClass.Name,
       ApexLogId,TestTimestamp,
       Message,MethodName,Outcome,
       QueueItem.Status,QueueItem.ExtendedStatus,
       RunTime,StackTrace,
       (SELECT
          Id,Callouts,AsyncCalls,DmlRows,Email,
          LimitContext,LimitExceptions,MobilePush,
          QueryRows,Sosl,Cpu,Dml,Soql
        FROM ApexTestResults)
FROM ApexTestResult
WHERE AsyncApexJobId='{}'
``` to get the whole dataset for a job run.


[Bug]: npm run build does not create a build folder

Which Remix packages are impacted?

[X] remix (Remix core)
[ ] create-remix
[ ] @remix-run/architect
[ ] @remix-run/cloudflare-workers
[ ] @remix-run/dev
[ ] @remix-run/express
[ ] @remix-run/netlify
[ ] @remix-run/node
[ ] @remix-run/react
[ ] @remix-run/serve
[ ] @remix-run/server-runtime
[ ] @remix-run/vercel

What version of Remix are you using?
1.1.1
What version of Node are you using? Minimum supported version is 14.
16.7.0
Steps to Reproduce

npx create-remix@latest

Add build script to package.json as follows -

  "scripts": {
    "build": "remix build",
    "dev": "remix dev",
    "postinstall": "remix setup node",
    "start": "remix-serve build"
  },

Run
npm run build

Run
npm start

Expected Behavior
build folder should be created and rpm start should work
Actual Behavior
==> npm start

> start
> remix-serve build

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: /build'
Require stack:
-<EMAIL_ADDRESS>-<EMAIL_ADDRESS>    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.createApp (/node_modules/@remix-run/serve/index.js:35:12)
    at Object.<anonymous> (/node_modules/@remix-run/serve/cli.js:32:7)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
...

  ]
}

I reproduced the steps and everything was working fine, what did you choose the deployment target? is it Remix app server

I picked Vercel

You have to pass the serverBuildDirectory which is defined in your remix.config.js to remix-serve in order to start the app
in case of Vercel it's this

"start": "remix-serve ./api/_build"

Even better would be to start with NODE_ENV as production to make it work more like a production app

"start": "NODE_ENV=production remix-serve ./api/_build"


Too many requests, retry after 1

I updated my bot code, and updated the dependencies as well.
After updating, my bot, hosted on OpenShift, will constantly crash with:
* Running on http://<IP_ADDRESS>:8080/ (Press CTRL+C to quit)
 * Restarting with stat
Traceback (most recent call last):
  File "app.py", line 177, in <module>
    bot.setWebhook('https://pymariachi-xinayder.rhcloud.com/hook')
  File "/var/lib/openshift/574af7692d5271961e00014d/python/virtenv/venv/lib/python3.3/site-packages/telepot/__init__.py", line 634, in setWebhook
    return self._api_request('setWebhook', _rectify(p))
  File "/var/lib/openshift/574af7692d5271961e00014d/python/virtenv/venv/lib/python3.3/site-packages/telepot/__init__.py", line 398, in _api_request
    return api.request((self._token, method, params, files), **kwargs)
  File "/var/lib/openshift/574af7692d5271961e00014d/python/virtenv/venv/lib/python3.3/site-packages/telepot/api.py", line 131, in request
    return _parse(r)
  File "/var/lib/openshift/574af7692d5271961e00014d/python/virtenv/venv/lib/python3.3/site-packages/telepot/api.py", line 123, in _parse
    raise e(description, error_code, data)
telepot.exception.TooManyRequestsError: ('Too Many Requests: retry after 1', 429, {'error_code': 429, 'parameters': {'retry_after': 1}, 'ok': False, 'description': 'Too Many Requests: retry after 1'})

I tried contacting Telegram's bot support, but they said I was setting the callback multiple times, when I am not (or I think so). In case anyone's interested, here's my code
I don't know why this is happening. Everything is the same since I last updated my bot.

a quick way to fix this....
In updater.py, insert "sleep(1)" after line 317 to prevent sending setWebhook for clean and making connection in a short time.

I'm also having the same error, started on Sept 23rd out of nowhere. My bot is hosted on Heroku, and the error happened even when I specified to use Telepot 8.3
setWebhook() with no arguments raises no exception
Manual setWebhook with curl sets it successfully
Long-polling raises no exception
The same error happens if I use the token for my test bot that is offline most of the time
In the end I set the webhook manually and commented out the command in my code. Is the webhook something you can just set and forget? (unless, of course, you change hosts or bot token)

I managed to fix it by importing time and setting it to sleep before each setWebhook call.

Did you have bot.setWebhook() immediately followed by bot.setWebhook('url')?
I had it in my code from the Heroku sample pull request. So it could be that this was all simply a server-side change to limit webhooking spam on Telegram.

No, I had the empty one being called before setting the URL. I have updated my code, in case you want to take a look

Oops, sorry, I was too focused on the problem and forgot that you posted your code.
But that's what I meant, an empty setWebhook, and next line one setting the URL. I also had it like yours, without any sleep between calls.
So it seems the error is just Telegram implementing a limit for the rate you can set (and unset) webhooks.

Hi guys, thanks for diagnosing the problem. I first thought it had something to do with my setting retries=3 in urllib3 since 9.0. Relieved to see that the problem lies somewhere else.
Out of pure curiosity, why do you need setWebhook() before setWebhook(url)? Telegram seems completely ok with you changing URLs like this:
>>> bot.setWebhook('https://k.whatever.org/abc')
True
>>> bot.setWebhook('https://k.whatever.org/abcde')
True

It seems there's no need to unset it before setting it.

Initially I had the bot running locally with long-polling Then when researching how to make it work on Heroku, I found the Heroku Sample code I mentioned above, and it had the lines
BOT.setWebhook() # unset if was set previously
BOT.setWebhook(URL + SECRET)

I just never questioned it and also included it in my code, since I am still a complete newbie when it comes to connectivity in apps.

Same for me, I saw the Heroku example and it cleared the webhook before setting it again, so I added it to my code.

Ok, so it seems this line is NOT needed:
bot.setWebhook()

To set webhook URL, you only need this line:
bot.setWebhook(URL + secret)

And you can forget about all those time.sleep(...).
I seldom use webhook myself, so the above comment is only as far as I can see.

I still get the error. I'm hosting on Heroku and my code is

bot.message_loop({'chat': on_get_message}, source=UPDATE_QUEUE)

@app.route(SECRET, methods=['POST', 'GET'])
def pass_update():
    UPDATE_QUEUE.put(request.data)
    return 'OK'

sleep(5)
bot.setWebhook(URL + SECRET)

(added more than the two last lines for context since it might be wrong)
I still get the error although I tried to sleep() before the setWebhook() and before the setWebhook(URL + SECRET), and some other variations of setWebhook() and sleep()

@Noammac any news? I'm facing the same here

Nope. Not a single change, the bots work for one second before erroring and
dying
On Tue, 18 Oct 2016 15:10 Lenin Medeiros<EMAIL_ADDRESS>wrote:

@Noammac https://github.com/Noammac any news? I'm facing the same here
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nickoala/telepot/issues/165#issuecomment-254488685,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ASpZqx6oT4tD_5Eu4quq2L2Q-eu05CfCks5q1LdEgaJpZM4KF6yD
.

same problem:
heroku, setWebhook and TooManyRequests

I erased the setWebhook line and committed it, and it worked! The bit
responds to messages and I can see it logging in the console.
On Tue, 25 Oct 2016 17:47 Dmitriy Boger<EMAIL_ADDRESS>wrote:

same problem:
heroku, setWebhook and TooManyRequests
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nickoala/telepot/issues/165#issuecomment-256056446,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ASpZq86Vz9A_YO_tnZgd02Wn1d_X8gEbks5q3hZzgaJpZM4KF6yD
.


revocation error

I am looking at using the aurelia-open-id-connect plugin which seems nice and straightforward to use
The only issue I am having tho is when calling the signoutRedirect method for the userManager object.
When I call it I am getting a 400 error as below:

Am I missing anything?
Thanks again in advance
Stuart

Check your logs in your token server -- I suspect the 400 is due to failed authentication on the revocation endpoint. You might need to configure it to not need authentication for this client (or use dummy credentials).

All set? Can we close?

yes, i think we can for the moment anyway :) thanks


Implement a mail panel

Based on epic #48
Implement a mail panel which shows the inbox of the client and includes the sender, the subject and preview of the contents of the email.

implemented in 1.4.1


correct typographical error in docs.

Closes #
📝N/A

changed whiten ----> within
in docs.

⛳ Current behavior (updates)

Please describe the current behavior that you are modifying

🚀 New behavior

Please describe the behavior or changes this PR adds

💣 Is this a breaking change (Yes/No):No

📝 Additional Information

My pleasure.  Looking forward to future contributions


UnboundLocalError: local variable 'bot' referenced before assignment

Upon running master branch:
$ ./run.sh
2016-08-07 18:03:59,911 [       cli] [INFO] PokemonGO Bot v1.0
Traceback (most recent call last):
File "pokecli.py", line 493, in
main()
File "pokecli.py", line 126, in main
if bot:
UnboundLocalError: local variable 'bot' referenced before assignment
Other Information
OS: Windows 10
Git Commit: ad6c21aa1dc0902c62e4001f9a81ce1fcd8a9f59
Python Version: 2.7.12

I got this error before, when the config file have syntax error, missing a comma. Suggest u check ur config file.

thanks!

@arkriloth Can this be closed?

yup


updated gradle to use 2.1 and plugin 1.0, updated min sdk version to 14

Hi,
The android manifest in the library has on explicit SDK version set, this causes the below permission to be implied and thus filters down into our app which uses the library.

READ_PHONE_STATE

If the SDK version is > 3 then this permission is no longer implied, I have updated the android manifest to explicitly set an SDK version of 14 as specified in your docs and also updated the gradle plugin build tools and compile sdk to the latest versions.
Kind regards,
Nic

Thanks @nicholasjackson. We will look at this!

Hi @nicholasjackson. We have merged this fix internally and it will be released in the next version.

Superb thanks,
Nic
On Thu, 5 Feb 2015 at 18:53, Matthew Tole<EMAIL_ADDRESS>wrote:

Hi @nicholasjackson https://github.com/nicholasjackson. We have merged
this fix internally and it will be released in the next version.
—
Reply to this email directly or view it on GitHub
https://github.com/pebble/pebble-android-sdk/pull/2#issuecomment-73103685
.

Thanks a lot!


Different results using pyccl and astropy for the calculation of luminosity distance

Hi there, I am trying to use pyccl to replace astropy in my codes now, but I found that the results of pyccl do not match the results of astropy perfectly (for example the calculation of luminosity distance).  More details are attached below.
from astropy.cosmology import FlatLambdaCDM
cosmo = FlatLambdaCDM(H0=71, Om0=0.264, Ob0=0.045)

DL = cosmo.luminosity_distance(4.0).value*cosmo.h

This is the code for the calculation of luminosity distance with astropy; the result is 26120.75 Mpc/h
However, when I implement the same calculation with pyccl
import pyccl as ccl
cosmo = ccl.Cosmology(Omega_c=0.264, Omega_b=0.045, h=0.71, A_s=2.1e-9, n_s=0.96)

DL = ccl.luminosity_distance(cosmo, 1/(1+4.0))*cosmo['h']

The result is 24856.02 Mpc/h
I guess the difference is due to the initialization of cosmology models; Could anyone please help me to figure this out?  Sorry for bothering you with such a dumb question. Thanks a lot.

The documentation for astropy states that Om0 is Omega_m, meaning it is all matter, whereas Omega_c in ccl is for CDM only. Please set Om0 = Omega_c+Omega_b and test if you still get a different answer.

CCL includes the contributions from radiation, so you'll need to set the Tcmb0  parameter in astropy as well.

I can confirm that the difference between Om0 and Omega_c is sufficient to explain the difference to the 10^-3 level. I imagine Tcmb0 will bring it even more into line.

I am grateful for the prompt responses. I have updated both Om0 and Tcmb0, it did fix the significant difference, and 1e-6 is sufficient for my calculation.  problem solved. Thank you both.


[qwt] Install headers in the qwt subdirectory

This is the location used by the upstream installation procedure, as it is possible to see by the layout of the package in Debian: https://packages.debian.org/sid/amd64/libqwt-headers/filelist .

Thanks!


Custom Curved Navigation Bar UI Design

Description
This navigation bar UI is a modern, curved design that provides an aesthetically pleasing and minimalistic look. The navbar consists of distinct, rounded icons for navigation options. The clicked button will be visually separated from the rest of the menu items through a creative and curved background effect, while the other options maintain a clean, uncluttered appearance.
This design is ideal for mobile or responsive interfaces as it simplifies navigation, provides a fresh visual experience, and highlights the currently active option. It uses a smooth curve and icon-based interface for ease of recognition and accessibility.
Screenshots

Checklist

[X] I have checked the existing issues.
[X] I have read the Code Of Conduct
[X] The changes don't break the code
[X] Please attach the screenshots and video of the development work once it is done

@Priyanshi0112
You can add this feature, but the website isn't fully responsive yet. Could you make the website responsive first? Once it's fully responsive, you can add the feature. If you successfully make the website responsive, I'll grant you Level 3.

@swaraj-das okay I will  do it


Merged with hybridgroup's Client2 version

@artemrizhov I'd love to get OAuth2 support merged in. You mention this doesn't work with YouTube? Do you have any tests?

To get this merged we'll need:

PR rebased to current master.
Any commits non-specific to the PR removed.
Tests :)
Commits squashed into one commit.

Appreciate your hard work!

@joestump I don't have any tests. I just merge the main version with the @hybridgroup's version. https://github.com/hybridgroup/python-oauth2
But this happened many years ago, so this version may be obsolete.


fix(contrib/drivers/mssql): fix mssql paging sql generate statement error

fixed #3343

There seems some problem with the CI, I'll check the CI later by later.

@freesme Hello, this PR will be blocked as there's some issue in mssql driver docker service in ci. This PR will be merged after the mssql driver docker service resumes.


Incorrect items shown in /buy.

So you got an issue with your /buy command and I'm not exactly sure how you guys would solve this one.
My main server is 1.13.2
My skyblock server is 1.12.2
Main server's /buy command:
https://i.imgur.com/93iEHMx.png
Skyblock server's /buy command:
https://i.imgur.com/WxBWxeI.png
SkyBlock category setup:
https://i.imgur.com/UsVJQQ9.png
TL;DR you can only enter one GUI item. GRASS is 1.12.2 and GRASS_BLOCK is 1.13.2
Not sure how you would fix this but would be really nice if you can figure something out. :)
Ultimately may need some sort of version/item name detection. Hmm...

This is not fixed.


Lab 6: Level 4

Summary
Not sure where the issue with my logic is?
Description of the question / problem here.
Description:
Using the UnaryOperator generateRule(), everytime I run my code, it just ends up like the bottom, does anyone know why?
Code Snippets
Attach code snippets (if any)
Screenshots

Screenshots (if any)

There are few things you need to check. I would suggest to abstract out the checking by declaring another function since there's quite a few thing to check. If index == 0, check if right of itself is 1 if so 1 else 0. Similar if index == list.size() - 1, check the left is 1 if so 1 else 0. Other wise, check if left and right is 1, if so 0 else 1.

By your logic, both neighbours must be alive for it to be alive in the next generation. But the question states at most 1 neighbour alive.

i think you need to change the return statement line, instead of putting &&, use || because only 1 neighbour needs to be alive. alternatively, you could do left + right == 1

u could try to use the xor operator ^ to ensure only 1 neighbour was alive

i had the same issue, If the index is at the beginning of the list, verify whether the element to its right is 1; if it is, return 1, otherwise return 0. Similarly, if the index is at the end of the list, check if the element to its left is 1; if it is, return 1, otherwise return 0. Otherwise, examine if both the left and right elements are 1; if they are, return 0, otherwise return 1.

i just did:

check if alive, return 0
check if first index AND next one is alive, return 1, else return 0
check if last index AND previous one is alive, return 1, else return 0
check if (prev is alive AND next one is not) OR (prev is not AND next one is alive), return 1
return 0

hope this logic helps!

Did it work @Slyriss? If you find them useful and it helped you solve your issue, you might want to close this issue to declutter the forum. Thank you!


集保中心股權分散表無法正常取得

問題描述
tdcc.py 的 get_argument() 寫錯，導致集保中心資料抓不到
重現方法
用下列步驟可以讓程式爆掉

python3 -m twnews.finance.tdcc

預期行為
[17:53:24] common  | DEBUG   | 建立新的 session
[17:53:26] finance | INFO    | 已更新 TDCC 20200417 的股權分散表
[17:53:26] news    | DEBUG   | 使用快取目錄: /Users/raymond/.twnews/cache/tdcc
[17:53:27] finance | DEBUG   | 已儲存 TDCC 2020-04-17 的股權分散資料 5000 筆
...

實際行為
結果變成這樣 ...
python3 -m twnews.finance.tdcc update
[17:46:11] finance | ERROR   | 無法識別的動作 /Users/raymond/repos/twnews/twnews/finance/tdcc.py

系統環境

Python: [至少要 3.5 以上喔]
OS: [例如 Ubuntu 18.04]

解決 get_argument 問題後又出現這個問題
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/usr/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.5/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 400, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/usr/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.5/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/twnews/twnews/finance/__init__.py", line 134, in fucking_get
    resp = session.get(url, params=params)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/root/twnews/twnews/finance/tdcc.py", line 166, in <module>
    main()
  File "/root/twnews/twnews/finance/tdcc.py", line 159, in main
    sync_dataset()
  File "/root/twnews/twnews/finance/tdcc.py", line 140, in sync_dataset
    changed = backup_dist()
  File "/root/twnews/twnews/finance/tdcc.py", line 134, in backup_dist
    return fucking_get(hook, url, params)
  File "/root/twnews/twnews/finance/__init__.py", line 141, in fucking_get
    raise NetworkException(msg)
twnews.exceptions.NetworkException
root@ubuntu:~/twnews# python3 -m twnews.finance.tdcc update
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/usr/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.5/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 400, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/usr/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.5/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/twnews/twnews/finance/__init__.py", line 134, in fucking_get
    resp = session.get(url, params=params)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/root/twnews/twnews/finance/tdcc.py", line 166, in <module>
    main()
  File "/root/twnews/twnews/finance/tdcc.py", line 159, in main
    sync_dataset()
  File "/root/twnews/twnews/finance/tdcc.py", line 140, in sync_dataset
    changed = backup_dist()
  File "/root/twnews/twnews/finance/tdcc.py", line 134, in backup_dist
    return fucking_get(hook, url, params)
  File "/root/twnews/twnews/finance/__init__.py", line 141, in fucking_get
    raise NetworkException(msg)
twnews.exceptions.NetworkException

在兩個環境上測試 wget 下載股權分散表，發現日本 Linode 會使用 IPv6 而且無法連線
$ wget -O tdcc0417.csv https://smart.tdcc.com.tw/opendata/getOD.ashx?id=1-5
# DS218+
Connecting to smart.tdcc.com.tw|<IP_ADDRESS>|:443... connected.
# 日本 Linode
Connecting to smart.tdcc.com.tw (smart.tdcc.com.tw)|2001:4420:60b2:0:210:241:84:211|:443... connected.

寫簡短的測試程式，發現 google 正常但 tdcc 無回應
import requests
url = 'https://smart.tdcc.com.tw/opendata/getOD.ashx?id=1-5'
# url = 'https://www.google.com.tw'
resp = requests.get(url)
print(resp.status_code)

使用這一招搞定
https://stackoverflow.com/questions/33046733/force-requests-to-use-ipv4-ipv6


[stable/memcached] Add icon and description

PR in the context of normalizing/improving metadata in official charts. Refs https://github.com/kubernetes/charts/issues/124 and https://github.com/helm/monocular/issues/93
NOTE: I have not bumped the chartVersion attribute in order to avoid race conditions/conflicts with existing PRs. Maintainers should be able to change this value before merging (let me know if you prefer that I update it instead)
cc/ @gtaylor

@k8s-bot ok to test

/lgtm


Routine update for dom.generated.d.ts from TSJS

Includes fixes for:
#6408
#5433
#6418
#6295
#6106
#5323
#4550

:+1: Looks good unless you think there might be something we can add into HTMLPictureElement.

:+1:


Use a nullable-enabled context for System.Text.Json sample code

See #23290
This issue applies to all System.Text.Json articles, not just this how-to article.

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

ID: 588ae32f-3429-143f-824c-5ab2d046d24a
Version Independent ID: 002f9f2a-48d1-0671-a079-b99b9f6bab58
Content: How to serialize and deserialize JSON using C# - .NET
Content Source: docs/standard/serialization/system-text-json-how-to.md
Product: dotnet-fundamentals
GitHub Login: @tdykstra
Microsoft Alias: tdykstra

Closing, as #27310 includes STJ snippet projects.


More flexibility for setup

removed 'download' from plugin base_url to be more flexible. We have, for example, an artifactory repository as mirror for both jenkins.war files and plugins. The plugin files are in the path: http://servername/artifactory/jenkins-update/plugins. So no download part here.
Mind you that the fix is not backward compatible. I could do this if you want.
Current implementation breaks the Jenkins installation when a symbolic link is used for the plugins or jobs folder. In such case the symbolic link is removed and replaced by an actual folder, effectively removing all jobs from Jenkins \o/.
I added a parameter to follow links in config for setup to enable links for jobs and plugins folder.

Sorry, I'll set-up travis first om my fork. When all tests succeed I'll do a pull request again.


Unison for sync

Are you planing to use http://www.cis.upenn.edu/~bcpierce/unison/ for sync?

I don't plan to, no. I feel pretty fine with just using NFS


haskellPackages.sydtest: Unbreak by disabling test suite.

https://github.com/NixOS/nixpkgs/pull/236093 but for nixos-23.05.

Thx! Note, that you targeted the wrong branch, but I fixed that.


Withrawing x on tags bring you back to 'main' screen

If you withraw x when in a tag tab, aka if you have a farm tag you search farm withraw x amount of runes it will bring you back to one of the 'normal' tabs

This only seems to happen when withdrawing a "new" X amount rather than whatever the existing X amount currently is.


Not able to send locked tokens from account

I am not able to transfer locked tockens using j.clients.stellar.wallet.transfer. A transaction without locked_untill does work but with locked_untill param this seems not to be working

As far as I can seem something goes wrong on adding the trustline to the escrow account

Sending account needs atleast 10 XLM to make a locked token transfer


Pull for each minute

Hi
Running bbr pipelines in a PKS environment. Because of docker pull rate limits, i moved the pivnet-resource image to internal registry. The backups are running according to a schedule by using a time resource. When i look at my internal registry logs, i see that pivnet-resource:latest is pulled once in each minute of the day..
This is the pivnet resource:
resource_types:

name: pivnet
type: docker-image
source:
repository: $internal_registry:443/pks/pivnet-resource
tag: latest-final
resources for bbr repo and bbr-release:
resources:

name: bbr-pipeline-tasks-repo
type: git
source:
uri: http://$internal_git/bbr-pcf-pipeline-tasks-2.1.0.git
#private_key: ((git-private-key))
branch: test
#tag_filter: ((bbr-pipeline-tasks-repo-version))

name: bbr-release
type: pivnet
source:
api_token: ((pivnet-api-token))
product_slug: p-bosh-backup-and-restore

My time resource:

name: trigger-daily-between-1am-and-2am
type: time
source:
start: 1:00 AM
stop: 2:00 AM
location: Asia/Istanbul
Job for om exports:
jobs:
name: export-om-installation
serial: true
plan:

get: trigger-daily-between-1am-and-2am
trigger: true
in_parallel:

get: bbr-release
get: bbr-pipeline-tasks-repo

task: export-om-installation
file: bbr-pipeline-tasks-repo/tasks/export-om-installation/task.yml
params:
<<: *opsman_credentials
SKIP_SSL_VALIDATION: ((skip-ssl-validation))
OPSMAN_URL: ((opsman-url))
OPSMAN_USERNAME: ((opsman-username))
OPSMAN_PASSWORD: ((opsman-password))

put: om-backup-bucket
params:
file: om-installation/installation_*.zip

So wondering what triggers a pull from internal registry each minute..Any ideas?

Hello @gitmedur
According to the official Resource Types docs:

check_every: duration
Default 1m. The interval on which to check for new versions of the resource type. Acceptable interval options are defined by the time.ParseDuration function.
https://concourse-ci.org/resource-types.html#schema.resource_type.check_every

You could change it to run checks less frequently. Every 5h in the following example:
name: pivnet
type: docker-image
check_every: 5h
source:
    repository: $internal_registry:443/pks/pivnet-resource
    tag: latest-final

But I suggest that you take a look at these links:
They might help you solve the rate limit issue without so much manual work.

Implement mitigations for stricter Docker Hub rate limits
Concourse v6.7.0 Release Notes
Concourse v6.7.1 Release Notes

Closing this, but please feel free to reopen it if the suggested solution doesn't work for you.
Have a nice day!
Cryogenics Team⛄


Rename getNonce -> getSequence

User feedback:

It took me a couple extra minutes to figure out that Secp256k1Pen is a wallet I need, and that getNonce provides account number and sequence [...]

The wallet naming is covered already. getSequence would be a more intuitive name for Cosmos folks.

@fadeev implemented on master; thank you!


[SPARK-26339][SQL]Throws better exception when reading files that start with underscore

What changes were proposed in this pull request?
As the description in SPARK-26339, spark.read behavior is very confusing when reading files that start with underscore,  fix this by throwing exception which message is "Path does not exist".
How was this patch tested?
manual tests.
Both of codes below throws exception which message is "Path does not exist".
spark.read.csv("/home/forcia/work/spark/_test.csv")
spark.read.schema("test STRING, number INT").csv("/home/forcia/work/spark/_test.csv")

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

I think one thing we could consider is to leave a trace or debug log to show which files are ignored when the file is listed.

I think we should implement something along the lines of my comment above: https://github.com/apache/spark/pull/23288#pullrequestreview-185149527

Yup. I think so too.

I implemented a new behavior and added tests.
Please check it!
In checkAndGlobPathIfNecessary, calling InMemoryFileIndex.bulkListLeafFiles.
I am not familiar with cost of calling InMemoryFileIndex.bulkListLeafFiles, is this expensive?
If so, maybe we should implement a new method in object InMemoryFileIndex which returns information of filtered out files/directories and whether filtered files(regular files) exist or not.
And, please note that I considerd for not only InMemoryFileIndex.shouldFilterOut but also PathFilter.accept.

Yea, listing files itself is non-trivial in some cases (in particular when you use, for instance, S3) and extra listing up should be avoided. Looks the change is a bit invasive, and does another file listing.
Can we simply do the check when the existing file list happens, rather than doing another file listing?

Thank you for your reply.
Let me make sure what you mean,
I don't know for certain whether I should list filterOuted files/dirs recursively or  list files/dirs only directly under specified path.
For the example below, when spark.read.csv("foo") should we debug log _a.csv and _b.csv or _a.csv only?
I noticed below behavior for your information.
bulkListLeafFiles lists _a.csv and _b.csv(recursively listed)
spark.read.csv("foo").show lists only a.csv(read only files directly under specified path)
foo/
　├ a.csv
　├ _a.csv
　├ bar/
　│　├ b.csv
　│　├ _b.csv

I don't think any of these methods like CSV recurse into subdirectories; you can supply globs that specify files across subdirs. I don't think the path matters here, just the filenames that match. That's what needs to be checked after listing all matching files.

I get the point.
Looking at https://github.com/apache/spark/pull/23288#discussion_r241663518,
I misunderstood we should check recursively if specified dir.
I'll push later.

I pushed now.
Could you please check my commit?

Merged to master

@KeiichiHirobe, mind opening a PR again please? I also missed that the test didn't actually run. Looks the current change breaks another regression test. Can you take a look and fix it together?

Ack, darn, thank you. I was looking at a bunch of open PRs and probably looked at the wrong one to see if tests had run.

@HyukjinKwon @srowen
According to this, we can not reopen pull request, so I created a new pull request #23446 . Could you please review my commit at #23446?


Night CI 2023-07-09: Failed

action url: https://github.com/spidernet-io/spiderpool/actions/runs/5501745695

the bug same as https://github.com/spidernet-io/spiderpool/issues/2007


Accept whitelist for no-implicit-dependencies

I would like to specify whitelists for no-implicit-dependencies because of webpack externals options.
TypeScript code being linted
import * as i18n from 'i18n-js' // Module 'i18n-js' is not listed as dependency in package.json

// ...

webpack.config.js:
module.exports = {
  // ...

  externals: {
    'i18n-js': 'I18n',
  },

  // ...
}

I guess this rule should accept whitelists as options. However, since the current option only accepts the type of dependencies, this is breaking change.
Is such a feature accepted?

My use case is slightly different. Assume the following paths in the tsconfig.json:
"paths": {
    "@app/*": ["app/*"],
    "@config/*": ["app/_config/*"],
    "@environment/*": ["environments/*"],
    "@shared/*": ["app/_shared/*"],
    "@helpers/*": ["helpers/*"]
}

Although it won't be easy to parse the paths when linting I'd like to see the whitelist as a workaround which should be a lot easier to implement. no-submodule-imports has a similar whitelist that works for me. Here's hoping no-implicit-dependencies gets some love as well.

i also find myself disabling no-implicit-dependencies when writing test code which imports from dev dependencies (e.g. enzyme)

The whitelist should fix this issue, however for @NearAutomata it may still be a problem because the rule handles imports starting with @ differently: https://github.com/palantir/tslint/blob/master/src/rules/noImplicitDependenciesRule.ts#L115

@ajcrites Thanks for your great works! I'm happy that this option has been added :)

I think the fix for this has been merged (and should be released shortly). Going to close this for now - feel free to reopen it if need be.


Logout programmatically

Hi, thanks for a great plugin!
I'm using FBLogin button in my app as one of the ways for authorising users. And it works great until the user needs to logout the from the app. The problem is that I can not propagate an app logout event to FBLogin button and even if user has already logged out from my app he still sees "Log out" text on FBLogin button. Thus the user needs to press log out again: this time on FBLogin button.
Would rather do it programmatically so the logged out user would see a "Login with Facebook" text.

https://github.com/magus/react-native-facebook-login/blob/master/example/components/facebook/FBLoginMock.js
Check out the handleLogout method where you see I programmatically log out. Try that out and let me know if it solves your issue! You can also use this mock button I've built, it is visually identical to the actual FB login button.

Thanks! Worked great, just what I needed.

I tried this way on Android, but it doesn't seem to work.
I manually call FBLoginManager.logout() in our own logout process,  then when I enter to log in view again, the button still showing 'Logout from Facebook'.
I looked into custom FBLogin view in index.android.js, which calls the same method on its press handler. Then I exit and enter to log in view it shows the correct 'Log in with Facebook'.
Am I missing something? NOTE, this is for Android. Any suggestion will be appreciated!

Sorry, turned out that the callback that get passed in to FBLoginManager.logout()  got some problem, then the actual logout method doesn't get invoked properly. So the button state doesn't get changed either.
It works fine now. Thanks!

I called const FBLoginManager = require('NativeModules').FBLoginManager;
and
FBLoginManager.logout((error, data) => {...

and i get FBLoginManager.logout is not a function

https://github.com/magus/react-native-facebook-login/blob/master/index.android.js#L16

@alxvallejo This is working for me
import { LoginManager } from 'react-native-fbsdk'
LoginManager.logOut()

https://github.com/facebook/react-native-fbsdk/blob/master/js/FBLoginManager.js#L115

@tastycode LoginManager.logOut() does not work here on IOS app. Did you use it for Android?

This method is exist but seem does not work 😢
import { FBLoginManager } from 'react-native-facebook-login' FBLoginManager.logout(() => { console.log('Logout facebook ok!') })

@DavitVosk Yes.
It's not working in android too.

@DavitVosk LoginManager.logOut() works fine on iOS as well.

import { LoginManager} from "react-native-fbsdk";
LoginManager.logOut()

Works Good on Android!,
However it is not a promise, and one more thing to understand, this function does not logout user from your application, you have to handle that yourself.
This function will logout user from the Facebook login webview.

You have to use this function before launch logOut function
LoginManager.setLoginBehavior('browser');


POI Gadget Chain Path Traversal

Q
A

Bug?
??

New Feature?
no

Version
6.3.3

Actual Behavior
RIPS Code Analysis Tool detects potential security issue.
Please read the attached PDF. We want to know if this is a false positif or not.
Thanks

@moggybaer can you please contact me privately with potential security issues? Disclosing them publicly before having the chance to examine the details is not responsible, please don't do that.
I saved the PDF and will take a look at it.

I am sorry. Did not find the right contact. Apologize for that.

No problem, as far as I can tell, this is a false positive report.
Note to self: update the readme with security contact.


Prefix use case

With version 2.0.0 this package now has the capability to save the settings-files without the prefix defined by the env value SCOUT_PREFIX and used in Laravel with config('scout.prefix').
This change was, I think, initiated by my earlier issue #14 . It is however still not enough to support my use case. This mostly relates to how replicas and primaries are defined in the settings.
Example background:

Table is called "posts"
Scout prefix is "test_"
Two indices; primary "test_posts" and replica "test_posts_newest"

When the backup command is run, without prefix, files named "posts.json" and "posts_newest.json" will be created. Which is great, since their not tied to a specific environment. But the JSON in those files have properties that are environment specific, like "replicas": ["test_posts_newest"] and "primary": "test_posts".
I am embarrassed that this slipped my attention when checking my PR and making the testcases. I am creating this issue mostly to:

Check again my use case is valid
Discuss the direction of implementation of a PR (which I would be happy to make)

My suggestion would be:

On backup manipulate settings to remove the prefix from both the primary and replicas, similar to how it is removed from the filenames.
On push manipulate settings to add back the prefix. This is actually a bit tricky to do in a fail-proof manner, since the searchableAs() methodology of Scout offers a lot of freedom in naming an index. Perhaps the indexname as know to Algolia should be kept on the repository too, just like the usePrefix-setting.

I agree the replicas should follow this --prefix option, we totally missed it. I opened a PR #24, feel free to review and share your thought on it.

@julienbourdeau If you take a look at a branch I was working on to correct and expand the testsuite for this package, https://github.com/qrazi/laravel-scout-settings/tree/feat/more-tests, mostly since my initial tests ignored the actual name an index would have in a prefixed setup: https://github.com/qrazi/laravel-scout-settings/blob/feat/more-tests/tests/Algolia/Settings/Console/PushCommandTest.php#L33
Now, even if the replicas are including a prefix, the tests in this branch prove that the backup and push commands in 2.0.0 correctly remove the prefix from index names when it comes to creating the path to the settings files.
What I meant with opening this request is the actual content of those settings files, for example:
{
    "searchableAttributes": [
        "title"
    ],
    "replicas": [
        "testing_posts_newest",
        "testing_posts_oldest"
    ],
    "customRanking": null
}

is referring to the replicas testing_posts_newest and testing_posts_oldest. My assumption was that if these settings would committed, and used in a different environment, so with a different prefix (e.g. prod_), the settings that would be pushed to the production primary index (prod_posts) could then update that index to have the two testing replicas (since those are in the settings file, the content of which is send to the API).
Now I am kind of backtracking though, after reading the Algolia API docs and the algolia/algolia-searchclient-php. The Index::setSettings() method in its docblock does not mention that replicas can be set through this API call. On the other hand, the API docs, https://www.algolia.com/doc/rest-api/search/?language=php#get-index-settings, are referring to the Settings Parameter page, which does describe the replica property.
Attempt at scenario:
Given the environment is setup with the Scout prefix prod_
And the settings file is called posts.json
And it contains JSON content
And the JSON has an array replicas of one item
And the value of that item is testing_posts_newest
When the settings are pushed
Then the primary index prod_posts should not have a replica with the name testing_posts_newest
And the primary index prod_posts should have a replica with the name prod_posts_newest
I hope this scenario explains the issue I thought I missed with the 2.0.0 release.
Now, I haven't completely tested the actual behavior of the Algolia API when it comes to this, and I might have jumped the gun with my assumption that it would be needed to manipulate the actual content of the JSON files when it comes to the values of the replicas and primary.

Whats the state of this PR? Sorry - am having this exact issue with replicas at the moment.
I can put in a little time to review/test if that helps :)

Thank you for creating this issue.
Unfortunately this repository will not receive any more updates. We should use now Scout Extended.


Log consistency

Base your pull requests against the develop branch.

Yep.

Include these infos in the description:

Does the pull request solve a related issue?
If so, can you reference the issue like this Fixes #<issue_number>?
What does the pull request accomplish? Use a list if needed.
If it includes major visual changes please add screenshots.

Not issue related. PR is regarding the log consistency of the updatenotification module.
Additionally adding consistency comments and fixing the made changes in the changelog file.

Please run npm run lint:prettier before submitting so that
style issues are fixed.

Done.

Don't forget to add an entry about your changes to
the CHANGELOG.md file.

Ok.

u could create an issue, which is the driver of this work..

u could create an issue, which is the driver of this work..

yes ok, sorry !


Use virt-what by default for is_aws() is_ali() is_ahv() is_gcp()

On systems like s390, dmi is not exists, so use virt-what for detection instead of implement some code branches by ourselves.
Signed-off-by: Wei Shi<EMAIL_ADDRESS>

Thanks for the notice, updated and merged.


Function Components

We've made a great start in the conversion to Function Components. This is just an issue to keep track of what we class components (public and internal) we have left. I haven't checked if it's feasible to convert these components, if it's necessary or if it's worth it.
Core

[x] ScrollbarSize #15233
[x] FormControl #15208
[ ] Collapse #15248
[ ] SwipeableDrawer
[ ] Tooltip
[ ] Ripple
[ ] ButtonBase
[ ] Tabs
[ ] RootRef
[ ] Popover
[ ] InputBase
[ ] Textarea
[ ] SelectInput
[ ] Portal
[ ] Popper
[ ] Snackbar
[ ] Modal
[ ] Slide
[ ] WithWidth

Lab

[ ] Slider
[ ] SpeedDial
[ ] SpeedDialAction

Future work
The following items can be fully addressed once this effort is done:

[ ] Remove withForwardedRef
[ ] Move default props resolution from .defaultProps to function body
[ ] When forking refs prefer useForkRef over custom implementations

Once it's done, we should be able to remove the withTheme() and withForwardedRef() higher order components.

Once it's done, we should be able to remove the withTheme() and withForwardedRef() higher order components.

withTheme is part of our public API. It's not very convincing to remove withTheme but keep withStyles.

withTheme is part of our public API. It's not very convincing to remove withTheme but keep withStyles.

To be more specific, we can stop using these higher order components internally. They are still valuable for our users, we should keep the export of the withTheme module. How is this a breaking change?

How is this a breaking change?

import { withTheme } from '@material-ui/styles'
- withTheme(); // no error
+ withTheme(); // TypeError

Oh ok. It's not what I had in mind. He are moving from classes to hooks one pull request at the time, minimizing the changes. We have kept some usage of render props and higher order components. We will be able to replace them :)

Alright. So remove internal usage not removing the implementation.

@joshwooding If you don't have any priority for specific components it would be nice to prioritize Tooltip (improves RootRef -> useForkRef switch) and other components that use setRef.

@joshwooding If you don't have any priority for specific components it would be nice to prioritize Tooltip (improves RootRef -> useForkRef switch) and other components that use setRef.

Luckily I've already done the majority of the Tooltip conversion :)

Hi, @oliviertassinari I would like to try this for "Portal" component. Can I work on that if no one else has done it already? 😃

Unless @joshwooding has already done an effort in this direction, you are good to go :).

@gautam-relayr Feel free :)

Can I work on the InputBase & Snackbar component? @oliviertassinari @joshwooding

@adeelibr Good for me. For the Snackbar, I think that we should apply the same fix we applied to the Modal and Popper first.

For the Snackbar, I think that we should apply the same fix we applied to the Modal and Popper first.

Understood I'll have a look at the relevant PR's to understand what needs to be implemented for the Snackbar.

By the way, we still have a couple of demos using the class function, we need to migrate them too to the function component API :).

I must have missed them 😅 I'll have a look at it 👍

Is the makeStyles API stable or is it subject to change? We currently use withStyles on an internal app here at WalmartLabs but we are eager to start using more hooks APIs.

@austingardner I have looked into it in #15023. I haven't seen any issue. We haven't moved forward as it's not a priority for the project right now. I only wanted to evaluate the potential. It's all ✅. I hope we can automate the conversion post v4. Maybe with a codemod?
@eps1lon has found an issue in StrictMode. The style sheets might not be removed from the DOM. Given withStyles uses makeStyles internally, everybody is impacted. So it shouldn't be a concern when choosing between withStyles and makeStyles.
By the way, we have added WalmartLabs logo in https://next.material-ui.com/. Let us know if it's OK for your team :).

@austingardner To answer your question. No, we don't plan on changing the API of makeStyles.

@oliviertassinari Thanks for the response! We'll start using it then.

Can I work on the InputBase & Snackbar component? @oliviertassinari @joshwooding

I'd prefer if people pick up one component at a time, but feel free to help. :)

@joshwooding I agree, I am working on Snackbar component right now. Once that is done. Only then i'll move to the other component.

Hi, I would like to work on Modal if you guys haven't started yet @joshwooding @oliviertassinari .

@zhoufeng1989 Modal might be a quite difficult one, due to it needing to reference itself when using ModalManager.
e.g. https://github.com/mui-org/material-ui/blob/1bff0f7741fc2838f94d2143fb78ea89a49accbc/packages/material-ui/src/Modal/Modal.js#L85
Feel free to give it a go though :)

@joshwooding , thanks for your reminding. I find it is quite tricky after some investigations, and as a newbie here I would like to contribute to other components for this issue, then maybe I will do this one after I get more familiar with this project. Do you have any suggestions?  Thanks.

@zhoufeng1989 We’re trying to save lab for last but for a beginner, maybe SpeedDial or SpeedDialAction. InputBase in core should be okay. You could also look at swapping withTheme with useTheme :)

Thanks for the guide @joshwooding , will try to work on InputBase.

@zhoufeng1989 Looks like @adeelibr is working on InputBase first, sorry! I would have a look at SpeedDialAction

Hi, I was working on  #14101, I will make PR this weekend, sorry for delay

Overview so far
I have placed in package  material-ui-styles , (if it needs to be elsewhere let me know)

useWidth(theme) hook (analog to useTheme , but doesnt use a React.context)
WidthProvider (analog to ThemeProvider, passes the width down to child components via React.context )
useWidthContext (used in conjuction with WidthProvider)

A question how do i test window.matchMedia in a headless unit test?

the commit so far https://github.com/cloned-repos/material-ui/commit/58605dd8b0fb5afd2dc4b7932c7db5edd30e8bdb
demo of the components https://github.com/jacobbogers/benchmark-mobile

ok, I analyzed your source code and  use of npm module  css-mediaquery used for SSR and mocha tests
I know now how to create the unit tests,

Can I work on the Slider component?

I'm taking care of the Slider.

Some issues,
I am implementing this in a fork from master   or should i have used next  branch???
I put the hooks and contextProvider (for width) in the package material-ui-styles
running tests now, i get the following errors
Missing modules

expect.js
zen-observable
detect-browser

After installing all these modules with npm ,  (in the project root)
I run npm run test in directory  /packages/material-ui-styles
i get the error
C:\Users\jacob\repos\ui\material-ui\packages\material-ui-styles\node_modules\jss-vendor-prefixer\lib\index.test.js:34
var isIE9 = _detectBrowser2['default'].name === 'ie' && _detectBrowser2['default'].version === '9.0.0';
                                       ^

TypeError: Cannot read property 'name' of undefined

@jacobbogers next should be used.
You need to use yarn to install the dependencies.

Thanks, yes, I  remember I came accorss this when I installed material-ui for the first time, sorry to have forgotten.

Can someone check out my PR so far?
Havent updated the docs yet, just wanted some feedback first https://github.com/mui-org/material-ui/pull/15678

Hi, Can I work on the ButtonBase component?

@jeongsd ButtonBase is going to be one of the hardest components to migrate. I would start looking at SpeedDialAction instead

Hi, Can I work on SwipeableDrawer?

@adeelibr A previous effort started in https://github.com/mui-org/material-ui/pull/15469#issuecomment-492122568.

Is SpeedDial Action available to work on? 😄 @oliviertassinari

Thanks for the guide @joshwooding, can I work on SpeedDial?

Remove React.Component usage from the demos.

Is this task still up for grabs? I wouldn't mind taking it, if it's open 😃

Unless @joshwooding has something in store for it. It's up for grab :).

@bpas247 No plans here :) Feel free!

Hmm looking at the doc examples right now, it looks like most of the component examples have already migrated to function components.
Are there any that haven’t? Or am I looking in the wrong directory for what the task is relevant to?

This is one way to find them: https://github.com/mui-org/material-ui/search?l=JavaScript&p=1&q="React.Component".


0.0.1

@rultor release, tag is 0.0.1

@rultor release, tag is 0.0.1

@h1alexbel OK, I will release it now. Please check the progress here

@rultor release, tag is 0.0.1

@h1alexbel Oops, I failed. You can see the full log here (spent 5min)

@rultor release, tag is 0.0.1

@rultor release, tag is 0.0.1

@h1alexbel OK, I will release it now. Please check the progress here

@rultor release, tag is 0.0.1

@h1alexbel Oops, I failed. You can see the full log here (spent 5min)

@rultor release, tag is 0.0.1


Improve the health route by ensuring lmdb is not down

Fixes #3644
In this PR, I try to make a small read on the AuthController and IndexScheduler databases.
The idea is not to validate that everything works but just to avoid the bug we had last time when lmdb was stuck forever.
In order to get access to the AuthController without going through the extractor, I need to wrap it in the Data type from actix-web.
And to do that, I had to patch our extractor so it works with the Data type as well.

bors merge


Update 1_notmnist.ipynb

If download fails, force delete on file by default

Can one of the admins verify this patch?

I signed it!

Hi @tensorflow-jenkins . The problem is that wrong downloaded file persist on memory disk.

tested and it works

You have to sign the CLA (see the instructions above to make sure our bot knows about it) before we can look at this.  Closing for now but we'll reopen once the CLA is sorted out.