Removing last item from carousel results in an empty space (Android)

Is this a bug report, a feature request, or a question?
Bug report
Have you followed the required steps before opening a bug report?

[x] I have read the guidelines regarding bug report.
[x] I have reviewed the documentation in its entirety, including the dedicated documentations :books:.
[x] I have searched for existing issues and made sure that the problem hasn't already been reported.
[x] I am using the latest plugin version.
[x] I am following the issue template closely in order to produce a useful bug report.

Have you made sure that it wasn't a React Native bug?
Yes as far as possible.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Android
Is the bug reproducible in a production environment (not a debug one)?
Yes - it presents in a live version of our app
Environment
react-native-snap-carousel: 3.8.4
<EMAIL_ADDRESS>Android 9
Expected Behavior
When removing the last item from the data I expected the carousel to display the next available item as it does with start and middle list items and as it does on iOS.
Actual Behavior
An empty space is displayed
Reproducible Demo
https://snack.expo.io/@danjvee/react-native-snap-carousel-item-remove-bug---android
Steps to Reproduce

Preview the code on Android
Scroll right to the last item in the carousel.
Tap the item delete button
Observe the empty space

I have the same issue, a quick workaround I used was scrolling to the previous item after deleting.

Hi, I have the same problem, can you explain more your solution @DiegoMac95 please

Hello, we have the same issue here, could you provide us any detailed informations ?

@askemeline When I delete an element from the carousel, I also use snapToPrev method to scroll to the previous element, manually doing what the scroll does in iOS, that deletes the empty space.

Thanks for your response but I don't really understand when you use it without the onPress. I would like that android do it automatically when I delete the last element :/

@askemeline that's why you need to add the reference like this
<Carousel
  // LIKE THIS
  ref={(c) => { this._carousel = c; }}
/>

// now you can call it wherever you have access to the reference of the carousel
deleteAndSnap = () => {
     deleteElement();
     this._carousel.snapToPrev();
}

You don't actually need to use 'onPress', you can call the method anywhere in your component using that reference

Thanks for your answer but I have still the bug :/

My bad, is working, many thanks @DiegoMac95 :)

What can I do if I have enableSnap={false}?

What can I do if I have enableSnap={false}?

Any updates in this? Still facing this issue.


feat: Support exporting metrics in Prometheus format

Support exporting metrics in Prometheus format，set OTEL_METRICS_EXPORTER=prometheus.
config prometheus addr by OTEL_EXPORTER_PROMETHEUS_HOST and OTEL_EXPORTER_PROMETHEUS_PORT，see https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#prometheus-exporter
Issue：https://github.com/alibaba/opentelemetry-go-auto-instrumentation/issues/254

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Could you please add a demo for using prometheus exporter? Thanks!

Could you please add a demo for using prometheus exporter? Thanks!

add environment variables
OTEL_METRICS_EXPORTER=prometheus
OTEL_EXPORTER_PROMETHEUS_HOST=<IP_ADDRESS>
OTEL_EXPORTER_PROMETHEUS_PORT=9464
otel go build app
When the application starts, use curl localhost:9464/metrics to check the metrics data. If the response is successful and returns the expected metrics, it indicates that the application has started successfully and the metrics service is working properly.

Could you please add a demo for using prometheus exporter? Thanks!

add environment variables
OTEL_METRICS_EXPORTER=prometheus
OTEL_EXPORTER_PROMETHEUS_HOST=<IP_ADDRESS>
OTEL_EXPORTER_PROMETHEUS_PORT=9464
otel go build app
When the application starts, use curl localhost:9464/metrics to check the metrics data. If the response is successful and returns the expected metrics, it indicates that the application has started successfully and the metrics service is working properly.

Cool, Could you please put theses into https://github.com/alibaba/opentelemetry-go-auto-instrumentation/tree/main/example directory? And the CI seems failed, so you may need to fix the CI first.

Could you please add a demo for using prometheus exporter? Thanks!

add environment variables
OTEL_METRICS_EXPORTER=prometheus
OTEL_EXPORTER_PROMETHEUS_HOST=<IP_ADDRESS>
OTEL_EXPORTER_PROMETHEUS_PORT=9464
otel go build app
When the application starts, use curl localhost:9464/metrics to check the metrics data. If the response is successful and returns the expected metrics, it indicates that the application has started successfully and the metrics service is working properly.

Cool, Could you please put theses into https://github.com/alibaba/opentelemetry-go-auto-instrumentation/tree/main/example directory? And the CI seems failed, so you may need to fix the CI first.

ok.

I have added two subdirectories under example/metrics:

example/metrics/otlp-exporter
example/metrics/prometheus-exporter.

The original source code from example/metrics has been moved to example/metrics/otlp-exporter.
In example/metrics/prometheus-exporter, I have added a demo for Prometheus metrics. Which can retrieve metric data from localhost:9464/metrics. Additionally, the Prometheus server is accessible at localhost:9090 for viewing the metrics.
The PR is based on the example provided in the OpenTelemetry Go Contrib repository: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/examples/prometheus/main.go.

I have added two subdirectories under example/metrics:

example/metrics/otlp-exporter
example/metrics/prometheus-exporter.

The original source code from example/metrics has been moved to example/metrics/otlp-exporter. In example/metrics/prometheus-exporter, I have added a demo for Prometheus metrics. Which can retrieve metric data from localhost:9464/metrics. Additionally, the Prometheus server is accessible at localhost:9090 for viewing the metrics.
The PR is based on the example provided in the OpenTelemetry Go Contrib repository: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/examples/prometheus/main.go.

Excellent! I will check it later, thanks.

@123liuziming Please check it again, thanks!


Corpus View Text Overlap

In newest Chrome version (not firefox) there is a text overlap at the top of the corpus summary view -- see screenshot.

true for me as well (Chrome 69.0.3497.100 on OS X).

Another one in Enrichment View > encode pauses.

This is also true for me (google chrome from Windows)


Refactoring components on Figma with new props

Feature description
Description
To reduce complexities, variants, and the time to maintain the components we can now rely on Figma's props where possible. This will be a breaking change since some variants may be deleted and components using them will lose the link to the master component.
Components
Selection controls

[ ] Checkbox
[ ] Input Group
[ ] Radio Button
[ ] Toggles
[ ] Textfield
[ ] Slider
[ ] Select

Actions

[ ] Button
[ ] Icon Button
[ ] Toggle Button
[ ] Split Button
[ ] Buttons Group
[ ] Disclosure

Layouts

[ ] Separator
[ ] Card

Dialogs

[ ] Info State
[ ] Snackbar
[ ] Tooltip

Loading

[ ] Linear Progress
[ ] Circular Progress
[ ] Skeleton
[ ] Spinner

Navigation

[ ] Tab
[ ] Pagination
[ ] Menu

Other

[ ] Avatar
[ ] Overlay
[ ] List
[ ] Star Meter
[ ] Chip

Describe the solution you'd like
Using the new feature called Properties on Figma may be helpful to reduce complexities and clean the Figma file
Describe alternatives you've considered
No response
Additional context and information
Design Review — May 31, 2022
Code of Conduct

[X] I've searched across open and closed issues for similiar requests

First batch to work (defined by importance/impact and complexity):

Menu
Selection Controls
Input Group
Textfield

Second batch to work:

Select
Spinner
Skeleton
Linear progress
Button (proposed big one)

Next batch to work:

Icon Button
Toggle Button
Split Button
Button group
Disclosure
Snackbar
Tab ⚠

Next batch to work:

Pagination
Info State ⚠
Avatar
Star Meter
Chip
Overlay


Added bcrypt jwt and formated code

@Siddhant-Patil0203

@Naresh-chandanbatve
Also, make the issues for the things you are working on to make proper project management and tracking.


Incorrect flag icons - source for flag icons potentially out of date

It looks like the source for the flag icons may be out of date - the Tuvalu Islands flag icon seems to be of their previous flag, which was superceded by the current flag in 1997.
I did not check each flag icon to see if it was correct : ) but finding at least one seemingly incorrect flag seems to me to indicate that other flags may be incorrect as well.

The Wallis and Futuna flag also seems to be their unofficial flag rather than their official flag, which seems to be the flag of France. Choosing one or the other of those options to represent Wallis and Futuna could be taking a political stance (I don't know, but seems worth considering):

Wow, that's a great find! I will see if i can google the latest flags image. In the meantime, if you find one, let me know.
Also, you can use custom image for flags by using flagsImagePath prop.

@mukeshsoni Thanks for letting me know about flagsImagePath! : )

@mukeshsoni I don't understand where can I get the flags file...? I am new with this...

As listed in the Attributions section of the repo that is the inspiration for this repo, the flags are sourced from here.


[DO NOT MERGE] Auto PR to update dependencies of istio

This PR will be merged automatically once checks are successful.

@istio-testing: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-suite-no_rbac-auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-no_rbac-auth

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

@istio-testing: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-suite-no_rbac-auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-no_rbac-auth

prow/e2e-suite-rbac-auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-rbac-auth

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

@istio-testing: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-suite-no_rbac-auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-no_rbac-auth

prow/e2e-suite-rbac-auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-rbac-auth

prow/e2e-suite-no_rbac-no_auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-no_rbac-no_auth

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

@istio-testing: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-suite-no_rbac-auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-no_rbac-auth

prow/e2e-suite-rbac-auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-rbac-auth

prow/e2e-suite-no_rbac-no_auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-no_rbac-no_auth

prow/e2e-suite-rbac-no_auth.sh
2b3c20a7a393f06527beee111ee6018f0b1d9cb1
link
/test e2e-suite-rbac-no_auth

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

outdated


RHODS Branding

Change CSV and CRDs to have RHODS branding downstream for 1.32
https://redhat-internal.slack.com/archives/C05F5G4FD7Y/p1691416637995589?thread_ts=1691077767.286749&cid=C05F5G4FD7Y

Can you open this ticket in the red-hat-data-services fork of the CodeFlare Operator repository?

https://github.com/red-hat-data-services/codeflare-operator/issues/29


impl Contains for any Get

frame_support::traits::Contains<T> should be implemented for any type implementing frame_support::traits::Get<T>.
It would for example allow to use frame_system::EnsureSignedBy<Who, AccountId> with Who being a type declared in a  parameter_types! call, avoiding the need to declare a type and manually implement Contains for only one authorized AccountId.

