Rust-analyzer raises an error when opening a project in WSL2

I have my rust development environment on top of WSL2 (kali-linux). After installing rust-analyzer from the marketplace in VSCode, I got this error on the hovering toast so that I cannot go forward.
rust-analyzer failed to load workspace: No such file or directory (os error 2)
Does the problem happen because rust toolchain is built on WSL2? If so, how do I solve it?
I've done a preliminary search about some relevant issues but I cannot find the answer yet.
Thanks in advance.
DESKTOP-J74E4AM$ cargo --version
cargo 1.55.0 (32da73ab1 2021-08-23)

DESKTOP-J74E4AM$ rustc --version
rustc 1.55.0 (c8dfcfe04 2021-09-06)

DESKTOP-J74E4AM$ uname -a
Linux DESKTOP-J74E4AM <IP_ADDRESS>-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux

My VSCode setup:
Version: 1.62.3 (user setup)
Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
Date: 2021-11-17T08:11:14.551Z
Electron: 13.5.2
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

My rust-analyzer version:
rust-analyzer version: d9b2291f5 2021-11-29 stable

When VS Code Remote is started in WSL, no shell startup scripts are run. This was done to avoid issues with startup scripts that are tuned for shells. If you want to run additional commands or modify the environment this can be done in a setup script ~/.vscode-server/server-env-setup (Insiders: ~/.vscode-server-insiders/server-env-setup). If present, the script is processed before the server is started.

The script needs to be a valid Bourne shell script. Be aware that an invalid script will prevent the server from starting up. If you end up with a script that prevents the server from starting, you will have to use a regular WSL shell and delete or rename the setup script.

Not sure, it's possible that cargo isn't in your PATH on the remote side. If you open a terminal in VS Code and type cargo, does it work?

Seems like there's no problem with the PATH. I just have the rust toolchain installed on remote Kali-Linux side, not on the host Windows side.

DESKTOP-J74E4AM$ cargo
Rust's package manager

USAGE:
    cargo [+toolchain] [OPTIONS] [SUBCOMMAND]

OPTIONS:
    -V, --version                  Print version info and exit
        --list                     List installed commands
### omitted the rest

DESKTOP-J74E4AM$ printenv
PATH=/home/umaaji/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:... ### omitted the rest

Try:
$ ps aux | grep code # vscode-server or something like that
$ cat /proc/PID_OF_CODE_SERVER/environ | tr '\000' $'\n' | grep PATH

DESKTOP-J74E4AM$ ps aux | grep code umaaji    1275  0.0  0.0   6252  2128 pts/0    S+   23:26   0:00 grep --color=auto code
It seems like it just shows me the executed grep itself. Here are the entire results of running grep, for information.
DESKTOP-J74E4AM$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   1056   516 ?        Sl   Nov30   0:16 /init
root       626  0.0  0.0   1404   472 ?        Ss   02:29   0:00 /init
root       627  0.0  0.0   1404   472 ?

I'm not completely sure, but I believe I'm running it in VSCode's internal WSL window.
Am I doing it the wrong way?

Yeah, I'm not on WSL, but with SSH it looks like this:

While investigating as I change situations, I feel like I found where they happen.
It seems that the rust-analyzer works as expected when WSL2 is launched with a remote connection, but the error occurs when the WSL2 shell is launched without that. I have no idea how these two are different (except text in the left-below corner),  but the error message doesn't correctly refer to the context in which it is shown.
Could I ask for an improvement for the error message?

Hi i had a simmilar problem with WSL
I could not start the rust-analyzer
➜  uname -a
Linux DESKTOP-GCH8R3L 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
➜  matklad.rust-analyzer-0.2.964 server/rust-analyzer --version
server/rust-analyzer: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by server/rust-analyzer)
➜  matklad.rust-analyzer-0.2.964 ..
➜  extensions matklad.rust-analyzer-0.3.963/server/rust-analyzer
matklad.rust-analyzer-0.3.963/server/rust-analyzer: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by matklad.rust-analyzer-0.3.963/server/rust-analyzer)

@zerocity which distro is that? (see /etc/os-release)? CC https://github.com/rust-analyzer/rust-analyzer/issues/11808

NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

i was thinking i had a newer version ....
ok sorry i found the correct issue 🙈
https://github.com/rust-analyzer/rust-analyzer/issues/11558

While investigating as I change situations, I feel like I found where they happen. It seems that the rust-analyzer works as expected when WSL2 is launched with a remote connection, but the error occurs when the WSL2 shell is launched without that. I have no idea how these two are different (except text in the left-below corner), but the error message doesn't correctly refer to the context in which it is shown. Could I ask for an improvement for the error message?

VScode seems to use the default windows hosts terminal(cmd) unless you remote into WSL2. Tthe other option is to install rust on Windows itself rather than WSL2.


Update lib.rs

the batch code is not reachable

already calls draw batch in the draw iter if the feature is enabled, i wanted to try use draw batch cause the draw iter isn't rendering to the screen. let me try without the batch feature and see if that is working


Nixpkg? [Feature Request]

I want to change my Hyprland cursor and was redirected to this repo. There seems to not be any nixpkg of this, so I'm making an issue for it

Sorry, but I only do packaging for AUR. Please ask the NixOS community for the package.

Of course. Let me know in case some action is required in my side.


Dask: TypeError: call() takes 2 positional arguments but 3 were given

Copy of: https://stackoverflow.com/questions/58449018/dask-typeerror-call-takes-2-positional-arguments-but-3-were-given
I am experiencing this error using Dask. I have no idea about how to go about fixing it, as it doesn't seem to be anything in my code explicitly.
What I am doing is reading a dataframe and using stanfordnlp to tokenize a text column, and then take out the nouns. It works fine when just using pandas, but when using dask I get this error. I am on Ubuntu, python 3.7.3 and Dask 2.6.0.
This is my error:

Traceback (most recent call last):
File "main.py", line 56, in  main(df=data, nlp=nlp, lang=lang, wanted_pos=wp)
File "main.py", line 13, in main df.persist()
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/base.py", line 138, in persist (result,) = persist(self, traverse=False, **kwargs)
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/base.py", line 629, in persist results = schedule(dsk, keys, **kwargs)
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/threaded.py", line 80, in get **kwargs
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/local.py", line 486, in get_async raise_exception(exc, tb)
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/local.py", line 316, in reraise raise exc
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/local.py", line 222, in execute_task result = _execute_task(task, data)
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/core.py", line 118, in _execute_task args2 = [_execute_task(a, cache) for a in args]
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/core.py", line 118, in  args2 = [_execute_task(a, cache) for a in args]
File "/home/bertil/Envs/datascience/lib/python3.7/site-packages/dask/core.py", line 119, in _execute_task return func(*args2)
TypeError: call() takes 2 positional arguments but 3 were given

This is my code:
#!/usr/bin/env python

from pathlib import Path
import string
import dask.dataframe as dd
from dask.diagnostics import ProgressBar
import stanfordnlp

def process(text, nlp, lang, wanted_pos):
    # Remove punctuation
    if type(text) == str:
        text = text.translate(str.maketrans('', '', string.punctuation))
        token = nlp(text)
        words = {word for sent in token.sentences for word in sent.words}
        wanted_words = set(filter(lambda word: word.upos in wanted_pos, words))
        wanted_words = ','.join(word.lemma for word in wanted_words if word)
    else:
        wanted_words = ''
    return wanted_words

if __name__ == '__main__':
    # Choose language
    lang = 'da'

    # Chose wanted_pos
    wp = {'NOUN'}

    # Download model for nlp.
    stanford_path = Path.home() / 'stanfordnlp_resources' / f'{lang}_ddt_models'
    if not stanford_path.exists():
        stanfordnlp.download(lang)

    # Set up nlp pipeline
    nlp = stanfordnlp.Pipeline(processors='tokenize,lemma,pos', lang=lang)

    df = dd.read_csv('data.csv', engine='python', error_bad_lines=False,
                     encoding='utf8')

    df['tagged'] = df['Message'].apply(process,
                                       args=(nlp, lang, wp),
                                       meta=('Message', str))

    with ProgressBar():
        df.compute()

    df.to_csv('out/output_*.csv')

Does
    df['tagged'] = df['Message'].apply(process, nlp=nlp, lang=lang, watned_pos=wp,
                                       meta=('Message', str))

work?

I Tom, thanks for the reply. Just before you wrote I found out I could solve the problem with
df['tagged'] = df['Message'].apply(
    lambda x: process(x, nlp, lang, wp)
    if type(x) == str else '',
    meta=('Message', str))

It seems like @TomAugspurger has provided a solution (Thanks @TomAugspurger !) and I believe we can close. If i'm mistaken please re-open

Just to be clear, this would be a bug, but I'm not able to reproduce it with
import dask.dataframe as dd
import pandas as pd

def f(x, y, z):
    return x + y + z

df = pd.DataFrame({"A": [1, 2]})
ddf = dd.from_pandas(df, 2)

ddf.apply(f, args=(1, 2), axis=1, meta=ddf._meta).compute()


Fix ---V to be -V

Cmdliner accepts everything that is longer than one character as a long option, hence it made -V into ---V long option.
This has been broken since -V was added in https://github.com/ocamllabs/dune-release/commit/809f5391dad64c32d381c550dc56ec4233336b1a, so maybe nobody uses it and it might sense to just remove that option?

The --pkg-version ... option worked all along so I think we can keep it around. It's just the "short" option that was broken.


Unable to install Catalina/Mojave

