[#666] Download sapling files atomically

This PR covers more tasks:

Download sapling params files atomically, compare theirs hashes and move them from the legacy location to the preferred one

Enhanced implementation of SaplingParamTool component. It got sapling files move from legacy folder to the preferred one functionality. It downloads the sapling files atomically now (through the temporary file names). It contains all related constants now. It works with SaplingParamToolProperties, which allows us to easily test the SaplingParamTool functionalities. It also now checks file hashes. Removed unnecessary clear function from the component. Changed valid function.
Moved related constants from ZcashSdk class to SaplingParamTool class
Changed Initializer, WalletTransactionEncoder and RustBackend classes to work with File instead of path String
Minor changes in comments in other classes
Added getSha1Hash() extension function to the FileExt class

Unit integration and manual tests

Two new test fixtures to simplify our tests
Test for getSha1Hash() extension function
Minor changes in existing tests
Created new SaplingParamToolBasicTest, which covers non-integration functionality of SaplingParamTool
Moved integration tests of the SaplingParamTool to the new SaplingParamToolIntegrationTest and added some new
Created Download sapling files manual test
Created Move sapling files to no_backup manual test
Update existing Move database files to no_bakcup manual test

Closes https://github.com/zcash/zcash-android-wallet-sdk/issues/666 and https://github.com/zcash/zcash-android-wallet-sdk/issues/611.
This code review checklist is intended to serve as a starting point for the author and reviewer, although it may not be appropriate for all types of changes (e.g. fixing a spelling typo in documentation).  For more in-depth discussion of how we think about code review, please see Code Review Guidelines.
Author

[x] Self-review: Did you review your own code in GitHub's web interface? Code often looks different when reviewing the diff in a browser, making it easier to spot potential bugs.
[x] Automated tests: Did you add appropriate automated tests for any code changes?
[x] Manual tests: Did you update the manual tests as appropriate? While we aim for automated testing of the application, some aspects require manual testing. If you had to manually test something during development of this pull request, write those steps down.
[x] Documentation: Did you update documentation as appropriate? (e.g README.md, etc.)
[x] Run the app: Did you run the demo app and try the changes?
[x] Rebase and squash: Did you pull in the latest changes from the main branch and squash your commits before assigning a reviewer? Having your code up to date and squashed will make it easier for others to review. Use best judgement when squashing commits, as some changes (such as refactoring) might be easier to review as a separate commit.

Reviewer

[ ] Checklist review: Did you go through the code with the Code Review Guidelines checklist?
[ ] Ad hoc review: Did you perform an ad hoc review?  In addition to a first pass using the code review guidelines, do a second pass using your best judgement and experience which may identify additional questions or comments. Research shows that code review is most effective when done in multiple passes, where reviewers look for different things through each pass.
[ ] Automated tests: Did you review the automated tests?
[ ] Manual tests: Did you review the manual tests?
[ ] How is Code Coverage affected by this PR? We encourage you to compare coverage before and after changes and when possible, leave it in a better place.
[ ] Documentation: Did you review Docs, README.md, and Architecture.md as appropriate?
[ ] Run the app: Did you run the demo app and try the changes? While the CI server runs the app to look for build failures or crashes, humans running the app are more likely to notice unexpected log messages, UI inconsistencies, or bad output data. Perform this step last, after verifying the code changes are safe to run locally.

I pushed a few commits to eliminate the mutable state in the SaplingParamTool.  Take a look to let me know what you think.


Not sure if PyAFQ is importing MRtrix tractogram

With QSIPrep 0.16.0RC3, I made a 2.5M streamline tractogram with the ACT-HSVS workflow and used that as input to PyAFQ. However, AFQ still produces a tractogram, and it's pretty sparse, around 20,000 streamlines after cleaning. Similarly, the produced tracts are sparse. There are no errors, but also no evidence that PyAFQ is using the dense tractogram I made with MRtrix.
Recon spec below:
{
  "name": "pyafq_mrtrix_multishell_msmt_ACT-hsvs_DKI_NODDI",
  "space": "T1w",
  "atlases": [],
  "anatomical": [
    "mrtrix_5tt_hsvs"
  ],
  "nodes": [
    {
      "name": "msmt_csd",
      "software": "MRTrix3",
      "action": "csd",
      "output_suffix": "msmtcsd",
      "input": "qsiprep",
      "parameters": {
        "mtnormalize": true,
        "response": {
          "algorithm": "dhollander"
        },
        "fod": {
          "algorithm": "msmt_csd",
          "max_sh": [
            8,
            8,
            8
          ]
        }
      }
    },
    {
      "name": "track_ifod2",
      "software": "MRTrix3",
      "action": "tractography",
      "output_suffix": "ifod2",
      "input": "msmt_csd",
      "parameters": {
        "use_5tt": true,
        "method_5tt": "hsvs",
        "use_sift2": true,
        "tckgen": {
          "algorithm": "iFOD2",
          "select": 2500000,
          "max_length": 200,
          "min_length": 4,
          "power": 0.33,
          "crop_at_gmwmi": true,
          "backtrack": true
        },
        "sift2": {}
      }
    },
	{
            "name": "pyAFQ_full",
            "software": "pyAFQ",
            "action": "pyAFQ_full",
            "input": "track_ifod2",
            "output_suffix": "PYAFQ_FULL_ET",
            "parameters": {
                "use_external_tracking": true,
                "directions": "prob",
                "max_angle": 30.0,
                "sphere": "",
                "seed_mask": "",
                "seed_threshold": 0,
                "n_seeds": 1,
                "random_seeds": false,
                "rng_seed": "",
                "stop_mask": "",
                "stop_threshold": 0,
                "step_size": 0.5,
                "min_length": 10,
                "max_length": 1000,
                "odf_model": "CSD",
                "tracker": "local",
                "nb_points": false,
                "nb_streamlines": false,
                "seg_algo": "AFQ",
                "reg_algo": "",
                "clip_edges": false,
                "parallel_segmentation": "{'n_jobs': -1, 'engine': 'joblib', 'backend': 'loky'}",
                "progressive": true,
                "greater_than": 50,
                "rm_small_clusters": 50,
                "model_clust_thr": 1.25,
                "reduction_thr": 25,
                "refine": false,
                "pruning_thr": 12,
                "b0_threshold": 50,
                "prob_threshold": 0,
                "roi_dist_tie_break": false,
                "dist_to_waypoint": "",
                "rng": "",
                "return_idx": false,
                "presegment_bundle_dict": "",
                "presegment_kwargs": "{}",
                "filter_by_endpoints": true,
                "dist_to_atlas": 4,
                "save_intermediates": "",
                "n_points": 100,
                "clean_rounds": 5,
                "distance_threshold": 5,
                "length_threshold": 4,
                "min_sl": 20,
                "stat": "mean",
                "min_bval": "",
                "max_bval": "",
                "filter_b": true,
                "robust_tensor_fitting": false,
                "csd_response": "",
                "csd_sh_order": "",
                "csd_lambda_": 1,
                "csd_tau": 0.1,
                "gtol": 0.01,
                "brain_mask_definition": "",
                "bundle_info": "",
                "reg_template_spec": "mni_T1",
                "mapping_definition": "",
                "reg_subject_spec": "power_map",
                "profile_weights": "gauss",
                "scalars": "['dti_fa', 'dti_md']",
                "import_tract": "",
                "sbv_lims_bundles": "[None, None]",
                "volume_opacity_bundles": 0.3,
                "n_points_bundles": 40,
                "sbv_lims_indiv": "[None, None]",
                "volume_opacity_indiv": 0.3,
                "n_points_indiv": 40,
                "viz_backend_spec": "plotly_no_gif",
                "virtual_frame_buffer": false
            }
        }
  ]
}

@36000 I have an idea of why this is:
The QSIPrep myafq call is (from the pyafq interface):
 myafq = ParticipantAFQ(
            dwi_file, bval_file, bvec_file, output_dir,
            import_tract=tck_file,
            brain_mask_definition=brain_mask_definition,
            mapping_definition=itk_map,
            **kwargs)

I think the input for import_tract should be a dictionary specifying to look for the trk file in qsirecon outputs, and not the tck_file itself.
What do you think?

PyAFQ docs need to be updated, because it can be a string in the case of participantAFQ . I will debug this further when I get back from OHBM on Monday. Thanks for finding this issue, its not good that it doesn’t throw an error but uses its own tractography. I will add in some checks as well so this doesn’t happen again.

If you look at the trk files in the pyAFQ output directory, is there one with the name "model-XXX_desc-XXX_tractography.trk" ? Or is it just one named "model-XXX_desc-XXX-AFQ_tractography.trk" ?

sub-XXX_space-T1w_desc-preproc_dwi_space-RASMM_model-CSD_desc-prob-AFQ_tractography.trk size is ~34MB

This means it is using an imported tractography from qsiprep. This means 1 of 2 things is happening: (1) it is somehow using a different or wrong trk produced by qsiprep or (2) pyafq is having trouble for some other reason (could be bug in pyAFQ or data or other wrong imports from qsiprep). I will double check the results on the test dataset to make sure everything is working well there. On your end, if you ran export_all you can debug:
check mapping: check the file ending in template_xform compared to the b0 and make sure they are well aligned
check tractography: load qsiprep tractography into mi-brain and load ROIs from ROIs folder in pyAFQ output to see if the ROIS are well aligned
By the way, thanks for being the guinea pig and helping me debug this. It is nice to see people using this feature.

After double checking the mapping results I think the problem is there. You can see this in your own dataset comparing template_xform to b0. I will let you know when this is fixed. Sorry and thanks for your patience!

Hi, I wonder if there is anything update with this issue? In addition, is there any documentation/tips for how to use this pyafq interface within qsiprep? I didn't find description within the qsiprep online documentation (qsiprep.readthedocs.io). Thanks!

I believe this is not an issue anymore. pyAFQ can be run like the other reconstruction pipelines shown here: https://qsiprep.readthedocs.io/en/latest/reconstruction.html . I am going to close this issue but if you have anymore questions with qsiprep / pyAFQ you can open another issue and make sure to tag me in it.

@mattcieslak  can you close this issue?

I'll close this issue, but I will note that the online readthedocs page for reconstruction does not have the PyAFQ information that is listed in the GitHub docs/reconstruction.rst.


Allow controlling if/how compound variants are merged with @csa_class

Imagine the given scenario: You have an icon button component with two sizes, for each size you want not only to change the button classes but also the icon classes (so it resizes appropriately with the button):
variant :size, [sm: "text-sm px-2 py-1", lg: "text-lg px-4 py-2"]
slot :inner_block, required: true
def icon_button(assigns) do
   ~H"""
   <button class={@cva_class}>
     <.icon name="award" class="h-2 w-2 mr-2" />
     <%= render_slot(@inner_block) %>
   </button>
   """
end

It seems to me that this would be a good job for compound_variant if we had a way to split the classes instead of merging with @cva_class. Would you be interested in supporting something like this?
compound_variant :icon_class, "h-2 w-2 mr-2", size: :sm
compound_variant :icon_class, "h-4 w-4 mr-4", size: :lg

I'm not sure if I can follow properly. The compound_variant is to be used to add classes if a combination of variants is present (e.g. add class h-4 if the variant size == :xl and color == :primary).
How would you want to split / extract the classes from @cva_class?
I think I'd create a separate icon component for it.
variant :size, [sm: "h-2 w-2 mr-2", lg: "h-4 w-4 mr-4"]
attr :class, :string
attr :rest, :global

def my_icon(assigns) do
  <.icon class={[@cva_class, @class]} {...rest} />
end


WebP image format is missing

Hi. I can't select webp images for my image field, because determination of webp is absent in source code.
Plz fix it. Thx.

WebP is almost only supported by Chrome based Browsers, also there is now no out of the box support by the GD lib Cockpit is using for image processing. But I'll observe the need for webp but for now, sorry, I think there are more important things for Cockpit.

@aheinze Do you think this issue could be reopened now? WebP has quite good support now and the format is very useful. After converting from jpg to webp the size of my images was reduced by like 50%. I tried to upload those into cockpit and it would work if I used the direct asset link, but I am still using the /image endpoint to resize the images through srcset. And that doesn't work with webp sadly :( It would be really great if this could work. For now I'll go with jpg images. Although I still think the issue should be reopened.

@BlindDespair ok, I used webp but I resized the images locally already and just used the assets link. Can you please make an example how you are using it (e. g. how you construct the link, how the image tag looks like)

@patrickuhlmann I need to use srcset for responsive pages so that the browser selects the image of the right size. So I store only one image in cockpit and then use the /image endpoint to get the desired size, which is then cached. This way I have really good flexibility as to what sizes of images I need.
Here is an example img tag:
<img _ngcontent-psh-c52="" sizes="(min-width: 768px) 50vw, 100vw" src="https://cockpit.sakurachef.com.ua/storage/uploads/2020/11/29/5fc2ec8d7b2a4birthday-min-min.jpg" srcset="https://cockpit.sakurachef.com.ua/api/cockpit/image?token=da6b808c5b8210a2b282ef47bd5cba&src=https://cockpit.sakurachef.com.ua/storage/uploads/2020/11/29/5fc2ec8d7b2a4birthday-min-min.jpg&w=320&o=1&q=80 320w, https://cockpit.sakurachef.com.ua/api/cockpit/image?token=da6b808c5b8210a2b282ef47bd5cba&src=https://cockpit.sakurachef.com.ua/storage/uploads/2020/11/29/5fc2ec8d7b2a4birthday-min-min.jpg&w=640&o=1&q=80 640w, https://cockpit.sakurachef.com.ua/api/cockpit/image?token=da6b808c5b8210a2b282ef47bd5cba&src=https://cockpit.sakurachef.com.ua/storage/uploads/2020/11/29/5fc2ec8d7b2a4birthday-min-min.jpg&w=960&o=1&q=80 960w, https://cockpit.sakurachef.com.ua/api/cockpit/image?token=da6b808c5b8210a2b282ef47bd5cba&src=https://cockpit.sakurachef.com.ua/storage/uploads/2020/11/29/5fc2ec8d7b2a4birthday-min-min.jpg&w=1280&o=1&q=80 1280w" alt="В День Рождения">

I use angular to create my pages, so the way I construct these srcsets is that I use a simple pipe like this:
@Pipe({
  name: 'cockpitSrcSet',
})
export class CockpitSrcSetPipe implements PipeTransform {
  private readonly minWidth = 320;

  transform(value: string, sizeCount = 4): string {
    const imageUrl = mergePaths(environment.cockpit.baseUrl, value);
    return new Array(sizeCount)
      .fill(0)
      .map((_, index) => {
        const size = index + 1;
        const optimizedImageUrl = mergePaths(
          environment.cockpit.apiUrl,
          `cockpit/image?token=${environment.cockpit.apiccessToken}&src=${imageUrl}&w=${this.minWidth * size}&o=1&q=80`
        );
        return `${optimizedImageUrl} ${size * this.minWidth}w`;
      })
      .join(', ');
  }
}

Ok, I just asked because I added webp support with the pullrequest #1373. It was merged in November and there has been no release since then. I guess you are on the 0.11.2 release and not on the next branch?

@patrickuhlmann yes, I am on 0.11.2, because I am using the latest docker image.

I quickly tested the image endpoint on my installation that is running the code from #1373. It is working. Thus the issue can be kept closed as it is solved and just waits for the next release (don't know when it will happen).

I quickly tested the image endpoint on my installation that is running the code from #1373. It is working. Thus the issue can be kept closed as it is solved and just waits for the next release (don't know when it will happen).

@patrickuhlmann thank you for your answer, I will wait for the next release then and when it's out I will migrate all the images on the site to webp (gonna be fun :D).

@patrickuhlmann thank you for your answer, I will wait for the next release then and when it's out I will migrate all the images on the site to webp (gonna be fun :D).

@aheinze do you have a plan for the next release?


Allow specifying custom builds_dir and cache_dir

Hello,
I would like to be able to explicitly configure the builds_dir and cache_dir in config.toml to point to host-mounted directories, so I can persist my sources and caches across builds.
Currently the builds_dir and cache_dir options are ignored by the Tart executor, which overrides them to /private/tmp (unless TART_EXECUTOR_HOST_DIR is supplied, in which case a fixed-name hostdir directory is mounted from a generated tempdir, which is wiped at the end of the build).
This is something that's already possible with the built-in docker executor, for example:
[[runners]]
  executor = "docker+machine"
  builds_dir = "/builds"
  cache_dir = "/cache"
  [runners.custom_build_dir]
    enabled = true
  [runners.docker]
    volumes = ["/data/cache:/cache", "/data/builds:/builds"]

I would expect to be able to do the same with the tart executor:
[[runners]]
  executor = "custom"
  builds_dir = "/Volumes/My Shared Files/builds"
  cache_dir = "/Volumes/My Shared Files/cache"
  [runners.custom_build_dir]
    enabled = true
  [runners.custom]
    config_exec = "gitlab-tart-executor"
    config_args = ["config"]
    prepare_exec = "gitlab-tart-executor"
    prepare_args = ["prepare", "--dir", "builds:/some/host/path/builds", "--dir", "cache:/some/host/path/cache"]
    run_exec = "gitlab-tart-executor"
    run_args = ["run"]
    cleanup_exec = "gitlab-tart-executor"
    cleanup_args = ["cleanup"]

Support for arbitrary host mounts was already added in #24, so I think it should only be a short hop to support this.

Unfortunately, GitLab Runner does not pass these fields as variables to custom executors.
We have a --cache-dir command-line argument for config stage for working around this, and I've added --builds-dir command-line argument in https://github.com/cirruslabs/gitlab-tart-executor/pull/27.

Excellent, thanks @edigaryev for the swift and effective response, this should do the trick 👍


[BUG] Input Tensor Not Shown on 'graph_view'

Title.
Code to reproduce:
model = Sequential()
model.add(Dense(16, input_dim=16, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])

graph_view(model_ANN, to_file='output_folder/graph/ANN.png')

Output:

This happens even if an 'InputLayer' is specified.
I will leave this as is in release 0.1. Will be fixed in release 0.1.1.

Resolved in PR 71


Error thrown on login with not existing PilotID

When trying to Login with a PilotID that does not exist a error is thrown:
ErrorException
strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
see: https://flareapp.io/share/RmrkGbPz

What're you entering? A blank string?

And what's the airline IATA?

What're you entering? A blank string?

Every String without "@" causes this error

And what's the airline IATA?

It was on a fresh install of phpvms. I Think no IATA has been set

Weird, I'm not seeing this but it could be the blank IATA. Thanks, I'll have a patch for that soon

Please try the latest dev if you get a chance

Ok... the next Chance is in about 2 Weeks... i will test it


minor haskell tweaks

[x] add a hook for subword-mode to make navigating with camelCase a breeze, since camelCase is a convention for functions and variables in haskell.
[x] add support for code-block collapsing via haskell-collapse-mode (built into haskell-mode)
[x] enable some benign and useful features as recommended in the haskell-mode manual.
[x] allow flycheck to handle error popups if :feature syntax-checker is enabled.

Good work and thanks again!


Feat:14(toggleButton): Added a toggle button to switch between light …

…and dark mode
Description
I developed a toggle button that allows users to seamlessly switch between dark and light modes, enhancing the user experience by taking into account both visual preferences and eye health. The implementation leverages the dark mode functionality provided by the shadcn-ui library.
I started by installing the necessary dropdown and button components from shadcn-ui, using the command
npx shadcn@latest add dropdown-menu button
This automatically generated custom DropdownMenu and Button UI components under the components/ui directory. I then created a mode-toggle.tsx file within the src/components folder. In this file, I integrated the dropdown and button components in such a way that when users click the toggle button, it triggers a dropdown menu with options to select either the light or dark mode.
Next, I built a Theme-Provider.tsx file, also placed in the src/components directory. This file contains the core logic responsible for rendering the selected theme (light or dark) across the application. I finally imported the ThemeProvider into the App.js file and wrapped the entire App component with the ThemeProvider in main.jsx. This ensures the theme settings control the background and color scheme throughout the entire web application.
Fixes #29
Type of Change

[ ] Bug fix
[x] New feature
[ ] Test update
[ ] Refactor
[ ] Breaking change
[ ] Documentation update

Checklist

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my code.
[x] I have commented my code where necessary.
[x] I have made corresponding changes to the documentation (README, CONTRIBUTING, etc).
[ ] I added a new Library/Dependency and have updated the README.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] My changes generate no new warnings or errors.
[ ] New and existing unit tests pass locally with my changes.

