Handle empty strings when parsing PATH variable

This handles the empty string check when splitting the PATH variable for Test-Path resolving #34

@BenMagyar Sorry for not responding sooner to this PR. Looks good to me! Would you mind rebasing against develop and I'll merge this. Thanks!

@patriksvensson Just littered the build log up, but should be good now. I added the check to the bootstrapper's build.ps1 as well.

@BenMagyar as this repo is being deprecated, I have reproduced your PR here:
https://github.com/cake-build/resources/pull/5
So I am going to go ahead and close this one.
Thanks for your contribution!


Fix potential endless recursion in arm_jtag

Closes #531 (at least I think) as the calls are no longer recursive.
There's still a possibility to encounter endless recursion if the errors end up alternating between DapError::FaultResponse and DapError::WaitResponse but that doesn't seem like a practically possible case.

I will want to poke at this module some more anyway, so let's sack this for now.


multiple connections with aria2c

is it possible to properly configure aria2c for more than 4 connections. As is well known, by default using aria as ext dl 4 multiple connections are used. It would be a good idea to alter this arg number. For instance increase the number of ml connections to 6. Cl argument   -x16   is unusable. --max-connection-per-server= also unusable in this case.  It's sufficiently complex to use multiple arguments in --external-downloader-args ARGS  It's difficult to find more detailed info in documentation of aria.

You can use arbitrary command line to be passed to aria2c with --external-downloader-args and I don't see any problem using it.

Try this:
youtube-dl --external-downloader aria2c --external-downloader-args "-j 8 -s 8 -x 8 -k 5M"

The trick is that -j, -s and -x must all be defined. Also -k ("max part size") defaults to 20M which means if you have a video of 40M, you can not use more than 2 connections by default. So better to lower it...

Then define them all, what's the problem? Current default command line until you provide your own with --external-downloader-args is --min-split-size 1M --max-connection-per-server 4.

No problem, just trying to help that guy.

Thanks, it works perfectly. The main mistake that I made before I had forgotten the quotation marks on args parameters. -j 12 -s 12 -x 12 in my case, gives quickest speed, that is supported on my specs.


Contribution of Windows events. Also included some small fixes.

hi guys,
As announced, my contribution of a set of Windows events. I also included some small fixes (typos).
If you have any questions or comments, please contact me via Slack.
regards,
Ruben

Thank you Ruben 🙏
We will review it and let you know if we have any comment or question.
Best,
Jose

Comments on: user_created_logon_session.yml

Description of the event 4776: Description of event says "Computer". It makes reference to Domain Controller and Local Computer.
Relationship: Event data contains information of the user that had its credentials validated, but not the user that performed/reported the action. Event data contains information of the computer from which the logon attempt originated.
Data Source / Data Component: I think this event is more related to User Account / User Account Authentication. Since the event shows successful and unsuccessful credential validations, we could consider the following relations: user -> attempted to authenticate from -> device, user -> authenticated from -> device. We would need to create two new yml files 😃 because those relations are not documented
Note: We are planning to use device as an entity, to represent computer and host. We might need to update some yaml files later.

Comments on: user_created_pipe & process_created_pipe

Current yaml files: we have documented the following relationships: process -> created -> pipe & process -> connected to -> pipe
New yaml file: user_created_pipe is a new yaml file
ATT&CK mapping: both files are mapping the relationships to Named Pipe / Named Pipe Metadata. I think it is okay, and both files have "Potential Contribution" notes 👍 . We will map these events to metadata component for now.
Recommended changes to user_created_pipe:
- remove Sysmon event 18 (Will we considered under new relation: user_connected_to_pipe)
Recommended changes to process_created_pipe:
- remove Sysmon event 18 (Is already considered under relationship: process_connected_to_pipe)
New Yaml Recommendation for user_connected_to_pipe
- ATT&CK mapping: Named Pipe / Named Pipe Metadata
- Add "Potential contribution for ATT&CK - Named Pipe / named pipe connection" note
- Consider Sysmon event 18
Other Yaml update
- We need to update the "process_connected_to_pipe" yaml: ATT&CK mapping -> Named Pipe / Named Pipe Metadata

hi @Cyb3rPandaH,
Regarding user_created_logon_session.yml
I often use both Microsoft docs and ultimatewindowssecurity.com. It doesn't happen much, but for 4776 the description on the UWS website differs from the one at MS docs:
https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4776
UWS is stating "4776: The domain controller attempted to validate the credentials for an account", so I got directed into the domain controller direction. Anyways, your recommended changes seems good!
Regarding user_created_pipe & process_created_pipe
I think I overlooked the process-connected to-pipe relationship file. So I totally agree with the recommended changes. As there's only "Named Pipe Metadata" as data component within "Named Pipe" data source I think this is the best option we currently have.

Comments on drive_created.yml:

All events (6416, 6423, and 6424) provide context about the user.
I think relationships should consider user entity

6416: User --> installed --> Drive
6423: User --> attempted to install --> Drive
6424: User --> installed --> Drive

Recommended changes:

Change name of file to user_installed_drive.yml and consider events 6416 and 6424
Create new file user_atempted_to_install_drive.yml and consider event 6423

Comments on drive_modified.yml:

All events (6419, 6420, 6421, and 6422) provide context about the user.
I think relationships should consider user entity

6419: User --> attempted to disable --> Drive
6420: User --> disabled --> Drive
6421: User --> attempted to enable --> Drive
6422: User --> enabled --> Drive

Recommended changes:

Change name of file to user_attempted_to_disable_drive.yml and consider event 6419
Create new file user_disabled_drive.yml and consider event 6420
Create new file user_attempted_to_enable_drive.yml and consider event 6421
Create new file user_enabled_drive.yml and consider event 6422

Comments on firewall_policy_loaded.yml:
In other yml files we have used the term firewall to represent the firewall service. Based on the description of the event, what do you think of this idea for the behavior: firewall --> attempted to load --> policy ? We could use the entity policy for other relationships in the future.

Recommended changes:

Change name of the file: firewall_attempted_to_load_policy
Also, update behavior description.

Comments on sensor_health_changed:

I am thinking on moving Sysmon event 4 from service_started to sensor_health_changed. I will provide the same context as event 6005 (The event log service was started)
Recommended chages:

Add sysmon event 4 to sensor_health_changed

Thank you again @rubinatorz ! We are merging the PR and make a few changes later based on the comments I provided to a few sections.


Experimental Sticky scroll with C#: Class's / method's attributes are shown instead of class / method signature

Does this issue occur when all extensions are disabled?: Omnisharp is used

VS Code Version: 1.70.0
OS Version: Win10 x64

Steps to Reproduce:

Enable "editor.experimental.stickyScroll.enabled": true,
Scroll down the C# document, which has classes / methods with attributes on them

Example of the code:
[ApiController, Route("api/[controller]")]
[Authorize]
public class AuthController : ControllerBase
{
    public AuthController(SignInManager<User> signInManager, UserService userService)
    {
        _signInManager = signInManager;
        _userManager = signInManager.UserManager;
        _userService = userService;
    }

