Low Contrast in Filled Tonal Buttons and Segmented Controls Affects Accessibility

Steps to reproduce
Hello,
I'm writing to report an accessibility issue regarding the contrast ratio of Filled Tonal Buttons and Segmented Controls in Material UI. I work as an accessibility consultant and frequently reference Material UI components due to their generally strong adherence to accessibility standards.
However, I've identified a significant concern regarding the contrast ratio of two specific components: Filled Tonal Buttons and Segmented Controls. According to WCAG 2.1 (Web Content Accessibility Guidelines), the minimum contrast ratio between foreground and background colors is 4.5:1 for normal text and 3:1 for large text. Large text is defined as 18pt (24px) or larger, or 14pt (18.66px) or larger if bold. Based on my tests, both the Filled Tonal Buttons and Segmented Controls fail to meet these requirements.
Filled Tonal Buttons
These buttons have a background behind the text, but the contrast between the text color and the background is too low. This makes it difficult for users with low vision to perceive these elements as interactive buttons. Instead, they may appear as plain text, which reduces usability and impedes interaction.
Segmented Controls
These components rely on a border to indicate the selected state. However, the contrast between the border and the background is insufficient, making it challenging for users with low vision to identify the currently selected option. This can lead to confusion and hinder navigation.
To demonstrate these issues, I've prepared a sample page:
http://khsbory.iptime.org:3000/time-management/
On this page, you will find examples of both components exhibiting low contrast problems.
I would appreciate it if you could review the contrast ratios and provide your feedback on the following points:

Are you aware of the contrast issues in these components?
Do you agree that these issues need to be addressed to comply with WCAG 2.1?
What are your plans to improve the contrast ratios for these components?
If you believe this is not a significant issue, could you elaborate on why and whether you recommend relying on assistive technologies like colour filters or contrast enhancement tools as an alternative?
Accessibility and WCAG Compliance
As per WCAG guidelines, sufficient contrast must be provided by default without requiring users to rely on assistive technologies. While tools like colour filters or contrast enhancement can support accessibility, they should not be considered primary solutions. Ensuring adequate contrast directly within the design benefits all users, including those with visual impairments.
Material UI's reputation for accessibility has made it a trusted choice for many developers. Addressing this issue would further enhance its usability and inclusivity, benefiting a wide audience.
Thank you for your attention to this matter. I look forward to your response.

Current behavior
No response
Expected behavior
No response
Context
No response
Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: accessibility, low contrast, filled tonal button, segmented control button

To demonstrate these issues, I've prepared a sample page:
http://khsbory.iptime.org:3000/time-management/

@khsbory Would you mind making a repro in codesandbox or stackblitz so the source is visible as well? Thanks ~

Thank you for your response. I understand your request. I will zip my entire Next.js project and send it to you so that you can reproduce the issue. However, I am currently at work, and my server is at home. Therefore, I will compress the project into a zip file and upload it to my server tonight (Korean time). Once it's ready, I will provide you with the link.
Thank you for your understanding!

I will zip my entire Next.js project and send it to you so that you can reproduce the issue.

Please just make a minimal repro that just shows the color issue!
Here are some tips: https://stackoverflow.com/help/minimal-reproducible-example

The code is quite straightforward since the link I sent you is actually a live sample page. It's already implemented as a working example, so the code has been kept concise and clear.
I'll send you the specific tsx file when I get home tonight.
Thank you.

Filled Tonal Buttons and Segmented Controls

Just making sure I understand the issue. Material UI is still based on Material Design v2, we don't have filled tonal button - this is an MD3 (Material You) variant. The link you shared is showing a contained button, and the contrast ratio seems ok - https://www.siegemedia.com/contrast-ratio#%231976d2-on-white

Thank you for sharing your insights. I have a couple of follow-up questions:
1.
When you mentioned the “contained button,” were you referring to the refresh button on the sample site I sent? If so, could you please let me know the exact luminance contrast ratio that you measured? I’m asking because, during our tests with users who have low vision, we recorded a significantly lower contrast ratio.
2.
What are your thoughts on the segmented control button?
For your reference, I’ve included the code snippet below.
// Segmented control
'use client';
import { ToggleButtonGroup, ToggleButton } from '@mui/material';
import { useState } from 'react';
export default function TimeSegmentedButton({ onChange }) {
const [selected, setSelected] = useState('day');
const handleChange = (event, newValue) => {
if (newValue !== null) {
setSelected(newValue);
onChange?.(newValue);
}
};
return (
<ToggleButtonGroup
value={selected}
exclusive
onChange={handleChange}
aria-label="time period"
sx={{ m: 1 }}
>

Day

Week

Month

);
}
// Filled tonal button
'use client';
import { Button } from '@mui/material';
export default function TonalButton({ children, onClick }) {
return (
<Button
variant="filledTonal"
onClick={onClick}
sx={{ m: 1 }}
>
{children}

);
}

Hey @kshuiroy, thanks for the report!
May I ask you to provide a minimal reproduction? This would help a lot. A live example would be perfect. This StackBlitz sandbox template may be a good starting point.
If you are using a custom theme, please also add it to the sandbox. You also mention the "filled tonal" variant, but Material UI doesn't have that. If this is custom from your codebase, please add that as well.
Finally, please attach how you are measuring the a11y metrics you mention and what the scores are.
Without this information, this issue is not actionable on our side.

Hi,
I've prepared a minimal Next.js project to demonstrate the issue I'm encountering. You can download it here: https://khsruru.com/material-ui-test.zip
Steps to Reproduce:

Download the zip file from the link above.
Extract the contents of the zip file.
Open a terminal or command prompt in the extracted directory.
Run npm install to install the necessary Node modules.
Once the installation is complete, run npm run dev.
This will start the project in development mode. You'll see a "Contrast Test" webpage initially.
Navigate to the "Time Management" page by clicking on the menu. This is the page where I'm encountering contrast issues.

Specific Issues:

Segmented Buttons: On the "Time Management" page, the segmented buttons (Day, Week, Month) have an issue where the border of the selected button is difficult to see. This is because the contrast ratio is not high enough.
Tonal Button: The "Refresh" button (tonal button) is also difficult to distinguish as a button due to its low contrast.

Contrast Measurement and Accessibility:
The current issue is that the contrast ratio for both the Material Segmented Buttons and the Tonal Button does not meet the minimum requirement of 3:1 for graphical objects and user interface components, as outlined in WCAG 2.1 success criterion 1.4.11 Non-text Contrast.

How to measure contrast ratio

Download the Colour Contrast Analyser (CCA) from: https://www.tpgi.com/color-contrast-checker/
Use the CCA's color picker tool to sample the foreground color (e.g., the border color or button text color).
Use the color picker again to sample the background color.
The CCA will display the contrast ratio. It should be at least 3:1 for these UI elements.

Additional Information:

Feel free to ask if you have any questions about the code or need any clarification.

Thank you for your time and assistance! I appreciate any help you can provide in resolving this.
Best regards,

Thanks for the minimal reproduction @khsbory.
Segmented buttons
You can override the border color using the sx prop to comply to the a11y guidelines you want to meet. For example in the /src/app/components/TimeSegmentedButton.tsx file you could do:
-      <ToggleButton value="day" aria-label="day view">
+      <ToggleButton sx={{ borderColor: '#777' }} value="day" aria-label="day view">
        Day
      </ToggleButton>

You can also do this on the theme file, see https://mui.com/material-ui/customization/theme-components/#theme-style-overrides.
cc: @zanivan to check if there's something to fix in the library itself.
Tonal button issue
For this button, you're providing variant="filledTonal". This is not a valid variant. You can see the available variants here: https://mui.com/material-ui/api/button/#button-prop-variant. Because this is not a valid variant, the styles are broken.


Python 312 compatible

This PR  also removes the custom test helpers as they weren't best practise and aren't discoverable in the later python versions

Also CausalForestEstimator is removed as it introduced the econml dependency which wasn't 3.11 or 3.12 compatible.

@christopher-wild All works well with 3.11, but have you tested these changes using 3.12? I'm getting a missing package error that seems to be due to a missing z3 dependency.

@f-allian, I did my testing in 3.12 and the CI tests for 3.12 pass for all OS's. Could you pop the steps you took to get the error in please?

@christopher-wild All works well with 3.11, but have you tested these changes using 3.12? I'm getting a missing package error that seems to be due to a missing z3 dependency.

@f-allian, I did my testing in 3.12 and the CI tests for 3.12 pass for all OS's. Could you pop the steps you took to get the error in please?

I tested it using the DAFNI entry-point script. The unit tests also fail locally (see image below):


Fix bibtex links

Some of the bibtex links do not work.  E.g., links to our LEAP paper, but also to Sean Luke, Koza, etc.

Potentially related error messages I'm getting from make doc:

The fatal one (UndefinedEror("'style' is undefined")) may be due to an incompatibility with sphinx 7.0, which removed the style key (see ex. https://github.com/kivy/kivy/issues/8230).

@SigmaX fixed this problem. Closing.


ZipZap and own GitHub project

ZipZap.framework for OSX compiled with Xcode under El Capitan without problems, using of xctool is possible, too. I use this framework in a project of mine to show images from a zipped archive. Now my questions: If I submit this project to GitHub, can I include the zipzap.framework (the compiled version), so that every interested can compile this project for himself? Will you allow this, have I to include the license.txt file, whatsoever?
Kind regards, Erich Kuester from Germany

At a minimum, you can include the framework with the license.txt and acknowledgement merged with your license.txt or README. Just include a link to our main GitHub page.
However since we're all using GitHub, it's best to use either git submodules or git subtrees to incorporate ZipZap at the workspace level. Alternatively you can also use Carthage or CocoaPods to include ZipZap. This way your project will always get the latest changes to ZipZap and we can also more easily incorporate your changes back to ZipZap.

OK, I will have a look on all that ... It's my first project with GitHub, so all is quite new to me. I'll keep you informed.

I uploaded just now the source of my program, not complete in some aspects, but I am learning. Please have a look at https://github.com/ekuester/Swift-Show-ScrollView-FullScreen . If you have any complaints, don't hesitate to mention.

Looks good to me, I just looked at it briefly!


Fix rdme's json renderer to handle markdown lists

I believe https://github.com/stateful/rdme/commit/5a15e3619fc8b00dc5a515eda290da4814a71c29 fixes this issue. At least the known cases.

cc @adambabik


autoToggle on start

This adds an option to enable auto toggle

It should fix #95 now

@nathanchapman I have a solution for the split panes issue, but I need this merged or maybe I could put the fix in this PR.

It now fixes problems with split panes

LGTM 👍


Sample code fails shows TS error: Property 'fibonacci' in type 'MathService' is not assignable to the same property in base type

Copied the sample code:
import {IPegasusRPCService, PegasusRPCMessage} from '@webext-pegasus/rpc';

export type IMathService = InstanceType<
  typeof MathService
>;

export class MathService
  implements IPegasusRPCService<MathService>
{
  fibonacci(num: number): number {
    return (num <= 1) ? 1 : this.fibonacci(num - 1) + this.fibonacci(num - 2);
  }
}

Get the following error:

Property 'fibonacci' in type 'MathService' is not assignable to the same property in base type 'IPegasusRPCServiceInternal<MathService>'.
  Type '(num: number) => number' is not assignable to type 'GoodFunc<(num: number) => number>'.
    Types of parameters 'num' and 'args' are incompatible.
      Type 'unknown' is not assignable to type 'number'

VS Code reporting TypeScript version 5.5.2

Sorry for later reply, will take a good look tomorrow

Nice!

Published as v0.3.6. Thanks for your contribution!


Downloading data

Should downloading data be in step in the processing or can I assume you'll always work from local data?

No, for this project I think its safe to assume that we will use local data.


Tranparency and Background Colour changing support

This PR should allow for users to:

Define a custom background colour - if not, it will use a default colour of Black (0,0,0,0) or no colour (see below for significance)

Pass a bool flag to NovelRunner which tells if Framebuffer Transparency is enabled.

It is important to note that the framebuffer will respect Alpha values and treat an RGBA value of (0,0,0,0) as having no colour, hence the framebuffer will be completely transparent if enabled.

Note that since the transparency flag was appended to the ctor for NovelRunner, it is required to specify targetFrameRate at the moment. This can be changed, however if not, specifying NovelRunner(0, "WindowTitle", true) will lead to an unintended consequence of targetFrameRate being equal to 1.

Looks like I have some re-ordering to do to make Ubuntu happy 😅 I'll do this and make the styling corrections when I get back


[Bug report] Gravitino-trino-connector don't work with Trino-435 worker

Version
main branch
Describe what's wrong
When the node is a worker rather than a coordinator, there are some error and the node can't start.

Error message and/or stacktrace

How to reproduce
0.4.0
Additional context
related to https://github.com/datastrato/gravitino/issues/2376

@diqiu50  Hi, will this issue also be fixed in 0.5.0?

Yes

It fix now


Add PeakNearestTriggeringSalted and EventNearestTriggeringSalted

close https://github.com/dachengx/axidence/issues/28

coverage: 54.626% (+0.5%) from 54.1%
when pulling 4e1015b073d1a3d2ef8de98d89fb8b2b237d6865 on add_no_near_triggering
into 22d3d5efe9094194668c3906357ad96b6c429b85 on main.


Allow right clicking in text edit

Closes #1168
Adds the ability to right-click in a text input or text field.

I have a cleanup commit in progress, didn't get to finish it just night. I'll push that shortly then merge.


[Ready for Review] Update API Docs with case-sensitive and insensitive filtering

[OSF-5062]

Pass complete, LGTM :sparkler:
Conflicts with some other documentation on bulk filtering, but @sloria said he'd resolve it on merge.


[Feature] Bring README up to brief requirements

Feature Description
Mention that this project is affiliated with SOFTENG 310.
Reason for Change
The assignment brief explicitly requires us to mention the project’s association with SOFTENG 310.
Where are the changes needed?
Just in the README.
Code Snippets
No response
Anything Else?
No response

Approved


add some notebook examples

Including some examples of how to use nlpsandbox-client

Example notebooks must live in https://github.com/nlpsandbox/notebooks, then add a reference to these notebooks in the client's README.


Update dependancy management

Hello,
Would you consider an update to a more modern dependancy management such as pipenv or poetry (or if a PR was made?)

poetry is better I guess.


Allow only one database provider per service provider

Issue #7457
Note that the way AddEntityFramework works has changed. Previously, the provider indirection mechanism ensured that any service overridden by a provider would be honored. Since this is gone, we use the following approach:

TryAdd all provider services
TryAdd all relational services (any services already registered by the provider are not overwritten)
TryAdd all core services (any services registered by first two steps are not overwritten)
Any services explicitly added by application will remain regardless

This means that an application should never call AddEntityFramework directly, since if this is done before the provider services are added then things will break. Therefore this method is renamed and no-longer an extension method. (Note that applications should not have been calling it anyway, but doing so was previously harmless.)
Also note that all services registered are now interfaces. This should have been the case before except for provider-specific implementations that were still resolved through their interfaces, but some concrete services had crept in.
Work still to do:

Revisit the scopes of services
Consider combining core convention set builder and model-specific builder into one
Find a new solution for InjectAdditionalServices, since there is now no longer a hook for this
Look at ResultOperatorHandler, since it differs from all other services in how it is used

@ajcvickers Any particular thing to look at in here?

@anpete Hard to say. Probably AddEntityFrameworkInMemoryDatabase and related provider methods are a good starting point. Most of the changes are small and related to removing code that is no longer needed.

−2,871 lines, nice.

:shipit:

@ajcvickers Ugh! Possible to get a summary of provider affecting changes?

@ErikEJ (cc @roji) I think these are the main things:

IDatabaseProviderServices is gone. Providers must register services explicitly. See AddEntityFrameworkSqlServer for example.
IDatabaseProvider no longer has IDatabaseProviderServices and has the invarient name directly on it.
Providers don't need their own IModelSource
Providers may not need their own IValueGeneratorSelector
IDbContextOptionsExtension.ApplyServices must return true if EF core services were added. (Providers should return true.)
All IModelValidators should inherit from CoreModelValidator
Providers can safely replace any service. However, please let us know if you find you need to replace an internal service or extend from an internal base class.


indexset

Hey there!
Thanks a lot for the PRs that made range iteration work better.
How does indexset's rank and select fare against what you have here?

While the operations are called the same and do a similar operation in theory, I specifically only implemented and tested rank/select data structures on bit vectors.
Those can be heavily optimized by exploiting bitwise operations on the x86 architecture and exploiting the fact that only ones and zeros are part of the data structure. So comparing this library would be pretty pointless, as indexset is a non-duplicate set (I think?), and supports all types of ordered elements.
The rank of an element in indexset is its position in the sorted set, while the rank of a bit in a bit vector is the number of equal bits before that element.
There might be a way to implement a bit vector using your fenwick tree, but I never worked with those, so I am not sure.

Hmm.
In this case, would it not be possible to generalise the indexset container/Node to support that?
I had this idea for a while. To make indexset generic on the Node.

Maybe? I don't exactly know how deep the exclusivity of equal elements is rooted in the datastructure and if it could support unsorted sets.
Keep in mind though, that the rank implementation of BitVectors takes an index as parameter and returns the amount of 1 before that index for rank1 and the amount of zeros before that index for rank0, regardless of what element is at that index. So there are possibly multiple indices with the same rankX.

If we look at Node:
struct Node<T>
where
    T: PartialOrd + Clone,
{
    pub inner: Vec<T>,
    pub max: Option<T>,
    pub iterations: usize,
}

impl<T: PartialOrd + Clone> PartialOrd for Node<T> {
    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
        self.max.partial_cmp(&other.max)
    }
}

impl<T: PartialOrd + Clone> Default for Node<T> {
    fn default() -> Self {
        Self {
            inner: Vec::with_capacity(DEFAULT_INNER_SIZE),
            max: None,
            iterations: 10,
        }
    }
}

fn search<T: PartialOrd>(haystack: &[T], needle: &T, iterations: usize) -> Result<usize, usize> {
    let mut left = 0;
    let mut right = haystack.len();
    for _ in 0..iterations {
        if left >= right {
            break;
        }

        let mid = left + (right - left) / 2;

        let mid_value = unsafe { haystack.get_unchecked(mid) };

        if mid_value < needle {
            left = mid + 1;
        } else if mid_value > needle {
            right = mid;
        } else {
            return Ok(mid);
        }
    }

    Err(left)
}

impl<T: Ord + Clone> Node<T> {
    pub fn new(capacity: usize) -> Self {
        Self {
            inner: Vec::with_capacity(capacity),
            iterations: capacity.ilog2() as usize,
            ..Default::default()
        }
    }
    pub fn get(&self, index: usize) -> Option<&T> {
        self.inner.get(index)
    }
    pub fn split_off(&mut self, cutoff: usize) -> Self {
        let latter_inner = self.inner.split_off(cutoff);

        self.max = self.inner.last().cloned();

        let latter_inner_max = latter_inner.last().cloned();
        Self {
            inner: latter_inner,
            max: latter_inner_max,
            iterations: self.iterations,
        }
    }
    pub fn halve(&mut self) -> Self {
        self.split_off(DEFAULT_CUTOFF)
    }
    pub fn len(&self) -> usize {
        self.inner.len()
    }
    pub fn insert(&mut self, value: T) -> bool {
        match search(&self.inner, &value, self.iterations) {
            Ok(_) => return false,
            Err(idx) => {
                let some_value = Some(&value);
                if some_value > self.max.as_ref() {
                    self.max = some_value.cloned()
                }

                self.inner.insert(idx, value);
            }
        }

        true
    }
    pub fn delete(&mut self, index: usize) -> T {
        self.inner.remove(index)
    }
}

It could be a trait requiring delete, insert, get and halve.

But wouldn't functions like search get extremely slow if you gave up sorted order within nodes?


Return to docs button for API docs