It seems to not be possible since some pallets implements Contains for their Module, leading to a conflicting implementation with an hypothetical implementation of Get in a downstream crate.
For the initial intent of using EnsureSignedBy with a Get, maybe add a similar type that accepts a Get instead of a Contains ?
I would have also expected the collective pallet's Module implemented Contains, but I suppose the custom EnsureX types replaces this need.

It seems to not be possible since some pallets implements Contains for their Module, leading to a conflicting implementation with an hypothetical implementation of Get in a downstream crate.
For the initial intent of using EnsureSignedBy with a Get, maybe add a similar type that accepts a Get instead of a Contains ?
I would have also expected the collective pallet's Module implemented Contains, but I suppose the custom EnsureX types replaces this need.

You can just implement the `EnsureSignedBy' in your codebase. Not sure why you need to have some modifications for this on the Substrate side?

You can just implement the `EnsureSignedBy' in your codebase. Not sure why you need to have some modifications for this on the Substrate side?

Indeed, just sounds a good feature to be able to use an EnsureSignedBy with a Get when implementing a runtime with simple permissions.

Indeed, just sounds a good feature to be able to use an EnsureSignedBy with a Get when implementing a runtime with simple permissions.

Yeah while it is easy, it is also feature creep. This is such a small change that it just can be done on the level of a runtime

Yeah while it is easy, it is also feature creep. This is such a small change that it just can be done on the level of a runtime

Shan't we close if it is agreed upon to implement such things in upstream runtimes and not substrate?


Unify utility classes for operation on graphs

This repository has classes LineageTreeUtils and BranchGraphUtils. These classes should become part of mastodon-collection.
There is also https://github.com/maarzt/mastodon-blender-view/blob/master/mastodon-plugin/src/main/java/org/mastodon/blender/BranchGraphUtils.java

there's also https://github.com/mastodon-sc/mastodon-tomancak/blob/master/src/main/java/org/mastodon/mamut/tomancak/util/SpotsIterator.java that allows to apply operations on visited spots (usage example here)

Just as a reminder: (https://github.com/mastodon-sc/mastodon/pull/229)

Hello all,
I am working on this currently and need your input:
LineageTreeUtils.java
The getRoots() method could be replaced by RootFinder.getRoots( graph ), which is more generic and exists already in mastodon-graph. Mathias, would you be ok with this?
The doesBranchDivide() method could be moved to BranchGraphUtils
BranchGraphUtils.java
I think we could make it generic, i.e., working for Vertex and Edge class. I would move it to mastodon-graph in that case, not in mastodon-collection. Ok with this?
SpotsIterator.java
I would wait to move this class. I feel that it could simplified, or even rewritten with calls to more generic methods.
For instance the RootFinder.getRoots( graph ) and using the iterator algorithms in org.mastodon.graph.algorithm.traversal. Vlado, what was missing in org.mastodon.graph.algorithm.traversal that made you write the spot iterator?

Hi @tinevez

I think we could make it generic, i.e., working for Vertex and Edge class. I would move it to mastodon-graph in that case, not in mastodon-collection. Ok with this?

There is also this method, which could be added there (generic already): https://github.com/mastodon-sc/mastodon-deep-lineage/blob/master/src/main/java/org/mastodon/mamut/util/LineageTreeUtils.java

Vlado, what was missing in org.mastodon.graph.algorithm.traversal that made you write the spot iterator?
I don't know... I just didn't know that traversal exists at all... the iterations-traversing I needed was so simple that I didn't care to look around.. just wrapped the usual traversal pattern with Vlado's style convenience methods and the spot iterator class came to being

I don't mind which class is used for the traversing... happy to convert to the algorithm.traversal at some point in the future and throw the SpotsIterator away...
one thing, however, I would love to keep having around... the SpotsIterator was designed with the contract that, yes, it's traversing the graph but either the full graph (when no spots are selected in the Mastodon) or sub-graph (defined by the selected spots in the Mastodon)... so client code's consumer of spots can work either on full graph or just on a arbitrary run-time defined user selection/part of the graph

Hello @tinevez,

LineageTreeUtils.java
The getRoots() method could be replaced by RootFinder.getRoots( graph ), which is more generic and exists already in mastodon-graph. Mathias, would you be ok with this?

I see your point. The RootFinder is more generic, it works with any ReadOnlyGraph which is an advantage. But it's also unnecessary complex. It can be replace with a single method:
public static < V extends Vertex< ? > > RefSet< V > getRoots( final ReadOnlyGraph< V, ? > graph )
{
	RefSet< V > roots = RefCollections.createRefSet( graph.vertices() );

	for ( final V v : graph.vertices() )
		if ( v.incomingEdges().isEmpty() )
			roots.add( v );

	return roots;
}

I would suggest to have a GraphUtils class in mastodon-graph with a getRoots and a getLeafs method, and potentially more generally useful methods.

BranchGraphUtils.java
I think we could make it generic, i.e., working for Vertex and Edge class. I would move it to mastodon-graph in that case, not in mastodon-collection. Ok with this?

Yes. Here is a generic version of the BranchGraphUtils class.

SpotsIterator.java
I would wait to move this class. I feel that it could simplified

I agree. I would keep the class in mastodon-tomancak. It would be misplaced in mastodon or mastodon-graph

Oki! I see that you prepared everything already, for the move to mastodon-graph.
Let's do this?


CSS: default vs. custom

I tried to apply some custom CSS to my markdown preview. After a fashion I figured out the thing with creating a file of the same name, but with a .css extension to apply some overrides. This is great to know, but really kind of a pain because you have to create the CSS override file for every file you create. I wanted a more scalable fix, so I tried adding a user preference setting for the css, using the Sublime Preferences > Package Settings > Markdown Preview > Settings - User.
I added the following to that file:
{
    "css": "/path/to/file/md-preview.css"
}

This never seemed to work, meaning my CSS settings were not getting applied/embedded into the HTML of the previewed file. My assumption is that this is because the default setting ("css":"default") was still set as the default setting and my user preference was effectively ignored.
I did what I thought I was NOT supposed to do, and modifed the css setting in the default preferences file and I got what I was looking for.
So, is this a case where the user preference really has no effect and the default setting really does need to be changed? I suppose the right thing to do might be to comment out the css setting in the default preferences and add it to the user preference. What say you?
Genuinely curious (and wanting to do the right thing)
Earl

I'll will maybe take a look at this.  I was slowly putting together a pull with a couple of feature requests and fixes, I will try and look at this and see if there is some kind of misunderstanding or a bug with this feature.  I hopefully have some time coming available to look at MarkdownPreview again.

@elewis33, the feature is working fine for me.  All I did was point css to my own personal CSS, and it was used instead of the default.  I did not put it in the default, but it was in the user one.  I'd double check you had the user one named exactly like the default.  So as of right now, I don't see a bug.

Which build did you test with?
Earl
Sent from my iPhone (typos assumed)

On Nov 14, 2015, at 8:41 PM, Isaac Muse<EMAIL_ADDRESS>wrote:
@elewis33, the feature is working fine for me. All I did was point css to my own personal CSS, and it was used instead of the default. I did not put it in the default, but it was in the user one. I'd double check you had the user one named exactly like the default. So as of right now, I don't see a bug.
—
Reply to this email directly or view it on GitHub.

So, I am using the tip of the master branch, but with that said, only superficial changes have been made since the last formal release.  So I am essentially using the latest.
Did you do what was mentioned here from the forum:  http://www.sublimetext.com/forum/viewtopic.php?f=2&t=21618#p73789 ?  It looks like you were the one who posed the question.  Double check your console for errors as well.  Some times you can mess up the format of the settings file, and it will show you the errors in the console.  Double check your spelling of your custom CSS path.  Double check your CSS content is valid.  Inspect the HTML in your webbrowser to see if maybe it is getting included, but just malformed causing it to appear like it isn't getting included.
At this point, I see nothing wrong.  You would have to give me extensive details of all your steps for me to see what you are doing wrong.  Right now, I would just be guessing.  And since it is working just fine from what I can see, I can only assume it is user error.

As it has been 28 days without further response, I feel there it is no longer productive to leave this issue open as it isn't going to verified or resolved without further info.  It can be reopened if more info can be provided to help us confirm that an issue indeed exists.


Exception setting "TreatControlCAsInput": "The handle is invalid.

I am facing below error while trying to start the pode web server.
PS C:> Start-PodeServer {
Add-PodeEndpoint -Address localhost -Port 8080 -Protocol Http
Add-PodeRoute -Method Get -Path '/ping' -ScriptBlock {
    Write-PodeJsonResponse -Value @{ 'value' = 'pong' }
}

}
Exception setting "TreatControlCAsInput": "The handle is invalid.
"
At \vmware-host\Shared Folders\Documents\WindowsPowerShell\Modules\pode\Public\Core.ps1:157 char:13

        [Console]::TreatControlCAsInput = $true

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : ExceptionWhenSetting

========================================================================================
I have to manually download the pode from psgallery using details mentioned below as the system does not have access to internet. :)  .. Thanks in advance...
https://docs.microsoft.com/en-us/powershell/scripting/gallery/how-to/working-with-packages/manual-download?view=powershell-7#using-manual-download-to-acquire-a-package

Hey @sureshkrishnan83,
Are you perhaps running this in PSISE? If not, have you got the details on OS / PS version / IDE ?
You can also supply -DisableTermination to Start-PodeServer which will skip binding Ctrl+C :)

Yes i am running in pse
Os windows 2016 standard
Ps version 5.1
Ide ps ise
i am on mobile now . Will test -disabletermnination once back home . Thanks for your support 😀

I get the same exception when starting the script (PS 7.1.3) in an azure pipeline (not ISE, in VScode I have no problem).
As I'm running the script also manually for test I would like to keep it.
Did you see it in other environment as well?
Do you know a fix?

Hey @AlfiCode,
I'd recommend creating a new issue, and referencing this one 😄
That said, how are you running Pode in an Azure Pipeline (I've never actually tried, intrigued to know!). Start-PodeServer has a -DisableTermination switch, so if you have a way of telling if your server is running in the scope of an Azure Pipeline you can set this as -DisableTermination:$true, and locally have -DisableTermination:$false
Hope that helps!


Avoid using compactMap to work around compiler crash WIN-971

You should be able to use swift build --product FirebaseUI
This fails with a symlink issue with https://github.com/compnerd/swift-win32. How do I get it to work? @compnerd

PTAL


Uploading documentation as PDF

Uploading Data Lakehouse Documentation as pdf's.

I have fixed a few issues, please pull the changes from the main repo into your forked repo before submitting another pull request in order to avoid conflicts

I have fixed a few issues, please pull the changes from the main repo into your forked repo before submitting another pull request in order to avoid conflicts

Thanks! sorry about that, still learning. :)