The project has been updated to use Typescript, please pull the latest main and create a new branch with your changes (if that's easier). Thank you for understanding!


Update Slack icon

Closes https://github.com/scylladb/sphinx-scylladb-theme/issues/335
Preview:

LGTM


Reproduce the results in the paper

Hi, thanks for this awesome work on the topic of advocating symmetric registration. The idea of utilizing a halfway geodesic trajectory is very interesting. I am currently trying to reproduce the results in the paper and I have the following questions regarding the test result:

Regarding the dataset split for train, validation, and testing. In the Train_sym_neurite_oasis, the validation set is the oasis list from 255 to 260. This is slightly different from the description in the paper. Do you mind sharing the case ids for the test split you used in the paper?

In https://github.com/adalca/medical-datasets/blob/master/neurite-oasis.md, the whole dataset seems to contain 414 subjects. This is different from the paper. Is this the dataset I should use to reproduce the result?

In the paper, it seems that there is some preprocessing conducted on the oasis dataset. Is the dataset downloaded from https://github.com/adalca/medical-datasets/blob/master/neurite-oasis.md already preprocessed the same way as in the paper? Does one need to apply extra preprocessing based on the oasis downloaded from the above link?

Hi @lintian-a,
First of all, congratulation on your CVPR's paper this year! Your GradICON is very solid and the result is promising.
I will answer your questions below:

The "Train_sym_neurite_oasis.py" is to provide a toy example to demonstrate how SYMNet can be trained on the existing dataset. In our paper, we strictly follow the dataset split as written in our paper, i.e., train/validation/test: 255/20/150, order by the case ID (ascending order). In the "Train_sym_neurite_oasis.py", we measure the pairwise registration result, but we measure the atlas registration result (register all validation scans to the 1st validation scan). Therefore, we reduce the number of validation scans in our toy example in order to speed up the training.

Yes, you are correct. Our paper was actually published earlier than adalca's preprocessed dataset.  In the paper, we used the official raw data downloaded from https://www.oasis-brains.org/#data via FTP. And preprocessed it with Freesurfer, visual check and cropped it from 256^3 to 144x192x160. Finally, we obtained 425 T1-weighted brain MRI, which is different from the 414 scans in adalca's preprocessed dataset. An example of our preprocessed data is provided at https://github.com/cwmok/Fast-Symmetric-Diffeomorphic-Image-Registration-with-Convolutional-Neural-Networks/tree/master/Data.

I think we are using a very similar preprocessing pipeline as we both use Freesurfer to do so. Yet, there are slight differences such as visual check, the orientation of the scans and the number of scans included in the dataset. If you would like to pre-process the raw data on your own, you may follow the junyuchen245's guideline here: https://github.com/junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration/blob/main/PreprocessingMRI.md

If you want to strictly reproduce the results (with 425 scans) in the paper, you need to download the OASIS raw data and follow the preprocessing step above. If you want to reproduce the results with adalca's processed dataset, you might try our toy example and adjust the hyperparameter of SYMNet.

Hi Tony,
Thank you very much!
And thank you for the detailed answers. I still have this one question. I saw there are 5 types of oasis datasets on https://www.oasis-brains.org/#data.  Do you mind pointing me to the one you used in the paper?  I just need to get the id list of the test set so that I can rule out the trainset from adalca's processed dataset.

Hi Lintian,
We only use the "OASIS-1: Cross-sectional MRI Data in Young, Middle Aged, Nondemented and Demented Older Adults" one. I downloaded the dataset in 2018, which contained only 425 T1-weighted brain MRI. I believe they have updated the dataset since 2019.

Got it.
Since the current OASIS-1 only contains 416 subjects, it would be very difficult to rule out the train set and validation set from the OASIS-1 id list based on the rule:

"In our paper, we strictly follow the dataset split as written in our paper, i.e., train/validation/test: 255/20/150, order by the case ID (ascending order)."

Is it possible that you can share the smallest case id for the test set used in the paper? With this information, I can just use all the cases with greater case ids as the test set.

We use all disc (1-11) in the OASIS-1 dataset. If you count the total number of MR sessions in the screenshot, you will find out there are 425 items.

The smallest case id will be OAS1_0001_MR1.

The largest case id will be OAS1_0457_MR1.

Got it. Thank you very much for the patient answers! This helps a lot!
One thing to note,  some cases might have been removed from the dataset since the version you used. The oasis-1 from https://www.oasis-brains.org/#data contains 416 T1 cases and the oasis from https://github.com/adalca/medical-datasets/blob/master/neurite-oasis.md contains 414 cases. Both of them end with 0457 being the greatest id.


Foreign console cell tweaks.

This PR:

[x]  moves responsibility for setting foreign cells to read-only into the ConsoleContent class, (cc @akosyakov)
[x] fixes a rendering bug where foreign cell styles were not visible because of CSS specificity

cc: @danielballan

LGTM. Thanks for catching the readonly bit.


Allow missing assets

What problem does this solve or what need does it fill?
I'd like a way to suppress the error when an asset file is not found. Two example use cases:

When the asset subfolder is being used as a cache, and a cache miss is not an error.
For modding, when the existence of a particular asset is a signal which enables a feature.

What solution would you like?
This could be a feature of the AssetLoader trait. One idea is to have a new method called load_default() which is called when the asset is not found - the default implementation would be to return an error. Users could then override this method to return a default version of the asset. Note that we have to return something, as the API for loading assets doesn't allow a handle to point to nothing. It would be up to the user to include a flag or property within the default asset to indicate that this is a missing asset.
Another approach would be to have a special error code that indicates that the asset is not there, but the normal error message should be suppressed.
What alternative(s) have you considered?
One alternative is to scan the folder and check all the asset names, but this is expensive, especially if you are writing assets during play.

I ran into this recently when I wanted to use configuration or manifest-style files as assets. The use case would loosely be: if the configuration file doesn't exist, create one. I'm using custom AssetLoaders, but I would never be able to handle the case of something like std::io::ErrorKind::NotFound because we fail before things even get to the loader.


feature: add account and inventory ID to tracker

This commit adds the user account and inventory ID to tracker
messages.  It also changes the date format to what the tracker
expects.

Codecov Report

Merging #36 into master will decrease coverage by 43.56%.
The diff coverage is 37.68%.

@@             Coverage Diff             @@
##           master      #36       +/-   ##
===========================================
- Coverage   91.37%   47.81%   -43.57%
===========================================
  Files           6       10        +4
  Lines         116      274      +158
===========================================
+ Hits          106      131       +25
- Misses         10      143      +133

Impacted Files
Coverage Δ

historical_system_profiles/listener_logging.py
0.00% <0.00%> (ø)

...rical_system_profiles/payload_tracker_interface.py
0.00% <0.00%> (ø)

historical_system_profiles/models.py
43.47% <25.00%> (-56.53%)
:arrow_down:

historical_system_profiles/db_interface.py
30.55% <30.55%> (ø)

historical_system_profiles/views/v1.py
35.29% <35.29%> (ø)

historical_system_profiles/app.py
97.14% <90.00%> (-2.86%)
:arrow_down:

historical_system_profiles/config.py
93.75% <93.75%> (ø)

historical_system_profiles/metrics.py
100.00% <100.00%> (ø)

... and 5 more

Continue to review full report at Codecov.

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


Preserve editor group widths when moving groups left/right

VSCode Version: 1.25.1, 1.26.0-insider
OS Version: Windows 10

Steps to Reproduce:

Open a bunch of tabs
Split a tab to make a group to the left or right
Resize the divider between the two groups
Move the active group to the left or right
Group widths are not maintained (group size should move with group)

Does this issue occur when all extensions are disabled?: Yes

/cc @joaomoreno this may require some additional API on the grid widget for me to call. Currently I am doing this:

removeView (here)
addView (here)

If I had a method to move a view to a new location the widget could maybe preserve its sizes?


Add Python 3.10 to release builds

What do these changes do?
Add Python 3.10 to the release build scripts. This is now possible since TF 2.8 supports Python 3.10.
How Has This Been Tested?
A test release build is triggered to verify if all works fine (and to fill the cache):
https://github.com/larq/compute-engine/actions/runs/2220640761
Benchmark Results
N/A
Related issue number
N/A

There is another
gcc: internal compiler error

We could try --local_ram_resources=HOST_RAM*.40 to the bazel flags.

I went with a re-run first, let's see if that resolves it.

The test release worked fine: https://github.com/larq/compute-engine/actions/runs/2220640761, so I'll merge this in.


[v1 overwrite device] autoEvents not refreshed after delete and insert new device with same profile

🐞 Bug Report
Affected Services
The issue is located in: core-metadata and core-data
Is this a regression?
Yes, the previous version (Geneva) in which this bug was not present.
Description and Minimal Reproduction

Deploy edgex with docker-compose-hanoi.yml
Add device modbus service updating docker-compose file...
Start Modbus Device (ModbusPal Simulator) with a mock configuration (some properties like P1, P2, P3 ecc)
Follow the instructions in Set Up After Starting Services Tutorial.
Therefore:

Insert a new profile by POST to http://localhost:48081/api/v1/deviceprofile/uploadfile
Insert a new device by POST to http://localhost:48081/api/v1/device with some autoEvents (what it not important for test)
p.e. "autoEvents":[ { "frequency": "10s", "onChange":false, "resource": "Values"}]. An id is returned p.e. 643d8e98-36d5-4be9-bdfa-ba71b8d913db

New events occurs with multi property readings every 10 seconds with P1, P2, P3 ecc
Delete device by DELETE to http://localhost:48081/api/v1/device/id/643d8e98-36d5-4be9-bdfa-ba71b8d913db
Insert a new device with same name and profile by POST to http://localhost:48081/api/v1/device but with "different" autoEvents:
p.e. "autoEvents":[ { "frequency": "30s", "onChange":true, "resource": "P1"}]
Old Values events occurs with multi property readings every 10 seconds with P1, P2, P3 ecc

🔥 Exception or Error
No exception or error.  Last configuration for autoEvents didn't overwrite.
🌍  Your Environment
Deployment Environment:
Docker
EdgeX Version:
Hanoi release 1.3.0

@raycola are you running Modbus Device Service in the docker-network?  could you please paste the log of core-metadata?
I guess the device delete callback can't reach the Modbus Device Service due to the network.
If so, your Modbus Device Service address should be set to the docker0 ip address

Hi thanks for your message. I wrote that in the previous version (Geneva)  this bug was not present. No relevant info found in metadata logs... However I found a solution also in Hanoi through device-modbus service regression. I only changed the version of docker-device-modbus-go's image in docker-compose yaml:
From
device-modbus:
image: edgexfoundry/docker-device-modbus-go:1.3.0
To
device-modbus:
image: edgexfoundry/docker-device-modbus-go:1.2.2
and no events occurs after device deleting... and it works again.
Modbus Device Service address is the same of docker0 as you can see:
sudo ip addr show docker0
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether ##:##:##:##:##:## brd ff:ff:ff:ff:ff:ff
inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global docker0
valid_lft forever preferred_lft forever
{
"name" :"MyVirtualDevice",
"description":"MyVirtualDevice 1",
"adminState":"UNLOCKED",
"operatingState":"ENABLED",
"protocols":{
"modbus-tcp":{
"Address" : "<IP_ADDRESS>",
"Port" : "1502",
"UnitID" : "1"
}
},
...
}
As you can see below in Hanoi with "docker-device-modbus-go:1.3.0" readings never stop
edgex-device-modbus | level=INFO ts=2020-12-07T14:03:53.354963636Z app=edgex-device-modbus source=device.go:153 msg="Removed device: MyVirtualDevice"
edgex-device-modbus | level=ERROR ts=2020-12-07T14:03:59.954895429Z app=edgex-device-modbus source=command.go:51 msg="Device: MyVirtualDevice not found; get"
edgex-device-modbus | level=ERROR ts=2020-12-07T14:03:59.954928684Z app=edgex-device-modbus source=executor.go:53 msg="AutoEvent - error occurs when reading resource Values"
Logs:
Hanoi with  device-modbus: image: edgexfoundry/docker-device-modbus-go:1.3.0
edgex-device-modbus | level=INFO ts=2020-12-07T14:03:44.9447175Z app=edgex-device-modbus source=driver.go:162 msg="Read command finished. Cmd:AI6, Origin:<PHONE_NUMBER>944711334, Uint16: 0 \n"
edgex-device-modbus | 2020/12/07 14:03:44 modbus: sending 00 07 00 00 00 06 01 03 00 06 00 01
edgex-device-modbus | 2020/12/07 14:03:44 modbus: received 00 07 00 00 00 05 01 03 02 00 00
edgex-device-modbus | level=INFO ts=2020-12-07T14:03:44.95145359Z app=edgex-device-modbus source=modbusclient.go:83 msg="Modbus client GetValue's results [0 0]"
edgex-device-modbus | level=INFO ts=2020-12-07T14:03:44.951479452Z app=edgex-device-modbus source=driver.go:162 msg="Read command finished. Cmd:AI7, Origin:<PHONE_NUMBER>951471248, Uint16: 0 \n"
edgex-device-modbus | 2020/12/07 14:03:44 modbus: sending 00 08 00 00 00 06 01 03 00 07 00 01
edgex-device-modbus | 2020/12/07 14:03:44 modbus: received 00 08 00 00 00 05 01 03 02 00 00
edgex-device-modbus | level=INFO ts=2020-12-07T14:03:44.954461627Z app=edgex-device-modbus source=modbusclient.go:83 msg="Modbus client GetValue's results [0 0]"
edgex-device-modbus | level=INFO ts=2020-12-07T14:03:44.954487582Z app=edgex-device-modbus source=driver.go:162 msg="Read command finished. Cmd:AI8, Origin:<PHONE_NUMBER>954479578, Uint16: 0 \n"
edgex-device-modbus | level=INFO ts=2020-12-07T14:03:53.354963636Z app=edgex-device-modbus source=device.go:153 msg="Removed device: MyVirtualDevice"
edgex-device-modbus | level=ERROR ts=2020-12-07T14:03:59.954895429Z app=edgex-device-modbus source=command.go:51 msg="Device: MyVirtualDevice not found; get"
edgex-device-modbus | level=ERROR ts=2020-12-07T14:03:59.954928684Z app=edgex-device-modbus source=executor.go:53 msg="AutoEvent - error occurs when reading resource Values"
edgex-device-modbus | level=ERROR ts=2020-12-07T14:04:14.955009874Z app=edgex-device-modbus source=command.go:51 msg="Device: MyVirtualDevice not found; get"
edgex-device-modbus | level=ERROR ts=2020-12-07T14:04:14.955958772Z app=edgex-device-modbus source=executor.go:53 msg="AutoEvent - error occurs when reading resource Values"
edgex-device-modbus | level=ERROR ts=2020-12-07T14:04:29.956656574Z app=edgex-device-modbus source=command.go:51 msg="Device: MyVirtualDevice not found; get"
edgex-device-modbus | level=ERROR ts=2020-12-07T14:04:29.956685398Z app=edgex-device-modbus source=executor.go:53 msg="AutoEvent - error occurs when reading resource Values"
edgex-core-metadata | level=INFO ts=2020-12-07T14:01:16.0910017Z app=edgex-core-metadata source=database.go:147 msg="Database connected"
edgex-core-metadata | level=INFO ts=2020-12-07T14:01:16.091475033Z app=edgex-core-metadata source=database.go:112 msg="Database for V2 API connected"
edgex-core-metadata | level=INFO ts=2020-12-07T14:01:16.096950561Z app=edgex-core-metadata source=telemetry.go:86 msg="Telemetry starting"
edgex-core-metadata | level=INFO ts=2020-12-07T14:01:16.100953068Z app=edgex-core-metadata source=httpserver.go:99 msg="Web server starting (edgex-core-metadata:48081)"
edgex-core-metadata | level=INFO ts=2020-12-07T14:01:16.101154834Z app=edgex-core-metadata source=message.go:50 msg="Service dependencies resolved..."
edgex-core-metadata | level=INFO ts=2020-12-07T14:01:16.101230466Z app=edgex-core-metadata source=message.go:51 msg="Starting edgex-core-metadata 1.3.0 "
edgex-core-metadata | level=INFO ts=2020-12-07T14:01:16.101275971Z app=edgex-core-metadata source=message.go:55 msg="This is the EdgeX Core Metadata Microservice (DEBUG)"
edgex-core-metadata | level=INFO ts=2020-12-07T14:01:16.101326947Z app=edgex-core-metadata source=message.go:58 msg="Service started in: 7.000342541s"
edgex-core-metadata | level=ERROR ts=2020-12-07T14:01:25.045005489Z app=edgex-core-metadata source=handler.go:47 msg="no item found for supplied key: edgex-device-modbus"
edgex-core-metadata | level=ERROR ts=2020-12-07T14:01:25.046116612Z app=edgex-core-metadata source=handler.go:47 msg="Item not found"
Hanoi with  device-modbus:  image: edgexfoundry/docker-device-modbus-go:1.2.2
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.507472084Z app=edgex-device-modbus source=driver.go:151 msg="Read command finished. Cmd:AI4, Origin:<PHONE_NUMBER>507464738, Uint16: 32700 \n"
edgex-device-modbus | 2020/12/07 14:09:07 modbus: sending 00 05 00 00 00 06 01 03 00 04 00 01
edgex-device-modbus | 2020/12/07 14:09:07 modbus: received 00 05 00 00 00 05 01 03 02 00 00
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.514310241Z app=edgex-device-modbus source=modbusclient.go:83 msg="Modbus client GetValue's results [0 0]"
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.51433675Z app=edgex-device-modbus source=driver.go:151 msg="Read command finished. Cmd:AI5, Origin:<PHONE_NUMBER>514329312, Uint16: 0 \n"
edgex-device-modbus | 2020/12/07 14:09:07 modbus: sending 00 06 00 00 00 06 01 03 00 05 00 01
edgex-device-modbus | 2020/12/07 14:09:07 modbus: received 00 06 00 00 00 05 01 03 02 00 00
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.515773045Z app=edgex-device-modbus source=modbusclient.go:83 msg="Modbus client GetValue's results [0 0]"
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.515797573Z app=edgex-device-modbus source=driver.go:151 msg="Read command finished. Cmd:AI6, Origin:<PHONE_NUMBER>515790350, Uint16: 0 \n"
edgex-device-modbus | 2020/12/07 14:09:07 modbus: sending 00 07 00 00 00 06 01 03 00 06 00 01
edgex-device-modbus | 2020/12/07 14:09:07 modbus: received 00 07 00 00 00 05 01 03 02 00 00
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.52034241Z app=edgex-device-modbus source=modbusclient.go:83 msg="Modbus client GetValue's results [0 0]"
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.52036722Z app=edgex-device-modbus source=driver.go:151 msg="Read command finished. Cmd:AI7, Origin:<PHONE_NUMBER>520359926, Uint16: 0 \n"
edgex-device-modbus | 2020/12/07 14:09:07 modbus: sending 00 08 00 00 00 06 01 03 00 07 00 01
edgex-device-modbus | 2020/12/07 14:09:07 modbus: received 00 08 00 00 00 05 01 03 02 00 00
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.521645515Z app=edgex-device-modbus source=modbusclient.go:83 msg="Modbus client GetValue's results [0 0]"
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.521666905Z app=edgex-device-modbus source=driver.go:151 msg="Read command finished. Cmd:AI8, Origin:<PHONE_NUMBER>521660367, Uint16: 0 \n"
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:07.526910745Z app=edgex-device-modbus source=utils.go:94 Content-Type=application/json correlation-id=a06f32d6-4510-4faf-bc3a-d00232f45ce2 msg="SendEvent: Pushed event to core data"
edgex-device-modbus | level=INFO ts=2020-12-07T14:09:13.01817412Z app=edgex-device-modbus source=device.go:128 msg="Removed device: MyVirtualDevice"
edgex-core-metadata | level=INFO ts=2020-12-07T14:07:36.413809271Z app=edgex-core-metadata source=database.go:147 msg="Database connected"
edgex-core-metadata | level=INFO ts=2020-12-07T14:07:36.414301495Z app=edgex-core-metadata source=database.go:112 msg="Database for V2 API connected"
edgex-core-metadata | level=INFO ts=2020-12-07T14:07:36.417867164Z app=edgex-core-metadata source=telemetry.go:86 msg="Telemetry starting"
edgex-core-metadata | level=INFO ts=2020-12-07T14:07:36.418351744Z app=edgex-core-metadata source=httpserver.go:99 msg="Web server starting (edgex-core-metadata:48081)"
edgex-core-metadata | level=INFO ts=2020-12-07T14:07:36.418706357Z app=edgex-core-metadata source=message.go:50 msg="Service dependencies resolved..."
edgex-core-metadata | level=INFO ts=2020-12-07T14:07:36.418779603Z app=edgex-core-metadata source=message.go:51 msg="Starting edgex-core-metadata 1.3.0 "
edgex-core-metadata | level=INFO ts=2020-12-07T14:07:36.418822886Z app=edgex-core-metadata source=message.go:55 msg="This is the EdgeX Core Metadata Microservice (DEBUG)"
edgex-core-metadata | level=INFO ts=2020-12-07T14:07:36.418873599Z app=edgex-core-metadata source=message.go:58 msg="Service started in: 6.220313249s"
edgex-core-metadata | level=ERROR ts=2020-12-07T14:07:46.392774247Z app=edgex-core-metadata source=handler.go:47 msg="no item found for supplied key: edgex-device-modbus"
edgex-core-metadata | level=ERROR ts=2020-12-07T14:07:46.393459402Z app=edgex-core-metadata source=handler.go:47 msg="Item not found"
I don't undestand why but my workaround works.
Any suggest?

Thanks for reporting this.  It might be a bug we created when we refactored the device-sdk-go.
I am moving this issue to https://github.com/edgexfoundry/device-sdk-go/issues/681


Devhub Notifications are broken

I recently added PR to add support for different devhub notifications types, starting with devhub/, but it doesn't work as expected.
I have a created a video to explain the issue, the code also breaks for previously added devgovgigs/ notifcations (on main branch) which worked fine previously.

Hey @Megha-Dev-19. Thanks for filling this issue. I'm working on the solution for that. I have one question: why do you put a notifier here? According to devhub widget, which handles the link to proposal, they are not using a notifier field there. So, is that was just a typo from your side or there is some logic behind the notifier param?

hey @shelegdmitriy, yeah we don't need to pass it in params there.

notifier is the one who should be displayed as profile in notifications, since all the notifications will be created by devhub.near account but the actual person initiating it is the notifier, hope that makes sense.

@shelegdmitriy thank you for picking this, but there are still some issues
https://github.com/near/near-discovery-components/assets/100185149/2fcc4cc3-63a5-4fed-93dc-687a4f42deda

@shelegdmitriy thank you for picking this, but there are still some issues
https://github.com/near/near-discovery-components/assets/100185149/2fcc4cc3-63a5-4fed-93dc-687a4f42deda

Did you test it using the develop branch? That fix wasn't deployed into production yet

@shelegdmitriy Yeah I m checking on beta.near.org, that’s synced to develop right.?

@shelegdmitriy Yeah I m checking on beta.near.org, that’s synced to develop right.?

No it's not. You can check it locally using instructions

Hey @Megha-Dev-19. Fix for this issue has been released on Friday, may I ask you to check how notifications works for you?

@shelegdmitriy Yeah I m checking on beta.near.org, that’s synced to develop right.?

No it's not. You can check it locally using instructions
In readme, it's mentioned here? is that wrong then.?

@shelegdmitriy I tried on production and there are still issues:
https://github.com/near/near-discovery-components/assets/100185149/f7b263d6-9e57-4756-a011-b64a36e3fe4d

@shelegdmitriy I tried on production and there are still issues:
https://github.com/near/near-discovery-components/assets/100185149/f7b263d6-9e57-4756-a011-b64a36e3fe4d

May I ask you to provide a clear examples of issues you have? Provide a screenshots how some notification looks on near.org vs near.social, and add a detailed example of the expected result so I'll have a clear view what I should fix.

@shelegdmitriy it doesn't work on near.social yet, the code isn't deployed there yet
in near.org: the text below the notification is wrong, it seems of some other notification, rather than the current one.

Hey @Megha-Dev-19. I think, the issue you described here is relates to this one https://github.com/near/near-discovery/issues/909. FYI: I'm looking into it


[DOC] Emphasize the backupstore cannot set retention policy

What's the document you plan to update? Why? Please describe
The lifecycle of backups' block and config files in the backupstore should be fully controlled by Longhorn. Any retention policy cannot be set to the backupstore.
Additional context

cc @ChanYiLin @mantissahz @innobead

Verified on master-head 20241127

website master-head https://github.com/longhorn/website/commit/e0a33384e57bcd36c0f18d14abd6fc976c9c64aa

Result Passed

[x] require/doc : Checked documentation in https://github.com/longhorn/website/pull/1010


Try re-enable pyi

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin please rerender


Using structured output with tools always produces empty tool_calls array

What is the issue?
With OpenAI API, you can pass both tools and response_format. In case model wants to call tools, message will be null and tools will be called.
With Ollama, it appears that when response_format is present as JSON schema, the tool calls is an empty array, despite model wanting to call the tools.
OS
macOS
GPU
Apple
CPU
Apple
Ollama version
0.5.1

Hi @grabbou, can you provide a sample prompt? I will tory to reproduce this issue.


Unable to install gauge using brew after uninstallation

Expected behavior
I should be able to install gauge after uninstalling it.
Actual behavior
I get a message that gauge is already installed.
Steps to replicate

Uninstall gauge -

rm -rf /usr/local/bin/gauge /usr/local/bin/gauge_screenshot ~/.gauge

install gauge using brew
$ brew install gauge
Updating Homebrew...
Warning: gauge 0.9.1 is already installed

check if gauge is present
$ which gauge
*check for gauge version
$ gauge version
-bash: /usr/local/bin/gauge: No such file or directory

But still I get a warning that gauge is already installed and does not proceed in installation
$ brew install gauge
Warning: gauge 0.9.1 is already installed

We have to update the documentation to uninstall gauge
brew uninstall gauge

Command for uninstalling gauge via brew:
brew uninstall gauge

It is a bad idea to manually change files installed via a package manager. If you install it with a package manager, always use the package manager to uninstall/upgrade.

@sguptatw The docs for gauge uninstallation with package managers are updated and available in master.
Could you verify it and close the issue?


Detox should allow us to set configuration outside package.json

Description
Hi, it would be nice to configure detox outside package.json.
I get a Cannot read property 'configurations' of undefined when removing the configuration from package.json.
The reason behind this is that I have a lot of configurations, running them via a matrix Travis job.
Detox, Node, Device, Xcode and macOS Versions

Detox: 7.3.7
React Native: 0.55.4
Node: 8
Device: /
Xcode: 9.3
macOS: 10.13

Thanks !

One workaround is to sed or echo into the package.json and change it according to your CI environment. We do this in our own test project. See here: https://github.com/wix/detox/blob/master/scripts/change_react_native_version.js


METRON-1288  Update so it installs java8

Contributor Comments
Force install of java8 since java9 does not appear to work with the current scripts in the README.md file
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:

[x ] Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
[ x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
[x ] Has your PR been rebased against the latest commit within the target branch (typically master)?

For code changes:

[ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed?

[ ] Have you included steps or a guide to how the change may be verified and tested manually?

[ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
mvn -q clean integration-test install && build_utils/verify_licenses.sh

[ ] Have you written or updated unit tests and or integration tests to verify your changes?

[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

[ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?

For documentation related changes:

[ x] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via site-book/target/site/index.html:
cd site-book
mvn site

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.

+1 Thanks for the contribution

I'm going to retract my +1 until I can get some answers about non-individual submissions

Thank you again for the contribution.  We would like for you to re-submit this pr as an individual so that we can maintain the correct author and attribution.
Feel free to tag me in the new PR

Since this has been landed in the other PR, can you close this one please?


Not moving back from child dialog (QnaIntent trigger) to Parent Dialog

Describe the bug
I've an three dialogs and each dialog has one beginOnInt, QnaIntent, Unknown Intent. Each dialog is getting fired based on LUIS intent from the parent dialog.
Issue:
When user enters one of the dialog, beginOnInt prompts and takes input and checking in QnaIntent and giving response.
But when there is no match in QnaIntent, I expect the query to pass back to root dialog and send it to the relevant child dialog. Currently, this is not happening.
Please help me if I'm missing anything.

Version
BOT Composer 1.3.0
BOT Emulator 4.11.0
OS

[ ] macOS
[x] Windows
[ ] Ubuntu

Windows 10
To Reproduce
Steps to reproduce the behavior:
When user enters 1st dialog, beginOnInt prompts and takes input and checking in QnaIntent and giving response.
But when there is no match in QnaIntent in 1stdialog, it is not showing as empty.
Expected behaviour
I expect the query to pass back to root dialog and send it to the relevant child dialog.
Screenshots

Hi @narulasrinivas I think I need to see more specifics on what you have set up to understand what is going on and find any solutions, etc.
Also, I'm not sure what you mean by:

But when there is no match in QnaIntent in 1stdialog, it is not showing as empty.

What should be empty?
Are you able to share this bot in a repository (scrubbed of personal/sensitive information) so that I can test myself? Also, maybe an example of the conversation and how it is not working.

Hi @narulasrinivas I think I need to see more specifics on what you have set up to understand what is going on and find any solutions, etc.
Also, I'm not sure what you mean by:

But when there is no match in QnaIntent in 1stdialog, it is not showing as empty.

What should be empty?
Are you able to share this bot in a repository (scrubbed of personal/sensitive information) so that I can test myself? Also, maybe an example of the conversation and how it is not working.

Hi @narulasrinivas Just checking in. Do you have a reproduction you could share? (in a repository, etc)
Also, can you clarify what should be empty?

Hi @narulasrinivas Just checking in. Do you have a reproduction you could share? (in a repository, etc)
Also, can you clarify what should be empty?

Hi @narulasrinivas I am closing this due to inactivity. If you are still having this issue and need assistance, please clarify on the points above and I will reopen.

Hi @narulasrinivas I am closing this due to inactivity. If you are still having this issue and need assistance, please clarify on the points above and I will reopen.


Add more unittests for CustomFloat.

Before going to fix issues #20261, #20263, #20281, #20282, #20283, #20284 and #20286 I want to make sure, that I don't break the stuff, that's allready working.
Corrected some small style mistakes too.

Can any of those asserts be static asserts instead?

Can any of those asserts be static asserts instead?

Yes, I changed them.


Unknown column 'distance_sphere'

Laravel: 10.1.5
matanyadaev/laravel-eloquent-spatial: 3.1.2
Query example:
Users::whereDistanceSphere('location', $user->location, '<', 20)->get()
Error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'distance_sphere' in 'where clause' (Connection: mysql, SQL: select * from `users` where `distance_sphere` = location)
What do I do wrong?

Hi @NickSun. The code you attached doesn't reproduce the error. There's a chance you are not doing something correctly.
Please fork this repo and add a failing test. It will help me to debug the issue and fix it.

@MatanYadaev you are right. I forgot to add HasSpatial trait to the model. Thanks!


Docker not installed

Listed in .info file after image build.
docker                           1.5-2                            all          transitional package
But attempting to run docker on pi results in docker: command not found

Same issue with 64-bit build. Maybe use @wandering-andy/docker-install


Optimized and closed gap in paint-bucket icon

What is the purpose of this pull request?

[ ] New Icon
[ ] Bug fix
[ ] New Feature
[ ] Documentation update
[x] Other: Optimization

Hmm with the changes from @karsa-mistmere is now adding more code. So I think we should not do this one.


Fix khal

Motivation for this change
Test was broken.
This PR dependson #85809
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

Works for me but I am getting weird warnings that I wasn't getting with the previously working version on master:
warning: In event c0a64b13-0ba5-41d6-99e3-069a75171076.ics, DTSTART has a timezone, but UNTIL does not. This might lead to errenous repeating instances (like missing the last intended instance or adding an extra one).

Which was the previous working version? I'm just about to setup khal

I just disabled the tests on while using 22a3bf9fb9e

I just disabled the tests while using 22a3bf9

I'm not sure I understand what above link has to do with this PR. It might a typo or I need more handholding where to look :smile:


Add a generic string pattern matching API

Summary
Stabilize all string functions working with search patterns around a new
generic API that provides a unified way to define and use those patterns.
Motivation
Right now, string slices define a couple of methods for string
manipulation that work with user provided values that act as
search patterns. For example, split() takes an type implementing CharEq
to split the slice at all codepoints that match that predicate.
Among these methods, the notion of what exactly is being used as a search
pattern varies inconsistently: Many work with the generic CharEq,
which only looks at a single codepoint at a time; and some
work with char or &str directly, sometimes duplicating a method to
provide operations for both.
This RFC proposes a set of traits for defining such patterns, which enable efficient iteration through all matches in a string.
Rendered

Update: I started implementing this RFC by defining the Pattern and Matcher traits and moving the existing implementations behind them. However, I'm currently blocked on a few associated type fixes.

Got a basic implementation here: https://github.com/Kimundi/rust/tree/str_pattern_ai_safe
Most of the iterator adapters are still missing there, mostly it just implements the Pattern traits as direct delegation to the currently existing code for CharEq and &str, and changes some of the StrExt methods in core to use them, without changing the std interface directly.
As far as performance goes, I had to write a few benchmarks first, as can be seen in the first commit here. The initial numbers for the naive implementation look like this:
                                                                          OLD (CharEq and &str)           NEW (Pattern)
test str::bench::chars_count::long_lorem_ipsum            ... bench:     13981 ns/iter (+/- 5959)     13909 ns/iter (+/- 309)
test str::bench::chars_count::short_ascii                 ... bench:       363 ns/iter (+/- 19)         362 ns/iter (+/- 7)
test str::bench::chars_count::short_mixed                 ... bench:       319 ns/iter (+/- 33)         321 ns/iter (+/- 11)
test str::bench::chars_count::short_pile_of_poo           ... bench:       151 ns/iter (+/- 4)          150 ns/iter (+/- 4)
test str::bench::contains_bang_char::long_lorem_ipsum     ... bench:      3218 ns/iter (+/- 56)        3214 ns/iter (+/- 69)
test str::bench::contains_bang_char::short_ascii          ... bench:        59 ns/iter (+/- 8)           84 ns/iter (+/- 1)
test str::bench::contains_bang_char::short_mixed          ... bench:        91 ns/iter (+/- 1)           88 ns/iter (+/- 3)
test str::bench::contains_bang_char::short_pile_of_poo    ... bench:        88 ns/iter (+/- 2)           91 ns/iter (+/- 1)
test str::bench::contains_bang_str::long_lorem_ipsum      ... bench:      7931 ns/iter (+/- 174)       7747 ns/iter (+/- 176)
test str::bench::contains_bang_str::short_ascii           ... bench:       316 ns/iter (+/- 14)         290 ns/iter (+/- 14)
test str::bench::contains_bang_str::short_mixed           ... bench:       269 ns/iter (+/- 33)         278 ns/iter (+/- 7)
test str::bench::contains_bang_str::short_pile_of_poo     ... bench:       165 ns/iter (+/- 20)         162 ns/iter (+/- 4)
test str::bench::find_underscore_char::long_lorem_ipsum   ... bench:      3227 ns/iter (+/- 297)       4308 ns/iter (+/- 121)
test str::bench::find_underscore_char::short_ascii        ... bench:        91 ns/iter (+/- 6)          125 ns/iter (+/- 5)
test str::bench::find_underscore_char::short_mixed        ... bench:        92 ns/iter (+/- 5)          127 ns/iter (+/- 1)
test str::bench::find_underscore_char::short_pile_of_poo  ... bench:        92 ns/iter (+/- 4)          127 ns/iter (+/- 8)
test str::bench::find_underscore_str::long_lorem_ipsum    ... bench:      4352 ns/iter (+/- 170)       4337 ns/iter (+/- 323)
test str::bench::find_underscore_str::short_ascii         ... bench:       198 ns/iter (+/- 16)         202 ns/iter (+/- 15)
test str::bench::find_underscore_str::short_mixed         ... bench:       160 ns/iter (+/- 9)          163 ns/iter (+/- 12)
test str::bench::find_underscore_str::short_pile_of_poo   ... bench:       249 ns/iter (+/- 5)          253 ns/iter (+/- 8)
test str::bench::find_zzz_char::long_lorem_ipsum          ... bench:     15005 ns/iter (+/- 214)      16080 ns/iter (+/- 290)
test str::bench::find_zzz_char::short_ascii               ... bench:       416 ns/iter (+/- 6)          421 ns/iter (+/- 14)
test str::bench::find_zzz_char::short_mixed               ... bench:       349 ns/iter (+/- 9)          371 ns/iter (+/- 19)
test str::bench::find_zzz_char::short_pile_of_poo         ... bench:       173 ns/iter (+/- 2)          181 ns/iter (+/- 4)
test str::bench::find_zzz_str::long_lorem_ipsum           ... bench:      1921 ns/iter (+/- 81)        1922 ns/iter (+/- 78)
test str::bench::find_zzz_str::short_ascii                ... bench:       110 ns/iter (+/- 5)          115 ns/iter (+/- 11)
test str::bench::find_zzz_str::short_mixed                ... bench:       106 ns/iter (+/- 3)          110 ns/iter (+/- 3)
test str::bench::find_zzz_str::short_pile_of_poo          ... bench:       106 ns/iter (+/- 4)          111 ns/iter (+/- 4)
test str::bench::match_indices_a_str::long_lorem_ipsum    ... bench:      9401 ns/iter (+/- 182)       9877 ns/iter (+/- 140)
test str::bench::match_indices_a_str::short_ascii         ... bench:       417 ns/iter (+/- 44)         448 ns/iter (+/- 30)
test str::bench::match_indices_a_str::short_mixed         ... bench:       343 ns/iter (+/- 9)          354 ns/iter (+/- 14)
test str::bench::match_indices_a_str::short_pile_of_poo   ... bench:       157 ns/iter (+/- 8)          159 ns/iter (+/- 7)
test str::bench::rfind_underscore_char::long_lorem_ipsum  ... bench:      4285 ns/iter (+/- 108)       3218 ns/iter (+/- 54)
test str::bench::rfind_underscore_char::short_ascii       ... bench:       112 ns/iter (+/- 3)           87 ns/iter (+/- 1)
test str::bench::rfind_underscore_char::short_mixed       ... bench:       114 ns/iter (+/- 3)           88 ns/iter (+/- 3)
test str::bench::rfind_underscore_char::short_pile_of_poo ... bench:       114 ns/iter (+/- 2)           88 ns/iter (+/- 3)
test str::bench::rfind_zzz_char::long_lorem_ipsum         ... bench:      4296 ns/iter (+/- 92)        3243 ns/iter (+/- 478)
test str::bench::rfind_zzz_char::short_ascii              ... bench:       123 ns/iter (+/- 7)          111 ns/iter (+/- 5)
test str::bench::rfind_zzz_char::short_mixed              ... bench:       138 ns/iter (+/- 3)          118 ns/iter (+/- 4)
test str::bench::rfind_zzz_char::short_pile_of_poo        ... bench:       106 ns/iter (+/- 3)          110 ns/iter (+/- 19)
test str::bench::split_str_a_str::long_lorem_ipsum        ... bench:     10154 ns/iter (+/- 252)      10711 ns/iter (+/- 881)
test str::bench::split_str_a_str::short_ascii             ... bench:       476 ns/iter (+/- 13)         507 ns/iter (+/- 14)
test str::bench::split_str_a_str::short_mixed             ... bench:       351 ns/iter (+/- 14)         393 ns/iter (+/- 15)
test str::bench::split_str_a_str::short_pile_of_poo       ... bench:       168 ns/iter (+/- 39)         168 ns/iter (+/- 4)
test str::bench::trim_ascii_char::long_lorem_ipsum        ... bench:     15031 ns/iter (+/- 380)      24684 ns/iter (+/- 6249)
test str::bench::trim_ascii_char::short_ascii             ... bench:       418 ns/iter (+/- 12)         643 ns/iter (+/- 31)
test str::bench::trim_ascii_char::short_mixed             ... bench:       109 ns/iter (+/- 12)         267 ns/iter (+/- 50)
test str::bench::trim_ascii_char::short_pile_of_poo       ... bench:        29 ns/iter (+/- 2)          186 ns/iter (+/- 7)
test str::bench::trim_left_ascii_char::long_lorem_ipsum   ... bench:     16199 ns/iter (+/- 3707)     23629 ns/iter (+/- 1938)
test str::bench::trim_left_ascii_char::short_ascii        ... bench:       417 ns/iter (+/- 12)         610 ns/iter (+/- 40)
test str::bench::trim_left_ascii_char::short_mixed        ... bench:        12 ns/iter (+/- 0)           67 ns/iter (+/- 3)
test str::bench::trim_left_ascii_char::short_pile_of_poo  ... bench:        13 ns/iter (+/- 0)          179 ns/iter (+/- 7)
test str::bench::trim_right_ascii_char::long_lorem_ipsum  ... bench:      3231 ns/iter (+/- 146)       5364 ns/iter (+/- 148)
test str::bench::trim_right_ascii_char::short_ascii       ... bench:       109 ns/iter (+/- 1)          150 ns/iter (+/- 7)
test str::bench::trim_right_ascii_char::short_mixed       ... bench:        83 ns/iter (+/- 1)          131 ns/iter (+/- 6)
test str::bench::trim_right_ascii_char::short_pile_of_poo ... bench:        17 ns/iter (+/- 1)           87 ns/iter (+/- 1)

So far, I can see two different kinds of operations with significant differences:

trim_matches, trim_left_matches and trim_right_matches: They previously where able to just look for the first codepoint that did not match the predicate and use that index, while the new code needs to find the longest chain of connected matches instead.
contains_char and find: Due to rfind giving the opposite results, this might just be benchmark data related, but maybe also due to the branch that switches between the ascii-byte and utf8-decoding paths being contained inside the loop now.

Both issues could potentially be resolved by providing more default methods on Pattern that concrete implementations could specialize, like:

Pattern::find and Pattern::rfind for being able to optimize that inner loop more
A duplication of the Pattern::into_matcher and Pattern::Matcher associated items for providing a complement Matcher instead, which can be used to find the first non matching position.

Attempts to implement the remaining iterator adapters are currently blocked on https://github.com/rust-lang/rust/issues/21726

I updated the branch to include implementations of the various Split adapters as well.
The updated benchmark data can bee seen here: https://docs.google.com/spreadsheets/d/1oiGGHHjOC3EDmmVOzZDaUX0qHqcrUHGbNoU9ffqBfgY/edit?usp=sharing
The only thing missing now is starts_with and ends_with, and the additional methods proposed in this RFC that don't currently exist on StrExt.

These benchmarks are not very promising. E.g. some of them are 12x slower with the new API.
However, it is very important to notice that the old versions are already very slow! I'm not going to claim that this RFC prevents optimizations because I have to read it carefully. However, even if some of the benchmarks show that the new APIs are actually faster than the old ones, one should be careful not to make any changes that prevent further optimizations.
E.g. compare the current find_str to a trivial find_str implementation that uses memmem:
test find_underscore_str_long         ... bench:      4765 ns/iter (+/- 20)
test find_underscore_str_memmem_long  ... bench:       115 ns/iter (+/- 0)

test find_underscore_str_short        ... bench:       171 ns/iter (+/- 1)
test find_underscore_str_memmem_short ... bench:        13 ns/iter (+/- 0)

https://gist.github.com/anonymous/0ecad4a255073b4df8c6

@mahkoh

These benchmarks are not very promising. E.g. some of them are 12x slower with the new API.

I just wanted to check -- looking at the spreadsheet above, the worst overhead looks like 93%, i.e. ~2x, not 12x. Am I reading something incorrectly?
That said, even a 2x slowdown is worrying, of course.
It'd be interesting to explore the measures that @Kimundi mentioned above, so see how much these overheads can be reduced, but I also appreciate your point about the existing implementations being non-optimal. The details of the RFC are out of cache for me at the moment, but @Kimundi, I wonder if it's possible to use something like memmem (or implement something similar directly) with this style of API?

@aturon: Maybe I'm misreading something but I believe that the old str::bench::trim_left_ascii_char::short_pile_of_poo takes 13 UNIT while the new one takes 179 UNIT.

I reformatted the spreadsheet slightly (including sorting from largest-slowdown to largest-speedup): https://docs.google.com/spreadsheets/d/1i_-vqXRBeksxYgE-4GM3_iRdx4L2HupnLKFfPIT4_Xs/edit?usp=sharing

@huonw Thanks. I must've missed it before or something, but now I see these cases. :-/

Hm, I knew these percent values looked wrong... I guess I failed at doing the calculations properly :P

@Kimundi and I discussed performance on IRC and we determined that the major slowdown is because Matcher::next isn't lazy enough, since determining the first nonmatch requires inferring it from the position of the matches themselves, and the matches may be positioned arbitrarily far past the first nonmatch.
For example, for the slowest few trim ones: there are no matching characters (or, there is a large gap until the first matching one). The old code just checks first character, sees it doesn't match and immediately returns the string unchanged,  but the new code runs through until the end of the string (or the first matching one) trying to find a match, before determining that it should return it unchanged.
There was a suggestion to add something like next_nonmatching, which should resolve this.
(Just writing this down so it's not forgotten, and to give @aturon some hope. :smile:)

I extended the Matcher traits with methods for finding the next rejected match, which allowed the trim functions to use the previous early-out logic. The results look promising, at worst there is now only a 2x slowdown for the cases of splitting on an ascii symbol in string of only 4-byte codepoints, which might be attributable to the codepoint decoding going through an non-inline function call.
https://docs.google.com/spreadsheets/d/181oKA1H5oNCR4NuVSUSB6QVxIi36Xq52cOPK5YL7510/edit?usp=sharing

I managed to get the previous worst case of 2x slowdown down to 1.2 or so locally, but in the combined bencher run its still at 2x:
https://docs.google.com/spreadsheets/d/1q02kDVLc6YL3j73Ig-93IY1DyYtCjODp-9Ls8ztVZ_s/edit?usp=sharing
Looking at the coretest IR, it seems that llvm does not inline some of the generic instantiations at every use side, which means it misses on some test-specific optimizations.

@Kimundi would you mind updating the RFC with the changes to Matcher?

My only other concern is starts_with and ends_with, which presumably could be much faster with a match_at API or something like that.
I know when I mentioned that before, you worried that we were growing the trait to encompass basically all of the methods provided by str, but:

That's not quite true, because the methods offer some additional functionality like providing iterators on top of searching;

Even if it does amount to roughly the same functionality, the main motivation (as I see it) isn't so much code reuse as more principled overloading.

This has been a long time in the making! Thanks for your persistence, @Kimundi
This RFC will go a long way toward making the str API more consistent, ergonomic and flexible, allowing for a wide (and open-ended) variety of patterns to be used with the same set of methods. The prototype performance has gotten within spitting distance of the existing API, and there do not appear to be any fundamental performance drawbacks to the approach. We will likely keep the Searcher trait unstable for longer than the rest of the API, however, to allow continued experimentation and tweaking.
Tracking issue

Since the API is still unstabe, I was wondering if we could remove lifetime parameter from the Pattern by renaming current Pattern<'a> to eg. BoundedPattern<'a> and providing new extension trait Pattern: for<'a> BoundedPattern<'a>. From what I've tested, it is possible. Pattern implementors would implements BoundedPattern, but users would just use Pattern. This would simplify a lot of function signatures in std and will make several usecases simpler: currently you sometimes need to make a bound P: for<'s>Pattern<'s>, which is quite compilcated syntax for just using one pattern for multiple strings.

@krdln Wow, didn't realize that this is possible. This sounds very doable indeed.

@krdln This is a fantastic idea! The 'a was originally working around the lack of HKT, but it didn't occur to me that HRTBs are likely expressive enough already. @Kimundi, would you be willing to prototype this?

I just tried it, an unfortunately it seems that the HRTB approach does not play well with associated types:
impl<'a, P: Pattern> Clone for $t<'a, P>
    where P::Searcher: Clone
{
    fn clone(&self) -> Self {
        let $s = self;
        $e
    }
}

/media/linux_data/dev/rust/fork2/rust/src/libcore/str/mod.rs:412:19: 412:30 error: cannot extract an associated type from a higher-ranked trait bound in this context [E0212]
/media/linux_data/dev/rust/fork2/rust/src/libcore/str/mod.rs:412             where P::Searcher: Clone
                                                                                ^~~~~~~~~~~

I get ~54 errors, all because of attempting to use ::Searcher. This includes str methods like rsplit(), so just changing all offending lines to BoundedPattern<'a> would subvert the change.
I could just change all those cases to use BoundedPattern<'a> directly, but that

@Kimundi Does changing the bound to the following work? It should help.
where <P as BoundedPattern<'a>>::Searcher: Clone

By "from what I've tested" I meant that this black magic compiles:
    use std::str::pattern::Pattern;
    trait Pat: for<'a>Pattern<'a> {
        fn into_searcher<'a>(self, haystack: &'a str) -> <Self as Pattern<'a>>::Searcher {
            <Self as Pattern<'a>>::into_searcher(self, haystack)
        }
    }
    impl<P: for<'a>Pattern<'a>> Pat for P {}

And I concluded that rest of usecases are simpler and will work. (btw, by this example I don't want to say if it's a good idea to copy BoundedPattern's method into Pattern)

@krdln: The issue is that apparently most function signatures that would become easier by using P::Pattern instead become even more verbose by requiring <P as BoundedPattern<'a>>::Pattern.
Like, rsplit() and everything similar seem to require it.

Folks, I'm still fairly new to Rust, and very new to the RFC process, so I apologize if these comments are ill-conceived or misplaced.  I realize this was merged a long time ago, but I don't know where else to ask questions about or comment on what still appears to be an experimental API.
Rather than splitting into an Iterator and collecting into a Vec, I would really like to be able to use if-let's destructuring to dissect strings, e.g.
if let Some((last, first)) = name.split2(',') {
    ...
} else ...

Here the hypothetical split2() method returns Some(tuple) if the char is found, containing what is before and after the comma.  It doesn't split on every comma, just the first (or last, if rsplit2() is used).
And if I'm using a regular expression, I might like to use a split3() method which returns a
Some(left_str, matched_str, right_str)
so that I can examine the part that matched the pattern.
It was easy to code split2() where the pattern is an ascii character, but for a more complex pattern -- or even a potentially multibyte character -- it is trickier.  I looked at the Pattern API:
https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html
but I don't see any way to get the number of bytes used to match the pattern.  Am I missing something?

You can ask questions like these on users.rust-lang.org or reddit on ghe learnrust subreddit.
You can do this already using the splitn iterator.
let mut split2 = name.splitn(',', 2);
if let (Some(last), Some(first)) = (split2.next(), split2.next()) {
    ...
} else ...

If you have further questions please go to one of the forums. I'm active on users and would be happy to help there.


Fix singleton

Thx @Evangelink missed that one, feature flag bag is immutable by design so it didn't fail any tests and also maybe singleton is not needed here, but let's keep the style, too sugars in this C# 😄


Test RSA9h.

LGTM

:+1:

@tcard We have a green so should I merge?

@ricardopereira Yes, done that myself.


NEXT-8596 Adding Ability to hide/show Properties in Product Filter in Product Listing. Fixes #870

… Product Listing.

1. Why is this change necessary?
Fixes #870.
2. What does this change do, exactly?
Adding new filterable column to property group and make them hideable from Storefront Product Listing Filters.
3. Describe each step to reproduce the issue or behaviour.
Video: https://send.firefox.com/download/f95439f708b869d2/#8KPfsxyIy131Lt2ZCrszzg
4. Please link to the relevant issues (if any).
#870
5. Checklist

[x ] I have written tests and verified that they fail without my change
[ x] I have squashed any insignificant commits
[ x] I have written or adjusted the documentation according to my changes
[ x] This change has comments for package types, values, functions, and non-obvious lines of code
[ x] I have read the contribution requirements and fulfil them.

Contributed by @SRaromicon and @vanWittlaer

thanks for your contribution @SRaromicon  :+1: :tada: :blue_heart:


Update use-dmarc-to-validate-email.md

Fixed typo

issue#https://github.com/MicrosoftDocs/microsoft-365-docs/issues/9904

@JohanFreelancer9 Please copy review

Learn Build status updates of commit 3a83fc1:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/security/office-365-security/use-dmarc-to-validate-email.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@tiburd Please merge this PR. Thanks


Update script & notebook that converts CSV to talks & publication markdown files

These scripts in markdown_generator are what I used on staeiou.github.io, and I've made improvements to academicpages since then. I'm not sure if they work out of the box, and they aren't documented very well. Also, the source CSV should be updates so they generate the files in academicpages, rather than the ones from my site.

Hi @willtm, I've updated the publications Jupyter notebook and added a python script in markdown_generator (commit a145cbd). I still have to do talks, as it is a slightly different format. But hope that helps!

I've just updated the Jupyter notebook for talks and the corresponding python scripts. Commit 4528221. So now, the scripts and notebooks for talks and publications generate the markdown files used in this repo. The documentation for the process is in the notebook files, which you can view on GitHub. And you can run the python script if you're not a Jupyter user.
Hope this helps, @willtm! I'm closing the issue, but let me know if you have any questions.


Add string literal support to ts::string_view.

Expand the string_view tests and actually run them.

[approve ci autest]

[approve ci autest]

[approve ci autest]

[approve ci autest]

[approve ci autest]

[approve ci autest]

[approve ci autest]

[approve ci autest]

[approve ci autest]


Support for remote docker hosts?

Hi, I'm just starting to set up AutoKuma on my home system. Is there any support (currently or planned) for remote docker hosts? I have a couple of machines in my network, and it would be great to be able to use docker labels to configure them too.

Accessing a remote Docker host is supported by setting the DOCKER_HOST variable accordingly, e.g. tcp://<IP_ADDRESS>:2375, note that currently there is no support for SSL.

Yes autokuma only supports a single docker host, so you'd need multiple instances, in which case you probably also want to set AUTOKUMA__TAG_NAME to a different tag for each one and increase the sync inverval by setting AUTOKUMA__SYNC_INTERVAL=30 or something so you won't run into rate limiting issues

Hi @BigBoot , sorry to be back so soon. I tried setting this up, but I'm running into errors when reading the labels from my remote host. I've definitely got my remote host exposed and accessed correctly (I use another container to remotely access this host which is working fine, and the AutoKuma error log mentions the container name, which is only exposed by the remote host).
I am just getting the following error:

WARN [kuma_client::util] Error while parsing uptime-kuma: expected value at line 1 column 1!
WARN [autokuma::sync] Encountered error during sync: Error while trying to parse labels: expected value at line 1 column 1

My main docker-compose config:
  autokuma-pi:
    image: ghcr.io/bigboot/autokuma:0.6.0
    container_name: autokuma-pi
    hostname: autokuma-pi
    environment:
      AUTOKUMA__DEFAULT_SETTINGS: |-
        http.accepted_statuscodes:  [ "200" ]
        http.tags: '[{"tag_id": 4 }]'
        http.expiry_notification: true
        http.interval: 60
        http.max_redirects: 1
        http.max_retries: 5
        http.retry_interval: 60
        http.timeout: 30
      AUTOKUMA__KUMA__URL: "http://<IP_ADDRESS>:3001"
      AUTOKUMA__KUMA__USERNAME: "username"
      AUTOKUMA__KUMA__PASSWORD: "password"
      AUTOKUMA__ON_DELETE: "keep" # Keep monitors even if the service goes down
      AUTOKUMA__TAG_NAME: "Docker"
      AUTOKUMA__TAG_COLOR: "#42C0FB"
      DOCKER_HOST: "tcp://<IP_ADDRESS>:2375" # Example URL, I use the correct LAN IP address
    volumes:
      # Docker socket mount from host system
      - "${DOCKER_SOCKET}:/var/run/docker.sock"
    ...

My remote host docker-compose config:
  uptime-kuma:
    image: louislam/uptime-kuma:1.23.13-alpine
    container_name: uptime-kuma
    hostname: uptime-kuma
    labels:
      # Uptime-Kuma monitor config
      kuma.uptime-kuma.http.name: "Uptime Kuma"
      kuma.uptime-kuma.http.url: "https://my.site.com/"
    ...

I have more or less the same labels for containers in my main docker-compose, and almost identical autokuma config for the other container.
I didn't see if there was a way to get debug information, but I did run a docker inspect on the target container, and the labels seem fine to me:
"Labels": {
    "kuma.uptime-kuma.http.name": "Uptime Kuma",
    "kuma.uptime-kuma.http.url": "https://my.site.com/"
}

I think the problem is the default settings:
    AUTOKUMA__DEFAULT_SETTINGS: |-
        http.accepted_statuscodes:  [ "200" ]
        http.tags: '[{"tag_id": 4 }]'
        http.expiry_notification: true
        http.interval: 60
        http.max_redirects: 1
        http.max_retries: 5
        http.retry_interval: 60
        http.timeout: 30

while they look like kinda like yaml they're just a <key>:<value mapping. with both keys and values being strings (so they can be processed in the same way as docker labels). So this means http.tags: '[{"tag_id": 4 }]' should behttp.tags: [{"tag_id": 4 }]

Yeah, it was as simple as that. All good now, thank you again!

Sorry, meant to come back to this. It's all working well, just a silly mistake on my end. But I've got it working for both hosts now, all monitors working as planned. Thanks!


Run the script without relying on its executable bit being set.

Addresses https://github.com/TerrorJack/direct-rocksdb/issues/2 .
Workaround for https://github.com/haskell/tar/issues/25 .

@kenta2 Nice work, thanks!


Doesn't work on raspberry pi

This fails on raspberry pi because of the cerbot and Nginx build are different for arm based systems

Problem is the certbot image which is not build for ARM. The script works when you change it to "certbot/certbot:arm32v6-latest" for example in docker-compose.yml.


VecLine::Clip infinite recursion fix

It looks like, from looking at the function signature Clip(const Rectf& rect) const that the intent here is to keep the operated-on VecLine immutable and return a copy clipped by rect.
This change effects that logic while breaking the infinite recursion.

Thanks, applied. That said, whole Geom package is sort of deprecated (now properly marked as such in description)


FR: easier linking for KeyPadLinc devices

KeyPadLinc devices require setting the link group (and possibly the D3 data) when linking.  It would be cool if there was a cleaner way of doing it than ic device edit and hoping not to totally mess things up.
I think there are some standards, where d1 is target brightness, d2 is ramp rate, and for keypads d3 is which button.

Is this issue related to using the PLM to link a KeyPadLinc device to another device, or to link the PLM to a KeyPadLinc device?

Using the PLM to link a KeyPadLinc device to another device.  The 8 (or 6) buttons make things slightly more complicated.  My long-term goal is to be able to re-program my entire setup without HomeLinc, which was instrumental in making it happen.  Right now if I have to replace a module, it'll be problematic to get everything back together.

My approach in this package has been to implement device specific capabilities as aDevice.  There are currently switch and dimmer devices as well as base i1, i2 and i2cs devices.
I think the approach I would choose would be to create a KeyPadLinc type that has functions to create all-links for the specific buttons.  This would then be called by a KeyPadLinc function in the command.  Presumably, the KeyPadLinc device would be composed of a DimmableDevice.
Thoughts?

Your approach seems reasonable, and fits the current model.  I'm a little concerned about the CLI having a billion slightly different commands, with the duplication that sometimes entails.   It's too easy to use the wrong one. I might go with flags, although they add their own complexity.    Right now only the device and plm commands support linking.  It would be weird to add it to the dimmer or switch commands.


add websocket support

@mtmk
Hi,
When this feature is released, will we be able to utilize JWT authentication with it to access WSS Endpoints (Secured WebSockets)?

@mtmk Hi,
When this feature is released, will we be able to utilize JWT authentication with it to access WSS Endpoints (Secured WebSockets)?

Hi @OpenX-Public, we should be able to release fairly soon but there is not set schedule. JWT should work with WSS (as the other auth mechanisms).


in JSON field name prevents import in GCP Bigquery

Thanks for the effort to build this great tool, we're throwing it a forwarded log files and really appreciate the performance boost!
There's one minor step which required preprocessing for our use case, as we are loading data in Google's Bigquery.
I unfortunately don't have a build environment setup for rust atm, but it seems the responsible code is here, impacting both #attributes and #text:

https://github.com/omerbenamram/evtx/blob/0950198ed6c0f2381b1fc0b79c1fa4d094f638f3/src/json_output.rs#L239
https://github.com/omerbenamram/evtx/blob/0950198ed6c0f2381b1fc0b79c1fa4d094f638f3/src/json_output.rs#L321
Is there a reason i'm missing to use a special character in these two field names? It's a rather minor issue and we can run sed, but it would save some steps.
Thanks in advance!

Hey @olamotte I highly recommend using the --separate-json-attributes. all element attributes are stored under the <FIELD_NAME>_attributes field name thus there are no #attributes and #text field names.

I had missed this - Thanks a lot!


[Scheduled Maintenance] Home Server down for Maintenance

Resolved: Home Server (Raspi) is back up in 5df3414.


Fix sort verification for blacklist entries

blacklist.txt
8
1
2

Honggfuzz doesn't complain this file isn't sorted, because the first entry is ignored.
blacklist.txt
3
2
1

Honggfuzz correctly warns input_parseBlacklist():310 Blacklist file not sorted.
The first entry gets ignored because the sorting check won't trigger until there are 2 or more entries (because the counter is updated after the comparison).
306 input.c:
        if (hfuzz->feedback.blacklistCnt > 1) {
            if (hfuzz->feedback.blacklist[hfuzz->feedback.blacklistCnt - 1] >
                hfuzz->feedback.blacklist[hfuzz->feedback.blacklistCnt]) {

The only values that will be checked for sorted order will be indexes (1) and (2) and every line higher, the index (0) is never checked.

Thank you!

 :D


panic: runtime error: slice bounds out of range [5:0]

Hi, I received the following error when trying to parse a gRPC pcap:
panic: runtime error: slice bounds out of range [5:0]

goroutine 1 [running]:
github.com/jschwinger233/grpcdump/parser/grpcparser.(*Parser).unmarshalDataFrame(0xc000faa060, {0x91faf2, 0x11}, {0x7ffef9f150e0, 0x11}, 0xc000e9b200)
	/home/runner/work/grpcdump/grpcdump/parser/grpcparser/parser.go:180 +0x22b
github.com/jschwinger233/grpcdump/parser/grpcparser.(*Parser).Parse(0xc000faa060, {0x9c85f8, 0xc000442420})
	/home/runner/work/grpcdump/grpcdump/parser/grpcparser/parser.go:148 +0x1005
main.main.func3(0xc0002929a0)
	/home/runner/work/grpcdump/grpcdump/main.go:79 +0xd7
github.com/urfave/cli/v2.(*App).RunContext(0xc000185ba0, {0x9bc510, 0xc00003a100}, {0xc000032090, 0x9, 0x9})
	/home/runner/work/grpcdump/grpcdump/vendor/github.com/urfave/cli/v2/app.go:322 +0x7a8
github.com/urfave/cli/v2.(*App).Run(...)
	/home/runner/work/grpcdump/grpcdump/vendor/github.com/urfave/cli/v2/app.go:224

Do you have ideas about what happened?
The pcap file is unforunately very large and containing sensitive information that I cannot upload here, but I'm willing to give helps if needed!

Would you mind sending me the pcap using email? I'd appreciate that very much.
base64 decoded email address: Z3JleXNjaHdpbmdlckBnbWFpbC5jb20K

@jschwinger233 Oh, I reproduced this error in my internal environment :)
https://transfer.sh/CjQtWc/dump.pcap
https://transfer.sh/BFUH6U/protos.tar.gz
The command I'm using with:
./grpcdump -p 2379 -r dump.pcap -f kvproto/proto/pdpb.proto -m AUTO

panic: runtime error: slice bounds out of range [5:0]

goroutine 1 [running]:
github.com/jschwinger233/grpcdump/parser/grpcparser.(*Parser).unmarshalDataFrame(0xc000516b40, {0x91faf2, 0x11}, {0xc0002ce7e0, 0x22}, 0xc000216f60)
	/home/runner/work/grpcdump/grpcdump/parser/grpcparser/parser.go:180 +0x22b
github.com/jschwinger233/grpcdump/parser/grpcparser.(*Parser).Parse(0xc000516b40, {0x9c85f8, 0xc0007dc840})
	/home/runner/work/grpcdump/grpcdump/parser/grpcparser/parser.go:148 +0x1005
main.main.func3(0xc00023a9a0)
	/home/runner/work/grpcdump/grpcdump/main.go:79 +0xd7
github.com/urfave/cli/v2.(*App).RunContext(0xc0000adba0, {0x9bc510, 0xc0000380b0}, {0xc000032090, 0x9, 0x9})
	/home/runner/work/grpcdump/grpcdump/vendor/github.com/urfave/cli/v2/app.go:322 +0x7a8
github.com/urfave/cli/v2.(*App).Run(...)
	/home/runner/work/grpcdump/grpcdump/vendor/github.com/urfave/cli/v2/app.go:224
main.main()
	/home/runner/work/grpcdump/grpcdump/main.go:91 +0x268

@jschwinger233 Oh, I reproduced this error in my internal environment :)
https://transfer.sh/CjQtWc/dump.pcap https://transfer.sh/BFUH6U/protos.tar.gz
The command I'm using with:
./grpcdump -p 2379 -r dump.pcap -f kvproto/proto/pdpb.proto -m AUTO

panic: runtime error: slice bounds out of range [5:0]

goroutine 1 [running]:
github.com/jschwinger233/grpcdump/parser/grpcparser.(*Parser).unmarshalDataFrame(0xc000516b40, {0x91faf2, 0x11}, {0xc0002ce7e0, 0x22}, 0xc000216f60)
	/home/runner/work/grpcdump/grpcdump/parser/grpcparser/parser.go:180 +0x22b
github.com/jschwinger233/grpcdump/parser/grpcparser.(*Parser).Parse(0xc000516b40, {0x9c85f8, 0xc0007dc840})
	/home/runner/work/grpcdump/grpcdump/parser/grpcparser/parser.go:148 +0x1005
main.main.func3(0xc00023a9a0)
	/home/runner/work/grpcdump/grpcdump/main.go:79 +0xd7
github.com/urfave/cli/v2.(*App).RunContext(0xc0000adba0, {0x9bc510, 0xc0000380b0}, {0xc000032090, 0x9, 0x9})
	/home/runner/work/grpcdump/grpcdump/vendor/github.com/urfave/cli/v2/app.go:322 +0x7a8
github.com/urfave/cli/v2.(*App).Run(...)
	/home/runner/work/grpcdump/grpcdump/vendor/github.com/urfave/cli/v2/app.go:224
main.main()
	/home/runner/work/grpcdump/grpcdump/main.go:91 +0x268

Will look into it in the evening, thanks.

@breezewish Please try the latest rc release:  https://github.com/jschwinger233/grpcdump/releases/tag/v22.08.25-rc.1
BTW, I noted the enormous data:(unknown) output which indicates the failure of decoding grpc data bytes, and it draws my attention that parts of the parsing failure are actually etcdserverpb.KV service, which ain't included in pdpb.proto.
Therefore, I made some improvements and now grpcdump accepts multiple -f flags such as ./grpcdump -p 2379 -r dump.pcap -f kvproto/proto/pdpb.proto -f etcd/rpc.proto -m AUTO, and in this way multiple rpc services can be taken into account simultaneously.
Hope this change is helpful.

@breezewish Please try the latest rc release: https://github.com/jschwinger233/grpcdump/releases/tag/v22.08.25-rc.1
BTW, I noted the enormous data:(unknown) output which indicates the failure of decoding grpc data bytes, and it draws my attention that parts of the parsing failure are actually linked to etcdserverpb.KV service, which ain't included in pdpb.proto.
Therefore, I made some improvements and now grpcdump accepts multiple -f flags such as ./grpcdump -p 2379 -r dump.pcap -f kvproto/proto/pdpb.proto -f etcd/rpc.proto -m AUTO, and in this way multiple rpc services can be taken into account simultaneously.
Hope this change is helpful.

Awesome work! The updated version successfully decoded my original large pcap file :)
Thanks a lot for your great tool!