Config auto refresh not working with springboot 2.0.0.M7 and spring-cloud-consul-config 2.0.0.M4

Bug report
Application configuration context is not refreshing after updates in consul, as it was springboot 1.5.9 and spring cloud consul Edgware.RELEASE.
In order to verify that issue is not with my app, I generated 2 projects in http://start.spring.io with dependencies: Consul configuration, Consul Discovery, Web
https://github.com/olehlesiuk/demo-spring-boot-1.5.9
added to generated configuration:
@EnableDiscoveryClient and config file bootstrap.properties with
spring.application.name=s1pconsuldemo
2018-02-13 07:38:06.321  INFO 13910 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8081 (http)
2018-02-13 07:38:06.340  INFO 13910 --- [           main] o.s.c.c.s.ConsulServiceRegistry          : Registering service with consul: NewService{id='s1pconsuldemo-8081', name='s1pconsuldemo', tags=[], address='<IP_ADDRESS>', port=8081, enableTagOverride=null, check=Check{script='null', interval='10s', ttl='null', http='http://<IP_ADDRESS>:8081/health', tcp='null', timeout='null', deregisterCriticalServiceAfter='null', tlsSkipVerify=null, status='null'}, checks=null}
2018-02-13 07:38:06.371  INFO 13910 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 4.236 seconds (JVM running for 7.079)
2018-02-13 07:38:13.685  INFO 13910 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-02-13 07:38:13.686  INFO 13910 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2018-02-13 07:38:13.700  INFO 13910 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 14 ms
2018-02-13 07:39:19.774  INFO 13910 --- [pool-1-thread-1] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1967c7cf: startup date [Tue Feb 13 07:39:19 CET 2018]; root of context hierarchy
2018-02-13 07:39:19.794  INFO 13910 --- [pool-1-thread-1] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-02-13 07:39:19.808  INFO 13910 --- [pool-1-thread-1] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$511517b1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-02-13 07:39:19.909  INFO 13910 --- [pool-1-thread-1] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource [name='consul', propertySources=[ConsulPropertySource {name='config/s1pconsuldemo/'}, ConsulPropertySource {name='config/application/'}]]
2018-02-13 07:39:19.911  INFO 13910 --- [pool-1-thread-1] o.s.boot.SpringApplication               : No active profile set, falling back to default profiles: default
2018-02-13 07:39:19.912  INFO 13910 --- [pool-1-thread-1] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1f7f216f: startup date [Tue Feb 13 07:39:19 CET 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1967c7cf
2018-02-13 07:39:19.917  INFO 13910 --- [pool-1-thread-1] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-02-13 07:39:19.933  INFO 13910 --- [pool-1-thread-1] o.s.boot.SpringApplication               : Started application in 0.192 seconds (JVM running for 80.644)
2018-02-13 07:39:19.933  INFO 13910 --- [pool-1-thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@1f7f216f: startup date [Tue Feb 13 07:39:19 CET 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1967c7cf
2018-02-13 07:39:19.933  INFO 13910 --- [pool-1-thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@1967c7cf: startup date [Tue Feb 13 07:39:19 CET 2018]; root of context hierarchy
2018-02-13 07:39:20.082  INFO 13910 --- [pool-1-thread-1] o.s.c.e.event.RefreshEventListener       : Refresh keys changed: [some.value]

As you can see from logs after application started it's automatically registered in consul. When value was changed it's automatically update configuration inside of application.
However in 2.0.0.M7 behaviour is not the same:
https://github.com/olehlesiuk/demo-springboot-2.0.0.M7
added to generated configuration:
@EnableDiscoveryClient
and config file bootstrap.properties with
spring.cloud.consul.discovery.health-check-path=/actuator/health
spring.application.name=s1pconsuldemo
2018-02-13 07:35:28.272  INFO 13788 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2018-02-13 07:35:28.287  INFO 13788 --- [           main] o.s.c.c.s.ConsulServiceRegistry          : Registering service with consul: NewService{id='s1pconsuldemo', name='s1pconsuldemo', tags=[], address='<IP_ADDRESS>', port=8080, enableTagOverride=null, check=Check{script='null', interval='10s', ttl='null', http='http://<IP_ADDRESS>:8080/actuator/health', tcp='null', timeout='null', deregisterCriticalServiceAfter='null', tlsSkipVerify=null, status='null'}, checks=null}
2018-02-13 07:35:28.326  INFO 13788 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 4.846 seconds (JVM running for 8.42)
2018-02-13 07:35:32.051  INFO 13788 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-02-13 07:35:32.052  INFO 13788 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2018-02-13 07:35:32.066  INFO 13788 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 14 ms

Application did not react on change in consul (version 1.5.9 did)
only after ‘$ curl -X POST localhost:8080/actuator/refresh’
response: ["some.value"]
value was refreshed in application

2018-02-13 07:41:21.421  INFO 13788 --- [nio-8080-exec-6] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1bfaaea5: startup date [Tue Feb 13 07:41:21 CET 2018]; root of context hierarchy
2018-02-13 07:41:21.450  INFO 13788 --- [nio-8080-exec-6] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-02-13 07:41:21.467  INFO 13788 --- [nio-8080-exec-6] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$a41a6a97] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-02-13 07:41:21.491  INFO 13788 --- [nio-8080-exec-6] o.h.v.i.engine.ValidatorFactoryImpl      : HV000238: Temporal validation tolerance set to 0.
2018-02-13 07:41:21.565  INFO 13788 --- [nio-8080-exec-6] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='consul', propertySources=[ConsulPropertySource {name='config/s1pconsuldemo/'}]}
2018-02-13 07:41:21.568  INFO 13788 --- [nio-8080-exec-6] o.s.boot.SpringApplication               : No active profile set, falling back to default profiles: default
2018-02-13 07:41:21.570  INFO 13788 --- [nio-8080-exec-6] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@9b3b40a: startup date [Tue Feb 13 07:41:21 CET 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1bfaaea5
2018-02-13 07:41:21.572  INFO 13788 --- [nio-8080-exec-6] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-02-13 07:41:21.579  INFO 13788 --- [nio-8080-exec-6] o.s.boot.SpringApplication               : Started application in 0.188 seconds (JVM running for 361.69)
2018-02-13 07:41:21.579  INFO 13788 --- [nio-8080-exec-6] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@9b3b40a: startup date [Tue Feb 13 07:41:21 CET 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1bfaaea5
2018-02-13 07:41:21.580  INFO 13788 --- [nio-8080-exec-6] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@1bfaaea5: startup date [Tue Feb 13 07:41:21 CET 2018]; root of context hierarchy

May anyone suggest how to configure springboot 2.0.0.M7 and spring cloud consul 2.0.0.M4 to behave as springboot 1.5.9 and spring cloud consul Edgware.RELEASE

I think this may have to do with https://github.com/spring-projects/spring-boot/issues/12451

This issue will be fixed by Spring Boot 2.0.1 due Mar 29. That should be what Finchley.RC1 builds upon.

Hello,
I was waitting for Spring Boot 2.0.1.RELEASE for the fix of this problem. Today I has retried once the release was available, the problem seems to persist. Before of the release publishing, I tried with the 2.0.1.SNAPSHOT, but whitout success.
Am I missing some extra configuration?
I´m ussing Finchley.M9
Thanks

I believe I'm having the same issue on Boot 2.0.2.RELEASE/Finchley.RC2. I change the configuration in Consul and the app does not pick it up unless I manually /refresh.

Looks like you need to add @EnableScheduling to you application in the interim.


Add keyboard shortcuts docs

Is your feature request related to a problem? Please describe.
I have been using the application for 4 days, and since then I am always discovering new keyboard shortcuts to make the design process faster, and that's an amazing thing.
I tried to search for keyboard shortcuts catalog where I can know all the available shortcuts but didn't find any unfortunately
That's why I suggest adding shortcuts catalog to the docs where new users can know all the shortcuts available, to make their experience better!
It may look something like that

Are you working on this? (Yes/No)
Yes, if applicable

What do you think?
@ayan-biswas0412 @nitin10s @gr455

What do you think? @ayan-biswas0412 @nitin10s @gr455

yah sure go ahead

Thanks @ayan-biswas0412
Here is the PR
It was really fun going through the codebase and discovering new keys shortcuts!


Remove a bunch of code duplication

A few of the commands had a bit of duplicate code which Codacy flagged as an issue. This adds a new method to GeneralUtils to handle some image generation and adds a new Leaderboard class to handle general use of leaderboards in commands.

I'm not sure why Codacy is complaining about the imports since I use each class from that package.

Also there is a bugfix in here
	public static String getLBPos(String user, char type) {
-		return " (#"+ getLBPosToInt(user, type) + ")";
+		int pos = getLBPosToInt(user, type) + 1;
+		return " (#"+ pos + ")";
	}

Before the position was the array index and was not the actual leaderboard position.

Oh yea I forgot to add, I have tested this to make sure all of the changes here work. It works without any errors!


pkg: Remove unused functions and types

What this PR does / why we need it:
Remove unused functions and types.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:
NONE

/lgtm

change: Answered review comments and removed also unused global variables.

Thanks @EdDev!
/lgtm
/approve

/retest


InvalidTargetDataCheck: make problem_type type checking smarter

Right now, in InvalidTargetDataCheck, we have:
        valid_target_types = [dtype for dtype in numeric_and_boolean_dtypes + categorical_dtypes]
        if y.dtype.name not in valid_target_types:

This covers all of the types we handle. However, we can also take into consideration the problem_type attribute to be smarter about this--for example, if problem type is regression, and the target has categorical data.

Thanks @angela97lin ! Agreed. RE our discussion on #1551 , it would be helpful if the data check errored if

For regression, the problem type was not "numeric"
For binary, the problem type was "categorical" (but first we should confirm that if a categorical column has only two unique values (other than nan) woodwork will label it as binary, not as "categorical"
For multiclass, the problem type was binary
For multiclass, the problem type had a high number of unique values--perhaps set a max cap at over 5%

Thanks @angela97lin ! Agreed. RE our discussion on #1551 , it would be helpful if the data check errored if

For regression, the problem type was not "numeric"
For binary, the problem type was "categorical" (but first we should confirm that if a categorical column has only two unique values (other than nan) woodwork will label it as binary, not as "categorical"
For multiclass, the problem type was binary
For multiclass, the problem type had a high number of unique values--perhaps set a max cap at over 5%


Localize GitHub Repositories and Azure Repos

From @TylerLeonhardt
All extensions are now localized. Verification should be:

Install a language pack (in a real language ideally, not Pseudo)
Install latest prelease of the extension in Desktop
smoke test and ensure strings are translated and there are no errors in console about localization

I smoke tested most of the labels from these extensions translated to German but I still see following Open Repository from GithHub label in english

That is coming from the builtin GitHub extension in VS Code, which contributes that entry only on desktop. In web everything should be fully localized since the GitHub Repositories extension contributes that item.
Should localization work for builtin extensions already?

Oh wait, this is totally my fault for missing a spot in Remote Repositories. Have a PR to fix that. Thanks @sandy081 😊


Create a Script to assist users upgrading Perspective to the latest version

Is your feature request related to a problem? Please describe.
Currently, the only way to upgrade Perspective to the latest version is to delete and recreate the Perspective stack
We should create a script to assist customers upgrading their Perspective deployment with a script they can run.

We will now be doing this through straight CloudFormation rather than an upgrade script.


[Bug] Thread type annotation does not support target with no parameters

Bug report
Your issue may already be reported!
Please check out our active issues before creating one.
Expected Behavior

Type hinting should not mark a function with no parameters as incompatible with Thread.target
Current Behavior

Type hinting marks parameter-less functions as incompatible
Is this a regression?

No.
Possible Solution

Steps to Reproduce (for bugs)

write a function that takes no arguments
instantiate a Thread()
type hinting acts up

Context

Your Environment

Version used: 0.1.1
Python version: 3.11.6
Operating System and version (desktop or mobile): Linux

Fix will be pushed along with v0.1.2


"Can't shim '7z.exe': File doesn't exist." With Powershell 7.1

Env
System: Windows 10 professional 20H2
Operating system build: 19042.928
Powershell Version: 7.13
Shortcut
❯ scoop install git
Installing '7zip' (19.00) [64bit]
7z1900-x64.msi (1.7 MB) [============================================================================================================] 100%
Checking hash of 7z1900-x64.msi ... ok.
Extracting 7z1900-x64.msi ... done.
Linking ~\scoop\apps\7zip\current => ~\scoop\apps\7zip\19.00
Creating shim for '7z'.
Can't shim '7z.exe': File doesn't exist.
Description
When I install, I always get a can't shim prompt. I guess it's because I've upgraded the PowerShell version

I've solved this problem. I don't know the principle, but it works. --> #4365


Create MainMenuUI.es-es.json

Main menu translated 47% to spanish

Thanks a lot for helping out :)


#3075 SpringDataRest Pageable resource with integer paramters

What's this PR do/fix?
Fixing issue #3075
Are there unit tests? If not how should this be manually tested?
test is updated.
Any background context you want to provide?
Fixing issue #3075
What are the relevant issues?
#3075

Thank you @csegedicsaba!!


How to avoid vim set terminal to raw mode when stdin is /dev/null?

Instructions: Replace the template text and remove irrelevant text (including this line)
Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
Currently vimtex uses vim -v --not-a-term -T dumb -c … to invoke some function as needed. This is invoked inside zathura.
 < /dev/null  # mess the terminal up

(the terminal is set to raw mode or something.)
Apparently when both stdin and stderr are redirected to /dev/null then it's fine.
command vim -v --not-a-term -T dumb -c "quitall!"    2> /dev/null  # okay

Describe the solution you'd like
Vim should return the terminal to normal on exit, or otherwise it should not put the terminal to raw mode in the first place.
Related: https://github.com/vim/vim/issues/3313

(the terminal is set to raw mode or something.)

What does that mean exactly?

Means when I type subsequent bash commands, nothing appears (if I type reset then press enter then things are fixed but I don't see the reset itself.)

hm, strange. And why are you redirecting stdin?

It wasn't exactly something I control, zathura is spawned by vimtex with stdin closed (I think).


Implement easy cobra commands, fix command outputs

At the moment, the source utilises Cobra CLI in a simple form when it comes to adding the commands to it. In the main file for the sztp-agent you have the following:
https://github.com/opiproject/sztp/blob/33b5b5ce949c76c17786e71e9dc933443b294e15/sztp-agent/main.go#L28C1-L47C2
The individual use of c.AddCommand(...) can be quite cumbersome in the future where the CLI grows. So I'd like to propose a solution for this:

Create a global var Commands []*cobra.Command slice
Have all the cobra commands setup inside an init() func instead of NewXCommand
All the init() funcs for all commands append themselves to the commands slice
Loop through the slice in main:

for _, cmd := range Commands {
   c.AddCommand(cmd)
}

Additionally, there seems to be something I think could be changed. Every time a command might fail, it runs prints the help text. I was testing it with my new command I created for generating systemd unit files:
~/GolandProjects/sztp/sztp-agent git:[main]
./sztp-agent systemd
Error: creating unit file /etc/systemd/system/sztp-agent.service: open /etc/systemd/system/sztp-agent.service: permission denied
Usage:
  opi-sztp-agent systemd [flags]

Flags:
  -h, --help             help for systemd
  -o, --options string   sztp-agent args/flags to add into the unit file
  -p, --path string      Path for unit file to be created (default "/etc/systemd/system")

2024/06/24 16:06:34 [ERROR] creating unit file /etc/systemd/system/sztp-agent.service: open /etc/systemd/system/sztp-agent.service: permission denied

And it prints the error twice, same with the other commands created. In my personal experience this should only happen if the user specifically specifies --help | -h with a command and/or subcommand. Not upon command failure, otherwise it drowns out the real error message.
I believe the structure of cobra needs some amendments and fixes to streamline it and make it cleaner. E.g.
func main() {
	command := newCommand()
	if err := command.Execute(); err != nil {
		log.Fatalf(color.InRed("[ERROR] ")+"%s", err.Error())
	}
}

func newCommand() *cobra.Command {
	c := &cobra.Command{
		Use:   "opi-sztp-agent",
		Short: "opi-sztp-agent is the agent command line interface to work with the sztp workflow",
		Run: func(cmd *cobra.Command, _ []string) {
			var err error
			if err != nil {
				log.Fatalf(color.InRed("[ERROR] ")+"%s", err.Error())
			}
		},
	}

	c.AddCommand(cmd.NewSystemdCommand())
	c.AddCommand(cmd.NewEnableCommand())
	return c
}

This can be done all under main(), and my proposed changes to how we add commands.
I'd be happy to implement this and make all the necessary changes. This way, we'd never have to do anything with the main function unless necessary, and adding commands becomes a little bit more straightforward.

make sense, @Xeckt go for it!

couple more things that could help:

status command has wrong arguments
run and daemon should do exactly the same, but daemon in the loop and run only once

Cool, I'll get started!

couple more things that could help:

status command has wrong arguments
run and daemon should do exactly the same, but daemon in the loop and run only once

Could you abbreviate more on the status command? It looks like it's templated from another command file but I suppose it's function is different. Judging by the name it reports the status, can you give me more details on that?

I opened separate issue for status with much more details here #399
daemon like today can take over the session but in loop until success
run is like daemon but exits after one iteration with success or fail

Ok, I will make the changes for the CLI as mentioned in this issue and make a PR, then I'll handle that issue seperately.


Unsubscribe one or multiple tokens without stopping streaming service

Hi,
I want to unsubscribe specific token(s) which I subscribed already in streaming/websocket service.
Ex:- I subscribed for HDFC Bank, ICICI Bank, Kotak Bank and later some point I want to unsubscribe only ICICI Bank ( I don't need price streaming), how can I do that?
Please explain with some examples.
Thank you!

You can make the token read from local file list & make changes in it to make it active/inactive accordingly.

alternatively you can also use threading to unload a token without halting the websocket function by running them in individual threads.


SPFX extension are loading slow (flickering )

Category

[x] Bug

Describe the bug
created a SPFx app customizer to hide a certain section in the pages. But due to the delay, the sections load first and then get hidden.
Steps to reproduce

DELETE THIS LINE BEFORE SUBMITTING - Provide steps to reproduce the behavior:

public onInit(): Promise {
kept my all logic to hide component in this block.
}
}
Expected behavior
Hide the field or add custom without any delay or flickering

Hi, could you provide a bit more information? Are you trying to use an SPFx Application Customizer to do DOM Manipulation to hide components in the page? If so, this isn't really a supported scenario, and it's not recommended to do so either as the DOM has the ability (and will) change in SharePoint Online.
As far as the timing of the loading, this is by design due to how the page loads the js files. The DOM loads and then the SPFx Extensions are loaded after.

Hi,
Thanks for your reply.
As we are creating custom button in the SharePoint library  Column in order to perform some activity in data. However due to delay issue It loads the custom button after 10 seconds before that column shows blank.

Alright. Could you please update your original post with your environment details?

OS: [e.g. Windows 10 | MacOS 10.15.x]
Target Environment: [e.g. SharePoint Server 2016 | SharePoint Server 2019 | SharePoint Online]
Framework: [e.g. .NET Framework v3.x | .NET Core v3.x | Node.js v6/v8/v10/v12]
Browser(s): [e.g. Chrome v79 | Safari v22 | FireFox v31 | IE v11 | Edge | Chromium Edge v79]
Tooling: [e.g. VS Code | SPFx v1.10.0 | Visual Studio 2019]
Additional details: The more context you can provide, the easier it is (and therefore quicker) to help.

Second, could you provide some more details on what you are trying to do? Also, you mentioned you created an App Customizer. Are you sure that's what you've built, and you aren't using a Field Customizer? Based on what you mentioned above, it sounds like a Field Customizer scenario.

OS: [e.g. Windows 10
Target Environment:  SharePoint Online
Framework: Node.js v10
Browser(s): [. Chrome v79 |  IE v11 | Edge ]
Tooling: [ VS Code]
Additional details: We have created both App Customizer & Field  Customizer
App Customizer :- To hide suite-bar-ribbon-on-modern-sharepoint-site and some buttons from sp page.
Issue :- Delay and flickering while hiding the ribbon (Approximate 4 second)
Field  Customizer :- To show gear option with multiple values in order to trigger power automate process.
Issue :- Loading time is 8 second in Field  Customizer in columns.

Thank you for updating your information. I'd like to address the customizations you are making.
First, with application customizer. The flicker you are seeing is actually intended behavior. The app customizer loads after the original DOM loaded. Also note, trying to hide the ribbon through this process technically isn't a supported customization.
To you field customizer, can you expand a little bit more on what you mean by

show gear option with multiple values in order to trigger power automate process.

Its a bit unclear as to what you are doing. It shouldn't take 8 seconds for a field customizer to load. If you could expand on what you are doing, that would be helpful. Any source code you could provide would also be helpful. Thanks!

Apologies, let me explain you in details.
Please refer below image we have created column name :- settings in that we applied extension which give two option in order to trigger two different power automate flow.
For example : when user will click on workflow 1 form will open after enter values date will be save in item after that it will trigger a flow.

Thanks for the update. That's very curious, is there any logic in your extension that runs before rendering, or does it just output the Gear Icon by default? Are the options for the Workflows options static?

Yes basically intention of creating this icons bcoz user don't want to navigate under multiple power automate layer to trigger a flow and also they don't like default power automate form due to that we have create extension.
Basically when user click on gear they select one of workflow option which popup some field when they provide there input and save the form. It trigger flow on document property change.

The metadata updated brought this up.  I'm going to close it, as the code here (hiding and manipulating DOM elements on the page.) is unsupported.


Dropdown menu inside modal

Bootstrap 4 alpha 6. Dropdown menu with checkbox input behaves differently inside modal (Impossible to check checkbox in Firefox, difficult in Chrome, etc.)
See
https://jsfiddle.net/32nupfrc/6/
Perhaps related to issue #21941

Retagging this as a JS issue. /cc @bardiharborow @johann-s

I tested against v4-dev and popper.js and this seems to be fixed.


Popup does not dismiss when using custom view generated by ViewBuilder

My situation
Hi I extended View with customBottomPopup, where I define a custom View and use the .popup modifier. like this :
import SwiftUI
import PopupView

public extension View {
  func customBottomPopup(isPresented: Binding<Bool>, popupContent: @escaping () -> some View) -> some View {

    var customView: some View {
        popupContent()
    }

    return self.popup(isPresented: isPresented) {
      customView
    } customize: {
      $0
        .isOpaque(true)
        .position(.bottom)
        .animation(.default)
        .closeOnTapOutside(true)
        .backgroundColor(Color.black.opacity(0.5))
    }
  }
}

Problem Code
And I defined a custom View named CustomPopup.
But When I activate content() code, dismiss popup does not work like this:
import SwiftUI

public struct CustomPopup<Content: View>: View {
  var buttonAction: (() -> Void)?
  let content: () -> Content

  public init(buttonAction: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) {
    self.buttonAction = buttonAction
    self.content = content
  }

  public var body: some View {
      content() // popup does not dismiss when active this line !!!
      Button(action:{buttonAction?()}){
        Text("Close Popup!")
      }
  }
}

I used modifier like this:
import SwiftUI

struct ContentView: View {
   @State var isPresented: Bool = false
   var body: View {
        ZStack{
           Button(action: {isPresented=true}){
             Text("Present Popup")
           }
        }
        .customBottomPopup(isPresented: $isPresented){
             CustomPopup(buttonAction: {isPresented=false}){
                 Text("Dummy")
             }
        }
   }
}

Oh.. my... I upgrade package version to 2.8.2 . This problem was solved.


Pass log level into persistence and projection methods

I've gone for a client side module level logger with module level set_debug and set_log_level
Server side functions now all have log_level as a mandatory parameter and the client side callers pass whatever the logger's level at the time might be.


Error handling.

So I am using this code with Fiu, and in Fiu, it says the provided bytecode is an error message. Now I know this project isnt Fiu, but I'm using the LuauCeption compiler, and I want to catch the error message, because I know in the C++ Luau compiler, you can do if (bytecode.at(0) == 0) { printf( "%s\n", bytecode.c_str() + 1); } so how exactly would I mimic that in LuauCeption with the compiler?

Oh wait, nevermind, I just fixed it now.

The check is basically checking if the first character is a null character (0). All error messages start with a null character then the error itself
Since Fiu seems to already do this, you can check their source code and see how to do the check

okk k gotchu


Error With Fresh Install

Command run:
python3 yolo_opencv.py --input sampledata/commuters.mp4 --config cfg/yolov3-tiny.cfg --weights yolov3-tiny.weights --classes cfg/yolov3.txt
Error:
IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (1920, 1080) to (1920, 1088) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).
Detecting objects in frame 1
Traceback (most recent call last):
File "yolo_opencv.py", line 188, in
processvideo(os.path.join(args.input))
File "yolo_opencv.py", line 140, in processvideo
image = detect(frame)
File "yolo_opencv.py", line 87, in detect
outs = net.forward(get_output_layers(net))
File "yolo_opencv.py", line 50, in get_output_layers
output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
File "yolo_opencv.py", line 50, in
output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
IndexError: invalid index to scalar variable.
No frames have been written; the written video is invalid.
Any help would be greatly appreciated!

I was able to fix this issue by changing all instances of "i[0]" to just "i"


Crashing on launch

General information:
Project issue is for:  3.8 BLEEDING EDGE testing
Expected result: Launching the game
Actual result: Game crashed on launch multiple times with

Log files:

Attachments

image.png (58 KiB)
server-2024-02-02.log (54 KiB)
2024.02.02_22-43-38_<IP_ADDRESS>.26535 traces.log (38 KiB)
LogOutput.log (6 KiB)
65bd6a410002ea3496f6291e.zip (0 KiB)

Originally written by Dax

You need to include logs with this or the issue will be closed.

Originally written by PhantomInTime

traces log indicates this is a 26535 client, connecting to a 3.8.0 server. I'm only able to replicate this issue if I purposely make that mismatch.
Most likely not an SPT issue, and is instead an installation issue

Originally written by DrakiaXYZ


Plugin fails to load due to syntax error.

OS: Linux Mint 20 x86_64
Plugin version: 0.7.0
Godot version: 3.2.2.stable
Whenever I try to enable Cartographer in the plugins menu, Godot displays the following pop-up error message:

And the following console output:

Thanks in advance, this plugin looks great!

You need to enable the cartographer singleton. Check the example's settings. I should add this to the readme.

You need to enable the cartographer singleton.

Thanks, I tried that before and it gave me the same error, but I see where things went wrong now, the editor needs to be reloaded after the singleton is added, after that the plugin loads.
I'm a bit confused though, isn't the plugin supposed to add the singleton on init by itself?
The init function of the plugin.gd tries to load it with:
add_autoload_singleton("Cartographer", "res://addons/cartographer/cartographer_singleton.gd")
What use does this have if you need to load it manually anyway?

add_autoload_singleton just adds it to the autoload list, you still have to enable it, as for the reasoning, I don't know.


createEffect called in dev mode but not in production build

Describe the bug
I'm working on a Universal Renderer project in which I have a module with:
const [focusedElm, setFocusedElm] = createSignal(null);
export const useFocusManager = createSingletonRoot(() => {
  const keypressEvent = useKeyDownEvent();

  let focusPath = [];
  createEffect(on(focusedElm, (currentFocusedElm, prevFocusedElm, prevFocusPath = []) => {

The focusedElm is meant to be a global signal. Inside a Browse page I have:
const Browse = () => {
  const [focusedElm, setFocusedElm] = useFocusManager();
  let focusRingRef;
  createEffect(on(focusedElm, (elm) => {
    console.log('Focused Ring Change', elm);
    if (focusRingRef?.lng && elm?.lng) {
      // No Absolute X Y yet from renderer
      focusRingRef.lng.parent = elm.lng;
    }
  }, { defer: true}))

When running in dev mode, both effects are being called as expected. When I build for production only the effect in the focusManager module is being called. The one in the Browse page never gets called. I've tried not using on and defer and various mutations to try to get it working but I'm stumped by the difference in build between dev and prod that would cause this.
Your Example Website or App
none
Steps to Reproduce the Bug or Issue
dev vs prod
Expected behavior
I expect createEffect to be called in both dev and prod
Screenshots or Videos
No response
Platform

OS: mac
Browser: chrome
vite/4.3.9 darwin-arm64 node-v16.15.1

Additional context
"scripts": {
    "start": "vite --open --host",
    "build": "vite build --sourcemap=true",
    "preview": "vite preview --open --port 8080",

import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';

export default defineConfig({
  plugins: [solidPlugin({
    solid: {
      moduleName: "@lightningjs/solid",
      generate: 'universal'
    }
  })],
  server: {
    hmr: false,
    headers: {
      'Cross-Origin-Opener-Policy': 'same-origin',
      'Cross-Origin-Embedder-Policy': 'require-corp',
    },
  },
});

I think I found the issue which is I'm bundling solid-js twice... which is causing two environments to be created. Will close this out.


Self-hosted builder (squashed)

I squashed this down to five commits, corresponding to three "features":

self-hosting
package customization
optional tzdata

in principle 2cc718a is a bugfix for 907dbc6 and 0d2fa44 is a bugfix for 38b6171; however, the intervening commits created context changes which makes reordering nontrivial, so I just left extra commits instead of risking manual mismerging.
The code is identical to my selfhosted-history branch except for the removal of a trailing space in builder/README.md.

Very cool. Thanks for the contribution!


Feat/remove aaron oscilator

Before submitting this PR, please make sure:

[ ] Your code builds clean without any errors or warnings
[ ] You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:
Remove aaron oscillator strategy based on the las poll
Tests performed by the developer:
Tips for QA testing:

aaron oscilator will be removed in 1.17.0 Release as part of this poll:
https://snapshot.org/#/hbot.eth/proposal/0x2f7646e3ad8db1746fc3158cbad8c1b46ee5736465becc5449a4341b2254b2c3
(strategies that's not voted with 100k HBOT will be removed from codebase.)


[Traefik Plugin Catalog] Plugin Analyzer has detected a problem.

The plugin was not imported into Traefik Plugin Catalog.
Cause:
failed to load readme: failed to get the readme file: GET https://api.github.com/repos/chahn/subfilter/readme?ref=v0.1.0: 404 Not Found []

Traefik Plugin Analyzer will restart when you will close this issue.
If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please contact us.

Fixed.


test-branch/execute-job/comment-from-wrong-user-on-pr/76eaf362-fd05-4482-bb8f-09f9b95bf2be

PR for testing 01628f2dbde12f6ff5c41dcec8869822e367cea5

/canonical/self-hosted-runners/run-workflows 01628f2dbde12f6ff5c41dcec8869822e367cea5


Fix phy_bbpll_en_usb compile error for ESP32-S2

Closes https://github.com/espressif/esp-idf/issues/12185
Tested in VSCodium:
Version: 1.84.2
Release: 23314

Verified: compilation with esp32s2 target before commit fails with expected error and succeeds with this commit.
Verified: affected blocks still effective when target is esp32s3 or esp32c3

 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.

@imoverclocked Thanks for the PR. We're actually already working on a fix for this issue internally. However, this PR is missing a couple of targets where the phy_bbpll_en_usb() function is defined.

@Dazza0 That’s great news!
Whatever is easiest, the PR is pretty trivial so I’m happy to close and let you carry on!


Train Glean with different input size

Hello! Thank you for your great work!
I noticed that the glean pre-trained models are used for 8x and 16x upscaling and the input size is very small (64, 16). I have two questions:

Can I train Glean on different input size and different upscale value without changing much the network architecture? (I tried but I get error)
Is it possible to test Glean on resolution different than the training data?

If yes, then can you please provide a short answer on how to do it? Thank you!

Hi, thank you for your interest in GLEAN and MMEditing.

You can specify different input sizes and output sizes. However, they are constrained by the StyleGAN you use. For instance, if you use the official human face StyleGAN, which outputs 1024x1024 images, your output size must be 1024, and the input size can only be either one of  4, 8, 16, 32, 64, 128, 256, 512.
Similar to above, the input size and output size are fixed, and it cannot output images with variable sizes.

Thank you for your reply! I want to change the network architecture and make it run on any input size. Do you have any advice on how to do it without hurting performance too much?

At its current design, it is non-trivial to adapt GLEAN to various sizes. For instance, since StyleGAN outputs fixed-size outputs, you may need to incorporate some other operations to alter the size of the features.
But I haven't tried it before, the performance may drop.


Fix CPU-only mode, add test for it

One of Triton's modes of operation is that the server works for CPU only (e.g. when somebody runs docker run without --gpus all option). This PR adds test for this mode of operation and, since it doesn't work, fixes the bug.
Relevant for the review:

The L0_identity_cpu test is copy-pasted L0_identity with one difference: DALI pipeline has device_id=None set.


Transform(s) to strip propTypes and displayName

I don't need propTypes or displayName in my production builds. I would like to remove them so my production code is less bloated.
There are at least two standalone NPM packages that strip propTypes, and I wasn't able to find a standalone package that strips displayName.
I don't want to maintain a package for this, but it would be cool if someone from the community were to write one or two plugins to strip propTypes and displayName, and have them integrated with babel-plugin-react-transform, of course.

If I understand react-transform correctly, it wraps the discovered components in code that is transforms the component at run time...so using this to strip out code might actually result in a slower/larger production build.

Yeah, this is not something we can do.

@mark-rushakoff : I was wondering about this myself, and just published a Babel plugin to the npm registry which does this, react-strip-proptypes.
Give it a shot!

FWIW, react-strip-proptypes trimmed my 3,960,805 byte build to 3,888,555 (1.8% smaller).


Use correct glob for filtering js files

In former versions of gulp-filter it was possible to specify a filepattern like *.js which does not work for gulp-filter-4.0.0 (where there are no files at all filtered with this pattern).

The watch task still crashes with a file not found error, but I have to little knowledge of gulp, so I cant tell why.

Can you explain why you've closed this? I cannot build the project without this change with gulp-filter-4, which is referenced in package.json. It only works with previous versions of gulp-filter or am I missing something?

Reopening... and checking.

So finally had a chance to look at this more closely.
I was hesitant to approve this because the build process with the map creation is precarious as it is. There are issues with repeating the build reliably due to the async nature of cleaning out files while
I've removed the clean task from the scripts task, which eliminates that issue. As a result I've been able to remove the wonky gulp-filter altogether which eliminates the need for above change.
Builds appear to be stable now. Let me know if this works for you.
071d79c
Thanks for sticking with this - I apologize for the non-responsiveness but I just haven't had time to look into this until now.
Aloha.

@RickStrahl looks good


Updates to example scripts

This PR makes the following updates to the example run scripts:

Saves all plot and table output a single folder
Saves a table with the full time series of several macro aggregates
Uses non-age specific tax functions (important given the high variation across age in functions estimated on recent versions of TaxData/Tax-Calculator (see Issue #96)

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

Project coverage is 75.35%. Comparing base (300912a) to head (6383224).
Report is 6 commits behind head on master.

Additional details and impacted files

@@           Coverage Diff           @@
##           master     #111   +/-   ##
=======================================
  Coverage   75.35%   75.35%
=======================================
  Files          11       11
  Lines         852      852
=======================================
  Hits          642      642
  Misses        210      210

Flag
Coverage Δ

unittests
75.35% <ø> (ø)

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


Code Editor line spacing too large even at zero

Godot version
4.0.2.stable
System information
Windows 10, NVIDIA GeForce GTX 1060 516.94
Issue description
Godot 3.x: line spacing 2 (can get even tighter at 1 or 0!)

Godot 4.x: line spacing 0 (not dense enough, and cannot get any tighter!)

Steps to reproduce

Minimal reproduction project
N/A

It may be depended on fonts used by the editor. In 3.x default font was Hack, in 4.x (as far as I remember) it used Jetbrains Mono.

It may also be due to #74528 that the value change did not take effect.

It may be depended on fonts used by the editor. In 3.x default font was Hack, in 4.x (as far as I remember) it used Jetbrains Mono.

@amonroejj is using a custom font in the screenshots, although they didn't specify which font it is (nor the font size used).

Font is ProFontWindows.ttf from https://tobiasjung.name/profont/ . Code font size is 12.

@amonroejj Did you try restarting the editor after changing the setting?
I guess the way line spacing is calculated has changed in 4.0 due to the TextServer refactoring. We could allow setting the line spacing setting as low as -4 to resolve this.

@Calinou Yes, the increased line spacing persists over relaunch & reboot.

While the editor is closed, try opening editor_settings-4.tres and change text_editor/appearance/whitespace/line_spacing's value to something like -4 to see if it works.

One offshoot of this is that the hotspot of the I-beam mouse cursor seems not to be centered vertically.

With the mouse pointer in this position, the expectation would be to put the cursor in the fourth line of visible text, but as seen in the screenshot, the actual result is that the cursor goes to the third line of visible text.

One offshoot of this is that the hotspot of the I-beam mouse cursor seems not to be centered vertically, so mouse click doesn't put the cursor where expected.

With the mouse pointer in this position, the expectation would be to put the cursor in the fourth line of visible text, but as seen in the screenshot, the actual result is that the cursor goes to the third line of visible text.

Seems to be a bug in TextEdit. The mouse click to select the line is not only related to get_line_height(), but also related to the height of caret (or font_size).

Something I just noticed regarding line spacing is that that the Output pane (green highlight) perfectly copes with tight line spacing while the code editor (yellow highlight) does not:

I'm not familiar enough with the internals of the editor to know whether different classes are used between these two controls in the GUI.


Force wrap() to always return a promise

SUMMARY
Ensure that wrap() will always return a Promise, even if the original method does not.
DETAILS
The documentation says that wrap() should be "passed a function that returns a promise".  If you want to avoid accidental exceptions breaking your promise chain, that means you should do something like this:
const Promise = require('bluebird');

limiter.wrap(Promise.method(() => {
    throw new Error('Oops, an accidental error in this method');
}));

My suggestion would be that the library either (A) intentionally rejects if the original function doesn't return a Promise (that would notify the user to fix the issue), or (B) do a Promise wrapper for the user, so they don't have to worry about it.  My preference is (B), so that's what is in this PR; it just ensures that this does what you want:
limiter.wrap(() => {
    throw new Error('I want to be a rejected promise');
}));

TESTS

Passed once locally and failed once locally, on some (unrelated?) tests 🤞
I added a test both for "resolved" and "rejected" values (the resolved case worked correctly even before my changes, the extra test is only to document the desired behavior).

Great PR once again. You're right that option B is the way to go and as you've noticed it already wraps successful results in a promise.
I'm merging this PR and it will be in the next release. I'm going to slightly rewrite your fix to ensure that schedule() benefits from this fix as well. Both are meant to have the same behavior.

Here's what I changed: https://github.com/SGrondin/bottleneck/commit/b82080f10c30dbf66aeb92d6cbe2f5c43aaaf409

Moved the try/catch into schedule
Used @Promise instead of Promise, because some users pass a custom Promise library such as Bluebird.
And in wrap:

# Went for
wrapped = (args...) -> schedule fn.bind(@), args...

# instead of
wrapped = (args...) -> schedule () => fn.apply(@, args)

They're both equivalent, but bind() should be more cacheable/optimizable for V8.
Thank you so much again for this PR.
It's not an easy codebase to work on between the tests that rely on precise timings and the language. In 2013 it made total sense to use CoffeeScript for this project (I mean look at how beautifully clear and concise v1 was!), but in 2019 the only significant benefits remaining are try/catch blocks being expressions and the function syntax. Oh and the code density, for this type of software it really helps to be able to look at everything at the same time.

I'll admit, I never really learned CoffeeScript - the whole indent-based blocks throws me off.  (Same with Python, respect the language but just don't want to write it.)
So feel free to take my attempts with a grain of salt, mostly I edit the coffee file and then check if the output in lib looks reasonable :).

mostly I edit the coffee file and then check if the output in lib looks reasonable :).

👍
And it's been released! v2.17.0


Feature/issue 344 asof join memory efficiency

PR checklist:

Did you run ClangFormat ?
Did you separate headers to a different section in existing community code base ?
Did you surround proton: starts/ends for new code in existing community code base ?

Please write user-readable short description of the changes:

Micro-benchmark shows 10x memory reduction for single row per chunk case.


Updating to recent google's shooping list

This module was initially broken. No list was retrieved due to failure during login.
*Updated puppeteer version
*Fixed login procedure by updating the queryselector of the login button

Thanks for your contribution.
By the way, I cannot maintain this module anymore. I want to take ownership of this module who has an interest. Do you have an interest?

Sure, I would like to take it.

Ok. Thanks.
First, if you have a forked branch still, first remove it. When the same repository exists from the same network, transferring doesn't work. Remove it and tell me then I'll transfer ownership.

I removed the fork. Thank you.

done. accept it.
Thanks again. Wish you good luck

@Gismo150 I'm having difficulty with getting past the authentication in Chromium. I made it headless = false and Google is blocking the sign-in with a statement of browser not secure. It's opening in a new instance of Chromium which doesn't match the chromium accessed on rpi from the navigation menu at the top (where my google account is already logged in and synced).
Any suggestions on a fix? I'm not wise enough to edit the node_helper.js file to get it open the correct chromium instance (or even as a new tab in a currently open window - that would allow it to continue the script without the need to sign in to the Google account)
Thanks

@Gismo150 I'm having difficulty with getting past the authentication in Chromium. I made it headless = false and Google is blocking the sign-in with a statement of browser not secure. It's opening in a new instance of Chromium which doesn't match the chromium accessed on rpi from the navigation menu at the top (where my google account is already logged in and synced).
Any suggestions on a fix? I'm not wise enough to edit the node_helper.js file to get it open the correct chromium instance (or even as a new tab in a currently open window - that would allow it to continue the script without the need to sign in to the Google account)
Thanks


Consistent libarchive version

Short description of the changes:
A conda environment containing dependencies from different channels (mantid, conda-forge, defaults) often leads to the following error when trying to build the conda package:
from libmambapy.bindings import *  # noqa: F401,F403
ImportError: libarchive.so.19: cannot open shared object file: No such file or directory

Long description of the changes:

Explicit requirements of libmamba and libarchive so that both will be installed from the same conda channel.
commented out build conda package in the unittest workflow. We should be testing the conda package even though we won't publish it

Check list for the pull request

[ ] I have read the [CONTRIBUTING]
[ ] I have read the [CODE_OF_CONDUCT]
[ ] I have added tests for my changes
[ ] I have updated the documentation accordingly

Check list for the reviewer

[ ] I have read the [CONTRIBUTING]
[ ] I have verified the proposed changes
[ ] best software practices

[ ] all internal functions have an underbar, as is python standard
[ ] clearly named variables (better to be verbose in variable names)
[ ] code comments explaining the intent of code blocks

[ ] All the tests are passing
[ ] The documentation is up to date
[ ] code comments added when explaining intent

Manual test for the reviewer

References

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

Project coverage is 3.70%. Comparing base (6306d9b) to head (8d4686c).

Additional details and impacted files
@@          Coverage Diff          @@
##            main     #13   +/-   ##
=====================================
  Coverage   3.70%   3.70%
=====================================
  Files          5       5
  Lines        135     135
=====================================
  Hits           5       5
  Misses       130     130

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


Stuck on Killing Discord

As the title say, when I press the button ''Install'', all I get is a blinking > Killing Discord.
How do I fix this?

Hi, there are two installers, have you tried both?
MicaDiscord-1.1.7-setup.exe
MicaDiscord-1.1.7.exe

I have tried both yes. Same issue persists on both of the installers unfortunately. Any idea how to solve this? I'd really love to use the amazing theme of yours.

No, I tested on another PC, I had the same error but when I installed for all users with MicaDiscord-1.1.7-setup.exe, it worked. I will look more closely at this tomorrow because today I am not at home.

I'll try that aswell when I come home today, and get back to you here if it works.

I just did a new update, it's now fixed


fix 725

when LoadResults fails the job becomes indefinitely stuck 'in progress'
while there also make only jobs in stage 1 and 2 trigger scaling up
of gsnap and rapsearch tiers

This pasts tests through my local environment.


the lost document

Hello ，thanks to the code release.But I cannot find the models and coco14 document.I am looking for the ones .thank you.
Best wishes to you

Please download the provided data and weights, and ln -s after decompression.


Custom Exporter Angular 14

I updated to Angular 14 and update mat-table-exporter to the newest version and now I'm getting this error:
`Error: src/app/inventory/inventory.component.ts:166:27 - error TS2554: Expected 1 arguments, but got 0.
166     this.customExporter = new CustomExporter();
~~~~~~~~~~~~~~~~~~~~
node_modules/cdk-table-exporter/lib/services/exporters/csv-exporter.service.d.ts:8:17
8     constructor(sheetJsHelper: SheetjsHelperService);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An argument for 'sheetJsHelper' was not provided.`
Is there a fix for this? Please advise.

Having the same issue. Awaiting for resolution or work around. Thanks!

@HalitTalha looks like cdk-table-exporter is using the dependency "xlsx": "^0.17.2" and the newest version is"xlsx": "^0.18.5". If you update it to the new one it should support angular 14 & 15.

v14 support released

Hello friends,
I'm sorry to comment on thus issue but I find it weir that I'm facing the same problem although I'm on the v14.0.2 (using Angular 14) but I get this error (see SS below) when I want to instantiate the custom exporter that extends the CsvExporterService from 'mat-table-exporter'
This is my custom class :
import {Options, CsvExporterService} from 'mat-table-exporter';

export class CustomCsvExporter extends CsvExporterService {

  // Override
  public createContent (rows: Array<any>, options?: Options): any {
    console.error(rows)
    return super.createContent (rows, options);
  }
}

And this is the error I get :( :

The related dependencies in my package.json are
"dependencies": {
    "@angular-material-components/datetime-picker": "^8.0.0",
    "@angular/animations": "^14.2.11",
    "@angular/cdk": "^14.2.7",
    "@angular/common": "^14.2.11",
    "@angular/compiler": "^14.2.11",
    "@angular/core": "^14.2.11",
    "@angular/flex-layout": "^14.0.0-beta.41",
    "@angular/forms": "^14.2.11",
    "@angular/material": "^14.2.7",
    "@angular/material-moment-adapter": "^14.2.7",
    "@angular/platform-browser": "^14.2.11",
    "@angular/platform-browser-dynamic": "^14.2.11",
    "@angular/router": "^14.2.11",
    ...
    "mat-table-exporter": "^14.0.2",
    ...
}

Any help is much appreciated and if you need any additional info I'll be happy to provide.
And thank you so much @HalitTalha for the amazing work on these libraries, Very nice work 👍 !

v14 support released

@HalitTalha I am facing the same issue with angular 15. Could you please suggest what to do get rid of this dependency on SheetjsHelperService?

@stokkup-dev how did you get this error resolved? Were you able to move forward with a CustomExporter?


Prefix not working

Not sure If I have misuderstood, but the "--prefix" flag doesn't seem to be operating as I would expect.
Describe the bug
The prefix is not added to the displayed version.
To Reproduce

Install comvco v0.3.10 (2022-04-24)
run convco version --prefix "HELLO-"
run convco version --prefix "HELLO-" --bump

Expected behavior
A clear and concise description of what you expected to happen.
Current version should be
HELLO-0.0.0
Next version should be
HELLO-0.0.1
System (please complete the following information):

OS: Debian
Version: Bullseye

I'm also having the same issue in GitLab CI and was able to reproduce locally.
Additional context
Here is an example git commit history of a repo I'm using
Author: Git Bot<EMAIL_ADDRESS>Date:   Fri Jun 24 04:43:59 2022 +0000

    fix: Fixed a bug in the widget collector

commit a1d032cb7485a535254f180f5488484110be1623
Author: Git Bot<EMAIL_ADDRESS>Date:   Fri Jun 24 01:40:55 2022 +0000

    fix(api)!: Fixed a bug

commit 49ee67ce3f9b1d8403e15b8fca9fa7b0db6923e5
Author: Git Bot<EMAIL_ADDRESS>Date:   Fri Jun 24 01:30:48 2022 +0000

    chore: did a thing

commit ed3a69fa066d33a3314116e081e7c517e1c4bc3e
Author: Git Bot<EMAIL_ADDRESS>Date:   Fri Jun 24 01:10:51 2022 +0000

    feat: Initial release

The prefix is only used to find the git tags containing the semantic version. A prefix is not part of the semantic version. Maybe a new flag --print-prefix could be added.

Thanks for the explanation, makes sense now.


Sync with dev (new)

@gfursin This PR looks fine. Once merged, we can rewrite the history removing large blobs. Without history it is (saved here )
arjunsuresh@Arjuns-MacBook-Pro cm4mlops_temp % du -sh
 12M	.

With history it is currently around 40M. It can be made to <20M once we remove some large files from the git history. Anyway I don't think we need to worry about git history (unless it is huge) when talking about repo size as usually we talk about the "zip download" excluding the history.


Use dynamic storage instance for hooks ?

Hello,
My app has a demo mode, and I would like to use a different storage instance in order to simplify the way to clean it.
I tried this implementation but it's not responsive and things are unsync, maybe this is not-op ?
const useMmkvList = () => {
  const defaultStorage = useMMKV()
  const demoStorage = useMMKV({ id: "demo" })
  const [env, _] = useMMKVObject("env")

  useMMKVObject("list", env.isDemoMode ? demoStorage : defaultStorage)
}

It looks like I need to re-render a second time after the env is updated.
EDIT : I've made a repo with my example
Thanks for your help.

Hey! I see!
Currently we update the value when the key changes, or when a new value is set (listener), but not if the mmkv instance changes. We need to add that logic as well somehow https://github.com/mrousavy/react-native-mmkv/blob/ab6584a814f9fb48430792ea358873310d3eda8a/src/hooks.ts#L85-L102

Thanks for pointing out the code ! I'll try to make you a PR :)


Fix stdlib test modules by using ballerina-test-utils dependency for jBallerina based tests

$subject.

Codecov Report

Merging #15401 into master will increase coverage by 1.26%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master   #15401      +/-   ##
============================================
+ Coverage      20.7%   21.97%   +1.26%
- Complexity     4932     6129    +1197
============================================
  Files          1418     1800     +382
  Lines         72600    84517   +11917
  Branches      10514    12145    +1631
============================================
+ Hits          15035    18576    +3541
- Misses        54843    62923    +8080
- Partials       2722     3018     +296

Impacted Files
Coverage Δ
Complexity Δ

...llerinalang/util/BackendCodeGeneratorProvider.java
0% <0%> (ø)
0 <0> (?)

...g/observe/metrics/extension/defaultimpl/Clock.java

.../metrics/extension/defaultimpl/DefaultCounter.java

...etrics/extension/defaultimpl/RollingHistogram.java

...rics/extension/defaultimpl/DefaultPolledGauge.java

...ve/metrics/extension/defaultimpl/DefaultGauge.java

...s/extension/defaultimpl/DefaultMetricProvider.java

...llerinalang/net/http/nativeimpl/session/GetId.java
0% <0%> (ø)
0% <0%> (?)

...va/org/ballerinalang/net/grpc/OutboundMessage.java
0% <0%> (ø)
0% <0%> (?)

...inalang/net/grpc/nativeimpl/headers/RemoveAll.java
14.28% <0%> (ø)
1% <0%> (?)

... and 385 more

Continue to review full report at Codecov.

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


How to handle "Accessing resource attributes before async attributes settled" errors

[x] This only affects the JavaScript OpenTelemetry library
[ ] This may affect other libraries, but I would like to get opinions here first

In the logs of one of our applications I see the following error from time to time:
Accessing resource attributes before async attributes settled
I took a look into https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-resources/src/Resource.ts#L98 which I assume is the code line that writes this error.
I'm not sure what to do with this error. Is is necessary to take an action or can this error be ignored? There isn't really much information about the origin of this error so I'm not sure how to find the root problem/how to debug this.
We are using the following packages:

"@opentelemetry/api": "1.8.0",
"@opentelemetry/exporter-trace-otlp-http": "0.50.0",
"@opentelemetry/instrumentation-http": "0.50.0",
"@opentelemetry/resources": "1.23.0",
"@opentelemetry/sdk-node": "0.50.0",
"@opentelemetry/semantic-conventions": "1.23.0",

In our instrumentation create a new SDK using the following resource:
resource: Resource.default().merge(
                new Resource({
                    [SEMRESATTRS_SERVICE_NAME]: 'our-service',
                })
            )

Maybe someone has an idea how to handle this.

I'm also seeing this message. My otel config is here: https://gist.github.com/tmokmss/b6b0d639658161cd28519a65992866f9
packages versions are same as the OP.

Encountered the same issue and wrote a simple workaround while awaiting the actual fix to land:
import {
  Detector,
  DetectorSync,
  IResource,
  ResourceDetectionConfig,
  envDetectorSync,
  hostDetectorSync,
  processDetectorSync,
} from "@opentelemetry/resources"

function awaitAttributes(detector: DetectorSync): Detector {
  return {
    async detect(config?: ResourceDetectionConfig): Promise<IResource> {
      const resource = detector.detect(config)
      await resource.waitForAsyncAttributes?.()

      return resource
    },
  }
}

const sdk = new opentelemetry.NodeSDK({
  // ...
  resourceDetectors: [
    awaitAttributes(envDetectorSync),
    awaitAttributes(processDetectorSync),
    awaitAttributes(hostDetectorSync),
  ],
})

@timosaikkonen Your solution was really helpful!

I too faced same issue in my application , when I removed the below environment definition , the error is NO more appears .
        - name: OTEL_LOG_LEVEL
          value: info

Anyone know the significance of this parameter and why error appear when I enable this on deployment ?
Thanks

Not stale.
Since the Detector type is deprecated in favor of DetectorSync, the current workaround may break in future releases.

It would be helpful if someone can share a stack trace of what is triggering the log message.
OTel SDK components should already be awaiting waitForAsyncAttributes() before accessing the resource attributes (examples), which should avoid the log message. If that's not the case, stack trace would be helpful as it may be a bug. Otherwise, it may be log spam.
If this is happening in your own code, just await waitForAsyncAttributes() before accessing the resource attributes.


[Bug] GPU OOM when restoring optimizer state

When loading a model trained by graphstorm on the same hardware, I run into GPU OOM error:
Traceback (most recent call last):
  File "/develop/graphstorm/python/graphstorm/run/gsgnn_np/gsgnn_np.py", line 167, in <module>
    main(args)
  File "/develop/graphstorm/python/graphstorm/run/gsgnn_np/gsgnn_np.py", line 85, in main
    trainer.restore_model(model_path=config.restore_model_path,
  File "/develop/graphstorm/python/graphstorm/trainer/gsgnn_trainer.py", line 342, in restore_model
    self._optimizer.load_opt_state(model_path, self._model.device)
  File "/develop/graphstorm/python/graphstorm/model/gnn.py", line 107, in load_opt_state
    load_opt_state(path, self.dense_opts, self.lm_opts, self.sparse_opts)
  File "/develop/graphstorm/python/graphstorm/model/utils.py", line 596, in load_opt_state
    checkpoint = th.load(os.path.join(model_path, 'optimizers.bin'))
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 789, in load
    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 1131, in _load
    result = unpickler.load()
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 1101, in persistent_load
    load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 1083, in load_tensor
    wrap_storage=restore_location(storage, location),
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 215, in default_restore_location
    result = fn(storage, location)
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 187, in _cuda_deserialize
    return obj.cuda(device)
  File "/usr/local/lib/python3.8/dist-packages/torch/_utils.py", line 80, in _cuda
    untyped_storage = torch.UntypedStorage(
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 22.19 GiB total capacity; 1.90 GiB already allocated; 12.50 MiB free; 1.91 GiB reserved in total by PyTorch) If reserved memory is >> all
ocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Adding map_location='cpu' fixed the bug.


Cluster orc - service resolution table query resolution

Create the Service Balancer component for the Cluster Orchestrator to resolve the interest registration and table queries from the Node manager and

Exposed: /api/job/<job_name>/instances
Get all the instances of a job given the complete name in underscore notation
Example:  /api/job/app1_default_s1_default/instances
Exposed: /api/job/ip/<service_ip>/instances
 Get all the instances of a job given a Service IP in 172_30_x_y notation


Git merge / commit -a / focus back the integrated terminal

I'm using vscode for editing commit messages and merging:
.gitconfig
[diff]
    tool = default-difftool
[difftool "default-difftool"]
    cmd = code --wait --reuse-window --diff $LOCAL $REMOTE

[merge]
    tool = vscode
[mergetool "vscode"]
    cmd = code --wait --reuse-window $MERGED

After editing the commit and closing the commit editing / merge tab is it possible focus back the integrated terminal? I had the same feature in my vim
[mergetool "vimdiff"]
    cmd = mvim -f --nomru -c \"Gdiff | au VimLeave * !open -a Terminal\" $MERGED
    keepbackup = false

I'm not sure there is a nice way to do this, @bpasero any ideas?

@Tyriar I am actually also hitting this quite often... not sure how to best fix this. We do have code in place here to delete the --waitMarkerFile, so we are aware of the editor closing that was triggered via a --wait invocation.
But bottom line is that we would need to know that the operation was triggered from the integrated terminal to begin with...

@bpasero there's this:
❯ env | grep TERM_PROGRAM
TERM_PROGRAM=vscode
TERM_PROGRAM_VERSION=1.21.0-insider

They may not be 100% reliable though as an external terminal could have been launched by the terminal or code could be run from code-insiders 😄. Maybe the off chance of one of those happening is worth forcing focus?
Another way you could do this is track the PID it was launched from on the CLI/main size and see if it's a child process of the terminal. Seems like a lot of work for such a small thing, we also only track the terminal process tree on Windows currently.

@Tyriar it is a bit of a hack but the terminal could also listen to the editor closing and checking if the file closed was part of configuration.filesToWait and then just put focus back to the terminal if:

the terminal is open
the terminal just had focus (?)

@bpasero it's not so easy to know that the terminal launched the code CLI, it may be down the track when we track the process tree more though.
When an editor is closed that was launched via --wait, can we track the TERM_PROGRAM and TERM_PROGRAM_VERSION and focus the terminal of the same renderer if they match?

to clarify what I mean - integrated terminal - terminal which is integrated to the editor
for example from vscode terminal:
git add .
git commit -a

I'm editing a commit -> I'm pressing save and close the tab
Integrated terminal should be focused back

@Tyriar yeah but this has to happen from the terminal layer, cannot happen from the workbench to avoid layer breakage.
Are you saying that these environment variables are passed to the instance of VS Code that is starting from the integrated terminal? We would probably need to wire these in through lots of places on the main side to eventually reach the renderer.

@bpasero when code is launched via the CLI it inherits the environment of the shell which contains these vars.
Ok, let's go with listening to editor close and checking configuration.filesToWait as you suggest. That is definitely nicer than wiring the values through. The listening should probably be done in https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts

@bpasero @Tyriar Is it alright to watch for waitMarkerFile deletion, since workbench will delete the marker file to signal when editing is done? See workbench.ts

@captainrdubb try to use code.sh -r that should force to reuse the last active instance.
I think there are some things missing from your change:

only do this listening if the marker file was opened from the integrated terminal
handle the opening of the marker file within the running instance, in that case the request will come in via vscode:openFiles

@captainrdubb I think this is not as straight forward for a pull request so I went ahead to implement this via https://github.com/Microsoft/vscode/pull/45523
I took your idea about watching for the marker file to get deleted, thanks for that 👍

@bpasero on to the next one :wink:


Confusing button preselected in Inline Suggestion Hover

Testing #172029

Inside a nested block like below
if (condition) {
    |
}

Pressing tab or delete multiple times, the buttons in the toolbar are selected in an unpredictable fashion, sometimes it's "Accept", sometimes it's "Accept Part".,

Could this be your mouse cursor randomly being there?

@hediet this is very likely. Good catch.


New version: Jaynes v0.1.21

Registering package: Jaynes
Repository: https://github.com/femtomc/Jaynes.jl
Created by: @femtomc
Version: v0.1.21
Commit: 3f847c5db864cb846e2a9b779eaa6ea1b31f034f
Reviewed by: @femtomc
Reference: https://github.com/femtomc/Jaynes.jl/issues/25#issuecomment-660149307

Hopefully this automatically closes?

Hopefully this automatically closes?

No


remove print info

This change is

Coverage decreased (-0.2%) to 89.565% when pulling 4237e730169b654c69b176bb43445c4b49517a4a on yarsanich:a258001251842882_refactoring into 6323d1401bcb23d5dae604ad2a58f149b05bb9ad on openprocurement:a258001251842882_refactoring.


VQE on hydrogen molecule

Purpose
Demo of the VQE algorithm on the hydrogen molecule
Details
We use hierarqcal to craft the UCCSD ansatz to perform VQE on hydrogen molecule using Qiskit. Ref: PennyLane. This PR resolves #29.

Hey @Gopal-Dahale, sorry for only getting around to this until now. I just finished going through the PR, I really like it, great stuff! It's the exact kind of tutorial that I wanted.
Going through your code and trying to create the patterns myself helped me spot some necessary changes the package needs. Specifically, to provide exact parameter values to a unitary when initialized, and arity-1 functionality for the masking primitive. I have some suggestions on how we create the patterns, especially I want to use the masking primitive more. I've create a new branch, called feature/chemistry_example, where I added the above mentioned functionality. I suggest we change the PR to this branch, then we can merge before the hackathon ends and flesh out the final details.
Below I have some suggestions for the single and double fermionic pattern creations and then we can discuss what the best way to add it to the tutorial. As I mentioned in the issue, my knowledge on quantum chemistry is minimal so I'm not sure if my variable names are correct. For the FermionicSingleExcitation I suggest we use the masking primitive in the following way:
from hierarqcal import Qinit, Qcycle, Qunitary, Qmask, Qunmask

n = 3
# Create masking motifs, that makes the middle of circuit unavailable
mask_middle = Qmask(pattern="0" + "1" * (n - 2) + "0")
unmask_middle = Qunmask("previous")

# Create ladder motif
cnot_ladder = Qcycle(mapping=Qunitary("CNOT()^01"), boundary="open")
cnot_ladder_r = Qcycle(
    mapping=Qunitary("CNOT()^01"), edge_order=range(n, 1, -1), boundary="open"
)
ladder_motif = (
    cnot_ladder + Qcycle(offset=n - 1, mapping=Qunitary("Rz(x)^0")) + cnot_ladder_r
)

# Create excitation motifs
excitation1 = (
    mask_middle
    + Qcycle(mapping=Qunitary("RX(x)^0;H()^1", symbols=[-np.pi / 2]))
    + unmask_middle
    + ladder_motif
    + mask_middle
    + Qcycle(mapping=Qunitary("RX(x)^0;H()^1", symbols=[np.pi / 2]))
    + unmask_middle
)
excitation2 = (
    mask_middle
    + Qcycle(mapping=Qunitary("H()^0;RX(x1)^1", symbols=[-np.pi / 2]))
    + unmask_middle
    + ladder_motif
    + mask_middle
    + Qcycle(mapping=Qunitary("H()^0;RX(x1)^1", symbols=[np.pi / 2]))
    + unmask_middle
)

single_fermionic = excitation1 + excitation2

So the n=1 case is different from yours, so I'm not sure if that's an issue (if 1 qubit in this example makes sense). There's still some potential for improvement, but I like that this reads off the pattern you see, i.e. we mask the middle of the circuit, add the H and R layer, then unmask then do the ladder and so on. Let me know what you think!
Then for the FermionicDoubleExcitation:
 n = 4
r_locations = ["0010", "1011", "0111", "0001", "1000", "0100", "1110", "1101"]
rxn = Qunitary("RX(x)^0", symbols=[-np.pi / 2])
rxp = Qunitary("RX(x)^0", symbols=[np.pi / 2])
hadamards = Qcycle(mapping=Qunitary("H()^0"), boundary="open")

cnot_ladder = Qcycle(mapping=Qunitary("CNOT()^01"), boundary="open")
cnot_ladder_r = Qcycle(
    mapping=Qunitary("CNOT()^01"), edge_order=range(n, 1, -1), boundary="open"
)
ladder_motif = (
    cnot_ladder + Qcycle(offset=n - 1, mapping=Qunitary("Rz(x)^0")) + cnot_ladder_r
)

h_and_rs = [
    (
        Qmask(pattern=r_loc, mapping=rxn) + hadamards + Qunmask(r_loc),
        Qmask(pattern=r_loc, mapping=rxp) + hadamards + Qunmask(r_loc),
    )
    for r_loc in r_locations
]
excitations = [l1 + ladder_motif + l2 for l1, l2 in h_and_rs]
double_single_fermionic = reduce(lambda a, b: a + b, excitations)

I liked your use of reduce, and tried to combine that with the use of masks. The r_location string I use is inverted from yours, as it's the qubits where R must go and then makes those qubits unavailable, then just add a cycle of hadamards.
One question about these strings: Is there a pattern? i.e. can we generalize it for n qubits?
To create the final ansatz, we can add everything this way:
hierq = Qinit(n)+double_fermionic+Qmask("0001") +single_fermionic+ Qunmask("1111")+Qmask("1000") + single_fermionic
hierq(backend="qiskit", barriers=False).draw("mpl")

Then one possibility of specifying symbols:
factors = [-1 / 8] * 4 + [1 / 8] * 4 + [1 / 2] + [-1 / 2] + [1 / 2] + [-1 / 2]
symbols = []
i = 0
for el in hierq.get_symbols():
    if isinstance(el, Parameter):
        symbols += [el * factors[i]]
        i += 1
    else:
        symbols += [el]
hierq.set_symbols(symbols)
az = hierq(backend="qiskit", barriers=False)

The final circuit can then be created:
ansatz = QuantumCircuit(4)
ansatz.compose(hf_state, inplace=True)
ansatz.barrier()
ansatz.compose(az,inplace=True)
ansatz.draw('mpl', fold=50)

And the rest of the code I tested with the simulation and it seems to work. When you add/ try it out be sure to pull and switch to the new feature/chemistry_example branch as that is where I changed some core.py functionality
Let me know what you think about building the patterns this way, and if you see even further "automation"/ "simplification". I think we're close to something awesome!
What I'm going to try and do on this branch is add some different functionality for specifying symbols/Paramaters, so that that factors part is less hard coded. I also need to test the changes I made :D  (you'll see there's two commits)
But we can merge the PR (to this branch) and close the issue before that (for the hackathon), I think just try and incorporate the use of masking the way I did above. But I'm happy to assign the issue to you, you deserve the bounty :)
I'm available for a chat tomorrow if you want me to talk you through some of the code I just shared, let me know if you're interested!

One question about these strings: Is there a pattern? i.e. can we generalize it for n qubits?

As per the docs of PennyLane, UCCSD makes use of the Fermionic single and double excitations. For single, there have to be at least 2 wires and for double at least 4. I can add an assertion for this. The ansatz can have any number of qubits but the single qubits gates are placed on 2 (single) and 4('double`) wires only.
Question: You want me to pull and switch to feature/chemistry_example and then update the code and then the PR should target to feature/chemistry_example branch of hierarqcal?

As per the docs of PennyLane, UCCSD makes use of the Fermionic single and double excitations. For single, there have to be at least 2 wires and for double at least 4. I can add an assertion for this. The ansatz can have any number of qubits but the single qubits gates are placed on 2 (single) and 4(double) wires only.

Cool thanks, no need to add an assertion, just wanted to make sure I understand. So the strings such as "1101" will always be like that, irrespective the number of qubits?

Question: You want me to pull and switch to feature/chemistry_example and then update the code and then the PR should target to feature/chemistry_example branch of hierarqcal?

Yes, exactly! One other thing I forgot to mention is to just specify at the top of the notebook the requirements for running it. I think it's just these:
pip install qiskit[nature]
pip install --upgrade pyscf

So the strings such as "1101" will always be like that, irrespective the number of qubits?

Yes. If you look at the docs of FermionicDoubleExcitation, they code for layers 1 to 8 in separate functions but the single qubits gates have fixed pattern and that's why I made a list of strings to ease of iteration.

Hey @Gopal-Dahale,
I refined some things for the double and single ansatz creation. I've added a new commit to that feature/quantum_chemistry branch, to create the ansatzes this way, you just need to pull the new code.
I think we should create the ansatze something along the following lines:
Single:
from hierarqcal import Qinit, Qcycle, Qunitary, Qmask, Qunmask
# Motif to mask all qubits except outer two
mask_middle = Qmask(pattern="0!0")
unmask = Qunmask("previous")
hrx_layer = mask_middle + Qcycle(mapping=Qunitary("RX(x)^0;H()^1")) + unmask
hrx_layer_r = mask_middle + Qcycle(mapping=Qunitary("RX(x)^1;H()^0")) + unmask

# Create ladder motif
cnot_ladder = Qcycle(mapping=Qunitary("CNOT()^01"), boundary="open")
cnot_ladder_r = Qcycle(mapping=Qunitary("CNOT()^01"), edge_order=[-1], boundary="open")
rz_last = Qmask("*1", mapping = Qunitary("Rz(x)^0")) + Qunmask("previous") # TODO replace with Qpivot once it's ready
ladder = cnot_ladder + rz_last + cnot_ladder_r

# Create two excitations TODO term?
excitation1 = hrx_layer + ladder + hrx_layer
excitation2 = hrx_layer_r + ladder + hrx_layer_r

plot
single_fermionic = excitation1 + excitation2
hierq = Qinit(5) + single_fermionic # you can change to Qinit(3) or Qinit(4)
hierq(backend="qiskit", barriers=False).draw("mpl")

Double:
r_locations = ["0010", "1011", "0111", "0001", "1000", "0100", "1110", "1101"]
rx = Qunitary("RX(x)^0")
hadamards = Qcycle(mapping=Qunitary("H()^0"), boundary="open")
h_and_rs = [Qmask(pattern=r_loc, mapping=rx) + hadamards + Qunmask(r_loc) for r_loc in r_locations]
excitations = [layer + ladder + layer for layer in h_and_rs]
double_fermionic = reduce(lambda a, b: a + b, excitations)

Both:
nq = 4
hierq = Qinit(nq)+double_fermionic+Qmask("0001") +single_fermionic+ Qunmask("1111")+Qmask("1000") + single_fermionic
hierq(backend="qiskit", barriers=False).draw("mpl")

What I like about this is that it reads easily and uses many of the package's functionality. It also reuses "motifs", so we only define what a ladder is once and then we can use it from there. We also use Qinit only use once, so the ladders and masking is all based on what happens before. You'll see I didn't provide any symbols/parameters. I think the easiest is just to specify them manually for now in a block along the lines:
symbols = # correct symbols in order
hierq.set_symbols(symbols)
az = hierq(backend="qiskit", barriers=False)


Illegal ladybug move

I don't know if this is helpful or not, but nokamute tried to play an illegal move against me which mzingaviewer refused, but here is the start/end of the gamelog (which is too long to post in its entirety) and pgn anyway.
Also, amazing work with nokamute. It is definitely very strong! ⭐
id nokamute 0.2.3
Mosquito;Ladybug;Pillbug
ok
options
Aggression;int;3;3;1;5
BackgroundPondering;bool;False;False
NumThreads;int;4;4;1;4
RandomOpening;bool;False;False
TableSizeMiB;int;100;100;1;256
Verbose;bool;False;False
ok
options set Aggression 1
Aggression;int;1;3;1;5
ok
options set BackgroundPondering True
BackgroundPondering;bool;True;False
ok
newgame Base+MLP
Base+MLP;NotStarted;White[1]
ok
validmoves
wG1;wS1;wA1;wB1;wM;wL;wP
ok
bestmove time 00:00:30
wG1
ok
play wG1

...

play bB1 wB1
Base+MLP;InProgress;White[15];wG1;bP wG1-;wA1 \wG1;bB1 bP\;wQ -wA1;bQ bB1-;wP wQ\;bA1 \bQ;wA1 bA1/;bG1 bB1\;wM \wA1;bS1 /bG1;wA2 \wG1;bA2 /bB1;wA3 wP\;bA2 \wM;wA3 \bA2;bB1 bP;wS1 wA1/;bS1 bQ-;wA2 -bG1;bB1 wG1;wB1 /wQ;bM \bP;wL -wA3;bM bB1\;wB1 \bB1;bB1 wB1
ok
validmoves
wL bA2/;wL wL\;wL \wS1;wL /bA2;wS1 wA3/;wS1 bS1/;wQ \bB1;wQ /wQ;wQ /wP;wQ wP\;wP /wQ;wP wP\;wA2 \wL;wA2 \wA3;wA2 wA3/;wA2 -wL;wA2 bA2/;wA2 /wL;wA2 wL\;wA2 \wS1;wA2 wS1/;wA2 \wQ;wA2 \bB1;wA2 bB1/;wA2 /bA2;wA2 wS1-;wA2 -wQ;wA2 \bP;wA2 /wM;wA2 wS1\;wA2 /wQ;wA2 wA1\;wA2 bS1/;wA2 /wP;wA2 wP\;wA2 bS1-;wA2 /bM;wA2 bQ\;wA2 bS1\;wA2 wA2\;wA2 bG1\;wG2 /wA2;wS2 /wA2;wB2 /wA2;wG2 /wP;wS2 /wP;wB2 /wP;wG2 /wQ;wS2 /wQ;wB2 /wQ;wG2 \wQ;wS2 \wQ;wB2 \wQ;wG2 -wQ;wS2 -wQ;wB2 -wQ;wG2 wS1\;wS2 wS1\;wB2 wS1\;wG2 wS1/;wS2 wS1/;wB2 wS1/;wG2 wS1-;wS2 wS1-;wB2 wS1-;wG2 \wA3;wS2 \wA3;wB2 \wA3;wG2 wA3/;wS2 wA3/;wB2 wA3/;wG2 \wL;wS2 \wL;wB2 \wL;wG2 /wL;wS2 /wL;wB2 /wL;wG2 -wL;wS2 -wL;wB2 -wL
ok
bestmove time 00:00:30
wL wL\
ok
play wL wG1\
invalidmove That is not a valid move
ok

And game pgn up to the illegal move wL wG1\

[GameType "Base+MLP"]
[Date "2022.12.15"]
[Event ""]
[Site ""]
[Round ""]
[White "nokamute 0.2.3"]
[Black "paber"]
[Result "InProgress"]

wG1
bP wG1-
wA1 \wG1
bB1 bP\
wQ -wA1
bQ bB1-
wP wQ\
bA1 \bQ
wA1 bA1/
bG1 bB1\
wM \wA1
bS1 /bG1
wA2 \wG1
bA2 /bB1
wA3 wP\
bA2 \wM
wA3 \bA2
bB1 bP
wS1 wA1/
bS1 bQ-
wA2 -bG1
bB1 wG1
wB1 /wQ
bM \bP
wL -wA3
bM bB1\
wB1 \bB1
bB1 wB1

Looked a bit more and I guess this issue is not an issue with nokamute, but with mzingaviewer. It looks like the attempted move was wL wL\ which is legal, but somehow I guess mzingaviewer translated that to wL wG1\. If I understand how the engine-viewer communication works. When I reloaded the pgn and played from there it did make wL wL\ correctly so I guess nothing more to say here ^^.
And again thanks for contributing by making a hive bot :D.

Thanks for filing a bug! I agree that this doesn't look reproducible from the nokamute side. Maybe going through this game log can reproduce on MzingaViewer?


teammate code review

you did a great job in implementing all the requirements of the project.
to highlight some:
-Good readme file
-clean code
now it is time to merge 👍
happy coding !!
cheers!!

Thank a lot.


Fix code scanning alert - Polynomial regular expression used on uncontrolled data

Tracking issue for:

[ ] https://github.com/melissamforbs/docs/security/code-scanning/23

git fetch origin
git checkout 142-fix-code-scanning-alert-polynomial-regular-expression-used-on-uncontrolled-data


Add ability to prevent auto-update

[x] auto-update attribute

[x] Docs
[x] Test

Added in 1162df5


v4l2loopback: 0.12.3 -> 0.12.4

Motivation for this change
New upstream release. Fixes build errors with kernel 5.6.
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

blocked for me by #84687

@GrahamcOfBorg build linuxPackages_latest.v4l2loopback


Add async version of nor flash

Add async version of the nor_flash traits, that can be used in an
async context. In the same way as embedded_hal_async in relation to
embedded_hal, the traits are stored in a separate crate, with the
intention of moving to the main crate once the async GAT feature is part
of Rust stable.

GATs LGTM. There's already a working impl here btw https://github.com/embassy-rs/nrf-softdevice/blob/master/nrf-softdevice/src/flash.rs
AsyncReadNorFlash brings its own type Error. IMO it's nicer if we force async+blocking traits to have the same Error type if implemented on the same struct, this makes life easier for driver authors if they want to mix async+blocking (only one error type, without having to write any bounds). This is the way the traits in the upcoming embedded-hal-async work:

There's an ErrorType trait wit just the type Error: https://github.com/rust-embedded/embedded-hal/blob/master/src/i2c.rs#L235
Blocking trait requires it: https://github.com/rust-embedded/embedded-hal/blob/master/src/i2c.rs#L276
Async trait requries it: https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal-async/src/i2c.rs#L26

@MathiasKoch @Dirbaio I've added the ErrorType trait, and the documentation fix.

@MathiasKoch Whats your thought on the next release. Would it be possible to get a release of embedded-storage and async-embedded-storage with this in?

I would have absolutely no issue with a new release. Could you draft one? Changelog and version bump

I'd be happy to!


Add an ABI Generator to AVM tooling

We have a tool that reads AVM contracts, generates an ABI file for them, and modifies classes based on certain annotations. This item tracks the integration of that tool into the new tooling module created as part of issue #354.
The proposed workflow is as follows:

Move the ABI Generator into the existing tooling module, and update all AVM-related dependencies. This might require modification / reimplementation of some functionality. Move its tests into a new test folder.

Incorporate the tool into the AvmRule pipeline. Duplicate some of the existing test contracts, and take out their main() and add the new annotations.

Move the ABI related functionality out of the API and into userlib.

Create new example contracts, unit tests, and documentation for this tool.

Great!


Numerous nameof(GetByID) that should be nameof(CreateAsync)

Description
Found a likely typo in examples. Functions not named GetById (like CreateAsync) were using nameof(GetById).
`public async Task CreateAsync(Product product)
{
if (product.Description.Contains("XYZ Widget"))
{
return Results.BadRequest();
}
_productContext.Products.Add(product);
await _productContext.SaveChangesAsync();

var location = Url.Action(nameof(**GetById**), new { id = product.Id }) ?? $"/{product.Id}";
return Results.Created(location, product);

}`
Page URL
https://learn.microsoft.com/en-us/aspnet/core/web-api/action-return-types?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/web-api/action-return-types.md
Document ID
b51bc104-a6e2-b21f-8362-45cee22e8c22
Article author
@tdykstra

@plblum Thanks for reporting that, the copy/paste errors have been corrected.


Crashed trying to use an FFI function that takes multiple arrays

crash log:
The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: C:\Users\███\.cargo\registry\src\index.crates.io-6f17d22bba15001f\uiua-0.9.2\src\ffi.rs:604

Backtrace omitted.

Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Error: The interpreter has crashed!
  Hooray! You found a bug!
  Please report this at http://github.com/uiua-lang/uiua/issues/new or on Discord at https://discord.gg/9CU2ME4kmn.

  code:
  test.ua:3:7
  at test.ua:3:7
3 | Lib ← &ffi ⊂□"calcdll.dll"

Uiua code:
# Experimental!

Lib ← &ffi ⊂□"calcdll.dll"
Add ← Lib {"int" "Add" "int" "int"} {⊙∘}
Add 5 6 # works, 11

Sum ← Lib {"int" "Sum" "const int:1" "int"}
Sum {[1 2 3 4 5]} # works, 15

# crashes
Test ← Lib {"void" "test" "const int*" "int" "const int*" "int" "int*" "int"}
Test {:⧻.[0 1 2 3] :⧻.[4 1 1 0] :⧻.[0 0 0 0 0 0 0 0 0 0 0 0]}

# doesn't work either
Test ← Lib {"void" "test" "const int:1" "int" "const int:3" "int" "int:5" "int"}
Test {[0 1 2 3] [4 1 1 0] [0 0 0 0 0 0 0 0 0 0 0 0]}

C code:
#define CALL __cdecl

int CALL Add(int a, int b) {
    return (a + b);
}

int CALL Sum(const int* arr, int len)
{
    int s = 0;
    for (int i = 0; i < len; i++)
        s+=arr[i];
    return s;
}

void CALL test(
        const int* a, int len_a,
        const int* b, int len_b,
        int* c, int len_c)
{
    for (int i = 0; i < len_c; i++)
        c[i] = i;
}

This is fixed in 587ce8b2d81bae30d57cb.
I should note that the correct way to write the test is
Test ← Lib {"void" "test" "const int:1" "int" "const int:3" "int" "int:5" "int"}
Test {[0 1 2 4] [4 1 1 0] [0 0 0 0 0 0 0 0 0 0 0 0]}

The : indicates a pointer with a length.
The number after the : refers the the argument index of the length.
The lengths will be automatically passed as the arguments at those indices, so you only need to pass the lists themselves to the function.


Allow for specifying of brotli via --enable-brotli= or pkg-config

Addresses issue #2946

[approve ci]
[add to whitelist]

[approve ci]
[add to whitelist]

@randall This might be worth a backport to 7.1.x, if you want to make a PR against the 7.1.x branch?


Refine SRT code, with StateThread adpater

Refine SRT code, with ST adapter
Add SRT unit test.

Codecov Report

Merging #3010 (95ad1c7) into develop (2b2379d) will increase coverage by 0.77%.
The diff coverage is 40.55%.

@@             Coverage Diff             @@
##           develop    #3010      +/-   ##
===========================================
+ Coverage    56.10%   56.88%   +0.77%
===========================================
  Files          153      151       -2
  Lines        57561    57791     +230
===========================================
+ Hits         32294    32872     +578
+ Misses       25267    24919     -348

Impacted Files
Coverage Δ

trunk/src/app/srs_app_config.cpp
65.16% <0.00%> (-0.40%)
:arrow_down:

trunk/src/app/srs_app_config.hpp
100.00% <ø> (ø)

trunk/src/app/srs_app_pithy_print.cpp
31.94% <0.00%> (-0.92%)
:arrow_down:

trunk/src/app/srs_app_srt_conn.cpp
0.00% <0.00%> (ø)

trunk/src/main/srs_main_server.cpp
0.00% <0.00%> (ø)

trunk/src/protocol/srs_protocol_utility.cpp
90.72% <ø> (ø)

trunk/src/app/srs_app_srt_source.cpp
0.51% <0.51%> (ø)

trunk/src/app/srs_app_srt_server.cpp
11.36% <11.36%> (ø)

trunk/src/protocol/srs_service_st_srt.hpp
50.00% <50.00%> (ø)

trunk/src/utest/srs_utest.cpp
81.48% <60.00%> (-1.42%)
:arrow_down:

... and 17 more

Continue to review full report at Codecov.

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

Merged by https://github.com/ossrs/srs/commit/1af30dea324d0f1729aabd22536ea62e03497d7d


update homebrew formula for v0.2.0

@michelleN I purpose a plan to auto publish brew package using goreleaser. Check issue https://github.com/openservicemesh/osm/issues/1451


[flint:x86-windows] build failure

Host Environment

OS: Windows 10
Compiler: revision

To Reproduce
Steps to reproduce the behavior:
`./vcpkg install flint
Failure logs
Building package mpfr[core]:x86-windows... done
Installing package mpfr[core]:x86-windows...
Installing package mpfr[core]:x86-windows... done
Elapsed time for package mpfr:x86-windows: 11.51 min
Starting package 7/9: mpir:x86-windows
Building package mpir[core]:x86-windows...
CMake Error at ports/mpir/portfile.cmake:4 (message):
  Can't build mpir if gmp is installed.  Please remove gmp, and try to
  install mpir again if you need it.
Call Stack (most recent call first):
  scripts/ports.cmake:142 (include)

Error: Building package mpir:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: mpir:x86-windows
  Vcpkg version: 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e

Additional context
I didn't know what to put in the "Compiler" section. Basically, I downloaded vcpkg from GitHub, unzipped it in my Documents folder and run the Bootstrap to install it. Then, I tried to install the Flint library, for this purpose vcpkg started to download and build some dependencies such as gmp, mpfr, mpir, pthreads and gettimeofday. After installing everything successfully up to mpir, vcpkg shows a message error because apparently mpir cannot be installed when gmp is??
I tried removing all packages and installing mpir first but then when I try to install gmp, vcpkg tells me that gmp is in conflict with mpir so impossible as well.

@Xofuu

Can't build mpir if gmp is installed. Please remove gmp, and try to install mpir again if you need it.

-Both ports gmp and mpir cannot be installed on the same vcpkg instance at the same time.
-Either gmp or mpir can be installed but not both.

Hi StarGate-One, thanks for your reply. I'm aware of this, because they share the same headers files "gmp.h" and "gmpxx.h" but the issue is more about the dependencies on Flint I guess. By default, if one checks the official documentation about Flint, we only need either gmp with mpfr OR mpir with mpfr. However, mpfr depends on gmp according to vcpkg and ultimately, Flint depends on gmp, mpfr and mpir according to vcpkg. Obviously, as you noted, this causes errors.
For the people interested, I fixed the problem and was able to successfully install Flint by building gmp, mpir and mpfr with vcpkg. Then installing only gmp and mpfr and doing the installation of mpir manually and then modifying the "statut" and info files manually to let vcpkg thinks that mpir was installed successfully as well. After this, Flint can be built and installed without any issues whatsoever.
That's why I really think that the issue above is quite "superficial".
Have a nice day

@Xofuu  /cc: @JonLiu1993
I see what you mean... verified this needs to be fixed...
From an update-to-date clean vanilla vcpkg clone as of Friday 2021-03-21 at 15:30 UTC this is what I get:

PS D:\vcpkgMgr\2019\test> vcpkg install flint[core] --dry-run
Computing installation plan...
The following packages will be built and installed:
flint[core]:x64-windows -> 2.5.2-4

gmp[core]:x64-windows -> 6.2.1#3
mpfr[core]:x64-windows -> 4.1.0
mpir[core]:x64-windows -> 3.0.0#10
vs-yasm[core]:x64-windows -> 0.5.0#1
Additional packages (*) will be modified to complete this operation.

As you can see, flint[core] has dependencies of ports gmp, mpfr, mpir and vs-yasm, but as we know both ports gmp and mpir check to see if the other is installed, in other words:

gmp checks to see if mpir is installed, if mpir is installed an error message is produced and gmp is not installed.
mpir checks to see if gmp is installed, if gmp is installed an error message is produced and mpir is not installed.
so we have the proverbial catch-22, we can not install port flint because it has dependencies of gmp and mpir but these 2 ports can not coexist simultaneously on the same instance.

Yes, it's hard to solve.
See https://github.com/microsoft/vcpkg/issues/11756.

@ras0219 @ras0219-msft Should we remove this port since the dependencies has conflict?

I think we need to solve this issue. This is a bug in flint, and it should be able to depend on gmp (though it might need some munging).

Fixed by PR https://github.com/microsoft/vcpkg/pull/20050