Compiler crash on from_text with zero rows

What happened?
It should be possible (not very useful, perhaps, but still possible) to define a relation using from_text where it has known columns but no rows. At a minimum, such a definition ought not to crash...
PRQL input
from_text "col_a,col_b"
# or, in JSON format
from_text format:json '{"columns": ["col_a","col_b"], "data": []}'

SQL output
n/a, crashes

Expected SQL output
-- could be something like this
WITH table_0 AS (
  SELECT
    NULL AS col_a,
    NULL AS col_b
  WHERE 1 = 0
)
SELECT
  col_a,
  col_b
FROM
  table_0

MVCE confirmation

[X] Minimal example
[X] New issue

Anything else?
The message on crash is:
The application panicked (crashed).
Message:  removal index (is 0) should be < len (is 0)
Location: prqlc/prqlc/src/sql/gen_query.rs:446

Tested with latest code, commit d642a30

I'm not sure that the provided SQL output is the best choice moving forward, but I'm making a PR that at least provides an error message for this situation and prevents a crash

@kgutwin What is your use case for this?

Is this as a kind of schema definition/declaration, or
you are processing files which sometimes don't have any data?

For case 2. @KaeporaGaebora should help (and is greatly appreciated 🙏).
For case 1., this kind of thing should be handled by the type system once implemented.
Please note that the following works:
from_text "col_a,col_b\n,"

You can produce the SQL you provided with the following:
from [{col_a=null, col_b=null}]

HTH

Thanks - the use case might be a little uncommon, but our team is working on code that takes user input and generates PRQL documents. As part of that process, it's typical for users to generate empty relations with known columns. It's not very useful to them -- they will typically immediately begin adding rows -- but since our app generates and executes the PRQL "live", having a compiler error on an empty relation isn't something we want the users to need to deal with.
We can, of course, catch the compiler error and smoothly handle it, so the solution proposed by @KaeporaGaebora is indeed plausible; but I do wonder whether an error is the right solution, given that it is definitely not a SQL error to have an empty relation. As of now, we don't have a specific need to be able to create an empty relation, but I suppose at some point in the future it might come up.
I did want to note that the PRQL snippets you suggested produce subtly different output than what I had expected; in particular, the last one is missing the necessary WHERE 1 = 0 clause which prevents a row from being generated by the inner SELECT. For what it's worth, it appears that WHERE 1 = 0 is the most portable way of generating zero rows, see StackOverflow: https://stackoverflow.com/questions/18021915/is-there-a-sql-query-that-will-always-return-zero-results

I definitely think it should be possible to produce from_text with zero rows of data.
I'm not sure whether it should be possible to produce from_text with zero data, which implies zero columns. I don't see a compelling reason why not, but not confident / open to thoughts!
Thanks for adding the error @KaeporaGaebora , that's already better.


Option to globally remove "via" from modules

Suggesting a new section? Consider the following validations.

[X] It will not clutter the prompt
[X] It will not slow down the prompt
[X] It is worth to be aware of

The problem
'Vias" clutter the prompt quite a bit, especially if there are multiple modules being displayed. The current solution (removing it one by one from each module) is tedious and inelegant. Also, the vias in the prompt is mostly unpopular with users.
Describe the solution you'd like
A single line of configuration that totally removes it or changes it to whatever the user likes. Basically factor out that particular config from modules and make it global.
Describe alternatives you've considered
No response
Documentation and adoption
No response

Use SPACESHIP_PROMPT_DEFAULT_PREFIX option:
SPACESHIP_PROMPT_DEFAULT_PREFIX=''

This should do the trick


Better matrix / graph builtins

Specifically:

[ ] Matrix exponentiation
Repeated multiplication of the matrix with itself
[x] Identity matrix of size n
A matrix with 1s on the main diagonal and zeroes elsewhere
E.g. for 3

[ [1, 0, 0],
  [0, 1, 0],
  [0, 0, 1] ]

[ ] Graph adjacency matrix
Take a graph of the form [[1,3],[2,4],[3,4]] and create an adjacency matrix e.g. for this,

[ [0, 0, 1, 0],
  [0, 0, 0, 1],
  [1, 0, 0, 1],
  [0, 1, 1, 0] ]

[ ] Graph distance matrix
Take a graph of the form [[1,3],[2,4],[3,4]] and create a distance matrix, e.g. for the above,

[ [0, 3, 1, 2],
  [3, 0, 2, 1],
  [1, 2, 0, 1],
  [2, 1, 1, 0] ]

I'mma gon need some examples and descriptions of what these do.

Information added.

Graph adjacency matrix

Did you just yoink the test case from my challenge lol?

For matrix exponentiation, wouldn't e just work? Or am I missing something?

Also, someone else might have to do the graph stuff - I don't know much about graph theory at all (s/much/anything)

Pretty sure it doesn't because it's repeated matrix multiplication.
On Wed, Mar 23, 2022 at 12:59 AM Lyxal @.***> wrote:

For matrix exponentiation, wouldn't e just work? Or am I missing
something?
—
Reply to this email directly, view it on GitHub
https://github.com/Vyxal/Vyxal/issues/807#issuecomment-1075087536, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/APABUG7XBKYI5CIHJGXD4P3VBGYZLANCNFSM5RFEZXJQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

I guess we'll need one set of builtins for undirected graphs and one for directed graphs.


readme: Libssl requirement

When building vab, I got a simple error on a fresh new install of Ubuntu:
sheat@ubuntu:~/Documents/vab$ v vab.v
builder error: 'openssl/rand.h' not found

This pull request add to the readme the OpenSSL / libssl dependency.
On my case, this require the installation of "libssl-dev".

Thanks! Sorry for the delay. Feel free to ping me on Discord if you have another PR pending 😅


sapui5 uploadCollection change attachment name before upload

My requirement is to allow the user to change the attachment name in a dialog box before the upload. I've implemented the SAPUI5 example code, see url. I'm able to call a fragment (or confirmation box) in the onBeforeUploadStarts function. But the code doesn't wait for the user confirmation. Anyone any idea how to force the code to wait for the user confirmation?
Thanks in advance

File name cannot be changed after the file is selected. Instead you can submit the details about the desired new name on the server, make a copy of the received file and rename it there

Hi Stephania, thanks for the quick answer.
FYI: I'm passing a SLUG parameter with filename within the method onBeforeUploadStarts and I use this parameter in the backend to store the file on the backend server. I've changed the SLUG parameter in debugger and then everything is working as expected.
Is there is a way to include a wait for user input within the onBeforeUploadStarts method?

File name cannot be changed after the file is selected. Instead you can submit the details about the desired new name on the server, make a copy of the received file and rename it there
*Source of my confidence :D https://stackoverflow.com/questions/45141038/change-name-file-selected-by-input-type-file