The background turns black

After installing the plugin and configuring it for this theme, my background has changed to this.

this is my config:

  {
    "Tsuzat/NeoSolarized.nvim",
    event = "VeryLazy",

    config = function()
      require("NeoSolarized").setup({
        style = "dark",         -- "dark" or "light"
        -- transparent = true,     -- true/false; Enable this to disable setting the background color
        terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
        enable_italics = false,  -- Italics for different hightlight groups (eg. Statement, Condition, Comment, Include, etc.)
        styles = {
          -- Style to be applied to different syntax groups
          comments = { italic = false },
          keywords = { italic = false },
          functions = { bold = true },
          variables = {},
          string = { italic = false },
          underline = true, -- true/false; for global underline
          undercurl = true, -- true/false; for global undercurl
        },
        -- Add specific hightlight groups
        -- on_highlights = function(highlights, colors)
        --   -- highlights.Include.fg = colors.red -- Using `red` foreground for Includes
        -- end,
      })
      -- vim.cmd [[ colorscheme NeoSolarized ]]
    end

  },

As far as I know, it could of due to following reasons.

As NeoSolarized is not your default colorscheme it could be possible something is overwriting the background.
By default the background is transparent hence, it may be possible you are seeing this due to your terminal colorscheme setup.

Try setting up NeoSolarized as default colorscheme see just to debug it. Try changing the transparency to false and try changing the style. I hope you may find your solution.


[WIP] Reimplementing np.mean with overload and adding axis parameter

Partially addresses #1269 and #4245
Requires #4472 (first 3 commits come from that PR), #5060 and #5711, which fix intermediate problems.

closing to open a new branch to avoid merge conflicts with #4472

Status: The current mean is able to deal with np.datetime64 but an overload-based version fails because of #4540. It was agreed with @stuartarchibald that breaking support for np.datetime64 would be wrong, so this PR is on hold until that issue is resolved.

current status: #5060 is almost done and will fix #4540 which was blocking this PR.
However, another issue came up: timedelta could not be divided by a number, which is needed to calculate the mean. So I fixed that in #5711. However, that's not the end of it, there's an additional issue: after changing the implementation from lower_builtin to overload the new function is not registered in npydecl.registry. This is a problem for ir_utils.get_np_ufunc_typ, which looks the function there, leading to a failure in the tests test_parfor.test_var and test_parfor.test_std

It looks like we are so close to get this working. How can we register the new function in npydecl.registry? How to contribute to this issue?

I pushed a merge main commit to resolve conflict so we get new CI run. There are changes to get_np_ufunc_typ that may change things.


Fix CreateJob bug.

The bug here is that it's possible for us to wind up with a job in state FAILURE that still has an open commit which will permanently block the next job. Instead we make it so that the last thing we do in CreateJob is insert the job into the database so that if that succeeds we can be sure that the rest of the CreateJob has succeeded as well.

LGTM, since this does seem like a strict improvement in the system and we need it for GF. That said: could this algorithm leave you with dangling commits?
Here's my understanding of what was happening before:

persistClient.CreateJobInfo() writes a JobInfo to RethinkDB
a.kubeClient.Extensions().Jobs(a.namespace).Create(job) creates a commit and then fails
the deferred func() detects that Create(job) returned an error, and writes JobState_JOB_FAILURE to RethinkDB
The next job starts, sees the JobInfo in RethinkDB, checks that JobInfo's commit to see if it's finished, sees that the commit is not finished, and then waits indefinitely for it to finish

The difference is that now, instead of writing JobInfo to RethinkDB in (1), we wait until (2) has finished successfully. However, if (2) does not finish successfully, there will still be a dangling commit in the output repo.

Will the next output commit depend on the unfinished commit? Will that cause problems inspecting the repo?

Would it make sense in the medium/long run to detect if a job is in FAILURE and then delete its commit  if so? (if the job has an output commit, depending I guess on when it failed)

I think @msteffen makes a good point, but now that I think about it, the "dangling commit" problem seems to exist in the current implementation as well.  If CreateJob fails at any point after it creates the output commit, then I don't think we have a mechanism to clean up the dangling commit.  The next invocation of CreateJob will probably fail because it will be trying to create the same commit (e.g. master/3) that already exists.
Two observations:

In pfs v2, this won't be a problem because commits are not tied to branches anymore, i.e. the next invocation of CreateJob will just create a commit with a unique UUID, as opposed to something tied to a branch like master/3.
As for the solution, we do have DeleteCommit that allows us to delete the head of branches.  So maybe we can do something like, in CreateJob, if you find out that the output commit you are trying to create already exists, and that it's open, then you delete the commit and re-create it.  Does that sound like a safe thing to do?

Same concerns as Derek, but I also agree that it's fine as long as it's temporary


"Listen Along" or "View Song" button

Add buttons in Discord presence so that people can visit the song's link after clicking.
New-Branch has buttons support in it.
rpc.updatePresence(
  DiscordPresence(
    state: 'dart_rpc_rpc',
    details: 'github.com/alexmercerind',
    startTimeStamp: DateTime.now().millisecondsSinceEpoch,
    largeImageKey: 'large_image',
    largeImageText: 'This text describes the large image.',
    smallImageKey: 'small_image',
    smallImageText: 'This text describes the small image.',
    // 🎉🎉🎉
    button1Label: 'GitHub',
    button1Url: 'https://github.com/alexmercerind',
    button2Label: 'Google',
    button2Url: 'https://www.google.com',
  ),
);

Added (https://github.com/tangenx/lfdi/commit/1ea1b818e4df075ed1fe3b953355755464863bf0). Thanks!


Broken in node

You can't require this file in node anymore. You get an error:
ReferenceError: window is not defined
    at Object.<anonymous> (/Users/adamu/src/opentok-layout-js/opentok-layout.js:292:5)

This was originally reported here: https://github.com/aullman/opentok-layout-js/pull/23#issuecomment-217967434


How to get user's status

Hi!
I'm trying to iterate through a list, trying to find offline members in the said list.
I can't for the life of me think of the right way to fetch one user's current status! :)

As you can see from the picture, I should be able to bind "member" to a specific user. What I'm missing is getting the status of that specific user.
The server is big enough to be considered large, hence not showing offline members automatically.
Should I be doing something with Gateway.RequestGuildMembersAsync?

This may be a little tricky because the guild is considered large.
The way the Discord API works is, for every member in a guild, the API sends a "presence update" for that member. Discore takes these details and stores them on the member's DiscoreMemberCache object.
So to get the presence you need to know the guild ID to get the DiscoreMemberCache object, for example:
DiscoreGuildCache guildCache = cache.Guilds[guildId];
DiscoreMemberCache memberCache = guildCache.Members[userId];

DiscordUserPresence presence = memberCache.Presence;

However, the DiscoreMemberCache instance will only be available if that member is cached, and the DiscordUserPresence instance will be null until the member changes their state to warrant an update from the API, or they were available upon the shard starting.
In Discore 2.x, this is a bit of an issue since if the member isn't cached and a presence update is received,  the data will be dropped. The best option for right now would be to call RequestGuildMembersAsync right after the guild is available to ensure all the members are in the cache. Any members that join after that call will be automatically cached. If this is done, then every member that received presence data from the API will have their DiscordUserPresence data available, and if this is null then it is safe to assume that they are offline since the guild is "large".
Sorry this is a bit of a pain currently, I can promise you now that this will be simpler in 3.0.

No need to be sorry, on the contrary I have had plenty of fun using Discore :)!
I will use this approach, but I have a failsafe as well by using a timer (users have a certain amount of time to react to announce, after which they will get dropped from a list)
Thanks for the detailed answer!

Sounds good, feel free to reopen if you run into any problems. :)


import auth - after choosing the same web & native client to import, unable to reselect different clients

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?
yarn
If applicable, what version of Node.js are you using?
v16.5.0
Amplify CLI Version
v5.3.0
What operating system are you using?
Mac
Amplify Categories
auth
Amplify Commands
Not applicable
Describe the bug
When running amplify import auth and choosing the same client to import for Web and Native, the CLI prompts it is recommended to use different app clients... do you want to change this?. If we choose yes to change our selections it the CLI will continuously prompt us for Web and Native client choices until we select the same clients for both again.
Expected behavior
We are allowed to select different app clients after choosing to change selections
Reproduction steps

amplify import auth
Choose either Cognito User Pool only or with Identity Pool
Select an existing resource
Select the same app client for both Web & Native
Select "y" electing to change app client choices
Attempt to select different app clients for both Web & Native
Observe continuous prompts

> amplify import auth
Using service: Cognito, provided by: awscloudformation
✔ What type of auth resource do you want to import? · Cognito User Pool only
✔ Select the User Pool you want to import: · us-east-1_BCimL25rm
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClientWeb
? It is recommended to use different app clients for web and native application, You have chosen the same app client for both. Do you want to change this? Yes
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClientWeb
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
The User Pool has multiple Web app clients configured.
✔ Select a Web client to import: · myAppClient
The User Pool has multiple Native app clients configured.
✔ Select a Native client to import: · myAppClient
? It is recommended to use different app clients for web and native application, You have chosen the same app client for both. Do you want to change this? No

✅ Cognito User Pool 'socialsignin392b6b4f_userpool_392b6b4f-staging' was successfully imported.

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line

Additional information
This occurred regardless of auth type chosen and resource configuration

I can confirm that this is a bug.


chore: Update android config

- What I did
Build tools (tools/*):

Updated permissions of the build scripts
Shellcheck fixes

Android build config base template (at_app_create/**):

Updated gradle version, kotlin version, default values for compileSdkVersion, minSdkVersion, and targetSdkVersion.

Template config (templates/*/*/pubspec.yaml):

Removed android build configuration overrides
Added dependency overrides for biometric_storage: ^4.1.3

- How I did it
Local changes.
- How to verify it
Pull and run the build pipeline, test locally.
- Description for the changelog
chore: Update android config