    [HttpPost("SignUp")]
    [AllowAnonymous]
    public async Task<IActionResult> SignUserUp(SignUpDto dto, [FromServices] IMapper _mapper)
    {
        var user = _mapper.Map<User>(dto);

        var result = await _userManager.CreateAsync(user, dto.Password);

        if (!result.Succeeded) return BadRequest(new { error = result.Errors });

        return CreatedAtAction(
            nameof(UserController.GetById),
            nameof(UserController).Replace("Controller", string.Empty),
            new { id = user.Id },
            _mapper.Map<UserDto>(user));
    }

See also #157375

Superseded by https://github.com/microsoft/vscode/issues/157375


Reorganize code of control.cpp for better maintainability

Wanted to do this for a very long time. Existing code in control.cpp is a big mess with methods sometimes ending up in completely random places. Yes, this PR would make it harder to navigate the history of this core file, but working with it as it stands makes Jack a very dull boy.
This change has no functional difference, it's just a reorder of things. I've only renamed _override_changed to _theme_property_override_changed to make its purpose clear. It's an internal method, so it doesn't affect anything. There are some other things that could be renamed, but they have an effect way outside of this class, so I didn't touch it here.

Thanks!


Deduplicate acked packets in BWE

Fixes #599

The missing invariant here, at least as far as BWE is concerned, is that we don't want to process the same packet(as indicated by transport-cc sequence number) more than one time. We can achieve this either by apply_report to not return a range or, preferably, by changing send_records to only return "new" reports. Alternatively, and perhaps preferably, we add a new layer between TwccSendRegister and the BWE subsystem inspired by libWebRTC's TransportFeedbackAdapter construct as you suggest.

So here is a deduplicating adapter between TwccSendRegister and the insides of SendSideBandwithEstimator. It should do the job but looks kinda awkward to me. I would probably prefer encapsulating this inside of TwccSendRegister by simply removing TwccSendRecords from the storage like libwebrtc does. But anyway, if that works for you then it works for me too.

A good first step might be a failing test based on such a sequence of TWCC feedbacks.

I've also added a test from libwebrtc captured data. It fails right now to demonstrate whats wrong, I'l fix it before merge.

ack @k0nserv

I would probably prefer encapsulating this inside of TwccSendRegister by simply removing TwccSendRecords from the storage like libwebrtc does. But anyway, if that works for you then it works for me too.

Under the current code this would break some stats reporting, which relies these records too; egress packet loss would falsely report packets lost when they were in fact delivered.


Clarify Colcon and vcs are build dependencies

There was a user missing vcs and colcon. I want to emphasize the prereqs in this procedure.

There was a user missing vcs and colcon

how would you build ROS packages without Colcon?
It's already installed with the default ROS 2 install:

Development tools: Compilers and other tools to build ROS packages
sudo apt install ros-dev-tools

I just don't like duplicating content 'everywhere'.
This also links to the Humble installation documentation which will become obsolete at some point and won't work for users looking to install ROS on newer Ubuntu versions (fi).

@ted-miller: I've updated the PR.
Let me know what you think.
I still don't like repeating this sort of information 'everywhere', but if it's necessary, it's necessary.

Personally, I think the distribution of instructions for the individual components can be confusing. So providing guidance to the proper procedures is helpful.
I think your update is good.


chore(monitoring): no more statuspage integration

The New Relic setup of this service is now hooked up manually to 2 Statuspage components, Runtime and AWS.
See https://status.project-helix.io/# (3rd party section)

:tada: This PR is included in version 1.0.2 :tada:
The release is available on:

v1.0.2
GitHub release

Your semantic-release bot :package::rocket:


Abstract at level > 1

A heading with a level of greater than 1 is ignored by the filter. This causes me a problem if I run Pandoc with --shift-heading-level-by=1. Is there a good reason for the restriction to level 1 headings? If not, could it be removed entirely, or replaced with, e.g., block.level <= 2?

There were two reason: The first is simplicity, in that the code is slightly shorter if we assume the abstract to be at the top level. The other is that it would seem unnatural to remove nested contents.
That second reason doesn't apply with --shift-heading-level-by, and the first one isn't all that strong. We could check that the level is not lower than any header we've seen so far, which would be easy to do but would still ensure that we don't remove a nested section.

Thank you!


python3.pkgs.shapely: 2.0.1 → 2.0.2

Description of changes
https://github.com/shapely/shapely/releases/tag/2.0.2
The tests were moved to shapely/ directory so we cannot just remove it.
Blocks geos bump: #240229

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@ofborg build python311Packages.shapely

Since more people expressed their support for cd $out vs the last implementation, I pushed a simple preCheck hook, along with a link to https://github.com/NixOS/nixpkgs/issues/255262 , which also includes a link to this PR as well.


All accounts are removed when removing the first signed-in account with MSAL enabled

Storage Explorer Version: 1.12.0
Build: 20200322.2
Branch: master
Platform/OS: Windows 10
Architecture: ia32
Regression From: Previous release(1.12.0)
Steps to reproduce:

Launch Storage Explorer (make sure MSAL setting is applied).
Add two different accounts.
Try to remove the first signed-in account  -> Check the result.

Expect Experience:
The first signed-in account is removed.
Actual Experience:
Both of the accounts are removed.

@v-xianya can you please email me the contents of "C:\Users\yourname\AppData\Local.IdentityService\StorageExplorerV2AccountStore.json"
Before removing any accounts, and after all accounts been removed? Also, tell me which account you manually removed. Thanks!

Hi @MRayermannMSFT  The email is sent. Check it, please!😁

@v-xianya thanks for the help. Unfortunately this behavior is....by design, at least for our auth library it is.
Basically, the accounts y'all added are considered "personalization accounts". That's a VS term, and it means an account that roams VS settings, licensing, and other VS things. The behavior of the auth library is that after an account is removed, if no personalization accounts exist, all accounts are removed.
I've opened a bug against the auth library team for them to change this behavior. https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1088200
So unfortunately there's nothing we can do about this for now. I'll move this issue to the next milestone.

Hi @MRayermannMSFT
Thank you for the sharing. But one thing is confusing.😓😓
If this behavior is by design. why it does not reproduce in previous release (1.12.0)? Is there any update for the auto library?

The library must have regressed.

Hi @MRayermannMSFT
On the latest build 20211102.7.  also reproduce on the release version 1.21.3.
Select 'Integrated Sign-in',
Sign in two accounts -> Remove one of the account -> Then both accounts are removed.

This issue doesn't reproduce on the build 20220605.1. So, we are going to close it.


separating core, container and visuals to separate repos

It seems that visualization, container and core are all separate use-cases and seems to make sense to separate. This way we could for example make sure the plots work for Keras and TensorFlow users as well. It seems like basic (bubble etc) charts that look fantastic are entirely missing from deep learning.
I already spent a few months with the visualization aspect to build Astetik so we could just fork that as the base and add the plots we already have, and remove the ones that are not relevant.
There might be one more, which is a data transformation module as we are already doing it a lot and it makes the core code confusing. Again, having a data transformation library available for non-Autonomio users could be very valuable for Keras/TensorFlow users.
So that would make 4 separate packages:

core
visualize
transform
container (everything is included)

I agree.
The repo is being bloated a bit and we need to check that going forward.
https://github.com/botlabio/autonomio/commit/a40c33f041a5751c1338ebe0c2cc5934c73466ff

Ok great and I agree it's super bloated. So this is the plan:

Clean the current repo
Update the current master with my "branch"
Take the files unique to docker to its own repo
Modify the docker file so that it gets autonomio-core from master
Create Travis and code coverage tests for autonomio-full
Create pypi package for both autonomio-core and autonomio-full

Then after that I can work on separating visualization and once that is done, separating all data transformation. The good news is that I already did all the work for this guessing that it would have to be looked at later :) The work involved in separating the data transformation is minimal and with plots maybe 2-3 days.
We also have to get the data out from the core package as its tens of mb.

This seems to also imply that we move this in to an org of its own. If we do that, would the right way to be to just move the repo from one org to other? It'll be too confusing to have all that under one org. Also if we like under org we can do things like autonomio/core and autonomio/full.

I think it is fine to have things under one org.

Almost there...waiting for travis to go through and will invite then (as you will have to include the core module with whatever is there given we don't still have pypi package...what do you think, should we do git install from master with pip as part of Dockerfile? ... well I'll open this in the new repo as an issue.

Travis passed. We have a new repo and I guess still during today I can have everything moved there (including this current repo).

Great. On that repo too, can you add the slack channel integration. :)

Ok done :)

This is now all done. Waiting for Travis to run for the first time :)


the default value of the 'replace' option should be true in Chinese API Doc

Please see this.
https://github.com/yyx990803/vue/issues/1051#issuecomment-121574359
The Chinese version of vue.js documention should be updated to v0.12.7. Now it's still v0.11.5.

Translation is in progress, but slow because 1. I don't have time; 2. It's all done by volunteers.
If you have time please contribute to the translation: https://github.com/Jinjiang/vuejs.org/tree/0.12-zh

Ok, I will consider helping the translation. Thx for your reply.


Fatal error building searchable options

I'm building my project on AppVeyor CI, where I can stably reproduce a fatal error. These are the recent build logs:

https://ci.appveyor.com/project/ice1000/intellij-owo/builds/24773545
https://ci.appveyor.com/project/ice1000/intellij-owo/builds/24773286

I suppose it's related to the new 2019.2 IntelliJ platform.
I don't know much about this, but it just happened.
I can build fine locally using 2019.1

from the log:

I suppose it's related to the new 2019.2 IntelliJ platform.

Why? 2019.2 is not available for external users (it wasn't when you created the issue at least).
from the logs:
# An error report file with more information is saved as:
# C:\Users\appveyor\.gradle\caches\modules-2\files-2.1\com.jetbrains.intellij.idea\ideaIC\LATEST-EAP-SNAPSHOT\1d66e6ca8e5aa855c0e5c45b0596d7a72bd5fe4f\ideaIC-LATEST-EAP-SNAPSHOT\bin\hs_err_pid108.log

Have you looked at it?

I cannot open the logs ATM, but I'll try (by adding that file as an artifact).

Why? 2019.2 is not available for external users (it wasn't when you created the issue at least).

Nope. Without a version specified, gradle will download 2019.2 IDEA on CIs.

Without a version it downloads latest eap, latest eap is 2018.1 eap, which is likely cannot be started right now, as eap license is already expired. Thus the plugin cannot be started. Try to specify the version

According to https://ci.appveyor.com/project/ice1000/intellij-owo#L362, 192.4205.45 is used without version specified.
(Still trying to figure out how to make the build pass and get the log file)

Now you can access it on: https://ci.appveyor.com/project/ice1000/intellij-owo/builds/24822832/artifacts
For convenience, I've uploaded it for you: hs_err_pid1512.log

According to https://ci.appveyor.com/project/ice1000/intellij-owo#L362, 192.4205.45 is used without version specified.

I don't see this

For convenience, I've uploaded it for you: hs_err_pid1512.log

Thanks. It looks like https://youtrack.jetbrains.com/issue/JBR-1382, closing in favor of that issue.

Thank you!

I don't see this

Ah because the content of the link was updated. I've pushed more commits that triggers new builds, overwriting the old content.
FYI you can see 192 in

(https://ci.appveyor.com/project/ice1000/intellij-owo/builds/24822773)


A resolution instance servicing strategy is needed

There should be a servicing strategy called RESOLUTION_INSTANCE, that will serve a single activated instance in each resolution process.

In order to solve this issue, I will change the library anatomy. Instead of that the RESOLUTION_INSTANCE be a new servicing strategy, I will introduce it as a delivery strategy, also I will create a delivery strategy called containerized and I will turn the singleton as a delivery strategy too.
Explanation,
Currently, we have three servicing strategies:
INSTANCE Serve a new instance in each request.
CONSTANT Serve the given reference object in each request.
BUILDER_FUNCTION Serve the result of the invocation of the reference.
The consumers now can not implement custom servicing strategies, this should change.
I will add the following delivery strategies:
PER_CALL Deliver a new instance each time is requested. Default
PER_RESOLUTION Deliver the same instance in each resolution cycle.
CONTAINERIZED Deliver a different instance per each original container.
SINGLETON Deliver the same instance in each request.
The consumers must be able to implement custom servicing strategies.


Initial github actions flow.

Some code to start a Github Actions flow. It runs cargo check, test and clippy.
Related to https://github.com/galeone/bacup/issues/7

Thank you for your contribution! I left a comment :)
I'm not familiar with GitHub actions but I guess they are similar to Gitlab CI - do you know if it is possible to test locally the CI configuration? For example with Gitlab CI I can run gitlab-runner in localhost and test the CI. Is there a similar option?


Could you share the code to convert DeepGlobe mask label to .csv file？

Thank you for your great work! I have already read #13 , but I cannot convert DeepGlobe to .csv for APLS. Could you  share your solution? It will be of great help.

hi @Flame-Master, thank you for your interest. I am unable to find the files/solution currently. However, I can definitely help you with any errors.
Thanks

Hello, @anilbatra2185 , for the same problem with Flame-Master, I have also already read # 13, but I  cannot convert DeepGlobe to .csv for APLS. Could you share your solution or some reference code?It will be of great help!


Document that IEntityTypeConfiguration.Configure() is not fired for entities without default constructor

File a bug
I looked through open and closed issues and haven't found any similar so here is my report:
For simple enity
    public class User: IEntityTypeConfiguration<User>
    {
        public long Id { get; set; }

        public string Name { get; set; } = string.Empty;

        public void Configure(EntityTypeBuilder<User> user)
        {
            user.HasIndex(x => x.Name);
        }
    }

when I use IEntityTypeConfiguration to reverse DbContext configuration from context OnModelCreating() into entity itself it works fine generating migration having migrationBuilder.CreateIndex()
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "user",
                columns: table => new
                {
                    id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    name = table.Column<string>(type: "text", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_user", x => x.id);
                });

            **migrationBuilder.CreateIndex(
                name: "ix_user_name",
                table: "user",
                column: "name");**
        }

If I want to have custom constructor like this
    public class User : IEntityTypeConfiguration<User>
    {
        public User(string name)
        {
            Name = name;
        }

        public long Id { get; set; }

        public string Name { get; set; } = string.Empty;

        public void Configure(EntityTypeBuilder<User> user)
        {
            user.HasIndex(x => x.Name);
        }
    }

it generates empty migration unless public DbSet<User> Users { get; set; } = null!; is included into DbContext explicitly. Migration generated then is as follows:
protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "users",
                columns: table => new
                {
                    id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    name = table.Column<string>(type: "text", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("pk_users", x => x.id);
                });
        }