Hi Stephania, thanks for the quick answer.
The user should be in control of the file name (especially photos which are created with an iPhone/iPad don't have a meaningful name).  So changing the names in the back-end isn't an option...
FYI: I'm passing a SLUG parameter with filename within the method onBeforeUploadStarts and I use this parameter in the backend to store the file on the backend server. I've changed the SLUG parameter in debugger and then everything is working as expected.
Is there is a way to include a wait for user input within the onBeforeUploadStarts method?

Disable instantUpload
Add custom UI where the enduser specifies what is the desired new name of the file.
*The automatically generated system file name cannot be changed by code running in browser with lower permissions. You can do it server side
Gather the user input and add headerParameters and parameters beforeUploadStarts

Hi Stephania, thanks again.
I don't want to disable instant upload.
Are you sure that it's not possible to implement a 'wait for confirmation' statement within the onBeforeUploadStarts function? No offence, but I cannot imagine that it isn't possible within a javascript function..

Let us check again what is the exact scenario, with consideration that:

instantUpload=true means selecting a file and triggering upload directly https://openui5.hana.ondemand.com/api/sap.m.UploadCollection#controlProperties
the uploadCollection provides means for handling renaming of files https://experience.sap.com/fiori-design-web/upload-collection/#renaming-files
file names are generated by the system and cannot be modified by code running with less permissions

Can you provide an example what you have as functionality, and how and when you try to modify the file names?

instantUpload=True
renaming afterwards requires unwanted additional clicks (and scrolling if there are many attachments)
I only want to pass the correct file name within the SLUG parameter (so I don't have anything to do with permissions).

I can fulfill the requirement once I know how to wait for user input (popup with input field with file name) within the onBeforeUploadStarts function? The code in function onBeforeUploadStarts should continue once the popup is closed by the user.

That's not possible with your preconditions. The chain of events that leads to the onBeforeUploadStarts is fully synchronous. Any listener to the event therefore can only act synchronously. This rules out any asynchronous steps like user dialogs or code loading etc.
The only possible alternative is to use the native (and synchronous) window.prompt() which has very limited functionality and is going to be forbidden / disabled by browser vendors in some scenarios, AFAIK. And in Firefox, it also might not fully work. Firefox doesn't fully block the event queue while alert, confirm or prompt are executed.
If you want to embed another asynchronous flow (like a dialog), you have to collect the necessary information before the upload starts, buffer it and return it synchronously in onBeforeUploadStarts. This implies that the upload cannot start "immediately". And additional care has to be taken that the set of files doesn't change between the two points in time.


Simple Chinese language for the mod.

I love the mod,so i submit Simple Chinese language for the
Sniper.txt
.

Much appreciated. I'll work on getting an update out soon.

If you're still around, would you be able to update the Chinese translation?
I'm updating Steady Aim to have Weak Point support like Railgunner, and the skill's description needs to be rewritten.


Run all pull request checks on the changes of workflow files

Proposed changes
It is inconvenient if someone wants to change the workflow files, but the jobs are skipped in the pull requests. For example, https://github.com/thin-edge/thin-edge.io/pull/1263 should run all pull request checks workflow inside the PR.
Types of changes

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
[ ] Documentation Update (if none of the other choices apply)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue
#1233
Checklist

[x] I have read the CONTRIBUTING doc
[x] I have signed the CLA (in all commits with git commit -s)
[ ] I ran cargo fmt as mentioned in CODING_GUIDELINES
[ ] I used cargo clippy as mentioned in CODING_GUIDELINES
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)

Further comments

Oh, I committed :D Should I revert my change? By the way, Cargo.* would be a better to include also Cargo.tom

(from [https://github.com/thin-edge/thin-edge.io/pull/1267#issuecomment-1191344744])
Actually I don't mind which patch gets merged. I added a bit more documentation in my commit message - so if you want to take that, that'd be cool!
  Let's merge this PR then! Thanks!

Really cool! :tada:

The CI error seems to be unrelated to the changes here... maybe we should open an issue for that and re-try CI here? Not sure how to proceed...

The CI error seems to be unrelated to the changes here... maybe we should open an issue for that and re-try CI here? Not sure how to proceed...

I started retry. We need to open a new issue for the test failure, for sure. But on the other hand, definitely the failure is not related to this PR change :sweat:

I would merge this PR as the test now passed. So it is sporadic failure...

Whoop whoop, looks good now!

So it is sporadic failure...

Definitively needs an issue then, I guess. Sporadic failures should never happen :laughing:
But :tada: on getting this landed! I already triggered dependabot to rebase its PRs.


[cloud_firestore] Support QueryDocumentSnapshot in cloud_firestore

https://firebase.google.com/docs/reference/js/firebase.firestore.QueryDocumentSnapshot

@collinjackson
The issue at https://github.com/flutter/flutter/issues/16433 has been closed and moved here. Future collaboration on this issue will be done here.

Hey, as part of our on-going work for #2582, support for this has been added in our Firebase Firestore rework (#2913) - which has now been merged into master. We'll look at publishing some prereleases in the next few days. Thank you


Update RTD config

As noted by Xiaoyang on Slack, it's not intuitive to choose [tests] as the extra requirement for building the docs when we also have [docs]. This PR replaces the selection hoping it works out of the box. In the same process, it renames the config file to comply with current recommendations.
How to review

Read the diff and note that the CI checks all pass.
Build the documentation and check that it works as usual.

PR checklist

[x] ~Continuous integration checks all ✅~
Except for macos-latest-py3.7 per iiasa/ixmp#484.

As per the instructions for checking the RTD build locally, the command completed successfully. We might still be missing some packages required for building the docs by only requiring the extra [docs], but I'm not sure how to test that since the PR originates from my fork (so we cannot simply enable builds for this branch on RTD itself).

We might still be missing some packages required for building the docs by only requiring the extra [docs], but I'm not sure how to test that since the PR originates from my fork (so we cannot simply enable builds for this branch on RTD itself).

RTD did not originally support building docs for PRs, but has recently added this feature: https://docs.readthedocs.io/en/latest/guides/pull-requests.html. We could turn this on, but should first consider security implications, which I haven't had time to do. (For example: code examples in the documentation or code in Sphinx conf.py can be run while the Sphinx build occurs. Could a user abuse this to, e.g. attempt to DDoS our or someone else's public-facing servers?)
So some options would be:

Cautiously or temporarily (just for this PR) enable that.
Re-open the PR with the same commit pushed to a branch in the main repo.

If (2), then see https://github.com/iiasa/ixmp/issues/484#issuecomment-1606883266 and the comment linked from there.

From these options, I would choose 2 since I don't know how to assess DDoS potential. However, I'm not sure what I can gain from the linked comment: do you suggest to merge a PR with the suggested changes before opening a new one here?

However, I'm not sure what I can gain from the linked comment: do you suggest to merge a PR with the suggested changes before opening a new one here?

I meant that, if/when you push to a new branch in the main repo and open a new PR, it could be convenient to add 1 more commit adding the 1 suggested line, at the same time.

Superseded by #485


Is it possible to pass an argument into a trait?

I'm trying to do something like this:
FactoryGirl.create(:referral, :with_sent_referrals => 10)
So the argument 10 would be passed onto the trait :with_sent_referrals.
Is this possible? And if not, could anyone guide me on how to get started monkey patching factorygirl to do it?

DEPRECATION WARNING: #ignore is deprecated and will be removed in 5.0. Please use #transient instead.


Build failing on Debian 7 and Debian 8 i386

On Debian Wheezy
W: Failed to fetch http://deb.debian.org/debian/dists/wheezy/main/binary-amd64/Packages  404  Not Found
W: Failed to fetch http://deb.debian.org/debian/dists/wheezy-updates/main/binary-amd64/Packages  404  Not Found
W: Failed to fetch http://security.debian.org/dists/wheezy/updates/main/binary-amd64/Packages  404  Not Found
W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/main/source/Sources  404  Not Found
W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
make: *** [/build/cbrutekrag_0.4.6-1_amd64.changes] Error 100

On Debian Jessie arch=i386
W: There is no public key available for the following key IDs:
AA8E81B4331F7F50
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/source/Sources  404  Not Found
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
/pack//deb.mk:115: recipe for target '/build/cbrutekrag_0.4.6-1_i386.changes' failed
make: *** [/build/cbrutekrag_0.4.6-1_i386.changes] Error 100

Related to packpack/packpack#112 and packpack/packpack-docker-images#40

I have momentarily added the OS distributions that fail to the "allow_failures" list in .travis.yml


version 0.2.2: Not persisting Suites settings anymore via GUI

First of all met me say: Awesome job on this framework! I am really digging it.
I want to report some bugs I encountered moving from v0.2.1 -> v0.2.2 (new GUI layout)

The Suites settings wont show any suggestions anymore for drivers like eg. "chrome or chrome-headless"
Selected data like driver and test cases are not persisted anymore, pressing save generates the following error:

File "/home/xxxxxx/dev/python/venvs/doodle/lib/python3.5/site-packages/golem/gui/__init__.py", line 626, in save_suite
    environments = request.json['environments']
KeyError: 'environments'

I cannot reproduce this problem using the latest source version, it seems isolated to the version hosted on pypi

Awesome job on this framework! I am really digging it.
Thanks! much appreciated.

I tried to reproduce this on 0.2.2 and couldn't, could be a matter of cache. Anyway I will make a release soon, hope it get's fixed by it

Could indeed be a caching thing when I switched from 0.2.1 to 0.2.2.
As noted earlier, with the latest source version I did not expierience this problem yet. Most likely this issue can be considered closed

i consider the issue closed after using latest source versions and 0.3.0


Run Gui Apps using nautilus

Nautilus can provide eassy way to run application.
Step Required:
1.Fix the Dbus and install unity by follwoing [https://github.com/Microsoft/BashOnWindows/issues/637]
2. Instead of running compiz , run nautilus  and navigate to /usr/share/application/

now you can try the application you want . I tried following application that are running very smoothly.

Please provide the list of applications that you are able to run successfully.

With better support for AF_LOCAL socket, dbus seems to be happy and the dbus workarounds to use TCP sockets will hopefully no longer be needed. The changes haven't made it to the release branch yet, but are moving fast. Keep an eye out on the release notes.

Tip: you can easily add a theme to your GTK+ apps by installing the package gnome-themes-standard and replace Ambiance with Adwaita in /etc/gtk-3.0/settings.ini and /etc/gtk-2.0/gtkrc.


Simplified Clinvar ingest workflow step to copy Clinvar FTP file to GCP bucket

This is a workflow step in the Simplified clinvar-ingest v2 workflow (see attached epic).
Upon notification of the availability of a new Clinvar FTP Release file, copy the release file to a GCP bucket for further processing.

Closed by #58


VSCode v1.29.1: File icons in IntelliSense not showing

Hi VSCode Team,
Problem#01:
After upgrading to v1.29.1 files vscode icon which is associated with VSCode is not showing up in any icon view.
The default program in following file is set as VSCode and before upgrading to v1.29.1 vscode icon was showing there.

Default app setup:

Problem#02:
In the latest October 2018 release v1.29.1 a new feature added Files and folder icons in IntelliSense where in IntelliSense it show the icons associated with that file type. But when I try to import a css file the icon is not showing there and even the files that is resides in the css file folder not showing up in intellisense suggestion.

In the above in the folder where the foo.css resides there is other .css, .ts files but it is not showing when I called the "@import" command. Or, is there something I am missing?
For both above issue my vscode version is:

You can refer to my stream to reproduce the issue where I try to use the Files and folder icons in IntelliSense: https://www.twitch.tv/videos/347992950

For problem 2, I'd make sure you open the project folder instead of dragging in files (from your stream it appears you are dragging in files, which has no context). I can confirm that this works on 1.29.1

@mjbvz and @misolori

Looks like my problem 2 is solved now. File icon is showing in v1.29.1 by opening the project folder.

And for problem 1 I will later try to re-install vscode. In the meantime let me try if I can figure out a way which does not require re-installing vscode.

Closing this as the file icon issue is a Windows bug that we've seen before but don't have reliable way to repro and fix.


Rewrite "writing policies" introduction

Acceptance criteria
The "Writing policies" introduction should provide the following information:

High level overview of what kubewarden policies are
Programming language requirements
What is the communication protocol (functions + JSON objects) used to communicate between the policy evaluator and the policy itself

Merged


chore(ci) release daily builds for bionic

seems I missed an ubuntu. A successful build of a bionic release using kong-build-tools here

@hutchic change looks good, but it's reporting a conflict — please fix


Fix the geolocation portion in entry extraction module

Instead of using the independent geolocation module within entry extraction module, use the existing and running geolocation module by calling its endpoint.

done


publish-to-autorelease.yml example overwrites an existing published release

Steps to reproduce:

Run a job with the publish-to-autorelease.yml example. This creates a draft release.
Manually publish the release by browsing to it and clicking Publish Release.
Make another commit to the repo.
Run the job again without updating the app version.

Expected:
The job should fail, since there is already a published release with the same tag.
Actual:
The published release's binaries are overwritten.
However the release's tag isn't updated, so it is now pointing to the commit from first job run, not the one used to generate the new binaries.
The source code archive is also from the original job commit, not the one used to generate the new binaries.

Related: the log at https://github.com/tauri-apps/tauri-action/blob/dev/src/create-release.ts#L65 says Looking for a draft release with tag ${tagName}... but the next line actually queries all releases, not just draft releases.
I think the if (draft) { logic here should differentiate between existing draft releases and published releases. If a published release is found with the same tag, the job should fail.


Cannot find module '_http_common' from 'stream.js' with restify + jest

Do you want to request a feature or report a bug?
bug
What is the current behavior?
Using Restify in jest tests causes a system level error
If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.
https://github.com/CNDW/mock-couch-jest
What is the expected behavior?
the tests should run without error
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
I'm running into this issue trying to use the mock-couch package to built api tests on top of couchdb. I've reproduced the problem on a simplified repo.  I have tested this on node v8.7.0 and v6.9.5 with the same result
The repo will produce the following error
    Cannot find module '_http_common' from 'stream.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:191:17)
      at Object.<anonymous> (node_modules/spdy/lib/spdy/stream.js:13:20)

mock-couch is built using restify so I believe the error is the same one outlined in #977

Feels like a dupe of #4677


Could not resolve settings when using a TypeRegistrar

Information

OS: MacOS
Version: 12.0.1
Terminal: Terminal

Describe the bug
I am trying to run a simplified version of the HelloCommand example in your logging example to no avail. When running the command, it says Error: Could not resolve type 'HelloCommand+Settings'.
I only get this when trying to pass a type registrar to my CommandApp. I have the exact type registrar from the example and have simplified the hello command to even remove the serilog registration.
Code snippets and a link to a repoducable repository example below.
To Reproduce
Run this repo with dotnet run hello paul.
if you change var app = new CommandApp(registrar); to var app = new CommandApp(); it works, so it seems to be something about the TypeRegistrar
Expected behavior
I expect the command to return hello paul like it does when I am not adding the registrar.
Screenshots
Assuming this repo is more useful?
Additional context
Here's the code without going to the repo.
Program.cs
using Microsoft.Extensions.DependencyInjection;
using Spectre.Console;
using Spectre.Console.Cli;
using SpectreFail;

var serviceCollection = new ServiceCollection();
// serviceCollection.AddSingleton<IFileSystem, FileSystem>();

var registrar = new TypeRegistrar(serviceCollection);
var app = new CommandApp(registrar); // works without registrar

app.Configure(config =>
{
    config.AddCommand<HelloCommand>("hello");
});

return app.Run(args);

public class HelloCommand : Command<HelloCommand.Settings>
{
    private IAnsiConsole _console;

    public HelloCommand(IAnsiConsole console)
    {
        _console = console;
    }

    public class Settings : CommandSettings
    {
        [CommandArgument(0, "[Name]")]
        public string Name { get; set; }
    }

    public override int Execute(CommandContext context, Settings settings)
    {
        AnsiConsole.MarkupLine($"Hello, [blue]{settings.Name}[/]");
        // _console.MarkupLine($"Hello, [blue]{settings.Name}[/]");
        return 0;
    }
}

TypeRegistrar
namespace SpectreFail;

using Microsoft.Extensions.DependencyInjection;
using Spectre.Console.Cli;

public class TypeRegistrar : ITypeRegistrar
{
    private readonly IServiceCollection _builder;

    public TypeRegistrar(IServiceCollection builder)
    {
        _builder = builder;
    }

    public ITypeResolver Build()
    {
        return new TypeResolver(_builder.BuildServiceProvider());
    }

    public void Register(Type service, Type implementation)
    {
        _builder.AddSingleton(service, implementation);
    }

    public void RegisterInstance(Type service, object implementation)
    {
        _builder.AddSingleton(service, implementation);
    }

    public void RegisterLazy(Type service, Func<object> func)
    {
        if (func is null)
        {
            throw new ArgumentNullException(nameof(func));
        }

        _builder.AddSingleton(service, _ => func());
    }
}

public class TypeResolver : ITypeResolver
{
    private readonly IServiceProvider _provider;

    public TypeResolver(IServiceProvider provider)
    {
        _provider = provider ?? throw new ArgumentNullException(nameof(provider));
    }

    public object Resolve(Type type)
    {
        return _provider.GetRequiredService(type);
    }
}

@pdevito3 thanks for reporting this. The problem actually lies with the logging example.
The underlying issue here is, that GetRequiredService throws, if no service such is registered. The ITypeResolver.Resolve should never throw, but instead return null.
I thought I had modified all examples in #620, but it seems I missed something.
In your case, please modify your TypeResolver.Resolve like this:
public object Resolve(Type type)
{
    if (type == null)
    {
        return null;
    }

    return _provider.GetService(type);
}

@pdevito3 thanks for reporting this. The problem actually lies with the logging example.
The underlying issue here is, that GetRequiredService throws, if no service such is registered. The ITypeResolver.Resolve should never throw, but instead return null.
I thought I had modified all examples in #620, but it seems I missed something.
In your case, please modify your TypeResolver.Resolve like this:
public object Resolve(Type type)
{
    if (type == null)
    {
        return null;
    }

    return _provider.GetService(type);
}

👋 no problem. thanks for the quick feedback.
gave that a try and am still seeing the same issue though. pushed the update to the example repo

👋 no problem. thanks for the quick feedback.
gave that a try and am still seeing the same issue though. pushed the update to the example repo

@pdevito3 you missed a change, there 😀
You'd need to switch from GetRequiredService() to GetService().

@pdevito3 you missed a change, there 😀
You'd need to switch from GetRequiredService() to GetService().

whoops, that did it. thanks!
any thoughts on adding a DefaultTypeRegistrar (or whatever name you want to give it) that implements this for us to consume any not have to worry about if we don't need to do anything custom? would be nice to just be able to pull something default and only have to write something if we need to do something special.

whoops, that did it. thanks!
any thoughts on adding a DefaultTypeRegistrar (or whatever name you want to give it) that implements this for us to consume any not have to worry about if we don't need to do anything custom? would be nice to just be able to pull something default and only have to write something if we need to do something special.

You mean something like https://github.com/nils-org/Spectre.Console.Registrars.SimpleInjector does for SimpleInjector?

You mean something like https://github.com/nils-org/Spectre.Console.Registrars.SimpleInjector does for SimpleInjector?

Keeping this issue open, as the Cli/Logging example still needs to be modified.

Keeping this issue open, as the Cli/Logging example still needs to be modified.

Maybe, though it doens't seem to be able to plug directly in to the above without some mods.
I was more thinking even just adding something like the below directly into spectre console for us to use as a default. Was consuming to me when I saw it in the docs at first and had to poke around github to see if you guys had an example of it. Doesn't seem to be anything out of the ordinary going on, so seems like it would be a safe default to add.
public class DefaultTypeRegistrar : ITypeRegistrar
{
    private readonly IServiceCollection _builder;

    public DefaultTypeRegistrar(IServiceCollection builder)
    {
        _builder = builder;
    }

    public ITypeResolver Build()
    {
        return new TypeResolver(_builder.BuildServiceProvider());
    }

    public void Register(Type service, Type implementation)
    {
        _builder.AddSingleton(service, implementation);
    }

    public void RegisterInstance(Type service, object implementation)
    {
        _builder.AddSingleton(service, implementation);
    }

    public void RegisterLazy(Type service, Func<object> func)
    {
        if (func is null)
        {
            throw new ArgumentNullException(nameof(func));
        }

        _builder.AddSingleton(service, _ => func());
    }
}

public class TypeResolver : ITypeResolver
{
    private readonly IServiceProvider _provider;

    public TypeResolver(IServiceProvider provider)
    {
        _provider = provider ?? throw new ArgumentNullException(nameof(provider));
    }

    public object Resolve(Type type)
    {
        return _provider.GetRequiredService(type);
    }
}

Maybe, though it doens't seem to be able to plug directly in to the above without some mods.
I was more thinking even just adding something like the below directly into spectre console for us to use as a default. Was consuming to me when I saw it in the docs at first and had to poke around github to see if you guys had an example of it. Doesn't seem to be anything out of the ordinary going on, so seems like it would be a safe default to add.
public class DefaultTypeRegistrar : ITypeRegistrar
{
    private readonly IServiceCollection _builder;

    public DefaultTypeRegistrar(IServiceCollection builder)
    {
        _builder = builder;
    }

    public ITypeResolver Build()
    {
        return new TypeResolver(_builder.BuildServiceProvider());
    }

    public void Register(Type service, Type implementation)
    {
        _builder.AddSingleton(service, implementation);
    }

    public void RegisterInstance(Type service, object implementation)
    {
        _builder.AddSingleton(service, implementation);
    }

    public void RegisterLazy(Type service, Func<object> func)
    {
        if (func is null)
        {
            throw new ArgumentNullException(nameof(func));
        }

        _builder.AddSingleton(service, _ => func());
    }
}

public class TypeResolver : ITypeResolver
{
    private readonly IServiceProvider _provider;

    public TypeResolver(IServiceProvider provider)
    {
        _provider = provider ?? throw new ArgumentNullException(nameof(provider));
    }

    public object Resolve(Type type)
    {
        return _provider.GetRequiredService(type);
    }
}


No completion options for initializing struct members

Currently I don't see completion options when initializing struct members by name.
For example:
type T struct {
	VarOne int
	VarTwo int
}

t := T{VarTwo: 2}

In this example, when typing "VarTwo" in the struct "t" initialization, ST2 does not offer any completion options.

It looks like gocode has been updated, any update on this issue?


Quiz tmp error page in french

The temporary error message on  https://capitalympics.com/quiz is in french
expectation:
error message in english

Thank's for reporting it


add shipped date to erratum

Closes OSIDB-1197

Probably could use a data migration too

I am not sure how. The field is new and the values are not present anywhere in OSIDB.


fix(kalendar-git): fix install with pacstall 3.0.1

CI fails.

https://github.com/pacstall/pacstall-programs/pull/1689#issuecomment-1288871484


AddingPowerSupport_&_CI

Adding power support.
Adding power support ppc64le with Continues Integration/testing so that code remains architecture independent.
This is part of the Ubuntu distribution for ppc64le. This helps us simplify testing later when distributions are re-building and re-releasing. For more info tag @gerrith3.
The build is successful on both arch: amd64/ppc64le, please find the Travis Link below.
https://travis-ci.com/github/santosh653/godebug
Please let me know if you need any further details? or if I am missing any.
Thank You !!

@googlebot , I have signed the Agreement, Kindly process this PR.

If ll the checks are successful, Can you please Approve?

@googlebot Can you Please check & approve this PR? It's been open from quite some time.,

@kylelemons Herewith Checking if you have any further questions on this.
Thank you!!

I didn't even know about this feature, thanks!


Unable to launch kwm

I've been unable to start kwm a few times, with the following error:
❯ /usr/local/opt/kwm/kwm
dyld: Library not loaded: @rpath/libswiftAppKit.dylib
  Referenced from: /usr/local/Cellar/kwm/1.1.2/kwm-overlay
  Reason: image not found

This was installed form homebrew.
❯ /usr/local/opt/kwm/kwm --version
Kwm Version 1.1.2

I don't have XCode installed, should that somehow be related.
❯ sudo dtruss -f /usr/local/opt/kwm/kwm

dyld: Library not loaded: @rpath/libswiftAppKit.dylib
  Referenced from: /usr/local/Cellar/kwm/1.1.2/kwm-overlay
  Reason: image not found
	PID/THRD  SYSCALL(args) 		 = return
 4801/0x50f8:  thread_selfid(0x0, 0x0, 0x0)		 = 20728 0
 4801/0x50f8:  csops(0x0, 0x0, 0x7FFF5142F9B0)		 = 0 0
 4801/0x50f8:  issetugid(0x0, 0x0, 0x7FFF5142F9B0)		 = 0 0
 4801/0x50f8:  shared_region_check_np(0x7FFF5142D8A8, 0x0, 0x7FFF5142F9B0)		 = 0 0
 4801/0x50f8:  stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF5142EE38, 0x7FFF5142F9B0)		 = 0 0
 4801/0x50f8:  open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0)		 = 3 0
 4801/0x50f8:  pread(0x3, "\312\376\272\276\0", 0x1000, 0x0)		 = 4096 0
 4801/0x50f8:  pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x7000)		 = 4096 0
 4801/0x50f8:  fcntl(0x3, 0x61, 0x7FFF5142D180)		 = 0 0
 4801/0x50f8:  mmap(0x0, 0x670, 0x5, 0x1, 0x3, 0x7000)		 = 0x10E80B000 0
 4801/0x50f8:  munmap(0x10E80B000, 0x670)		 = 0 0
 4801/0x50f8:  mmap(0x10E810000, 0x2000, 0x5, 0x12, 0x3, 0x7000)		 = 0x10E810000 0
 4801/0x50f8:  mmap(0x10E812000, 0x1000, 0x3, 0x12, 0x3, 0x9000)		 = 0x10E812000 0
 4801/0x50f8:  mmap(0x10E813000, 0x2F40, 0x1, 0x12, 0x3, 0xA000)		 = 0x10E813000 0
 4801/0x50f8:  close(0x3)		 = 0 0

<snip>

I wrote the overlay, and am a little bit at a loss for why you are experiencing this error. For reference, what version of OS X are you using?

Assuming you have installed the OS X Developer Tools  (xcode-select --install), can you tell us what version of the swift compiler you are using?
You can do so by running the following.
❯ swiftc -v
Apple Swift version 2.1.1 (swiftlang-7<IP_ADDRESS> clang-700.1.81)
Target: x86_64-apple-darwin15.3.0

He has mentioned he installed though homebrew and does not have xcode installed. However, running xcode-select --install may fix this issue if my hunch is correct.

Hey folks,
Thanks for your help.
Some details:

For reference, what version of OS X are you using?

~
❯ sw_vers -productVersion
10.11.3

can you tell us what version of the swift compiler you are using?

~
❯ swiftc -v
Apple Swift version 2.1.1 (swiftlang-7<IP_ADDRESS> clang-700.1.81)
Target: x86_64-apple-darwin15.3.0

However, running xcode-select --install may fix this issue if my hunch is correct.

~
❯ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

I will have to experiment with uninstalling xcode and trying to run kwm. That is the difference I can see that may cause this issue.
In the mean time, I'd be curious if installing xcode fixes the issue, if it doesn't I have no idea what might be causing it.

What's the output of xcode-select -p?
Can you manually add the paths that are missing to the Makefile using swiftc -L /path/to/missing.dylib?

What's the output of xcode-select -p?

❯ xcode-select -p
/Library/Developer/CommandLineTools

I'm not sure what to do here:
/Library/Developer/CommandLineTools/usr/lib/swift/macosx
❯ swiftc -L /Library/Developer/CommandLineTools/usr/lib/swift/macosx/*
ld: warning: path '/Library/Developer/CommandLineTools/usr/lib/swift/macosx/libswiftAVFoundation.dylib' following -L not a directory
ld: can't map file, errno=22 file '/Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64' for architecture x86_64

I've discovered I can make it work using the following
DYLD_LIBRARY_PATH=/Library/Developer/CommandLineTools/usr/lib/swift/macosx /usr/local/Cellar/kwm/1.1.2/kwm-overlay

Edit your .bash_profile or .zshrc accordingly and add the following line:
export DYLD_LIBRARY_PATH=/Library/Developer/CommandLineTools/usr/lib/swift/macosx/:$DYLD_LIBRARY_PATH

@dominiklohmann That doesn't seem to have helped. Opening the console, the logs are full of these:

As far as I know, applications launched through launchd does not read the .bashrc, or even the PATH environment variables.
I do not know of a way to fix this, nor do I know what causes it.
In the meantime, you can prevent Kwm from trying to load kwm-overlay by making sure your kwmrc contains
kwmc config focused-border disable
kwmc config marked-border disable
kwmc config prefix-border disable

@koekeishiya Thanks! That's allowed kwm to run again.
@chrishoage @dominiklohmann I'm going to switch off the overlay for now, but please feel free to get in touch if you want me to debug anything on your behalf.

launchctl setenv DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH right after that line I suggested before should allow applications run through launchctl to pick up that environment variable.

I will investigate how to set the DYLD_LIBRARY_PATH automatically. As of this moment my guess is that installing xcode sets that for me? I need xcode to compile a server I use for work, so I won't be able to investigate this until this weekend.
There is probably some build flag I need to set.
http://stackoverflow.com/questions/14888668/how-to-set-dyld-library-path-in-xcode

One kinda ugly solution would be to manually set it before Line 26 in kwm/border.cpp if the needed dylib is not in the environment variable already. This can be done by simply changing Line 26 to the following:
static const std::string DYLDLibraryPath = "DYLD_LIBRARY_PATH=/Library/Developer/CommandLineTools/usr/lib/swift/macosx/:$DYLD_LIBRARY_PATH";
std::string OverlayBin = DYLDLibraryPath + " " + KWMPath.FilePath + "/kwm-overlay";

Same here, the solution was to disable the overlay!

Same same here, I disabled the overlay.


how to get Esim EID？

In the ESim.Eid Property show that this functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.
How to  be a mobile network operator?

This appears to be a question about the feature itself, not a question about the sample. You can follow the instructions on Windows developer support for support options. (Click "Forums and community".)
But the way to be a mobile network operator is to be a company like Verizon or T-Mobile.


Add support for get-4o-mini

Please provide us with the following information:

This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Expected/desired behavior

Change the template to accept gpt-4o-mini as a valid name of a model

Mention any other details that might be useful
I can make the change an PR, if you can assign this to me

Thanks! We'll be in touch soon.

I created PR #355 with the change

Thanks @DFMERA , just reviewed and approved the PR!


New version of platform (5.0.12.beta) breaks BasicClusteredCacheOpsReplicationMultiThreadedTest

Supposedly because of a runnel change
Here is the stack trace :
 com.tc.exception.TCRuntimeException: Uncaught exception in stage
 	at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:211)
 Caused by: java.lang.RuntimeException: org.terracotta.exception.EntityUserException: Entity: org.ehcache.clustered.client.internal.EhcacheClientEntity:crud-cm-replication exception in user code: org.terracotta.exception.EntityUserException: Entity: org.ehcache.clustered.client.internal.EhcacheClientEntity:crud-cm-replication exception in user code: Runtime exception in deserializer
 	at com.tc.objectserver.entity.ManagedEntityImpl.invoke(ManagedEntityImpl.java:403)
 	at com.tc.objectserver.entity.ManagedEntityImpl.lambda$processInvokeRequest$73(ManagedEntityImpl.java:238)
 	at com.tc.objectserver.entity.ManagedEntityImpl$$Lambda$31/409111087.run(Unknown Source)
 	at com.tc.objectserver.entity.ManagedEntityImpl$SchedulingRunnable.run(ManagedEntityImpl.java:908)
 	at com.tc.objectserver.entity.RequestProcessor$EntityRequest.invoke(RequestProcessor.java:157)
 	at com.tc.objectserver.entity.RequestProcessor$EntityRequest.run(RequestProcessor.java:149)
 	at com.tc.objectserver.entity.RequestProcessorHandler.handleEvent(RequestProcessorHandler.java:27)
 	at com.tc.objectserver.entity.RequestProcessorHandler.handleEvent(RequestProcessorHandler.java:23)
 	at com.tc.async.impl.StageQueueImpl$HandledContext.runWithHandler(StageQueueImpl.java:502)
 	at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:197)
 Caused by: org.terracotta.exception.EntityUserException: Entity: org.ehcache.clustered.client.internal.EhcacheClientEntity:crud-cm-replication exception in user code: org.terracotta.exception.EntityUserException: Entity: org.ehcache.clustered.client.internal.EhcacheClientEntity:crud-cm-replication exception in user code: Runtime exception in deserializer
 	at com.tc.objectserver.entity.ManagedEntityImpl.invoke(ManagedEntityImpl.java:401)
 	... 9 more
 Caused by: java.lang.RuntimeException: org.terracotta.exception.EntityUserException: Entity: org.ehcache.clustered.client.internal.EhcacheClientEntity:crud-cm-replication exception in user code: Runtime exception in deserializer
 	at com.tc.objectserver.entity.ManagedEntityImpl.performAction(ManagedEntityImpl.java:629)
 	at com.tc.objectserver.entity.ManagedEntityImpl.invoke(ManagedEntityImpl.java:380)
 	... 9 more
 Caused by: org.terracotta.exception.EntityUserException: Entity: org.ehcache.clustered.client.internal.EhcacheClientEntity:crud-cm-replication exception in user code: Runtime exception in deserializer
 	at com.tc.objectserver.entity.ManagedEntityImpl.runWithHelper(ManagedEntityImpl.java:292)
 	at com.tc.objectserver.entity.ManagedEntityImpl.performAction(ManagedEntityImpl.java:622)
 	... 10 more
 Caused by: org.terracotta.entity.MessageCodecException: Runtime exception in deserializer
 	at com.tc.objectserver.entity.ManagedEntityImpl.runWithHelper(ManagedEntityImpl.java:291)
 	... 11 more
 Caused by: java.lang.IllegalArgumentException: No such field : elements
 	at org.terracotta.runnel.metadata.FieldSearcher.findField(FieldSearcher.java:40)
 	at org.terracotta.runnel.encoding.StructEncoder.structs(StructEncoder.java:222)
 	at org.ehcache.clustered.common.internal.messages.ChainCodec.encode(ChainCodec.java:55)
 	at org.ehcache.clustered.common.internal.messages.ResponseCodec$1.encode(ResponseCodec.java:118)
 	at org.terracotta.runnel.encoding.StructEncoder.struct(StructEncoder.java:130)
 	at org.ehcache.clustered.common.internal.messages.ResponseCodec.encode(ResponseCodec.java:113)
 	at org.ehcache.clustered.common.internal.messages.EhcacheCodec.encodeResponse(EhcacheCodec.java:112)
 	at org.ehcache.clustered.server.internal.messages.EhcacheServerCodec.encodeResponse(EhcacheServerCodec.java:86)
 	at org.ehcache.clustered.server.internal.messages.EhcacheServerCodec.encodeResponse(EhcacheServerCodec.java:37)
 	at com.tc.objectserver.entity.ManagedEntityImpl.lambda$performAction$78(ManagedEntityImpl.java:622)
 	at com.tc.objectserver.entity.ManagedEntityImpl$$Lambda$32/1717492671.run(Unknown Source)
 	at com.tc.objectserver.entity.ManagedEntityImpl.runWithHelper(ManagedEntityImpl.java:286)
 	... 11 more

You can also find the stacktrace on cloubees (search for elements) : https://ehcache.ci.cloudbees.com/job/ehcache3-pull-requests/3482/jdk=Oracle JDK 1.8(latest),label_exp=standard,testVM=8/testReport/junit/org.ehcache.clustered.replication/BasicClusteredCacheOpsReplicationMultiThreadedTest/testClear_consistency_EVENTUAL_/

The runnel struct aliasing feature was causing this regression, so it's been backed out (https://github.com/Terracotta-OSS/terracotta-platform/issues/199) as no merged code requires it yet.
I'm now investigating what exactly in that new feature introduced that bug.

Root Cause Analysis done; the problem is that while runnel isn't supposed to be thread-safe, it still has to provide some safety in multi-threaded environments.
Encoders and Decoders are not thread-safe and need not be, but many threads accessing a pre-initialized Struct to request an Encoder or a Decoder is an obvious use-case that must be supported by runnel.
The backed-out implementation of the aliasing feature was deferring Struct initialization until the very first time an encoder or decoder was requested, while none of the internal structures were thread-safe nor properly guarded.
https://github.com/Terracotta-OSS/terracotta-platform/issues/202 has been opened to make sure the required thread-safety characteristics en up being documented.


Map cache does not detect function changes in another module

# dataset.py
import os
import datasets

if not os.path.exists('/tmp/test.json'):
  with open('/tmp/test.json', 'w') as file:
    file.write('[{"text": "hello"}]')

def transform(example):
  text = example['text']
  # text += ' world'
  return {'text': text}

data = datasets.load_dataset('json', data_files=['/tmp/test.json'], split='train')
data = data.map(transform)

# test.py
import dataset
print(next(iter(dataset.data)))

Initialize cache
python3 test.py
# {'text': 'hello'}

Edit dataset.py and uncomment the commented line, run again
python3 test.py
# {'text': 'hello'}
# expected: {'text': 'hello world'}

Clear cache and run again
rm -rf ~/.cache/huggingface/datasets/*
python3 test.py
# {'text': 'hello world'}

If instead the two files are combined, then changes to the function are detected correctly. But it's expected when working on any realistic codebase that things will be modularized into separate files.

This issue is a duplicate of https://github.com/huggingface/datasets/issues/3297.  This is a limitation of dill, a package we use for caching (non-__main__ module objects are serialized by reference). You can find more info about it here: https://github.com/uqfoundation/dill/issues/424.
In your case, moving
data = datasets.load_dataset('json', data_files=['/tmp/test.json'], split='train')
data = data.map(transform)

to test.py  and setting transform.__module__ = None at the end of dataset.py should fix the issue.

I understand this may be a limitation of an upstream tool, but for a user for datasets this is very annoying, as when you have dozens of different datasets with different preprocessing functions you can't really move them all into the same file. It may be worth seeing if there is a way to specialize the dependency (eg. subclass it) and enforce behaviors that makes sense for your product.
I was able to work around this for now by setting module = None. If such workarounds are required for now it may be better to document it somewhere than a single obscure issue from a long time ago.
As this is a duplicate issue I'm closing it.
I have another issue with the cache https://github.com/huggingface/datasets/issues/6179 can you take a look?


Feature/separate ajax files

Removed admin-ajax usage for theme sniffing, and instead use REST API.
Added endpoints for sniff initialization and for individual sniff callback files.

@grappler @ernilambar Can you take a look at this?

I ran the test on a clean install on VVV with test underscores theme, and I got these results:

It would be interesting to compare it to the ajax version on the same system.

This is the result using AJAX:

Not a big difference but seems a bit faster. Which is kinda odd, as REST should generally be faster.

What are the pros of using REST if performance is similar?

Well on the admin side admin-ajax.php is fast (admin is already loaded), but on the front it's slower since it is loading the entire admin to run it.
There is an explanation here: https://wordpress.stackexchange.com/a/273781/58895
My idea was using more modern approach plus (from what I understand) admin-ajax will be replaced by REST in the future.

@grappler @ernilambar So what's the verdict about this? :)

@dingo-d :+1: from my side.

I am fine with merging it. I just thought it is important that we compare the two.


Is SVM a good choice for large amount class classification?

I am trying to use SVM to classify unknown image. In my use case, I have almost 1400 classes of people to classify. But when I apply SVM on my pipeline the performance is so bad that I really doubt that if SVM is the best choice.
My pipeline is shown as below.

Collect images in each class
The amount of face of each person is not fixed, from about max 600 to min 20. But the angle of face is not fixed also.

Embed by facenet & remove outlier
After collecting all class image, input all of them to facenet class by class. I remove outlier in  each class using Local Outlier Factor and set n_neighbors=10

Apply SVM as final classifier
Here is the most difficult stage I meet. After survey on the internet I think maybe the reason is that output of facenet 128 dimension vector which is much less than the number of classes.

Apart from the reason I mentioned (dimension difference between embedding vector & amount of classes) I think there are still somewhere may cause such problem.

the size of bounding box is too small or resolution may too low

the algorithm I choose or some parameter can be tuned

I hope I describe my problem well enough for everyone to understand. If there is still some information I need to provide, please let me know. Thank you.

My experience is that in large amount class classification, SVM works not as well as small dataset.

Which method you would recommend in this kind of situation?
I think what if I merge some similar classes into big class, make two layers of classifiers. Try to reduce amount of classes each time.
Have you ever try this on practical scenario?
If so, will this be solution of my issue?

I actually use lshforest for classification, it doesn't give accuracy rather gives the nearest face embedding distance so that i can keep another filter while recognizing the face like checking the distance with distance threshold.

@pavankumarkatakam Hi, can you give your codes which is used lshforest model?
Now I only use a SVM model and I think the accuray of face recognition could be improved.
Thanks


Dry::Validation::Contract behaves different when defined with a params Dry::Schema::Params(parent: RawSchema) vs. params ParamsSchema

Describe the bug
When Dry::Validation::Contract contains params Dry::Schema::Params(parent: RawSchema) (where RawSchema is defined using Dry::Schema.define do ... end), it fails to coerce empty Strings into Integers. However, if I define a ParamsSchema using Dry::Schema::Params() do ... end containing the same param definitions, and add params ParamsSchema to my Dry::Validation::Contract class, it works as expected.
To Reproduce
require 'dry/types'
require 'dry/schema'
require 'dry/validation'

module Types
  include Dry::Types()
end

RawSchema = Dry::Schema.define do
  required(:foo).filled(:string)
  optional(:bar).maybe(:integer)
end

ParamsSchema = Dry::Schema::Params() do
  required(:foo).filled(:string)
  optional(:bar).maybe(:integer)
end

class WrappedParamsSchemaValidation < Dry::Validation::Contract

  params Dry::Schema::Params(parent: RawSchema)

end

class ParamsSchemaValidation < Dry::Validation::Contract

  params ParamsSchema

end

params = {"foo" => "a", "bar" => ""}

p WrappedParamsSchemaValidation.new.call(params)
p ParamsSchemaValidation.new.call(params)

Expected behavior
#<Dry::Validation::Result{:foo=>"a", :bar=>nil} errors={}>
#<Dry::Validation::Result{:foo=>"a", :bar=>nil} errors={}>

Actual behavior
#<Dry::Validation::Result{:foo=>"a", :bar=>""} errors={:bar=>["must be an integer"]}>
#<Dry::Validation::Result{:foo=>"a", :bar=>nil} errors={}>

My environment

Affects my production application: NO (the app is not running in production)
Ruby version: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux]
dry-types: 1.7.1
dry-schema: 1.13.1
dry-validation: 1.10.0

Oh interesting. This does look like a bug because using params should preset processor to use params coercion regardless of the parent schema. Thanks for reporting this, good catch.

@solnic what's your rough estimation for how long it will take to find and fix this bug? Obviously being forced to copy the my shared schema for mapping in both HTTP params and a JSON Hash isn't ideal, although it's the only workaround I found.


[webview_flutter][Android] Non youtube iframe video not showing up

Steps to reproduce

Open a page with an iframe with a player playing .ts videos (some streaming services does that)
Try playing the video

Expected results
The video starts
Actual results
Android logo appears on top left of screen and nothing happens.
Also i see in debug this message:
MediaCodec discarded an unknown buffer
Code sample
Code sample
import "package:flutter/material.dart";
import "package:nextflix/repositories/preferences.dart";
import "package:nextflix/services/url_modale.dart";
import "package:nextflix/utils/env.dart";
import "package:nextflix/utils/url_utils.dart";
import "package:webview_flutter/webview_flutter.dart";
import "package:webview_flutter_android/webview_flutter_android.dart";
import "package:webview_flutter_wkwebview/webview_flutter_wkwebview.dart";

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  late final WebViewController _controller;
  late final Preferences preferences;

  @override
  void initState() {
    super.initState();
    final PlatformWebViewControllerCreationParams params= WebKitWebViewControllerCreationParams(
        allowsInlineMediaPlayback: true,
        mediaTypesRequiringUserAction: const {}
    );

    _controller = WebViewController.fromPlatformCreationParams(params)
    ..setJavaScriptMode(JavaScriptMode.unrestricted)
    ..setBackgroundColor(const Color(0x00000000))
    ..setUserAgent("Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0")
    ..setNavigationDelegate(NavigationDelegate(
      onProgress: (int progress) {
        //loading bar
      },
      onPageStarted: (String url) {},
      onPageFinished: (String url) {},
      onHttpError: (HttpResponseError error) {
        print(error.request?.uri.toString());
      },
      onWebResourceError: (WebResourceError error) {
        print(error.url);
      },
      onUrlChange: (UrlChange change) {
        print("Change: ${change.url}");
      },
      onNavigationRequest: (NavigationRequest request) {
        return NavigationDecision.navigate;
      }
      ))
    ..loadRequest('some_video_ts_iframe_player');

    if (_controller.platform is AndroidWebViewController) {
      AndroidWebViewController.enableDebugging(true);
      (_controller.platform as AndroidWebViewController)
          .setMediaPlaybackRequiresUserGesture(false);

      (_controller.platform as AndroidWebViewController).setCustomWidgetCallbacks(
        onShowCustomWidget: (Widget widget, OnHideCustomWidgetCallback callback) {
          Navigator.of(context).push(MaterialPageRoute<void>(
            builder: (BuildContext context) => widget,
            fullscreenDialog: true,
          ));
        },
        onHideCustomWidget: () {
          Navigator.of(context).pop();
        },
      );
    }
  }

  @override
  Widget build(BuildContext context) => Scaffold(body: WebViewWidget(controller: _controller));
}

Screenshots or Video

Visual result

Logs
Logs (after page opening)
D/AAudio  ( 6837): AAudioStream_requestStop(s#1) called
D/AAudioStream( 6837): setState(s#1) from 4 to 9
D/AudioTrack( 6837): stop(18): called with 37000 frames delivered
D/AAudioStream( 6837): setState(s#1) from 9 to 10
I/flutter ( 6837): https://sc-b1-06.scws-content.net/hls/30/1/14/114c1804-c26c-4733-8329-3a00a9d3003a/video/720p/0001-0250.ts?token=ahtFbu1fWr04oV9BhKPyKw&expires=1725814108
W/cr_MediaCodecBridge( 6837): Releasing: c2.goldfish.h264.decoder
D/SurfaceUtils( 6837): connecting to surface 0xe97e5c98, reason connectToSurface
I/MediaCodec( 6837): [c2.goldfish.h264.decoder] setting surface generation to 7001092
D/SurfaceUtils( 6837): disconnecting from surface 0xe97e5c98, reason connectToSurface(reconnect)
D/SurfaceUtils( 6837): connecting to surface 0xe97e5c98, reason connectToSurface(reconnect)
D/Codec2-OutputBufferQueue( 6837): remote graphic buffer migration 4/4
D/Codec2Client( 6837): setOutputSurface -- failed to set consumer usage (6/BAD_INDEX)
D/Codec2Client( 6837): setOutputSurface -- generation=7001092 consumer usage=0x900
E/FrameEvents( 6837): updateAcquireFence: Did not find frame.

E/FrameEvents( 6837): updateAcquireFence: Did not find frame.
D/EGL_emulation( 6837): app_time_stats: avg=147.20ms min=35.77ms max=330.37ms count=7
D/EGL_emulation( 6837): app_time_stats: avg=104.40ms min=50.20ms max=168.41ms count=10
D/EGL_emulation( 6837): app_time_stats: avg=148.43ms min=59.03ms max=308.90ms count=7
D/BufferPoolAccessor2.0( 6837): bufferpool2 0xe9690e08 : 0(0 size) total buffers - 0(0 size) used buffers - 9/14 (recycle/alloc) - 5/10 (fetch/transfer)
D/BufferPoolAccessor2.0( 6837): evictor expired: 1, evicted: 1
D/BufferPoolAccessor2.0( 6837): evictor expired: 1, evicted: 0
D/AAudio  ( 6837): AAudioStream_close(s#1) called ---------------
D/AAudioStream( 6837): setState(s#1) from 10 to 11
D/AAudioStream( 6837): setState(s#1) from 11 to 12
D/AAudioStream( 6837): ~AudioStream(s#1) mPlayerBase strongCount = 2
D/AAudio  ( 6837): AAudioStream_close(s#1) returned 0 ---------

Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.22.1, on Ubuntu 22.04.4 LTS 6.5.0-41-generic, locale it_IT.UTF-8)
    • Flutter version 3.22.1 on channel stable at /home/mcolpo/.android/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (7 settimane fa), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /home/mcolpo/.android/
    • Platform android-35, build-tools 35.0.0
    • ANDROID_SDK_ROOT = /home/mcolpo/.android
    • Java binary at: /home/mcolpo/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2024.1)
    • Android Studio at /home/mcolpo/.local/share/JetBrains/Toolbox/apps/android-studio
    • Flutter plugin version 80.0.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at /home/mcolpo/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
    • Flutter plugin version 80.0.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.91.0)
    • VS Code at /usr/share/code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • AOSP TV on x86 (mobile) • emulator-5554 • android-x86    • Android 14 (API 34) (emulator)
    • Linux (desktop)         • linux         • linux-x64      • Ubuntu 22.04.4 LTS 6.5.0-41-generic
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 126.0.6478.126

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Yep, sorry about that (i was try different things without cleaning after). Here's a better example:
import "package:flutter/material.dart";
import "package:nextflix/repositories/preferences.dart";
import "package:webview_flutter/webview_flutter.dart";
import "package:webview_flutter_android/webview_flutter_android.dart";
import "package:webview_flutter_wkwebview/webview_flutter_wkwebview.dart";

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  late final WebViewController _controller;
  late final Preferences preferences;

  @override
  void initState() {
    super.initState();
    final PlatformWebViewControllerCreationParams params =
        WebKitWebViewControllerCreationParams(
            allowsInlineMediaPlayback: true,
            mediaTypesRequiringUserAction: const {});

    _controller = WebViewController.fromPlatformCreationParams(params)
      ..setJavaScriptMode(JavaScriptMode.unrestricted)
      ..setBackgroundColor(const Color(0x00000000))
      ..setUserAgent(
          "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0")
      ..setNavigationDelegate(NavigationDelegate(
          onProgress: (int progress) {
            //loading bar
          },
          onPageStarted: (String url) {},
          onPageFinished: (String url) {},
          onHttpError: (HttpResponseError error) {},
          onWebResourceError: (WebResourceError error) {},
          onUrlChange: (UrlChange change) {
            print("Change: ${change.url}");
          },
          onNavigationRequest: (NavigationRequest request) {
            List<String> authorizedAuthorities = [
              "vixcloud.co",
              "scws-content.net",
              "streamingcommunity.boston"
            ];
            if (authorizedAuthorities.any((String authority) =>
                Uri.parse(request.url).host.contains(authority))) {
              return NavigationDecision.navigate;
            }
            return NavigationDecision.prevent;
          }))
    ..loadRequest(Uri.parse("https://streamingcommunity.boston/watch/4703"));

    if (_controller.platform is AndroidWebViewController) {
      AndroidWebViewController.enableDebugging(false);
      (_controller.platform as AndroidWebViewController)
          .setMediaPlaybackRequiresUserGesture(false);

      (_controller.platform as AndroidWebViewController)
          .setCustomWidgetCallbacks(
        onShowCustomWidget:
            (Widget widget, OnHideCustomWidgetCallback callback) {
          Navigator.of(context).push(MaterialPageRoute<void>(
            builder: (BuildContext context) => widget,
            fullscreenDialog: true,
          ));
        },
        onHideCustomWidget: () {
          Navigator.of(context).pop();
        },
      );
    }
  }

  @override
  Widget build(BuildContext context) =>
      Scaffold(body: WebViewWidget(controller: _controller));
}

Thanks, but when I access the url above from my browser (chrome) on desktop machine (MacBook), it's not playable as well. I click on the play button but always prompts a new tab with ads, not sure if it's a correct video. Can you confirm it with different tools (video player app, online player..)?
I also tried playing some ts video files here https://filesamples.com/formats/ts and see that they are playable as normal video on desktop app (VLC for example).

Even though I usually use adblock, I confirm i can play the video when it's disabled:

I'm using Firefox, ads are the reason of this:
List<String> authorizedAuthorities = [
              "vixcloud.co",
              "scws-content.net",
              "streamingcommunity.boston"
            ];
            if (authorizedAuthorities.any((String authority) =>
                Uri.parse(request.url).host.contains(authority))) {
              return NavigationDecision.navigate;
            }

You are right, the video is playable after closing all ads on desktop browser.
I do some tests: The video can play on Flutter iOS (app) and Android native app with WebView but can't play on Flutter Android with WebViewWidget.
The current package version: webview_flutter_android: ^3.16.4

Demo (Android Flutter app and Android native app)

Android native
Android Flutter

Complete sample code (removed unnecessary imports)
import "package:flutter/material.dart";
import "package:webview_flutter/webview_flutter.dart";
import "package:webview_flutter_android/webview_flutter_android.dart";
import "package:webview_flutter_wkwebview/webview_flutter_wkwebview.dart";

void main(List<String> args) {
  runApp(MaterialApp(home: Home()));
}

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  late final WebViewController _controller;

  @override
  void initState() {
    super.initState();
    final PlatformWebViewControllerCreationParams params =
        WebKitWebViewControllerCreationParams(
            allowsInlineMediaPlayback: true,
            mediaTypesRequiringUserAction: const {});

    _controller = WebViewController.fromPlatformCreationParams(params)
      ..setJavaScriptMode(JavaScriptMode.unrestricted)
      ..setBackgroundColor(const Color(0x00000000))
      ..setUserAgent(
          "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0")
      ..setNavigationDelegate(NavigationDelegate(
          onProgress: (int progress) {
            //loading bar
          },
          onPageStarted: (String url) {},
          onPageFinished: (String url) {},
          onHttpError: (HttpResponseError error) {},
          onWebResourceError: (WebResourceError error) {},
          onUrlChange: (UrlChange change) {
            print("Change: ${change.url}");
          },
          onNavigationRequest: (NavigationRequest request) {
            List<String> authorizedAuthorities = [
              "vixcloud.co",
              "scws-content.net",
              "streamingcommunity.boston"
            ];
            if (authorizedAuthorities.any((String authority) =>
                Uri.parse(request.url).host.contains(authority))) {
              return NavigationDecision.navigate;
            }
            return NavigationDecision.prevent;
          }))
    ..loadRequest(Uri.parse("https://streamingcommunity.boston/watch/4703"));

    if (_controller.platform is AndroidWebViewController) {
      AndroidWebViewController.enableDebugging(false);
      (_controller.platform as AndroidWebViewController)
          .setMediaPlaybackRequiresUserGesture(false);

      (_controller.platform as AndroidWebViewController)
          .setCustomWidgetCallbacks(
        onShowCustomWidget:
            (Widget widget, OnHideCustomWidgetCallback callback) {
          Navigator.of(context).push(MaterialPageRoute<void>(
            builder: (BuildContext context) => widget,
            fullscreenDialog: true,
          ));
        },
        onHideCustomWidget: () {
          Navigator.of(context).pop();
        },
      );
    }
  }

  @override
  Widget build(BuildContext context) =>
      Scaffold(body: WebViewWidget(controller: _controller));
}

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.22.2 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (3 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode15.4.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

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

[✓] Connected device (3 available)
    • iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.8 19H370
    • macOS (desktop) • macos                                    • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)    • chrome                                   • web-javascript • Google Chrome 126.0.6478.127

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[!] Flutter (Channel master, 3.24.0-1.0.pre.93, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.24.0-1.0.pre.93 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dddea4d155 (3 hours ago), 2024-07-11 17:16:10 -0700
    • Engine revision 36dccf7bb2
    • Dart version 3.6.0 (build 3.6.0-26.0.dev)
    • DevTools version 2.37.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode15.4.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

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

[✓] Connected device (4 available)
    • Pixel 7 (mobile) • 2B171FDH20084L                           • android-arm64  • Android 14 (API 34)
    • iPhone (mobile)  • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.8 19H370
    • macOS (desktop)  • macos                                    • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)     • chrome                                   • web-javascript • Google Chrome 126.0.6478.127

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

solved？

solved？

No

solved？

No

Hi. I also stuck in similar issue. did you solve this issue?

solved？

No

Hi. I also stuck in similar issue. did you solve this issue?

Nope, i tried other settings but nothing seems to work, anyway it seems it’s a codec problem, I don’t get why on normal browser works perfectly.


Removed slather reports and updated git ignore file

Because of how long the slather reports are (and the fact that they are in HTML) the repo is being marked as HTML.  I removed the slather reports and added the /bin and /html directories to the gitignore so they won't be committed anymore.

Coverage remained the same at 74.278% when pulling 89fb5af52f7818e51a2351fcb6c6ad5765492acf on feature/Remove_Slather_Reports into d590992169aef3ef96dadc3f74a6a492c538e1e5 on develop.


When demo.py is run according to the readme content, the final data is all 0. Why is this?

Thank you for your valuable feedback!
This is possibly a compatibility issue about the environment. Would you mind sharing more information about this issue? This can help us improve the code. Thanks!

I am running on the macos platform and this is my debugging result:
Evaluation #1: 1% | | 1/142 [00:00<01:33, 1.51it/s] System maximum memory limit:<PHONE_NUMBER>854775807 bytes
Current RLIMIT_DATA:<PHONE_NUMBER>854775807,<PHONE_NUMBER>854775807)
Set memory limit to: 68719548 bytes
Exception occurred: Current limit exceeds maximum limit
System maximum memory limit:<PHONE_NUMBER>854775807 bytes
Current RLIMIT_DATA:<PHONE_NUMBER>854775807,<PHONE_NUMBER>854775807)
Set memory limit to: 68719548 bytes
Exception occurred: Current limit exceeds maximum limit
May I ask what platform you are using?

The zero scores are possibly because an error occurred during evaluation. If an error occurs during evaluation, our evaluator function will catch the error and assign a zero score to the code sample. Could you find out what error occurred in your evaluation?
My platform is Ubuntu 20.04.6 LTS. Our set_memory_limit function was tested only under Linux systems, but Mac OS is not a Linux system but a Unix system. This may have caused an error.
By the way, the memory limit (68719548 B=65.5MB) might be a bit too small, which can also negatively affect the evaluation results. Since we have large-scale test cases, the recommended memory limit is 4GB.


feat: using rslog as logger

Summary
https://github.com/rspack-contrib/rslog

Related Issue
https://github.com/web-infra-dev/rspress/issues/129
Checklist

[x] I have added changeset via pnpm run change.
[ ] I have updated the documentation.
[ ] I have added tests to cover my changes.

LGME


Added missing break statements to swtich statement

Clients are getting kicked with the following error due to the fall through from the SERVER to the CLIENT due to the missing break statement:
[08:20:38] [Server thread/ERROR] [FML/]: There was a critical exception handling a packet on channel Numina
java.lang.NoSuchMethodError: net.machinemuse.numina.network.MusePacketHandler.getClientPlayer()Lnet/minecraft/entity/player/EntityPlayer;

good catch


Unable to rename multiple files

It's not clear how one can rename multiple files from different directories. I've tried breaking it out so that gulp will rename each file individually. As you can imagine, this is very inefficient for a large number of files as I'd have to define a task for each one.
gulp.task('rename1', function () {
  return gulp.src("build/**/*.js")
    .pipe(rename("public/main" + version + ".js"))
    .pipe(gulp.dest("build"));
});

