source:deploy<EMAIL_ADDRESS>malfunction

new version of CLI is not taking correctly package. For 190 existing metadata it's taking less than a half of it (around 60)
@7.74.1  - everything is taken and validated
@7.75 - only some subset is taken - hard to tell what exactly.

Maybe be related to #654 ?

@mehdisfdc - could be but this is for sure not all.
Possibly different type than CustomField has the same issue, because when I count entries in package without customFields, the value is still higher than is taken by CLI 7.75

@kkulig - Need more info.    What plugins do you have?  (sfdx plugins --core). What are the steps to reproduce this?  If you set the SFDX_MDAPI_TEMP_DIR environment variable to a directory and inspect the contents after a deploy can you see what's missing?


Infer main class if it isn't configured anywhere

Searches the build output for .class files with a main method. If more than one is found, or if one isn't found, it throws an error.
Fixes #189.

It would need to do the findMainClass for all the paths since there could
be multiple sourcesets.
On Wed, May 16, 2018 at 6:25 PM Tad Cordle<EMAIL_ADDRESS>wrote:

@TadCordle commented on this pull request.
In
jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/ProjectProperties.java
https://github.com/GoogleContainerTools/jib/pull/278#discussion_r188790561
:

@@ -46,21 +48,38 @@ String getMainClass(@Nullable String mainClass) {
if (mainClass == null) {
mainClass = getMainClassFromJarTask();
if (mainClass == null) {

   throw new GradleException(

       HelpfulSuggestionsProvider.get("Could not find main class specified in a 'jar' task")

           .suggest("add a `mainClass` configuration to jib"));

   gradleBuildLogger.info(

       "Could not find main class specified in a 'jar' task; attempting to "

           + "infer main class.");

   try {

     mainClass =

         MainClassFinder.findMainClass(

             project

This returns a list of Paths, how would I use it to get the root directory?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/GoogleContainerTools/jib/pull/278#discussion_r188790561,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEoLKvBO-ZtYuQWH90MK318HSTR6gLfIks5tzKd1gaJpZM4UB6PN
.


Selection by click/drag offset proportionally by scrolled amount on map.

Subject basically pins it. If you drag the scroll-bar to the right, then click/drag to select multiple objects, the selection box is proportionally offset by amount scrolled.
Duplicate of ( https://github.com/exodus4d/pathfinder/issues/533 )

I am experiencing the same issue.

It still happens on horizontal scrolling !

@Slivo-fr I can´t reproduce this on v1.3.0 Chrome v63

I do, on 1.3.0 chrome 63 too. On official host : http://g.recordit.co/N5M7sSmcpO.gif


Save dialog panics on macos

Repro

Open a new editor without having any folder open
Save the file

thread 'main' panicked at 'Attempted to construct an Id from a null pointer', /Users/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/objc_id-0.1.1/src/id.rs:62:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating with uncaught foreign exception

Repro with tauri
import * as dialog from "@tauri-apps/api/dialog";

// Doesn't crash
/* dialog.save({
  defaultPath: "~/Untitled"
}) */

// Crashes
dialog.save({
  defaultPath: "Untitled"
})

The fix should available in the next tauri version https://github.com/tauri-apps/tauri/pull/4028

fixed in tauri v1.0.0-rc.9


fail link to faq, updated to about

Description of PR
FAQ link changed to about
Checklist

[ yes ] Compiles and passes lint tests
[ yes ] Properly formatted
[ yes ] Tested on desktop
[ yes ] Tested on phone

Screenshots
Add relevant screenshots here

Do you mind replacing all the other links to /faq as well?

Hi have you had a look at the guidelines for contributing?
https://github.com/covid19india/covid19india-react/blob/master/CONTRIBUTING.md
Please do not raise a PR before you raise an issue and the issue gets assigned. Thank you!


Unable to run code in editor with c#

Tested versions

Reproducible in: 3.5.3.stable.mono

System information
Windows 10 - Godot 3.5.3.stable.mono - GLES2
Issue description
I'm unable to find any way to run code in the editor using c#. (it is just doesn't get executed)
Steps to reproduce
https://docs.godotengine.org/en/3.5/tutorials/plugins/running_code_in_the_editor.html
Minimal reproduction project (MRP)
MonoEditorCodeTest.zip

Issue resolved, its required to build solution to see changes.


Make API for other modules to use the Mod Selector display

Please make an API so that other modules can display stuff on the screen.
We discussed this already.  Sam was hoping to make a UI for Tweaks that would allow users to change settings in config files and the Mod Selector screen would be a great place to do that.  :)

Already mentioned in bug #12


Exporting with cuda doesn't work on nvidia jetson

First of all I should mention that I am using the NVIDIA Jetson Xavier
I am trying to export a the yollov8n.pt to onnx using the following command
python3 YOLOv8-TensorRT/export-det.py --weights yolov8n.pt --opset 11 --sim --device cuda:0
but when using --device cuda:0 I get the following error:

YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
Traceback (most recent call last):
File "YOLOv8-TensorRT/export-det.py", line 97, in
main(parse_args())
File "YOLOv8-TensorRT/export-det.py", line 72, in main
torch.onnx.export(
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/init.py", line 319, in export
return utils.export(model, args, f, export_params, verbose, training,
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/utils.py", line 113, in export
_export(model, args, f, export_params, verbose, training, input_names, output_names,
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/utils.py", line 734, in _export
params_dict = torch._C._jit_pass_onnx_deduplicate_initializers(graph, params_dict,
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument other in method wrapper__equal)

When I remove it, it exports normally.
After that I build it to tensorrt with the command
 python3 YOLOv8-TensorRT/build.py --weights yolov8n.onnx --device cuda:0
And I get the exported .engine file.
When I try to use it however:
model = YOLO("yolov8n.engine", task='detect')
detection_results = model(frame) #<--- got 'frame' from opencv video capture

I now get this error:

Traceback (most recent call last):
File "test_detect.py", line 45, in
detection_results = model(frame)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 99, in call
return self.predict(source, stream, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 218, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/predictor.py", line 227, in setup_model
self.model = AutoBackend(model,
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 160, in init
metadata = json.loads(f.read(meta_len).decode('utf-8'))  # read metadata
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 4: invalid continuation byte

I don't know if the second part is related to this repo but I thought I should mention both. Any insights would be much appreciated.

First question:
You'd better export onnx in your pc or laptop or using cpu.
Because jetson's pytorch may behave differently.
Second question:
The onnx and engine you export by my repo is an end2end model.
It contains nms plugin. So I won't work by yolov8 api such as :
model = YOLO("yolov8n.engine", task='detect')
detection_results = model(frame) #<--- got 'frame' from opencv video capture

You'd better try to use infer-det.py or infer-det-without-torch.py.
I am looking forward for your reply.

First of all I should mention that I am using the NVIDIA Jetson Xavier
I am trying to export a the yollov8n.pt to onnx using the following command
python3 YOLOv8-TensorRT/export-det.py --weights yolov8n.pt --opset 11 --sim --device cuda:0
but when using --device cuda:0 I get the following error:

YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
Traceback (most recent call last):
File "YOLOv8-TensorRT/export-det.py", line 97, in
main(parse_args())
File "YOLOv8-TensorRT/export-det.py", line 72, in main
torch.onnx.export(
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/init.py", line 319, in export
return utils.export(model, args, f, export_params, verbose, training,
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/utils.py", line 113, in export
_export(model, args, f, export_params, verbose, training, input_names, output_names,
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/utils.py", line 734, in _export
params_dict = torch._C._jit_pass_onnx_deduplicate_initializers(graph, params_dict,
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument other in method wrapper__equal)

When I remove it, it exports normally.
After that I build it to tensorrt with the command
 python3 YOLOv8-TensorRT/build.py --weights yolov8n.onnx --device cuda:0
And I get the exported .engine file.
When I try to use it however:
model = YOLO("yolov8n.engine", task='detect')
detection_results = model(frame) #<--- got 'frame' from opencv video capture

I now get this error:

Traceback (most recent call last):
File "test_detect.py", line 45, in
detection_results = model(frame)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 99, in call
return self.predict(source, stream, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 218, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/predictor.py", line 227, in setup_model
self.model = AutoBackend(model,
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 160, in init
metadata = json.loads(f.read(meta_len).decode('utf-8'))  # read metadata
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 4: invalid continuation byte

I don't know if the second part is related to this repo but I thought I should mention both. Any insights would be much appreciated.

First question:
You'd better export onnx in your pc or laptop or using cpu.
Because jetson's pytorch may behave differently.
Second question:
The onnx and engine you export by my repo is an end2end model.
It contains nms plugin. So It won't work by yolov8 api such as :
model = YOLO("yolov8n.engine", task='detect')
detection_results = model(frame) #<--- got 'frame' from opencv video capture

You'd better try to use infer-det.py or infer-det-without-torch.py.
I am looking forward for your reply.

closed, feel free to reopen it if you have further questions. Thanks!

First of all I should mention that I am using the NVIDIA Jetson Xavier
I am trying to export a the yollov8n.pt to onnx using the following command
python3 YOLOv8-TensorRT/export-det.py --weights yolov8n.pt --opset 11 --sim --device cuda:0
but when using --device cuda:0 I get the following error:

YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
Traceback (most recent call last):
File "YOLOv8-TensorRT/export-det.py", line 97, in
main(parse_args())
File "YOLOv8-TensorRT/export-det.py", line 72, in main
torch.onnx.export(
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/init.py", line 319, in export
return utils.export(model, args, f, export_params, verbose, training,
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/utils.py", line 113, in export
_export(model, args, f, export_params, verbose, training, input_names, output_names,
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/utils.py", line 734, in _export
params_dict = torch._C._jit_pass_onnx_deduplicate_initializers(graph, params_dict,
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument other in method wrapper__equal)

When I remove it, it exports normally.
After that I build it to tensorrt with the command
 python3 YOLOv8-TensorRT/build.py --weights yolov8n.onnx --device cuda:0
And I get the exported .engine file.
When I try to use it however:
model = YOLO("yolov8n.engine", task='detect')
detection_results = model(frame) #<--- got 'frame' from opencv video capture

I now get this error:

Traceback (most recent call last):
File "test_detect.py", line 45, in
detection_results = model(frame)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 99, in call
return self.predict(source, stream, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 218, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/predictor.py", line 227, in setup_model
self.model = AutoBackend(model,
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 160, in init
metadata = json.loads(f.read(meta_len).decode('utf-8'))  # read metadata
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 4: invalid continuation byte

I don't know if the second part is related to this repo but I thought I should mention both. Any insights would be much appreciated.

I also deployed on Jetson and encountered the same problem as you. How did you solve it? Thank you

First of all I should mention that I am using the NVIDIA Jetson Xavier
I am trying to export a the yollov8n.pt to onnx using the following command
python3 YOLOv8-TensorRT/export-det.py --weights yolov8n.pt --opset 11 --sim --device cuda:0
but when using --device cuda:0 I get the following error:

YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
Traceback (most recent call last):
File "YOLOv8-TensorRT/export-det.py", line 97, in
main(parse_args())
File "YOLOv8-TensorRT/export-det.py", line 72, in main
torch.onnx.export(
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/init.py", line 319, in export
return utils.export(model, args, f, export_params, verbose, training,
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/utils.py", line 113, in export
_export(model, args, f, export_params, verbose, training, input_names, output_names,
File "/home/user/.local/lib/python3.8/site-packages/torch/onnx/utils.py", line 734, in _export
params_dict = torch._C._jit_pass_onnx_deduplicate_initializers(graph, params_dict,
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument other in method wrapper__equal)

When I remove it, it exports normally.
After that I build it to tensorrt with the command
 python3 YOLOv8-TensorRT/build.py --weights yolov8n.onnx --device cuda:0
And I get the exported .engine file.
When I try to use it however:
model = YOLO("yolov8n.engine", task='detect')
detection_results = model(frame) #<--- got 'frame' from opencv video capture

I now get this error:

Traceback (most recent call last):
File "test_detect.py", line 45, in
detection_results = model(frame)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 99, in call
return self.predict(source, stream, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 218, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/predictor.py", line 227, in setup_model
self.model = AutoBackend(model,
File "/home/user/.local/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 160, in init
metadata = json.loads(f.read(meta_len).decode('utf-8'))  # read metadata
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 4: invalid continuation byte

I don't know if the second part is related to this repo but I thought I should mention both. Any insights would be much appreciated.

First question:
You can change the versions of Torch and Torchvision.
My environment is installed on Jetson:
When reporting an error, in the Conda environment, torch=1.12.1 and torch vision=0.13.0 were changed to torch=2.0.0 and torch vision=0.15.1, which resolved this error.
Second question:
The onnx and engine you should export by yolov8 api such as :
model = YOLO("yolov8n.engine", task='detect') detection_results = model(frame) #<--- got 'frame' from opencv video capture
If using trtexec to export the engine, this error message will appear


Lots of old msal entries in local storage

Library

[x ]<EMAIL_ADDRESS>[x ]<EMAIL_ADDRESS>
Description
I'm seeing lots of "msal.acquireTokenUser" in storage. I suspect there is only supposed to be one?
There were two issues open on this already, #327 and #527.
MSAL Configuration

export const config = {
  auth: {
    clientId: 'clientIdGUID',
    authority: 'https://login.microsoftonline.com/authorityGUID',
    validateAuthority: true,
    redirectUri: 'http://localhost:3000',
    postLogoutRedirectUri: 'http://localhost:3000',
    navigateToLoginRequestUrl: true
  },
  cache: {
    cacheLocation: 'localStorage'
  },
  scopes: {
    loginRequest: ['openid', 'profile']
  },
  resources: {
    microsoftGraphApi: {
      resourceUri: 'https://graph.microsoft.com/v1.0/me',
      resourceScope: 'user.read'
    },
    resourceApi: {
      resourceUri: 'https://localhost:44301/api',
      resourceScope: 'api://resourceGUID/access_as_user'
    }
  }
}

Angular usage
 ngOnInit(): void {
    this.checkoutAccount()
    this.subs.add(
      this.broadcastService.subscribe('msal:loginSuccess', () => {
        this.checkoutAccount()
      })
    )

    this.subs.add(
      this.broadcastService.subscribe('msal:acquireTokenFailure', () => {
        this.authService.loginRedirect()
      })
    )

    this.authService.handleRedirectCallback((authError, response) => {
      if (authError) {
        this.authService.loginRedirect()
        return
      }
    })
    this.authService.setLogger(
      new Logger(
        (logLevel, message, piiEnabled) => {
        },
        {
          correlationId: CryptoUtils.createNewGuid(),
          piiLoggingEnabled: false
        }
      )
    )
    if (!this.loggedIn) {
      this.authService.loginRedirect()
    }
  }

  checkoutAccount(): void {
    this.loggedIn = !!this.authService.getAccount()
  }

Result

Reproduction steps
Check issue #327
Expected behavior
The msal library should be cleaning up the local storage and only keeping around what it needs.
Browsers/Environment

[x ] Chrome

@bankszorsqt Can you provide your configurations and msal usage? Also, is it possible for you to test with version 1.3.4 rather than 1.4.0? We've seen a few problem with 1.4.0 and this could be tangentially related.

Hi @jmckennon I have updated the issue as you requested. I hope it gives more context now. (*note that I have changed some values of config for security reasons, GUID parts.)

@bankszorsqt Have you been able to consistently reproduce this problem? If so, what are the steps? We haven't seen anything like this with our sample apps.

@jmckennon Well, it happens over time, local storage gets bigger each time the user gets logged in. (around 50 rows are added each time). Also, might be worth mentioning, we are sending a bearer token with each API request.

Since I'm unable to reproduce this, have you done any debugging or network tracing to determine why there may be so many entries or why they aren't getting deleted? You can send a fiddler trace to the email on my profile if you see anything suspicious.


Compare UKBB variant RF on gnomAD with gnomAD variant RF on UKBB

Is this task still relevant/needed?

I think maybe this was because when we have the gnomAD v4 variant QC, if RF looks good, we might want to see how well the UKB model would perform on the gnomAD v4 data and how well the a full training (or maybe even a training without the UKB data) performs on just the UKB data?

closing because of Julia's comment ("if RF looks good") -- we chose AS VQSR for v4


[Refact](inverted index) use boost regex to resolve stack overflow issues

Proposed changes
Issue Number: close #xxx
Switch to Boost.Regex to resolve stack overflow issues
Modified the parse function to use Boost.Regex instead of std::regex due to stack overflow problems encountered with complex regex processing. This change aims to improve the reliability and efficiency of the parsing operation.
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


Why I can perform the pull and push operation, but in the harbor has uploaded image web page can't see

If you are reporting a problem, please make sure the following information are provided:
1)Version of docker engine and docker-compose.
root@uk234:~# docker --version
Docker version 17.03.2-ce, build f5ec1e2
root@uk234:~# docker-compose --version
docker-compose version 1.17.0, build ac53b73
2)截图

3)Log files, you can get them by package the /var/log/harbor/ .
2017-11-08.zip

It is the database table version is not compatible with the program, please refer migrate guide to upgrade the database.
I checked the ui.log, found error message "failed to add access log: Error 1054: Unknown column 'username' in 'field list'".


Typescript JSONB datatype on a model?

Trying to type a model. How can I use JSONB sequelize postgres type?
Keep in mind sequelize-typescript does not provide typings for sequelize - these are seperate things. A lot of the types in sequelize-typescript augment, refer to, or extend what sequelize already has.
`@Table({ modelName: "Userprefs", tableName: "userprefs" })
export default class UserPrefs extends Model {
@PrimaryKey
@Column({ field: "id", autoIncrement: true })
id!: number;
@Column({ field: "docid" })
docId!: string;
@CreatedAt
@Column({ field: "created_on" })
createdOn!: Date;
@Column({ field: "prefs" })
prefs!: DataTypes.JSONB;
}`
It doesn't like how I'm referring to JSONB. Can anyone help?

@Column(DataType.JSONB)
prefs!: object;

Naturally, prefs might want to follow a certain structure rather than an arbitrary object (meaning, use a more specific type).

@oldmud0 I am definitely interested in the underscored option. Where can I find more info?

See http://docs.sequelizejs.com/manual/models-definition.html#configuration:

  // Will automatically set field option for all attributes to snake cased name.
  // Does not override attribute with field option already defined
  underscored: true,

Closing this since it's solved

Thanks!


admission webhook denies request to delete Tenant

Bug description
Cannot delete Tenant anymore
How to reproduce
In Ginkgo test, we get an error when deleting a Tenant object:
Error from server: admission webhook "tenants.capsule.clastix.io" denied the request: Tenant.capsule.clastix.io "forza" not found
Test code
err := k8s.KubectlApplyFromStringE(f.GetT(), k8sOptions, tenant)
		gomega.Expect(err).Should(gomega.BeNil())
		// Create tenant
		tenantCreated, createErr := k8s.RunKubectlAndGetOutputE(f.GetT(), k8sOptions, "get", "tenant", "forza", "-otemplate='{{.status.state}}'")
		gomega.Expect(createErr).Should(gomega.BeNil())

		//Check if tenant is Active
		assert.Contains(f.GetT(), tenantCreated, "Active")
		time.Sleep(10 * time.Second)

		// Cleanup tenant
		tenantDelete, deleteErr := k8s.RunKubectlAndGetOutputE(f.GetT(), k8sOptions, "delete", "tenant", "forza")
		assert.Contains(f.GetT(), tenantDelete, "deleted")
		gomega.Expect(deleteErr).Should(gomega.BeNil())

This worked with older versions on Capsule.
According to the admission webhook the tenant object does not exist, but form my kubectl promt I can just see and delete it....
Falling back from chart 0.4.2 to 0.4.0 it works...
Probably related to this PR:
https://github.com/clastix/capsule/pull/736/files
Expected behavior
no error, delete Tenant
Additional context

Capsule version: 0.3.1 (newest)
Helm Chart version:  0.4.2

Also, it would be really helpful to have further logs from Capsule to understand if we got a stack trace somewhere.

I tried to replicate your issue, although in a different way:
NAME    NAMESPACE       REVISION        UPDATED                                         STATUS          CHART           APP VERSION
capsule capsule-system  1               2023-05-25 14:40:22.855681171 +0200 CEST        deployed        capsule-0.4.2   0.3.1

$: cat /tmp/tnt.yaml
apiVersion: capsule.clastix.io/v1beta2
kind: Tenant
metadata:
  name: forza
spec:
  owners:
  - kind: User
    name: alice

$: kubectl apply -f /tmp/tnt.yaml
tenant.capsule.clastix.io/forza created

$: kubectl get tnt
NAME    STATE    NAMESPACE QUOTA   NAMESPACE COUNT   NODE SELECTOR   AGE
forza   Active                     0                                 7s
$: kubectl delete tnt forza
tenant.capsule.clastix.io "forza" deleted

To double-check I verified the handlers for the tenants.capsule.clastix.io route and there are no API client operations, also considering that the Delete functions are returning nil, eventually skipping any manipulation.

@atamgp did you have the chance to review my latest messages? I'm here to help you!

@prometherion thanks for the support. The issue has been solved. We had a version mistake on our side.


Code refactor

This PR aims at cleaning the code and create a proper directory structure for maintenance.

@RamolaWeb Would you like to review this PR?

@RamolaWeb Can you try running the script again and verify here if everything looks good?
Then we can merge this.

Hi @RamolaWeb Please let me know here once you verify these changes, and I'll merge them in!
Thanks!

@CuriousLearner  Everything look good , I have Tested the Code till here and everything look correct . The linking in the pdf is not working but it may be the problem of the library. I think we can merge here to add new feature to it.

@RamolaWeb Yes, that's an issue as we've seen on the repo of wkhtmltopdf.
I'll merge this in, so that next tasks could be worked upon.
Thanks for the help!


control_plane: add debug APIs for force-dropping tenant/node

Problem
Summary of changes
Checklist before requesting a review

[ ] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.
[ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
[ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

[ ] Do not forget to reformat commit message to not include the above checklist

I would still prefer something further than "drop" in the name. Debug is one thing. Maybe force_drop?

I think the difference will be more obvious when we have the actual delete APIs for node: there will be a DELETE /control/... option and a POST /debug/... option, hopefully it will be pretty obvious that the debug one is not a graceful thing.  Although it actually isn't that un-graceful, as after dropping a node the background reconciler will end up repairing any tenants that were using it.

It's also an issue with how you refer to it in documentation and when you talk about it: drop vs delete is easier to mix up than force_drop and delete I think.


Duplicates in Localizable.xcstrings in 0.2.0

Hi!
After updating to 0.2.0 of xcstrings-tool-plugin (I use plugin in swift packages inside Xcode project), I've noticed that after build my Localizable.xcstrings  were modified by additional strings which duplicates Default Localization values.
I should mention that code base does not have those strings. Catalogs are the source of truth with manual management and used by .localizable.someKey syntax

I found out the exact commit with broken changes https://github.com/liamnichols/xcstrings-tool/commit/15acd617654bc5d903f1a34fd4567b9c90c5787f
So far I fixed the previous commit revision in my project and there is no such issue.
My Xcode version 15.3 and // swift-tools-version: 5.10 in SPM packages.

Thanks for raising this, i'll take a look! Is your .xcstrings catalog in a Swift Package target, or an Xcode project target?

(I use plugin in swift packages inside Xcode project)

Oh I see, thanks for confirming.. You might be able to benefit here from disabling the automatic extraction via build settings:
https://swiftpackageindex.com/liamnichols/xcstrings-tool/0.2.0/documentation/documentation/integrating-xcstrings-tool-into-an-xcode-project-target#Configuring-Build-Settings
But it's strange that it started happening in 0.2.0 and not before, probably because I changed the way that the code was generated and Xcode now sees the defaultValue that I pass into the struct initailiser.
I have an idea how to work around this though that I will look into.

I think that I have a better fix for this in #67... If you can test using the ln/compute-default-value-args branch, that would be helpful 👍

@liamnichols thank you for a really quick response! 👏
I switched to ln/compute-default-value-args branch and checked it out.
There are no duplicates now, but every Localizable.xcstrings file are modifying by adding one empty string.
It seems your fix definitely solves duplicating 🔥, but probably needs a little polishing 😊

p.s.
These settings in my main target/project set as recommended:
LOCALIZATION_PREFERS_STRING_CATALOGS): YES
LOCALIZED_STRING_SWIFTUI_SUPPORT): NO
SWIFT_EMIT_LOC_STRINGS: NO

Thanks for sharing! I'll look into this more tonight and try to replicate it myself 👍

Hi again @c0dedbear, I've found a way to avoid this and pushed a new commit to ln/compute-default-value-args.
I think I verified it in the demo app, but if you want to double check that it fixes the issue then please do! Thanks

@liamnichols Confirm, everything is good in my project now, thanks!
When do you plan the next release?

Great, thanks for confirming!
I'll delete that branch now, so please switch to main in the meantime. I'll release a new version either tonight or tomorrow.
Thanks again!

Released in 0.3.0 🚀


Handle locality in eventstore and projections

As a ZITADEL customer I want to be able to choose the region where ZITADEL runs.
Acceptance Criteria

[ ] The eventstore stores the locality as separat column
[ ] The locality is taken from the context sent in the request
[ ] The projections have a locality column
[ ] The "old views" have a locality column

from Cockroachdb v22.1: https://www.cockroachlabs.com/docs/releases/v22.1.html

CockroachDB now turns on support for hash-sharded indexes in implicit partitioned tables. Previously, CockroachDB blocked users from creating hash-sharded indexes in all kinds of partitioned tables including implicit partitioned tables using PARTITION ALL BY or REGIONAL BY ROW. Primary keys cannot be hash-sharded if a table is explicitly partitioned with PARTITION BY or an index cannot be hash-sharded if the index is explicitly partitioned with PARTITION BY. Partitioning columns cannot be placed explicitly as key columns of a hash-sharded index, including regional-by-row table's crdb_region column. #76358

eventstore.events has a hash-shareded index

Will close this issue as this is planned differently at the moment


New formula: Preview jupyter files (.ipynb) from Finder.

Hi,
I've created simple quick look plugin that previews jupyter notebooks (know also as python notebooks. (https://jupyter.org).

We have depends_on for dependencies, don’t ask users to install them manually when you don’t have to.
However, I don’t really like that you’re asking so much, like specific environments, for so little (a quicklook plugin). I’m more inclined to refuse the cask, to be honest, but will have to think a bit.

This quick look plugin is just wrapper for nbconvert module, so I need it.

For the record, I'm fine with including this as long as the caveats are cleaned up. Adding a depends_on for python3 would be overkill, though, as there are plenty of ways to install Python (I use pyenv, for example).

Here’s what I was thinking: if you cleanup the caveat to only mention what is needed (and don’t specify how to install), then I’m fine with it. If you add a file to your repo with further instructions (like how to install the dependencies) then I’d also be fine with having a link to it in the caveat as well.

@jendas1 Change the caveat to caveats 'You need python 3 and the nbconvert module to use this plugin. an we can merge this in.

Thank you for the contribution. Fixed and merged in a different commit.


Why depend on appcompat-v7:21.0.3

can it be appcompat-v7:21.+ in build.gradle?

Android Studio gives you warnings if you do that. There's lots of reasons not to do that.

But when I use an old appcompat-v7, such as 21.0.2, I need to update my sdk for using this. BTW, google's opensource application use + too. link: https://github.com/google/iosched/blob/master/android/build.gradle

Sorry, I had a few complaints that I was using a +. It's insecure to use that.


Change EditColorModal showBaseColorPicker default to true from false

Summary
Pull request to fix issue 66.  This PR changes setShowBaseColorPicker default from false to true, to ensure the colorpicker is displayed correctly when the edit color modal is opened.
Description
When a color in the editor is opened for edit, the EditColorModal doesn't initially display the colorpicker.  This is a result of no color (base / hover / active) being assigned to be displayed in the colorpicker.  This PR changes the setShowBaseColorPicker to default to true, thus ensuring that when the edit modal is displayed, the base color appears in the color picker.

Looks good to me, thanks @prichter!


OffsetDateTime is wrongly handled

Hello,
Problem:
I think that  #64 is handling OffsetDateTime wrongly. I understand that LocalDateTime is converted into UTC to give the responsibility to the client and handle time information uniformly on the server side, even though I think it is none of the libraries business to determine the timezone because you should use the JVM default timezone by TimeZone.getDefault() and let the library consumers determine what they want. Anyway, my point is that at least OffsetDateTime is UTC with an additional information about the offset. Sometimes it is necessary to give the server timezone information from the client side. Right now the library erases offset information by converting it to UTC offset. I think there is a misunderstanding about how OffsetDateTime works [1].
Not 100% sure but I think the following code in Scalars.java causes this behavior:
public static final GraphQLScalarType GraphQLOffsetDateTime = temporalScalar(OffsetDateTime.class, OffsetDateTime::parse, i -> i.atOffset(ZoneOffset.UTC));
Example:
When passing the following argument to the server 2007-12-03T10:15:30+01:00, it will be converted to 2007-12-03T09:15:30Z which erases the information about the original offset.
Solution:
Please use OffsetDateTime as it is desgined for and do not convert to UTC offset. That way you give the client a way to pass offset information.
Edit:
OffsetTime is handled correctly.
[1] https://stackoverflow.com/questions/49773155/convert-utc-time-as-per-offset-in-java-8

After investigating the whole day I realized the problem is not the GraphQLScalarType GraphQLOffsetDateTime in the class Scalars but the internal Jackson ObjectMapper which has config props, e.g. WRITE_DATES_AS_TIMESTAMPS and ADJUST_DATES_TO_CONTEXT_TIME_ZONE with default true. A custom Scalar mapper won't help if you use the Spring Starter because it creates its own ObjectMapper ignoring the Spring Jackson ObjectMapper config.
As this is a very hard to investigate I want to show an example for future readers. The following solution uses the Spring ObjectMapper and injects it in a new JacksonValueMapper which in turn can be configured via application properties:
  @Bean
  public ValueMapperFactory valueMapperFactory() {
    return (abstractTypes, environment) -> JacksonValueMapperFactory.builder()
        .withPrototype(mapper).build()
        .getValueMapper(abstractTypes, environment);
  }

I think the Starter should use the Spring ObjectMapper if it exists but it's not part of this project. So I'll close this issue here and create another one there.


test: Add zero CPU limits to expiration

Fixes #N/A
Description

Add zero CPU limits instead removing nodepool limits

How was this change tested?

Tested Locally

Does this change impact docs?

[ ] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[x] No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 79.121%

Totals

Change from base Build<PHONE_NUMBER>7:
0.0%

Covered Lines:
5942

Relevant Lines:
7510

💛  - Coveralls


pluginlib: 1.10.5-0 in 'kinetic/distribution.yaml' [bloom]

Increasing version of package(s) in repository pluginlib to 1.10.5-0:

upstream repository: https://github.com/ros/pluginlib
release repository: https://github.com/ros-gbp/pluginlib-release.git
distro file: kinetic/distribution.yaml
bloom version: 0.5.25
previous version for package: 1.10.4-0

pluginlib
* Merge pull request #47 <https://github.com/ros/pluginlib/issues/47> from ros/fix_conversion
  fix size_t to int conversion
* fix int conversion
* Contributors: Mikael Arguedas

waiting for other packages...

Good to go, feel free to merge if no sync planned


Handling optional properties of shapes

Currently, when properties like 'stroke_color' are omitted in shapes, the code behaves unexpectedly by using a random value. This behavior is undesirable. We need a better approach to handle optional properties like 'stroke_color.'
I have two ideas in mind:

Using Default Values: Instead of relying on random values, we can set default values for optional properties like 'stroke_color.' If a property is not explicitly set, it defaults to a specific value (e.g., transparent or a predefined color).

Using Pair Structure: We can create a pair structure for each optional property. This structure would include the property itself and a logical flag indicating whether it has been set.

While the first one is easy and straightforward, it will involve a lot of unnecessary operations and will bloat the resulting SVG.
The second one would work better, but I feel like it is not a very clean approach.
I would like your opinion on how to handle them.

Without having done a lot of research, the first solution appears more straightforward.
I do not know whether "bloated" SVGs are a serious problem. If so maybe you can transfer the logic of what attributes should be added into the method..
This would on the one hand increase the amout of source code in the canvas classes, but on the other hand this logic would be hidden from a user of the library.
Maybe you should wait for other suggestions.


SpringMvcContract support parse params

Previously, SpringMvcContract did not support parsing the params parameter of @RequestMapping.
Example:

Define a rest interface that uses the params parameter：

@PutMapping(value = "/user", params = "action=disable")
public String disableUser() {
    return "user";
}

Define a FeignClient to call the previously declared interface：

@FeignClient("user-server")
static interface UserService {
    @PutMapping(value = "/user", params = "action=disable")
    String disableUser();
}

When sending this request, the request path will be resolved to /user instead of /user?action=disable, resulting in 400 errors.
Therefore, this PR provides the ability to parse params parameter。

@Puppy4C Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@Puppy4C Thank you for signing the Contributor License Agreement!

@Buzzardo could you please review the documentation changes?

Hi @OlgaMaciaszek，Done


Add CODEOWNERS and Fix deletion mapping leaking

Ping also @jacogr

I'm going to try to get done 100% coverage for this.

@sorpaas I think @twittner is currently writing a test spec for this contract (created from this branch). Maybe it's better to sync up with him?

Ah okay. @twittner let me know if there's anything I can help!

Thanks @sorpaas, I haven't completed the tests yet. Work in progress is here: https://github.com/twittner/token-registry/tree/tests


[SVC-3415] Add VPA to singleton instances

Motivation
There are a few singleton instances that Rivet relies on. These instances cannot be scaled horizontally, so should be configured to scale vertically as needed.
From SyncLinear.com | SVC-3415

Out of sync with Linear


Add link from README.md to Marathon UI page

to give the documentation the deserved visibility.

Insanely great!

Oh yeah, thanks!


hello brother

@chinoogawa hello brother. do you have any file.py example
get_number.py https://www.facebook.com/jim
get_location.py https://www.facebook.com/jim/photos/2332323442
thank

get_email.py  https://www.facebook.com/jim. also needed

Nice tool, great work!

@ziflar ?

@glerinsonum
what help did you want??

@ziflar
What I can do I with those python scripts.
First to open main.py or to install setup.py
There no documentation ?

@ziflar Hello brother of good. Tell me. How I can install or open your script.
because python 2.7.3 does not have PIP

Hey guys, at 2 years ago, I was run this tool, and each time @chinoogawa  release some features to enhance this tool. Now I want to extract some content of user account such as likes and opened links to put in an algorithm of intelligence artificial to recommend content and for other way,  try to have some characteristic of personality. My question is: Considering some recents  changes of this tool and Facebook platform is possible use this tool to extract the content mentioned of an user?

@f35 Hola Amigo, See this link.
https://github.com/advenium/

@glerinsonum, I was review https://github.com/advenium/ but I  need more information about this tools to will ejecute or understand it.

@f35 You have need to contact with an web or app developer to help you with this contain.

hello brother i have to ask you somthing could you reply the instruction of how to install this app and how to use it ... if you want of course

@ziflar How I can Integrate this python programming script into Maltego as Transform as module. Cordially thank you.

@dzmaster

@dzmaster

@dzmaster download OpnOsnt https://ufile.io/s6c4d and share.

@f35 Use Maltego CE. from Paterva.com


Increased size of zip buffer.

Hi,
As discussed in #25, AWS Lambda supports uploading zip sizes of up to 50MB [1] so it makes sense to
support zip files of up to that size with node-lambda.
Cheers & thanks again for your work :)
Darian

Thanks for this!

This is now available in 0.6.2


Bug Fix bugs for scan node and join node

Proposed changes
Issue Number: close #xxx
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[ ] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[ ] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[ ] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 35.06 seconds
load time: 669 seconds
storage size:<PHONE_NUMBER>8 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221219052941_clickbench_pr_64893.html


chmod failed when mountInotify is enabled

Overview
After enabling the mountInotify feature, files on virtiofs faied to chmod under specific conditions.
I tried some debugging but could not figure out the cause.
Environment

MacBook Pro(Apple M3)
macOS 14.5(Sonoma)

$ limactl --version
limactl version 0.22.0

$ uname -v
Darwin Kernel Version 23.5.0: Wed May  1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031

Steps to reproduce
1. Create a template file
debug-inotify.yaml
vmType: "vz"
networks:
- vzNAT: true
mountType: "virtiofs"
mountInotify: true

images:
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240423/ubuntu-24.04-server-cloudimg-arm64.img"
  arch: "aarch64"
  digest: "sha256:c841bac00925d3e6892d979798103a867931f255f28fefd9d5e07e3e22d0ef22"

mounts:
- location: "~"
  writable: false
- location: "/tmp/lima"
  writable: true
containerd:
  system: false
  user: false

2. Create a VM
$ limactl start --name=debug-inotify ./debug-inotify.yaml

$ limactl shell debug-inotify
kuro@lima-debug-inotify:~$ sudo apt -y install unzip
kuro@lima-debug-inotify:~$ exit

3. Download zip file(ex. terraform) and extract
$ limactl shell debug-inotify
kuro@lima-debug-inotify:~$ cd /tmp/lima/
kuro@lima-debug-inotify:/tmp/lima$ wget https://releases.hashicorp.com/terraform/1.9.0/terraform_1.9.0_darwin_arm64.zip
kuro@lima-debug-inotify:/tmp/lima$ ls
terraform_1.9.0_darwin_arm64.zip

kuro@lima-debug-inotify:/tmp/lima$ unzip terraform_1.9.0_darwin_arm64.zip
Archive:  terraform_1.9.0_darwin_arm64.zip
  inflating: LICENSE.txt
  inflating: terraform               fchmod (file attributes) error: Operation not permitted
 (warning) cannot set modif./access times
          Operation not permitted

kuro@lima-debug-inotify:/tmp/lima$ ls -l
total 110920
-rw-rw-r-- 1 kuro kuro     4922 Jun 27 00:59 LICENSE.txt
-rw-r--r-- 1 kuro kuro 87853264 Jun 27 22:04 terraform
-rw-r--r-- 1 kuro kuro 25718506 Jun 27 18:56 terraform_1.9.0_darwin_arm64.zip

kuro@lima-debug-inotify:/tmp/lima$ chmod +x ./terraform
kuro@lima-debug-inotify:/tmp/lima$ ls -l
total 110920
-rw-rw-r-- 1 kuro kuro     4922 Jun 27 00:59 LICENSE.txt
-rwxr-xr-x 1 kuro kuro 87853264 Jun 27 22:04 terraform
-rw-r--r-- 1 kuro kuro 25718506 Jun 27 18:56 terraform_1.9.0_darwin_arm64.zip

The error fchmod (file attributes) error: Operation not permitted occurred and the binary terraform does not have executable flag. However, after chmod +x manually, it have executable flag.
Debug
strace
kuro@lima-debug-inotify:/tmp/lima$ strace unzip terraform_1.9.0_darwin_arm64.zip
...[snip]

read(3, "\351\273\215\23\214\344\202\335\373y\302\366\326\300\241Q\216\356X\30\221\204\362\304\240\10\30\30\tK\360 "..., 8192) = 3818
write(4, "\2\270\374\t\365\343\362<\373:8\3335\360\306Q\376?\245j`coL\272\202\234\360\30r\374\247"..., 35024) = 35024
fchmod(4, 0100755)                      = -1 EPERM (Operation not permitted)
dup(2)                                  = 5
fcntl(5, F_GETFL)                       = 0x2 (flags O_RDWR)
fstat(5, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
write(5, "fchmod (file attributes) error: "..., 56fchmod (file attributes) error: Operation not permitted
) = 56
close(5)                                = 0

...[snip]

fchmod(4, 0100755) = -1 EPERM (Operation not permitted) seems failed to chmod.
Customize guestagent
I implemented three types of function HandleInotify.
https://github.com/lima-vm/lima/blob/38c62c5e815fdc93e6e88543be1eb9ef7699eaf5/pkg/guestagent/guestagent_linux.go#L337-L346
a. Remove os.Ctimes()
This causes the same issue.
func (a *agent) HandleInotify(event *api.Inotify) {
	location := event.MountPath
	if _, err := os.Stat(location); err == nil {
		logrus.Infof("inotify handle. Event: %s", event)
	}
}

b. Remove everything
This does NOT cause problems.
func (a *agent) HandleInotify(event *api.Inotify) {
	logrus.Infof("inotify handle. Event: %s", event)
}

c. Insert delay before os.Stat()
This does NOT cause problems. (100ms is bad, but 500ms or later is ok)
func (a *agent) HandleInotify(event *api.Inotify) {
	location := event.MountPath
	go func(){
		time.Sleep(500 * time.Millisecond)
		if _, err := os.Stat(location); err == nil {
			logrus.Infof("inotify handle. Event: %s", event)
		}
	}()
}

The reason for adding os.Ctimes() is to simulate a modification. Only then guest can understand that a change happened for that file

As a result, I have noticed that chmod fails regardless of whether or not os.Ctimes() is done.
Exactly, this is what i was expecting. Our code related to inotify should not have any impact in unzip flow. This will be mostly a change needed from unzip itself or the mount type (virtiofs / 9p) doesn't support it.
FYI: I tried to decompress a tar.gz file with permission and this was working fine

I reproduced with tar.gz.
Perhaps it has something to do with file size. Small file sizes(e.g. 1KB) did not cause errors.
kuro@lima-debug-inotify:/tmp/lima$ dd if=/dev/urandom of=test.bin bs=50M count=1
1+0 records in
1+0 records out
52428800 bytes (52 MB, 50 MiB) copied, 0.110755 s, 473 MB/s
kuro@lima-debug-inotify:/tmp/lima$ chmod +x test.bin
kuro@lima-debug-inotify:/tmp/lima$ tar zcvf test.tar.gz test.bin
test.bin
kuro@lima-debug-inotify:/tmp/lima$  tar zxvf ./test.tar.gz
test.bin
tar: test.bin: Cannot utime: Operation not permitted
tar: Exiting with failure status due to previous errors

strace result:
kuro@lima-debug-inotify:/tmp/lima$ strace tar zxvf ./test.tar.gz
...[snip]

write(4, "\3519\34a\244\2300\4\304\236GO\202\241\256\vK\361\213\224v\250\355x\341\237\204Se\373-\355"..., 512) = 512
utimensat(4, NULL, [UTIME_OMIT, {tv_sec=1719503700, tv_nsec=0} /* 2024-06-28T00:55:00+0900 */], 0) = -1 EPERM (Operation not permitted)
write(2, "tar: ", 5tar: )                    = 5
write(2, "test.bin: Cannot utime", 22test.bin: Cannot utime)  = 22
write(2, ": Operation not permitted", 25: Operation not permitted) = 25

tar throws for utime only. But the file should be unzipped with proper permission


getApplicableRefactors on file with recursive types freezes TSServer

TypeScript Version:  3.1.0-dev.20180901

Search Terms: none
When working on a file with several recursive types, the TSServer process got stuck in an endless loop and continued building up memory. Later this error showed up in the error console in VSCode:
[Info  - 10:12:55 AM] Using tsserver from: c:\Users\domin\Documents\Visual Studio 2017\Repositories\shared-utils\node_modules\typescript\lib
[Error  - 10:12:55 AM] 'getApplicableRefactors' request failed with error.
Error: Service died.
	at TypeScriptServiceClient.serviceExited (c:\Users\domin\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\out\typescriptServiceClient.js:413:32)
	at ChildProcess.handle.onExit (c:\Users\domin\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\out\typescriptServiceClient.js:326:30)
	at emitTwo (events.js:131:20)
	at ChildProcess.emit (events.js:214:7)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

Related Issues: #26155

Cannot reproduce atm, closing for now.


Class Analyzer Not Initialized in Auto Analysis

OS: Windows 64bit
Ghidra Version: 9.2_DEV (3c683ae770cf495deb32588202b00b88e125a4a4)
CPP_Class-Analyzer Version: 9.2_DEV (50e375d911ce4b3f6ccc5f92a072ccf27da51dc1)
Describe the bug
Building the most recent version of Ghidra and this extension (50e375d911ce4b3f6ccc5f92a072ccf27da51dc1) and running Auto Analysis doesn't produce any results in the ClassInfoType Tree - not even a DataType category to populate. This was tested with a random ELF binary, as well as several of the tests from https://github.com/astrelsky/InheritanceTests including some x86 files and mingw32-w64 files. I've got a script I use to build Ghidra and this extension attached below - this is run using the Git for Windows SDK. Flex and Bison are included with the SDK, and Gradle 5.6.3 was added manually.
To Reproduce
Steps to reproduce behavior:

Build Ghidra
Build Extension
Install Extension
Restart Ghidra
Configure extension in Code Browser
Restart Code Browser
Try to decompile any executable (as far as I'm aware). Easy test is to try libstdc++.so.6.
Check the ClassInfoType Tree Window - there isn't any category or anything

Expected Behavior
Using the 2.0-alpha.3 release of this extension with the most recent build of Ghidra, running the auto-analysis even with default settings results in a Data Type category with the name matching the name of the file being examined, and as the analysis continues it populates with class information. This doesn't happen in the most recent build.
Additional Information
Looking through the commits since the 2.0-alpha.3 it looks like there was quite a bit of refractoring with the extension classes. I'm going to create an actual dev environment with Eclipse to see if I can step through any of this to try and figure it out. I'm pretty bad at programming (as I'm sure will be evidenced by the batch script), and I honestly wouldn't be surprised to find out I'm building this wrong. Also running the "ClassReferences.java" script results in a Null Pointer error, and "ClassReferences.java" and "DynamicCaster.java" are the only scripts available in the CppClassAnalyzer folder.
buildGhidra.sh.txt:
#!/usr/bin/env bash

#various variables varying verily
echo -e "\e[1;42m Setting paths\e[0m"
GIT_PATH=/c/git-sdk-64
GRADLE_PATH=$GIT_PATH/gradle/bin
BISON_PATH=$HOME/Downloads/win_flex_bison-latest
FLEX_PATH=$HOME/Downloads/win_flex_bison-latest
export GHIDRA_INSTALL_DIR="$HOME/downloads/ghidra_9.2_DEV"

if ! hash gradle 2>/dev/null; then
	echo -e "\e[1;42m Adding gradle to PATH\e[0m"
	export PATH=$PATH:$GRADLE_PATH;
fi

if ! hash bison 2>/dev/null; then
	echo -e "\e[1;42m Adding bison to PATH\e[0m"
	export PATH=$PATH:$BISON_PATH;
fi

if ! hash flex 2>/dev/null; then
	echo -e "\e[1;42m Adding flex to PATH\e[0m"
	export PATH=$PATH:$FLEX_PATH;
fi

#remove directories for clean install
echo -e "\e[1;42m removing directories\e[0m"
rm -rf $HOME/.ghidra
rm -rf $GHIDRA_INSTALL_DIR
rm -rf $GIT_PATH/ghidra/.gradle
rm -rf $GIT_PATH/ghidra/ghidra
rm -rf $GIT_PATH/ghidra/Ghidra-Cpp-Class-Analyzer
rm -rf $LOCALAPPDATA/ghidra

#clone github repositories
echo -e "\e[1;42m cloning repositories\e[0m"
git clone https://github.com/NationalSecurityAgency/ghidra.git
git clone https://github.com/astrelsky/Ghidra-Cpp-Class-Analyzer.git

#build ghidra
cd ghidra
echo -e "\e[1;42m gradle build init\e[0m"
gradle --init-script gradle/support/fetchDependencies.gradle init
echo -e "\e[1;42m gradle build natives\e[0m"
gradle buildNatives_win64
echo "gradle sleigh compile"
gradle sleighCompile
echo -e "\e[1;42m gradle build ghidra\e[0m"
gradle buildGhidra

#unzip to downloads
#unfortunately this creates an annoying top level directory, so some weird cd and mv is needed
mkdir $GHIDRA_INSTALL_DIR
echo -e "\e[1;42m unzipping ghidra to downloads\e[0m"
unzip $GIT_PATH/ghidra/ghidra/build/dist/ghidra*.zip -d $GHIDRA_INSTALL_DIR
cd $GHIDRA_INSTALL_DIR
cd ghidra*
mv ./* ..
cd ../
rm -rf *_DEV
cd $GIT_PATH/ghidra

#build class analyzer
echo -e "\e[1;42m begin with CPP class analyzer project\e[0m"
cd Ghidra-Cpp-Class-Analyzer
echo -e "\e[1;42m build extension\e[0m"
gradle buildExtension

#copy extension to ghidra directory
echo -e "\e[1;42m copy extension to directory\e[0m"
cp dist/ghidra*.zip $GHIDRA_INSTALL_DIR/extensions/Ghidra/

I haven't updated the class references script in a while. I'm using vscode to develop and the ghidra scripts aren't on the classpath so I don't get any errors or warnings until it is built.
I did recently refactor out a bunch of synchronization issues but don't remember if I put out a pre release of it yet. I will take a good look into this tomorrow to see what is going on.

@tjschweizer may you try https://github.com/astrelsky/Ghidra-Cpp-Class-Analyzer/releases/tag/2.0-alpha.4

@astrelsky that works! I'm even getting more classes populated by the auto analysis than before. Thanks for all your work making this extension too, it's been a real help.


PasswordStrength height is not enough?

Not too sure where/how you're generating custom_*.css, but I'm currently overriding it in custom.css with this:
 div.PasswordStrength { height: 20px }
The default appears to be 10px as part of .progress, .PasswordStrength{}, the theme is custom_flatly.

This should probably be reported as a bug in the Bootswatch repo. Per the Bootstrap documentation, progress bars are supposed to be able to accept text input, which apparently doesn't work in Flatly.

It [Bootswatch] seems to accept it by default on virtue of it being a much much smaller font-size: http://jsfiddle.net/rb6nnq1t/

Ah, then it indeed is an issue with the theme.

Seems to hit yeti too:

Closing as the project won't receive further updates until the release of Bootstrap 4.


Köhler theory

Water vapor equilibrium vapor pressure at the droplet surface is calculated using different versions of the Köhler theory:

Insolubles are neglected (2a)
Sometimes solutes are considered to be pure sulfate
Different densities assumed for the droplet
The role of semivolatiles (SO4 and Org, but especially NH4 and NO3) may still need clarification

Updates done


i18n support

The newly released version 2.3.0 now supports internationalization! 😃
I have also added the French translation, but if anyone wants to submit a PR to add other languages, please feel free to do so! I will add information regarding this in the README and other places very soon.


Add several usability patches to nethack

Nethack.alt.org is widely seen as running the best version of Nethack around, but high latency impacts the experience.  This commit alters the version of nethack used by homebrew-games to incorporate the patches used by nethack.alt.org including

Menucolors
Statuscolors
Sortloot
Over 20 bugfixes
And quite a few more (see my fork of NAO's nethack for more information)

This version also compiles in a a few options that are available but disabled on a standard Nethack install:

DLB for a cleaner install (ie there are fewer files hanging out in /path/to/cellar/libexec),
SHELL so that a player can type ! to drop to a shell
AUTOPICKUP_EXCEPTIONS to make autopickup more configurable via .nethackrc

Ping.

This still needs a revision 1 line under the version number too, please!

I've hit a snag that I've been unable to resolve, and I think I'm finally giving up on it: this patch is not compatible with saves from the current nethack version, so anyone upgrading would be unable to continue old games.  I'd hoped that I could figure something out, but no such luck.  What do you advise on that?  I won't have my feelings hurt if it sinks the project, though of course I hope that there's some other solution!

Any update here?

This PR need a rebase.

I've added the revision and rebased; I'm not sure why Jenkins is failing.  I'm looking into it now, but any advice is much appreciated!

@BrewTestBot test this please

Thanks, Misty! I'm switching to SHA256 right now, and will see what I can do with the Mountain Lion postinstall/make manpages error.

@BrewTestBot test this please

Hot dog! :confetti_ball: :dog: :confetti_ball:

Should we add a caveat about the non-compatibility of save files?

Ahh, absolutely @dunn.  Added!

Does the release of 3.6.0 affect this PR?

Some of these patches were incorporated into Nethack 3.6.0 proper, including:
menucolors
pickup thrown
statue glyphs
dungeon overview
sortloot

Should we merge #461 first, or try to tackle this in one?

Are any of the patches that broke savefile compatibility the ones that were incorporated into Nethack 3.6.0?

If not, we could merge that first and then incorporate additional patches later.

3.6.0 is not savefile compatible with 3.4.3 =/

Given the rather fundamental changes in this release as noted above, old save and bones files understandably will not be compatible with version 3.6.

http://nethack.org/v360/release.html

Yeah, so savefile compat is breaking either way. It's possible we might want to integrate additional patches from here, but I'm not sure if the other patches proposed in this PR will break saves a second time.

Closing due to the new nethack, but would review patches for the current version - and actually act in a timely manner this time! Sorry again.


Migrate to Capital Framework 4

Removes

pagination, buttons, media queries less files and other styles coming in via CFv4.

Changes

Adds atomic prefixes to relevant classes.
Updates capital-framework to version 4.8.1.
Migrates codebase to current lists, jump links, buttons, labels, and meta-header.

Testing

./frontend.sh and compare the local site pages to the live site and look for any changes in appearance. Let me know if you see anything off.

Please pull latest.

@jimmynotjim I rebased the updates from master in so you may need to delete and re-pull, but I think it's ready for review again. I think the only ones I didn't touch were the ones that would need significant refactoring and are best suited to their own PR to minimize migration bugs.

I'm starting my final look at this, but one of the acceptance tests is timing out in Travis.

@Scotchester it's because the search box (when expanded) is borked. I'll have a fix in momentarily. Almost there, just the button isn't working.

@Scotchester @jimmynotjim @sebworks Global search is updated. I made one slight adjustment to fix the misaligned search icon and search text, which has been bugging me since last year!

It uses the existing clear label, which will need to be reconciled with the clear button in CF later.

@anselmbradford, what are doing about the on-demand header / footer ?

I'll run more test but merge at will. It looks great.

After running ./frontend.sh, when I run the server, I'm seeing u-move-left attached to the mega menu on a wide display, causing it to be mostly off the screen:

@Scotchester can you verify that you can repeat this?

I can't reproduce the bug @Scotchester reported

It does nothing of value right now, so as a temporary measure, I'd recommend removing the m-meta-header_left classes from the resulting markup.

Removed in https://github.com/cfpb/cfgov-refresh/pull/3092/commits/9157ce82bc35ead077c009c162dad5bc09f2e093

Oh, and for the record, my issue with the oddly-placed menu went away.


Refresh PHP

Replaces https://github.com/googleapis/api-client-staging/pull/325 from a branch so that CI will run

Merging based on LGTM in #325


Advanced Pointer Handling

When reading in the state of something and you get a value for a pointer field, what the user wants to happen is ambiguous, I think it would fall under one of the following:
1.) Do nothing, ignore the pointer fields.
2.) Assign the value passed in to the value pointed to. If the value passed in is null, assign nullpointer, if the value passed in is non-null, and the pointer is null, throw a nullpointer exception.
3.) Assign the value passed in to the value pointed to. If the value passed in is null, assign nullpointer, if the value passed in is non-null, and the pointer is null, auto-allocate the value using "new".
4.) Assign the value(s) passed in to the dynamic array pointed to. If only null is passed in, assign nullpointer, if an array is passed in, and the pointer is null, throw a nullpointer exception.
5.) Assign the value(s) passed in to the dynamic array pointed to. If only null is passed in, assign nullpointer, if an array is passed in, and the pointer is null, auto-allocate the value using "new".
This option set could be described for a pointer by the following structure...
{
bool assignable;
bool autoAllocate;
size_t* dynamicArraySize; // If nullpointer, this is not a dynamic array
}
Though more thought still needs to go into how this would be implemented.

Made a choice to disallow dynamic arrays on pointers, vectors are a perfectly acceptable solution given that they are allocated contiguously.
As for "singular" pointers, when assigning a value to a pointer that is null...

shared pointers: auto allocates using "new"
unique pointers: auto allocates using "new"
all other pointers: throw an exception

When assigning to a non-null pointer...

shared pointers: auto allocates using "new", replacing the value
unique pointers: auto allocates using "new", replacing the value
all other pointers: assign the value read in to the value pointed to

#22 resolved as per most recent comment


Suggestion: Also include parameter default values in $PSBoundParameters or provide a similar variable that does

Currently, a script/function's parameter is only considered bound if an actual value was supplied by the caller.
Notably, this means that parameter default values are not reflected in  $PSBoundParameters, which decreases its usefulness when the intent is to pass all parameter values through to another command via splatting (@PSBoundParameters).
If there's a good reason to keep the current behavior (if only for the sake of not making a breaking change), perhaps another automatic variable, such as $PSParametersWithValue, could be introduced.
For a real-world example and workarounds, see this Stack Overflow question.

Yeah, I've written a function Get-ParameterValue several times for this purpose. Particularly when splatting to another function it's awkward to have to deal with it by hand. It would be nice if there was a $PSAllParameters or something.

There is a strong reason not to change the current behavior: the presence of a member in this collection tells you that the parameter was actually specified in the command call i.e. that the formal parameter was bound hence the name "PSBoundParameters". You'll have to add a new variable if you want different semantics.

Adding a new property is reasonable though - we have BoundPositionally list of strings - we could a similar BoundDefaultValue list.

I realize this issue has long since been closed, but for those of us who want a realistic solution, I have implemented some rather simple boilerplate code for it.
foreach($key in $MyInvocation.MyCommand.Parameters.Keys){
    $value = Get-Variable $key -ValueOnly -EA SilentlyContinue
    if($value -and !$PSBoundParameters.ContainsKey($key)) {$PSBoundParameters[$key] = $value}
}

Or if you want a more concise method or would rather simply cast them into a new variable to use independent of $PSBoundParameters...
$PSAllParameters = $MyInvocation.MyCommand.Parameters
In both cases, you can use these for splatting in the same way.
MyNormalFunction @PSBoundParameters
MyEverythingFunction @PSAllParameters

As for your workarounds:
The first one is great, but I don't think the second one will work, though, because $MyInvocation.MyCommand.Parameters contains only metadata, not values, from what I can tell.

@mklement0 That's why he calls get-variable 😉
Here's mine, which I mentioned earlier. It's basically the same thing, except that it merges with PSBoundParameters (and is in function form, so you can dot-source it, and includes tests to make sure you dot-sourced it)
https://gist.github.com/Jaykul/c623c45d32329cadac9e7622937e1b76

@Jaykul:

That's why he calls get-variable

Yes, in the first snippet, which indeed works (as stated - though I'd use $null -ne $value rather than just $value as a slightly more robust conditional to infer the presence of a value from; it too modifies $PSBoundParameters directly).
However, my comment was about the second snippet, which I interpret to make the claim that $MyInvocation.MyCommand.Parameters would essentially already give us what this issues requests as an enhancement, which is not the case; specifically, I was referring to:

you can use the native $MyInvocation.MyCommand.Parameters, which contains all parameter keys & values, bound, null, default, or otherwise

My point was that $MyInvocation.MyCommand.Parameters seemingly contains just metadata, not values (neither bound nor default ones).
Thanks for sharing your Gist, which is a nicely packaged solution.
Sounds like we have viable workarounds now.
Let's hope that we soon won't need them anymore.

You're right, I made the mistake of assuming before I posted that. I've omitted that since it doesn't apply in order to prevent leading others astray.

@True-Demon @Jaykul did you never get into trouble with these workarounds in combination with dynamic parameters? Problem is Get-Variable gets any variable so in case of dynamic parameters it won't find their default because those parameters aren't available with their name in the scope, so instead it looks further so if there happens to be another, unrelated, variable with the same name in the scope it will use that. E.g.
$foo = 1

function Bar {
dynamicparam(
  # Create "foo" dynamic here with default 2
)
# Oops, this returns 1, no matter what was passed.
Get-Variable "foo"
}

@stinos, you can use Get-Variable -Scope Local to limit looking for variables in the current scope:
foreach ($key in $MyInvocation.MyCommand.Parameters.Keys) {
  $value = if ($PSBoundParameters.ContainsKey($key)) { $PSBoundParameters[$key] }
           else { Get-Variable -Scope Local -ErrorAction Ignore -ValueOnly $key }
}

@mklement0 thanks for posting that, I've actually been using something like that myself but apparently forgot to report back here.

Just fixed a bug in a script that used:
if ('Debug' -in $PSBoundParameters.Keys) {}

This needs to be fixed or at least we need warnings from psscriptanalyzer (and vscode)...
This at first looks innocent, but considering the -Debug:$false semantic also exists it clearly shows the issue with this. It's probably not just limited to this, I quickly googled for how best practices about how to use it and found code like this:
if ($PSBoundParameters.Debug) {}

which works as long as -Debug:$true or -Debug:$false, but causes an exception when absent, it's non terminating, but still. If changing this parameter to defaulting to all values being populated and set to false is not feasible right now, can we at least get this 2nd case to also work in StrictMode and return $false instead of this exception?:

Exception             :
    Type        : System.Management.Automation.PropertyNotFoundException
    ErrorRecord :
        Exception             :
            Type    : System.Management.Automation.ParentContainsErrorRecordException
            Message : The property 'Debug' cannot be found on this object. Verify that the property exists.
            HResult : -2146233087
        CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
        FullyQualifiedErrorId : PropertyNotFoundStrict
        InvocationInfo        :
            ScriptLineNumber : 1
            OffsetInLine     : 43
            HistoryId        : -1
            Line             : function t {[cmdletbinding()]param(); if ($PSBoundParameters.Debug) {'true'} else
{'false'}}
            PositionMessage  : At line:1 char:43
                               + … ion t {[cmdletbinding()]param(); if ($PSBoundParameters.Debug) {'true …
                               +                                        ~~~~~~~~~~~~~~~~~~~~~~~~
            CommandOrigin    : Internal
        ScriptStackTrace      : at t, <No file>: line 1
                                at <ScriptBlock>, <No file>: line 1
    TargetSite  : System.Object CallSite.Target(System.Runtime.CompilerServices.Closure,
System.Runtime.CompilerServices.CallSite, System.Management.Automation.PSBoundParametersDictionary)
    Message     : The property 'Debug' cannot be found on this object. Verify that the property exists.
    Data        : System.Collections.ListDictionaryInternal
    Source      : Anonymously Hosted DynamicMethods Assembly
    HResult     : -2146233087
    StackTrace  :
   at CallSite.Target(Closure, CallSite, PSBoundParametersDictionary)
   at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException
FullyQualifiedErrorId : PropertyNotFoundStrict
InvocationInfo        :
    ScriptLineNumber : 1
    OffsetInLine     : 43
    HistoryId        : -1
    Line             : function t {[cmdletbinding()]param(); if ($PSBoundParameters.Debug) {'true'} else {'false'}}
    PositionMessage  : At line:1 char:43
                       + … ion t {[cmdletbinding()]param(); if ($PSBoundParameters.Debug) {'true …
                       +                                        ~~~~~~~~~~~~~~~~~~~~~~~~
    CommandOrigin    : Internal
ScriptStackTrace      : at t, <No file>: line 1
                        at <ScriptBlock>, <No file>: line 1

Testcode:
Set-StrictMode -Version latest
function t {[cmdletbinding()]param(); if ($PSBoundParameters.Debug) {'true'} else {'false'}; 'continued'}
t
# throws exception but continues execution AFTER the if block, at least as long as $ErrorActionPreference is set to the default of 'Continue'
# And outputs just the string 'continued'
Set-StrictMode -Off
t
# Outputs both, the string 'false' and 'continued'

@agowa wrote:

Just fixed a bug in a script that used:
if ('Debug' -in $PSBoundParameters.Keys) {}

For Debug, you should normally rely on $DebugPreference. You shouldn't be testing for the -Debug switch explicitly, because it's a state (i.e. if -Debug is set on the caller, it doesn't need to be repeated to each nested command).
Having said that, for switch parameters in the general case, you may need to test like this:
if ($PSBoundParameters.ContainsKey('Debug') -and $PSBoundParameters['Debug']) {}

@Jaykul That wasn't my code I found that "gem" in the code of coworkers...

I'm not sure what you're suggesting. Those switches are legacy behavior it would be dangerous to mess with.
Since the beginning, advanced functions in PowerShell have had -Verbose and -Debug switches (along with -ErrorAction and -WarningAction and the newer -InformationAction and -ProgressAction`) to control the preference variables ... you can't just change what they put in PSBoundParameters, because you'd break everything that already exists.
I mean, we recently finally got -Debug to set $DebugPreference to "Continue" instead of "Inquire" (which was mostly useless), but changing it to -DebugAction and -VerboseAction would break everything, and having the common parameters set extra variables would also break everything (since you'd be reserving those variables as system variables after having them be usable for all these years).

Another thought. If we say Switches from CommonParameters are actually intended to be the way they currently are with three states $null, $true, $false, I.E. a nullable switches, can we change their type definition to reflect this [System.Nullable[System.Management.Automation.SwitchParameter] more easily without breakage?
Because currently the Parameters property of both Get-Command foo and the related Get-Item Function:/foo show it as a regular [System.Management.Automation.SwitchParameter], which can only have two states $true and $false.

Adding a new property is reasonable though - we have BoundPositionally list of strings - we could a similar BoundDefaultValue list.

I think this is the most effortless and elegant way. I would include the arguments set via default value and list them in something like BoundByDefaultValue for those who really need to know, where the value came from, which would really be a rare case in my opinion.
The cleanest and most OOP way would be to touch the dictionary objects and add a property to them like IsSetByDefaultValue (see https://github.com/PowerShell/PowerShell/issues/21263), but that would be a more difficult implementation.

While the idea of adding a .BoundByDefaultValue may still be worthwhile (though I agree that needing to know that is probably uncommon), it would still the make the use case that motivated creation of this issue cumbersome, which is  to have a variable that can be used as-is - possibly following modification of its value - to splat all parameter values, whether bound by the caller or by default value, say with @PSParametersWithValue.
While creating a parallel dictionary to $PSBoundParameters may be undesirable from a performance and resource-duplication perspective, perhaps a new $PSParametersWithValue variable can be implemented like a property that constructs its value dynamically, on first access.
(I assume this is feasible with behind-the-scenes magic for automatic variables, but I don't know.)
That way, the extra effort would only be expended in code that actively references this variable.

+1


null pointer assignment to argv

When you assign this->output to argv, and then later on assign a null value to this->output[x], it also updates argv to have a null pointer. This is unexpected and argv shouldn't be modified.

Hi,
At beginning, I wrote this library to simplify arguments parsing as possible as I can. Modifying original argv may have side effects (See issue #3).
It's hard to change the design now. To work around it, you can make a copy at first, then pass the copy of argv to argparse_parse.


⚠ Bofrost.be has degraded performance

In 3d74c68, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1153 ms

Resolved: Bofrost.be performance has improved in c2cc229.


Guess game

A simple guess game created with c++. Simple code but interesting game

You are now blessed with Open Source Super Powers!
Congrats Wisal!


Menu and search button size discrepency

Bug Report
What is the issue?
Height difference between header buttons on mobile
There is a slight difference in the heights of the "menu" and "search" buttons in the header on iOS Chrome.
Search appears to be a couple of pixels taller. I would expect the buttons to be the same height.
What steps are required to reproduce the issue?
Navigate the NHS.UK website in Chrome on Apple iPhone 11 Pro Max (possibly more devices) and you will see height difference as shown in attached screenshot
What was the environment where this issue occurred?
Include the following as a minimum e.g.

Device: Apple iPhone 11 Pro Max
Operating System: iOS 13.5.1
Browser: Chrome
Browser version: 84.0.4147.71
NHS.UK frontend package version: Unknown... NHS.UK Wagtail site (possibly more apps effected) 23/7/2020
Node version: Unknown... NHS.UK Wagtail site (possibly more apps effected) 23/7/2020
npm version: Unknown... NHS.UK Wagtail site (possibly more apps effected) 23/7/2020

Is there anything else you think would be useful in recreating the issue?
Not replicated in MacOS Chrome mobile emulation making initial debugging more difficult

Have checked on:

iPhone SE (1st Gen), Chrome 87.0.4280.77 (latest), iOS 14.3
iphone 6s, Chrome 87.0.4280.77 (latest), iOS 14.3
iphone 8, Chrome 87.0.4280.77 (latest), iOS 13.5.1

and they all look OK.

I can't reproduce this on the design system website. And the nhs.uk site itself seems now to have deviated anyway - and is showing the search box all the time.
Seems to me that this could probably be closed.


Jax determinism on GPU

I have trouble with determinism for Jax code on GPU but not on CPU. This is easy to reproduce from the flax examples https://github.com/google/flax/tree/main/examples .
From https://github.com/google/jax/issues/565, I had the impression that setting
TF_DETERMINISTIC_OPS=1 and
TF_CUDNN_DETERMINISTIC=1
would make the GPU run deterministic.
After 2 steps, the MNIST example give the same results on GPU or CPU:
4bda0ea4f536031c4619c394b64ede43 /tmp/mnist_cpu_1/checkpoint_1
4bda0ea4f536031c4619c394b64ede43 /tmp/mnist_cpu_2/checkpoint_1
1daae8e25344c91aea35c4836b46c798 /tmp/mnist_gpu_1/checkpoint_1
1daae8e25344c91aea35c4836b46c798 /tmp/mnist_gpu_2/checkpoint_1
This is not the case for the WMT transformer example where only the CPU run are deterministic.
cbcf1e88ed7b2bd61376e3c90c5dcdfc /tmp/wmt_cpu_1/checkpoint_1
cbcf1e88ed7b2bd61376e3c90c5dcdfc /tmp/wmt_cpu_2/checkpoint_1
3dd11fb219e9f37dd90542267cadc86e /tmp/wmt_gpu_1/checkpoint_1
3067f6d66fdf7e8b52baef7056422291 /tmp/wmt_gpu_2/checkpoint_1
Is this expected? Am I missing some flags to make my GPU run deterministic?
BTW I have the following setup CuDNN 8.4, tf = 2.11.0, jax = 0.3.13, flax = 0.5.3

Also filled as a Jax issue, see https://github.com/google/jax/issues/13672

Hey @dgrangier! I think we should track this on this JAX repo as Flax itself just leverages JAX for RNGs so we can't do anything on our side. Closing this issue.


chore: update Go version to 1.20

coverage: 88.639%. remained the same when pulling 1e48a203a400c8faf5818856a6d8fd9dd58f3eb6 on robinlieb:feat/go-1.20-update into ef5260ad8fa57a0b89621dc02b0301d834f93c13 on go-playground:master.

@robinlieb I think webhooks never defined the minimal Golang version it supported. So now it would be 1.16 for sure. Just want to pay attention if we are OK with it.

@Toshik1978 would also make sense to use 1.17, the minimal version set in the workflow.yaml, and keep them in sync? Than I would update this PR / create a new one to set the Go version to 1.17.

Yes, let's do it! Thanks! You can use this PR or create a new one. It's up to you!

@Toshik1978 used this one and updated it to 1.17.


bitwig: 2.1.3 -> 2.2.2

Motivation for this change
Just a version update
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
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)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg build bitwig


docs: improve SEO docs regarding usage of other head tags

Motivation
Users get confused about how to use structured data or other head meta tags in Docusaurus because our docs mostly show how to use <meta> tags and not other tags
Fix https://github.com/facebook/docusaurus/issues/9052
Test Plan
preview

And yes, makes things absolutely much more clearer!  I'll continue to see if there might be gaps in coverage for a few plugin API links, or maybe you could open a clean up issue for your team.


Getting error in console for collapse JavaScript plugin

Getting error in console for collapse JavaScript plugin
collapse not working as expected it was working 4 days before
Uncaught TypeError: Cannot read property 'querySelectorAll' of null
version used : https://www.npmjs.com/package/bootstrap/v/4.0.0-alpha.6
URL :https://www.equinox.com/clubs/canada
Click on accordion Bay Street

Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via CodePen or JS Bin and report back with your link, Bootstrap version, and specific browser and OS details.

I am now getting the same error on a basic collapse since going from 4.1.1 to 4.1.2.  I'll put up a codepen when I get a chance.

I found the issue.  The change from 4.1.1 to 4.1.2 no longer allows using data-parent attribute when using collapse.  I used the data-parent to remove a currently open element with the new element.  Basically I was using accordion logic with the buttons.  So removing data-parent takes the 'querySelectorAll' error away but I'll have multiple elements open at once.  The below codepen shows the error.
https://codepen.io/anon/pen/rrLBxp?editors=1111

Our collapse works well with data-parent see: https://getbootstrap.com/docs/4.1/components/collapse/#accordion-example
In your example, you mis placed your data-parent and your data-parent (#cardButtonGroup) do not exist in the DOM

If the cause has been found and it is not a bug then this 'issue' should be closed

You're right @pouyana, setting an existing id as parent is the solution 😄

Thanks guys I have already fixed this :)

If you are doing custom inclusion of the bootstrap javascript plugins separately, make sure that that you include util.js before collapse.js.
That's what solved it for me.

Hi, I am getting the same issue. I am able to remove it from the console, by deleting data-parent from the HTML code. But then only expandable functionality working and collapsing. I really need help to fix the issue, as it has to push tomorrow for my work. Please let me know anyone. I am using panel group and inside that  tag containing href to target iv and data-toggle collapse.

The problem  is the code owrking fine at my side with error even and also on some of my team members. But this accordian not working on one of client and also one or two systems.