Signed-off-by: kagarmoe<EMAIL_ADDRESS>:nut_and_bolt: Description: What code changed, and why?
The API docs are on an outside site and getting back to docs was a pretty bad experience. I added a "return to docs" button on the API page.
There are limitations to styling the API pages. Even so, this button could be prettier.

:chains: Related Resources
:+1: Definition of Done
:athletic_shoe: How to Build and Test the Change
Checkout this branch
Build the API docs by running the following all-in-one command from the top-level automate directory:
hab studio run "source .studiorc && compile_all_protobuf_components" && pushd components/automate-chef-io/ && make sync_swagger_files generate_swagger && make serve || popd

Review the API docs in your browser:
http://localhost:1313/docs/api
:white_check_mark: Checklist

[ ] I have read the CONTRIBUTING document.
[ ] Tests added/updated?
[ ] Docs added/updated?
[ ] All commits have been signed-off for the Developer Certification of Origin.

:camera: Screenshots, if applicable

for accessibility reasons, this needs to be an anchor and not a button. Ideally, it could also be styled as a link and not a button. happy to help if you would like some ux design support for this.

Styling has to be inline. Feel free to add your changes.

@susanev if you want to whip up a quick button design I’m happy to pop this in today and make sure it’s accessible/styled

@SEAjamieD @kagarmoe heres my recommendation, if this doesnt work for yall, then changining to anchor and leaving styles as is is fine.
@SEAjamieD while you're here can you please add some white space around that chef automate logo, thank you!!

Cool! +1 on adding whitespace @SEAjamie--please!

I cut a branch from yours @kagarmoe so that I could separate them and opened a PR here:
https://github.com/chef/automate/pull/2901
@susanev I really didn't do much, just styled a little differently.  I understand now what @kagarmoe is saying about limited stying.  I'd suggest (if everyone is ok with it) to decide exactly how you want only the button styled for now and we merge that.
I'll commit to researching how much more we can do with the styling of the layout etc.  I read that we can overwrite CSS by using more specific selectors but that needs to happen in the theme folder and I'm not ready to make changes there until I understand how redocs works.

closed in favor of https://github.com/chef/automate/pull/2902


Saving all the canvas pages in form of JSON

Saving all the canvas pages in form of JSON

path: /board
Component: board

hey can i contribute to the required Saving all the canvas pages in form of JSON?


Unable to use file-log plugin with Kong 0.9.0 in Docker