gulp.task('renametwo', function () {
  return gulp.src("build/**/*.js")
    .pipe(rename("directoryA/file" + version + ".js"))
    .pipe(gulp.dest("build"));
});

gulp.task('renamethree', function () {
  return gulp.src("build/**/*.js")
    .pipe(rename("directoryB/someFile" + version + ".js"))
    .pipe(gulp.dest("build"));
});

//... a few more times

However, when I run gulp, only the first task completes -- none of the other files get renamed.
As an aside, is there just a way to rename multiple files from different directories? It doesn't appear that gulp-rename supports this ability.

Update:
To clarify, I want to rename someFile.js to someFile-v1.1.js for multiple files that are all in different directories.
Imagine something like
build/
    folder1/
        aFileIWantToRename.js
    folder2/
        subFolder/
             anotherFileToBeRenamed.js
    folder3/
       anotherSubFolder/
              subSubFolder/
                   renameThisFileToo.js

    ....

All those files I want to rename with the current name plus some string, in this case version. I want to keep the same location as well. I know that rename does not handle deleting files, so I would have something such as
build/
    folder1/
        aFileIWantToRename.js
        aFileIWantToRename-v1.1.js
    folder2/
        subFolder/
             anotherFileToBeRenamed.js
             anotherFileToBeRenamed-v1.1.js
    folder3/
       aFileIDon'tCareAbout.js
       anotherSubFolder/
              subSubFolder/
                   renameThisFileToo.js
                   renameThisFileToo-v1.1.js
    ....