Hi, I've tried to install first Mojave (because I need  32bitb app support) and it download but after rebooting in the piker it isn't showing up (it show only the recovery and not the installer), after this I've tried with Catalina but I had the same issue, I've correctly set the bios, I've change the next with the official for Mojave from airport repo, I've the SSD partitioned because I need Linux in dual boot (I'm trying to install Mac on FIRST partition of disk)
Thanks for helping

Hi, I've tried to install first Mojave (because I need 32bitb app support) and it download but after rebooting in the piker it isn't showing up (it show only the recovery and not the installer), after this I've tried with Catalina but I had the same issue, I've correctly set the bios, I've change the next with the official for Mojave from airport repo, I've the SSD partitioned because I need Linux in dual boot (I'm trying to install Mac on FIRST partition of disk) Thanks for helping

reference: #90

Hi, I've tried to install first Mojave (because I need 32bitb app support) and it download but after rebooting in the piker it isn't showing up (it show only the recovery and not the installer), after this I've tried with Catalina but I had the same issue, I've correctly set the bios, I've change the next with the official for Mojave from airport repo, I've the SSD partitioned because I need Linux in dual boot (I'm trying to install Mac on FIRST partition of disk) Thanks for helping

reference: #90

Ok thanks it's work!

I have same problem :(


Check HTTP status code in request_stream

Would you like to work on this feature?
yes
What problem are you trying to solve?
The request_stream function doesn't call handle_api_errors as other functions. User can't easily tell whether the returned HTTP body is for an error response or successful response.
Describe the solution you'd like
In request_stream, check the response code. If it's an error, fetch the whole HTTP body, parse the error and return Err.
Describe alternatives you've considered
Include the headers in the returned Ok variant of request_stream.
Documentation, Adoption, Migration Strategy
No response
Target crate for feature
kube-client

Thanks for this. Yeah, this looks wrong to me as well.
Note that the Api::log_stream is a relatively new in its current form; it was updated in #1235 to use use AsyncRead.
We should at the very least get the status (as you say) and bubble up an error here, but i'm unsure if we can just take the body and try to parse it as an ErrorResponse as we do in general in the handle_api_errors fn. Experimentation here would be very much welcome. I'm a bit busy the next coming weeks, so have to leave this open.

I can work on this if you find the solution acceptable.

Yeah, it seems reasonable to me. Thanks a lot!

Fixed in #1433


use "get" instead of "get_local" when determine which protobuf compiler to use

Hello all,
When select the protobuf compiler, rebar uses the get_local api:
Key = rebar_config:get_local(Config, proto_compiler, Default),
So, for every subdirs which uses protobufs, there has to be an explict {proto_compiler, gpb} in rebar.config.
I think for most projects, there will only be one proto compiler in use.
Maybe it's better to use "get" instead of "get_local", so that a {proto_compiler, gpb} in the toplevel rebar.config gets to work.
BTW:
The same issue exists for gpb_opts.

What's the status here?

Nothing new in a very long while, will close and reopen if needed.


AutoSuggestBox text property twoway binding error

Describe the bug
Typing into the AutoSuggestBox text with a binding gives me this error
  <ui:AutoSuggestBox
      x:Name="AdvancedTxtServer"
      Text="{Binding ServerSetup.ServerName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
      OriginalItemsSource="{Binding ServerList}" Icon="{ui:SymbolIcon Empty}"/>

This exception was originally thrown at this call stack:
    Wpf.Ui.Controls.AutoSuggestBox.TextPropertyChangedCallback(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs) in AutoSuggestBox.cs
    System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, ref System.Windows.EffectiveValueEntry, bool, bool, System.Windows.OperationType)
    System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, object, System.Windows.PropertyMetadata, bool, bool, System.Windows.OperationType, bool)
    System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, object)
    MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(object, System.Xaml.XamlMember, object)

To Reproduce
Typing into the AutoSuggestBox text with a twoway binding
Expected behavior
No error
Screenshots

OS version
Windows 11
.NET version
.NET 7.0
WPF-UI NuGet version
3.0.0-preview.5
Additional context
No response

This happens because TextPropertyChangedCallback is static and called before TextBlock is initialized in  OnApplyTemplate.
The solution could be to store initial value in a private field if TextBlock is null and then set TextBlock.Text value to this field in OnApplyTemplate.

This happens because TextPropertyChangedCallback is static and called before TextBox is initialized in  OnApplyTemplate.
From documentation on Text property:
/// <remarks>
/// This property is not typically set in XAML.
/// </remarks>

So probably a NULL check would be sufficient to not get exception there. For workaround, remove that Text binding completely.
Now for your problem, what are you trying to achieve?
If you want to give AutoSuggestBox a default value, that is probably not a good idea.
If you want to set Property in your ViewModel after some option is chosen, that is only possible in code-behind in SuggestionChosen event for now, as far as I discovered:
<ui:AutoSuggestBox
  x:Name="AutoSuggestBox"
  SuggestionChosen="AutoSuggestBox_OnSuggestionChosen" ... />

private void AutoSuggestBox_OnSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args)
{
  ViewModel.ChosenOptionProperty = args.SelectedItem as MyOptionsItemType;
}

Ohhhh, ok, thank you for your very useful response friend. Sorry I missed that! Lol.


 Developers working on projects with many different Go versions could document and manage version switching with simple .go-version files.

Yes, there's already a PR for this (https://github.com/moovweb/gvm/pull/233) but it still has to be merged (ahem: @jbussdieker).

@mcandre GVM2 is now in its first release. Go check it out.


Multiple Destinations

Hi Carlos!
Hope you're doing well. I'm using UI5-tools for a while and found a possible feature request. How we can mix 'Gateway' and 'other' proxies using this server?
Example:
{
  "ui5-tools.server.odataProxy": "Gateway",
  "ui5-tools.server.odataUri": "http://<IP_ADDRESS>:8000/",
  "ui5-tools.server.odataMountPath": "/unifort_ECC"
}

/* {
  "ui5-tools.server.odataProxy": "Other",
  "ui5-tools.server.odataUri": "https://www.receitaws.com.br/",
  "ui5-tools.server.odataMountPath": "/RECEITAWS"
} */

I have to comment/uncomment to use one or another...is there any way to do this?
Best Regards!

Hi!
You can do something like this with the 'Other' configuration, also with command ui5-tools.configurator.odataProvider (alt+c alt+o):
{
  "ui5-tools.server.odataProxy": "Other",
  "ui5-tools.server.odataUri": "http://<IP_ADDRESS>:8000/,https://www.receitaws.com.br/",
  "ui5-tools.server.odataMountPath": "/unifort_ECC,/RECEITAWS"
}

The authentication in the .env should look like this:
UI5TOOLS_ODATA_USER=user1
UI5TOOLS_ODATA_PASSWORD=pass1
UI5TOOLS_ODATA_USER_2=user2
UI5TOOLS_ODATA_PASSWORD_2=pass2

By the way, if you have configured Gateway proxy, odataMountPath is hardcoded to /sap (in the extension code), so i think odataMountPath should look like this:
  "ui5-tools.server.odataMountPath": "/sap,/RECEITAWS"

I hope it works for you!

Hi @CarlosOrozco88 !
Solved using the "Other" proxy, no issues with usage and authentication. Thank you so much!


test(core-pager): rework with redux good practices

This is an example PR for how I think we may want to modify our tests to fit closer with Redux recommendation and paradigms.
The gist here is to:

Stop testing Actions themselves https://redux.js.org/usage/writing-tests#action-creators--thunks
Instead, test the reducer/engine: https://redux.js.org/usage/writing-tests#reducers
Middleware might receive special treatment (tbd): https://redux.js.org/usage/writing-tests#middleware

Back to draft after longer thought.


Battery status

Hello!
I have several shtters which are powered by solar and battery. Is it possible to see the battery status in the API, and could we add it as an object if available?

The adapter shows all information which are available in the app. Are this information visible in the app?

Unfortunately not..thought that it is probably available via API.


[Bug][microTVM] RPC server is flaky on the Arduino Nano 33 BLE

The Arduino support implemented in #8708 works well on a wide variety of boards, but the RPC server sometimes fails only when running on the Arduino Nano 33 BLE. Which and how many tests fail is inconsistent from run to run. It doesn't seem to be a memory error, as the test that allocates a 161024 array will sometimes succeed while the test allocating a 11024 array fails.
Included below are two logs for two runs of test_arduino_rpc_server.py. The verbose log was created by running:
pytest test_arduino_rpc_server.py --microtvm-platforms nano33ble -s --tvm-debug --log-cli-level=debug

nano_33_ble_rpc_verbose.log
The non-verbose one was created by running:
pytest test_arduino_rpc_server.py --microtvm-platforms nano33ble -s

nano_33_ble_rpc.log

The RPC server behaves nicely on a variety of devices, including the Arduino Due, Seeed Wio Terminal, and Sony Spresense. It's just the Nano 33 BLE which has this issue.


Feature/architecture

SonarQube analysis reported 7 issues

 1 critical
 6 minor

Watch the comments in this conversation to review them.


Support printing single hist/lhist/stats values

Is your feature request related to a problem? Please describe.
This is somewhere between a bug and an enhancement as I think it's surprising that this functionality doesn't already exist and is the reason this original issue was created:

https://github.com/bpftrace/bpftrace/issues/3540

At the moment if you have a map that contains multiple hist/lhist/stats types e.g.
BEGIN {
  @a[1] = hist(10);
  @a[2] = hist(100);
}

You can't print just a single one of these histograms e.g. this doesn't work print(@a[1]). And we have now added logic to prevent this in semantic_analyser:

https://github.com/bpftrace/bpftrace/pull/3569

Describe the solution you'd like
Support printing single hist/lhist/stats so that the above example works as expected.
This requires plumbing in both codegen_llvm.cpp and output.cpp as we need probably need reference to the underlying map as well as the lhist/hist/stats value.

@jordalgo
i'm working on a workaround for this, and wanted to get your input on my approach.
it seems we need a reference to the key in addition to the map reference.
while the map reference can be easily stored using the map ID, the challenge is that I'm unsure how to pass the key from codegen_llvm.cpp to the userspace -- as the key is not fixed size.

In the docs we have the following:

Note that maps are printed by reference while scalar values are copied.

Continuing with the example in this issue, I would classify @a[1] as a scalar value. Thus, maybe it makes sense to copy the entire histogram value to userspace?
For variable length blobs, we typically use an FLA. For example, this is how scalar values are printed: https://github.com/bpftrace/bpftrace/blob/e43022c06e395f0a7b721cca000132a349fcb0f9/src/ast/async_event_types.h#L39-L46
The userspace bits know how big the value is from here: https://github.com/bpftrace/bpftrace/blob/e43022c06e395f0a7b721cca000132a349fcb0f9/src/required_resources.h#L97


Code for Arducam 5 Megapixels 1080p camera module OV5642 JEPG

I recently purchased this camera and planning on using it on Arduino Uno but I couldn't find the code for it on this repository. Does anyone know where the sample code could be found?

@pablog2
Hi,
Please refer to this link:
http://www.arducam.com/downloads/shields/ArduCAM_Camera_Shield_Software_Application_Note.pdf
Let us know if you need more help.
Regards,
ArduCAM support team.


small pyusbtool doc improvements

Improves clarity of pyusbtool.py usage for newcomers

Thanks!
I'm hoping that I'll have a new version before event season starts - I'll put a call out for docs and support ideally around the december holiday period.


replaced sle-micro with sle-micro-iso

Hi, when following your https://elemental.docs.rancher.com/quickstart-cli the seedimage always failed to build:
kubectl describe pod fire-img -n fleet-default
  Normal   Pulled     6s    kubelet            Container image "registry.suse.com/suse/sle-micro/5.5:2.0.2" already present on machine
  Normal   Created    6s    kubelet            Created container baseiso
  Warning  Failed     6s    kubelet            Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "busybox": executable file not found in $PATH: unknown