which is obvious proof that IEntityTypeConfiguration.Configure()  is not fired during configuration.
Expected behavior is to have the same migration no matter what constructors entity has cause DB model does not depend on them.
Ofcourse I can add default constructor explicitly, but how can I have custom one only e.g. for the purpose to have insuranse Name property is set ?
Include provider and version information
EF Core version: 5.0.2
Database provider: Npgsql.EntityFrameworkCore.PostgreSQL
Target framework:  .NET 5.0)
Operating system: Windows 10
IDE:  Visual Studio 2019 16.8.6

@apostnov I'll move this to the docs repo to track documenting this.
If ApplyConfigurationsFromAssembly were to do this, then what value would it pass to the constructor?

My thought was if for some reason ApplyConfigurationsFromAssembly() needs entity to be instantiated with parameterless constructor then it could use Activator to call non-public constructor like Foo foo = (Foo)Activator.CreateInstance(typeof(Foo), true); if it exists and there is no public one. @ajcvickers

@apostnov This would only work if there is a non-public parameterless constructor that could be called. (Have you verified that this doesn't work already?)
I think the main problem here is that you are are making the entity type itself implement IEntityTypeConfiguration, which is unusual and results in this kind of problematic coupling.

@ajcvickers Yes, I have verified that having protected parameterless constructor and parametrised public one does not solve issue.

If ApplyConfigurationsFromAssembly were to do this, then what value would it pass to the constructor?

I did expect this to work with DI though (using the IEntityTypeConfiguration<TEntity> class just for configuration). How would you use DI in that case?


Sentence classifier with 3 labels

Instead of having one classifier used to determine whether the two input captions both describe the input image and another classifier to determine which is the correct caption when only one of the captions is describing the image, use one classifier with three labels instead of 2.

Sorry I meant to do this PR on my fork but I messed up


Allow for post-delete helm hook to be optionally disabled

Running falcon-sensor in an environment where the nodes will be deleted at the same time as/prior to the uninstall of falcon-sensor. In this case, the post-delete hook will never be schedulable because there are no nodes and the uninstall will hang indefinitely.
It would be nice if there was an option to disable this hook, as in my case I will never be uninstalling the falcon-sensor in a case where I'm not also deleting the whole cluster and its nodes.

Please use --no-hooks for this.

@redhatrises I would, but I'm using ArgoCD where helm is only used as the templating engine. ArgoCD appears to have logic to translate a helm hook to the sequence during the uninstall.
For other similar use cases, I've only had success by toggling off the hook manifests that i don't need.
FYI: https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#helm-hooks

I've opened a PR that addresses this, but keeps the default behavior that the hook is enabled. This way the general user can follow your recommendation around --no-hooks but gives users the flexibility to toggle off the manifests in use cases like mine where the helm bin isn't performing the uninstall, as with ArgoCD.
Thanks for your quick response and consideration, I really appreciate it!


Build registration form

Build registration form so users can sign up and submit mandatory data

Data is now being saved to Firebase. Just need to finish deciding what info will be asked for on user registration

Registration form is now done with all the field that I would be comfortable asking users for.


feat: Check and wait for resources when provisiong

feat: Wait for provider resources up to hour
Checking resources more than once should help
to provide better results when we are facing
the providers to be overocupied.
feat(OpenStack): Check openstack response for resources issue
OpenStack may be oversubscribed so even when we do not reach
our quota limit provisioning may fail due to lack of resources.
In such scenario (OpenStack run out of hosts to provision)
we check the response from server and act based on the fact
that OpenStack itself is being fully loaded and does not have
free resources to provide for our server.
docs: Update method docsting as it does not Validate hosts anymore
Signed-off-by: Tibor Dudlák<EMAIL_ADDRESS>

I wonder if we need to increase provisioning timeout from 1hr to at least 2 as with this patch it will be 1hr wait for resources at validation and 1hr wait for server response


Chore: fix sqitch revert

removes a call to non-existent function cif_private.revoke_permisisons()
changes a reworked table to follow the table_001 migration pattern. This revert error could have been fixed by simply fixing the reworked revert file, but I don't think this kind of change, while technically idempotent, is what sqitch rework was meant for.

Sqitch verify is failing with 7 errors for me. This is after running make drop_db && make deploy_dev_data

Thanks for checking this. We don't use or test the "final state" sqitch verify command anywhere currently so I'm not surprised it is broken. That failure can be handled in a separate PR or by #1049, whichever comes first. This PR didn't introduce the verify failure and is just a quick fix for sqitch revert, which was broken by recent commits.


Virtual Machine missing from menu

Rancher Version: master 11/11
Steps to Reproduce:

Go to infrastructure menu

Results: Virtual machine is missing (also missing from services)
Expected:  Should be there.

Not supported in 1.2.0 backend...

Version - Removed VMs and when we add them back in there will be a full test pass.  So don't need this bug anymore.


iTerm2 + Yabai: floating hotkey window is not getting ignored by Yabai

Issue description
What could cause the currently focused window to get influenced by Yabai when triggering the iTerm hotkey window and how to prevent this? I want the hotkey window to be entirely ignored. Since it's floating that should apply anyways, but it does not.
Expected behavior: When triggering the hotkey window, all currently by Yabai managed windows should stay the same.
Actual behavior: When triggering the hotkey window, space is claimed by Yabai for an "invisible" window.
Yaban Version: v5.0.2
MacOS Version: 13.1
Video displaying the unexpected behavior
https://user-images.githubusercontent.com/28692167/214208098-e6990c59-cdbe-4aff-a570-ca6a9d6c35e1.mov
iTerm configuration for the hotkey window

.yabairc
# sudo yabai --load-sa
# yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"

#!/usr/bin/env sh

# the scripting-addition must be loaded manually if
# you are running yabai on macOS Big Sur. Uncomment
# the following line to have the injection performed
# when the config is executed during startup.
#
# for this to work you must configure sudo such that
# it will be able to run the command without password
#
# see this wiki page for information:
#  - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)
#
# sudo yabai --load-sa
# yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"

#!/usr/bin/env sh

# the scripting-addition must be loaded manually if
# you are running yabai on macOS Big Sur. Uncomment
# the following line to have the injection performed
# when the config is executed during startup.
#
# for this to work you must configure sudo such that
# it will be able to run the command without password
#
# see this wiki page for information:
#  - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)
#
# sudo yabai --load-sa
# yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"

# float system preferences.

Remove yabai -m rule --add app="iTerm2" manage=on from your config.

Doesn't this affect all windows? I want iTerm to be managed, just not the floating hotkey window.

yabai will automatically manage all applications/windows given that the layout is set to bsp/stack. The rule is specifically to target applications/windows that misbehave. This usually applies to cross-platform software where macOS is not the primar target.
manage=<BOOL_SEL>
Window should be managed (tile vs float).
Most windows will be managed automatically, so this should mainly be used to make a window float.

I no longer use iTerm, but last time I did it was detected without having to register any rules to make it work.
 Thanks you so much!

This issue seems resolved, so it should be closed @BlkPingu :)

I'm running into this same issue with the iTerm2 visor hotkey window.
https://github.com/koekeishiya/yabai/assets/2790092/a3b1e164-18eb-42b8-94f8-b95d31ff600e
My yabairc file is the same as the default installation as you can see at the end of the video so I don't have manage=on set.
Any ideas what might be going on?

@AlJohri I have no idea why, but adding yabai -m rule --add app="iTerm2" manage=off to yabairc, then restarting yabai (by killall yabai), then removing the above line, then restarting yabai fixed it. Strange.


msbuild returns error code -1