Yeah, it does. What's your desired output? Having a hard time figuring out what you want to do from your code.

@contra I want to rename someFile.js to someFile-v1.1.js for multiple files that are all in different directories.

@contra Please see my updated post

Well, you can pass multiple globs to gulp.src for your different folders and pass a function to gulp-rename that has any logic you want in it to handle the renaming (if file is from so and so folder, rename to xyz, etc.)
For routing the files to the right folders on dest, you can use something like gulp-if.

@contra Can you explain how to do that last bit?
gulp.task('rename', function() {
  gulp.src([
      // all the different files
    ])
    .pipe(rename({
      suffix: version,
    }))
    .pipe(gulp.dest(/* the original location of each respective file */));
});

BTW, even if I do gulp.dest("build"), only the first file in src shows up. Why don't the other ones get processed?

gulp.task('rename', function() {
  return gulp.src('build/**/*.js')
    .pipe(rename({ suffix: version }))
    .pipe(gulp.dest('build'));
});

This only processes one file for you?

Cleaning up old tickets so I'm going to close this - if you still have this issue let me know and I'll reopen it.

@alburritos found the solution ? seems the solution from @contra only process one file.
gulp.src('../../src/**/test.js')     .pipe(rename('test1.js'))     .pipe(gulp.dest('dest'));
I thought all file in the src folder will be copied and rename to test1.js
but I only see only test1.js in the folder "test"