I moved this comment from another issue to its own issue to hope to get a response/discussion.
We currently cannot move to Kong 0.9.0 because the new Docker does not run nginx as root user (which is good), but user nobody seems not allowed to write to /dev/stdout.
In 0.8.3 we used the file-log plugin to log the output (instead of the method described by Jalberto in https://github.com/Mashape/docker-kong/issues/40), since this suggestion does not seem to work.
This now gives the following error on each request in the nginx error log within the docker:
2016/08/28 16:01:18 [error] 76#0: [lua] handler.lua:56: [file-log] failed to open the file: Permission denied, context: ngx.timer, client: xxx.xxx.xxx.xxx, server: <IP_ADDRESS>:8000
Does anyone have another solution?

I've 'solved' this by writing to /dev/console using the file-log plugin.
I had to 'chown a+w /dev/console' and now the logs are written to the syslog on the host again.
Perhaps someone can come with another solution or add this to the dockerfile.


Git branch name still displayed when folder is removed from workspace.

VSCode Version: 1.22.1
OS Version: Windows 7 Enterprise SP1 x64

Steps to Reproduce:

Open folder tracked by git in VSCode by File > Add Folder to Workspace
See current branch displayed in lower left corner.
Remove folder from workspace by right clicking on folder icon and selecting "Remove Folder From Workspace".
Branch is still displayed in lower left corner when no folder is open.

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

Great bug!

@joaomoreno I'd like to take a look at this, but I'd need help getting started. Where would I find the code executed when folders are added to and removed from the workspace? Where would I find the classes responsible for reaching out to execute the git extension functions?


We should roll back the fabric addition in AddNOCCallback if the ACL failed to be added properly

Problem
<what's wrong or missing, please include any applicable:

expected behavior
actual behavior
steps to reproduce
system configuration
screenshots, images, logs, etc.

Proposed Solution
<suggested fix, suggested enhancement>

In emberAfOperationalCredentialsClusterAddNOCCallback I ensured the ACL creation occurred after the fabric creation, because I'd wager the fabric creation is more likely to fail than the ACL creation. In fact, the only validity requirement for the ACL is that the provided node ID is valid for CASE auth, and the only space requirement is that there's room for another fabric (which should be true if we're in the process of adding a fabric?). We can harden the checking beforehand. But, we should also be handling errors anyways; if anything goes wrong in that function, I assume NOC adding code will have to restore/cleanup a proper state.


GenServer.call's timeout needs to be customizable

https://github.com/pinterest/riffed/blob/v_1_5_0/lib/riffed/client.ex#L98

In my build the default 5000 ms is being triggered. https://travis-ci.org/fire/snappyex/builds/166231012

So, I think we're painted into a bit of a corner; I don't know how to add this easily without making different functions with different names.

We added this function in our fork:
  def unquote(function_name)(options, unquote_splicing(arg_list))
    when is_list(options) do

      timeout = Keyword.get(options, :timeout) || 5000
      client  = Keyword.get(options, :client) || __MODULE__

      unquote_splicing(casts)

      rv = GenServer.call(client, {unquote(function_name), unquote(list_args)}, timeout)
      unquote(struct_module).to_elixir(rv, unquote(reply_meta))
  end


feat: replace ppa with the Slurm snap

Description
Integrates the Slurm snap into the codebase.
How was the code tested?
WIP
Related issues and/or tasks

Link any related issues or project board tasks to this pull request.

Checklist

[x] I am the author of these changes, or I have the rights to submit them.
[ ] I have added the relevant changes to the README and/or documentation.
[ ] I have self reviewed my own code.
[ ] All requested changes and/or review comments have been resolved.

Hmm... I'm having some trouble with getting NHC to install properly :cry:
unit-compute-2: 16:07:37 INFO unit.compute/2.juju-log Running legacy hooks/install.
unit-compute-2: 16:07:57 INFO unit.compute/2.juju-log #### Installing NHC
unit-compute-2: 16:07:57 WARNING unit.compute/2.install tar: lbnl-nhc-1.4.3.tar.gz: Cannot open: No such file or directory
unit-compute-2: 16:07:57 WARNING unit.compute/2.install tar: Error is not recoverable: exiting now
unit-compute-2: 16:07:57 ERROR unit.compute/2.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-compute-2/charm/./src/charm.py", line 340, in <module>
    main.main(SlurmdCharm)
  File "/var/lib/juju/agents/unit-compute-2/charm/venv/ops/main.py", line 548, in main
    manager.run()
  File "/var/lib/juju/agents/unit-compute-2/charm/venv/ops/main.py", line 527, in run
    self._emit()
  File "/var/lib/juju/agents/unit-compute-2/charm/venv/ops/main.py", line 516, in _emit
    _emit_charm_event(self.charm, self.dispatcher.event_name)
  File "/var/lib/juju/agents/unit-compute-2/charm/venv/ops/main.py", line 147, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-compute-2/charm/venv/ops/framework.py", line 348, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-compute-2/charm/venv/ops/framework.py", line 860, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-compute-2/charm/venv/ops/framework.py", line 950, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-compute-2/charm/./src/charm.py", line 83, in _on_install
    if self._slurmd_manager.install():
  File "/var/lib/juju/agents/unit-compute-2/charm/src/slurmd_ops.py", line 58, in install
    if not self._install_nhc_from_tarball():
  File "/var/lib/juju/agents/unit-compute-2/charm/src/slurmd_ops.py", line 93, in _install_nhc_from_tarball
    full_path = base_path / os.listdir(base_path)[0]
IndexError: list index out of range

Looks like the NHC tarball is not being properly staged which is causing tar to fail.

Solved the NHC issue I was seeing in #37. Looks like NHC tarball currently isn't being properly primed within the charm :sweat_smile:


Suggestion: Add album artist to scrobble data

I've started using this script, and it's really useful, but there's a (relatively minor) issue I've been facing with scrobbles. If I'm listening to a DJ mix or compilation, and there's a song that hasn't been released elsewhere, what often happens is that Last.fm will create a brand new album, with just that artist's track inside. This means that my album library in Last.fm is often split between several "albums", which can be a bit annoying.
As I said, this is a fairly minor issue, but it would be great if this script could also check if there's an album artist in the metadata, and add that to the scrobble if possible. Thanks :)

Absolutely, will take a look at adding this tomorrow.

If possible, please try out the script on the add-album-artist branch and let me know if it's working as expected :)

Looks like it works! Thanks for the quick update :D

From: Ethan @.>
Sent: Sunday, November 3, 2024 11:21 AM
To: ethanndickson/iina-lastfm @.>
Cc: badprogramshere @.>; Author @.>
Subject: Re: [ethanndickson/iina-lastfm] Suggestion: Add album artist to scrobble data (Issue #12)
If possible, please try out the script on the add-album-artist branch and let me know if it's working as expected :)
—
Reply to this email directly, view it on GitHubhttps://github.com/ethanndickson/iina-lastfm/issues/12#issuecomment-2453277723, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALE5D23WFS2RSA2P7QT5U7TZ6WJEVAVCNFSM6AAAAABRBYZ7XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGI3TONZSGM.
You are receiving this because you authored the thread.Message ID: @.***>


Rule34 Paheal only shows 70 images per page despite it was set to more than that (on Grabber Nightly)

On the settings, I set the images per page on the source tab to be 1000. Normally on sites like Rule34.xxx, it would show at least 1000 images per page on whatever I'm searching on. On Rule34 Paheal however, it would only show 70.
Does it have something to do with the site itself or not? Currently using Grabber Nightly since I cannot find any sources with the default grabber.

Not all sources allow to customize the number of images per page.
R34.paheal uses Shimmie IIRC, which does not allow it, so the number of results is fixed by the website (usually 42, in this case 70).

Not all sources allow to customize the number of images per page.
R34.paheal uses Shimmie IIRC, which does not allow it, so the number of results is fixed by the website (usually 42, in this case 70).

Not all sources allow to customize the number of images per page.
R34.paheal uses Shimmie IIRC, which does not allow it, so the number of results is fixed by the website (usually 42, in this case 70).

Oh well. Thanks for the info

Not all sources allow to customize the number of images per page.
R34.paheal uses Shimmie IIRC, which does not allow it, so the number of results is fixed by the website (usually 42, in this case 70).

Oh well. Thanks for the info


fix: kcctl optimization

registry deploy add flag skip-image-load
ssh and cmd util add exit code check
ssh and cmd util add log print

What type of PR is this?

/kind flake
What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for reviewers:

Does this PR introduced a user-facing change?

None

Additional documentation, usage docs, etc.:

/assign @x893675

Codecov Report

Merging #674 (e0bcc98) into master (59beab9) will decrease coverage by 0.10%.
The diff coverage is 59.45%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

@@            Coverage Diff             @@
##           master     #674      +/-   ##
==========================================
- Coverage   14.23%   14.13%   -0.10%
==========================================
  Files         142      142
  Lines       20043    20071      +28
==========================================
- Hits         2853     2837      -16
- Misses      16891    16944      +53
+ Partials      299      290       -9

Files
Coverage Δ

pkg/utils/sshutils/cmd.go
78.26% <100.00%> (+0.98%)
:arrow_up:

pkg/cli/registry/registry.go
0.00% <0.00%> (ø)

pkg/utils/sshutils/ssh_v2.go
27.40% <62.96%> (+7.76%)
:arrow_up:

... and 1 file with indirect coverage changes

/lgtm
/approve

/cherrypick release-1.4


Notebook Downloads (Standard Library Changes)

Creates UMD and ES Module bundles of the standard library.

@mbostock — if approved, I'd like to merge and publish this PR as version 1.0.0 on npm...

Per https://github.com/tc39/proposal-observable, Observable may be a thing in ECMAScript in the future, although it is just stage 1. I suppose we could use observablehq as the namespace?

My other concern #31 #32 is whether we should formally deprecate (though still support) the following methods:

Generators.filter
Generators.map
DOM.element
DOM.input
DOM.range
DOM.select
DOM.text

That said I’d probably not deprecate:

DOM.canvas
DOM.svg

I find myself still using DOM.svg a lot because it sets the viewBox automatically, likewise DOM.context2d is useful for its automatic high DPI support, and might as well keep DOM.canvas for symmetry with DOM.svg and for WebGL.
In practice this would mean moving the documentation for the deprecated methods from README.md to a DEPRECATED.md, and perhaps adding these to the deprecated list for autocomplete.

CSS and UMD namespaces updated across the board to observablehq.
(Although, I still hold out hope that one day we'll be able to purchase observable.com)...
Just for expediency's sake: If we're not changing any of the functionality (yet), just the documentation, I don't think we need to make a decision on the deprecations before merging this branch and publishing a 1.0.0 — as long as the functionality remains in place, we can deprecate at any point afterwards.

Okay, that’s fair; we can punt on deprecation. 👍


Add package metadata to observability scopes used by PackageContainers

PackageContainer is a protocol that is implemented by various types involved in SwiftPM package resolution.  They can emit messages but those messages don't get associated with the diagnostics.
There are currently three implementors of this protocol:  FileSystemPackageContainer, SourceControlPackageContainer, and RegistryPackageContainer.  All three just assign a given ObservabilityScope, and setting a package location metadata on that scope is a good way to make sure that all the diagnostics emitted to that scope get associated with the package.
This fix makes sure that diagnostics emitted through these scopes get properly associated with the package.  This is particularly useful for manifest-related diagnostics, which inherit the scope used by the various kinds of PackageContainer.
Changes

add diagnosticsMetadata property in extension on PackageRerference, similar to the one on Package
use this property to associate package metadata with the ObservabilityScope
add this metadata with a couple of standalone emit calls in Workspace

rdar://103229985

Looking for the best unit tests to extend with additional checks.

@swift-ci please smoke test


chore: update dockerignore

Purpose
Update path to reflect changes to zenodo download.
What the code is doing
Add wildcard to excluded paths
Testing
Ran a docker build and observed the size of the build context
Time estimate
10 sec

You got the 700th!


step by step guidance for run this project

hey! pls give me a guidance to setup and run this project step by step.
if possible then pls make a YouTube video to setup for Bigners.

Hey! To run this, you simply need to run the 'main_code_only_liveness_detection.py' file, no extra downloads will be required, it uses the pre trained weights of the uploaded model.
If you want to train your own model, you will need a custom dataset for that. Feel free to contact me if you need any help in that regard.
Also, I am not a youtuber so no video.


[Bug]: 'SSDataManager' object has no attribute 'eviction_manager'

Current Behavior
class SSDataManager(DataManager):
"""Generate SSDataManage to manager the data.
:param s: CacheStorage to manager the scalar data, it can be generated with :meth:`gptcache.manager.CacheBase`.
:type s: CacheStorage
:param v: VectorBase to manager the vector data, it can be generated with :meth:`gptcache.manager.VectorBase`.
:type v:  VectorBase
:param max_size: the max size for the cache, defaults to 1000.
:type max_size: int
:param clean_size: the size to clean up, defaults to `max_size * 0.2`.
:type clean_size: int
:param eviction: The eviction policy, it is support "LRU" and "FIFO" now, and defaults to "LRU".
:type eviction:  str
"""

def __init__(
    self,
    s: CacheStorage,
    v: VectorBase,
    o: Optional[ObjectBase],
    max_size,
    clean_size,
    policy="LRU",
):
    self.max_size = max_size
    self.clean_size = clean_size
    self.s = s
    self.v = v
    self.o = o
    self.eviction_base = EvictionBase(
        name="memory",
        policy=policy,
        maxsize=max_size,
        clean_size=clean_size,
        on_evict=self._clear,
    )
    # **Bug here**:when the length of self.s.get_ids greater than max_size，the LRU policy will trigger and the _clear function below is called. But self.eviction_manager has not be declared, so it will throw  'SSDataManager' object has no attribute 'eviction_manager' exception.
   # **I think we need to declare self.eviction_manager first, then call self.eviction_base.put  **
    self.eviction_base.put(self.s.get_ids(deleted=False))
    self.eviction_manager = EvictionManager(self.s, self.v)

def _clear(self, marked_keys):
    self.eviction_manager.soft_evict(marked_keys)
    if self.eviction_manager.check_evict():
        self.eviction_manager.delete()

Expected Behavior
No response
Steps To Reproduce
prepare a cache database with data size greater than max_size, 1000

Environment
No response
Anything else?
No response

@soulzhao the issue should has been fixed in the latest version, so you can try to upgrade the GPTCache

@soulzhao if the answer has resolved your issue, i will close the issue. If you encounter other problems, welcome to open a new issue.

This is happening in the latest version of GPT cache too, I'm using version 0.1.37

@amarCerta i will checkout it, and if you can, please give me your test demo code

@SimFG Please resolve this issue as it is causing my system to fail continuously, and I am unable to rely on it because I have to keep clearing the cache when the issue occurs.

@rahulsunil2 Thank you for your attention, I am confirming this problem, because I have a lot of work recently, which causes a bit slow to solve the problem.

@rahulsunil2 Updating to the latest version should have fixed it. I'm so sorry thay I didn't read the @soulzhao comment in the issue carefully. If the error is not resolved, please contact me in time.

The bug has been fixed in version 0.1.38. If you come across a new bug, welcome to report it.

Thanks a lot for your prompt response @SimFG


NTR: 'negative regulation of interleukin-18 secretion'

Request for 'negative regulation of interleukin-18 secretion'
Evidence: PMID: 23710316. Figure 5F:

"The IL-18 protein expression levels were significantly downregulated in THP-1 cells after miR-197 mimic transfection by ELISA."

Note: Prediction between IL-18 (3'UTR) and miR-197 is provided in figure 3A. Transfection of miR-197 was able to significantly reduce IL-18 mRNA expression (figure 3D).
Currently only GO:0072616 'Interleukin-18 secretion' exists.
cc
@BarbaraCzub
@RLovering

I've not read the paper, but based on the info that you provide here I think you should use 'GO:0032701 negative regulation of interleukin-18 production', and not secretion?
Please let me know, if this GO term will be ok. If so, then I will close this ticket.

@RLovering , @ShirinSaverimuttu and I discussed this today and will add the new term.


Add the RadosGW relation manager

This PR implements a class to handle the radosgw relation. It leverages the existing client class in order to reuse code and make the implementation simpler.

Nice, looking good!


Document continuous

I just noticed that the help for asv continuous doesn't show up in the docs:

http://spacetelescope.github.io/asv/commands.html#asv-continuous
https://github.com/spacetelescope/asv/blame/7d43df0d4f0e98c7eb49485c2f634a468b413ed9/asv/commands/continuous.py#L25

Maybe it's because of the newline after the help=?

Hmm... it displays for me...

What I meant is that there's no help or description saying what this tool does.
This is because you use subparsers.add_parser and apparently this only shows what you put as description and for continuous you only put help.
I think it would be best to:

Add a description for continous (all other commands have it).
Somehow convince argparse to also show what's passed in help.

Sorry I missed that.  Fix in #187.


fix #1874, Format the login failure message to more readable format.

+1

Current coverage is 61.90%

Merging #1880 into master will decrease coverage by -3.08% as of f30dd6b

@@            master   #1880   diff @@
======================================
  Files          172     172
  Stmts         5169    5169
  Branches       574     574
  Methods
======================================
- Hit           3359    3200   -159
  Partial          0       0
- Missed        1810    1969   +159

Review entire Coverage Diff as of f30dd6b

Uncovered Suggestions

+0.27% via ...cutor/Executor.scala#271...284
+0.25% via .../master/Master.scala#124...136
+0.23% via ...base/HBaseSink.scala#105...116
See 7 more...

Powered by Codecov. Updated on successful CI builds.


Resprite Electric-Grill

About the PR

Resprited electric grill
Why / Balance

The current electric grill looks more like a electric stove-top than a electric grill, that is why I resprited it.
Media
Here are examples of what the resprited electric grill looks like on it's different settings.

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
:cl:

tweak: Changed electric grill sprites

i like it

git checkout <upstream remote>/master RobustToolbox and commit :trollface:

git checkout <upstream remote>/master RobustToolbox and commit :trollface:

Doesn't seem to work

bruh replace  with the name of space-wizards/space-station-14 remote :trollface:

bruh replace with the name of space-wizards/space-station-14 remote :trollface:

:skull:
replace the part in brackets with the name of your upstream remote
for me its named upstream so git checkout upstream/master RobustToolbox

💀
replace the part in brackets with the name of your upstream remote
for me its named upstream so git checkout upstream/master RobustToolbox

Nothing works grahhh

:skull:

💀

it's pissing me off I just wanted to do a simple resprite 😭. I'll close and redo the PR

you dont need to close just force push, theres no reviews to troll

you dont need to close just force push, theres no reviews to troll

https://github.com/space-wizards/space-station-14/pull/21524 Here's the redone PR without the messed up submodule 💀


Update docs to not reference SYS1 PDS members

Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.

[ ] If the changes in this PR is part of the next future release, make this pull request against the docs-staging branch which will be published at the next release boundary. If the changes in this PR are part of the current release, use the default base branch, master. For more information about branches, see https://github.com/zowe/docs-site/tree/master#understanding-the-doc-branches.

[ ] If this PR relates to GitHub issues in docs-site or other repositories, please list in Description, prefixed with close, fix or resolve keywords.

Description (including links to related git issues)
Update docs to not reference SYS1 PDS members #1620
Please describe your pull request.
:heart:Thank you!

Hi @nannanli and @Joe-Winchester can you please check my PR. correct me if i am wrong.


internal compiler error: ../src/librustc/ty/subst.rs:457: Type parameter Self/#0 (Self/0) out of range when substituting (root type=Some(&Self)) substs=[]

A lot of our tests are showing this error after our latest nightly bump. Below is a representative stack trace.
test [run-compile-pass] tests/compile-pass/operators.rs ... test [compile-pass] tests/compile-pass/operators.rs ...
FAILED with exit code Some(101)
stdout:

stderr:
 error: internal compiler error: ../src/librustc/ty/subst.rs:457: Type parameter `Self/#0` (Self/0) out of range when substituting (root type=Some(&Self)) substs=[]

thread 'main' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:590
stack backtrace:
   1:     0x7fe4a6646173 - std::sys::backtrace::tracing::imp::write::h4b09e6e8c01db097
   2:     0x7fe4a6656d1d - std::panicking::default_hook::{{closure}}::h1d3243f546573ff4
   3:     0x7fe4a66553aa - std::panicking::default_hook::h96c288d728df3ebf
   4:     0x7fe4a66559a8 - std::panicking::rust_panic_with_hook::hb1322e5f2588b4db
   5:     0x7fe4aac2b328 - std::panicking::begin_panic::hb7c71bbc491f561c
   6:     0x7fe4aaed0935 - rustc::session::opt_span_bug_fmt::{{closure}}::h6ad7caa20ac20c4b
   7:     0x7fe4aae29c85 - rustc::session::opt_span_bug_fmt::h38eb39636c07401c
   8:     0x7fe4aae29b14 - rustc::session::span_bug_fmt::heb3fdb6acac8d0c7
   9:     0x7fe4aae872de - <rustc::ty::subst::SubstFolder<'a, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h17c67c094233ff36
  10:     0x7fe4aae86f5a - <rustc::ty::subst::SubstFolder<'a, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h17c67c094233ff36
  11:     0x7fe4ab7bdbbf - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::fold_with::h36c63211b891560a
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/structural_impls.rs:508
  12:     0x7fe4ab7cbe15 - <T as rustc::ty::subst::Subst<'tcx>>::subst_spanned::h1e2909ff760b6f53
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/subst.rs:352
  13:     0x7fe4ab7bfe8d - rustc::ty::subst::Subst::subst::h273373dc5ac91f64
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/subst.rs:331
  14:     0x7fe4ab8195bf - mir2wasm::monomorphize::apply_ty_substs::hef3b5edb9ee9e940
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/monomorphize.rs:20
  15:     0x7fe4ab816492 - mir2wasm::trans::BinaryenFnCtxt::type_layout_with_substs::hcddbf3b0d36a58a0
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/trans.rs:1112
  16:     0x7fe4ab816433 - mir2wasm::trans::BinaryenFnCtxt::type_layout::h599f742f9b96d87d
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/trans.rs:1106
  17:     0x7fe4ab80dda1 - mir2wasm::trans::BinaryenFnCtxt::trans_assignment::hc4ecc00d5d562645
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/trans.rs:641
  18:     0x7fe4ab8073bb - mir2wasm::trans::BinaryenFnCtxt::trans::hfde2fbe142e22c3a
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/trans.rs:285
  19:     0x7fe4ab805cd8 - <mir2wasm::trans::BinaryenModuleCtxt<'v, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_fn::h51bafc35e583b5f8
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/trans.rs:185
  20:     0x7fe4ab7c2911 - rustc::hir::intravisit::walk_trait_item::hb1ec63911b017ada
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/hir/intravisit.rs:662
  21:     0x7fe4ab7c3cbc - rustc::hir::intravisit::Visitor::visit_trait_item::hab873576703f59aa
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/hir/intravisit.rs:145
  22:     0x7fe4ab7c780f - rustc::hir::intravisit::walk_item::he9e3385587e0fc9d
                        at /usr/local/google/home/eholk/wasm/mir2wasm/<syntax macros>:2
  23:     0x7fe4ab7c394c - rustc::hir::intravisit::Visitor::visit_item::h1dc71540c0e4b486
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/hir/intravisit.rs:92
  24:     0x7fe4ab7c7af9 - rustc::hir::Crate::visit_all_items::hb6fdac0d00839bd9
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/hir/mod.rs:415
  25:     0x7fe4ab805215 - mir2wasm::trans::trans_crate::hb5f4874b54b7cb66
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/trans.rs:79
  26:     0x7fe4ab768379 - <mir2wasm::WasmCompilerCalls as rustc_driver::CompilerCalls<'a>>::build_controller::{{closure}}::h47f88d76f5b28e7e
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/bin/mir2wasm.rs:49
  27:     0x7fe4ab28a8d7 - rustc_driver::driver::compile_input::{{closure}}::hdf708031c67974d4
  28:     0x7fe4ab27bd55 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::hcac3a2328cd9259a
  29:     0x7fe4ab247695 - rustc_driver::driver::phase_3_run_analysis_passes::h9865057b323cad0e
  30:     0x7fe4ab238793 - rustc_driver::driver::compile_input::hc0edbed7edb3eb18
  31:     0x7fe4ab264626 - rustc_driver::run_compiler::h22d678d32fb7c300
  32:     0x7fe4ab7678d1 - mir2wasm::main::h79208956a14bce2e
                        at /usr/local/google/home/eholk/wasm/mir2wasm/src/bin/mir2wasm.rs:137
  33:     0x7fe4a6664046 - __rust_maybe_catch_panic
  34:     0x7fe4a6654961 - std::rt::lang_start::haaae1186de9de8cb
  35:     0x7fe4ab768493 - main
  36:     0x7fe4a5a7bf44 - __libc_start_main
  37:     0x7fe4ab732e88 - <unknown>
  38:                0x0 - <unknown>

Yeah this looks like one of the issues about substs/generics/monomorphization I mentioned before (like this stack trace seems to show).
Substs need to be tracked for the current BinaryenFnCtxt, at least so that type_size() and type_layout() can use the current substs (and not empty substs), and trans_assignment() in this stack trace can pass the correct substs to get the layout like so let dest_layout = self.type_layout_with_substs(dest_ty, self.substs); instead of https://github.com/brson/mir2wasm/blob/master/src/trans.rs#L648 and so on.
I had worked on this very thing (eg part of this commit https://github.com/lqd/mir2wasm/commit/837eda704cba422eeccdd55382df3b9dbe7d3cfa but it also built upon temporary previous work, a hacky branch to try and compile libcore, so the code is not really usable as is unfortunately). IIRC, this was absolutely a required thing to do, and fixed some problematic cases on the previous nightly though, and would certainly fix some on the new nightly as well. At least the tests catch the problem now.
Another problematic case showed up with code similar to https://github.com/lqd/mir2wasm/blob/e5f4f6b56cd9906dbae0fdd5d8c555250ff7e018/rust-examples/option.rs and seemed less related to substs per se, compared  to monomorphization/resolving trait methods, and there also is the substs-related "possible duplicated fns" from https://github.com/brson/mir2wasm/issues/17#issuecomment-236712595

Thanks for the investigation!
I opened this so we could have a tracking bug but go ahead and merge #39. Unfortunately, as soon as I did that I found another issue, which I mentioned at https://github.com/brson/mir2wasm/pull/39#issuecomment-248446874

I think we should be good here

Awesome. Are the tests that were failing still xfailed? If so, we should enable them again.

3 tests had been modified to not trigger the errors and I've modified them back since they work again
1 test was xfailed (moved to compile-fail actually) but this one still fails validation now (I think because of the i64.store16 of i32s I mentioned). It's not the problem of generics/substs passed to rustc this issue mentions anymore.

Sounds good. I'll close the bug.
As far as xfail versus compile-fail, I think of xfail as "these are tests that should work, but we know they don't and we'll fix them later." The tests in compile-fail are ones that are intentionally invalid and therefore we want to be sure they actually produce an error if you try to compile them. Is the test that got moved to compile-fail in this category?

No, this test is intended to compile and run, and we should really xfail it and move it back to the compile-pass folder. Let's do this when we can

Sounds good. Just to be sure, this was cmp.rs?
We should probably just remove the compile-fail directory, since this is all behavior that should have already been tested by rustc, unless we expected there to be things that by design do not work in mir2wasm even though they do in Rust.

yup, cmp.rs
Yeah we can probably remove the directory.
Some failures we'd expect to have in our tests would be probably run-fails eg panic! or assert! and not compile failures indeed


Broken lighting on Collada mesh with normal map [Intel HD 3000]

Operating system or device - Godot version:
Ubuntu 16.04 - Intel HD 3000
Godot 3.0 custom from commit 6d0568d
Issue description:
Mesh imported from collada have a weird lighting.. But testcube are fine..

Steps to reproduce:
Create a simple mesh, uv unwrap, and export it with better collada exporter, with tangent arrays exported.. Give it material with normal map, and place some point light or directional light..
Link to minimal example project:
Normal Map Test.zip
normal map by Calinou btw

Are you sure that the normals of the mesh point outwards?

Related to #8673, #8004, #6440, and potentially a few others...

yeah i'm sure about that

commit a75623f
Mac Nvidia 755M

Seems like the problem is solved?

Yes, but it would be nice if @khairul169 confirms so as well.

Yeah with the latest commit, test project are works fine.. 👍
Did i have to close this issue myself?

Great news :)


Build and Ship MS JDK with mimalloc as the default memory allocator.

Is your feature request related to a problem? Please describe.
Stock system allocator on most platforms is mediocre. Microsoft works on what is arguable the best general purpose allocator in existence at the moment in the form of mimalloc.
Describe the solution you'd like
Build and ship mimalloc with msjdk in place of system alloc. Benefits would be increase performance and lower memory usage. Also a nice synergy between microsoft tech.
Describe alternatives you've considered
Manually overriding the allocator via LD preload or page table modification.
Link
https://github.com/microsoft/mimalloc

Will discuss this internally and get back to you (will take some time to assess so I won't give an ETA I'm afraid).

This will be extremely useful. Especially on Windows where there is no alternate to LD_PRELOAD.


MSFT_xRegistryResource.psm1: Fix Script Analyzer Issues

Details of the scenario you tried and the problem that is occurring
There's a number of script analyzer issues getting reported in MSFT_xRegistryResource.psm1. These should be fixed.
Verbose logs showing the problem
[00:04:30]     Context MSFT_xRegistryResource.psm1
[00:04:30]       [+] Should pass all error-level PS Script Analyzer rules 102ms
[00:04:35]       [+] Should pass all required PS Script Analyzer rules 4.64s
[00:04:35]       [+] Should pass all flagged PS Script Analyzer rules 677ms
[00:04:35]       [+] Should pass any recently-added, error-level PS Script Analyzer rules 68ms
[00:04:38]       [+] Should not suppress any required PS Script Analyzer rules 2.19s
[00:04:39] Custom DSC Resource Kit PSSA rule(s) did not pass.
[00:04:39] The following PSScriptAnalyzer rule 'DscResource.AnalyzerRules\Measure-ParameterBlockParameterAttribute' errors need to be fixed:
[00:04:39] MSFT_xRegistryResource.psm1 (Line 56): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 59): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 193): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 197): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 201): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 205): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 208): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 397): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 401): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 405): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 409): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 412): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] MSFT_xRegistryResource.psm1 (Line 735): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:39] For instructions on how to run PSScriptAnalyzer on your own machine, please go to https://github.com/powershell/PSScriptAnalyzer
[00:04:39] Common Tests - Custom Script Analyzer Rules will not fail unless you opt-in.
[00:04:39] To opt-in, create a '.MetaTestOptIn.json' at the root
[00:04:39] of the repo in the following format:
[00:04:39] [
[00:04:39]      "Common Tests - Custom Script Analyzer Rules"
[00:04:39] ]
[00:04:39]       [+] Should pass all custom DSC Resource Kit PSSA rules 863ms