We're using dotnet-outdated to update the packages in a variety of .NET Core projects in our Azure Devops build pipelines.
dotnet-outdated was working fine until recently when I started seeing this error in our build pipelines which is apparently being returned by msbuild:
~/.dotnet/tools/dotnet-outdated --include *** --upgrade
Discovering projects...
Analyzing project(s)...Unable to process the project `(solution file path omitted). Are you sure this is a valid .NET Core or .NET Standard project type?
Here is the full error message returned from the Microsoft Build Engine:
Microsoft (R) Build Engine version 16.7.2+b60ddb6f4 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
  Determining projects to restore...
  -  - exit code: -1
The project builds successfully otherwise.
I've updated the .NET SDK on my build agent to 6.0.402 but still seeing the same error.

This was caused by an expired PAT that was preventing the build from accessing the package repository.
Running the build command from the build agent's console allowed me to see additional error messages that were not displayed when it was running with dotnet-outdated.
For reference, here's an example of the build command that dotnet-outdated uses:
dotnet msbuild {solution name} /t:Restore,GenerateRestoreGraphFile /p:RestoreGraphOutputPath={tempfile}


maint: adapt code to new MinRustV

We can now use the matches! macro, which means we don't have to #[allow(clippy::match_like_matches_macro)] anymore.
There were also a few attributes that could be removed since rust 1.38.
I also formatted all recent changes.

Ubuntu code coverage is failing:

   Compiling uu_sort v0.0.6 (/home/runner/work/coreutils/coreutils/src/uu/sort)
error: no rules expected the token `,`
Error:   --> src/uu/sort/src/numeric_str_cmp.rs:73:37
   |
73 |                 Some(c) if c == char,
   |                                     ^ no rules expected this token in macro call

error: no rules expected the token `,`
Error:    --> src/uu/sort/src/sort.rs:588:90
    |
588 |                     SortMode::Numeric | SortMode::GeneralNumeric | SortMode::HumanNumeric,
    |                                                                                ^ no rules expected this token in macro call

   Compiling uu_stdbuf v0.0.6 (/home/runner/work/coreutils/coreutils/src/uu/stdbuf)
error: aborting due to 2 previous errors


[Snyk] Security upgrade se.idsec.signservice.commons:signservice-commons from 1.2.4 to 2.1.1

Snyk has created this PR to fix 3 vulnerabilities in the maven dependencies of this project.
Snyk changed the following file(s):

pom.xml

Vulnerabilities that will be fixed with an upgrade:

Issue
Score
Upgrade

Infinite loop SNYK-JAVA-ORGBOUNCYCASTLE-6612984
  600
se.idsec.signservice.commons:signservice-commons:  1.2.4 -> 2.1.1 Major version upgrade No Path Found Proof of Concept

Observable Discrepancy SNYK-JAVA-ORGBOUNCYCASTLE-6613076
  520
se.idsec.signservice.commons:signservice-commons:  1.2.4 -> 2.1.1 Major version upgrade No Path Found Proof of Concept

Allocation of Resources Without Limits or Throttling SNYK-JAVA-ORGBOUNCYCASTLE-6613079
  415
se.idsec.signservice.commons:signservice-commons:  1.2.4 -> 2.1.1 Major version upgrade No Path Found No Known Exploit

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Allocation of Resources Without Limits or Throttling

Fixed in https://github.com/swedenconnect/signature-validation/pull/61


Add ability to disable direct share on a per host basis

Fixes #761
See #762 for more information.

Looks good to me. @poisdeux do you want to take a look before merging


Hovering over window blocks sign in front of it

Signs shouldn't be placed on windows. Next mapping PR i'll fix this.


crystal tool format

A few unnecessary backslashes are removed.
bob
binary
hamming
series
It's been confirmed that running all these generators produces no
changes, so it's safe to remove these backslashes with no further
changes.
for x in bob binary hamming series; do crystal run ./generator/generator.cr -- $x; done

See https://github.com/exercism/crystal/pull/194 - all four PRs are required for build to pass again:

https://github.com/exercism/crystal/pull/195
https://github.com/exercism/crystal/pull/196
https://github.com/exercism/crystal/pull/197
https://github.com/exercism/crystal/pull/198

@petertseng Is this ready to be merged?

It is ready. Here are some additional notes in support.
I've just checked today with Crystal 1.3.2, which https://crystal-lang.org/ informs me is the latest release, that crystal tool format still produces these changes. So, this PR remains a necessary step for a track maintainer who wishes to eventually move the track's existing checks from https://github.com/exercism/crystal/blob/main/.travis.yml to GitHub Actions, as one of those steps checks is making sure the exercises' formatting matches crystal tool format.

Great. Thanks!


Example 3 (S/MIME certificate) does not work for me

Thank you for the nice documentation. However, Example 3 (S/MIME certificate with alternate email addresses) did not work for me. I had to make the following changes to get a certificate that is accepted by both Thunderbird 60.5.1 and Outlook 2010:
"KeyUsage" must be "DigitalSignature,KeyEncipherment" (Thunderbird also accepts "None", but Outlook not). "DigitalSignature" is required for signing and "KeyEncipherment" is required for encryption.
The syntax for alternate email addresses is
"<IP_ADDRESS>={text}email=adr1@example.com&email=adr2<EMAIL_ADDRESS>UPNs as used in the example do not work here.

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

ID: b80b6f8a-6227-63cb-391f-bd3324a57251
Version Independent ID: e3ce9f6c-ae5f-9b4b-2d3b-d709e886c01c
Content: New-SelfSignedCertificate (pkiclient)
Content Source: docset/windows/pkiclient/new-selfsignedcertificate.md
Product: w10
GitHub Login: @coreyp-at-msft
Microsoft Alias: coreyp

@officedocsbot assign @e0i

@officedocsbot unassign @e0i
@officedocsbot assign @yogkumgit

Hello @CDC86 thanks for your feedback.
I decided to add your example on a pull request, and leave the current too because it can still be valid for someone else.
It should go live in a couple of days.
Thank you

@tseward and @dariomws306 please review PR Added an example #1148 and kindly provide your feedback

The new example still won't work because-KeyUsage DigitalSignature,KeyEncipherment is missing, see explanation in my original request.
I'd also be grateful if someone could ascertain that there is a setting at all where example 3 will work for creating a working S/MIME certificate and document that setting. Otherwise it would not make much sense to keep the example.

Hello @CDC86
Thanks for your feedback, I worked on an issue where the default KeyUsage for this cmdlet  was indeed DigitalSignature,KeyEncipherment please see here that's the reason i did not changed that in my last PR, I did not notice the use of KeyUsage in that example, so I'll remove it now as DigitalSignature,KeyEncipherment is the default.

Thank you for working on this. I've finally found my notes from February. It does not seem to be possible any more to create an working S/MIME certificate in one command because Thunderbird insists on certificates signed by a CA (a nuisance inherited from Firefox).
A more complete example would be:
New-SelfSignedCertificate -CertStoreLocation cert:\currentuser\my -DnsName cert.contoso.com -NotAfter  (Get-Date).AddYears(3) -KeyUsage CertSign,CRLSign -TextExtension @("<IP_ADDRESS>={text}<IP_ADDRESS>.<IP_ADDRESS>.2,<IP_ADDRESS>.<IP_ADDRESS>.1,<IP_ADDRESS>.<IP_ADDRESS>.4,<IP_ADDRESS>.<IP_ADDRESS>.3,<IP_ADDRESS>.<IP_ADDRESS>.8,<IP_ADDRESS>.<IP_ADDRESS>.1","<IP_ADDRESS>={critical}{text}ca=TRUE")
Creates a CA certificate for signing other certificates valid for three years. The output of this command is a fingerprint which will be needed for the next command.
New-SelfSignedCertificate -Type Custom -Subject "E=patti.fuller@contoso.com,CN=Patti Fuller" -TextExtension @("<IP_ADDRESS>={text}<IP_ADDRESS>.<IP_ADDRESS>.4","<IP_ADDRESS>={text}email=patti.fuller@contoso.com&email=pattifuller<EMAIL_ADDRESS>-KeyUsage DigitalSignature,KeyEncipherment -KeyAlgorithm RSA -KeyLength 4096 -SmimeCapabilities -CertStoreLocation "Cert:\CurrentUser\My" -NotAfter (Get-Date).AddYears(3) -signer cert:\currentuser\my\<fingerprint from previous command>
will create a S/MIME certificate signed by the CA created above. This certificate has the subject alternative names of<EMAIL_ADDRESS><EMAIL_ADDRESS>and<EMAIL_ADDRESS>and will expire after three years.
Note: If DigitalSignature,KeyEncipherment is the default for KeyUsage, this should also work without explicitly specifying it, but I have not verified that it does work.

@get-itips  Thank you very much for the contribution and updating the documentation with PR. @CDC86 Hope this update is helpful for you. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also

@officedocsbot close


Automated cherry pick of #271: add flag check is failed etcd pods need delete

Cherry pick of #271 on release/3.4.
#271: add flag check is failed etcd pods need delete

/lgtm
/approve


Invalid fallback style "LVM

I get the following error message for each of my files:
"Invalid fallback style "LVM"
I think this is caused by  https://github.com/RafikFarhad/clang-format-github-action/blob/d93d8bf27c6d7f9f3ede3aa877497684aac34dc7/entrypoint.sh#L41
"--fallback-style=LVM" should be "--fallback-style=LLVM"

Hi @Thalhammer , this issue has been fixed in v1.0.1.
Thanks for pointing this out.
Cheers 🍻


Issue with html filter

Hello guys.
Faced the issue with your module,
More details you can see here https://stackoverflow.com/questions/33426788/domdocument-removing-closing-tag-within-script-tags
Solution is
File: vendor/swissup/module-breeze/Model/Filter.php
Line 50:
$document->loadHTML($html);
Change with
$document->loadHTML($html, LIBXML_HTML_NODEFDTD | LIBXML_SCHEMA_CREATE);

Can you please add steps to reproduce the issue?
I've just tried to add

to the swissup/module-breeze/view/frontend/templates/theme/js/require_js.phtml and everything works as expected.

It's working fine in breeze without the proposed solution because we escape all tags inside the script and style tags: https://github.com/breezefront/module-breeze/blob/master/Model/Filter.php#L98-L133
However, if the proposed solution covers the same cases with script and style we can remove these escape/unescape functions :+1:

In my case, all this is reproduced very simply. The site just doesn't work normally.

I was hoping for HTML content that I need to insert somewhere to reproduce the error.

Your theme collects templates for knockout js here. It is these templates that break


[ITensorMPS] Bond dimensions produced by randomCircuitMPS

Description
Fixes ITensor/ITensorMPS.jl#69
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.

[x] Test bond dimensions for L=10. This test is included in test/mps.jl as testset "randomCircuitMPS bond dimensions".

using ITensors
using Test

L=10
chi=128

sites = siteinds("S=1/2", L)
mps=myRandomCircuitMPS(ComplexF64,sites,chi)

expected_dims = [2, 4, 8, 16, 32, 16, 8, 4, 2]
for i in 1:9
  l = getfirst(x->hastags(x,"Link,l=$(i)"),inds(mps[i]))
  @test dim(l) == expected_dims[i]
end

Checklist:

[x] My code follows the style guidelines of this project. Please run using JuliaFormatter; format(".") in the base directory of the repository (~/.julia/dev/ITensors) to format your code according to our style guidelines.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[ ] My changes generate no new warnings.
[ ] Any dependent changes have been merged and published in downstream modules.

Thanks @markusschmitt.
My major concern here would be ensuring that by truncating in this way the orthogonality center is still at site 1. Would you mind checking that?

Yes, let me check that. I am actually not sure.

If it does turn out to be an issue, a simple fix would be to determine at what site the orthogonality gets broken (say site n), set the orthogonality center range as 1:n, and then call orthogonalize!(psi, 1), so that it does the minimal orthogonalization needed. But hopefully there won't be anything to fix.

I thought I fixed this but maybe it's still not right. I'll take a closer look. In the mean time I manually re-ran the test and now it's failing for non-timeout reasons at least.

I thought I fixed this but maybe it's still not right. I'll take a closer look. In the mean time I manually re-ran the test and now it's failing for non-timeout reasons at least.

Thanks. Indeed, this PR broke a test. Is there a way that I can rerun tests (without making a new commit)? I didn't see a way from the Jenkins online interface (https://jenkins.flatironinstitute.org/blue/organizations/jenkins/ITensors.jl/detail/PR-870/2/pipeline).

If you register a user on jenkins I can add you to be able to trigger builds.

If you register a user on jenkins I can add you to be able to trigger builds.

That would be great, thanks. I just registered with the User ID "Matthew" and name "Matthew Fishman".

Nice to see this "bounding" approach to solving the issue, Markus. I think if we can verify even theoretically that the extra truncations still preserve or guaranteed the right-orthogonality property of the MPS tensors (so that the orthogonality center remains well-defined and at site 1) then we're in business.

I think the right-orthogonality may be guaranteed to remain true for any value of chi, including the new values being determined by the code in this PR. The reason is that chi is fed into the function _rmatrix, which makes a unitary (or orthogonal if real) matrix of the requested dimensions. So as long as the column dimensions of these matrices are greater than or equal to the row dimensions (in this case, as long as chi <= dim(sites[j]) * dim(l[j])) then the resulting tensors will be right-orthogonal. We could add an assertion that checks the above inequality always holds to ensure orthogonality.

@emstoudenmire: I think the condition chi <= dim(sites[j]) * dim(l[j]) is already ensured in the current version when calculating the maximal bond dimensions.
I also checked the orthogonality as follows:
using Test
using ITensors

L=6
chi=128

sites = siteinds("S=1/2", L)

mps=randomCircuitMPS(ComplexF64,sites,chi)

right_contracted = mps[L] * conj(prime(mps[L], tags="Link"))
@test isapprox(norm(right_contracted-delta(inds(right_contracted))), 0.0, atol=1e-14)
for j in (L - 1):-1:2
    right_contracted = (mps[j] * right_contracted) * conj(prime(mps[j], tags="Link"))
    @test isapprox(norm(right_contracted-delta(inds(right_contracted))), 0.0, atol=1e-14)
end

This could be added as a test, possibly with different smaller chi to check for the cases mentioned by Miles.

Great – I just checked and we do already have a similar test in our test/mps.jl file, so no need to add another one, but it's good you did that check yourself. The new test you added is good to have to ensure the bond dimensions now have the minimal values.
The current test isn't passing, though, because randomCircuitMPS is not exported by the ITensors module, as it's an internal function only. Please update the test to use the randomMPS interface instead so that the tests can pass.
Also it looks like you'll need to make the update pointed out by Matt, about changing the name myRandomCircuitMPS back to randomCircuitMPS in src/mps/mps.jl.

Codecov Report

Merging #870 (ec8c9a8) into main (6a83a83) will increase coverage by 0.02%.
The diff coverage is 100.00%.

:exclamation: Current head ec8c9a8 differs from pull request most recent head 238e4dc. Consider uploading reports for the commit 238e4dc to get more accurate results

@@            Coverage Diff             @@
##             main     #870      +/-   ##
==========================================
+ Coverage   67.12%   67.14%   +0.02%
==========================================
  Files          88       88
  Lines        9389     9395       +6
==========================================
+ Hits         6302     6308       +6
  Misses       3087     3087

Impacted Files
Coverage Δ

src/mps/mps.jl
91.91% <100.00%> (+0.12%)
:arrow_up:

Continue to review full report at Codecov.

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

This issue should get transferred to ITensorMPS.jl, I'll close it since the corresponding issue is being tracked there: https://github.com/ITensor/ITensorMPS.jl/issues/69.


Update the example to show json decoding

Simple example, but might save a bit of head scratching. Particularly querying an _id field like you get from faunadb was a bit confusing at first.

+1 to this PR, I spent a decent chunk of time trying to figure this out. It might be "obvious" because the code only unmarshals the json, but a simple example to make the example code actually successfully compile would go a long way.


[SPARK-15773][CORE][EXAMPLE] Avoid creating local variable sc in examples if possible

What changes were proposed in this pull request?
Instead of using local variable sc like the following example, this PR uses spark.sparkContext. This makes examples more concise, and also fixes some misleading, i.e., creating SparkContext from SparkSession.
-    println("Creating SparkContext")
-    val sc = spark.sparkContext
-
     println("Writing local file to DFS")
     val dfsFilename = dfsDirPath + "/dfs_read_write_test"
-    val fileRDD = sc.parallelize(fileContents)
+    val fileRDD = spark.sparkContext.parallelize(fileContents)

This will change 12 files (+30 lines, -52 lines).
How was this patch tested?
Manual.

Test build #60014 has started for PR 13520 at commit 0a5d82f.

Test build #60014 has finished for PR 13520 at commit 0a5d82f.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60014/
Test PASSed.

@dongjoon-hyun sorry for asking, but what's the value of this change?

I'm neutral on it. It removes a variable, sure, but means writing a longer expression repeatedly later.

Thank you for review, @rxin and @srowen .
The main rational of this PR is to make SparkSession explicitly as a starting point for the operations in these examples. (Instead of SparkContext, sc).
Spark uses natually '.' to make a long sequence of operations, i.e, sc.parallelize().map().reduce() or spark.createDataFrame().toDF().stat.crosstab().show(). And, before SparkSession, the starting points were SparkContext and Dataset/Dataframe/RDD.
This PR tried to treat SparkSession and Dataset/Dataframe/RDD as the starting points in these examples and didn't touch other examples which sc is repeated a lot.
The other things like replacing var with val are irrelevant. I can revert them.

Initially, I thought the printed message was wrong in the statement println("Creating SparkContext") because spark.sparkContext is just to return the already existing one.

Thank you, @srowen !

I'm a little positive on this so would like to merge if there aren't stronger objections.

Test build #60192 has started for PR 13520 at commit af0d9a5.

Test build #60192 has finished for PR 13520 at commit af0d9a5.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60192/
Test PASSed.

Merged build finished. Test PASSed.

Since this is about examples, I think the shorter is the better.
Users can think simply parallelize or broadcast are just one of functions without knowing SparkContext.

Test build #60319 has started for PR 13520 at commit 907255d.

Test build #60319 has finished for PR 13520 at commit 907255d.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60319/
Test PASSed.

Merging in master/2.0.

Thank you, @rxin !


unable to terminate immediately

Godot version:
Godot Engine v3.2.2.beta.custom_build.1e19cdd6c
OS/device including version:
Windows 10 x64
Issue description:
OS.kill(OS.get_process_id()) does not terminate godot on windows and gives error
ERROR: OS_Windows::kill: Condition "!process_map->has(p_pid)" is true. Returned: FAILED
   At: platform\windows\os_windows.cpp:2874

Right now, on Windows, you can only kill processes that you have spawned through OS.execute, which seems weird, considering that on Linux, for example, your same code works without an issue, terminating the game.
This behaviour should be the same independent of the OS, but should Godot be able to "kill" itself? That looks like a weird idea.
If you need to stop your game, the best behaviour is through get_tree().quit(). Since this effectively sets a flag, it only takes action when the next iteration of MainLoop is about to be run. But this is the way to make Godot exit in a clean way: killing your game sounds way too overkill

game detect's that it has been hacked and want to terminate, or program found that data is damaged to the degree where further processing will cause only damage so it want to terminate.
There's many use cases.

@avril-gh I still can't see why get_tree().quit() is not sufficient for those use cases?

game detect's that it has been hacked and want to terminate, or program found that data is damaged to the degree where further processing will cause only damage so it want to terminate.

Even then, regular programs generally use exceptions to handle these scenarios. However Godot doesn't have exceptions because it's their philosophy that games should not crash, no matter what.
Killing programs generally is a voluntary action by the user, but if Godot allows to do them, then I think it should be discussed what should be the best approach. What do you think @akien-mga @Calinou ?

use case of TerminateProcess  , to say it as a  metaphor...
Its like we're flying a plane, and then lightning strikes and tear off wings.

we can try to land gracefully with get_tree().quit() - (things will happen while in process)
or save airstrip its employees and plane crew by ejecting with TerminateProcess()

The question is
does godot support exiting like this on will (not by accident) or not.
it read's
ERROR: OS_Windows::kill: Condition "!process_map->has(p_pid)" is true. Returned: FAILED
   At: platform\windows\os_windows.cpp:2874

its a bug or its by design ?
if its by design - it should at least compare pID with own pID and print warning that this action is not allowed.

( when hacker access process memory and do things there, and i detect it, i want to make him to think that game has crashed because of his doings , so his fiddling with memory or other data are pointless because game is crashing )

I can guarantee you 99% of the times this is something outside of your control. If there's a way to read/write to the memory of other processes, that's a huge security problem of the operating system that will be quickly patched. Just look at the recent Spectre/Meltdown headlines.
Having a "kill switch" in your application to fight hackers or anyone trying to read game files, from my experience, will probably affect more innocent people that actual hackers. There are much better ways to protect your game or application.
However, since this works well on Linux, it should work on Windows as well. Apparently there's a lot more restrictions to what you can do to other processes. There's a security/policy system to prevent an app to terminate unrelated others.
I will open a PR that adds the current Godot's PID to this list, to make it possible what you're asking for.

(...) If there's a way to read/write to the memory of other processes, that's a huge security problem of the operating system that will be quickly patched. (...)
you're not serious ? ...
CreateRemoteThread
WriteProcessMemory
VirtualProtectEx
VirtualAllocEx


Can't receive more than random address

Hello,
I have some troubles with Noble.
I'm not able to find anything other than random address and rssi, no localName, no services whenever I'm on RPi 3 or Ubuntu.
Do someone experiment the same thing ?

Can you check #864 if anything is helpful.


Detekt Gradle Plugin should no longer use an invalid cache

Detekt Gradle Plugin uses an invalid Class loader cache and an invalid JarFile cache. Once the Jar is modified, the cache should be invalidated, or some should be disabled.
The Service API uses URL, which leads to using JarFileFactory on handing jars, with no convenient way of modifying whether the Jar file should be cached. As the code in ServiceLoader is already written for openStream() to occur at all times, the practical solution is to disable cache process-wide.
This only occurs on DetektInvoker and isn't an issue with the Worker API.

fixes #2957 (Way to reproduce)
fixes #3396

#2582 & #2411 re-occurred, and this should fix it again with the InputChanges API

Warnings

:warning:
It looks like this PR contains functional changes without a corresponding test.

  Generated by :no_entry_sign: dangerJS against ec50d6a7c6e162f0d5116fa602aa53ff8927ff1f

The pr is broken


Offload layers to GPU based on new model size estimates

This PR fixes a large number of crashes and "out of memory" errors related to VRAM allocation, by using a more accurate estimation of how much memory is required to run a model with a given context size.
Models such as mixtral will now run on lower end hardware that would previously before, even if defaulting to the CPU is required. Also, more layers are loaded to Nvidia GPUs which should result in a speedup on Linux.
Details:

VRAM estimation now accounts for the kv cache and tensor graph (which can grow to GiBs for large context sizes)
On macOS, Ollama will now run in CPU mode, even on Apple Silicon (arm64) if the GPU doesn't have enough VRAM. Models such as mixtral, llama2:70b, etc will now work (perhaps slowly) instead of crashing
On Linux, the number of layers to be offloaded to the GPU now accounts for the kv cache which is also partially offloaded

Todo in a follow up:

Handle smaller batch sizes as mention in #1812
Still seeing some errors with very large context sizes (64k, 128k)
Limit num_ctx to what the model is trained on

Fixes #1838
Fixes #1812
Fixes #1516
Fixes #1674
Fixes #1374
Fixes #1534
Fixes #1303
Fixes #1413
Fixes #1636
Fixes #1837
Fixes #1627
Fixes #1566
Fixes #1576
Fixes #1703

Hey team, how do we get this update ? is this already available through pip install ?


Invalid domains - IDN should be converted to ACE

Regression of #25
Sample of invalid domains:
      - minecräft.com
      - rëddït.com
      - yoütu.be
      - yoütübe.co
      - yoütübe.com

Oh, I fixed them in source file _malware_typo, but didn't update in hosts file. Oops :-) Fixing.


feat: include ancestors in process events

Fixes 2420
Description
Reason: Option to include all ancestors of the process in process events can be very useful for observability and filtering purposes. E.g. to apply complex correlation rules later in data processing pipeline, or to filter out extra events.
Changes made:

Read and set option enable-process-ancestors from the config file. Turn option enable-process-ancestors off by default.
If option enable-process-ancestors is set, try to include ancestors (up to PID 1/PID 2) of the process beyond the immediate parent in process_exec, process_exit, process_uprobe, process_kprobe, process_lsm, process_tracepoint events in a respective protobuf message for the given process.
If option enable-process-ancestors is set, and we were unsuccessful when trying to collect process' ancestors in an event, add that event to eventcache for reprocessing.
When trying to reprocess events from eventcache, if option enable-process-ancestors is set, try to collect process' ancestors again.
Implement a new export filter that can filter over ancestor binary names using RE2 regular expressions.
Add a new test for the new export filter.
Add information about new features to documentation.

Hello.
I went through my code again and found several new problems to add to the list:

In pkg/grpc/exec/exec.go on line 394 it should be RefDec instead of RefInc.
In pkg/grpc/exec/exec.go there is no RefDec for ancestors in func (msg *MsgProcessCleanupEventUnix) HandleMessage(), because I couldn't think of a good way of doing it and later just forgot about it completely.
I should probably add "ancestor++", "ancestor--" comments to api/v1/tetragon/sensors.proto, vendor/github.com/cilium/tetragon/api/v1/tetragon/sensors.proto and pkg/process/process.go.
It would make sense for the Ancestors field's value to be the same across all protobuf messages in api/v1/tetragon/tetragon.proto and vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto. Maybe even reserve it in some other messages. But I'm not sure how to handle that properly, since in ProcessExec message it already has value of 3 and in most other messages value 3 is already taken by some other field.
Currently, my code loops over ancestors two times all the time: first time to create a slice in GetAncestorProcessesInternal, and second time to call RefInc / RefDec / UnsafeGetProcess for each of them in pkg/grpc/exec/exec.go and pkg/grpc/tracing/tracing.go. I've been trying to come up with a better way of doing that, but haven't gotten any good idea yet.

While 1 and 3 are an easy fix, I'm still not sure what to do about 2, 4 and 5. If these changes are OK overall, I kindly ask for advice on how to improve them. Also, please let me know if I should convert this PR to draft for the time being.

I'll look shortly sorry was travelling and then catching up. Should be able to get to this today or tomorrow thanks!

I think i misunderstood the purpose of both MsgProcessCleanupEventUnix and refcnt initially, so i no longer call RefInc / RefDec for ancestors. Sorry for that.
So now there seems to be no real reason to return []*ProcessInternal in GetAncestorProcessesInternal instead of []*tetragon.Process. And, if i change that, it will solve the double loop problem as well. But i'm not sure if i should actually do that, because returning []*ProcessInternal may be beneficial in the future for reasons i don't yet see.
And there is still inconsistency in the ancestors field's value across protobuf messages in api/v1/tetragon/tetragon.proto and vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto. I'm still not sure how to properly handle that.
@jrfastab, may I ask you for a code review now? Sorry for the delay.

I made some changes based on your suggestions:

Thanks for the update, I will review that possibly on Monday.

Thanks for taking the time to do the updates. I believe that now the code seems simpler.
One thing that I would like to see is to have some tests that check the reference counts for the ancestors. For example in https://github.com/cilium/tetragon/blob/main/pkg/grpc/exec/exec_test_helper.go we define some tests that are called in https://github.com/cilium/tetragon/blob/main/pkg/grpc/exec/exec_test.go. In those cases, we check the reference counts (i.e. here).
As breaking reference counting can cause several issues (i.e. process information to be evicted from the cache earlier than needed and thus events lack important information, or in the opposite case where process information never gets evicted from the cache and this results in excessive memory usage) it would be great to add some tests for catching similar issues. As an example, you can simulate the case that we  described in https://github.com/cilium/tetragon/pull/2938#discussion_r1871599715 and after each event check that all reference counts are what we expect to see.

GetAncestorProcesses/GetAncestorProcessesInternal and NeededAncestors/NeededAncestorsInternal

I believe that in those case there is some code repetition that could be avoided. For example for GetAncestorProcessesInternal and GetAncestorProcesses you can keep only GetAncestorProcessesInternal as from a ProcessInternal struct we can get the process. Then, instead of  GetAncestorProcesses you can call GetAncestorProcessesInternal and when you iterate the result just keep only what you need. Based on that we can possibly think of a similar solution for NeededAncestors/NeededAncestorsInternal but I haven't though of all the details.


stream_context_create have no proxy option in ssl

Describe the bug
stream_context_create ssl context have no proxy option, so proxy doesn't working.
Used config
Code to Reproduce
$client = $cm->make([
    'host' => 'imap.somehost.com',
    'port' => 993,
    'encryption' => 'ssl',
    'validate_cert' => true,
    'username' =><EMAIL_ADDRESS>    'password' => 'Password',
    'protocol' => 'imap',
    'proxy' => [
        'socket' => "tcp://proxy.com:3444",
        'request_fulluri' => false,
        'username' => "my_username",
        'password' => "secret_password",
    ]
]);

Bigged code
/**
     * Prepare socket options
     * @var string $transport
     *
     * @return array
     */
    private function defaultSocketOptions($transport) {
        $options = [];
        if ($this->encryption != false) {
            $options["ssl"] = [
                'verify_peer_name' => $this->getCertValidation(),
                'verify_peer'      => $this->getCertValidation(),
            ];
        }

        if ($this->proxy["socket"] != null) {
            $options[$transport]["proxy"] = $this->proxy["socket"];
            $options[$transport]["request_fulluri"] = $this->proxy["request_fulluri"];

            if ($this->proxy["username"] != null) {
                $auth = base64_encode($this->proxy["username"].':'.$this->proxy["password"]);

                $options[$transport]["header"] = [
                    "Proxy-Authorization: Basic $auth"
                ];
            }
        }

        return $options;
    }

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop / Server (please complete the following information):

OS: all
PHP: 7
Version last

Additional context
Add any other context about the problem here.

Hi @famfamfam ,
many thanks for your report.
Could you dump the variable $transport and $this->encryption in line 160?
https://github.com/Webklex/php-imap/blob/bd123fa62fb597ddd9a43d1b05d377fc73bb57a2/src/Connection/Protocols/Protocol.php#L152-L175
var_dump($transport);
var_dump($this->encryption);

Best regards,

Have you a idea for a fix?
I have the same issue. I have try to use the proxy Part with another $transport (http) like your post here: https://github.com/Webklex/php-imap/issues/53#issuecomment-747624990
But I get allways this
stream_socket_client(): Unable to connect to ssl://imapserver:993 (Connection timed out)
To test the proxy I have disabled port 993 and only enable the proxy port.
The output of the two variables: 'ssl'
I have the same issue with ssl and with http (for proxy)

Proxy is still not working, i wonder why. I've tried all means. it just ignores the proxy and connects directly. Please is there a work around to this ? I can provide a proxy for you for testing

I found a work around to it, the proxy is working now

@rigesjahgo what is your ysolution?

@rigesjahgo Please share your workaround, I am facing the same problem! Thank you.


Windows Terminal rendering Cyrillic characters as (???) question marks in specific situations.

Windows Terminal version
1.18.3181.0
Windows build number
10.0.19045.0
Other Software
Powershell Core 7.2.17
Powershell Locale (Get-WinSystemLocale): de-DE
Active code page: 850 (from chcp)
Steps to reproduce
I have two simple programs, one in Python, one in Java, both encoded in Text files in UTF-8.
Test.java contains:
public class Test {
    public static void main(String[] args) {
        System.out.println("Hello!");

I execute the java file using & "C:\Program Files\Java\jdk-21\bin\java.exe" Test.java
I execute the Python file using & C:/Python312/python.exe test.py
Expected Behavior
In both cases, I expect the string to be printed as it is in the source files. So 'Это тест'.
Actual Behavior
However, executing the Python file prints:
Could not find platform independent libraries <prefix>
Это тест

So here it works flawlessly.
But executing the Java file gets the result:
Hello!
??? ????

For some reason, the Cyrillic characters get replaced by question marks here. When I use Intellij with its integrated console, the Cyrillic chars get printed correctly, so java should not be the source of error. (The java code can also print German umlauts like äö, but no Cyrillic chars.)
Both commands are executed in the same console, so it is a quite strange error.

As a workaround, set system locale to utf8 (intl.cpl). All of console applications will be utf8.
pwsh 7.4.0
PS > & {
          [console]::OutputEncoding.EncodingName
          [console]::InputEncoding.EncodingName
          cmd /c chcp
       }
Unicode (UTF-8)
Unicode (UTF-8)
Active code page: 65001

There are no problems at all. They can only occur in older applications from the times when developers used national text encodings to localize the GUI.

I used the official Windows settings https://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8 to change it and it seems to work.

I see that you closed this, in my opinion it still would be nice to fix it, because for example people using Visual Studio code at schools or in workspaces won't be able to change the system encoding without admin rights, and changing the encoding is in beta and has been reportedly breaking some applications (for example some svn clients), so in some environments it might be impossible to change the encoding due to other software.

I mean, most correctly, apps should be calling SetConsoleCP if they're going to be writing text in a particular codepage to the console. Seems like python  just so happens to be doing the right thing here for you. Writing utf-8 bytes to a cp850 console is most certainly not going to just work 😄


Sync requests to re-login every 2 minutes.

VSCode Version:

1.44.0-insider
708b019bb4e20f07cf89df9f1d943af3d38d7a70
x64

OS Version: Linux sarahkitty 5.5.8-arch1-1 #1 SMP PREEMPT Fri, 06 Mar 2020 00:57:33 +0000 x86_64 GNU/Linux

Steps to Reproduce:

See notification, "Sign in to sync"
Sign in up to the page where it says, "You are all set"
The notification goes away.
Wait <3 minutes
Notification is back, asking to sign in

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

@sarahkittyy Can you open the output panel and choose "Account" from the dropdown, and copy-paste the output from there?

@RMacfarlane
[Info  - 00:34:59.807] Logging in...
[Info  - 00:35:03.603] Exchanging login code for token
[Info  - 00:35:03.991] Exchanging login code for token success
[Info  - 00:35:03.993] Login successful
[Info  - 00:35:04.2] Token available from cache, expires in 3598990 milliseconds
[Error  - 00:35:04.44] Setting token failed: Error: No such interface “org.freedesktop.Secret.Collection” on object at path /org/freedesktop/secrets/collection/login

Thanks! Writing the token to the keychain is failing, so it seems like there's an issue with the way gnome-keyring is configured on your system. I'd like to pop up a notification in this case pointing to documentation on how to fix this. Can you see if adding .local/share/keyrings/ to your home directory fixes this, or deleting .local/share/keyrings/default if you have such a directory?

@RMacfarlane ~/.local/share/keyrings/ exists, but is empty

I fixed it! Steps I took:

In ~/.xinitrc:

# not sure if this is necessary
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK

source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh

Install and run seahorse
File => New Keyring => Name it "login"

After that it works perfectly :)

This doesn't seem to work if you are using KDE. The error I get is
Writing login information to the keychain failed with error 'The name org.freedesktop.secrets was not provided by any .service files'.

I found a solution which can be seen here under the "solution" header:
https://rtfm.co.ua/en/linux-the-nextcloud-client-qtkeychain-and-the-the-name-org-freedesktop-secrets-was-not-provided-by-any-service-files-error/
As a summary, the solution (I am on arch) was to do install gnome keyring and qtkeychain
$ yay -S qtkeychain gnome-keyring

Verify it is present with
$ ls -l /usr/share/dbus-1/services/ | grep secret
-rw-r--r-- 1 root root 122 Oct 29 11:38 org.freedesktop.secrets.service

$ cat /usr/share/dbus-1/services/org.freedesktop.secrets.service
[D-BUS Service]
Name=org.freedesktop.secrets
Exec=/usr/bin/gnome-keyring-daemon --start --foreground --components=secrets

At this point I was able to log in. When I did, I did get a prompt that an application was trying to save something to a keyring and prompted for a password for a new default keyring. Once I did that everything seems to have worked fine.

In kubuntu 20, installing gnome-keyring was enough for me.
sudo apt install gnome-keyring


We probably shouldn't use this "bus" in this case but should instead directly write to a channel. Then, we can handle the "broadcast" part in the client.

This is in the f3 package and not in `gpbft right?