ImportError: DLL Load failed  while importing _pylammacpp: The specified module could not be found

Getting above error when I type run.bat. Any ideas on how to fix this?

Hi there have you installed the tool using install.bat?
It is supposed to install the pyllamacpp library.

Yes I have run install.bat. pylammacpp is also present in my env\lib\site-packages

This is odd. it seems to be an issue in pyllamacpp module. You can post an issue on their repository here:
https://github.com/nomic-ai/pyllamacpp


Message | 'Unable to modify the shortcut'

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce

Right-click the title bar of PowerShell 7+;
Select Properties;
Make at least one setting change;
Click OK.

Expected behavior
Non-unfixed issue's behaviour hence no error revealing yet poor code.

Actual behavior
Change(s) made not persistent when new tool's sessions are started.

Error details
See section _Visuals_.

Environment data
Name                           Value                                                                                ----                           -----                                                                                PSVersion                      7.3.6                                                                                PSEdition                      Core                                                                                GitCommitId                    7.3.6                                                                                OS                             Microsoft Windows 10.0.22000                                                                        Platform                       Win32NT                                                                                PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}                                                                               PSRemotingProtocolVersion      2.3                                                                                SerializationVersion           <IP_ADDRESS>                                                                                WSManStackVersion              3.0

Visuals