@XavierChanth this PR(https://github.com/atsign-foundation/at_client_sdk/pull/717) upgrades biometric_storage version in at_client_mobile.

Pending: https://github.com/atsign-foundation/at_client_sdk/pull/717

Linking to main issue card: https://github.com/atsign-foundation/apps/issues/720


Unable to join channel. Member data for presence channel missing

I do the following

redis-cli -> FLUSHALL
laravel-echo-server start

I get the following error

L A R A V E L  E C H O  S E R V E R

version 1.5.2

⚠ Starting server in DEV mode...

✔  Running at localhost on port 6001
✔  Channels are ready.
✔  Listening for http events...
✔  Listening for redis events...

Server ready!

[6:31:11 PM] - Sending auth request to: http://localhost/api/broadcasting/auth

[6:31:11 PM] - Sending auth request to: http://localhost/api/broadcasting/auth

[6:31:12 PM] - RZi-54_9fAq_MlctAAAA authenticated for: private-tasks
[6:31:12 PM] - RZi-54_9fAq_MlctAAAA joined channel: private-tasks
[6:31:12 PM] - RZi-54_9fAq_MlctAAAA authenticated for: presence-tasks
Unable to join channel. Member data for presence channel missing
[6:31:12 PM] - RZi-54_9fAq_MlctAAAA joined channel: presence-tasks
[6:31:35 PM] - RZi-54_9fAq_MlctAAAA left channel: private-tasks (transport close)
[6:31:35 PM] - RZi-54_9fAq_MlctAAAA left channel: presence-tasks (transport close)
(node:363) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object
    at /usr/lib/node_modules/laravel-echo-server/dist/channels/presence-channel.js:75:21
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:363) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:363) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[6:31:36 PM] - Sending auth request to: http://localhost/api/broadcasting/auth

[6:31:36 PM] - Sending auth request to: http://localhost/api/broadcasting/auth

[6:31:36 PM] - 72HFMad1Spo6lsncAAAB authenticated for: presence-tasks
Unable to join channel. Member data for presence channel missing
[6:31:36 PM] - 72HFMad1Spo6lsncAAAB joined channel: presence-tasks
[6:31:36 PM] - 72HFMad1Spo6lsncAAAB authenticated for: private-tasks
[6:31:36 PM] - 72HFMad1Spo6lsncAAAB joined channel: private-tasks

laravel-echo-server.json

{
	"authHost": "http://localhost",
	"authEndpoint": "/api/broadcasting/auth",
	"clients": [
		{
			"appId": "ddca64776e88728d",
			"key": "e07766a0a61037605c3d1d89ff963e2a"
		}
	],
	"database": "redis",
	"databaseConfig": {
        "redis": {
            "port": "6379",
            "host": "localhost"
        }
	},
	"devMode": true,
	"host": null,
	"port": "6001",
	"protocol": "http",
	"socketio": {},
	"sslCertPath": "",
	"sslKeyPath": "",
	"sslCertChainPath": "",
	"sslPassphrase": "",
	"subscribers": {
		"http": true,
		"redis": true
	},
	"apiOriginAllow": {
		"allowCors": false,
		"allowOrigin": "http://localhost:80",
		"allowMethods": "GET, POST",
		"allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
	}
}

channel.php

Broadcast::channel('tasks', function () {
    $jobHelper = new \App\Helpers\TaskHelper();

    $statuses = $jobHelper->getStatuses();

    return filled($statuses) ? $statuses : true;
});

BroadcastServiceProvider

    public function boot()
    {
        Broadcast::routes(["prefix" => "api", "middleware" => "auth:api"]);

        require base_path('routes/channels.php');
    }

Init echo

InitEcho({ commit }, accessToken) {
      if (typeof io !== 'undefined') {
        const E = new Echo({
          broadcaster: 'socket.io',
          host: process.env.BASE_API + ':6001',
          auth: {
            headers: {
              authorization: 'Bearer ' + accessToken
            }
          }
        })

        commit('SET_ECHO', E)
      }
    }

Event listen and join

mounted() {
    this.echo
      .join('tasks')
      .here(jobs => {
        if (jobs instanceof Array) {
          this.setJobs(jobs[0])
        }
      })

    this.echo
      .private('tasks')
      .listen('.task.event', (e) => {
        this.updateJobs(e)
        this.showMessage(e)
      })
  },

What am I doing wrong?
I watched the previous issue, I did not find the answer

did you solve it?

@xulei2016 Yes.
My channels.php
`
Broadcast::channel('tasks', function () {
$jobHelper = new \App\Helpers\TaskHelper();
$statuses = $jobHelper->getStatuses();

return filled($statuses) ? $statuses : ['empty'];

});
`


Add components

In this milestone of the project, I have

initialized the project with react components
used react router for navigation.
made sure there are no linter errors.

Hi @Abe1able can you go on slack ?

Hi @Abe1able I left a message on slack


SimulatedAnnealing Discrete Variables

Pull Request Description
What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)
Closes #2305
What are the significant changes in functionality due to this change request?
Addition of the support for simulated annealing of discrete variables.
In order to minimize the modifications, the discrete variables are treated using cdf sampling and inverseCDF transformation.

For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.

[ ] 1. Review all computer code.
[ ] 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
[ ] 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
[ ] 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
[ ] 5. If significant functionality is added, there must  be tests added to check this. Tests should cover all possible options.  Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in  XML block, the node <internalParallel> to True.
[ ] 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change.  The requirements and the requirements test shall be in sync.
[ ] 7. The merge request must reference an issue.  If the issue is closed, the issue close checklist shall be done.
[ ] 8. If an analytic test is changed/added is the the analytic documentation updated/added?
[ ] 9. If any test used as a basis for documentation examples (currently found in raven/tests/framework/user_guide and raven/docs/workshop) have been changed, the associated documentation must be reviewed and assured the text matches the example.

Job Precheck on a794170 : invalidated by @joshua-cogliati-inl
failed because of hpcgitlab being down

@wangcj05 all tests fail now for the issue seen in #2317 with  cvxpy

All jobs on 28624b8 : invalidated by @wangcj05

Job Mingw Test on de67311 : invalidated by @alfoa
fetch failure

Job Test qsubs sawtooth on de67311 : invalidated by @alfoa

Job Mingw Test on 44192fa : invalidated by @wangcj05


Simulated Samples at start and finish

I was unclear about what exactly I wanted earlier, I apologize. Please modify the already quite nice setup in the following way:

I for these two simulation, please do not simulate the observable covariates (X,Z) but instead read them in from the observed sample. This ensures that in the research case, somebody coming with an externally prepared dataset, the model fit statistics are still informative. This will probably require some thinking on how to still ensure that test_integration_test_3 is still working as you need to align the unobservables in this case.

If this is unclear, please add this issue to our meeting agenda tomorrow.

I adjusted the estimation process accordingly. #71 should be fixed as well.


Hosts link mapper

This depends on https://github.com/google/nomulus/pull/52. Once it is fully merged I'll rebase and push again.

This is now ready to sync to HEAD.  Let me know once that's done and we can start the review.

@CydeWeys up to date.

All comments addressed or responded to.

Going through internal review now.

This has been committed internally and will be included in our next sync to GitHub.

Merged as da1f83a7b46956cf41dce255ed5298f1c34a5e2f.


[flutter_tools] Tool should enforce that Flutter project directories only built from one host platform

We should check and toolexit if a user tries to build a flutter project from multiple different operating systems (for example, Windows host and WSL host).
This is not supported and violates many assumptions in the tool.
For users who want to build the same project from multiple operating systems, they should have multiple checkouts of their application, and each should only be built from a single operating system.

This is not supported and violates many assumptions in the tool.

@christopherfujino, we've discussed this recently, but—for the sake of public documentation—do you have any examples of such assumptions on-hand?

This is not supported and violates many assumptions in the tool.

@christopherfujino, we've discussed this recently, but—for the sake of public documentation—do you have any examples of such assumptions on-hand?

The first thing that will break is that, when the tool tries to use a cache artifact, it checks a stamp file to verify if the appropriate file was already downloaded. This file contains (I think) just the engine revision. Therefore, it assumes, if we have already downloaded an android arm64 gen_snapshot binary at engine commit deadbeef, then we can execute that program. However, we're not checking what host operating system that binary was built for.


New release?

Any chance you could create a new release? The session file adapter and the couch-pwd dependency I find really useful updates if there aren't any major known issues currently with the master branch.

Same question here... if not, has any alternative recomendation?

Hi everyone... Sorry for the lack of activity on the project. I open source stuff I create for my own needs, but don't necessarily have the time to maintain everything.
I'm looking for help to maintain this project since it has become very popular.
Meanwhile, please help me triage the issues and existing PRs. Please list the most important bug fixes below and I will push a new release with updated deps.
Future releases will only support Node Active LTS 6+.

6+ goes into maintenance this April
https://github.com/nodejs/Release#release-schedule
will this affect updating a few of the dependencies?
like with nodemailer,  ( All versions below 4.0.1 are deprecated )?

Node 4 maintenance is toast as of April, so I see no need to support. Too many dependencies now require 6+. Especially those written in ES6.
I'm willing to do a bugfix release and update all the deps, but I need somebody to triage the issues and PRs for me here and tell me exactly which updates are most important.

what's a triage?
the package for couch-pwd is out-dated on npm,
for what I can see in superlogin/lib/util.js
hashPassword and verifyPassword are the only functions that use couch-pwd, with the later optionally setting the number of iterations for the hash to use. Should be easy enough to replace

I personally think that the current master branch could be pushed as a release to allow some issues already addressed to be used without relying on a master branch that can change.
It'd be great to avoid couch-pwd as @MarcMcIntosh has suggested. Perhaps for now that's all that'd be needed to push a bug fix release version.
I respect your time and thank you so much for creating this package. Perhaps implementing rules about issues requiring users to add a replication of their issue would be the first step to ensure that the burden is taken off of you and more on the user demonstrating the bug. With that issues can be tagged and gone through one by one? Perhaps tags such as 'awaiting reproduction', 'confirmed bug', 'feature request', 'documentation' and 'help wanted'

I've had a look through issues and PRs - There are quite a few simple issues to clear off the list first. Perhaps in the PRs we can simply merge or reject the changes first:

https://github.com/colinskow/superlogin/pull/191 couch-pwd (is this how you want to address the couch-pwd deprecated library?)
https://github.com/colinskow/superlogin/pull/180 choice on whether you want random usernames generated - might be better to use a uuid library

I'll continue going through these when I get some more time if it helps.

Are couch-pwd and pouchdb-auth similar...?

Fork with updated deps and DDoc models: https://github.com/PhilLaFayette/superlogin
Let me know if you want me to do a pull-request.

It would really be nice to get this working again in current versions of Node.
I can't see any alternative to pouchdb + superlogin if you are building something that needs strong capability to update while offline and sync with a database + are using social logins.
@colinskow Are you still around to accept any PRs or make a release?
@PhilLaFayette @silverbackdan Are you interested in maintaining the library?

I have created a repository https://github.com/hrustad1017/authServer that has a program that functions similarly to superlogin. Mine does not have all of the same features but it works well for me and I am open to adding more functionality and I would accept help if anybody is interested

I've made a simple PR (#209) to remove the couch-pwd dependency.
The PR passes all tests, but if someone else (@silverbackdan ? @dantman ?) can have a look at it and make any comments or improvements, it'd be helpful. That way, when @colinskow gets to it, he can hit "Merge PR" with confidence.
Colin, #209 fixes the highest priority issue with superlogin IMHO. It's the only thing stopping superlogin working right out of the box for most simple use-cases.


Feature/katex

What should be looked at

Right now we are pre-loading the node modules with babel because of some ES2015 stuff going on in one of our dependencies: katex. This is a no go for production because it adds a lot of overhead which should not be necessary.
Icon for the insert LaTeX button in our rich text editor.


java.lang.ClassCastException: java.lang.String cannot be cast to com.orientechnologies.orient.core.db.record.OIdentifiable

OrientDB Version: v2.2.31
Java Version: version8 update45 (Build 1.8.0_45-b15)
OS: WIN10 64bit
Expected behavior
after executing the query in the bottom the graph view should continue beeing able to show "select * from Konto"
Actual behavior
after executing the query in the bottom the graph view in orientdb studio throws the error in the title when quering "select * from Konto"
Steps to reproduce
SCHEMA---------------------
vertex Konto
every: STRING, mandatory, not null
incby:DOUBLE, mandatory, not null
kontostand:DOUBLE, mandatory, not null
lastUpdated:DOUBLE, mandatory, not null
name: STRING, mandatory, not null
showDetails:BOOLEAN, mandatory, not null
vertexyEdge:STRING, mandatory, not null
edge listSuccesor
vertexEdge:STRING, mandatory, not null
---query------------------------
db.query(
"UPDATE #26:1 SET  kontostand =  100, name =  'Freuden des Lebens', every =  'month', incby =  100, showDetails =  false, vertexEdge =  'vertex', in_listSuccessor =  ['#61:0'], out_listSuccessor =  ['#62:0'], lastUpdated =  '2018-02-02T05:31:24.584Z'"
)

Duplicate, please see https://github.com/orientechnologies/orientdb-studio/issues/505

is there a way to delete this dublicate ?

Hi @AlexPGithub
No problem, you can leave it as it is
Thanks
Luigi


[Bug]: ts_project macro should produce a ts_project rule

What happened?
If you bazel query for targets, you see ts_project_rule sticking out.
That's confusing for users.
I hit this in the eslint aspect implementation where I want to key on rule kind.
Version
head
How to reproduce
No response
Any other information?
No response

Will be in 2.0


Windows natural scroll setting not applied correctly to horizontal scrolling

See https://github.com/ppy/osu/discussions/18175

I... don't think this is a "natural scroll" related issue. We actually look to be handling the direction back-to-front, even on macOS. I believe we somewhat arbitrarily implemented it earlier on without too much consideration, and got it wrong.
We're likely going to need to fix this with a breaking change.

Tested on a windows precision touchpad, and with a mouse that has a tilting scrollwheel.
Changing natural scrolling on the touchpad properly inverts framework handling, so it's not related to that.
In both cases vertical scrolling works as expected, while horizontal scrolling is inverted (goes in the wrong direction).
"Forced" horizontal scrolling (when the ScrollContainer only scrolls horizontally, so vertical scrolls are translated to horizontal) works as expected.
Windows doesn't have default handling for 'hold shift for horizontal scroll' -- maybe something we want to implement locally?

For reference: https://github.com/ocornut/imgui/issues/4019#issuecomment-852093067

TestCursor used in ManualInputManager inverts the vertical axis only. And this makes it move according to expectation: scrolling up moves it up, tilting left moves it left -- is this how it behaves on macOS?
https://github.com/ppy/osu-framework/blob/c945622b6e8c268e6729446a499a3597b8293bcd/osu.Framework/Testing/Input/TestCursorContainer.cs#L149

on macOS, only the vertical axis is inverted on "natural scroll", yes. And o!f works pretty well with it as-is, unlike Windows (seemingly).

Actually to clarify, I haven't tested a tilting scroll wheel, and answering this will have to depend on whether enabling/disabling "natural scroll" on macOS affects the horizontal direction as well.
I had been thinking about this with trackpad in mind (where dragging towards any direction moves to the opposite side of it).

I had been thinking about this in my previous comment with trackpad in mind (where dragging towards any direction moves to the opposite side of it).

Same happens on windows, the red dot moves opposite the scroll direction.
But the red dot is wrong, it moving up scrolls the contents down (expected), but it moving left scrolls the contents left (wrong). And since the red dot is wrong, that means that windows/SDL is also wrong and reports horizontal scrolling inverted.
I think the only thing we need to do is invert the horizontal axis at InputHandler level, since we treat that axis opposite of the SDL_MouseWheelEvent spec. If linux conforms to the spec, then this fix should work there as well.
(Plus fix the red dot.)
https://user-images.githubusercontent.com/16479013/168634209-099d17c1-c6cb-4cfa-bda1-69c6e73c817b.mp4

I did some tests.

macOS (10.14.6):

natural scrolling on: natural scrolling works in both directions on the mod overlay as expected
natural scrolling off: scrolling works as expected still, both axes are inverted as they should logically

Windows (10 1703):

