Fix go vet and gosec issues

go vet errors:
# go vet ./...
warning: GOPATH set to GOROOT (/root/go) has no effect
# github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/registry
pkg/adaptor/hypervisor/registry/register.go:9:9: undefined: newServer

gosec errors:
# gosec ./...
[gosec] 2022/10/31 00:24:30 Including rules: default
[gosec] 2022/10/31 00:24:30 Excluding rules: default
[gosec] 2022/10/31 00:24:30 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/netops
[gosec] 2022/10/31 00:24:30 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/hvutil
[gosec] 2022/10/31 00:24:30 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/cloudinit
[gosec] 2022/10/31 00:24:30 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd
[gosec] 2022/10/31 00:24:31 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/registry
[gosec] 2022/10/31 00:24:31 Checking package: hvutil
[gosec] 2022/10/31 00:24:31 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/hvutil/hvutil.go
[gosec] 2022/10/31 00:24:31 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor
[gosec] 2022/10/31 00:24:31 Checking package: cloudinit
[gosec] 2022/10/31 00:24:31 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/cloudinit/cloudconfig.go
[gosec] 2022/10/31 00:24:32 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler
[gosec] 2022/10/31 00:24:32 Checking package: netops
[gosec] 2022/10/31 00:24:32 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/netops/netops.go
[gosec] 2022/10/31 00:24:32 Checking package: cmd
[gosec] 2022/10/31 00:24:32 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/exit.go
[gosec] 2022/10/31 00:24:32 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/parse.go
[gosec] 2022/10/31 00:24:32 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/starter.go
[gosec] 2022/10/31 00:24:32 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/vxlan
[gosec] 2022/10/31 00:24:32 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/version.go
[gosec] 2022/10/31 00:24:32 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/agentproto
[gosec] 2022/10/31 00:24:32 Checking package: hypervisor
[gosec] 2022/10/31 00:24:32 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/types.go
[gosec] 2022/10/31 00:24:33 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/proto/podvminfo
[gosec] 2022/10/31 00:24:33 Checking package: tunneler
[gosec] 2022/10/31 00:24:33 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/tunneler.go
[gosec] 2022/10/31 00:24:33 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/agent-protocol-forwarder
[gosec] 2022/10/31 00:24:33 Checking package: registry
[gosec] 2022/10/31 00:24:33 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/registry/register.go
[gosec] 2022/10/31 00:24:34 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/pkg/utils
[gosec] 2022/10/31 00:24:34 Checking package: vxlan
[gosec] 2022/10/31 00:24:34 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/vxlan/podnode.go
[gosec] 2022/10/31 00:24:34 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/vxlan/workernode.go
[gosec] 2022/10/31 00:24:34 Checking package: agentproto
[gosec] 2022/10/31 00:24:34 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/agentproto/redirector.go
[gosec] 2022/10/31 00:24:34 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook
[gosec] 2022/10/31 00:24:35 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork
[gosec] 2022/10/31 00:24:35 Checking package: podvminfo
[gosec] 2022/10/31 00:24:35 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/proto/podvminfo/podvminfo.pb.go
[gosec] 2022/10/31 00:24:36 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/pkg/mutating_webhook
[gosec] 2022/10/31 00:24:36 Checking package: utils
[gosec] 2022/10/31 00:24:36 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/pkg/utils/utils.go
[gosec] 2022/10/31 00:24:36 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/aws
[gosec] 2022/10/31 00:24:36 Checking package: main
[gosec] 2022/10/31 00:24:36 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/main.go
[gosec] 2022/10/31 00:24:37 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/forwarder
[gosec] 2022/10/31 00:24:37 Checking package: main
[gosec] 2022/10/31 00:24:37 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/agent-protocol-forwarder/main.go
[gosec] 2022/10/31 00:24:37 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/forwarder/interceptor
[gosec] 2022/10/31 00:24:37 Checking package: aws
[gosec] 2022/10/31 00:24:37 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/aws/types.go
[gosec] 2022/10/31 00:24:37 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util
[gosec] 2022/10/31 00:24:38 Checking package: podnetwork
[gosec] 2022/10/31 00:24:38 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/common.go
[gosec] 2022/10/31 00:24:38 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/podnode.go
[gosec] 2022/10/31 00:24:38 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/workernode.go
[gosec] 2022/10/31 00:24:38 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/ibmcloud
[gosec] 2022/10/31 00:24:38 Checking package: mutating_webhook
[gosec] 2022/10/31 00:24:38 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/pkg/mutating_webhook/mutating-webhook.go
[gosec] 2022/10/31 00:24:38 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/pkg/mutating_webhook/remove-resourcespec.go
[gosec] 2022/10/31 00:24:39 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/routing
[gosec] 2022/10/31 00:24:39 Checking package: util
[gosec] 2022/10/31 00:24:39 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/redacting.go
[gosec] 2022/10/31 00:24:40 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/vsphere
[gosec] 2022/10/31 00:24:40 Checking package: ibmcloud
[gosec] 2022/10/31 00:24:40 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/ibmcloud/types.go
[gosec] 2022/10/31 00:24:40 Checking package: forwarder
[gosec] 2022/10/31 00:24:40 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/forwarder/forwarder.go
[gosec] 2022/10/31 00:24:40 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/cloud-api-adaptor
[gosec] 2022/10/31 00:24:40 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/libvirt
[gosec] 2022/10/31 00:24:40 Checking package: interceptor
[gosec] 2022/10/31 00:24:40 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/forwarder/interceptor/interceptor.go
[gosec] 2022/10/31 00:24:41 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/proxy
[gosec] 2022/10/31 00:24:41 Checking package: routing
[gosec] 2022/10/31 00:24:41 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/routing/common.go
[gosec] 2022/10/31 00:24:41 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/routing/iptables.go
[gosec] 2022/10/31 00:24:41 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/routing/keepalive.go
[gosec] 2022/10/31 00:24:41 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/routing/podnode.go
[gosec] 2022/10/31 00:24:41 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/routing/workernode.go
[gosec] 2022/10/31 00:24:41 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/internal/testing
[gosec] 2022/10/31 00:24:41 Checking package: libvirt
[gosec] 2022/10/31 00:24:41 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/libvirt/types.go
[gosec] 2022/10/31 00:24:43 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tuntest
[gosec] 2022/10/31 00:24:43 Checking package: testutils
[gosec] 2022/10/31 00:24:43 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/internal/testing/testutils.go
[gosec] 2022/10/31 00:24:44 Import directory: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/azure
[gosec] 2022/10/31 00:24:44 Checking package: vsphere
[gosec] 2022/10/31 00:24:44 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/vsphere/server.go
[gosec] 2022/10/31 00:24:44 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/vsphere/service.go
[gosec] 2022/10/31 00:24:44 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/vsphere/types.go
[gosec] 2022/10/31 00:24:44 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/vsphere/vsphere.go
[gosec] 2022/10/31 00:24:45 Checking package: main
[gosec] 2022/10/31 00:24:45 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/cloud-api-adaptor/main.go
[gosec] 2022/10/31 00:24:45 Checking package: azure
[gosec] 2022/10/31 00:24:45 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/azure/types.go
[gosec] 2022/10/31 00:24:45 Checking package: proxy
[gosec] 2022/10/31 00:24:45 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/proxy/proxy.go
[gosec] 2022/10/31 00:24:45 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/proxy/service.go
[gosec] 2022/10/31 00:24:46 Checking package: tuntest
[gosec] 2022/10/31 00:24:46 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tuntest/tuntest.go
[gosec] 2022/10/31 00:24:46 Checking file: /root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tuntest/util.go
Results:

Golang errors in file: [/root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/starter.go]:

  > [line 54 : column 26] - Interrupt not declared by package os

Golang errors in file: [/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/registry/register.go]:

  > [line 9 : column 9] - undeclared name: newServer

Golang errors in file: [/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/proxy/proxy.go]:

  > [line 135 : column 15] - Remove not declared by package os

Golang errors in file: [/root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/main.go]:

  > [line 20 : column 2] - could not import confidential-containers/peer-pods-webhook/pkg/mutating_webhook (invalid package name: "")

  > [line 26 : column 4] - could not import k8s.io/client-go/plugin/pkg/client/auth (invalid package name: "")

  > [line 28 : column 2] - could not import k8s.io/apimachinery/pkg/runtime (invalid package name: "")

  > [line 29 : column 14] - could not import k8s.io/apimachinery/pkg/util/runtime (invalid package name: "")

  > [line 30 : column 17] - could not import k8s.io/client-go/kubernetes/scheme (invalid package name: "")

  > [line 31 : column 7] - could not import sigs.k8s.io/controller-runtime (invalid package name: "")

  > [line 32 : column 2] - could not import sigs.k8s.io/controller-runtime/pkg/healthz (invalid package name: "")

  > [line 33 : column 2] - could not import sigs.k8s.io/controller-runtime/pkg/log/zap (invalid package name: "")

  > [line 34 : column 2] - could not import sigs.k8s.io/controller-runtime/pkg/webhook (invalid package name: "")

Golang errors in file: [/root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/pkg/mutating_webhook/mutating-webhook.go]:

  > [line 24 : column 9] - could not import k8s.io/api/core/v1 (invalid package name: "")

  > [line 25 : column 2] - could not import sigs.k8s.io/controller-runtime/pkg/client (invalid package name: "")

  > [line 26 : column 2] - could not import sigs.k8s.io/controller-runtime/pkg/webhook/admission (invalid package name: "")

Golang errors in file: [/root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/pkg/mutating_webhook/remove-resourcespec.go]:

  > [line 7 : column 2] - could not import k8s.io/apimachinery/pkg/api/resource (invalid package name: "")