It is indeed an annoying problem, and it has come up at least 3 times before:

#14978
#13148
#7825

Unfortunately, all these issues were closed; @iSazonov  offered this resolution here:

PowerShell msi is installed on system, not user. It is how MSI works. The shortcut is protected by OS permissions.
You can create a custom shortcut and modify its properties.

Some background information and workarounds are here.

@Ricky-Tigg, does that mean that now that you know the technical reason for the problem, you don't think there's a problem, after all?

"This is how Microsoft wants MSI to work." is solely related to the attitude of Microsoft, which is hardly embarrassed to demonstrate its inability to correct obvious software aberrations, by closing fully valid tickets one after the other.

@Ricky-Tigg, I share your frustration with respect to this not getting fixed.
Let me provide some analysis that may point toward a solution:

From MSI's perspective, the behavior makes sense:

The all-users PowerShell installation places a shortcut file (.lnk) in a shared location ($env:ALLUSERSPROFILE, typically C:\ProgramData)
Given that the installation is shared and that elevation was required to perform the installation, it makes sense to also require elevation to modify the shortcut file later.

From the perspective of the Windows shell and its Properties dialog:

The UX, as shown in your initial post, is terrible:

(a) the error message is confusing and  obscures the true problem.

(b) even though an interactive solution is possible - i.e., to ask for the necessary permissions to modify the shortcut file via a UAC dialog - it isn't offered