natural scrolling on: natural scrolling works vertically, but horizontally it's inverted
natural scorlling off: vertical scrolling scrolls as expected, but now horizontal scroll acts as natural scroll (so it's inverted)

Linux (Solus 4.3, KDE Plasma 5.23, X11):

natural scrolling on: same as on Windows
natural scrolling off: same as on Windows

The weird thing is is that in osu.Framework.Tests, the red dot scrolls properly on Linux in both directions, so I don't know which one to believe.

on macOS, only the vertical axis is inverted on "natural scroll", yes. And o!f works pretty well with it as-is, unlike Windows (seemingly).

For the record, this is incorrect. At an OS level it inverts both axes. At an osu!framework level, this is correctly received:
https://user-images.githubusercontent.com/191335/168727921-7e02f3b7-3250-4ebf-8de6-5f11fd8cfb29.mp4
On master, right scroll and down scroll are negative when natural, positive when non-natural.
https://user-images.githubusercontent.com/191335/168728107-a5d6c2c8-9708-4f8e-89d2-eb23279bd456.mp4
In safari, both axes are inverted (again, scrolling right and down physically in both cases).

Indeed, I wasn't aware you could change directions in trackpad, and only realised horizontal scrolling gets flipped when disabling natural scroll in "Mouse" (which somehow affected trackpad) while I was looking at #5179. Disregard my comment, natural scroll inverts both vertical and horizontal direction.


Customize superset, How to add a new number format(Indian number format) option in the charts.

Hey Team,
I am new to superset customization so need some guidance, I want to change the number format option available inside the chart, I want to add or modify existing format to indian number format. I will write the logic in javascript to change the original number to indian number format, but I don't know where to write my code for this.
Could you please guide me, how can I get it done. I found that superset is using D3 format and a superset-ui-number-format package is there for it. but next don't know how to modify it. Let me know if you need more information on this problem.

You should be able to customize the locale of the number format by overriding the config in the NumberFormatterRegistry: https://github.com/apache-superset/superset-ui/blob/cdd6990092248b184c9c625d9caa66c3b79df8c3/packages/superset-ui-core/src/number-format/NumberFormatterRegistry.ts#L55
There's more details on customizing the number formatter here: https://github.com/apache-superset/superset-ui/blob/cdd6990092248b184c9c625d9caa66c3b79df8c3/packages/superset-ui-core/src/number-format/README.md#L11
Closing since this should allow you to do what you need

@piyush-singhal Have you successfully implemented the new number format? If so, can you please raise a pull request to master?


Use default formatting

I propose that we use the default rustfmt formatting to make working with the code easier for everybody.
We can also fix the linter errors and optimize the code later.

Please, let me know if we are going to do that.

I think formatting s not that important. I'm focussing on optimizations and code generation now

Common formatting is important if there are many people working with a project.
Most people are used to the de-facto Rust rustfmt standard.
Please, let me know if you are ok with using the default format or close the PR.

Can you please resolve conflicts?I'm going to merge that PR

@playXE done! Please, merge.


backend partition renaming in comments and locally scoped variable names

This change just updates partition to decision point in backend .ts files, focusing on the easy ones, comments and locally scoped variables that don't affect other things.

@VivekFitkariwala @ppratikcr7 please take a look and make sure this won't cause issues


Why did you stop maintaining it?

@subnut , I am bored doing this project for almost 6 months now.


Leverage ability to disable deletes in Accumulo 2.0

Accumulo's delete processing can cause Fluo to have O(N^2) read and commit processing when a key/value has lots of versions.  To avoid this, Fluo uses reflection to remove the Accumulo delete iterator.  Performance improvements made in Accumulo 2.0 by apache/accumulo#244 break Fluo's reflection code.  The reflection code does not need to be fixed though, instead deletes can be turned off in Accumulo 2.0 using the option added in apache/accumulo#598.

I have a branch that does this :
https://github.com/keith-turner/fluo/tree/disable-deletes
However I can not make a PR because this branch was created from my Accumulo 2.0 branch which is still a work in progress.
https://github.com/keith-turner/fluo/commits/accumulo-2.0
I plan to get all of this merged in after Accumulo 2.0 is released.

Done in #1053


NameError: name 'N' is not defined when setting thresholds for all nodes

from thresholdmodel import ThreshModel

N = 1000
k = 10
initially_activated = np.arange(100)
G = nx.fast_gnp_random_graph(N, k/(N-1.0))

thresholds = np.random.rand(G.number_of_nodes())

Thresh = ThreshModel(G, initially_activated, thresholds)
t, cascade_size = Thresh.simulate()

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-43-929e4fe7e852> in <module>
      9
     10
---> 11 Thresh = ThreshModel(G, initially_activated, thresholds)
     12 t, cascade_size = Thresh.simulate()

/opt/anaconda3/lib/python3.7/site-packages/thresholdmodel/model.py in __init__(self, G, initially_activated, thresholds, weight)
    127
    128         self.set_initially_activated(initially_activated)
--> 129         self.set_thresholds(thresholds)
    130
    131     def set_thresholds(self,thresholds):

/opt/anaconda3/lib/python3.7/site-packages/thresholdmodel/model.py in set_thresholds(self, thresholds)
    154
    155         else:
--> 156             assert(len(thresholds) == N)
    157             assert(np.all(thresholds <= 1) and np.all(thresholds>=0))
    158

NameError: name 'N' is not defined

should be fixed in v0.0.3

Thanks. The problem has been fixed in v0.0.3.


Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63235

Implement an alternative Charset caching strategy that does not load all
Charsets at Tomcat start. This reduces start time by ~30ms and does not,
based on the performance tests included in this commit, have a negative
impact on runtime look-ups.
It does require that the names of all supported Charsets are known to
Tomcat at compile time. The code has been tested with a range of JVMs
and a unit test is provided for testing new JVMs.

Ok I guess. Wasn't the plan going to include hardcoding UTF-8 ?
The previous code still looks better to me (HashMap vs concurrent HashMap) but as you seem to care about resolving this now this is ok with me.

Thanks for taking a look at the code.
I was concerned about the HashMap vs ConcurrentHashMap as well but in the tests included with the patch the difference was very small. Averaged over several runs it looked like ConcurrentHashMap was slower but by less than 1ns per lookup on average. That seemed small enough not to worry about to me.
In terms of special handling of UTF-8 my plan was only to pre-load the cache for UTF-8 and ISO-8859-1. I thought about adding other charsets but given ISO-8859-1 is the spec default and nearly everyone uses UTF-8 those seemed like the best place to start. Anything else I could think of just added more complexity and reduced performance.
I'm currently leaning towards applying this after the next 9.0.x tag so there is still plenty of time for folks to review and suggest improvements.

In addition to the improved startup time, this change has an even bigger positive impact on Tomcat's memory footprint. With the latest 9.0 snapshot, I have an app using embedded Tomcat that will start with -Xmx13M but not with -Xmx12M. The addition of the change proposed here, allows the same app to start with -Xmx9M. That ~4MB saving in heap footprint is very welcome indeed.


An error occurred and all environment variables were deleted

Describe the bug
I ran the following command:
npx vercel-env-push .env.local development

It showed me a preview with:

Preparing environment variables push from '.env.local' to development.
The following environment variables will be pushed:
...

It failed with:
Do you want to push these environment variables? (Y/n) Y
✖ Pushing environment variables
Something went wrong: Unable to remove environment variable 'AUTH0_SECRET' from 'development'.
Error: Command failed: npx --yes vercel env rm AUTH0_SECRET development -y
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/username/.npm/_npx/69f9afb961c37556/node_modules/@vercel/node
npm ERR! dest<EMAIL_ADDRESS>npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/username/.npm/_npx/69f9afb961c37556/node_modules/@vercel/node' -><EMAIL_ADDRESS>
npm ERR!      /Users/username/.npm/_logs/2023-01-25T16_19_39_652Z-debug-0.log

    at ChildProcess.exithandler (node:child_process:400:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1093:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {

I refreshed the Environments in the Vercel UI - they were all gone. Note that I had variables for Development, Preview and Production environments.
Hint: This might be a Vercel problem because the variables were previously shared between the different environments. This tool might be able to handle that though.
To Reproduce
See above.
Expected behavior
The Preview and Production environment variables should not have been deleted...
How often does this bug happen?
Only once
System Info
No response
Additional Context
No response

Thanks for the report.
From the error message, it looks like the error is related to a rename operation issue related to npx with the @vercel/node package.
The only file system operations done by vercel-env-push is pretty much only checking that a file exists and reading a file.
Altho, npx is indeed used under the hood to run the vercel command. From a quick search, it looks like this is an error some people are randomly encountering when using npm or npx:

https://stackoverflow.com/questions/71145130/npm-err-code-enotempty-npm-err-syscall-rename
https://stackoverflow.com/questions/73415687/im-facing-errors-in-terminal-after-typing-npx-react-native-init-awesomeproject
https://stackoverflow.com/questions/73847968/unable-to-install-react-in-linux

Altho, from these various threads, it looks like there is no obvious cause or solution. Some people are talking about this being Linux related, some others indicate a permission issue, and some other recommend just deleting the specified folders.

This might be a Vercel problem because the variables were previously shared between the different environments.

I just tried to repro this scenario, e.g. having a test variable setup on Vercel shared between the Production, Preview and Development environments and updating it using vercel-env-push using the exact same command you used (npx vercel-env-push .env.local development), and no error was thrown.

I refreshed the Environments in the Vercel UI - they were all gone.

Unfortunately, in this scenario described just above, this is a Vercel limitation. If you have a single variable setup on Vercel shared between multiple environments, it is not possible to remove this variable only for a specific environment using their CLI.
In the following screenshot for example, I have a testA variable shared between the Development and Preview environments.

Even tho their CLI help kinda indicates removing a variable from a specific environment should be possible:

Executing npx vercel env rm testA development will remove the variable from both environments:

This command will only work as we would expect if you have 2 different variables with the same name configured for different individual environments.

As it looks like the issue is not directly related to vercel-env-push, I'll close this issue altho, if you have any more informations or any indications I'm wrong, do not hesitate to comment on this issue and I'll re-open it right away to investigate.


Removing vendor directory

Remove vendor directory
Add script to generate vendor
change .gitignore

i think u can move it to under testing or done


fusedev: add clone_fuse_file method to FuseSession

This patch adds clone_fuse_file method to FuseSession.
This function obtains a new file descriptor by opening /dev/fuse and associates the file descriptor with the original fuse connection of fuse session using the ioctl FUSE_DEV_IOC_CLONE command.

I try to use the following code to test this feature:
let dir = TempDir::new().unwrap();
let se = FuseSession::new(dir.as_path(), "foo", "bar", true);
assert!(se.is_ok());
let mut se = se.unwrap();
se.mount().unwrap();

but get CI error:
fusermount3: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf

Should I config the /etc/fuse.conf by modify the ci configuration files?

@loheagn Could you explain a bit why you need it?

@loheagn Could you explain a bit why you need it?

As the comment discussed, clone fuse file can avoid blocking the IO requests when restarting nydusd.

user_allow_other

We should do that:)

user_allow_other

We should do that:)

@jiangliu Should I fix this in this patch?

user_allow_other

We should do that:)

@jiangliu Should I fix this in this patch?

Please fix it:)


IOS 14.4 - Back button is not appearing

When clicking on the currency field in the latest version of Ios, there is no back button appearing so there is no way to come out of num panel.

@dineshmatta this is just a normal TextInput with keyboardType="numeric", what you're reporting is not a bug, if you think it's I'd suggest you to go to react-native issues.
Maybe adding returnKeyType="done" will solve your need. Or you can try overwrite the keyboardType to achieve what you want.

Hey @CaioQuirinoMedeiros
Yes I figured out the solution and forgot to close the bug, thanks for the reply.


Incorrect Product Reference: HP vs. Micro Focus ArcSight

ArcSight has been acquired by Micro Focus in 2017. We are in 2019. Reference to HP ArcSight must be severely out of date

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

ID: 250b790c-3309-2651-cefd-e94d3dd5bc11
Version Independent ID: 54000705-40ce-d014-7bda-4296c1de2e29
Content: Configure HP ArcSight to pull Microsoft Defender ATP detections
Content Source: windows/security/threat-protection/microsoft-defender-atp/configure-arcsight.md
Product: w10
Technology: windows
GitHub Login: @mjcaparas
Microsoft Alias: macapara

Topic updated.


How to prevent multiple barcode decoding results?

I have a problem with prevention taking more than one scan results.
How to take only the first scanned result, and to ignore the rest. The problem occurs when on the screen displays several bar codes at the same time.

Hi @milanmilic,
Not sure if I understand you right, the lib will raise an event any time there's a new bar code detected. So I'd think it's up to your logic to act upon an additional event notification. If I got you wrong, please elaborate and I'm pretty sure we can assist.

In addition you can distinguish barcodes by barcode type, that could help to narrow down the amount being scanned, if you're are having different types and don't aim to scan all those types.


chore(deps) bump lua-resty-acme from ~> 0.6 to == 0.7.1

Summary
bug fixes