I finally figured it out by following your visual quickstart and comparing the created CRD instances. Creating a seedimage in the UI the baseimage was
registry.suse.com/suse/sle-micro-iso/5.5:2.0.2
compared to your quickstart-cli
registry.suse.com/suse/sle-micro/5.5:2.0.2

@SimonHaas thank you! Good catch.
However, this fix should only apply to the seedimage snippets. The managedosversion ones are correct, as for those we need a container image type (rather than an iso type). May you please revert the change on those? Thank you.


Mutations are not coercing nested z.object

Just tried a quick example with formAction mutations but it seems like the day  prop from the schema below is not coercing as expacted.
const TimeSchema = z.string().regex(/\d{4}/)

 enum WeekDays {
    Sunday = 0,
    Monday = 1,
    Tuesday = 2,
    Wednesday = 3,
    Thursday = 4,
    Friday = 5,
    Saturday = 6
}

const schema = z.object({
  period: z.object({
    day: z.nativeEnum(WeekDays),
    from: TimeSchema,
    until: TimeSchema,
  }),
})

The form sends data correctly and inputFromForm function seems to be loading the data from formData correctly. I think the problem is on getFormValues that only loop through the first level of keys

https://github.com/SeasonedSoftware/remix-forms/issues/18 seems to be related

@wladiston, I think this is not the same as #18 and we can fix this more easily :) I'll keep this issue open and work on it soon. In the meantime, in case you want to try and send a PR, I believe the problem is that shapeInfo does not know about z.nativeEnum.
Thank you for your contribution!

Thanks mate. I’ll give it a go later on the week


Excel object model

Split up the Excel fundamental concepts article:

Move Run options to its own article "Delay ..."
Move blank or null values section to it's own article "Blank ..."
Move requirement sets section to the existing Excel requirements article
Rename fundamental concepts article "Excel object model".

Docs Build status updates of commit 0fab003:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs/excel/excel-add-ins-delay-in-cell-edit.md
:warning:Warning
View
Details

docs/reference/requirement-sets/excel-api-requirement-sets.md
:warning:Warning
View
Details

docs/excel/excel-add-ins-blank-null-values.md
:white_check_mark:Succeeded
View

docs/excel/excel-add-ins-core-concepts.md
:white_check_mark:Succeeded
View

docs/toc.yml
:white_check_mark:Succeeded
View

docs/excel/excel-add-ins-delay-in-cell-edit.md