Version of the DSC module that was used ('dev' if using current dev branch)
dev

I'll grab this one.


Code to add field to field group does not compile

I tried to use the following code from this "Field Groups (Drop-Down Controls)" page in an extension
tableextension 50100 CustomerExercise extends Customer
{
fields
{
field(50100); "V02Max"; Decimal) { }
}
fieldgroups
{
    addlast(DropDown; V02Max) { }
}

}
However, Visual Studio Code is giving an error on the word fieldgroups.  The error is "Syntax error.'}' expected.'   I am using NAV 2018 cumulative update 8.  Is this fieldgroups control only available in Business Central?

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

ID: e9979b71-a2f9-9032-5bba-161f6da5ff63
Version Independent ID: 7fd0115f-bfec-43e1-e5c3-69bf2e4d383c
Content: Field Groups - Business Central
Content Source: dev-itpro/developer/devenv-field-groups.md
Service: dynamics365-business-central
GitHub Login: @SusanneWindfeldPedersen
Microsoft Alias: solsen

Hello, thanks for your feedback - I'm afraid there's a syntax error in the example above, it should be:
tableextension 50107 CustomerExercise extends Customer
{
fields
{
field(50100; "V02Max"; Decimal) { }
}
fieldgroups
{
addlast(DropDown; V02Max) { }
}
}
Can you make that work? The docs will be updated and refreshed with the next push. Thanks!