Fixing this problem requires a change to Windows itself.

Separately, there's PowerShell's decision to use MSI in a manner that places  the .lnk file in $env:ALLUSERSPROFILE

I don't know MSI well enough to know if there's an alternative approach that creates user-specific .lnk files instead, which would avoid the problem.

Notably, such an approach would require ensuring that such user-specific .lnk files are automatically created / copied to future user accounts on creation.

"This is how Microsoft wants MSI to work." is solely related to the attitude of Microsoft, which is hardly embarrassed to demonstrate its inability to correct obvious software aberrations, by closing fully valid tickets one after the other.

It is rather more complicated and nuanced.

This problem has been around since Vista where unless a process runs elevated it can't change "all users" shortcuts on the start menu.
It noticeably impacts anything which uses the legacy Windows console host (instead of Windows terminal), because way back changes to the console host settings were saved to the shortcut that started it.
A user has multiple choices, give themselves rights to the Program Data\Microsoft\Windows\Start Menu, start programs from a short cut elsewhere (IIRC pinned to the task bar, and on the desktop are both fine), switch to using Windows Terminal on Windows 10, or use the current shipping version of Windows which uses Windows Terminal by default. (Since I had to change my computer to be able to us Windows 11, I'm aware the last isn't universally applicable).
Microsoft has been very slow getting rid of the legacy console host. But it no longer ships with Windows It's unlikely the PowerShell .lnk file will change location, but if you're not in Windows 11 the best thing you can do is move to using Windows terminal and a whole bunch of clunky things go away when you.  Gratifying though it might be to vent about generally perceived problems with "Microsoft", that's not a helpful way to get the PowerShell team to do anything differently.