I started working on this and I don't think a blocking channel is the right approach either. I think we want something more flexible:

Participants should be able to join late and still sign messages.
GPBFT should be able to cancel messages that are too old.
We should never drop messages to sign until they're tool old.

I'm thinking something like:

Participants call Subscribe() *Subscription to get a subscription, then Subscription.Next() each time they want to sign a new message.
In addition to "broadcast", GPBFT can "cancel broadcast" on all pending messages (e.g., when advancing the protocol).

Importantly, subscriptions will return all relevant messages to sign, not just messages broadcast after subscribing.

Ok, talked with @Kubuxu and channels are probably good enough for now.


ci: TEST DO NOT MERGE

PR fulfills these requirements

[ ] Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
[ ] Tests for the changes have been added/updated (for bug fixes/features)
[ ] Docs have been added/updated (for bug fixes/features)
[ ] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
[ ] Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)
(check all that apply)

[ ] Product design
[ ] Frontend

Describe the reason for change
(link to issue, supportive screenshots etc.)
What does this fix?
(if this is a bug fix)
What is the new behavior?
(if this is a breaking or feature change)
What is the current behavior?
(if this is a breaking or feature change)
What libraries were added/updated?
(list all with version changes)
Does this change affect performance?
(if so describe the impacts positive or negative)
Does this change affect security?
(if so describe the impacts positive or negative)
What alternative approaches were there?
(briefly list any if applicable)
What feature flags were used to cover this change?
(briefly list any if applicable)
Does this PR introduce a breaking change?
(check only one)