Thanks Susanne,
I tried the exact code that you provided and am still getting the same error.  Here is a screen shot showing the code and the problems
<EMAIL_ADDRESS>I found the following blog post regarding when the ability to add a field to a field group was added.
https://cloudblogs.microsoft.com/dynamics365/no-audience/2018/08/31/developer-preview-august-2018/?source=nav
The article says that this feature was added to the August 2018 cumulative update.  It turns out that we are on that cumulative update for NAV 2018.   Would you let me know whether this is available in NAV 2018 or only in Business Central?  If it was not in the August 2018 cumulative update for NAV 2018, was it added to a later cumulative update?
Thanks,
Joseph Gress
From: Susanne Windfeld Pedersen<EMAIL_ADDRESS>Sent: Wednesday, July 10, 2019 4:41 AM
To: MicrosoftDocs/dynamics365smb-devitpro-pb<EMAIL_ADDRESS>Cc: Joseph Gress<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [MicrosoftDocs/dynamics365smb-devitpro-pb] Code to add field to field group does not compile (#625)
Hello, thanks for your feedback - I'm afraid there's a syntax error in the example above, it should be:
tableextension 50107 CustomerExercise extends Customer
{
fields
{
field(50100; "V02Max"; Decimal) { }
}
fieldgroups
{
addlast(DropDown; V02Max) { }
}
}
Can you make that work? The docs will be updated and refreshed with the next push. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb/issues/625?email_source=notifications&email_token=AMSGF45HHM3DDB4VIPZP4EDP6WOBTA5CNFSM4H7IFE2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZSYESA#issuecomment-509968968, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMSGF473NGTRLLFZCVVF7CLP6WOBTANCNFSM4H7IFE2A.

Hello again, sorry that didn't work. I believe that from March, 2018 we announced that the preview features were not available with the next cumulative updates: "Please note, that the improvements announced in this blog post are not available in Dynamics NAV 2018 and the following cumulative updates of Dynamics NAV 2018." from the March Update, this unfortunately just wasn't repeated in the blog post that you're referring to from August 2019.  Thanks, Susanne.


[Question] Need a log in page

Dear @dddomodossola,
again have to bother you with another question, and thanks in advance for your amazing support.
For my web-guy, I need to have a login page to only allow authorized users.
In the meanwhile I need to restrict the GUI to be used by only ONE user (since it is going to control some hardwares in a lab). Any idea, suggestion or example code would be very much appreciated.
PS: by the way, today I have finished making a demo gui which is now running on your uni domain. It is not controlling any hardware yet, as we are all working from home and have no access to the lab :-)
You can check it our here: petra.phys.yorku.ca:5000
For some reason, the look from a mac os looks nice and everything in place, while from a windows PC it looks a bit ugly with resized containers width. Any suggestion for graphical/ performance improvements would be very welcome too.
Best regards,

Hello @m-kareem
Here is an example for you that allows user authentication. You must run your application with start parameter 'multiple_instance'=True. The performances appears to be perfect for me. It is grafana that takes a long time to load, and it is not caused by Remi. Maybe you can replace grafana with an svg remi plot.
import remi.gui as gui
from remi.gui import *
from remi import start, App
import random
import threading

class CookieInterface(gui.Tag, gui.EventSource):
    def __init__(self, remi_app_instance, **kwargs):
        super(CookieInterface, self).__init__(**kwargs)
        gui.EventSource.__init__(self)
        self.app_instance = remi_app_instance
        self.EVENT_ONCOOKIES = "on_cookies"
        self.cookies = {}

    def request_cookies(self):
        self.app_instance.execute_javascript("""
            var aKeys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/);
            var result = {};
            for (var nLen = aKeys.length, nIdx = 0; nIdx < nLen; nIdx++) {
                var key = decodeURIComponent(aKeys[nIdx]);
                result[key] = decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(key).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null;
            }
            sendCallbackParam('%s','%s', result);
            """%(self.identifier, self.EVENT_ONCOOKIES))

    @gui.decorate_event
    def on_cookies(self, **value):
        self.cookies = value
        return (value,)

    def remove_cookie(self, key, path='/', domain=''):
        if not key in self.cookies.keys():
            return
        self.app_instance.execute_javascript( """
            var sKey = "%(sKey)s";
            var sPath = "%(sPath)s";
            var sDomain = "%(sDomain)s";
            document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "");
            """%{'sKey': key, 'sPath': path, 'sDomain': domain} )

    def set_cookie(self, key, value, expiration='Infinity', path='/', domain='', secure=False):
        """
        expiration (int): seconds after with the cookie automatically gets deleted
        """

        secure = 'true' if secure else 'false'
        self.app_instance.execute_javascript("""
            var sKey = "%(sKey)s";
            var sValue = "%(sValue)s";
            var vEnd = eval("%(vEnd)s");
            var sPath = "%(sPath)s";
            var sDomain = "%(sDomain)s";
            var bSecure = %(bSecure)s;
            if( (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) == false ){
                var sExpires = "";
                if (vEnd) {
                    switch (vEnd.constructor) {
                        case Number:
                            sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd;
                        break;
                        case String:
                            sExpires = "; expires=" + vEnd;
                        break;
                        case Date:
                            sExpires = "; expires=" + vEnd.toUTCString();
                        break;
                    }
                }
                document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : "");
            }
            """%{'sKey': key, 'sValue': value, 'vEnd': expiration, 'sPath': path, 'sDomain': domain, 'bSecure': secure})