*: popup errors from lower functions a19e9c8
autossl: pass storage config to acme client (#43) ef1e541

features

autossl: add challenge_start_delay df4ba0b
autossl: check if domain is whitelisted before cert renewal (#35) 942c007
client: add challenge_start_callback 1c9b2d5
client: allow to read "alternate" link and select preferred chain (#42) ff17a74
storage/vault: add support for kubernetes auth (#37) 93c2121

I was planning to do it in #7647 , but I agree if we pin it to specific version for now it's also more reliable.


reindex documents from Mysql

I have a problem when reindex nearly 400k documents from Mysql to ES.
When chewy send request to ES is extremely fast!
but when query documents from Mysql, it took more than 10 hours.
When I examine query log, it seems that my model have lots of belongs_to connection, so for each belongs_to it query to Mysql again.
Then I think if I can prepare reindex data first in json (by optimizing Mysql query) then send manually to Chewy for reindex in ES or send directly to ES!
is possible to send data through Chewy to reindex in ES?
Or could you suggest me any better ideas? thanks a lot

To optimize reindexing and solve n+1 problem you have to preload associations:
define_type YourModel.includes(:assoc1, :assoc2) do
  ...
end

So exacly the same way as usually.
Also you can use https://github.com/toptal/chewy#crutches-technology if preloading will be slow for you.

sorry for late reply ;( @pyromaniac
thanks for your help, I can include assocs to avoid N + 1 :) Now I have some other problems and need a good solution.
My app situation exactly like (here](https://www.elastic.co/blog/changing-mapping-with-zero-downtime)
So can I use chewy for solution mentioned above link?
there are cases:

Add fields to Mysql and need to update mapping, values to ES
Change field types and need to update to ES
rename fields to ES
can I use chewy rake chewy:update to automatically update? or other supported methods of Chewy?
thanks a lot!

rake chewy:reset does exactly the thing described in those link.

rake chewy:reset take too long for 400k documents as in the issue above.
I add associations but chewy limit to 61 references and it still takes hours.

What do you mean by limit to 61 references ?

ah it Mysql
Mysql2::Error: Too many tables; MySQL can only use 61 tables in a join

I have more than 90 tables to join

Have no idea why all the includes are converted to joins, they supposed to be simply additional queries. Anyway, you are able to use https://github.com/toptal/chewy#crutches-technology instead, it will probably do the trick

Or probably you are doing something wrong, could you show your type definition please?

PARAMS_CANDIDATE_MULTI = Candidate::PARAMS_CANDIDATE_MULTI.first.map do |param|
    param.first.to_s.sub("_ids", "").pluralize.to_sym
  end
  PARAMS_FITTING_MULTI = [:desire_business_types, :desire_occupational_types, :desire_areas]
  PARAMS_CANDIDATE_MULTI_NAME = (PARAMS_CANDIDATE_MULTI + PARAMS_FITTING_MULTI)
    .map{|param| "#{param}_names"}
  PARAMS_CANDIDATE_REFERENCE_NAME = Candidate::PARAMS_CANDIDATE_REFERENCE.map do |param|
    param.to_s.sub("_id", "_name").to_sym
  end
  FULL_PARAMS_SEARCH_CANDIDATE = Candidate::PARAMS_CANDIDATE_STRING + PARAMS_CANDIDATE_MULTI_NAME +
    PARAMS_CANDIDATE_REFERENCE_NAME + [:id]
  INCLUDED_ASSOCIATIONS = PARAMS_CANDIDATE_MULTI + [:fitting_condition]
  INCLUDED_ASSOCIATIONS += [:gender, :rank, :phase, :counseling_type, :progresses, :prefecture, :release_reason, :close_reason,
    :employment_status, :marriage, :adviser, :desire, :move, :residence_type, :interview_time, :excel, :english,
    :axis1, :axis2, :axis3, :work_procedure1, :work_procedure2, :work_procedure3, :social_disposition1, :social_disposition2,
    :two_week, :one_month, :two_month, :six_month, :one_year, :one_year_six_month, :two_year, :two_year_six_month, :three_year,
    :en_judgment, :njnr_flag, :assistant, :call_center_charge, :call_center_action, :matriculant_type, :cc_result, :resources_type,
    :interview_phase, :nikkei_career_phase, :mainabi_agent_phase, :astamuse_type, :astamuse_status, :en_leave_flag, :axis_introduction_phase,
    :natural_inflow_phase, :attached_file, :know_reason, :hp_inflow_wicket, :created_by, :updated_by, :cc_assigned_to, :counseling_date_assigned_to,
    :turnover_period, :possible_duplicate
  ]
  INCLUDED_ASSOCIATIONS += [
    :candidates_m_shuffle_box_teams, :shuffle_box_teams, :shuffle_box_teams, :shuffle_box_divisions, :candidates_m_business_categories,
    :experience_business_categories, :candidates_m_occupational_categories, :experience_occupational_categories, :candidates_m_pational_categories,
    :main_pational_categories, :candidates_m_areas, :areas, :candidates_m_matriculant_types, :matriculant_statuses, :candidates_m_academic_backgrounds,
    :academic_background_judments, :candidates_m_resource_ranks, :precious_resources, :candidates_m_human_resource_types, :resource_groups,
    :candidates_m_resources_type_searches, :resources_type_searches, :progresses, :work_flows, :fitting_results, :action_logs, :history_calls,
    :possible_duplicated_candidates, :possible_duplicates, :candidates_m_distribution_teams, :candidates_m_distribution_divisions,
    :fitting_condition, :form_requirement, :sender, :receiver, :cc_receiver, :bcc_receiver, :candidate_test, :import_failure_data, :origin_candidate,
    :jobs_have_fitting_score, :jobs_in_progress
  ]

define_type Candidate.includes(*INCLUDED_ASSOCIATIONS) do
    field *Candidate::PARAMS_CANDIDATE_STRING, analyzer: "custom_analyzer"
    field *Candidate::PARAMS_CANDIDATE_REFERENCE, :id, :created_by_id, :updated_by_id
    field *Candidate::PARAMS_CANDIDATE_NUMBER, type: "long"
    field *Candidate::PARAMS_CANDIDATE_DATE, :created_at, :updated_at, type: "date"
    PARAMS_CANDIDATE_MULTI.each do |param|
      field param, index: "not_analyzed", value: ->{send(param).map &:id}
      field "#{param}_names", analyzer: "custom_analyzer", value: ->{send(param).map &:name}
    end
    field *PARAMS_CANDIDATE_REFERENCE_NAME, analyzer: "custom_analyzer"
    PARAMS_FITTING_MULTI.each do |param|
      case param
      when :desire_areas
        master_model, middle_model = M::Location, FittingConditionsMArea
      when :desire_occupational_types
        master_model, middle_model = M::JobName, FittingConditionsMOccupationalCategory
      when :desire_business_types
        master_model, middle_model = M::BusinessCategory, FittingConditionsMBusinessCategory
      end
      crutch param do |candidates|
        candidate_ids = candidates.map &:id
        fitting_condition_map = FittingCondition.by_owner_ids(candidate_ids)
          .inject({}) do |hash, fitting_condition|
          hash[fitting_condition.id] = fitting_condition.owner_id
          hash
        end
        data = middle_model.desire_by_candidates(fitting_condition_map.values)
          .inject({}) do |hash, item|
          candidate_id = fitting_condition_map[item.fitting_condition_id]
          master_item = master_model.find_by id: item.master_data_id
          hash[candidate_id] ||= []
          hash[candidate_id] << master_item
          hash
        end
      end
      field param, index: "not_analyzed", value: ->(candidate, crutches) do
        if crutches.send(param)[candidate.id]
          crutches.send(param)[candidate.id].map &:id
        end
      end
      field "#{param}_names", analyzer: "custom_analyzer", value: ->(candidate, crutches) do
        if crutches.send(param)[candidate.id]
          crutches.send(param)[candidate.id].map &:name
        end
      end
    end
    field :desire_income, type: "long", value: ->{fitting_condition_desire_income}
    # field :number_interview_jobs, value: ->{progresses.first_interviewed.count}
    field :number_interview_jobs, value: ->{progresses.to_a.select{|p| p.date_pass_first_interview.present?}.size}
    # field :demo2, type: "string"
  end

I think because of belongs_to references so I have to join

Wow! Unexpectable. Cruches might help in this case, I believe. Also do you really need all this association for this particular type? I don't see enough fields, did you omit them?

Also I feel you pain, bro

I'm actually experiencing a desire to hug you. Are you able to switch to PG or reduce your schema maybe?

Many fields are hidden in Candidate model :) which have more than 90 reference including has_many and belongs_to. My colleague has added crunch recently, as you can see above, but it seem not help much :(
thanks bro, I really need a hug now =))
I dont think we can switch to postgresql or reduce the schema
:( I think about a way to do partial update the index

Yeah, probably chewy doesn't fit your requirements currently, or you have to figure out a way to make it fit.
You can use crutches for those belongs_to associations preload and pass them somehow optionally to methods to replace associations usage while indexing, it should actually help.

Also how are you going to optimize your SQL query you've mentioned? You are actually able to pass any query to chewy type definition, so if you have optimized query which works fast - you are simply able to use it.

I think about 2 options :)

as you said, I try crutches to preload and optimizing SQL query to avoid N + 1 query
manually, for each migrations, I can know which field is add, edit or delete from mysql. Then query only those fields, pull old index from ES and manually change mapping and value. But I dont have much exp to work with ES API so this seem overwhelming and take time!

The point is that you are unable to update ES mapping. It is impossible. I mean, you can add fields probably, but change existing ones - nope. So you are really limited using the second solution. Also chewy doesn't support partial index updates specifically because of the reasons provided above

Could you please explain more for me, I tested to add new fields to ES, then POST /candidates/candidate/id/_update and then I can GET /candidates/candidate/_search, so is it updated partially? I am confused in this case
many thanks :)

ah, mistake, I mentioned about add!
about changing existing ones, I can pull old index, and edit mapping in place? then push back to ES

Have no idea, you have to experiment on it, but probably it is possible, not sure how reliable is it however.

ok thanks a lot, I will try :)

Welcome, feel free to ask more question if you have

Can I change ES _id to use mysql id in chewy?

Sure you can, it is actually used by default

really? because I dont see _id use id from mysql?
I have to set it in settings or define_type?

if you want to redefine it:
define_type ... do
  root _id: -> { custom_id } do
    ...
  end
end

thanks I will try
I refactoring sql query and use crutch, but I have error like can not call Candidate model inside define_type Candidate
ArgumentError: wrong number of arguments (1 for 0) #when call candidates.select().joins....

NoMethodError: private method `select' called for nil:NilClass # when call Candidate.where().select...

It seems that the problem lie in buliding json for ES
I optimize to reduce query, but time for chewy handling index still slow

around 100 fields: 8 field for date, 60 for custom_analyzer, the rest are string type :(

it's possible to use multi-threading for chewy?

https://github.com/toptal/chewy/pull/321

wow, awesome, I will give it a try! :hug:

Hey, could you try new Witchcraft™ feature? You have to add witchcraft! call right after define_type line like this:
define_type YourType do
  witchcraft!

  field :first
  field :second
end

It should work or not :) But if it will work, it will probably speed-up your import up to 20%

@pyromaniac
thanks I will try it :D

https://github.com/toptal/chewy/#witchcraft-technology
Docs added btw

@pyromaniac
I have this error
(eval):13:in `block in class_eval': undefined local variable or method `param' for #<Class:#<Chewy::Type::Witchcraft::Cauldron:0x007faf7d0de998>> (NameError)

Seems like something with your type definition could you post it?

Most probably it is a variable from binding, you may have to get rid of it somehow

define_type Candidate.includes(*INCLUDED_ASSOCIATIONS) do
    witchcraft!
    field *Candidate::PARAMS_CANDIDATE_STRING, analyzer: "custom_analyzer"
    field *Candidate::PARAMS_CANDIDATE_REFERENCE, :id, :created_by_id, :updated_by_id
    field *Candidate::PARAMS_CANDIDATE_NUMBER, type: "long"
    field *Candidate::PARAMS_CANDIDATE_DATE, :created_at, :updated_at, type: "date"
    PARAMS_CANDIDATE_MULTI.each do |param|
      field param, index: "not_analyzed", value: ->{send(param).map &:id}
      field "#{param}_names", analyzer: "custom_analyzer", value: ->{send(param).map &:name}
    end
    PARAMS_CANDIDATE_REFERENCE_NAME.each do |param|
      if masters[param]
        field param, analyzer: "custom_analyzer", value: ->(candidate) do
          if candidate.send(param.to_s.sub("_name", "_id"))
            masters[param][candidate.send(param.to_s.sub("_name", "_id"))]
          else
            ""
          end
        end
      else
        field param, analyzer: "custom_analyzer"
      end
    end

    PARAMS_FITTING_MULTI.each do |param|
      case param
      when :desire_areas
        master_model, middle_model = M::Location, FittingConditionsMArea
      when :desire_occupational_types
        master_model, middle_model = M::JobName, FittingConditionsMOccupationalCategory
      when :desire_business_types
        master_model, middle_model = M::BusinessCategory, FittingConditionsMBusinessCategory
      end
      crutch param do |candidates|
        candidate_ids = candidates.map &:id

        fitting_condition_map = FittingCondition.where(owner_id: candidate_ids).pluck(:id, :owner_id)
          .inject({}) do |hash, fitting_condition|
          hash[fitting_condition[0]] = fitting_condition[1]
          hash
        end
        data = middle_model.desire_by_candidates(fitting_condition_map.values)
          .inject({}) do |hash, item|
          candidate_id = fitting_condition_map[item.fitting_condition_id]
          master_item = master_model.find_by id: item.master_data_id
          hash[candidate_id] ||= []
          hash[candidate_id] << master_item

          hash
        end

      end
      field param, index: "not_analyzed", value: ->(candidate, crutches) do
        if crutches.send(param)[candidate.id]
          crutches.send(param)[candidate.id].compact!
          crutches.send(param)[candidate.id].map &:id
        end
      end
      field "#{param}_names", analyzer: "custom_analyzer", value: ->(candidate, crutches) do
        if crutches.send(param)[candidate.id]
          crutches.send(param)[candidate.id].map &:name
        end
      end
    end

    field :desire_income, type: "long", value: ->{fitting_condition_desire_income}

    field :number_interview_jobs, value: ->(candidate) do
      interview_job_masters[candidate.id]
    end
  end

I dont have any binding in application

Ah, I see it now in your previous post. You probably have to get rid of those external iterator in type definition and do everything in copy-paste manner

okay I will try it now!

Yeah, and I'll try to fix Witchcraft to support such a cases

Not sure if it is possible however

yep :( copy and paste such hundreds of fields scare me a lot :-s

Hey, try the latest master, but you have to fix some fields to use arguments in procs like this:
field param, index: "not_analyzed", value: ->(o) { o.send(param).map &:id }

oki I will try it thanks!

@pyromaniac
:dancers: it worked, faster 40% with my application
(y)

Haha, fokken awesome! Witchcraft FTW. But check everything carefully. Like that documents are generated correctly. Also sacrifice a goat please.

:beers: :+1: :laughing:


Add support for Python 3.11

Adds support for Python 3.11

Hi @cybergrind , any chance you could take a look at this PR? Thank you!

Hi @cybergrind ! It does not block atm, I have a fork which I use for my services, but would be great to have this upstream so we could use pypi for installation.
Would it be better to do the setup.py -> pyproject.toml in a separate PR?

ok


Update tycho version as a result of octave work.

@ismagilani  does Tycho need to be bumped in requirements.txt and setup.cfg?

@ismagilani if this is just a version bump for appstore since tycho was bumped in develop we can close this as my latest pr bumped to dev5 and is in develop now.

@n0mn0m we can take that route. Although I need to change tycho once more since somehow we had a discrepancy in version.  I saw a 1.0.19 version in tycho so I bumped it to 1.0.20 but it actually should've been 1.0.15 as @muralikarthikk checked pypi and latest version was 1.0.14.  So I am going to add a 1.0.15 for tycho in pypi and then update appstore files again and add them to this PR if that works for you?

@ismagilani that sounds great to me, thanks :)


SQFormDropdown.stories.test.js

I had assumed that dropdowns were already converted to TS, this is blocked by #332


fix: refresh dependencies and address import cycles

This commit refreshes the project's dependencies to address a high-sev vulnerability reported in the http-cache-semantics package.
Also included in this commit are minor changes to several .ts files in order to address eslint errors reported by the "import/no-cycle" rule.  These errors started showing up because the eslint-plugin-import package was also upgraded from 2.26.0 to 2.27.5 (the latest) as a result of refreshing the dependencies.
Checklist

[x] npm test passes (tip: npm run lint-fix can correct most style issues)
[ ] tests are included
[ ] documentation is changed or added

:tada: This PR is included in version 4.0.8 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Reaching Jon :)