And this discourse, which hardly seems determined to want to grow old. Isn't it all the same reassuring to know that there are things made in such a way that they cannot experience change? That said, it is futile to dwell on it, the name of the company having long since reached the status of pleonasm that we know so well. I even doubt that it will ever be worth putting it in writing, as it is not a secret to anyone.


Stop using "latest" and "daily-dev" tags on kie-tools and default to a new env var with the "development stream name"

Aligned with the branch name.

Change included in https://github.com/apache/incubator-kie-tools/pull/2342
Still need to update daily-dev and release Jenkinsfiles.


Add event handlers to no-unknown-property

Enforce casing for all event handlers from https://facebook.github.io/react/docs/events.html
I hate trying to debug my click handlers when I've typed onclick instead of onClick in my components.

Thanks!


Add support for CoreOS.

Currently dockerized deployment of ceph-ansible supports only RedHat and CentOS. CoreOS is an os that perfectly suits a dockerized applications. In addition new ceph/daemon containers support etcd as an kvstore for configuration which is natively installed on CoreOS.

I don't think we don't anything specific to RedHat and/or CentOS for Docker.
My initial tests were on CoreOS so it should work, did you give it a try?
Yes, I'm planning on adding the support of etcd. In the meantime, I'd like to merge the docker branch in master.

I had problems with running docker branch on CoreOS and I wrote my own playbook for deploying ceph on CoreOS https://github.com/PiotrProkop/ceph-coreos-ansible. I would be happy to help you enable ceph-ansible on CoreOS.

That'd be great if you could:

integrate ansible-coreos-bootstrap (the repo is not really moving and works well as is so we can simply import it.
enabling an etcd scenario as well

You can do everything on the docker branch, it's fine, we will merge it into master later.
Thanks in advance.

Partially fixed in #622
@PiotrProkop are you still planning on proposing the kv support as well?

Yes i am working on it tommorow i will make first PR.


Refactored EditorHistory, removed unused code, added documentation.

Trying to document and refactor a bit of the editor so it is easier for people to work with.
Starting small, with the EditorHistory.

HISTORY_MAX enum was never used
EditorHistory::PropertyData struct was never used
add_object method variants with p_level_change were never used, and level property never changes. level property is essentially just a convenience for history[current].path.size() - 1 (i.e. last item in path)
add_object method variants were so rarely used, it made more sense to make the underlying _add_object public and just give it default parameters. This required only one external change, where add_object_inspector_only was used in EditorNode.
Spent a bit of time trying to figure out how it works. There should be no behavioural/functional changes.

Superseded by #58395.


Using the LCM During Build for Testing

Tests for the MIMSyncDsc module take two approaches:

Unit Test: Import the specific resource module (.psm1) file directly and call:

Get-TargetResource
Test-TargetResource
Set-TargerResource

Integration Test: Create a DSC configuration with a single item

Execute the DSC configuration (basic validation to get it into memory)
Generate the MOF file
Start the Local Configuration Manager to run the config
Validate the LCM status

The unit test approach works nicely for debugging and testing because it does not require the LCM.
Initial attempts at accessing the LCM during AzureDevOps Pipeline builds ran into permission errors.  If this can be figured out then wider tests can be executed for builds.

Decided against this for now.  The build runs tests outside of the LCM by calling the DSC resource module functions directly, like this:
Invoke-Pester -Script .\MimSyncDsc\Tests\*.tests.ps1 -Tag Build  -ExcludeTag RunsInLocalConfigurationManager

To run all tests, just do this:
Invoke-Pester -Script .\MimSyncDsc\Tests\*.tests.ps1

Might revisit this later when I figure out integration testing for MIM using Azure DevOps pipelines.


How can i get PlaceId for any country ?

Hello ,
in need to fill combo box of country PlaceId like "5a110d312052166f" that for San Francisco
Thank you

If you are asking about woeid then try this
http://query.yahooapis.com/v1/public/yql?q=select * from geo.places where text='**Francisco**'&format=xml
you can substitute  Francisco  with any other location

Yes the best solution is to use the YahooApis.


Fix passing interactivity events inside groups

@kirillk @skavish pls review

@skavish in this case we should iterate only through visible children and adapt the point (or event) to child matrix before passing it to child inBounds test. Also (uh) iterate in reverse, for optimisation (to find and chec top element first). On the other hand all if that could be inside inBounds and return the matched child (to pass event further)

yes, we need to iterate only through visible children and the point should be transformed into the child's coordinates.
iterate from the top of course.


Images not loading in react JS

When i am importing image for texture in it's showing image not found even after giving right path

can you provide SS for more clarity

A runnable minimal example of the code that reproduces the issue would be ideal. Are you serving the images somewhere, or just pointing to a local file?

I am pointing it to local I tried to place it in same directory as the component file and also tried with public folder but in both condition its not working
and one more thing I am facing i don't know why but the mouse and mouseconstraints also not working on my react app

this is the issue I am currently facing after creating a new project because I have deleted my previous project out of frustration :)

for some time it started working but again same issue

Do you contribute on daily basis?
I am thinking to participate in hackathon would you like to join
On Wed, Jul 3, 2024, 9:13 PM Ankit Kumar @.***> wrote:

for some time it started working but again same issue
—
Reply to this email directly, view it on GitHub
https://github.com/liabru/matter-js/issues/1303#issuecomment-2206616387,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A52ZN6CGT5HJUJPG2GIQYZLZKQL3JAVCNFSM6AAAAABKDIJDTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBWGYYTMMZYG4
.
You are receiving this because you commented.Message ID:
@.***>

@dewang002 yeah I am ready and also this issue is fixed I think or I figured out another way to do this I need to first place items in public folder and run the engine and render just after defining it i am creating boxes and borders first then doing the running thats why I saw this method on internet but when I run the engine and render before adding boxes and border it runs fine.


Appveyor build status

shows the Appveyor build status. Testing how a Github pull requests work.

thanks!


I could not find any billing report under Bucket

I have installed the docker and I am getting the error . I am using Linked AWS accounts , dont have permissions to configure the reports on AWS console .
Our payer provide us .CSV files can you suggest how to pull those files for reporting.
Regards
Pankaj

This space is only used to keep track of issues. The idea of the overall project is to make the installation and configuration as seamless as possible. What you're asking can be done although it'll be quite hacky.


Error when starting susaas-srv, cannot find catalog 'hana'

i have tested and the connection to hana HDI is working. This is on the upgrade branch. All other services are starting without errors.

I reverted to main branch it. it now starts, so it is related to the upgrade.

main branch is the single source of truth in this repository, any other branches are work-in-progress. Please do not deploy them.
We were already aware of the issue you have mentioned, cds mtx, tries to deploy T0 tenant to the HDI

Can you check relevant branch if that fixes your issue?
The branch you tried was not complete.

yes it solved the issue, the pod now runs on kyma


Update helm to 2.16.2 and general version refresh

This looks OK to me, although there are always massive changes that are also needed in the Tiller installation area of the code if I remember right.  Have you taken a look at those?  Otherwise users will install the wrong version of Tiller and will not be able to specify the same options.


Long text in picker menu items is not truncated

🐛 Bug Report

Long unspaced item names in picker menu are not truncated/show in new line
🤔 Expected Behavior
Unspaced text in picker menu should show ellipsis behaviour or carry over to new line
😯 Current Behavior
Long unspaced item names in picker menu are not truncated/show in new line
💁 Possible Solution
🔦 Context
Adobe color team is using picker to display libraries for a user in menu item, for different languages, the menu item can be a large text
💻 Code Sample
🌍 Your Environment

Software
Version(s)

react-spectrum
3.0

Browser
All browsers

Operating System
All Os

🧢 Your Company/Team

Adobe Color
🕷 Tracking Issue (optional)
https://jira.corp.adobe.com/browse/CCMCS-3690

This is correct according to Spectrum designs. See https://spectrum.adobe.com/page/picker/#Text-overflow.