class User(object):
    USER_LEVEL_NOT_AUTHENTICATED = 0
    USER_LEVEL_USER = 1
    USER_LEVEL_ADMIN = 2

    def __init__(self, username, pwd, user_level=0):
        self.username = username
        self.pwd = pwd
        self.user_level = user_level

class LoginManager(gui.Tag, gui.EventSource):
    """
    Login manager class allows to simply manage user access safety by session cookies
    It requires a cookieInterface instance to query and set user session id
    When the user login to the system you have to call
        login_manager.renew_session() #in order to force new session uid setup

    The session have to be refreshed each user action (like button click or DB access)
    in order to avoid expiration. BUT before renew, check if expired in order to ask user login

        if not login_manager.expired:
            login_manager.renew_session()
            #RENEW OK
        else:
            #UNABLE TO RENEW
            #HAVE TO ASK FOR LOGIN

    In order to know session expiration, you should register to on_session_expired event
        on_session_expired.do(mylistener.on_user_logout)
    When this event happens, ask for user login
    """
    def __init__(self, user_dictionary, cookieInterface, session_timeout_seconds = 60, **kwargs):
        #user_dictionary is a  dictionary (the key is the username,
        # the value is a User instance) have to be a list of users, can be loaded or other data sources
        super(LoginManager, self).__init__(**kwargs)
        gui.EventSource.__init__(self)
        self.user_dictionary = user_dictionary
        self.user_logged_instance = None
        self.session_uid = str(random.randint(1,999999999))
        self.cookieInterface = cookieInterface
        self.session_timeout_seconds = session_timeout_seconds
        self.timer_request_cookies() #starts the cookie refresh
        self.timeout_timer = None #checks the internal timeout

    def timer_request_cookies(self):
        self.cookieInterface.request_cookies()
        threading.Timer(self.session_timeout_seconds/10.0, self.timer_request_cookies).start()

    @gui.decorate_event
    def on_session_expired(self):
        self.user_logged_instance = None
        return ()

    def renew_session(self):
        """Have to be called on user actions to check and renew session
        """
        if ((not 'user_uid' in self.cookieInterface.cookies) or self.cookieInterface.cookies['user_uid']!=self.session_uid) and (not (self.user_logged_instance==None)):
            self.on_session_expired()

        if self.user_logged_instance == None:
            self.session_uid = str(random.randint(1,999999999))

        self.cookieInterface.set_cookie('user_uid', self.session_uid, str(self.session_timeout_seconds))

        #here we renew the internal timeout timer
        if self.timeout_timer:
            self.timeout_timer.cancel()
        self.timeout_timer = threading.Timer(self.session_timeout_seconds, self.on_session_expired)
        self.timeout_timer.start()

    def login(self, username, pwd):
        #returns None if not authenticated or a User instance, with the proper user_level
        if username in self.user_dictionary.keys():
            if pwd == self.user_dictionary[username].pwd:
                print("password ok")
                self.user_logged_instance = self.user_dictionary[username]
                self.renew_session()
                return self.user_dictionary[username] #self.user_logged_instance
        return None

    def add_user(self, user):
        #add a new user that can login, you can save it to a database
        self.user_dictionary[user.username] = user

class ContainerProxy():
    #given a container, this class allows to append widgets to it, keeping memory about widget user level.
    # when user level changes, this class hides or shows children widgets properly
    def __init__(self, container):
        self.container = container
        self.widgets_dictionary = {}

    def append(self, user_level, widget, key=None):
        key = self.container.append(widget, key)
        #here we store for each widget, the minimum user level for which it have to be visible
        self.widgets_dictionary[key] = {'widget':widget, 'user_level':user_level}

    def set_logged_user_level(self, user_level = User.USER_LEVEL_NOT_AUTHENTICATED):
        self.user_level = user_level
        for widget_id in self.widgets_dictionary.keys():
            if self.widgets_dictionary[widget_id]['user_level'] > self.user_level:
                #here we replace the widget to hide in order to mantain a placeholder
                self.container.append(gui.Widget(style={'display':'none', 'width':'0px', 'height':'0px'}), widget_id)
            else:
                #here we put again the widget on the interface, the placeholder gets replaced because the same kay is used to append
                self.container.append(self.widgets_dictionary[widget_id]['widget'], widget_id)