[ ] Yes, and covered entirely by feature flag(s)
[ ] Yes, and covered partially by feature flag(s)
[ ] No
[ ] Not sure (briefly explain the situation below)

What level of testing was included in the change?
(check all that apply)

[ ] e2e
[ ] integration
[ ] unit

Which logical domain(s) does this change affect?
(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)

Codecov Report
Patch coverage: 61.97% and project coverage change: -1.62 :warning:

Comparison is base (8c63614) 67.94% compared to head (0d4fc69) 66.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1465      +/-   ##
==========================================
- Coverage   67.94%   66.33%   -1.62%
==========================================
  Files         397      400       +3
  Lines       26123    26133      +10
  Branches     6984     6854     -130
==========================================
- Hits        17749    17335     -414
- Misses       7007     8798    +1791
+ Partials     1367        0    -1367

Impacted Files
Coverage Δ

src/tags/TagBase.js
100.00% <ø> (ø)

src/tags/control/BrushLabels.js
100.00% <ø> (ø)

src/tags/control/Choice.js
91.30% <ø> (-1.74%)
:arrow_down:

src/tags/control/EllipseLabels.js
100.00% <ø> (ø)

src/tags/control/KeyPointLabels.js
72.72% <ø> (ø)

src/tags/control/Labels/Labels.js
84.00% <ø> (ø)