Golang errors in file: [/root/go/src/github.com/confidential-containers/cloud-api-adaptor/webhook/pkg/utils/utils.go]:

  > [line 8 : column 9] - could not import k8s.io/api/core/v1 (invalid package name: "")

  > [line 9 : column 2] - could not import k8s.io/apimachinery/pkg/api/resource (invalid package name: "")

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/cmd/agent-protocol-forwarder/main.go:33] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
    32:
  > 33: 	file, err := os.Open(path)
    34: 	if err != nil {

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tuntest/util.go:152-154] - G112 (CWE-400): Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (Confidence: LOW, Severity: MEDIUM)
    151: 		var err error
  > 152: 		s.server = &http.Server{
  > 153: 			Handler: testHTTPHandler,
  > 154: 		}
    155: 		s.listener, err = net.Listen("tcp", addr)

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tuntest/tuntest.go:161-163] - G112 (CWE-400): Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (Confidence: LOW, Severity: MEDIUM)
    160: 			if err := pod.podNodeNS.Run(func() error {
  > 161: 				httpServer := http.Server{
  > 162: 					Addr: net.JoinHostPort("<IP_ADDRESS>", "15150"),
  > 163: 				}
    164: 				return httpServer.ListenAndServe()

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/routing/keepalive.go:264-266] - G112 (CWE-400): Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (Confidence: LOW, Severity: MEDIUM)
    263:
  > 264: 	httpServer := http.Server{
  > 265: 		Addr: listenAddr,
  > 266: 	}
    267:

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/netops/netops.go:738] - G601 (CWE-118): Implicit memory aliasing in for loop. (Confidence: MEDIUM, Severity: MEDIUM)
    737: 		if route.Dst == nil {
  > 738: 			defaultRoute = &route
    739: 			break

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/util/netops/netops.go:552] - G601 (CWE-118): Implicit memory aliasing in for loop. (Confidence: MEDIUM, Severity: MEDIUM)
    551: 	for _, route := range routes {
  > 552: 		if err := ns.handle.RouteDel(&route); err != nil {
    553: 			return fmt.Errorf("failed to delete a route: table %d, dest: %s, gw: %s, dev %s: %w", table, dest, gw, dev, err)

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/adaptor/hypervisor/vsphere/service.go:173] - G306 (CWE-276): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
    172: 	// Store daemon.json in worker node for debugging
  > 173: 	if err = os.WriteFile(filepath.Join(sandbox.podDirPath, "daemon.json"), daemonJSON, 0666); err != nil {
    174: 		return nil, fmt.Errorf("failed to store daemon.json at %s: %w", sandbox.podDirPath, err)

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tuntest/util.go:178] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
    177: 		err := s.server.Shutdown(context.Background())
  > 178: 		s.listener.Close()
    179: 		return err

[/root/go/src/github.com/confidential-containers/cloud-api-adaptor/pkg/podnetwork/tunneler/routing/keepalive.go:231] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
    230:
  > 231: 			res.Body.Close()
    232:

Summary:
  Gosec  : v2.14.0
  Files  : 44
  Lines  : 6873
  Nosec  : 0
  Issues : 9

@bpradipt this is the errors I mentioned in https://github.com/confidential-containers/cloud-api-adaptor/issues/320, I created a separate issue to address them.

go vet support build flags also, run like this can tell vet pick corresponding files:
# go vet -tags=ibmcloud|aws|libvirt ./...

gosec declared support -tags here https://github.com/securego/gosec/issues/393, but looks not work in our case.


Duplicate image sets !!!

Hi,
I am new to the HealthImaging service and trying it out for a personal project. I was trying to import some of my sample dicom files from my S3 to the healthImaging service. I was able to do the import with the help of the import job successfully through the console, but the issue here is when I run one more import job over the same files in S3 it will again create the same image set that it created before as a duplicate.
I got wondered why the service is again importing the same image set which I imported just before.  The duplicated one have exact same "version" also. I was expecting some duplication prevention (De-dup) algorithm in the service. As per my understanding based on the official docs(please correct me if I am wrong) there is only option to specify the source S3 bucket with the prefix in the Import job rather than specifying the dicom files for the import job. So if I want to import a new file from the same S3 prefix folder, I have to either remove the old one from there to prevent duplicate image set or process all of the together(Old+new) such that I will have duplicate image sets in my data store.
Please help me out to figure out whether it is a feature or issue. Thank you.

Hi anandhur-karnavar
What you observed is a normal behavior of the HealthImaging service. HealthImaging groups DICOM instances of a same DICOM series into one ImageSets, however the grouping happens in the scope of 1 import job. To import the same DICOM data a 2nd time will create deduplication of the data, and the creation of another ImageSet for each DICOM series re-imported. We recommend that you create a specific S3 location to prepare Import jobs, copy the data to import into it, and then clear this S3 location after the import. Regarding the deduplicated data, you can manage it via the modification API calls . For instance you could decide to delete theses ImageSets.
I hope it helps.


Add documentation to Hive connector

document hive.allow-drop-table and hive.allow-rename-table
document HDFS permissions for Hive connector

I'm going to close this PR and create an issue about permissions and writing data for Hive.


[Popover] replaced marginThreshold with marginThresholdHorizontal and…

This way its possible to set a vertical margin for e.g. notch on iPhoneX without setting the same margin horizontally.

@daniel-rabe The long term plan is to replace the Popover positioning logic with the Popper one. I think that we should focus on the Popper, does it also suffer from this issue? Would adding an extra margin solve the problem (maybe with a CSS feature detection of the notch)?

i tried with margin, but this breaks the positioning in iOS safari (part of popover is outside of window for big popovers) @oliviertassinari


Add method to remove all numbers from a String

Motivation:
I came across a problem in which I had to remove all the numbers contained in a String. After researching in some places I saw that in the stackoverflow there are many questions about this same problem. I use the StringUtils class a lot and I haven't found any method capable of solving this problem, so I decided to create this Pull Request to contribute to the project.
Solution:
Create a method capable of receiving any String and returning it without any numeric characters.

[x] This PR contains tests of the method created.

Hi.
you can try something like this
    public static String removeAllNumbers(String str) {
        final int originalLength = length(str);
        if (originalLength == 0) {
            return str;
        }
        char[] charArray = str.toCharArray();
        int i = originalLength - 1;
        int j = i;
        while (i >= 0) {
            if (charArray[i] >= '0' && charArray[i] <= '9') {
                --i;
                continue;
            }
            charArray[j] = charArray[i];
            --i;
            --j;
        }
        return new String(charArray, j + 1, originalLength - 1 - j);
    }

however I don't know why you want to change " " to "" using this function, by its name I think we should only try to remove the numbers, and " " does not sound like a number...

Besides, you need to write some test cases for the new added function.
for example, org.apache.commons.lang3.StringUtilsContainsTest is test for StringUtils.contains functions.

And finally (or maybe should do it first actually), go jira system (https://issues.apache.org/jira) and open a issue ticket for the new function, and wait for what the committers say. they are people who can decide whether we can merge this function/

Unsubscribe please
On Fri, Jul 31, 2020 at 15:07, XenoAmess<EMAIL_ADDRESS>wrote:

@XenoAmess commented on this pull request.
In src/main/java/org/apache/commons/lang3/StringUtils.java
https://github.com/apache/commons-lang/pull/595#discussion_r463422206:

* <pre>

* StringUtils.removeAllNumbers(null)        = ""

* StringUtils.removeAllNumbers("")          = ""

* StringUtils.removeAllNumbers(" ")         = ""

* StringUtils.removeAllNumbers("123abc")    = "abc"

* StringUtils.removeAllNumbers("123a b c")  = "a b c"

* StringUtils.removeAllNumbers("abc123")    = "abc"

* StringUtils.removeAllNumbers("123abc123") = "abc"

* StringUtils.removeAllNumbers("a1b2c3")    = "abc"

* </pre>

*

* @param str String to check, may be null

* @return The String without the numbers

*/

public static String removeAllNumbers(String str) {

 return !isBlank(str) ? str.replaceAll(REGEX_FIND_NUMBERS, EMPTY) : EMPTY;

@muriloalvesdev https://github.com/muriloalvesdev Hi.
I re-reviewed this pr and have no more suggestions about the
implementation.
Please open a JIRA ticket for this pr, and add the string of that ticket
in front of the pr's name
(example: #524 https://github.com/apache/commons-lang/pull/524)
Next step is waiting for some people who have merge access(means,
Committer) to review this pr, and see if we should merge this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/apache/commons-lang/pull/595#discussion_r463422206,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAK2U6UIFRX6G4QGUZ4GF4DR6JNTDANCNFSM4PPMDTJA
.

-1
Use the stock Java classes: "12ab".replaceAll("[\\d]", "") return "ab"
In general I think we need to move this kind of text processing to the Commons Text component instead of adding more and more to Commons Lang, especially when it comes to manipulating Strings that are not generic, in this case, the domain is numbers.


[FLINK-16225] Implement user class loading exception handler

1.10 Port of #12446.
Just to run CI

@flinkbot run travis

When EventTimeWindowCheckpointingITCase runs the whole package, it sometimes hits the default JVM direct memory limit (2g). The GC of netty direct memory buffers is slowed down for some reason which leads to direct OOM errors in netty stack. This is also reproducible in release-1.10 branch with a lower JVM direct memory limit (e.g. 512mb). This is not clear how inheritance in user class loaders, introduced in this PR, affects direct memory GC.
We could reduce the usage of netty buffers by porting some network stack improvements to 1.10 from 1.11 (FLINK-15962) but we rather do not merge this change to 1.10 and reconsider it if this becomes a problem in future.
cc @zhijiangW

Thanks for the review @tillrohrmann
True, the option got lost during the rebase.


Add option --manager for docker swarm join command

Two locations:
first, add "worker" to node.
second, add option --manager for docker swarm join command because there is --manager description at the following:
### `--manager`

Joins the node as a manager

### `--token string`

Secret value required for nodes to join the swarm

This option is no longer present in 1.12.0, it was removed in https://github.com/docker/docker/pull/24823, where the join process changed to use a join-token instead of a secret. The type of join-token determines if a node joins as manager or as worker, and is a more secure approach than reusing the same secret (both for managers and workers).
I'll close this PR because it's not correct, but thanks again for contributing!

so can "--manager" description be removed?
--manager
Joins the node as a manager
--token string
Secret value required for nodes to join the swarm

@lixiaobing10051267 where are you seeing that description? Are you perhaps running an older release candidate of docker?

@thaJeztah line 88 of docs/reference/commandline/swarm_join.md


server.js stop at first request

I have try to send requests on the app but it fails with this error :
`[cloud@bastion]$ docker pull manomarks/visualizer
Using default tag: latest
slave2: Pulling manomarks/visualizer:latest... : downloaded
slave1: Pulling manomarks/visualizer:latest... : downloaded
master1: Pulling manomarks/visualizer:latest... : downloaded
[cloud@bastion]$ docker-compose up
Starting dockerswarmvisualizer_visu_1
Attaching to dockerswarmvisualizer_visu_1
visu_1  | npm info it worked if it ends with ok
visu_1  | npm info using<EMAIL_ADDRESS>visu_1  | npm info using<EMAIL_ADDRESS>visu_1  | npm info prestart<EMAIL_ADDRESS>visu_1  | npm info start<EMAIL_ADDRESS>visu_1  |
visu_1  | ><EMAIL_ADDRESS>start /app
visu_1  | > node server.js
visu_1  |
visu_1  | undefined
visu_1  | undefined:1
visu_1  | 404 page not found
visu_1  |     ^
visu_1  |
visu_1  | SyntaxError: Unexpected token p
visu_1  |     at Object.parse (native)
visu_1  |     at IncomingMessage.<anonymous> (/app/server.js:68:36)
visu_1  |     at emitNone (events.js:72:20)
visu_1  |     at IncomingMessage.emit (events.js:166:7)
visu_1  |     at endReadableNT (_stream_readable.js:893:12)
visu_1  |     at doNTCallback2 (node.js:430:9)
visu_1  |     at process._tickCallback (node.js:344:17)
visu_1  |
visu_1  | npm info<EMAIL_ADDRESS>Failed to exec start script
visu_1  | npm ERR! Linux 4.4.0-28-generic
visu_1  | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
visu_1  | npm ERR! node v4.1.2
visu_1  | npm ERR! npm  v2.14.4
visu_1  | npm ERR! code ELIFECYCLE
visu_1  | npm ERR<EMAIL_ADDRESS>start: `node server.js`
visu_1  | npm ERR! Exit status 1
visu_1  | npm ERR!
visu_1  | npm ERR! Failed at the<EMAIL_ADDRESS>start script 'node server.js'.
visu_1  | npm ERR! This is most likely a problem with the swarmVisualizer package,
visu_1  | npm ERR! not with npm itself.
visu_1  | npm ERR! Tell the author that this fails on your system:
visu_1  | npm ERR!     node server.js
visu_1  | npm ERR! You can get their info via:
visu_1  | npm ERR!     npm owner ls swarmVisualizer
visu_1  | npm ERR! There is likely additional logging output above.
visu_1  |
visu_1  | npm ERR! Please include the following file with any support request:
visu_1  | npm ERR!     /app/npm-debug.log

also can we call it in HTTPS ?
Thanks

Do you have a Swarm running? Are you running Docker 1.12? It looks like you're not getting anything back from the Docker Remote API. Are you running this on Windows, Mac, or Linux?

I am running docker 1.11 it's not compatible ?
Sébastien

Le 24 août 2016 à 21:14, Mano Marks<EMAIL_ADDRESS>a écrit :
Do you have a Swarm running? Are you running Docker 1.12? It looks like you're not getting anything back from the Docker Remote API. Are you running this on Windows, Mac, or Linux?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Correct


Small fixes for .NET Core

Some fixes on #96 that I needed to actually get it to compile correctly in a .NET Standard 1.6 library. Also added an example to the platformtests directory

This PR is quite large, a pr with only the compiler directives needed for 1.6 would be greatly appreciated.

Sure, I'll try to submit a diff if I get some spare time. The diff is only big because I added a test harness in platformtests/NETCore to ensure the changes actually worked correctly.

@grumpydev any chance you'd be willing to transfer ownership of this project?

Not sure about ownership, but if you want to get things working properly on netstandard, given I still haven't had time to do so, that'd be great.

Thanks :) We've been using it on many platforms and it's working. I just checked in to see if I needed to update my copy and saw a ton of pr's and issues and I figured I'd ask about it and try to get them cleaned up.

Sure, I'll see if I get some free time to work on this. Someone else can
feel free to pick it up though.
--
Regards,
Daniel Lo Nigro
https://dan.cx/ | Twitter http://twitter.com/Daniel15 | Facebook
http://www.facebook.com/daaniel
On Sat, Aug 18, 2018 at 6:22 AM Blake Niemyjski<EMAIL_ADDRESS>wrote:

@niemyjski requested changes on this pull request.
We want to keep the polyfill for net core, can you please revert that one
change and we'll merge the pr.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/grumpydev/TinyIoC/pull/106#pullrequestreview-147430799,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFnHRh1hm2ibamrzgwwRFlZC-XwasWwks5uSBUkgaJpZM4KL9D1
.

I'm not going to have time to finish this.


UI - button text needs more contrast

When I was trying to get points for subscribing to the YouTube channel - the modal initially looked broken as I did not notice the "save" text in the button.

From @wicksipedia:
Hey Matt G

Do you still think this UX is problematic?

Yes, the button looks like it is in an enabled state but I can’t see text – so it looks like a buggy UI.
I’d recommend fading the button background color instead of the text color – like what bootstrap does https://getbootstrap.com/docs/4.1/components/buttons/#disabled-state

Do you think this needs a better cue? Like an X in the top right corner for example?

That or a cancel button
FYI I think this conversation should be on the GitHub issue
From @matt-goldman
Hi Matt W
cc: @jaydenalchin
Thanks for testing!

UI - button text needs more contrast · Issue #399 · SSWConsulting/SSW.Rewards (github.com)
The button is disabled until you enter some text, this is expected until you’ve put your username in. I can confirm from the video you attached to your other issue that this is working as expected.

Do you still think this UX is problematic?

If you don’t want to enter something, or enter something and don’t want to save it, you can dismiss the dialog by tapping behind it.

Do you think this needs a better cue? Like an X in the top right corner for example?

Not relevant in v2024, closing.


Update config for site using baseurl and font in css

The url path will be broken at some places if the user hosts the site on a subpath. For example domain.com/blog, baseurl: /blog in _config.yml.
I made some modifications, but users need to use syntax such as ![]({{site.baseurl}}/assets/images/test.jpg) in their markdown post.
Also, the style. css should update the font name and format.

Hello! Thank you for your interest in this project. I appreciate it. I suggest making one fix per pull request (PR) to facilitate easier review and approval. I will review this later today.


[Bug]: Sugar Reveal - No captures found

Issue description
Hey, when trying to use the sugar reveal command on version 1.1.2-alpha+CMv3.
I get the following error: (see code)
No captures found for [Collection name], I'm unsure on what went wrong and where. Couldn't find any info anywhere on the internet as of posting this bug report.
Relevant log output
[1/4] Loading items from the cache
▪▪▪▪▪ Done

[2/4] Getting minted NFTs for candy machine [CM hidden for privacy]
▪▪▪▪▪ Found xxxx accounts

[3/4] Matching NFTs to cache values
▪▪▪▪▪ Done

[4/4] Updating NFT URIs from cache values

Error running command (re-run needed): No captures found for [Collection name hidden for privacy]

Priority this issue should have
High (immediate attention needed)

The way reveal works is that it matches the NFT number by parsing it from the name and then matches it to the number in the cache file and updates the URI to the one stored in the cache file. If your NFTs have a non-standard naming scheme Sugar's reveal may not work and you might have to do the reveal yourself using your own script or a tool like Metaboss with a file that maps what NFT should get what new URI.
The error comes from here where it's trying to parse out the number from the collection name.

Alright thanks @samuelvanderwaal do you happen to know if Metaboss' CMv2 function works the same as CMv3? I believe it does, but would like it confirmed if you could. Thanks - after I'll close the bug report

Alright thanks @samuelvanderwaal do you happen to know if Metaboss' CMv2 function works the same as CMv3? I believe it does, but would like it confirmed if you could. Thanks - after I'll close the bug report

I'm not sure what you mean when you say Metaboss' CMv2 function. What specific command are you referring to?

For example with the snapshot function.
For reference see:

I have the same issue, i think my nft names are correct¿?


default theme/ tailwind configuration file

define list of context UI variables, see https://getbootstrap.com/docs/4.0/components/alerts/#examples
default tailwind.config.js that can be exported easily

Same as #12


WIP: npy dataset

Fixes #222
TODO

[ ] write some tests
[ ] rebuild GUI
[ ] test on some real world data

Contributor Checklist:

[ ] I have added or updated my entry in the creators.json file
[ ] I have added a changelog entry for my contribution
[ ] I have added/updated documentation for all user-facing changes
[ ] I have added/updated test cases
[ ] I have included the rebuilt production build of the client (only if changes were made to the GUI)

Reviewer Checklist:

[ ] /azp run libertem.libertem-data passed
[ ] No import of GPL code from MIT code

/azp run libertem.libertem-data

Have started looking at this and writing tests.
One quick observation / question: I believe the arguments nav_shape + sig_shape are essentially ignored as the DataSetMeta object is instantiated with the shape values from the .npy header in combination with the sig_dims argument. Is this intentional or just incomplete? (One of my tests passes conflicting nav/sig/dims arguments to the loader and the final dataset always just matches the original npy file).
I can see a few ways to handle it:

Setting these values during ctx.load() is allowed and later they are checked against the .npy header (probably raising a warning if non-matching). Optionally the sig_shape parameter could be used to set sig_dims if not explicitly provided. This prioritizes the npy file over user input.
Allow user-provided nav_shape and sig_shape to essentially act like np.reshape() on the contents of the file, as long as their sum fits within the full shape from the .npy header (otherwise raise an Exception). This is more flexible but obviously needs careful and clear handling of priority of parameters. A potential use case here would be a camera that saves .npy files in a flat nav dimension form (N, sigy, six) and then by supplying nav_shape to the dataset we read the npy file as it if had a certain scan shape. This priorizes the user input over the npy file.

I am happy to implement either, but I wanted to check first in case you had a preference / behaviour in mind?

/azp run libertem.libertem-data

Have started looking at this and writing tests.

Thank you for taking over!

One quick observation / question: I believe the arguments nav_shape + sig_shape are essentially ignored as the DataSetMeta object is instantiated with the shape values from the .npy header in combination with the sig_dims argument. Is this intentional or just incomplete? (One of my tests passes conflicting nav/sig/dims arguments to the loader and the final dataset always just matches the original npy file).

It's just incomplete, sorry, added to the TODO above.

Allow user-provided nav_shape and sig_shape to essentially act like np.reshape() on the contents of the file, as long as their sum fits within the full shape from the .npy header (otherwise raise an Exception). This is more flexible but obviously needs careful and clear handling of priority of parameters. A potential use case here would be a camera that saves .npy files in a flat nav dimension form (N, sigy, six) and then by supplying nav_shape to the dataset we read the npy file as it if had a certain scan shape. This priorizes the user input over the npy file.

This is how it's handled in other DataSet impls, and exactly for the use case you are describing - that's the way to go.

Have started looking at this and writing tests.

Thank you for taking over!

One quick observation / question: I believe the arguments nav_shape + sig_shape are essentially ignored as the DataSetMeta object is instantiated with the shape values from the .npy header in combination with the sig_dims argument. Is this intentional or just incomplete? (One of my tests passes conflicting nav/sig/dims arguments to the loader and the final dataset always just matches the original npy file).

It's just incomplete, sorry, added to the TODO above.

Allow user-provided nav_shape and sig_shape to essentially act like np.reshape() on the contents of the file, as long as their sum fits within the full shape from the .npy header (otherwise raise an Exception). This is more flexible but obviously needs careful and clear handling of priority of parameters. A potential use case here would be a camera that saves .npy files in a flat nav dimension form (N, sigy, six) and then by supplying nav_shape to the dataset we read the npy file as it if had a certain scan shape. This priorizes the user input over the npy file.

This is how it's handled in other DataSet impls, and exactly for the use case you are describing - that's the way to go.

Great, that's what I implemented this morning and is in the current version. I took a bunch of tests from test_raw.py to apply in test_npy.py and it seems to correctly handle sync offset and various reshapings.
I'm looking at the conda-forge stuff right now but will do another pass over the tests here and also rebuild/test the web client.

Notes on the web interface:

On the Python side the sync_offset param in NPYDatasetParams was commented out. I've made it live again and it seems to work for the GUI side and with the current dataset implementation I don't see anything odd in the results. Do you remember why it was commented at the time ?
There is a browser-side check for incompatible sig_shape here : https://github.com/sk1p/LiberTEM/blob/numpy-dataset/client/src/dataset/helpers.ts#L66 which prevents interpreting the frames in the dataset as anything other than the same number of pixels as the auto-detected frame size. The python implementation doesn't enforce this constraint right now. I don't think it's important (it's an edge use case) but I mention it just in case.
A 3D numpy array (N, sig_y, sig_x) is auto-interpreted as a (50, 1) array (which is great), though for display purposes a (1, 50) array renders in the GUI much better. This could be fixed in adjustShapeWithBounds https://github.com/sk1p/LiberTEM/blob/numpy-dataset/client/src/dataset/helpers.ts#L30 for all datasets (in another PR) or specifically for the NPY dataset in .detect_params.
There is a schema JSON linked in the params : "$id": "http://libertem.org/NPYDatasetParams.schema.json" but I can't find this. This might not just be for the NPY dataset, though, given that http://libertem.org doesn't seem to exist
Are there any specific conditions for pushing the updated client JS files ? (npm version etc) I haven't ever pushed a web client update before, I've only built them locally for testing.

On the Python side the sync_offset param in NPYDatasetParams was commented out. I've made it live again and it seems to work for the GUI side and with the current dataset implementation I don't see anything odd in the results. Do you remember why it was commented at the time ?

Possibly because it didn't work when I started working on the GUI - but don't remember the details. I'm fine with re-enabling it :+1:

There is a browser-side check for incompatible sig_shape here : https://github.com/sk1p/LiberTEM/blob/numpy-dataset/client/src/dataset/helpers.ts#L66 which prevents interpreting the frames in the dataset as anything other than the same number of pixels as the auto-detected frame size. The python implementation doesn't enforce this constraint right now. I don't think it's important (it's an edge use case) but I mention it just in case.

Ok, yeah, I think we can touch this if anything specific comes up (in one direction or the other - enforcing the compatibility, or relaxing it).

A 3D numpy array (N, sig_y, sig_x) is auto-interpreted as a (50, 1) array (which is great), though for display purposes a (1, 50) array renders in the GUI much better. This could be fixed in adjustShapeWithBounds https://github.com/sk1p/LiberTEM/blob/numpy-dataset/client/src/dataset/helpers.ts#L30 for all datasets (in another PR) or specifically for the NPY dataset in .detect_params.

I'm fine with solving this in a separate PR (for all datasets).

There is a schema JSON linked in the params : "$id": "http://libertem.org/NPYDatasetParams.schema.json" but I can't find this. This might not just be for the NPY dataset, though, given that http://libertem.org doesn't seem to exist

That URI is just the identifier of the json schema you are currently looking at. It's not what the json-schema people call Retrieval URI.
We were planning to use libertem.org some time ago, but then just stuck with github for hosting docs etc... theoretically these could be changed to at least use a domain we have under our control, i.e. libertem.github.io, which may be less confusing.

Are there any specific conditions for pushing the updated client JS files ? (npm version etc) I haven't ever pushed a web client update before, I've only built them locally for testing.

npm should be one that uses the current lock file version (lockfileVersion: 2), so that would be npm 8.x I think. Generally, the npm shipped with the current nodejs LTS version (16.x at the time of writing) should be used.
Make sure to use the included build_client command of our setup.py file, which takes care of also copying the files where they belong. Then, it's important to git add the whole of src/libertem/web/client/ to make sure all changes are committed, including new and deleted files.

/azp run libertem.libertem-data

Tested in the web UI on a real dataset (MIB converted into .npy).
Branch pulled from github to a second (Windows) machine to check the client build, no issues found.


Quick fix to dom-video examples. Fixes #1103

Fixes #1103
Changes:
Added single noCanvas(); line to setup() in each language's examples/dom-video.html example.
Modified files:
        modified:   src/data/examples/en/16_Dom/08_Video.js
        modified:   src/data/examples/es/16_Dom/08_Video.js
        modified:   src/data/examples/hi/16_Dom/08_Video.js
        modified:   src/data/examples/ko/16_Dom/08_Video.js
        modified:   src/data/examples/zh-Hans/16_Dom/08_Video.js

Single noCanvas(); line added to each:
let button;

function setup() {
 noCanvas();
  // specify multiple formats for different browsers
  fingers = createVideo(['assets/fingers.mov', 'assets/fingers.webm']);
  button = createButton('play');

Buttons are now visible.

Looks good. Thanks!


Invalid argument(s): string is not well-formed UTF-16

Steps to Reproduce
Passing a string with emoji into Text widget crashes flutter. Is there a way to santinize the text so that flutter rendering is not affected? I searched around and there's not a way to do it yet, so I'm leaning toward just try to render the text anyway and if flutter throws error then just ignore the text entirely instead of trying to deal with it. However my code like this doesn't seem to work
var para = ParagraphBuilder(ParagraphStyle());
para.addText(title);
para.build();
print(para);

Here's the text (title) in question 'Đấy, nhà có 3 anh em mà chơi thiếu đoàn kết quá bảo sao thằng nhỏ hông giận. 😗😗😗'
[        ] I/flutter ( 2937): The following ArgumentError was thrown during performLayout():
[   +7 ms] I/flutter ( 2937): Invalid argument(s): string is not well-formed UTF-16
[        ] I/flutter ( 2937):
[        ] I/flutter ( 2937): The relevant error-causing widget was:
[        ] I/flutter ( 2937):   Text file:///Users/kdang/Documents/vietgag/lib/screens/main_screen.dart:490:24
[        ] I/flutter ( 2937):
[   +7 ms] I/flutter ( 2937): When the exception was thrown, this was the stack:
[   +4 ms] I/flutter ( 2937): #0      ParagraphBuilder.addText (dart:ui/text.dart:2041:7)
[        ] I/flutter ( 2937): #1      TextSpan.build (package:flutter/src/painting/text_span.dart:207:15)
[        ] I/flutter ( 2937): #2      TextPainter.layout (package:flutter/src/painting/text_painter.dart:544:13)
[        ] I/flutter ( 2937): #3      RenderParagraph._layoutText (package:flutter/src/rendering/paragraph.dart:477:18)
[        ] I/flutter ( 2937): #4      RenderParagraph._layoutTextWithConstraints (package:flutter/src/rendering/paragraph.dart:500:5)
[        ] I/flutter ( 2937): #5      RenderParagraph.performLayout (package:flutter/src/rendering/paragraph.dart:567:5)
[        ] I/flutter ( 2937): #6      RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #7      RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259:13)
[        ] I/flutter ( 2937): #8      RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #9      RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206:11)
[        ] I/flutter ( 2937): #10     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #11     RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:744:15)
[        ] I/flutter ( 2937): #12     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[   +7 ms] I/flutter ( 2937): #13     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206:11)
[        ] I/flutter ( 2937): #14     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #15     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
[        ] I/flutter ( 2937): #16     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #17     RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:744:15)
[        ] I/flutter ( 2937): #18     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #19     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
[        ] I/flutter ( 2937): #20     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[  +15 ms] I/flutter ( 2937): #21     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
[        ] I/flutter ( 2937): #22     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #23     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
[        ] I/flutter ( 2937): #24     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #25     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
[        ] I/flutter ( 2937): #26     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1232:11)
[        ] I/flutter ( 2937): #27     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #28     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206:11)
[  +22 ms] I/flutter ( 2937): #29     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #30     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
[        ] I/flutter ( 2937): #31     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #32     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
[        ] I/flutter ( 2937): #33     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #34     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
[        ] I/flutter ( 2937): #35     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #36     RenderSliverMultiBoxAdaptor.insertAndLayoutChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:492:13)
[  +19 ms] I/flutter ( 2937): #37     RenderSliverList.performLayout.advance (package:flutter/src/rendering/sliver_list.dart:195:19)
[        ] I/flutter ( 2937): #38     RenderSliverList.performLayout (package:flutter/src/rendering/sliver_list.dart:220:19)
[        ] I/flutter ( 2937): #39     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #40     RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:134:11)
[        ] I/flutter ( 2937): #41     RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:373:11)
[        ] I/flutter ( 2937): #42     RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
[        ] I/flutter ( 2937): #43     RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:410:13)
[  +11 ms] I/flutter ( 2937): #44     RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1367:12)
[        ] I/flutter ( 2937): #45     RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1285:20)
[        ] I/flutter ( 2937): #46     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1584:7)
[        ] I/flutter ( 2937): #47     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:844:18)
[        ] I/flutter ( 2937): #48     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:344:19)
[        ] I/flutter ( 2937): #49     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:774:13)
[        ] I/flutter ( 2937): #50     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:283:5)
[        ] I/flutter ( 2937): #51     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1102:15)
[   +9 ms] I/flutter ( 2937): #52     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1041:9)
[        ] I/flutter ( 2937): #53     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:957:5)
[        ] I/flutter ( 2937): #57     _invoke (dart:ui/hooks.dart:259:10)
[        ] I/flutter ( 2937): #58     _drawFrame (dart:ui/hooks.dart:217:3)
[        ] I/flutter ( 2937): (elided 3 frames from package dart:async)
[        ] I/flutter ( 2937):
[        ] I/flutter ( 2937): The following RenderObject was being processed when the exception was fired: RenderParagraph#1e737 relayoutBoundary=up17 NEEDS-LAYOUT NEEDS-PAINT:
[        ] I/flutter ( 2937):   creator: RichText ← Text ← ConstrainedBox ← Container ← Padding ← Row ← Padding ← DecoratedBox ←
[        ] I/flutter ( 2937):     Container ← Column ← Semantics ← DefaultTextStyle ← ⋯
[  +11 ms] I/flutter ( 2937):   parentData: <none> (can use size)
[        ] I/flutter ( 2937):   constraints: BoxConstraints(w=353.5, 0.0<=h<=Infinity)
[        ] I/flutter ( 2937):   size: MISSING
[        ] I/flutter ( 2937):   textAlign: start
[        ] I/flutter ( 2937):   textDirection: ltr
[        ] I/flutter ( 2937):   softWrap: wrapping at box width
[        ] I/flutter ( 2937):   overflow: clip
[        ] I/flutter ( 2937):   locale: en_US
[        ] I/flutter ( 2937):   maxLines: unlimited
[        ] I/flutter ( 2937): This RenderObject had the following child:
[        ] I/flutter ( 2937):     text: TextSpan
[        ] I/flutter ( 2937): ════════════════════════════════════════════════════════════════════════════════════════════════════
[   +7 ms] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderParagraph#1e737 relayoutBoundary=up17 NEEDS-PAINT
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderConstrainedBox#47a2e relayoutBoundary=up16 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderPadding#9eaec relayoutBoundary=up15 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderFlex#eaf30 relayoutBoundary=up14 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderPadding#c3e10 relayoutBoundary=up13 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderDecoratedBox#72d3d relayoutBoundary=up12 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[   +3 ms] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderFlex#38609 relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#082a4 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: _RenderInkFeatures#1342a relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#97086 relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#58395 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderPadding#0263e relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#f6325 relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#d823a relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[        ] I/flutter ( 2937): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 549 pos 12: 'child.hasSize': is not true.
[ +200 ms] I/flutter ( 2937): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 549 pos 12: 'child.hasSize': is not true.
[        ] I/flutter ( 2937): Another exception was thrown: RenderBox was not laid out: RenderIndexedSemantics#c1a06 relayoutBoundary=up3 NEEDS-PAINT
[   +3 ms] I/flutter ( 2937): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 549 pos 12: 'child.hasSize': is not true.

Analyzing vietgag...

   info • Prefer using /// for doc comments • lib/business/auth.dart:106:3 • slash_for_doc_comments
   info • Prefer using /// for doc comments • lib/business/posts.dart:44:3 • slash_for_doc_comments
   info • Unused import: 'package:firebase_analytics/firebase_analytics.dart' • lib/screens/loading_screen.dart:1:8 • unused_import
   info • Unused import: 'package:flutter/scheduler.dart' • lib/screens/loading_screen.dart:4:8 • unused_import
   info • Unused import: 'package:localstorage/localstorage.dart' • lib/screens/main_screen.dart:13:8 • unused_import
   info • Avoid using braces in interpolation when not needed • lib/screens/main_screen.dart:73:49 • unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed • lib/screens/main_screen.dart:81:49 • unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed • lib/screens/main_screen.dart:459:44 • unnecessary_brace_in_string_interps
   info • Unused import: 'package:cloud_firestore/cloud_firestore.dart' • lib/screens/sign_in_screen.dart:4:8 • unused_import
   info • Unused import: 'package:flutter/gestures.dart' • lib/screens/sign_in_screen.dart:7:8 • unused_import
   info • Unused import: 'package:flutter_auth_buttons/flutter_auth_buttons.dart' • lib/screens/sign_in_screen.dart:10:8 • unused_import
   info • Unnecessary cast • lib/screens/sign_in_screen.dart:395:19 • unnecessary_cast

12 issues found. (ran in 6.4s)

[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.14.5 18F132, locale en-VN)
    • Flutter version 1.12.13+hotfix.7 at /Users/kdang/development/flutter
    • Framework revision 9f5ff2306b (6 weeks ago), 2020-01-26 22:38:26 -0800
    • Engine revision a67792536c
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/kdang/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • ANDROID_HOME = /Users/kdang/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/kdang/Library/Android/sdk
    • Java binary at: /Users/kdang/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/192.6200805/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.0, Build version 11A420a
    • CocoaPods version 1.8.0

[✓] Android Studio (version 3.6)
    • Android Studio at /Users/kdang/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/192.6200805/Android Studio.app/Contents
    • Flutter plugin version 43.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[!] IntelliJ IDEA Ultimate Edition (version 2019.3.3)
    • IntelliJ at /Users/kdang/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.42.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.8.1

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

! Doctor found issues in 1 category.

~/Documents/vietgag change-android-app-id* 10s
(base) ❯

my problem is similar to this issue https://github.com/flutter/flutter/issues/43302

Hi @wakandan
Please check out this DartPad Code Sample
Notice the console, can't reproduce this error
Thank you

Strings given to the text layout engine must be valid UTF-16.
Try representing the emoji as a Unicode escape sequence: '\u{1F617}'

Hi @wakandan
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore
reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any
more information for us; we will reopen it right away!
Thanks for your contribution.


RuntimeError when using nequip-evaluate

I'm trying to use nequip-evaluate with a different dataset read through a yaml file and with a deployed potential using the command:
nequip-evaluate --model deployed_it9.pth --dataset-config predict.yaml --output bulk_nn.xyz --batch-size 1
It command runs for a few configurations of data and then gives an error:
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/envs/py/bin/nequip-evaluate", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/envs/py/lib/python3.9/site-packages/nequip/scripts/evaluate.py", line 372, in main
    out = model(AtomicData.to_AtomicDataDict(batch))
  File "/home/ubuntu/anaconda3/envs/py/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: Unsupported value kind: Tensor

Hi @vaidishs ,
This is a known PyTorch bug we can trigger on PyTorch 1.10 that should be resolved by using 1.11 (see https://github.com/mir-group/allegro/issues/6)

Perfect. This fixed it. Thanks for the promo response.


Fix SegFault in CTS

My PDK lists clock buffer cell inputs as signal type clock rather than generic signal. What ends up happening is this code fails to set charBufIn leading to a null returned BTerm down the line and segfault.
This triggers an error if they are not found, and makes sure to include the clock type as a valid input port.

@maliberty I can't merge things in so you need to click the button whenever you're ready. I'm pretty sure the Mac failure is unrelated


image size is pushing displaying underneath tables

My profile image is showing as rather large and expands underneath the table next to it

adding the bootstrap class img-responsive seems to fix it


[PE-D][Tester E] [task select] Unsure of what commands are available

Description
It is not mentioned in the user guide what are the available commands for task select. Only managed to try out isComplete which is mentioned in the UG.

In the help message, it was mentioned that contains / contains description could be a possible command. However upon tasking, it returns "result is false" for supposedly valid commands

Labels: type.FeatureFlaw severity.Medium
original: shenyih0ng/ped#8

contains check if the selected item contains an attribute/field with the type of description.
Custom field can be added via

<selected item> field add <type> <value>
field add <g|u|t>/<index> <type> <value>

As of 1.4, we have enabled the display of attribute type by default for ease of visibility.


Zurb Foundation menu accessibility - submenu toggle button

What is missing?

I'm working on a project where there is a requirement for accessibility. I'm trying to test out multi level and responsive horizontal menus like below:
https://foundation.zurb.com/building-blocks/blocks/foundation-5-top-bar.html
https://codepen.io/k33k00/pen/BjBZjE
Functionality seems to be fine for keyboard accessibility except for one issue. When tabbing through the menu, hitting Enter on  opens a submenu, which prevents the default function of opening a page.
Why is it important?

This would be an important feature to make the menu accessable, otherwise those links cannot be accessed from the menu by keyboard.
Possible Solution

I need to use a toggle button next to the  to open the submenus (similar to the function of a hamburger menu button). Can Foundation be customized to include a toggle button for each submenu? A workaround would be fine. I'm fine with injecting s with JS as long as I can apply the toggle function. Otherwise I'll be using my own functions, but this menu is easier and it works better.
Context

Support for opening navigation menu links when using a keyboard.
Your Environment

Foundation version(s) used:
Browser(s) name and version(s):
Operating System and version (desktop or mobile):
Foundation for Sites 6
Chrome, Firefox, Opera, IE, Edge

Checklist (all required):

[ x] I have read and follow the CONTRIBUTING.md document.
[ x] There are no other issues similar to this one.
[ x] The issue title is descriptive.
[ x] The template is correctly filled.

https://foundation.zurb.com/sites/docs/accordion-menu.html#submenu-toggle
The accordion menu does add a toggle button, but it doesn't close the menu on blur/focusout. It also doesn't have hover support but I can add that in CSS:
a:hover > ul { display: block }
I'll also have to make it look like a horizontal menu again, I'll use this as a workaround for now.

Do I understand your issue correctly that you want the top level links inside the menu to work as actual links?