class MyApp(App):
    def __init__(self, *args, **kwargs):
        super(MyApp, self).__init__(*args, static_file_path='./res/')

    def idle(self):
        #idle function called every update cycle
        pass

    def main(self):
        main_container = Container(margin="0px auto")
        self.container_proxy = ContainerProxy(main_container)
        main_container.attributes.update({"editor_baseclass":"Container","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"()","class":"Container","editor_varname":"main_container"})
        main_container.style.update({"width":"580.0px","position":"relative","overflow":"auto","height":"500.0px"})
        user_area_container = Container()
        user_area_container.attributes.update({"editor_baseclass":"Container","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"()","class":"Container","editor_varname":"user_area_container"})
        user_area_container.style.update({"width":"260.0px","border-style":"dotted","border-width":"1px","position":"absolute","top":"40.0px","left":"20.0px","margin":"0px","overflow":"auto","height":"440.0px"})
        lbl_user_panel = Label('User panel')
        lbl_user_panel.attributes.update({"editor_baseclass":"Label","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"('User panel')","class":"Label","editor_varname":"lbl_user_panel"})
        lbl_user_panel.style.update({"width":"100px","position":"absolute","top":"20.0px","left":"20.0px","margin":"0px","overflow":"auto","height":"30px"})
        user_area_container.append(lbl_user_panel,'lbl_user_panel')
        #main_container.append(user_area_container,'user_area_container')
        self.container_proxy.append(User.USER_LEVEL_USER, user_area_container,'user_area_container')
        user_auth_container = HBox()
        user_auth_container.attributes.update({"editor_baseclass":"HBox","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"()","class":"HBox","editor_varname":"user_auth_container"})
        user_auth_container.style.update({"right":"1px","align-items":"center","visibility":"visible","height":"35px","overflow":"auto","top":"1px","flex-direction":"row","width":"300px","justify-content":"space-around","position":"absolute","margin":"0px","display":"flex"})
        bt_user_login = Button('login')
        bt_user_login.attributes.update({"editor_baseclass":"Button","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"('login')","class":"Button","editor_varname":"bt_user_login"})
        bt_user_login.style.update({"width":"100px","position":"static","top":"20px","order":"2","margin":"0px","overflow":"auto","height":"30px"})
        bt_user_login.onclick.do(self.on_prompt_login)
        self.bt_user_login = bt_user_login
        user_auth_container.append(bt_user_login,'bt_user_login')
        user_name = Label('not logged in')
        user_name.attributes.update({"editor_baseclass":"Label","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"('not logged in')","class":"Label","editor_varname":"user_name"})
        user_name.style.update({"width":"100px","font-weight":"bold","position":"static","top":"20px","order":"1","margin":"0px","overflow":"auto","height":"30px"})
        self.user_name = user_name
        user_auth_container.append(user_name,'user_name')
        bt_user_logout = Button('logout')
        bt_user_logout.attributes.update({"editor_baseclass":"Button","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"('logout')","class":"Button","editor_varname":"bt_user_logout"})
        bt_user_logout.style.update({"visibility":"visible","height":"30px","overflow":"auto","top":"20px","order":"3","width":"100px","position":"static","margin":"0px","display":"none","background-color":"#fa3200"})
        bt_user_logout.onclick.do(self.on_logout)
        self.bt_user_logout = bt_user_logout
        user_auth_container.append(bt_user_logout,'bt_user_logout')
        main_container.append(user_auth_container,'user_auth_container')
        admin_area_container = Container()
        admin_area_container.attributes.update({"editor_baseclass":"Container","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"()","class":"Container","editor_varname":"admin_area_container"})
        admin_area_container.style.update({"border-color":"#030303","height":"440.0px","border-style":"dotted","overflow":"auto","top":"40.0px","border-width":"1px","width":"260.0px","position":"absolute","margin":"0px","left":"300.0px"})
        lbl_admin_panel = Label('Administration panel')
        lbl_admin_panel.attributes.update({"editor_baseclass":"Label","editor_tag_type":"widget","editor_newclass":"False","editor_constructor":"('Administration panel')","class":"Label","editor_varname":"lbl_admin_panel"})
        lbl_admin_panel.style.update({"width":"158px","position":"absolute","top":"20.0px","left":"20.0px","margin":"0px","overflow":"auto","height":"27px"})
        admin_area_container.append(lbl_admin_panel,'lbl_admin_panel')
        #main_container.append(admin_area_container,'admin_area_container')
        self.container_proxy.append(User.USER_LEVEL_ADMIN, admin_area_container,'admin_area_container')

        example_users = {}
        example_users['admin'] = User('admin', 'pwdadmin', User.USER_LEVEL_ADMIN)
        example_users['user'] = User('user', 'pwduser', User.USER_LEVEL_USER)
        self.login_manager = LoginManager(example_users, CookieInterface(self), 60*60) #autologout 1 hour (60 seconds x 60 minutes)
        self.login_manager.on_session_expired.do(self.on_logout)

        self.main_container = main_container
        self.on_logout(None)
        return self.main_container

    def on_prompt_login(self, emitter):
        self.login_dialog = gui.GenericDialog("Login", "Type here login data", width=300)
        username_input = gui.TextInput(width=250)
        password_input = gui.TextInput(width=250)
        self.login_dialog.add_field_with_label('username', 'Username', username_input)
        self.login_dialog.add_field_with_label('password', 'Password', password_input)
        self.login_dialog.confirm_dialog.do(self.on_login_confirm)
        self.login_dialog.show(self)

    def on_login_confirm(self, emitter):
        username = self.login_dialog.get_field('username').get_value()
        password = self.login_dialog.get_field('password').get_value()
        user = self.login_manager.login(username, password)
        if user != None:
            print("logged in")
            self.user_name.set_text("hello " + user.username)
            self.bt_user_login.style['display'] = 'none'
            self.bt_user_logout.style['display'] = 'inline'
            self.container_proxy.set_logged_user_level(user.user_level)

    def on_renew(self, emitter):
        #THIS METHOD HAVE TO BE CALLED EACH TIME A USER DOES SOMETHING ON THE INTERFACE
        # IT IS TO SAY EACH "INTERACTION" to keep the access alive, otherwise the user will be disconnected after a timeout
        #if the user is still logged in
        if not self.login_manager.user_logged_instance is None:
            self.login_manager.renew_session()
        else:
            self.on_logout(None)

    def on_logout(self, emitter):
        self.bt_user_login.style['display'] = 'inline'
        self.bt_user_logout.style['display'] = 'none'
        self.user_name.set_text("not logged in")
        self.container_proxy.set_logged_user_level()

if __name__ == "__main__":
    # starts the webserver
    start(MyApp, address='<IP_ADDRESS>', port=0, multiple_instance=False, debug=False)

Hi @dddomodossola ,
thank you very much for this nice example. I am working on a user management backend, to let the admin register new users and store the user dictionary in a binary dictionary file with encrypted passwords. As soon as I finish this, I would be happy to share it with you if you are interested.
For now, I have a question: how to hide the typed text in the password field (as dots or asterisk), because in the current example, it is showing the password.
Regards,

Hello @m-kareem ,
Thank you! It would be cool to see your backend password example ;-)
Here is the password input:
import remi.gui as gui
from remi import start, App

class MyApp(App):
    def __init__(self, *args):
        super(MyApp, self).__init__(*args)

    def main(self):
        wid = gui.VBox(width=300, height=200, margin='0px auto')
        lbl = gui.Label('Password', width='80%', height='50%')
        lbl.style['margin'] = 'auto'

        txt = gui.Input(input_type='password', width=200, height=30)
        txt.style['background-color'] = 'lightgray'
        txt.attributes['type'] = 'password'
        txt.onchange.connect(self.on_password)

        wid.append(lbl)
        wid.append(txt)

        return wid

    def on_password(self, emitter, new_value):
        print("password: " + str(new_value))

if __name__ == "__main__":
    start(MyApp, debug=True)

Hi @dddomodossola,
As promised, here is my user_manager script which is implemented in your login example. The script is encrypting the passwords in a binary file and decrypting it in the login time.
I have also expanded your example with add / edit / delete users from administration panel.
Use admin/admin for initial login.
Please let me know what do you think. Definitely the code needs some cleaning up, but for now it should be enough for demonstration.
Regards,
PS: To run the example you will need to install "pickle" library.
mkareem_login_example.zip

Thank you a lot for sharing. I will try this code today ;-)

@m-kareem Cool example, Thank you!
Just one advice. I'm not a security expert, however it is advisable to not decrypt an encrypted password to check if it matches with the newly typed one. It is better to cypher the newly typed and check if it matches with the stored one.
Cheers

Thanks @dddomodossola  for looking at my example.
This is a great advice, thanks a lot. I will work on this.
Cheers


Delete all metafields for a product

There is an very easy way to delete all images of an product:
product = ShopifyAPI::Product.find("...")
product.images = []
product.save

But because the metafield object doesn't seam to be a real child object of product, I can't clear the metafields in the same way.
Is there an easy way to clear all metafields of my product?

This is really not optimal to not be able to delete multiple/all metafields in one api call, potentially can save a lot of network calls.


Added functions for managing wireguard tunnels

setup_wg_if: takes an ip address to assign to the interface, along with a peer
address and returns the interface name that was created
open_tunnel: takes a remote endpoint, a local private key file path, a
remote public key, and the wirguard interface and configures the
wireguard tunnel.
delete_tunnel: takes an interface name and deletes it
create_wg_key: saves a wireguard private key to a given path.
get_wg_pubkey: takes a wireguard private key path and returns the
corresponding public key

can you put those comments above the functions with a triple comment syntax ///. That way they will be picked up by the autogenerated docs


azure-keyvault 0.3.1 is broken

Due to some failure in the validation of packages, the package 0.3.1 cannot work at all (impossible to authenticate).

0.3.3 released


Intermittent problem loading SSB patch.

On some occasions, the SSB patch fails to load. It's happens intermittently.

Solved. See version 4.1


[terra-status-view] Accessibility issues with  usage

Bug Report
The status view title and message should use appropriate semantic HTML elements instead of divs to meet accessibility requirements. At the very least, the divs should be replaced with paragraph elements. Ideally, the status view title would be able to map to various header elements.
@ Mentions
@scottwilmarth @neilpfeiffer

A quick note that if a header tag is used for the title, it should be implemented in such a way that the content on the final page dictates heading level based upon where the status view falls on the page. Hard coding a specific heading level into the status view may break the natural hierarchy of the page and, consequently, the accessibility of the page.

A quick note that if a header tag is used for the title, it should be implemented in such a way that the content on the final page dictates heading level based upon where the status view falls on the page. Hard coding a specific heading level into the status view may break the natural hierarchy of the page and, consequently, the accessibility of the page.

A solution is adding a prop that controls what heading renders. titleLevel perhaps.

A quick note that if a header tag is used for the title, it should be implemented in such a way that the content on the final page dictates heading level based upon where the status view falls on the page. Hard coding a specific heading level into the status view may break the natural hierarchy of the page and, consequently, the accessibility of the page.

A solution is adding a prop that controls what heading renders. titleLevel perhaps.

Agreed with @yuderekyu . If we are using an additional prop we need to have a default value if the user doesn't provide the prop.

@yuderekyu if we expect heading level for title should always be set by the consumer then we might have to make this new prop as required. and regarding the message should we use the paragraph elements ?

Amber Wilks and I chatted about whether this should be a  or <h#>. We both feel that a  would be a better option since the alert could happen at many levels. This would eliminate the need for a default value if teams don't understand the hierarchy of the page and ensure a better experience. On a higher level, the alert notification should convey the needed awareness and importance. While the heading levels may not be needed in this instance, in other areas the heading levels should be set by the hierarchy of the consuming page, not by the component itself.

Agreeing with @scottwilmarth  -- I would prefer we not involve changing the title prop content to a heading element, but keep it and message as paragraph elements. The primary role of the status view is as content to describe/fill an empty page, not to serve as any kind of page hierarchy, which would be provided by an action-header or other similar header element to describe the page/panel/large content area.


[folding] implement vim markers folding

VSCode Version: Code 1.19.2 (490ef761b76b3f3b3832eff7a588aac891e5fe80, 2018-01-10T15:49:04.682Z)
OS Version: Darwin x64 16.7.0
Extensions:

Extension
Author (truncated)
Version

path-intellisense
chr
1.4.2

vscode-babel-coloring
dza
0.0.4

rest-client
hum
0.16.2

hg
mrc
1.2.3

python
ms-
0.9.1

markdown-preview-enhanced
shd
0.3.2

vim
vsc
0.10.9

Implement the folding method present in vim, where you can define a folding section by specifying the block with: "{{{" and "}}}" respectively.
Furthermore you can have a "title" for the block because everything in the "{{{" line will be shown as text.
For example:
{{{ require ( self, a, b c )
def require ( self, a, b, c ):
print "hello"
}}}
will be folded in:
require ( self, a, b, c )
Thanks :-)

If this is to be implemented, I hope Visual Studio Code can go all the away. I guess @fsoft72 only uses the default Vim markers, but Vim actually allows customizing the fold markers.
What I'm actually asking for is exposing the fold markers as user settings - having customizable default fold markers for all the file types, which can be overridden by the language specific ones.
Vim example:
set foldmethod=marker -> equivalent to enabling folding based on regions in Visual Studio Code
set foldmarker=##-,-## -> configuration option for the actual fold marker, its default value is {{{,}}}
Folding collapses the whole region and the text after the starting fold marker stays as the region name.
Should I open a separate issue for this?

Folding regions are configured currently defined by the extension that defined the language.
Here is an example (for Java): https://github.com/Microsoft/vscode/blob/268ec647b7e6c280b474d0da5e51049269000944/extensions/java/language-configuration.json#L28
Not sure that there is a default that would work with every language, the languages syntaxes are too different. and E.g. {{{ is not valid in many languages.
https://github.com/Microsoft/vscode/issues/36002 is the request to also have that setting in the user settings.
Ok to mark this as a dup of #36002. The alternative is that you make PRs to the language configurations where {{{/}}} makes sense.

This more flexible than the current approach.
Example: in Vim I define as the global foldmarker say ##- and -##. Then in all languages that use # as the comment marker, I can use these markers to fold.
In languages that don't use # as the comment marker, I just "hide" the marker in comments: // ##- and // -##.
Both versions are easy to insert using snippets.
This covers 99% of the languages I'm currently using: Ruby, Python, Bash, Javascript, Java, Groovy, C#, etc.

Hi,
I've done a quick experimental extension to add custom folding: Zokugun Folding.
The main problem is that I can't remove the existing folding so you get 2 folding providers...
Here my settings with vim folding markers:
"folding": {
    "*": {
        "start": "\\{\\{\\{",
        "end": "\\}\\}\\}"
    }
}

Clsoing based on comment https://github.com/microsoft/vscode/issues/41633#issuecomment-378183022
This should come as a folding provider or we allow users to change the folding makers.


Expanded replication testing

Description of changes:
Expanded testing for the replication arg by including more possible values for the number of samples, canonical nodes, and batch size.

Issue #, if available:

Merge Checklist:
Put an x without space in the boxes that apply. If you are unsure about any checklist, please don't hesitate to ask. We are here to help! This is simply a reminder of what we are going to look for before merging your pull request.
General

[ ] I have read the contributor guidelines
[ ] This is a documentation change or typo fix. If so, skip the rest of this checklist.
[ ] I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the MosaicML team.
[ ] I have updated any necessary documentation, including README and API docs (if appropriate).

Tests

[ ] I ran pre-commit on my change. (check out the pre-commit section of prerequisites)
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate).
[ ] I ran the tests locally to make sure it pass. (check out testing)
[ ] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes.

going to add docs to this PR.