src/tags/control/PolygonLabels.js
100.00% <ø> (ø)

src/tags/control/RectangleLabels.js
100.00% <ø> (ø)

src/tags/control/TimeSeriesLabels.js
57.89% <ø> (ø)

src/tags/control/VideoRectangle.js
100.00% <ø> (ø)

... and 26 more

... and 200 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

looks like we don't need it anymore


Support for call hierarchy support

(From https://github.com/mpickering/ghcide/issues/18)

It is a feature common in other ides like eclipse or intellij
It shows the graph of all transitive calls of a function, in a tree:

The nodes are selectable (shows info in the right pane) and navigable with ctrl+click
In the right pane other info like the possible multiple calls in the same funcion, with the line number (also navigables to the concrete line)

It could use @wz1000 HieDB, like the recent find references implementation
It is supported in lsp 3.16:

https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/
https://github.com/microsoft/language-server-protocol/issues/468

LSP 3.16 is not out yet


enhancement: support changing password

Currently you take the user password, pass it through pbkdf2, then use the result as the encryption key.  If you were to instead use the result to encrypt/decrypt a buffer containing the key, then you could change the password trivially.

hm not a bad idea
On Sat, Dec 3, 2016 at 11:03 AM arolson101<EMAIL_ADDRESS>wrote:

Currently you take the user password, pass it through pbkdf2, then use the
result as the encryption key. If you were to instead use the result to
encrypt/decrypt a buffer containing the key, then you could change the
password trivially.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/calvinmetcalf/crypto-pouch/issues/42, or mute the
thread
https://github.com/notifications/unsubscribe-auth/ABE4n-5WRl1uqQcWu3e7eW3h9z3SDuj2ks5rEZK3gaJpZM4LDVdO
.

you could also use this to easily validate whether the password is correct

you get an error about being unable to decrypt when that happens now, because you never actually know if it's because somebody modified the db or your password is wrong

Hey, just checking in here. Changing passwords is an inevitable part of working with passwords, so I'm certainly interested in implementing this in crypto-pouch. Could y'all explain it to me again?

Create a random db encryption key (dbkey).  User provides key (ukey).  Use ukey to encrypt dbkey (edbkey), store it separately from the db itself.
When opening db, get ukey from user, get edbkey from store, use ukey to decrypt edbkey to get dbkey and use it for db.  If the decryption fails it’s because you have the wrong key- no cryptic message.
To rekey the db, just get a new ukey, re-encrypt dbkey with it and overwrite the stored edbkey.


Don't use notify-send on linux

notify-send on linux while convenient, is slow and doesn't support actions or notification timeout. A better option would be to use libnotify directly (with C bindings). Even better would be to use the DBus interface so as to not depend on the libnotify library. See below for some examples.
libnotify-ffil Uses libnotify directly.
freedesktop-notifications Uses DBus.
The best thing to do might be to depend on freedesktop-notifications and simply pass along the information to their api for linux. Why reinvent the wheel, right?

Hello there, yes you're right @RedHatter, in linux node-notifier just wraps the notify-send command.
It is enough if we wan't only to push notifications without managing actions on notifications. But in my case I need it.
I can test it a provide a PR if you are interested @mikaelbr. I saw that lots of people have forked this project, don't know if it has already been done ;)

Hi all, this is my desktop notification library for Linux, it uses dbus to create notifications and has full functionality. i will consider merging it into this project, but try it first if needed.
node-dbus-notifier


Renamed types.py to otypes.py, to stop shadowing the python types module

The types.py file was shadowing the python builtin types module, causing python to fail to start when in the pyorient directory:
$ python
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 62, in <module>
    import os
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 400, in <module>
    import UserDict
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 83, in <module>
    import _abcoll
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_abcoll.py", line 70, in <module>
    Iterable.register(str)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.py", line 107, in register
    if not isinstance(subclass, (type, types.ClassType)):
AttributeError: 'module' object has no attribute 'ClassType'

This renames the problematic file to otypes.py following OrientDB's convention of prefixing types with an 'o'.

yup what a bad things !
thanks for it

Glad I could help!


Not able to save image: ValueError: Can't write images with one color channel.

Hello,
I hope someone is able to help me here as I am completely stuck.
I get the follwoing error when running the inference:
ValueError: Can't write images with one color channel. -> triggered on line 53 when saving the image.
I already tried different things (cmap="Gray") etc. but nothing worked.
Thank you for any ideas!
Trace:
Traceback (most recent call last):
File "main\IS-Net\inference.py", line 53, in
io.imsave(os.path.join(result_path,im_name+".png"),(result*255).permute(1,2,0).cpu().data.numpy().astype(np.uint8))
File "R:\OneDrive\Kiart\Batch\Python\DIS_AI\DIS-main\venv\lib\site-packages\skimage\io_io.py", line 143, in imsave
return call_plugin('imsave', fname, arr, plugin=plugin, **plugin_args)
File "main\venv\lib\site-packages\skimage\io\manage_plugins.py", line 205, in call_plugin
return func(*args, **kwargs)
File "main\venv\lib\site-packages\imageio\v3.py", line 147, in imwrite
encoded = img_file.write(image, **kwargs)
File "main\venv\lib\site-packages\imageio\plugins\pillow.py", line 405, in write
raise ValueError("Can't write images with one color channel.")
ValueError: Can't write images with one color channel.

Quick fix:
Use:
import cv2
cv2.imwrite(os.path.join(result_path,im_name+".png"),(result*255).permute(1,2,0).cpu().data.numpy().astype(np.uint8))

Instead of:
io.imsave(os.path.join(result_path,im_name+".png"),(result*255).permute(1,2,0).cpu().data.numpy().astype(np.uint8))

Thank you for your help! It worked perfectly.


better-auth does not connect routes when using Hono routes with similar param order/rules

Describe the bug
better-auth does not mount any routes for Hono if there is some param mismatch that is valid for Hono router
To Reproduce
Steps to reproduce the behavior:

Create two new routes for Hono that behave similarly in terms of parameters in path:
import { Hono } from "hono";
import { validator } from "hono-openapi/zod";
import { z } from "zod";

// this gets a user with a given ID
export const usersRoute = new Hono().get(
    "/users/:id",
    validator("param", z.object({ id: z.string() })),
    async (c) => {
	    const { id } = c.req.valid("param");
	    return c.json(`This is the user #${id}`);
    },
);

// similarly to /users/:id this gets info just about me
export const meRoute = new Hono().get("/users/me", async (c) => {
    return c.json("This is the /me route");
});

export const usersRouter = new Hono()
    .basePath("/sandbox")
    .route("/", meRoute) // first match
    .route("/", usersRoute); // otherwise - if you switch these routes so the /me route doesn't work, it's probably fine

^^^^ This works well with Hono.

With this route setup the better-auth won't ever mount the URLs for auth (https://www.better-auth.com/docs/integrations/hono#mount-the-handler)
All better-auth URLs returns 404 without any console error.

Expected behavior
All better-auth routes are mounted correctly if you use the /users/:id and /users/me paths.
Screenshots
If applicable, add screenshots to help explain your problem.
/users/me route, meRouter for Hono

/users/:id route, usersRouter for Hono

/users/:id route, usersRouter for Hono

404 - invalid better-auth base prefix

404 - correct URL but better-auth wasn't mounted

200 - correct URL w/o conflicting Hono routes (usersRouter + meRouter)

Desktop (please complete the following information):

OS: macOS 15.2
Browser Brave is up to date Version 1.73.91 Chromium: 131.0.6778.85 (Official Build) (arm64)
Version 1.73.91

Additional context

using custom better-auth path prefix /auth
using Next.js apps/web and for Hono server apps/api builded with next build --turbo

My better-auth config:
export const auth = betterAuth({
	baseURL: "http://localhost:3001",
	basePath: "/auth",
	trustedOrigins: ["http://localhost:3000"],
	database: prismaAdapter(db, {
		provider: "postgresql",
	}),
	advanced: {
		crossSubDomainCookies: {
			enabled: true,
		},
	},
	session: {
		expiresIn: config.auth.sessionCookieMaxAge,
	},
	account: {
		accountLinking: {
			enabled: true,
			trustedProviders: ["google", "github"],
		},
	},
	user: {
		additionalFields: {
			onboardingComplete: {
				type: "boolean",
				required: false,
			},
		},
	},
	emailAndPassword: {
		enabled: true,
		autoSignIn: false,
		requireEmailVerification: true,
		sendResetPassword: async ({ user, url }, request) => {
			const locale = getLocaleFromRequest(request);
			await sendEmail({
				to: user.email,
				templateId: "forgotPassword",
				context: {
					url,
					name: user.name,
				},
				locale,
			});
		},
	},
	emailVerification: {
		sendOnSignUp: true,
		sendVerificationEmail: async ({ user: { email, name }, url }, request) => {
			const locale = getLocaleFromRequest(request);
			await sendEmail({
				to: email,
				templateId: "emailVerification",
				context: {
					url,
					name,
				},
				locale,
			});
		},
	},
	socialProviders: {
		google: {
			clientId: process.env.GOOGLE_CLIENT_ID as string,
			clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
			scope: ["email", "profile"],
		},
		github: {
			clientId: process.env.GITHUB_CLIENT_ID as string,
			clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
			scope: ["user:email"],
		},
	},
	plugins: [
		username(),
		admin(),
		passkey(),
		openAPI(),
		magicLink({
			disableSignUp: true,
			sendMagicLink: async ({ email, url }, request) => {
				const locale = getLocaleFromRequest(request);
				await sendEmail({
					to: email,
					templateId: "magicLink",
					context: {
						url,
					},
					locale,
				});
			},
		}),
		organization({
			sendInvitationEmail: async (
				{ email, id, organization, inviter },
				request,
			) => {
				const locale = getLocaleFromRequest(request);
				const existingUser = await getUserByEmail(email);

				const url = new URL(
					existingUser ? "/auth/login" : "/auth/signup",
					getBaseUrl(),
				);

				url.searchParams.set("invitationId", id);
				url.searchParams.set("email", email);

				await sendEmail({
					to: email,
					templateId: "organizationInvitation",
					locale,
					context: {
						organizationName: organization.name,
						url: url.toString(),
					},
				});
			},
		}),
	],
	onAPIError: {
		onError(error, ctx) {
			logger.error(error, { ctx });
		},
	},
});

Better Auth does not affect Hono's router routing. Routing is handled by Hono until the handler is called.

@Bekacru Let's try to mount Better-Auth by the guide to Hono and you'll see that Better-Auth will stop working. ;) Sure that I was testing Hono w/o better-auth first and all routes work. When I mount better-auth to such this configuration as described above, better-auth stops working.