hey jon -- i wrote you a mail to the e-mail address at the thesquareplanet -- did it pass spam filters?  Sorry i didn't find another way to double-check ;)

Hi! Sorry, yes, I got the e-mail. My parents are in town, so haven't had a chance to respond to it yet. It's on my queue :)

On Tue, Sep 24, 2019 at 16:19 -0700, Jon Gjengset wrote:

Closed #143.

fine -- and sorry for disturbing here -- a common issue
with first-time emails is that they might never make it to human eyes ...


added option to use sklearn's OneHotEncoder to handle unknown categories

This library is amazing and I noticed a small issue when using the Multiple Correspondence Analysis: since the function uses pd.get_dummies internally to one hot encode the data, I got an error as my testing set had unknown categories in certain categorical features compared to the train set.
Therefore, I have initialized a OneHotEncoder object from sklearn.preprocessing to process the data, if the user wants to opt out of using the get_dummies function.
These are the three attributes that I have specified:

get_dummies (if True, will use the original get_dummies method (default is set to False))
one_hot_encoder (the OneHotEncoder object)
is_one_hot_fitted: (boolean to check if the one_hot_encoder is fitted)

I have updated the _prepare function as well:
def _prepare(self, X):
        if self.one_hot:
            if self.get_dummies:
                X = pd.get_dummies(X, columns=X.columns)
                return X
            else:
                if self.is_one_hot_fitted == False:
                    X_enc = self.one_hot_encoder.fit_transform(X)
                    X_enc = pd.DataFrame(X_enc, columns=self.one_hot_encoder.get_feature_names_out(X.columns))
                    self.is_one_hot_fitted = True
                    return X_enc
                else:
                    X_enc = self.one_hot_encoder.transform(X)
                    X_enc = pd.DataFrame(X_enc, columns=self.one_hot_encoder.get_feature_names_out(X.columns))
                    return X_enc
        return X

Let me know if there is anything else I can do, or whether the workings are correct.
Thanks again for this great library <3

Thanks for starting this PR! This is a tricky topic. Have you tried running the unit tests? I think this will will fail due to supplementary columns... I have booked some time on my calendar to look into this. I'll let you know.

And thanks for the appreciation :)

Thanks for starting this PR! This is a tricky topic. Have you tried running the unit tests? I think this will will fail due to supplementary columns... I have booked some time on my calendar to look into this. I'll let you know.

Hi, thank you. I didn't try the unit tests, and as you said, the unit tests are failing. Please let me know if there is anything that I can do, and also, may I know the reason for having supplementary columns?

I modified the mca file to handle unknown features, as the error in the unit test is the features that are seen in fit are not seen when transforming, so I modified the _prepare function in mca.py:
def _prepare(self, X):
        if self.one_hot:
            if self.get_dummies:
                X = pd.get_dummies(X, columns=X.columns)
                return X
            else:
                if self.is_one_hot_fitted == False:
                    #if the one_hot_encoder is not fitted, to fit and also set the is_one_hot_fitted variable to True
                    X_enc = self.one_hot_encoder.fit_transform(X)
                    X_enc = pd.DataFrame(X_enc, columns=self.one_hot_encoder.get_feature_names_out(X.columns))
                    self.is_one_hot_fitted = True
                    return X_enc
                else:
                    #checking if the columns fed to the onehot encoder and the columns fitted to the onehot encoder are the same
                    oh_cols = set(self.one_hot_encoder.feature_names_in_.tolist())
                    X_cols = set(X.columns.tolist())

                    if oh_cols == X_cols:
                        #if the fitted cols are the same as the inferencing columns, then can transform
                        X_enc = self.one_hot_encoder.transform(X)
                        X_enc = pd.DataFrame(X_enc, columns=self.one_hot_encoder.get_feature_names_out(X.columns))
                        return X_enc
                    else:
                        #if the fitted cols are different to the inferencing columns, then should fit the onehot encoder again, to handle unit tests
                        print(X_cols)
                        print(oh_cols)
                        X_enc = self.one_hot_encoder.fit_transform(X)
                        X_enc = pd.DataFrame(X_enc, columns=self.one_hot_encoder.get_feature_names_out(X.columns))
                        return X_enc
        return X

I checked with the unit tests and didn't have issues on my side. please let me know if this works.

Ok thanks for looking it. I will take a good look! I want to also make sure this change you're bringing resolves this issue.

Ok thanks for looking it. I will take a good look! I want to also make sure this change you're bringing resolves this issue.

Sure, thank you. Saw the error clean code test, and made a change.

Hi @MaxHalford, is there any update to this?

Hey @Vaseekaran-V! I finally found carved some time to look into this. Turns out I found a simpler solution in #181


[BACKLOG] (Search) - Center all elements

Description of the issue
All search elements need to be centered. They can have the same height too.
Ideas of solution
Describe possible ideas for solution and evaluate advantages and disadvantages.
Workflow checklist

[x] I am aware of the workflow in CONTRIBUTING.md
[x] I have created a branch for my feature

Closed via #136


Update AstronomersVisualPack.netkan

Adjust priorities of associated mods
Updated abstract

Looks good, thanks for the update.