Line 0, Column 0: [Warning-h1-missing] H1 is required. Use a single hash (#) followed by a space to create your top-level heading.

docs/reference/requirement-sets/excel-api-requirement-sets.md

Line 53, Column 185: [Warning-file-not-found] Invalid file link: '../develop/specify-office-hosts-and-api-requirements.md'.
Line 72, Column 17: [Warning-file-not-found] Invalid file link: '../reference/manifest/requirements.md'.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 6c9086a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/excel/excel-add-ins-blank-null-values.md
:white_check_mark:Succeeded
View

docs/excel/excel-add-ins-core-concepts.md
:white_check_mark:Succeeded
View

docs/excel/excel-add-ins-delay-in-cell-edit.md
:white_check_mark:Succeeded
View

docs/reference/requirement-sets/excel-api-requirement-sets.md
:white_check_mark:Succeeded
View

docs/toc.yml
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


What options works best for you?

There are three options you can specify with lethargy, but I find the defaults works fine. If you think the defaults does not work well for you, please post here to tell us which devices it _doesn't_ work well, and also which settings _does_ work well. Many thanks!

The problem I'm having is that the defaults work really well on MacOS but when I use the same defaults with the same mouse on Windows, it doesn't detect the scrolling as well.
I'm not really sure how I'm going to fix that.

@jwmann How lethargy works should be independent the operating system (OS), however, most macOS users use Apple products (like the Magic Mouse and Trackpads) and they have a different 'profile' than the mouse and trackpads found elsewhere.
Therefore, you might find it useful to try to figure whether the user is using macOS, and use one set of defaults; for other OSes, you can use another set of defaults. Your browser reveals a lot about you - see https://amiunique.org/fp. You may want to use, for instance, window.navigator.platform. Of course, no method of identifying the platform (or user agent, for that matter) is reliable; so your mileage may vary.
At the end of the day, there are no perfect solution that works 100% of the time. The best you can do is make it better.


Feature request - Get the previous way generating parameters back

Hi, is there any way to get the generating of documentation for parameters back where it would fetch everything from the request file and write that itself within one manually writing them?
Thank you.

No, I'm sorry. That feature has been removed, for several reasons. (You can do a search for "FormRequest" in the issues tab to see the discussions.)

Thank you for the reply.

FormRequest support is back in Scribe.😅


Use separate url for profile photo

The data for each profile photo should load separately from the rest of the profile data.

Closing this because it doesn't seem necessary. Especially with pagination working.


Non-primitive types not colorized in Quick Info

HTMLElement isn't colorized but string is.

Closing for housekeeping purposes. The behavior outlined in the OP has been in place for over 14 month now and have not got any updates on this issue. Please file a new issue if an action is required.


Sagemaker training fails with error : UnexpectedStatusException: Error for Training job : Failed. Reason: AlgorithmError: Exception during training: 'PosixPath' object has no attribute 'decode'

I tried following this tutorial. https://medium.com/@kaushaltrivedi/train-and-deploy-mighty-transformer-nlp-models-using-fastbert-and-aws-sagemaker-cc4303c51cf3
The training fails, please see below for the entire stack trace:
2020-02-11 01:09:23 Starting - Starting the training job...
2020-02-11 01:09:25 Starting - Launching requested ML instances......
2020-02-11 01:10:27 Starting - Preparing the instances for training......
2020-02-11 01:11:41 Downloading - Downloading input data...
2020-02-11 01:12:12 Training - Downloading the training image...............
2020-02-11 01:14:53 Training - Training image download completed. Training in progress...Starting the training.
/opt/ml/input/data/training/config/training_config.json
{'run_text': 'ALL_CMNT_CLEAN', 'finetuned_model': None, 'do_lower_case': 'True', 'train_file': 'train.csv', 'val_file': 'test.csv', 'label_file': 'labels.csv', 'text_col': 'ALL_CMNT_CLEAN', 'label_col': 'RPR_ACTN_DS', 'multi_label': 'True', 'grad_accumulation_steps': '1', 'fp16_opt_level': 'O1', 'fp16': 'True', 'model_type': 'roberta', 'model_name': 'roberta-base', 'logging_steps': '300'}
{'train_batch_size': '16', 'warmup_steps': '1000', 'lr': '8e-05', 'max_seq_length': '512', 'optimizer_type': 'adamw', 'lr_schedule': 'warmup_cosine', 'epochs': '10'}
02/11/2020 01:14:56 - INFO - root -   model path used /opt/ml/code/pretrained_models/roberta-base
02/11/2020 01:14:56 - INFO - root -   finetuned model not available - loading standard pretrained model
02/11/2020 01:14:56 - INFO - transformers.tokenization_utils -   Model name '/opt/ml/code/pretrained_models/roberta-base' not found in model shortcut name list (roberta-base, roberta-large, roberta-large-mnli, distilroberta-base, roberta-base-openai-detector, roberta-large-openai-detector). Assuming '/opt/ml/code/pretrained_models/roberta-base' is a path, a model identifier, or url to a directory containing tokenizer files.
Exception during training: 'PosixPath' object has no attribute 'decode'
Traceback (most recent call last):
File "/opt/ml/code/train", line 138, in train
PRETRAINED_PATH, do_lower_case=bool(training_config["do_lower_case"])
File "/opt/conda/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 309, in from_pretrained
return cls._from_pretrained(*inputs, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 339, in _from_pretrained
if os.path.isfile(pretrained_model_name_or_path) or is_remote_url(pretrained_model_name_or_path):
File "/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py", line 143, in is_remote_url
parsed = urlparse(url_or_filename)
File "/opt/conda/lib/python3.7/urllib/parse.py", line 367, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
File "/opt/conda/lib/python3.7/urllib/parse.py", line 123, in _coerce_args
return _decode_args(args) + (_encode_result,)
File "/opt/conda/lib/python3.7/urllib/parse.py", line 107, in _decode_args
return tuple(x.decode(encoding, errors) if x else '' for x in args)
File "/opt/conda/lib/python3.7/urllib/parse.py", line 107, in
return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 'PosixPath' object has no attribute 'decode'
2020-02-11 01:15:05 Uploading - Uploading generated training model
2020-02-11 01:15:05 Failed - Training job failed

UnexpectedStatusException                 Traceback (most recent call last)
 in ()
----> 1 estimator.fit(s3_input)
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/estimator.py in fit(self, inputs, wait, logs, job_name, experiment_config)
462         self.jobs.append(self.latest_training_job)
463         if wait:
--> 464             self.latest_training_job.wait(logs=logs)
465
466     def _compilation_job_name(self):
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/estimator.py in wait(self, logs)
1060         # If logs are requested, call logs_for_jobs.
1061         if logs != "None":
-> 1062             self.sagemaker_session.logs_for_job(self.job_name, wait=True, log_type=logs)
1063         else:
1064             self.sagemaker_session.wait_for_job(self.job_name)
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/session.py in logs_for_job(self, job_name, wait, poll, log_type)
3001
3002         if wait:
-> 3003             self._check_job_status(job_name, description, "TrainingJobStatus")
3004             if dot:
3005                 print()
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/session.py in _check_job_status(self, job, desc, status_key_name)
2595                 ),
2596                 allowed_statuses=["Completed", "Stopped"],
-> 2597                 actual_status=status,
2598             )
2599
UnexpectedStatusException: Error for Training job nls-ntf-2020-02-11-01-09-23-620: Failed. Reason: AlgorithmError: Exception during training: 'PosixPath' object has no attribute 'decode'
Traceback (most recent call last):
File "/opt/ml/code/train", line 138, in train
PRETRAINED_PATH, do_lower_case=bool(training_config["do_lower_case"])
File "/opt/conda/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 309, in from_pretrained
return cls._from_pretrained(*inputs, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 339, in _from_pretrained
if os.path.isfile(pretrained_model_name_or_path) or is_remote_url(pretrained_model_name_or_path):
File "/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py", line 143, in is_remote_url
parsed = urlparse(url_or_filename)
File "/opt/conda/lib/python3.7/urllib/parse.py", line 367, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
File "/opt/conda/lib/python3.7/urllib/parse.py", line 123, in _coerce_args
return _decode_args(args) + (_encode_result

I am getting a similar error message:
02/13/2020 16:16:53 - INFO - root -   model path used /opt/ml/code/pretrained_models/roberta-base 02/13/2020 16:16:53 - INFO - root -   finetuned model not available - loading standard pretrained model 02/13/2020 16:16:53 - INFO - transformers.tokenization_utils -   Model name '/opt/ml/code/pretrained_models/roberta-base' not found in model shortcut name list (roberta-base, roberta-large, roberta-large-mnli, distilroberta-base, roberta-base-openai-detector, roberta-large-openai-detector). Assuming '/opt/ml/code/pretrained_models/roberta-base' is a path, a model identifier, or url to a directory containing tokenizer files. Exception during training: 'PosixPath' object has no attribute 'decode' Traceback (most recent call last):   File "./train", line 138, in train     PRETRAINED_PATH, do_lower_case=bool(training_config["do_lower_case"])   File "/opt/conda/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 309, in from_pretrained     return cls._from_pretrained(*inputs, **kwargs)   File "/opt/conda/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 339, in _from_pretrained     if os.path.isfile(pretrained_model_name_or_path) or is_remote_url(pretrained_model_name_or_path):   File "/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py", line 143, in is_remote_url     parsed = urlparse(url_or_filename)   File "/opt/conda/lib/python3.7/urllib/parse.py", line 367, in urlparse     url, scheme, _coerce_result = _coerce_args(url, scheme)   File "/opt/conda/lib/python3.7/urllib/parse.py", line 123, in _coerce_args     return _decode_args(args) + (_encode_result,)   File "/opt/conda/lib/python3.7/urllib/parse.py", line 107, in _decode_args     return tuple(x.decode(encoding, errors) if x else '' for x in args)   File "/opt/conda/lib/python3.7/urllib/parse.py", line 107, in <genexpr>     return tuple(x.decode(encoding, errors) if x else '' for x in args) AttributeError: 'PosixPath' object has no attribute 'decode'
Any help would be appreciated

I managed to run the example by changed line 114 of the train file in container/bert from:
PRETRAINED_PATH = Path(pretrained_model_path) / training_config["model_name"]
to:
PRETRAINED_PATH = pretrained_model_path + '/' + str(training_config["model_name"])
seems like urlparse doesn't like being sent a PosixPath but can deal with a String.


Use the same types in for statements.

This removes lots of simple compiler warnings on 'signed' and 'unsigned'
comparisons (reported in #128). Please note that there are two types of
changes. It is because this does not change any function signatures.

In most cases: int --> size_t.
In lookup_table_op.cc, string_to_number_op.cc, and
sparse_tensor.h: size_t --> int.

Can one of the admins verify this patch?

FYI, the number of lines of output: 32552 --> 17670 (As of today).
This is not enough to close #128 . This is just a sub PR for #128 .

@tensorflow-jenkins: test this please

Merged

Thank you for merging, @vrv .


Adjustments to footer.

Content is now passed to the component.
Attempted to do this through a tuple with element and array of items, thought it was clean syntax wise and little runtime cost.
Also added a color, linkAccent, which I think could be valuable for some higher contrast links.

Code looks good!


Fixed an issue where for some reasons events.constructor isn't the same as Array on firefox, but is on chromium

Fetching the events for the start page via MagisterApi.events(), returns an array or null.
However, when checking if it is an array via events?.constructor === Array it somehow results in false on Firefox, but results in true on chromium. Meaning that the today page always shows an error on Firefox, even if it shouldn't.
I replaced the content inside the if statement with !events || !Array.isArray(events), which does work on both chromium and firefox.

Not quite sure how, but we managed to make the exact same fix at about the same time. To ensure you get credit, I'll merge this as soon as my changes have gone into the main branch (I make my changes on the dev branch exclusively). Thank you so much!


⚠ 366.ru has degraded performance

In 896ba9e, 366.ru (https://366.ru) experienced degraded performance:

HTTP code: 200
Response time: 1803 ms

Resolved: 366.ru performance has improved in c24bdfe.


Mac binary Release

What is Happening
Linux binary isn't mac compatible, mac users will need to run using jre version while I'm not able to generate a Mac release

While it don't get real:

Run DPS using docker  #342
See the latest jar release which is cross platform
Upvote #315 for a simplified jar run

Depends on #359

The release is out but getting an issue related to java net
log.log

Actually this issue is not needle to run DPS see this doc for the howto. I will put it back into the backlog, if people consider this an important feature then upvote this issue.


[messages,flags] Shrinkify vcpkg-tool

I was bored on the bus, so I decided to play around with making the vcpkg binary smaller. Tested on an ARM64 macbook:
# Windows ARM64
6'241'792 vcpkg.exe       # -0
6'203'904 sc-vcpkg.exe    # -38K
5'200'384 os-vcpkg.exe    # -1.04M
5'170'688 os-sc-vcpkg.exe # -1.07M

# macOS ARM64
2'695'538 vcpkg       # -0
2'675'234 sc-vcpkg    # -20K
2'669'826 os-vcpkg    # -26K
2'645'730 os-sc-vcpkg # -50K

Both together result in a binary size reduction of 17% on Windows, and 1.8% on macOS (obviously not as big of a deal, but still a 50K reduction)

CI is failing (1) because of a clang-format needed and (2) because this change causes x-generate-default-message-map to crash.

@strega-nil @strega-nil-ms  Are you still working on this one?

Closing as I am no longer on the team.


(feat): Add Avatar Toggle

Checklist

[x] I ran npm test locally and it passed without errors.
[x] I acknowledge that all my contributions will be made under the project's license.

Description
Add a feature to change from showing colored squares to showing (tiny) GitHub avatars by pressing "A" or by clicking a button .
Related issues
List any related issues here

Hi @dkundel
Thanks for the feedback. I did a fast-forward to the latest version of master and reapplied my changes.
I also run prettier to ensure that I follow the code style.
(incidentally there's a code style problem in dangerfile.js, but I chose not to fix that as part of this commit.)
Please let me know if you pick up any other problems.
The contributions have been a pleasure. I hope they materialise in swag at the end of the month :D


Extend support to Amazon App Store

If I am offering my app on the Amazon App Store (for Android Apps), does this plugin support it and if not are there guidelines to extend this to support that app store?
Thank you.

It does not support it as of today. I have no current plans to add it in as it is very complicated and tedious to support more platforms fully.

Is there a way to add Amazon to the CrossInAppBilling.IsSupported flag then so it doesn't try to make an IAP and crash?
Thanks

I would probably put this check in your code and don't allow Amazon devices to do IAPs... would be my thought.

I ended up doing a device manufacture check and put up an alert saying not supported. However, that apparently doesn't work with Amazon guidelines. They rejected the app. This is what I had, they are saying there shouldn't be any error. I guess I will just have to take it out completely?

What I have done in the past is create 2 versions of my app. 1 for google and one for amazon. Then i conditionally compile the code needed for IAP so you can then bring in their API directly.


Implement defocus for crystal ideal configuration

We've explored two options to defocus

Bring the detector in at fixed radius of curvature (hence smaller image)
Bring the detector in at fixed image size (hence larger radius of curvature)

(1) seems to move the detector south quicker while (2) has the advantage of moving the crystal/detector assembly eastward


what kind of expression should be put in subscribe(self, topic, callback, expression='*')

I want to use SQL in expression to filter message properties when consuming messages, but it seems that I cannot get the messages I want.
I put "Tag=test AND creator=xx" in expression and I want to filter messages with tag test and property {creator=xx}. How should I get this done?

It only supports "||" in expression at present.

thanks, do you plan to support others in the future?

There is no plan in the c++ client. Maybe you can look at the new client project.


StructuredData was missing NILVALUE on RFC 5424 serializer

When StructuredData is missing, as per RFC, a NILVALUE should be included.
RFC 5424 Section 6: https://tools.ietf.org/html/rfc5424#section-6
STRUCTURED-DATA = NILVALUE / 1*SD-ELEMENT
Also found here on brocade.com:
* STRUCTURED-DATA — This provides a mechanism to express information in a well-defined and interpretable data format as per RFC 5424. STRUCTURED-DATA can contain zero, one, or multiple SD elements. In case of zero structured data elements, the STRUCTURED-DATA field uses NILVALUE.

http://www.brocade.com/content/html/en/configuration-guide/fastiron-08040-monitoringguide/GUID-88F338BA-B7BF-485C-B1DE-7418710452A6.html
For that reason, it is to my understanding that a completely 'empty' but valid message would look like:
<0>1 - - - - - -
This PR closes issue: bruno-garcia/SharpSyslogServer#6

You are touching many lines unrelated to this issue (like creating new method).
Why do not use simple if/else statement around SD data block?

That method was already huge so I extracted SD to its own private method but surely the private method is not necessary.
What has to be added is simply:
var structuredData = message.StructuredDataElements.ToList();
if (structuredData.Any())
{
     ...
} else {
     writeStream(stream, Encoding.ASCII, " ");
     writeStream(stream, Encoding.ASCII, NilValue);
}

You would prefer that?

I personally prefer that commit description exactly matches it's content (eg no refactoring for code not changed by you).
However I'm not a repository owner/committer so my opinion may not matter.

hi, sorry for the late response. I'm with @nE0sIghT on that one, can you change it to the bare minimum?

@grubman New commit with the requested changes.


complete CreateKey_napi 、Encrypt_napi、Decrypt_napi、GenerateDataKey_napi

currently it can support the below REST API cmds:
POST <ehsm_srv_address>/ehsm?Action=CreateKey
POST <ehsm_srv_address>/ehsm?Action=Encrypt
POST <ehsm_srv_address>/ehsm?Action=Decrypt
POST <ehsm_srv_address>/ehsm?Action=GenerateDatakey
test: passed the unit-test
run the script: python test_aes.py

need to add "apt install libjson-c-dev" anywhere?

need to add "apt install libjson-c-dev" anywhere?

OK. Seems it not used in this commit.


Added PT-BR localization

Added all the strings for PT-BR based on the English localization file. Just to confirm: pl_BR is the correct Language ID for PT-BR? It was the one used in the original localization so I left it as is.

thanks for your help!

I think I've made a mistake when I created whose files, thanks for pointed that out, pt_br is the right one.


Staging for version increment automation

Description
This is the staging PR for to execute workflows that auto raise the version increment PR's
Example: https://github.com/prudhvigodithi/observability/pull/1
Issues Resolved
Part of: https://github.com/opensearch-project/opensearch-build/issues/1375
From solution: https://github.com/opensearch-project/opensearch-build/issues/1375#issuecomment-1159476686
Related issue: https://github.com/opensearch-project/observability/issues/834
Check List

[ ] New functionality includes testing.

[ ] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #848 (5673058) into main (bf98d97) will increase coverage by 14.64%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##               main     #848       +/-   ##
=============================================
+ Coverage     57.22%   71.87%   +14.64%
  Complexity      291      291
=============================================
  Files           258       42      -216
  Lines          8503     2311     -6192
  Branches       1842      240     -1602
=============================================
- Hits           4866     1661     -3205
+ Misses         3461      509     -2952
+ Partials        176      141       -35

Flag
Coverage Δ

dashboards-observability
?

opensearch-observability
71.87% <ø> (ø)

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

Impacted Files
Coverage Δ

...fig_panes/config_controls/config_chart_options.tsx

...ts/notebooks/components/helpers/default_parser.tsx

...r/events_views/json_code_block/json_code_block.tsx

...s/event_analytics/redux/reducers/fetch_reducers.ts

...trace_analytics/requests/traces_request_handler.ts

...analytics/components/dashboard/dashboard_table.tsx

...isualizations/charts/financial/gauge/gauge_type.ts

...lytics/components/dashboard/latency_trend_cell.tsx

...components/visualizations/charts/bubble/bubble.tsx

...ponents/event_analytics/explorer/sidebar/field.tsx

... and 206 more

Continue to review full report at Codecov.

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

Referred old version increment PR:
https://github.com/opensearch-project/observability/pull/785

Renaming to task updateVersion following https://github.com/opensearch-project/opensearch-plugin-template-java/pull/32.

Hey @anirudha @joshuali925 can you please take a look.
Thank you


ESP32: Read General Diagnostics cluster attribute at runtime

Problem

Actual value from the platform is not populated at runtime for General diagnostics attributes.

Change overview

Read General Diagnostic attributes from a platform at runtime

Testing

All clusters app is compiled and checked using python controller.

@andy31415 @msandstedt PTAL


Support Arabic and RTL in Tensorflow documentation

As suggested by @lamberta, I am creating this issue to gather information about the extent to which Tensorflow website supports Arabic and RTL (Right to left) layout in general.
In fact, I started translating two of Tensorflow's tutorials into Arabic with the following two PRs:

https://github.com/tensorflow/docs-l10n/pull/121
https://github.com/tensorflow/docs-l10n/pull/122

Knowing that Google Colab, like jupyter notebooks, supports html tags, I used them to ensure that the RTL text is displayed correctly, while keeping the LTR (left to right) layout for everything else in the tutorial, since the code needs to be LTR. Which results in a correct page layout as you can see in the following two notebooks rendering from the above two PRs:

https://colab.research.google.com/github/abjed/docs-l10n/blob/ar-quickstart/site/ar/tutorials/quickstart/beginner.ipynb
https://colab.research.google.com/github/abjed/docs-l10n/blob/ar-quickstart-advanced/site/ar/tutorials/quickstart/advanced.ipynb

Opening these notebooks in https://nbviewer.jupyter.org/ , which renders the notebook to html,  shows that the RTL layout defined by wrapping the Arabic text with

 works as intended. As you can see in the following link:

https://nbviewer.jupyter.org/github/abjed/docs-l10n/blob/ar-quickstart/site/ar/tutorials/quickstart/beginner.ipynb

So, my questions, are:

Does the pipeline that generates the tutorials from the notebooks preserves these HTML tags, and displays them correctly (we might need to do an experiment)?
If not is there an alternative to support Arabic (RTL) properly?

Thanks.

Thanks @mohamed-ali
Just making a note to test wrapping Markdown text within a
 since I think this doesn't work in some Markdown parsers (for the site?)

@lamberta I understand that wrapping the markdown with

 could disable the markdown parser on the wrapped text. However, for a first version, having an understandable/readable content with the correct display is more important than minor styling. Also, as an arabic reader, a text mixing RTL and LTR words, if not properly displayed loses all meaning.
In the other hand, most of stylings impacted with the

 workaround can be replaced with standard html alternatives very easily, here are some examples:
Links
[Tensorflow website](https://www.tensorflow.org/)

is equivalent to
Tensorflow website

Code
`tf.Keras`

is equivalent to
tf.Keras

etc.
So I suggest we move forward and do an initial experiment with these html workarounds.
We can always improve iteratively in the future.
@lamberta  What do you think?

having an understandable/readable content with the correct display is more important than minor styling.

It will break elements like lists. Also, among our preprocessing steps, we use backticks around code symbols to auto-link to the corresponding API reference page.
I support adding right-to-left support, but we need to investigate where in the pipeline this should be added. Requiring Arabic community contributors to know when to use this particular element vs something else is too much---which will lead to more bugs filed when pages don't render as intended.

I suggest we move forward and do an initial experiment with these html workarounds. We can always improve iteratively in the future.

I agree that we will need to iterate. Unfortunately, due to the COVID-19 situation, we are working on this feature request as time allows. See Martin's message. Thanks

@lamberta  It seems that there is an easier alternative to achieve correct RTL display: The layout can be fixed as a post-processing using the following CSS.
p, ul, ol, h1, h2, h3, h4, h5, h6 {
  direction: rtl;
}

This has the added advantage of keeping the current pipeline with all its features, that you described, intact.
I tried these rules on the live website https://www.tensorflow.org/tutorials/keras/classification and it changes the relevant page sections to RTL properly.

If it's possible to add a custom css file per language then the problem should be easy to solve.

Ah, that is interesting. Good one
I've filed an internal issue (b/151835181) to communicate with the site infra and Colab teams to see if we can decide on the "right" solution for this.
If we add the CSS for the site, do any browser display settings kick in on COlab if it detects a locale or anything?

If we want to, it is possible to add a logic that loads the rtl file when the user is accessing the website from a country that requires RTL.
I also checked on colab, the same css rules as above work
p, ul, ol, h1, h2, h3, h4, h5, h6 {
  direction: rtl;
}

Here is the original link https://colab.research.google.com/notebooks/intro.ipynb, and here's how it looks with the css corrections:

To help colab load the css rtl, we can send a hint  as url parameter in the GET request , for example:
https://colab.research.google.com/notebooks/intro.ipynb&dir=rtl
Any other way to detect the language or locale of the text can also be used to decide whether or not to load the RTL css file.

Ok, the site infra for tensorflow.org should already support this (though we need to test).
Colab does not support RTL but there is a feature request (b/110534608) and I'll bump that.
So, for now, let's add a notebook without rtl divs or CSS to see where we're at. And then work on some of the underlying infra issues before adding workarounds (which may complicate our docs pipeline).

Ok, new plan ...
At this time, there are no plans for Colab to support the "toggle rtl layout" preference that Jupyter currently has. So:

ar/ notebooks will need to wrap all text cells in
. This seems to render the inner Markdown and HTML content correctly in both Colab and Jupyter.
We need to add support to our docs pipeline to strip these divs before building the HTML for the site. The site should currently work as-is.

Will not be using CSS or URL params.

That's great.
Few clarifications about the notebooks linked above which are rendered from the two PRs I put in the issue description:
Links don't seem to be rendered correctly:
[something](https://somelink.com)

Therefore, I wrapped them with
something

Code doesn't render
`tf.Keras`

Therefore, I used
tf.Keras

The code isn't  mandatory, it  can be kept as is. However rendering links correctly is useful.
Potential solution:

Strength colab's ability to render these tags even within

I can push a PR to the pipeline to convert the tags html back to their markdown counterparts before preparing the website. They can remains in the notebooks for correct rendering.

We can use this PR to test the above plan: https://github.com/tensorflow/docs-l10n/pull/121

My tests in Colab show the following renders correctly in a text cell. Are you seeing something different? ...

* Foo
* [Bar](http://localhost)
* `tf.keras`

As mentioned, among our preprocessing steps, we use backticks around code symbols to auto-link to the corresponding API reference page. Aside from adding the wrapping
 formatting should remain consistent with the source-of-truth. Since these notebook are rendered in a few places, the priorities are: 1. tensorflow.org, 2. Colab, 3. Jupyter, 4. GitHub preview.

@lamberta You are right, what your example renders correctly

* Foo
* [Bar](http://localhost)
* `tf.keras`

However, it doesn't render correctly without the whitespace, as follows:

* Foo
* [Bar](http://localhost)
* `tf.keras`

@lamberta  I updated the PR https://github.com/tensorflow/docs-l10n/pull/121 to remove all the use of html except

. Can we use it to test the output?

Yes, looks good. Thanks
I tagged in @baheytharwat to review that notebook. Once merged, we can use that to test. We still need to add functionality on our side, though.

This is now live: https://www.tensorflow.org/tutorials/quickstart/beginner?hl=ar

Great! Thanks, Yash.
And congrats to @mohamed-ali , @baheytharwat , and @tayciryahmed . I look forward to seeing the community grow

It's great to see the results. Thanks @lamberta and @yashk2810 for your assistance in bringing this to life.
Thanks @baheytharwat  and @tayciryahmed

No problem :)
Keep those PR's coming!


Support patch serials produced by git format-patch

The git format-patch command, when issued with the --stdout option, produces a single file whose contents resemble a sequence of patches.
This is very useful for showing a very big patch as a sequence of small changes.
It would be nice if dreditor could handle showing this for review.
See https://drupal.org/node/2159051#comment-8377959 for an example.

Dreditor is being decommissioned due to the lack of availability of current maintainers and the fact that Drupal.org is becoming more feature rich at a much faster rate than Dreditor itself now.
This decision was also partially made due to the amount of work (complete rewrite) it would take to create an "official" Firefox extension (#256).
If you already have the extension installed, it should continue working for a while until, inevitably,  the markup on Drupal.org changes. It will no longer be updated.
We understand that many of you love this extension, as do we. This isn't the end, in fact, it's a much brighter beginning. All the things we love about Dreditor can, and should, be moved into Drupal.org natively.
For more information, please follow: https://www.drupal.org/node/2779729

This issue was moved to dreditor/dreditor#38


Beryllium refactor

Beryllium builds without issues, but doesn't seem stable.
Changes have been made to dsdt to make it buildable with the current folder structure.

Probably need to adapt to the latest layout


How does AlphaFold2 determine the protonation state/hydrogen

Hi! I'm working on projects related to protonating the protein under a specific pH. I found outputs of AlphaFold2 prediction contain hydrogens in the model and I wonder how AlphaFold2 determines the protonation state of residues?
I traced back to the feature of AlphaFold2 used for training and found in the Nature paper it says "one is atom37 where each heavy atom ... The other representation we employ is called atom14 ... 14 is chosen because it is the maximum number of heavy atoms for any standard amino acid." But I found in the feature map from intermediate files that there are features for hydrogen atoms.
So I wonder if AlphaFold2 predicts positions of hydrogen atoms by training on datasets with existing hydrogens? If so, how are those hydrogens determined in the training set? If not, how is positions of hydrogens determined.
(I also tested some predictions for systems like 1NVG, the protonation state around the Zn center is not correct.)

Hi @shaoqx and thank you for the question. AlphaFold2 is not aimed at protonation state prediction; however hydrogens could be introduced during the relaxation (energy minimisation) step; they are aimed at improving overall geometrical quality of the predicted model. I suggest to ignore these predicted hydrogens for the sensitive applications like you have described. Sorry about the confusion.


Log HTTP Listener errors as warnings

Purpose

HTTP listener errors should not be logged as errors, since the listener will not be stopped after an error.
Remove old, redundant (commented out) files.

Fixes #18435
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[x] Read the Contributing Guide
[ ] Required Balo version update
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

Merging #18446 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #18446   +/-   ##
=======================================
  Coverage   15.15%   15.15%
=======================================
  Files          48       48
  Lines        1254     1254
  Branches      197      197
=======================================
  Hits          190      190
  Misses       1050     1050
  Partials       14       14

Continue to review full report at Codecov.

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


frozen-abi: Remove proc_macro_hygiene featurization

Problem
There's still usage of an additional proc_macro_hygiene feature in frozen-abi and a few of its dependencies, but the issue referenced in the comment, https://github.com/solana-labs/solana/issues/11055, has been long resolved.
Summary of Changes
I'm not sure if this is OK, but I wanted to get the discussion started with a simple PR to remove this usage everywhere. If I'm missing something, I'll be happy to close the PR!
Fixes #

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

Project coverage is 81.8%. Comparing base (ce34f3f) to head (53482ad).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master     #109     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%
=========================================
  Files         838      838
  Lines      225941   225941
=========================================
- Hits       184945   184926     -19
- Misses      40996    41015     +19

just curious, did you encounter some problems because of the remove d code?

No issue, I noticed it while reviewing https://github.com/solana-program/address-lookup-table/pull/7 and wondered if it was still needed. Thanks for the review!


data-srcset in img and amp-img

To rewrite amp-img srcset the parameter pagespeed UrlValuedAttribute amp-img  src image; is needed.
In fact, i think that any UrlValuedAttribute element attribute image that have src,srcset or data-srcset get rewrited.
Solves #1608 in nginx and #1849.

Hi @jmarantz
Added install/mod_pagespeed_test/image_rewriting/data-srcset.html
In this https://github.com/apache/incubator-pagespeed-mod/blob/master/pagespeed/automatic/system_test.sh added run_test rewrite_images_datasrcset
And in this one https://github.com/apache/incubator-pagespeed-mod/blob/master/pagespeed/automatic/system_tests/responsive_images.sh to cover  added a new: test start_test rewrite_images_datasrcset can rewrite data-srcset itself
Hope this work.
For the amp-img need to put this UrlValuedAttribute amp-img src image; in config file, but can´t find the file to put it.

Lofesa, are you able to run the integration tests locally? WDYT of adding a unit-test as well?
I noticed also that you have a test for "data-srcset" but I don't see a config update to look for that attribute (e.g. with UrlValuedAttribute) nor do I see that attribute as an html standard on a web search.  It does look like it's used as an ad-hoc placeholder in some JS libraries, but I don't know if we should hard-code for that. It probably doesn't do any harm, but I just wanted to bring that up. Thoughts?

Lofesa, are you able to run the integration tests locally? WDYT of adding a unit-test as well?

I have it run in production here.
You can see data-srcset and amp-img srcset got rewrited. (the amp version is url/?amp).

I noticed also that you have a test for "data-srcset" but I don't see a config update to look for that attribute (e.g. with UrlValuedAttribute) nor do I see that attribute as an html standard on a web search. It does look like it's used as an ad-hoc placeholder in some JS libraries, but I don't know if we should hard-code for that. It probably doesn't do any harm, but I just wanted to bring that up. Thoughts?

My approach to this is: If you have a image element ( such as UrlValuedAttribute amp-img src image) this element maybe (or not) to have a srcset or a data-srcset, if it have it must be rewrittten.
I think that data-srcset is a standard "de facto", some JS libraries and other tools use it to lazyload images , in fact pagespeed uses other attribute to lazyload images that is less ussed. Why don´t help people that use data-srcset to get their images optimized?
With a long look, all this should be reconsidered, as soon browsers will use the attribute loading = "lazy" to lazyload images (In fact the lazysizes library has now an option to don´t fire if the attribute is set and the brownser can lazyload images)
Then the lazyload_images filter (as well all these JS libraries and tools) will be unnecessary, limiting itself to adding said attribute to the images f it is not added by the default by  CMS or other web development tools.

RE "I ran it in production" -- awesome! I believe it works. However I still hope we can maintain good software engineering discipline and have unit and integration tests that we validate are working as well, so that we ensure it stays working across future changes.
I think it's possible our unit-tests are run in CI but maybe not our integration tests,. @oschaaf can you remind me? It will also benefit you a lot to be able to run them locally for iteration.
RE "data-srcset" is defacto standard; I'm OK with that, especially as it's unlikely for it to be present in html for some other purpose. @oschaaf WDYT?
RE this whole flow being obsolete in favor of browsers directly supporting lazy...what do you recommend with respect to this PR?

Hi @jmarantz
Well.... I'm not a developer but I learn, more or less. I do not know if I would like to develop a unit test but everything is to start. Where to start?
RE:but maybe not our integration tests
I think yes as far as these messages are in the log:
TEST: rewrite_images_datasrcset can rewrite data-srcset itself
RE:what do you recommend with respect to this PR?
I think this PR should be merged because until the new functionality is present in all, or most, browsers will spend a lot of time and while people will continue to use data-srcset.
But preemptively you have to go thinking about what happens with the filter lazyload_images and their implications.
P.S: Sorry for my bad english.

No worries -- let's start slow, and I really appreciate you pushing the product forward in all the ways you do! Happy to help.
1st: can you compile and run locally to test at all? There are instructions on setting up a development environment and running unit tests here:  https://www.modpagespeed.com/doc/build_mod_pagespeed_from_source
In general, when modifying a source file foo.cc, there'll be a unit-test foo_test.cc in the same directory. So for this change it would be https://github.com/apache/incubator-pagespeed-mod/blob/master/net/instaweb/rewriter/image_rewrite_filter_test.cc . That file is a little big and scary but you don't need to know all of it as you are only replicating similar functionality to what already exists, you can similarly replicate the test, which is ImageRewriteTest.ImgSrcSet on line https://github.com/apache/incubator-pagespeed-mod/blob/1a64c0e356f7969dff748ece6b8d11b5aa123d48/net/instaweb/rewriter/image_rewrite_filter_test.cc#L1332
Just take that test-block and copy it to a new one, change the attribute name and expected result, and you should be good to go.
The hardest part by far of this will be setting up your dev environment to run the tests. Once you have that set up I think this will be fairly easy to add a unit-test for.

@jmarantz re: testing
CI runs build_release.sh:

This runs pagespeed_automatic_test and mod_pagespeed_test in various configurations.
Then it builds the mod_pagespeed package, installs it, and runs the system tests in multiple configurations

RE: data-srcset
I'm +1 on as-is regarding data-srcset.
@Lofesa this LGTM, but I think we can condense/simplify the code a bit. That would be great to include before merging this. Let's sync up on Slack to get that sorted.

Hi @jmarantz
I run pagespeed_automatic_test locally and only get one test fail, but this test will fail in  a plain new cloned repo:
[ FAILED  ] InprocessShm/SharedMemStatisticsTestTemplate/0.TestHistogramRender, where TypeParam = net_instaweb::(anonymous namespace)::InProcessSharedMemEnv
All test i have added are ok:
[----------] 141 tests from ImageRewriteTest
[ RUN      ] ImageRewriteTest.ImgTag
[       OK ] ImageRewriteTest.ImgTag (73 ms)
[ RUN      ] ImageRewriteTest.ImgSrcSet
[       OK ] ImageRewriteTest.ImgSrcSet (17 ms)
[ RUN      ] ImageRewriteTest.ImgDataSrcSet
[       OK ] ImageRewriteTest.ImgDataSrcSet (17 ms)
[ RUN      ] ImageRewriteTest.ImgAmpSrcSet
[       OK ] ImageRewriteTest.ImgAmpSrcSet (17 ms)

RE: when it is serving Amp, and maybe it should rewrite amp-img
But not. The only way the amp-img is rewrited is with
UrlValuedAttribute amp-img src image
whitout this PR only the src is rewrited, with this PR src and srcset get writed.

@Lofesa this LGTM, but I think we can condense/simplify the code a bit. That would be great to include before merging this. Let's sync up on Slack to get that sorted.

Well.... I make this doble if cause at first they are out of the if loop that iterates trougth the attributes of a element and need to ask for both (srcset and data-srcset). Now that are in to the loop can be simplified, sure

@Lofesa

I run pagespeed_automatic_test locally and only get one test fail, but this test will fail in a plain new cloned repo:

Are you running the tests as root?

Well.... I make this doble if cause at first they are out of the if loop that iterates trougth the attributes of a element and need to ask for both (srcset and data-srcset). Now that are in to the loop can be simplified, sure

great!

Are you running the tests as root?
No, i have a builder user. Don´t build nothing as root.
I´ve edited my latest post with a swchit case but don´t know if these use is possible in c++

@oschaaf
Perhaps some like this?:
HtmlElement::Attribute* srcset[0] = element->FindAttribute(HtmlName::kSrcset);
HtmlElement::Attribute* srcset[1] = element->FindAttribute(HtmlName::kDataSrcset);

for (int i = 0; i == 1; i++){
     if (srcset[i] != nullptr){
	BeginRewriteSrcSet(element, srcset[i]);
     }
}

I misread the code earlier, we're not in the loop that iterates the attributes when we start rewrites of the srcsets. Sorry about the noise, that is fine to leave as-is.
Thanks for adding the tests!

But now the rewrite of srcset and data-srcset is behind the loop and we can simplify the double if.
We can use the if .. else, the for...if or use the ternary operator.
Personally prefer the ternary operator, less lines = simply to read.

I close and reopen this PR cause the build had failed when contacting to ppa ubuntu

@Lofesa just tested this in my machine and it works fine there as well, awesome.
I did also try it with this modification, which worked too:
oschaaf@burst:~/code/incubator-pagespeed-mod$ git diff
diff --git a/net/instaweb/rewriter/image_rewrite_filter.cc b/net/instaweb/rewriter/image_rewrite_filter.cc
index 10bfca442..8d0fa1153 100644
--- a/net/instaweb/rewriter/image_rewrite_filter.cc
+++ b/net/instaweb/rewriter/image_rewrite_filter.cc
@@ -2134,18 +2134,15 @@ void ImageRewriteFilter::StartElementImpl(HtmlElement* element) {
         continue;
       }
     }
-
     BeginRewriteImageUrl(element, attributes[i].url);
-
-
-    HtmlElement::Attribute* srcset = element->FindAttribute(HtmlName::kSrcset);
-    HtmlElement::Attribute* datasrcset = element->FindAttribute(HtmlName::kDataSrcset);
-    if (srcset != nullptr) {
-           BeginRewriteSrcSet(element, srcset);
-    } else if (datasrcset != nullptr) {
-           BeginRewriteSrcSet(element, datasrcset);
-    }
-
+  }
+
+  HtmlElement::Attribute* srcset = element->FindAttribute(HtmlName::kSrcset);
+  HtmlElement::Attribute* datasrcset = element->FindAttribute(HtmlName::kDataSrcset);
+  if (srcset != nullptr) {
+    BeginRewriteSrcSet(element, srcset);
+  } else if (datasrcset != nullptr) {
+    BeginRewriteSrcSet(element, datasrcset);
   }
 }

That is a little bit more efficient as we won't be calling FindAttribute() in a loop.
It may be hypothetical, but I think this may also fix an issue if there are no image-valued attributes (because we will not enter the loop in that case)
WDYT?

Hi @oschaaf
I think the loop is needed or we need a double if w/o the else if. Why? Think in an img element, this may have this structure:
<img width="1280" height="720" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="attachment-full size-full wp-post-image lazyload" alt="Reformas Laborales" itemprop="image" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 1280w**" sizes="(max-width: 1280px) 100vw, 1280px" data-srcset="https://intersindicalrm.org/wp-content/uploads/2019/06/xderogar-reformas-laborales-aprobadas-en-la-crisis.jpg.pagespeed.ic.3uh3s3phk-.webp 1280w, https://intersindicalrm.org/wp-content/uploads/2019/06/xderogar-reformas-laborales-aprobadas-en-la-crisis-150x84.jpg.pagespeed.ic.d4ruf5x8pB.webp 150w, https://intersindicalrm.org/wp-content/uploads/2019/06/xderogar-reformas-laborales-aprobadas-en-la-crisis-300x169.jpg.pagespeed.ic.9Aevn_bJgv.webp 300w, https://intersindicalrm.org/wp-content/uploads/2019/06/xderogar-reformas-laborales-aprobadas-en-la-crisis-768x432.jpg.pagespeed.ic.CcPsctvZIU.webp 768w, https://intersindicalrm.org/wp-content/uploads/2019/06/xderogar-reformas-laborales-aprobadas-en-la-crisis-600x338.jpg.pagespeed.ic.lfm2n5YL4K.webp 600w, https://intersindicalrm.org/wp-content/uploads/2019/06/xderogar-reformas-laborales-aprobadas-en-la-crisis-200x113.jpg.pagespeed.ic.oOyn7fNPgK.webp 200w" data-src="wp-content/uploads/2019/06/xderogar-reformas-laborales-aprobadas-en-la-crisis.jpg.pagespeed.ic.3uh3s3phk-.webp" loading="lazy">
This element have a placeholder srcset set to a data uri (but maybe a url to a 1x1 px image) and a data-srcset with the real images. The if else if found the srcset placeholder and send it to BeginRewriteSrcSet but don´t ask for more image valued attributes so the data-srcset can´t be rewrited then we need 2 if, 1 for the srcset and 1 more for the data-srcset.
If the ineficiency is due we call FindAttribute(), maybe we ask for some like
if (attributes[i]->keyword() == HtmlName::kDataSrcset) {
    BeginRewriteSrcSet(element, datasrcset);
} else if (attributes[i]->keyword() == HtmlName::kSrcset) {
   BeginRewriteSrcSet(element, srcset);
}

if this is the rigth syntax so we don´t call a external class.

@Lofesa you are right, we shouldn't have else if when we're outside of the loop. So I think we should move the code out of the loop, and remove the else. Ideally we also test the input you described above so we prove out we got it right. Staying out of that loop make the code more efficient, so I feel it's worth getting that right if possible!

@oschaaf  Well... out of the loop we need 2 if and we need to not ask for and img element as in the original image_rewrite_filter.cc file (line 2141) cause not only img elemen can have srcset/data-srcset.
Maybe we change the line 2141 w/ some like this:
if (element->keyword() == semantic_type::kImage) {
before asking for srcset/data-srcset attributes?


DOC use getClientRects instead of getBoundingClientRect

The bounding client rect's coordinates might not be part of the element
if it's comprised of several client rects.

[Current coverage][cc-pull] is 85.96%

Merging [#472][cc-pull] into [master][cc-base-branch] will increase coverage by 0.06%

@@             master       #472   diff @@
==========================================
  Files            40         40
  Lines          4768       4768
  Methods           0          0
  Messages          0          0
  Branches        654        654
==========================================
+ Hits           4096       4099     +3
  Misses          513        513
+ Partials        159        156     -3

Powered by Codecov. Last updated by [ad656e3...f985f54][cc-compare]
[cc-base-branch]: https://codecov.io/gh/scrapinghub/splash/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/scrapinghub/splash/compare/ad656e3ee22f7b3161279777cb7cc0d12a47d786...f985f542a09f5298db5353602f8826e82b31332d
[cc-pull]: https://codecov.io/gh/scrapinghub/splash/pull/472?src=pr

Thanks @Youwotma!


minifiedFile should in then same path with mergedFile

I config jsFinalFile with "folder/app.js". I expect minifiedFile is "folder/app.min.js", but it's "app.min.js" in root dir.

Fixed by the commit c9ca500117502e6a0d4d85c84fe5d1953e663e8a.


Return a bool indicating success/failure from bv.navigate(...)

This is a minor suggestion, but it would be nice if bv.navigate would return a True/False indicating success or failure (of the navigation request).
bv.navigate(bv.view, address) --> True/False

IDA provides this, eg:
Python>idaapi.jumpto(0x1400038D0)
True

Updated. Will close when included in the next build.

Fixed in build 1.1.1278-dev.


Code cleanup. Update versions

Maybe we should separate the dependency updates from the code cleanup. Reason is that the code cleanup thing is going to make backporting between branches harder, so maybe easier to do in isolation.

@melix sure. Fixed


Automatic restore not working

Howdy!
I see recently there was a fix for automatic restore not working in OSX (https://github.com/tmux-plugins/tmux-continuum/issues/52).
I'am actually finding that this has broken automatic restore for me on macOS (Mojave - 10.14.3). When i start tmux nothing is restored. Interestingly, if i reload my config, the restore then happens (which shouldn't happen according to this)
If i revert the changes made here everything seems to be working ok for me.
I'am using tmux 2.8 and the latest versions of tmux-continuum and tmux-resurrect

auto-close didn't work - please close due to #58

Closing because #58 was merged.


Menu: Android does not display notifications are off when COVID Alert is OFF

Android v9 and 8
samsung Galaxy S8+ and OnePlus 7

COVID-19 Exposure logging = off
Bluetooth : Off
Notifications : Off

Install the app for the first time
Navigate through the Onboarding screens until the Enable COVID-19 exposure logging and notifications is displayed.
Click Don't Enable
Verify that the menu displays the following messages:
EN: COVID Alert is OFF and Notifications are OFF
FR:  Alerte COVID est désactivé and Notifications désactivées

iPhone displays both messages
Android does not
Notification message should be displayed like iOS.

This should now be fixed. The logic that decides when to display the warning in the collapsed bottom sheet has changed. There used to be cases where it would show up in the expanded sheet, but not in the collapsed sheet.
There is a related issue where this content isn't updating as frequently as it needs to if you make a change via the settings screen. I will file an issue for that separately.

@mmiron-HC can you verify that this works for you now based on @smcmurtry comment above? I sent you the link for a playstore download of the app with our meeting invite.

We need to push to the Play store again first :)
Plan to see this change first thing in the A.M

both messages now appear tested using OnePlus 3


Notify assigned editor

see: https://www.pivotaltracker.com/story/show/84960550

[x] ask yourself: is this PR complicated enough that you should write
integration tests?
[x] ask yourself: do you feel that things are well abstracted?
[x] do a self code review (read through git diff or the github UI)
[x] complete all relevant todos in your code
[x] self QA (make sure the app still works, along with your change)
[ ] get review from a team-member with knowledge of this codebase area
[ ] team-member said ship it! (:ship: it)
[ ] self QA on staging
[ ] do any changes need to be made to prod before a deploy? List them in
the deployer checklist
[ ] the tests are passing for this branch on semaphore
[ ] merge! Celebrate your success!

Looks good. :+1:


fix(TFD-148): jdbc beam runtime return string type always

Please check if the PR fulfills these requirements

[x] The commit message follows Talend standard
[x] Tests for the changes have been added (for bug fixes / features)

What is the current behavior? (You can also link to an open issue here)
JDBCInput beam runtime return the data with proper type
JDBCInput need predefined schema.
What is the new behavior?
JDBCInput beam runtime return the data with string type only.
JDBCInput beam runtime can work with empty schema also.
Does this PR introduce a breaking change?

[ ] Yes
[x] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:

build was successful:
https://ci-common.datapwn.com/job/components_pull-request_master/464/
https://ci-common.datapwn.com/view/All/job/components_feature_jdbc-beam-runtime-string/2


TAJO-923: Add VAR_SAMP and VAR_POP window functions

I coded in the same way in https://github.com/apache/tajo/pull/427 (TAJO-921)
If needed, after merging pull-request 427, I will do refactoring.
This code is passed the following command.
mvn clean install -Pparallel-test,hcatalog-0.12.0 -DLOG_LEVEL=ERROR -Dmaven.fork.count=2 &> TAJO-923.travis.ERROR.txt

The result file is https://app.box.com/s/clnx9d2bisfhbh2upgo3q6g7bdx7aic5

Rebased.

Rebased.

I'll review today.

The only difference between this patch and TAJO-921 is the absence of square root. Why should we maintan mostly duplicated codes separately?

No offense. Sorry for late review.

@jihoonson , I knew that 20 days ago. :) But, there was no way to implement variance at that time, since TAJO-921 is not committed yet. As I mentioned my first comment, we need to change.
Here, I need your guide how to reduce the redundancy. Is it proper to compute STD_DEV first and square that?

Thanks for your rapid reply.
Yes, I also think that will be a good way.

Hi, @jihoonson . I removed the following redundancy. Now, VarSamp and VarPop use StdDevContext.

ProtocolBuffer message for VarSamp/VarPop
Var.java file

+1 thanks for your work.


Can't start fresh project

Environment

Operating System: Windows_NT
Node Version:     v18.16.0
Nuxt Version:     3.4.3
Nitro Version:    2.4.0
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      -
Runtime Modules:  -
Build Modules:    -

Reproduction
can't
Describe the bug
Nuxi 3.4.3
ERROR  No "exports" main defined in \node_modules\nuxt\package.json
I deleted lock file and node_modules couple times. Tried 16.19.1 node as well. But I could't start fresh project with only 2 commands
npx nuxi init
yarn install
Additional context
No response
Logs
No response

Solution: delete every node_modules folder that situated over your project (not only your parent)


Upgrade go.mod package versions

Description of your changes:
Resolves RHOAIENG-7309
Implemented fixes on my fork and imported in my personal snyk account and made sure CVEs are eliminated. Also updated the license CSVs.
Checklist:

[ ] The title for your pull request (PR) should follow our title convention. Learn more about the pull request title convention used in this repository.

Closing this PR as this is not needed.


No eraser 😔

Hey, I found this epic project though Changelog Daily Newsletter and it's wow! The speed and the agility of this is on another level.
But it doesn't have an eraser. Any plans to support that? Or can you give some tips on how someone would go around adding such a support? 😱

Yes, we do plan to have that. Giving it's actually a bit complex, it could take some time to make it works well. Unfortunately I don't have bandwidth to work on it yet, before that, contributions are great welcome!

maybe can consider supporting the feature to remove SVG child elements?

Drauu is amazing. Thank you!

Drauu is amazing! Thank you.
I agree with the need for eraser.
I've used many drawing apps (as a professional animator) and created some myself -  I have found that an incredibly useful tool is one that deletes any stroke it touches.  It encourages redrawing a line instead of fixing it - resulting in more natural gestural strokes.
Perhaps this is similar or same to what<PHONE_NUMBER> is suggesting. It is different than an eraser and I believe easier to implement.
In another app that i developed I would store the bounding box info with every stroke - then to detect collisions later I only have to go through point lists if the cursor is already in the bounding box of a stroke.
A feature like this is also a very good reason to use svg over say, canvas.

@unimplode path deletion is relatively easier than path manipulation via difference. That should be the first step I suppose. Would be cool to add path selection somehow.


Frame/background Preview on liveview

The frame and background features are great.
To get more out of it please develop a preview on the liveview.
Idealy it would be like the filter selection in the media screen.
show either a list or  thumbnails of the frame.png or backgound.jpg.
If one is selected show the liewview with the frame or background.
but it would only make sence to show a buton when the coresponding feature is activated in the config.
That would make the booth more flexible and inter activ and the people can take the right possition to fit to the frame or background.
hope this is understandable.
If not please come back to me.

This could be extended in version 2 at one point.
Overlay a frame id quite simple. The background is different story since the liveview then needs to process the cpu intensive chromakeying in realtime. The pi is very limited here, so I did not follow this with high priority. Could change with the pi 5 though. Needs testing and an implementation that is still easy to understand by the users.

I'm looking for the same feature. I want to add the wedding couple in the center and anybody can stand next to them in the picture. but it is essential, that they see that in the preview.
I am using a Raspi5, so power should be ok.

for usage, i would suggest the following:
thefiel Img Frame File is already there. you just need an extra toggle with "show in Preview - Yes/no"
It stays intuitive and wil gain a huge amount of extra features.

Would you be able to help improving this feature? Would be glad to accept a pull request.

Yes, i would like. I speak C++ but am interested in Python. So how can i help?

So there is no definition or proposal how to implement. I could think of several different ways:

Have the frontend load an image that is configurable in the backend and just display it statically any time on the preview screen.
Have it merged into the live-view. The liveview is actually a series of JPG that is delivered to the frontend in this router: https://github.com/photobooth-app/photobooth-app/blob/b485f4d53547350b6841d6f878417e3c8a907c9c/photobooth/routers/api/aquisition.py#L24

Starting from there you could add a live-processing pipeline that merges an image to the preview. Very similar to the processing here: https://github.com/photobooth-app/photobooth-app/blob/b485f4d53547350b6841d6f878417e3c8a907c9c/photobooth/services/mediaprocessingservice.py#L135

Another idea would be - and that is way less invasive and easier to implement maybe even without coding to use the private.css to modify your preview and add an overlay. You could also modify the config uisettings->FRONTPAGE_TEXT. It can be HTML and you can reference to your image. Maybe this helps already.

ok, that sounds great!
the first would always show the maried couple, so it would be a problem with other setups
the second is also static, so for other usecases also not good.
in the end, there should be 4 Buttons for 4 differend actions.
1 normal picture
2 collage type one
3 Picture with the couple as "frame"
4 second collage
I think it would not work with these 3 options or is it possible to use different settings for different actions?

Yes different actions could have different settings.  But there is no way to know in idle if the frame shall display or not. So only during countdown possible.
I think there could be one additional switch in the settings that enables a live image processing pipeline only after an action is triggered. The pipeline needs to be fast enough to finish calculations within the framerate.

I have set up and installed Fotobooth-app fotobooth. I gave it 4 Buttons.
Ther is only one single picture and a collage.
But it seems, that it is not possible, to assign 2 functions to one Button like:
in start screen: Button 1 is take a Gallery
when first picture is made: Button 1 is keep picture
when gallery finished: Button 1 is print gallery
It shows always printing not possible, so double assignment is not allowed. That would result in 8 or mor buttons, which make it complex to use. I think this has to be done first, that only the function is made, which makes sense at this moment.
Button 1 should not start a new collage, when you are asked if you want to keep the previous picture.

Please let us keep the topic here to the title.
There is another issue #250 for this.
Currently touchscreens are first class citizens, GPIO is ... available...
Please use the other issue and comment how you would propose to use the 4 buttons. I think there are many options and I would like to implement a simple one. But as I personally do not use the buttons, it would be good if an actual user describes it's operation before implement anything.

Yes, that's right I just wanted to say, why i did not proceed here.(like lots of people do, ask for something and then dissapear)
So this is so interesting, that i would like to help, with everything i can do with my skill. So for now i will try on my own and come back, if i have questions.

HI,
I try to add a frame  to the liveview via css.
I found this . Do you think this can work ?
Not sure if the path is visible for the websever for this purpose .
.preview-stream::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url('/media/processed/Photobox_Klein_2.png'); /* Dein PNG als Overlay /
background-size: cover; / Deckt den gesamten Bereich ab /
background-position: center;
pointer-events: none; / Erlaubt weiterhin die Interaktion mit dem Stream /
z-index: 1; / Stellt sicher, dass das Overlay über dem Stream liegt /
opacity: 0.9; / Optional: Transparenz für das Overlay */
Here is my frame

with the css solution for the frame on the main screen I would say request can be closed.
what do you think ?

The Problem here is, that it will be there for all pictures, right?
So if you put the couple on the screen, they will be there always, so they will be double, if the Real couple is there...
I would prefer the second solution with the parsing, but i habe no idea of Python...

I have "stupid?" Idea.
Frist, sorry for bad englisch 😀

If i'm Right you can define a Share Action Like printing. But instead of puting a Print Command, you can rename the Frame file to another Name or an Not existent file. Assigne a Button via gpio or on the screen . The Same the otherway round if you wont to get the Frame back. I did something Similar to change the Frame.

If you have it a try come back with the result 🥹

Ok, I tried to add this:
.preview-stream::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url('/media/processed/Photobox_Klein_2.png'); /* Dein PNG als Overlay / background-size: cover; / Deckt den gesamten Bereich ab / background-position: center; pointer-events: none; / Erlaubt weiterhin die Interaktion mit dem Stream / z-index: 1; / Stellt sicher, dass das Overlay über dem Stream liegt / opacity: 0.9; / Optional: Transparenz für das Overlay */
here:
"FRONTPAGE_TEXT": "
Hey!
Let's take some pictures!
📷💕
",
so now it looks like this:
    "FRONTPAGE_TEXT": .preview-stream::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url('/media/processed/Photobox_Klein_2.png'); /* Dein PNG als Overlay / background-size: cover; / Deckt den gesamten Bereich ab / background-position: center; pointer-events: none; / Erlaubt weiterhin die Interaktion mit dem Stream / z-index: 1; / Stellt sicher, dass das Overlay über dem Stream liegt / opacity: 0.9; / Optional: Transparenz für das Overlay */,
that had no effect...

hi, I'm  not sure but in another disussion @mgineer85  explained that only the Userdata folder can be seen from the webserver. please try the same setup as i wrote.

You can find my sample here Frame selection Howto #356


Question: CentOS install instructions

Moving question from #525

Agreed. I just tried installing matchbox onto CentOS and the instructions were either unclear or didn't work.
Example: https://coreos.com/matchbox/docs/latest/deployment.html#rpm-based-distro
RPM-based distro
On an RPM-based provisioner, install the matchbox RPM from the Copr repository using dnf or yum.
dnf copr enable @CoreOS/matchbox
dnf install matchbox
CentOS is an RPM-based distro but it doesn't use dnf. What are the yum commands needed?
Thanks!

FYI - I was able to get it working, but it wasn't obvious from the instructions that the systemd copied service was "matchbox-local" and not just "matchbox", therefore a systemctl "start matchbox-local" is what is needed to be executed to start the service

cc @nsaustin

Good point. In the past, Matchbox's Copr repo used to provide a CentOS 7 RPM which could be installed via yum. Matchbox (as of v0.5.0) requires Go 1.7 or higher and CentOS comes with Go 1.6. The CentOS RPM was dropped.
Short term, our docs should only mention dnf as only Fedora 24 and 25 are new enough. Instead, downloading a release binary and following the instructions for "general linux" is the best option for CentOS.
Longer term, I'd like to improve this story for those using CentOS.

This can be built on top of CentOS/RHEL using Software Collections.  We could potentially make that repo a BuildRequires option in the spec.


EDL LOC markers are in track time units not clip.media units

EDL Loc / Clip Markers are in timeline units, XML clip markers are in clip/media units.
This makes handling of markers a real problem.
The marker position calculation should be independent of the original timeline format.
I'm suspecting that EDL LOC markers should be timeline/track markers not clip markers, or they need translating.
cheers

Marker.marked_range is meant to be in the time frame of the item the marker is attached to. So if the marker is on a Clip, it should be relative to the Clip. If one of the adapters is not doing this right, it is a bug in the adapter.
I'm attempting to improve the documentation for this here: #344

This appears to be the same as issue #169

For the EDL case does it make more sense to fix the marked_range of the markers, leaving them on the clip, or should we attach the markers to the track instead?


use renderer sandbox when it's available

Progress is being made on running Electron renderers in the Chromium sandbox:
https://github.com/electron/electron/issues/6712
(As of this writing, 6/8 tasks there.)
When this is available, the Zulip desktop app should adopt it to provide defense in depth against browser-based exploits escalating to local RCE.

Cool, thanks for opening this issue @glyph!