I've experienced same issue just now while I'm looking docs. You can try /* instead of /** to solve this.

Been trying to make Hono and Better-auth work since yesterday following the instructions in the better-auth and then trying to find solutions everywhere. It just doesn't work. Either Better-auth's documentation is lacking, a bug that is yet to be discovered or something else.

Here's my code for reference:
Backend:
index.ts
import { serve } from '@hono/node-server'
import { Hono } from 'hono'
import { auth } from './utils/auth.js';
import { cors } from 'hono/cors';
import { csrf } from 'hono/csrf';

const app = new Hono()

app.use('*', csrf({
	origin: ["http://localhost:3001",]
}))
app.use(
	"/api/auth/*", // or replace with "*" to enable cors for all routes
	cors({
		origin: "http://localhost:3001", // replace with your origin
		allowHeaders: ["Content-Type", "Authorization"],
		allowMethods: ["POST", "GET", "OPTIONS"],
		exposeHeaders: ["Content-Length"],
		maxAge: 600,
		credentials: true,
	}),
);

app.on(["POST", "GET"], "/api/auth/*", (c) => auth.handler(c.req.raw));

app.get('/', (c) => {
  return c.text('Hello Hono!')
})

const port = 3000
console.log(`Server is running on http://localhost:${port}`)

serve({
  fetch: app.fetch,
  port
})

auth.ts
import pg from 'pg'
import { betterAuth } from 'better-auth'
import * as dotenv from 'dotenv';
import * as path from 'path';

const envPath = path.resolve(
  import.meta.dirname,
  process.env.NODE_ENV === 'test' ? '../../.env.test' : '../../.env',
);
dotenv.config({ path: envPath });

export const auth = betterAuth({
  trustedOrigins: ['http://localhost:3001'],
  database: new pg.Pool({
    host: process.env.DB_HOST,
    user: process.env.DB_USERNAME,
    password: process.env.DB_PASSWORD,
    port: process.env.DB_PORT as unknown as number,
    database: process.env.DB_NAME,
  }),
  emailAndPassword: {
    enabled: true,
  },
  socialProviders: {
    github: {
      clientId: process.env.GITHUB_CLIENT_ID ?? '',
      clientSecret: process.env.GITHUB_CLIENT_SECRET ?? '',
    }
  },

})

Frontend:
auth-client.ts
import { createAuthClient } from "better-auth/react"
export const authClient = createAuthClient({
    baseURL: "http://localhost:3000", // the base url of your auth server
    emailAndPassword: {
        enabled: true
    } ,
    fetchOptions:{
        mode: 'no-cors'
    }
})

signup.tsx
import { createFileRoute } from '@tanstack/react-router'
import { useState } from 'react';
import { authClient } from '../lib/auth-client';

export const Route = createFileRoute('/signup')({
  component: RouteComponent,
})

const toBase64 = (file: File) => new Promise((resolve, reject) => {
  const reader = new FileReader();
  reader.readAsDataURL(file);
  reader.onload = () => resolve(reader.result);
  reader.onerror = reject;
});

function RouteComponent() {
  const [email, setEmail] = useState('jardosa@live.com');
  const [password, setPassword] = useState('Password1!');
  const [name, setName] = useState('johnardosa');
  const [image, setImage] = useState<File | null>(null);

  const signUp = async () => {
    const { data, error } = await authClient.signUp.email({
      email,
      password,
      name,
      // image: image ? await toBase64(image) as string : undefined,
    }, {
      onRequest: (ctx) => {
        //show loading
      },
      onSuccess: (ctx) => {
        //redirect to the dashboard
      },
      onError: (ctx) => {
        alert(ctx.error.message);
      },
    });
  };

  return (
    <div>
      <input type="name" value={name} onChange={(e) => setName(e.target.value)} />
      <input type="password" value={password} onChange={(e) => setPassword(e.target.value)} />
      <input type="email" value={email} onChange={(e) => setEmail(e.target.value)} />
      <input type="file" onChange={(e) => setImage(e.target.files?.[0] ?? null)} />
      <button onClick={signUp}>Sign Up</button>
    </div>
  );
}


ARC

is it possible to use this with ARC projects?
I get the following error when trying to make use of the framework:
In YAJLParser.h -
@property (assign, nonatomic) __weak id  delegate;
Weak and Assign are mutually exclusive properties...

Same here.  YAJLParser.h:152
@property (assign, nonatomic) __weak id  delegate;

It compiles and parses if I simply remove __weak

Agreed.  I didn't find any leaks on first inspection, but I also don't have it being beta tested anywhere.  One thing is for sure: the lib should be brought up to speed with ARC if it hasn't been yet.

Released new pod as YAJLO. See new README.