Loss Operations: Adds cosine distance

This PR adds cosine distance to loss operations

This change is

 Thank you!

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Comments from Reviewable


getting a failed build after chapter 7

I am getting a failed Vercel build after chapter 7,It is working locally.

I  copied the .env.local from Vercel correctly, so I am unsure why it isn't working.

Hi,
Please copy .env.local data to .env file at root of the project.
that should solve the issue.

^ Yes, please ensure the environment variables are correct! Thank you.


Providers Circuits Table missed type column

Environment

Nautobot version (Docker tag too if applicable): 2.3.X
Python version: 3.11.9
Database platform, version:
Middleware(s):

The circuit_type column was not renamed in default_columns in CircuitTable, causing this column to be hidden in the Providers view, for example
Steps to Reproduce

Open Providers view
Check Circuits columns
Circuit_type is missed

Expected Behavior

Observed Behavior

Thanks for the report! You're absolutely right about the issue and about its root cause.

I'm interested in having it solved starting from version 2.3.0, which is the version we are currently using. Thanks


Godot 3 - issue with project file on Windows

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Godot master 17 September 2017
Windows 10
Don't know if other platforms are effected
Issue description:
Project file is loaded incompletely after export on windows, see errors pasted below:
ERROR: decode_variant: Condition ' (type & 0xFF) >= Variant::VARIANT_MAX ' is true. returned: ERR_INVALID_DATA
   At: core\io\marshalls.cpp:98
ERROR: decode_variant: Condition ' err ' is true. returned: err
   At: core\io\marshalls.cpp:542
ERROR: Error decoding property: input/move_left
   At: core\project_settings.cpp:471
ERROR: decode_variant: Condition ' len < 4 ' is true. returned: ERR_INVALID_DATA
   At: core\io\marshalls.cpp:93
ERROR: Error decoding property: ight4
   At: core\project_settings.cpp:471
ERROR: decode_variant: Condition ' len < 4 ' is true. returned: ERR_INVALID_DATA
   At: core\io\marshalls.cpp:93
ERROR: Error decoding property:
   At: core\project_settings.cpp:471
ERROR: decode_variant: Condition ' len < 4 ' is true. returned: ERR_INVALID_DATA
   At: core\io\marshalls.cpp:93
ERROR: Error decoding property:
   At: core\project_settings.cpp:471

Looks like there is some corruption in exporting the input map
Steps to reproduce:
Configure a project with input mapping, export to a pck file, run pck file, input mapping doesn't get setup
Link to minimal example project:

It loads the project file for me now, must have had a typo in the filename. Ran into a different issue but I think this part of it is working. If someone can verify creating and loading pck files on other platforms that be cool :)

that was broken and i fixed it recently, so its probably fixed now

this looks like broken actions issue (which was fixed long ago) using an old template.. should still test, though


Log the processed command.

What this PR does / why we need it:
Sometimes the namespace addition can cause surprises.
Log the actual command rather than the user-provided one, which makes it obvious what is going on.
The output now looks like this:
   logger.go:42: 07:36:13 | x/0-a | running command: [sleep 2 --namespace kudo-test-correct-parakeet]

rather than:
   logger.go:42: 07:20:09 | x/0-a | running command: "sleep 2"

Fixes #
Signed-off-by: Marcin Owsiany<EMAIL_ADDRESS>

@ANeumann82 can you please push the button again? Silly github dismissed the review when I applied your suggestion :man_facepalming:

@porridge @ANeumann82 our other projects don't reset approvals... I finally found this configuration and it won't now.   we are on the honor system... if someone makes a big change.. they should manually reset the approvals to request another review.


Group Retries Not Considered

📑 I have found these related issues/pull requests
I've not found.
🛡 Security Policy

[X] I agree to have read this project Security Policy

Description

When creating a group with 5 child monitors, and configuring the group settings as follows:
Heartbeat Interval: 60 seconds
Retries: 5
Heartbeat Retry Interval: 60 seconds
Based on these settings, the group should check the status of its child monitors every 60 seconds, retrying up to 5 times if any of the child monitors go down. Only if the issue persists after these retries, the group should transition to a down state.
However, currently, the group does not consider the retry value and goes down immediately when any of the child monitors goes down.
Isn't this a bug? Could you please assist with this issue?
👟 Reproduction steps
When creating a group with 5 child monitors, and configuring the group settings as follows:
Heartbeat Interval: 60 seconds
Retries: 5
Heartbeat Retry Interval: 60 seconds
👀 Expected behavior
The group should consider the retry value, retrying the specified number of times before transitioning to a down state if the issue persists.
😓 Actual Behavior
The group does not consider the retry value and goes down immediately when any of the child monitors goes down.
🐻 Uptime-Kuma Version
1.23.13
💻 Operating System and Arch
Docker
🌐 Browser
Google Chrome Version 122.0.6261.129 (Official Build) (64-bit)
🖥 Deployment Environment

Runtime: Docker
Database: MySQL
Filesystem used to store the database on:  SSD
number of monitors: 47

📝 Relevant log output
No response

whts ur retry thing on ur monitors? are they set to 0

wht shud be the preference here? the group or induviual monitor? the default is set to 0 so when it goes down automatically its shown like tht for group @CommanderStorm

The default is fine, but when you set the Retries to some other value (for example 2), it should be respected – set the group monitor to DOWN after two unsuccessful checks of the children, not immediately after some child goes DOWN.


Typo in extension page

HAProxy is mentioned in the nginx section.
interlock/docs/extensions.md

Fixed in 345374f


Update AboutUs page

Codecov Report

Merging #45 (cc89593) into master (3eacd4b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #45   +/-   ##
=========================================
  Coverage     72.66%   72.66%
  Complexity      459      459
=========================================
  Files            76       76
  Lines          1478     1478
  Branches        162      162
=========================================
  Hits           1074     1074
  Misses          352      352
  Partials         52       52

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 3eacd4b...cc89593. Read the comment docs.


Reland "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) again"

This relands #19277 .
This reverts commit cc122f1672d4b7e0c0734be34a155997463e3b56 as we found culprit for hot mode test failures, which is believed to be fixed with https://github.com/flutter/flutter/commit/b075229d8504e9cbb1f4d86799e5fba6e699c477

IMHO we should revert this. It caused serious regressions to flutter analyze and flutter test performance, at a time where performance is our top priority.

I believe this also breaks the debugger, see https://github.com/flutter/flutter/issues/19379.

See #19340

I can still reproduce the crash with those commits patched into master

I made a mistake when rebuilding that patch - confirmed that it does fix the issue.

I'm seeing some new crashes on flutter-tester. I can't repro on other devices, though @escamoteur is seeing similar crashes on Android emulator.
Mine is the same steps as #17838 but instead of pausing unexpected on the will-be-caught exception, it terminates and I just get connection to device lost. I can't seem to get any useful error/stack even running with --verbose.


Provide a Monthly Calendar view for Simple events listed

ETA : 2023-03-17

[x] There should be a provision to choose calendar view in addition to the timeline view
[x] Monthly view must be enabled by default.
[x] Color coding of events must be enabled for Featured Event, Social, Virtual and Conference
[x] Existing filters like Year , Schedule , Location , Event Type , Host , Topic must be made available in this view as well
[x] The Year filter should show the number of events planned for the year selected.
[x] Events spanning across multiple dates must be shown as a merged cell across the row.
[x] 1) Host Logo 2) Event Type Logo 3) PLN Event/Industry Event logo 4) Event Name to be displayed on the calendar view of the simple event cards if there is only event for a particular day
[x] Only the event name must be displayed on the calendar view of the simple event if there are more than one event for the same day.
[x] Event name , host logo must be displayed for the events which is spanning across multiple dates
[x] When you click on an event , an event card will be displayed as pop up.
[x] User should be able to toggle between timeline view and calendar view

[ ] There should be a provision to choose calendar view in addition to the timeline view
[ ] Monthly view must be enabled by default.

Tested and launched successfully on 20th Mar,2023.


Test failure: CanValidateMixDataAnnotations

This test fails occasionally with the following error:
Expected: DataAnnotation validation failed for members Dep1, Dep2 with the error 'Dep1 != Dep2'.
DataAnnotation validation failed for members Required with the error 'The Required field is required.'.
DataAnnotation validation failed for members StringLength with the error 'Too long.'.
DataAnnotation validation failed for members IntRange with the error 'Out of range.'.
DataAnnotation validation failed for members Custom with the error 'The field Custom is invalid.'. - I don't want to go to nowhere!
Expected: True
Actual:   False
   at Microsoft.Extensions.Options.Tests.OptionsBuilderTest.ValidateFailure[TOptions](OptionsValidationException e, String name, String[] errors) in /_/test/Microsoft.Extensions.Options.Test/OptionsBuilderTest.cs:line 399
   at Microsoft.Extensions.Options.Tests.OptionsBuilderTest.CanValidateMixDataAnnotations() in /_/test/Microsoft.Extensions.Options.Test/OptionsBuilderTest.cs:line 616

Other tests within that build may have failed with a similar message, but they are not listed here. Check the link above for more info.
This test failed on master.
CC @Eilon (because the bot doesn't know who else to pick)
This issue was made automatically. If there is a problem contact ryanbrandenburg.

Please use this workflow to address this flaky test issue, including checking applicable checkboxes and filling in the applicable "TODO" entries:

Is this actually a flaky test?

No, this is a regular test failure, fix the test/product (TODO: Link to commit/PR)
Yes, proceed below...

Is this test failure caused by product code flakiness? (Either this product, or another product this test depends on.)

[ ] File a bug against the product (TODO: Link to other bug)
Is it possible to change the test to avoid the flakiness?

Yes? Go to the "Change the test!" section.
No?

[ ] Disable the test (TODO: Link to PR/commit)
[ ] Wait for other bug to be resolved
[ ] Wait for us to get build that has the fix
[ ] Re-enable our test (TODO: Link to PR/commit)
[ ] Close this bug

Is it that the test itself is flaky? This includes external transient problems (e.g. remote server problems, file system race condition, etc.)

Is there is a way to change our test to avoid this flakiness?

Yes? Change the test!

[ ] Change the test to avoid the flakiness, for example by using a different test strategy, or by adding retries w/ timeouts (TODO: Link to PR/commit)
[ ] Run the test 100 times locally as a sanity check.
[ ] Close this bug

No?

Is there any logging or extra information that we could add to make this more diagnosable when it happens again?

Yes?

[ ] Add the logging (TODO: Link to PR/commit)

No?

[ ] Delete the test because flaky tests are not useful (TODO: Link to PR/commit)

This comment was made automatically. If there is a problem contact ryanbrandenburg.

@HaoK can you take a look?
cc @ajcvickers

Yeah I don't really see how that could happen... these tests presumably have no races in them...

Yeah nothing too special here, i would assume data annotations validates the properties in a deterministic order, that would be the only thing I could think of that might change
The datavalidation is just calling  Validate using the DataAnnotations class:
        public ValidateOptionsResult Validate(string name, TOptions options)
        {
            // Null name is used to configure all named options.
            if (Name == null || name == Name)
            {
                var validationResults = new List<ValidationResult>();
                if (Validator.TryValidateObject(options,
                    new ValidationContext(options, serviceProvider: null, items: null),
                    validationResults,
                    validateAllProperties: true))
                {
                    return ValidateOptionsResult.Success;
                }

                return ValidateOptionsResult.Fail(String.Join(Environment.NewLine,
                    validationResults.Select(r => "DataAnnotation validation failed for members " +
                        String.Join(", ", r.MemberNames) +
                        " with the error '" + r.ErrorMessage + "'.")));
            }

            // Ignored if not validating this instance.
            return ValidateOptionsResult.Skip;
        }

        [Fact]
        public void CanValidateMixDataAnnotations()
        {
            var services = new ServiceCollection();
            services.AddOptions<AnnotatedOptions>()
                .Configure(o =>
                {
                    o.StringLength = "111111";
                    o.IntRange = 10;
                    o.Custom = "nowhere";
                    o.Dep1 = "Not dep2";
                })
                .ValidateDataAnnotations()
                .Validate(o => o.Custom != "nowhere", "I don't want to go to nowhere!");

            var sp = services.BuildServiceProvider();

            var error = Assert.Throws<OptionsValidationException>(() => sp.GetRequiredService<IOptions<AnnotatedOptions>>().Value);
            ValidateFailure<AnnotatedOptions>(error, Options.DefaultName,
                @"DataAnnotation validation failed for members Required with the error 'The Required field is required.'.
DataAnnotation validation failed for members StringLength with the error 'Too long.'.
DataAnnotation validation failed for members IntRange with the error 'Out of range.'.
DataAnnotation validation failed for members Custom with the error 'The field Custom is invalid.'.
DataAnnotation validation failed for members Dep1, Dep2 with the error 'Dep1 != Dep2'.",
                "I don't want to go to nowhere!");
        }

Deterministic order? I think not. It's presumably in Reflection order, which is presumably random. But that's just a guess.

The only DataAnnotations thing that I think is guaranteed is that it will run all RequiredAttribute's on a property first, and only if that passes, it would then run all the non-RequiredAttribute's, but within each group, presumably a random order.

Why does the test failure not show the expected/actual text, though? It just shows true/false?

OIC because it's checking that an exception was thrown with that exact message....

I wonder if one other improvement to the test is to change this line of code:
https://github.com/aspnet/Options/blob/53e879f400d93e88f209cc8ad1e4fac36e55f63f/test/Microsoft.Extensions.Options.Test/OptionsBuilderTest.cs#L398
And instead of using LINQ's SequenceEqual method, to use an xUnit assertion that shows a more detailed error?

Yeah this looks like an ordering failure due to the data annotations error


[mlflow] fixes #40

What this PR does / why we need it:
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist

[x] DCO signed
[x] Chart Version bumped
[x] Chart artifacthub.io/changes field updated (if exists)
[x] Title of the PR starts with chart name (e.g. [mlflow])
[x] Unit tests written
[x] values.yaml file fields documented
[x] README.md file updated

@burakince - Can you please take a look at this PR?

Or any other takers? @xadrianzetx @ryshoooo

Any new @burakince ? Or any other takers? @xadrianzetx @ryshoooo

LGTM, I'd just suggest adding a unit test for this :) btw I don't have contributor rights to this repository so I can't neither approve nor merge :)


[BUG] if (!spy::amd64_) returns false on my machine

I'm building with eve's clang_sde cmake. Should not be reported as amd true I think

After discussion, this is the correct behavior


About the miniimagenet

Thank you for yourcontribution,after get the format of miniimage dataset,i train it,but a error occurs as follow:
2022-03-04 18:21:39,431 - mmfewshot - INFO - Set random seed to 0, deterministic: False
Traceback (most recent call last):
File "/home/dio/VSST/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg
return obj_cls(**args)
File "/home/dio/VSST/zwm/mmfewshot/mmfewshot/classification/datasets/mini_imagenet.py", line 73, in init
super().init(*args, **kwargs)
File "/home/dio/VSST/zwm/mmfewshot/mmfewshot/classification/datasets/base.py", line 45, in init
self.data_infos = self.load_annotations()
File "/home/dio/VSST/zwm/mmfewshot/mmfewshot/classification/datasets/mini_imagenet.py", line 140, in load_annotations
int(filename.split('.')[0][-5:]) - 1]
IndexError: list index out of range
do you know what wrong with it?

The picture format of original miniimage dataset just like<PHONE_NUMBER>005.jpg，i try to get the format of n01532829_5.jpg according to the guidance.

@linyq17 Would you mind taking a look at this issue?

Currently, we read images directly from the original ImageNet. To adapt to a format like<PHONE_NUMBER>005.jpg, the code needs some modifications.

Ok,thank you,that means we must use the whole ImageNet dataset？

don't need! Just delete some code!

can I ask where should I delete?

don't need! Just delete some code!

当删除掉mmfewshot/classification/datasets/mini_imagenet.pyLine 118（img_file_list的初始化代码）以及Line 135（filename = img_file_list[class_name][int(filename.split('.')[0][-5:]) - 1]）后确实可以运行，但是我不知道这是为什么


Block exclusion when making pack

A space for the user to write blocks they'd like to exclude while the pack creator runs. This makes taking a structure of an underwater (or otherwise embedded, don't ask what-idk) build much easier. Selection from a list may be best so it can just add block names to a temporary banlist. (A couple of grouped things may need to happen, like water including flowing water if/when it's unbanned)

I would need the Exact block name as in the file. I could make a selection pop up or something. if someone uses a space instead of an _ it would not work as intended. I will think about this a bit more

I would need the Exact block name as in the file. I could make a selection pop up or something. if someone uses a space instead of an _ it would not work as intended. I will think about this a bit more

That's what I meant by "selection from a list". It's possible you could just have some preset exclusions to choose from as well- water, lava, stone types, etc. in the end it might even be worth making a similar UI to the nametag one, but that's also pretty quality-of-life b/c I doubt people will use it much.

That's what I meant by "selection from a list". It's possible you could just have some preset exclusions to choose from as well- water, lava, stone types, etc. in the end it might even be worth making a similar UI to the nametag one, but that's also pretty quality-of-life b/c I doubt people will use it much.

Fixed in next update


New UI design

REady to merge :heart_eyes:

why do you do
self.max_retries_upload_to_same_farmer = MAX_RETRIES_UPLOAD_TO_SAME_FARMER
and the same with MAX_RETRIES_NEGOTIATE_CONTRACT ?
I don't think they are needed as class variables, once they are imported by constants.py file

@marcorosa Oh, true, i missed this, i will fix it


No such host

I typed userid and added something, but it said Failed to load game data: lookup td-users2.babeltimeus.com: no such host.
Is there any way to fix it?

I need to update it to the newer versions of the game. I'll do it when I have some time.

Thanks a lot xplodwild, you make great job !

Would appreciate, i too want my revenge on forever game play

How can i help you find server?

Ok did some packet inspection, server is changed to simply td-users.babeltimeus.com/v5 but when I try to add gems I get:

add-gems 9999
Loading game data...
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/xplodwild/realmdefensecheat/realmdefense.Unpad(0xc0001d4200, 0x0, 0x200, 0x200, 0xc0001d4200, 0x0)
realmdefensecheat-master/src/github.com/xplodwild/realmdefensecheat/realmdefense/crypt.go:28 +0xe8

I need to update it to the newer versions of the game. I'll do it when I have some time.

Very nice, thanks a lot xplodwild !

I hate this game so much. But like you I cannot stop the suffering. I've even given them money. And to end my suffering, I need more gems. Guide me through the code, what is the first step to debugging this?

Please update this :(

ive officially put realm defense on my backburner. Was playing 4 realm sieges per day for the +100 gems. Did that for 2 months, drove me mad. Now just watching 3 ads per day. Happy to help debug or do any of the grunt work, just need a bit of a tutorial

From what I understand there are two issues. 1) The key needs to be cracked again and 2) the api needs to be updated to v5. The main issue is the key mostly... which I'm not sure how he cracked, sucks I was late to the party and didnt get to use this :(

The explanations on how I reverse engineered the game are there: https://medium.com/@xplodwild/turning-the-frustration-of-a-mobile-game-into-a-reverse-engineering-training-a9887043efdf
I'm currently on vacations so I don't have all the tools on hand, but I'll sure give it a go when I'm back. Seeing all of you mad at them make me believe they didn't change their practices despite the devs themselves telling me directly they'd do better.

Hey GimmieDatCode, if you're still playing I found a work around for now - it involves using an older version of the game where everything is unencrypted and then updating it afterwards once you've editted the gem/elixer values. If you can send me over a discord or twitter link I can explain in more detail.

Hey Jax442
I would love to hear the method edit the gems/elixir using your method.
Twitter: Jeff2302 @JeffisAwsme
Would really appreciate it

I decided to make a quick write up of the method instead, just be aware this will only work with a new account so you cant use your current one. I didn't mind it as I wasn't super far in the game. Until xplod has his way working I think this is the best alternative.
You can see it here:
https://github.com/Jax442/realm-defense-version-exploit/blob/master/README.md

@xplodwild Did you ever get round to trying it out again?

@xplodwild Can you estimate when you will update the program?
Thanks and best regards

Yeah would be nice but he doesn't seem to be very active these days. In the mean time the method I posted above still works if you want to try that out.

I don't want to play through all worlds again tbh. Tried your solution and it worked but still not what I am looking for as I am too far in the game :)

Needs updating to the latest protocol, closing this issue, please follow progress in #25


Support virtual hosts

I have already talked to the devs a bit in gitter.im about supporting Virtual Hosts but i wanted to create a longer lasting record of the work being done around this. Especially since i may send other people to this ticket for information.
We would like to use this client lib to connect to our Qpid Java Broker. Qpid Java brokers must be setup with a virtual host. Out of the box the main virtual host is called "default"
Initially i couldnt see how to specify a remote host in the API. some of the URI patterns i have seen in other libs look like this:

<EMAIL_ADDRESS>amqps://user:pass@example.com?amqp.vhost=default
amqps://user:pass@clientid/default?brokerlist='tcp://example.com:5671'

in our discussions @mbroadst ended up creating a branch java-vhosts which includes some attempts to support virtual hosts using the first pattern mentioned above. as of this writing it actually works but he indicated he wanted to clean it up a little and finalize the solution differently. i hope that he will comment with the details of what he needed to change but it had something to do with the hostname field in the init frames.... i think

FYI @mbroadst i have been also working on this with Azure/amqpnetlite#36 and he showed me how the lib can currently specify a vhost. what was interesting is that it works fine with only the hostname field set in the open performative not in the sasl init frame. here is some output from my c# tests:
SEND AMQP 3 1 0 0
SEND sasl-init(mechanism:PLAIN,initial-response:<redacted>,hostname:example.com)
RECV AMQP 3 1 0 0
RECV sasl-mechanisms(sasl-server-mechanisms:[PLAIN])
RECV sasl-outcome(code:0)
SEND AMQP 0 1.0.0
SEND (ch=0) open(host-name:default)
SEND (ch=0) begin(next-outgoing-id:4294967293,incoming-window:2048,outgoing-window:2048,handle-max:63)
SEND (ch=0) attach(name:send-link,handle:0,role:False,source:source(),target:target(address:my-queue),initial-delivery-count:0)

thought that you may like to know in case that helps clarify or simplify anything. i do not know what is the "right" way and we have shown that it doesnt break anything to have that in the SASL init frame.
so ya, fyi. thanks

fixed with 119bf49245d67fb90444308a1c314dea99a6f7ff


Pass error object to PluginError for better error reporting.

PluginError understands the actual error objects better. This will generate a proper error message with the right stack trace.
Properly fixes #65

Thanks!

Published as v1.2.2

That was fast. Thanks!


feat: add gitlab provider

Pull Request
Description
Add support for GitLab as a provider

add to main.go
		gitClient, err := NewGitlabClient(cfg)
		if err != nil {
			return nil, err
		}
		return gitClient, nil```

Any idea when this is available? Looking to test this out in our environment


[boost.c] is ill-formed (no diagnosis required): The Standard reserves function names beginning with ‘str’ or ‘mem’ for possible future use.

Hi,
Issue:
https://github.com/tostercx/GTAO_Booster_PoC/blob/fd8eaa8661500995442a0fe079b02e740845afe9/boost.c#L33
The name strlen_cached is reserved by the standard.
cf: ISO/IEC 9899:201x

§7.1.3       Reserved identifiers              p182
§7.31.12   General utilities <stdlib.h>   p456
§7.31.13   String handling <string.h>   p456

NB: Also reserved are…
Here is the most useful link you'll ever get for fast reference to the C and C++ Standards and libraries:
cppreference.com C Reserved Identifiers
Current Behavior:
Undefined. Any, or none.
Expected Behavior:
The behavior of an identical function given a valid, unreserved, name.
Proposed Solution:
Change the name of the function. eg: cached_strlen

Yeah, apparently anything starting with str followed by a lowercase letter is reserved for future use, so this would still apply. Had no idea,

Lets just simply call it Superduperwhoopsboopsnonstdcompliant_strlen_cached 😄 Jokes aside, truly a good first issue.


Pagination not returning more than 50 pages

Hi Matt,
I wanted to ask for your input on an issue we are having. Thank you for contributing this well written Powershell library for OneLogin. We are working on a project that outputs the user data from OneLogin using this library. However, we noticed that the program encounters an error once we reach 2550 objects or 51 pages. We have 10,000 users which indicated that there was a problem reading the additional pages provided from the API. We looked at line 51-53 of "invoke-OneLoginRestMethod.ps1" and tried to alter the $Response.data.count -eq 50 to a higher number but this did nothing it still stopped reading at 2550.
}
   while ($Response.Pagination.after_cursor -and $Response.data.count -eq 50)
}

We then removed the -and $Response.data.count -eq 50 entirely and the program outputted all the values. Based on the code this line appears to expect 50 objects per page which is correct according to the API documentation. However, do you why this line would restrict the function from returning more than 2550 results?

@fac3-SMC Sorry about the issue you've encountered! I believe the line you quoted above is actually used to determine when the last page of data is returned. For instance, if a page of data contains 50 objects then we need to check the next page. If a page contains less than 50 objects then that indicates it is the last page. This is essentially a bounds check to prevent an infinite loop.
I don't recall seeing this issue before, so I'll need to dig in a bit to see if maybe something has changed in the API or if there is some case that I didn't consider.

@mattmcnabb Thanks for getting back so quickly. That makes perfect sense why you would do a bounds check. Im not entirely sure how to do a check to see if pagination is the issue so I will wait to hear back from you. I also did want to add that I worked with OneLogin support to debug the API calls from their end and it appears every time we query for all users the output stops at 2550. We are no where near the API call limits to rule that out.

@mattmcnabb hope you are having a great new year. Please let me know if there any kind of assistance we can offer to help fix this bug.

@fac3-SMC Sorry for the delay here - I am planning to take a deeper look at this, maybe tonight. I'll have to do some testing with an actual Onelogin tenant so I'll need to add a ton of users to my dev tenant, assuming Onelogin will allow me to do so.

@fac3-SMC So I'm doing a bit of testing around this, and so far I'm not experiencing the same behavior.  Here is the count of users from the bulk operations menu in OneLogin:

And here is the count I'm getting from the module:

I'm sure there's something I'm missing here. I'll need to keep digging.

@mattmcnabb so we performed the same exact command and returned the 2550 result again. I think the error in red might help us. This has been occurring for some reason and I have no idea why this is happening. Perhaps you may know?

I think this could be causing the problem?

That's interesting! I'm wondering under what conditions the command would output a null object to ConvertTo-OneLoginObject? What happens if you run the same command without Measure-Object? Do you get the error right at the end?

Yes, the same error occurs either way you run the command. The error is strange and occurs when you run the Get-OneLoginUser commandlet.

Yes, the same error occurs either way you run the command. The error is strange and occurs when you run the Get-OneLoginUser commandlet.

Is the error the last thing that comes out of the pipeline?

@mattmcnabb I apologize I don't think I told you that we did some more testing and removing that last condition fixed the problem. The error still occurred. We added it back since that did not fix it.

Also, to answer your last question. Yes, the error I posted is the last thing that comes out of the pipeline.

@mattmcnabb We went ahead and made the change and still see the exact same error that I sent earlier. My apologies for confusing you. A key piece of information :upside_down_face:

No worries. Back to the drawing board I guess... As a temporary workaround, I may take a look at just better error handling until I can figure out why there would be a null object in the pipeline. That way you may still get an error at some point, but the script won't stop entirely.

I can only imagine that there is a user object that might have some sort of character that is breaking the script... When we looked at the output it always stopped at the same user but when we looked we could not see anything wrong. There was no way of us to see what the next user it was trying to process either... :face_with_monocle:


UI Revamped

I have resolved almost all the issues listed in this repo

i have added the theme feature such as light and dark
fixed scroll issues
removed the fungy background which was not looking good

added the theming to the index.css which could be modified easily

handled the header responsiveness with css


Uncompression failure in the library

Hello,
Recently I decided to write a usdz parser in typescript , as the file format got popular since AR popularization.
As part of project I used lz4-ts , for uncompression but the following strange issue came up.
I calculate uncompressed buffer size using calcUncompressedLen , and it works very well , actually usdc file contains the uncompressed buffer size and I use calcUncompressedLen to make sure its value is correct. But when I call uncompressBlock on the compressed data , I get 'short buffer' error. I event tried to create a buffer with very larger than expected uncompressed buffer length , but the issue remained.
Issue reproduce:
const carr = [244,90,112,114,105,109,67,104,105,108,100,114,101,110,0,103,114,97,109,111,112,104,111,110,101,0,117,112,65,120,105,115,0,89,0,109,101,116,101,114,115,80,101,114,85,110,105,116,0,100,101,102,97,117,108,116,80,114,105,109,0,116,105,109,101,67,111,100,101,115,80,101,114,83,101,99,111,110,100,0,99,117,115,116,111,109,76,97,121,101,114,68,97,116,97,0,99,111,112,121,114,105,103,104,116,0,67,10,0,241,10,32,40,99,41,32,50,48,49,57,32,65,112,112,108,101,32,73,110,99,46,32,65,108,108,32,40,0,244,28,115,32,114,101,115,101,114,118,101,100,46,0,99,114,101,97,116,111,114,0,85,83,68,32,49,57,46,48,53,32,77,97,121,97,32,80,108,117,103,105,110,32,40,63,0,245,23,116,101,114,110,97,108,32,97,51,41,0,0,115,112,101,99,105,102,105,101,114,0,116,121,112,101,78,97,109,101,0,88,102,111,114,109,0,71,218,0,207,83,117,112,112,111,114,116,70,111,111,116,49,23,0,3,31,50,23,0,3,31,51,23,0,3,23,52,23,0,136,66,111,120,69,120,116,114,97,89,0,4,20,0,8,86,0,4,20,0,8,83,0,4,20,0,8,80,0,104,82,101,99,111,114,100,78,0,2,18,0,8,76,0,2,18,0,8,74,0,2,18,0,8,72,0,152,72,111,114,110,69,108,98,111,119,75,0,5,21,0,8,78,0,5,21,0,8,81,0,0,21,0,10,230,0,72,66,111,100,121,18,0,167,97,99,107,66,114,97,99,107,101,116,22,0,168,82,101,112,114,111,100,117,99,101,114,119,0,6,22,0,8,120,0,183,67,114,97,110,107,72,97,110,100,108,101,66,0,1,22,0,7,16,0,58,78,101,101,33,0,151,68,105,115,99,76,101,118,101,114,37,0,0,20,0,240,31,80,108,97,116,116,101,114,0,76,111,111,107,115,0,107,105,110,100,0,99,111,109,112,111,110,101,110,116,0,77,101,115,104,0,112,114,111,112,101,114,116,105,101,115,0,120,34,2,244,3,79,112,58,116,114,97,110,115,108,97,116,101,58,112,105,118,111,116,24,0,240,13,79,114,100,101,114,0,100,111,117,98,108,101,83,105,100,101,100,0,112,111,105,110,116,115,0,101,120,116,79,0,208,102,97,99,101,86,101,114,116,101,120,67,111,117,24,0,6,17,0,240,19,73,110,100,105,99,101,115,0,115,117,98,100,105,118,105,115,105,111,110,83,99,104,101,109,101,0,110,111,114,109,97,108,115,0,127,3,120,118,97,114,115,58,115,116,12,0,35,58,105,58,0,5,32,0,240,8,100,105,115,112,108,97,121,67,111,108,111,114,0,109,97,116,101,114,105,97,108,58,98,40,0,240,10,110,103,0,83,99,111,112,101,0,112,120,114,85,115,100,80,114,101,118,105,101,119,83,117,114,137,0,83,49,83,71,0,77,47,0,7,37,1,5,19,0,81,102,105,108,101,53,6,0,17,55,6,0,17,52,6,0,17,54,6,0,178,56,0,111,117,116,112,117,116,115,58,115,77,0,64,0,83,104,97,13,1,117,105,110,102,111,58,105,100,31,0,2,157,0,48,99,101,109,16,1,33,105,110,51,0,114,100,105,102,102,117,115,101,177,0,3,20,0,132,109,101,116,97,108,108,105,99,16,0,2,6,1,4,14,0,80,111,99,99,108,117,36,1,4,17,0,176,114,111,117,103,104,110,101,115,115,0,84,93,1,81,111,114,100,82,101,128,0,4,151,0,52,114,103,98,44,0,21,115,121,0,0,204,0,4,22,0,132,102,97,108,108,98,97,99,107,16,0,64,118,97,114,110,21,4,5,65,0,85,101,115,117,108,116,200,0,244,3,114,0,98,111,111,108,0,118,97,114,105,97,98,105,108,105,116,121,241,4,253,7,0,102,108,111,97,116,51,91,93,0,105,110,116,91,93,0,116,111,107,101,110,0,110,1,2,18,0,1,211,1,2,171,0,17,95,56,0,16,50,24,0,176,85,86,84,101,120,116,117,114,101,0,99,197,1,242,3,51,102,0,99,111,110,110,101,99,116,105,111,110,80,97,116,104,115,100,0,166,52,0,97,115,115,101,116,0,48,47,142,5,122,95,98,99,46,112,110,103,20,0,30,110,19,0,30,109,19,0,30,114,19,0,33,97,111,20,0,1,154,0,3,137,2,34,51,102,125,0,178,50,0,115,116,0,116,97,114,103,101,116,147,0,2,162,1,34,51,102,249,0,96,101,114,112,111,108,97,177,0,16,0,92,2,84,86,97,114,121,105,74,0,18,51,23,3,1,43,0,3,225,0,35,91,93,17,6,1,12,6,0,189,5,163,0,103,101,110,101,114,97,116,101,100,112,0,65,91,93,0,118,60,3,32,0,110,118,6,1,87,1,96,91,93,0,33,105,110,23,0,31,33,155,3,5,6,78,6,71,50,48,50,49,74,6,128,10,10,80,101,114,109,105,115,71,2,240,15,32,105,115,32,104,101,114,101,98,121,32,103,114,97,110,116,101,100,44,32,102,114,101,101,32,111,102,32,99,104,229,0,240,13,44,32,116,111,32,97,110,121,32,112,101,114,115,111,110,32,111,98,116,97,105,110,105,110,103,32,97,32,187,6,0,42,0,240,9,116,104,105,115,32,115,111,102,116,119,97,114,101,32,97,110,100,32,97,115,115,111,99,105,197,0,80,32,100,111,99,117,245,2,1,20,1,16,32,122,2,147,115,32,40,116,104,101,32,34,83,50,0,33,34,41,101,0,128,100,101,97,108,32,105,110,32,28,0,4,27,0,128,32,119,105,116,104,111,117,116,243,6,49,116,114,105,9,2,112,44,32,105,110,99,108,117,213,3,5,31,0,67,108,105,109,105,98,0,0,63,0,3,40,7,113,116,111,32,117,115,101,44,168,0,193,44,32,109,111,100,105,102,121,44,32,109,101,215,0,240,7,112,117,98,108,105,115,104,44,32,100,105,115,116,114,105,98,117,116,101,44,32,115,21,0,48,99,101,110,54,0,176,97,110,100,47,111,114,32,115,101,108,108,66,0,50,105,101,115,236,0,6,158,0,1,36,0,0,32,1,16,112,81,1,19,116,35,1,1,120,0,74,119,104,111,109,202,0,177,105,115,32,102,117,114,110,105,115,104,101,52,0,81,100,111,32,115,111,114,0,64,106,101,99,116,18,0,0,91,0,96,102,111,108,108,111,119,95,1,80,99,111,110,100,105,72,2,208,115,58,10,10,84,104,101,32,97,98,111,118,101,138,0,17,121,223,0,98,32,110,111,116,105,99,111,1,1,129,1,1,133,0,2,214,1,3,27,0,131,115,104,97,108,108,32,98,101,49,1,32,101,100,95,1,0,19,0,4,207,0,16,114,241,0,144,115,116,97,110,116,105,97,108,32,244,7,16,105,192,0,1,211,1,6,231,0,240,101,46,10,10,84,72,69,32,83,79,70,84,87,65,82,69,32,73,83,32,80,82,79,86,73,68,69,68,32,34,65,83,32,73,83,34,44,32,87,73,84,72,79,85,84,32,87,65,82,82,65,78,84,89,32,79,70,32,65,78,89,32,75,73,78,68,44,32,69,88,80,82,69,83,83,32,79,82,32,73,77,80,76,73,69,68,44,32,73,78,67,76,85,68,73,78,71,32,66,85,84,32,78,79,84,32,76,73,77,73,84,69,68,32,84,79,32,113,0,3,75,0,48,73,69,83,77,0,241,84,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,44,32,70,73,84,78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,32,65,78,68,32,78,79,78,73,78,70,82,73,78,71,69,77,69,78,84,46,32,73,78,32,78,79,32,69,86,69,78,84,32,83,72,65,76,76,32,84,72,69,32,65,85,84,72,79,82,160,0,242,12,67,79,80,89,82,73,71,72,84,32,72,79,76,68,69,82,83,32,66,69,32,76,73,65,66,76,69,107,0,240,0,78,89,32,67,76,65,73,77,44,32,68,65,77,65,71,158,0,113,82,32,79,84,72,69,82,39,0,3,158,0,49,87,72,69,19,0,192,73,78,32,65,78,32,65,67,84,73,79,78,199,0,229,67,79,78,84,82,65,67,84,44,32,84,79,82,84,59,0,240,5,87,73,83,69,44,32,65,82,73,83,73,78,71,32,70,82,79,77,44,32,79,1,32,79,70,35,0,130,73,78,32,67,79,78,78,69,70,0,0,107,1,1,182,0,5,146,1,33,79,82,16,0,33,85,83,11,0,2,140,0,128,68,69,65,76,73,78,71,83,242,0,0,78,1,176,83,79,70,84,87,65,82,69,46,10];
const cbuffer = new Uint8Array(carr);
const usize = calcUncompressedLen(cbuffer);
console.info('buffer',usize);
const ubuffer = new Uint8Array(usize);
const usize2 = uncompressBlock(cbuffer,ubuffer );
console.log(usize2)

Thanks in advance.

This exception was occurring on this line.
https://github.com/oov/lz4-ts/blob/master/src/lz4.ts#L175
I don't know how this happened because I haven't maintained it for a long time,
but it seems that errShortBuffer will be thrown even if there is a problem with the input.
Judging from the situation, it seems that the input data is missing the last one byte.
I get a similar error on the Go.
https://play.golang.org/p/nLoXIb8tVa1

Thank you so much.
You're 100% correct, I missed reading the last byte.


Can not add extra arguments to elasticsearch exporter

While trying to setup, elastic search monitoring via Prometheus, Wanted to add es.all=true and es.indices=true argument to elasticsearch exporter sidecar. To do that I am using below elastic CRD snippets to configure elastic cluster with coreos prometheus operator.
init:
    scriptSource:
      configMap:
        name: es-init-script
  monitor:
    agent: prometheus.io/coreos-operator
    args:
    - --es.all=true
    - --es.indices=true
    prometheus:
      namespace: prometheus
      labels:
        app: kubedb
      interval: 10s
  configSource:
    configMap:
      name: es-custom-config

Also as per the kubedb document, I have added spec.monitor.args
https://kubedb.com/docs/0.10.0/concepts/database-monitoring/overview/
But when i checked elastic search exporter, I can see it started with only below arguments
 Port:          56790/TCP
    Host Port:     0/TCP
    Args:
      --es.uri=http://$(DB_USER):$(DB_PASSWORD)@localhost:9200
      --web.listen-address=:56790
      --web.telemetry-path=/metrics

As Discussed with @hossainemruz , elastic search statefulset is missing the code to append supplied arguments.
https://github.com/kubedb/elasticsearch/blob/27a27b04a9569b0d64f47f5ca8f79c44b16b685f/pkg/controller/statefulset.go#L487
while redis has correct implementation,
https://github.com/kubedb/redis/blob/61417d3f1ca5a840dee9a71aa8fd58ce8bfaaabd/pkg/controller/statefulset.go#L283

fixed with pull-275 elasticSearch


SignoutAsync doesn't remove Antiforgery cookie

From @jchannon on Wednesday, November 1, 2017 9:19:52 AM
Calling SignOutAsync("MyCookieMW", authProperties); only removes the authentication cookie in the app not the antiforgery cookie that is created.
Copied from original issue: aspnet/Antiforgery#167

From @Eilon on Thursday, November 2, 2017 12:55:33 PM
@blowdart / @rynowak - this seems reasonable to me in principle, though the two features are not directly related. Thoughts on this?

From @rynowak on Thursday, November 2, 2017 4:38:56 PM
It seems like an improvement to me. Your cookie won't be valid after your identity changes.
Not sure off the cuff how we'd accomplish this, but it's worth a look.

However, if we do implement something like it doesn't mean that applications/frameworks can rely on it. It's just a nicety

From @jchannon on Friday, November 3, 2017 12:03:35 AM
As a side note when you say your forgery cookie won't be valid when the
identity changes does this apply to sliding auth to? From what I've
experienced this isn't the case ie cookie auth cookie regenerates after X
minutes due to sliding auth but I can still post data successfully.
On Thu, 2 Nov 2017 at 23:38, Ryan Nowak<EMAIL_ADDRESS>wrote:

It seems like an improvement to me. Your cookie won't be valid after your
identity changes.
Not sure off the cuff how we'd accomplish this, but it's worth a look.
However, if we do implement something like it doesn't mean that
applications/frameworks can rely on it. It's just a nicety
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/aspnet/Antiforgery/issues/167#issuecomment-341589564,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGapkTwigiRez9EEkU3gbVPVug2g82Uks5sylKSgaJpZM4QOcZr
.

From @rynowak on Friday, November 3, 2017 5:41:37 PM

ie cookie auth cookie regenerates after X minutes due to sliding auth but I can still post data successfully

Actually I spoke wrongly before. The cookie token is a unique token that acts like a salt. It's the 'request' (usually form-data) token that contains the claim-related data.

From @brockallen on Saturday, November 4, 2017 5:56:55 AM
Perhaps what should happen is the anti-forgery should check if the current forgery token matches the current authenticated user, and if not ignore the cookie for the incoming request, and remove it on the response. That makes it decoupled from any specific authentication mechanism.

Signing in/out only changes the identity of the user for subsequent requests. There is no need to remove the antiforgery token after sign out as a new antiforgery token will be generated on the next get request that renders a form. For SPA scenarios an antiforgery token can be provisioned through an explicit endpoint.
We will be providing a sample on how to do this. Closing this issue and pointing to the other issue for tracking aspnet/samples#2


ignore unrelated directories

https://github.com/qdrant/qdrant/issues/2231

Can we easily show a warning when this happens so we may detect situations with garbled data. Or is it hard to propagate this warning nicely?

Other parts of the storage don't care if there are extra files. I think it is better for compatibility purposes and is not a error


derive: escape strings at compile-time when possible

Todo:

[ ] look if there is a proper string parsing function
[ ] benchmark derive

derive benchmark
hello_world             time:   [50.551 µs 50.673 µs 50.795 µs]
                        change: [+0.2145% +0.5681% +0.9316%] (p = 0.00 < 0.05)
                        Change within noise threshold.

item_info.html          time:   [60.100 µs 60.221 µs 60.354 µs]
                        change: [+0.7116% +0.9772% +1.2335%] (p = 0.00 < 0.05)
                        Change within noise threshold.

item_union.html         time:   [187.10 µs 187.49 µs 187.92 µs]
                        change: [+3.3728% +3.8026% +4.2713%] (p = 0.00 < 0.05)
                        Performance has regressed.

page.html               time:   [777.26 µs 777.97 µs 778.76 µs]
                        change: [-0.5346% -0.0855% +0.5532%] (p = 0.83 > 0.05)
                        No change in performance detected.

print_item.html         time:   [154.32 µs 154.46 µs 154.62 µs]
                        change: [-0.6921% -0.4250% -0.1376%] (p = 0.00 < 0.05)
                        Change within noise threshold.

short_item_info.html    time:   [129.97 µs 130.19 µs 130.43 µs]
                        change: [+1.5539% +1.9741% +2.4175%] (p = 0.00 < 0.05)
                        Performance has regressed.

sidebar.html            time:   [200.02 µs 200.28 µs 200.56 µs]
                        change: [+2.1864% +2.4044% +2.6125%] (p = 0.00 < 0.05)
                        Performance has regressed.

source.html             time:   [116.60 µs 116.76 µs 116.92 µs]
                        change: [+3.0496% +3.3321% +3.6158%] (p = 0.00 < 0.05)
                        Performance has regressed.

type_layout.html        time:   [167.39 µs 167.57 µs 167.78 µs]
                        change: [+3.4081% +4.8191% +5.7045%] (p = 0.00 < 0.05)
                        Performance has regressed.

type_layout_size.html   time:   [67.252 µs 67.361 µs 67.470 µs]
                        change: [+1.2518% +1.6146% +1.9632%] (p = 0.00 < 0.05)
                        Performance has regressed.

Acceptable.

It's a great idea! I'm surprised the impact on compile-time is this little, but it makes it even better.
Thanks!

I'm surprised the impact on compile-time is this little, but it makes it even better.

The case is not actually used in our tests. In rustdoc's code which we use in out benchmarks, there is no {{ "…" }}. So we just messure the overhead of inspecting the Exprs before pushing them into the write queue, and fast dropping a Cow::Borrowed(…) is.
The "red and black suits" example comes from out of our tests, though.


Add me to README :)

Fixes or introduces:
Proposed Changes

Add me to readme :)

Thanks for contributing!


[FR]: Auto periodic reset for True & False

Contact Details
No response
Present your request
Hi RafaelGb
It's me again
I suggest a very useful function can each Column have a function that can be customized to reset TRUE to FALSE or FALSE to TRUE
their execution is judged by time (daily or monthly depends on time format)
Because sometimes I use your DB folder to complete tasks, and there are repetitive(recurring) tasks It causes me to make repetitive operations every day, such as clicking buttong to make true to false, and then make them true again

Thank you big hugs
Waiting for reply
For which platform do you request this request??
Desktop

Hello!
Could be a subtask of https://github.com/RafaelGB/obsidian-db-folder/issues/115
Since 3.2.3 we include some bulk editions. With a modal helper we can try to run your own formula for the the selected tasks (will cover your case and many others)


unit-testing-best-practices.sln does not compile with error CA2208 related to ArgumentException

Reproduce
Checkout the main branch and build with VS2020. The compile fails on this line:
throw new ArgumentException(nameof(numbers));

With this error:
Error	CA2208	Method Add passes parameter name 'numbers' as the message argument to a ArgumentException constructor. Replace this argument with a descriptive message and pass the parameter name in the correct position.	unit-testing-best-practices	.\docs\samples\snippets\core\testing\unit-testing-best-practices\csharp\unit-testing-best-practices\StringCalculator.cs	13	Active

Cause
The root has a Directory.Build.props with this setting
    <EnableNETAnalyzers>true</EnableNETAnalyzers>
    <AnalysisLevel>latest</AnalysisLevel>

This detects the `CA2208'. The name of the parameter is passed as the first parameter (the message) instead of the second.
The root also has an .editorconfig which has this setting to treat it as error:
# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = error

Solution
A simple solution suggested by the 'how to fix' is to use null for the message like this:
throw new ArgumentException(null, nameof(numbers));

Although null is passed in the message of the ArgumentException object will be:

Value does not fall within the expected range. (Parameter 'numbers')

Thanks for noting this and submitting the PR @pauldendulk
We'll continue the discussion in the PR.


Integrating storeVectors interfaces with createIndex and createIndexTemplate functions.

Description
Integrating storeVectors interfaces with createIndex and createIndexTemplate functions.
This PR includes:

I have changed the interface of createIndex and createIndexTemplate api to start using vectorAddress and dim, instead of vectors array.
As of now all the vectors are still getting passed to native memory at once. In the upcoming PR I will make the change to send the vectors in chunks, after updating the RFC.
I have remove the freeVector function from the code and started using JNICommons function.
The transfer vector function is still there and will be removed in upcoming PRs after doing more testing.

Critical decision
As we have started sending vectorsAddress to Native layer as compared to vectordata, one of the critical code part here is who should free up the memory allocated to the vectors. To make sure that vector memory is freed once the index is created even in case there is exception to avoid possible memory leaks I have added try and finally block in addKNNBinaryField function. I don't want native code to free up this memory as

The vector address generated by Java code and it becomes the responsibility of Java code to free up that memory.
Going forward if this createIndex interface starts to get exposed to external libraries that lib may or may not free up the memory. Hence it makes logical sense for Java aka addKNNBinaryField function to free up that memory.

JNI tests
[==========] Running 22 tests from 20 test suites.
[----------] Global test environment set-up.
[----------] 1 test from FaissCreateIndexTest
[ RUN      ] FaissCreateIndexTest.BasicAssertions
[       OK ] FaissCreateIndexTest.BasicAssertions (5 ms)
[----------] 1 test from FaissCreateIndexTest (5 ms total)

[----------] 1 test from FaissCreateIndexFromTemplateTest
[ RUN      ] FaissCreateIndexFromTemplateTest.BasicAssertions
[       OK ] FaissCreateIndexFromTemplateTest.BasicAssertions (2 ms)
[----------] 1 test from FaissCreateIndexFromTemplateTest (2 ms total)

[----------] 3 tests from FaissLoadIndexTest
[ RUN      ] FaissLoadIndexTest.BasicAssertions
[       OK ] FaissLoadIndexTest.BasicAssertions (2 ms)
[ RUN      ] FaissLoadIndexTest.HNSWPQDisableSdcTable
WARNING clustering 256 points to 16 centroids: please provide at least 624 training points
[       OK ] FaissLoadIndexTest.HNSWPQDisableSdcTable (357 ms)
[ RUN      ] FaissLoadIndexTest.IVFPQDisablePrecomputeTable
WARNING clustering 256 points to 16 centroids: please provide at least 624 training points
[       OK ] FaissLoadIndexTest.IVFPQDisablePrecomputeTable (360 ms)
[----------] 3 tests from FaissLoadIndexTest (720 ms total)

[----------] 1 test from FaissQueryIndexTest
[ RUN      ] FaissQueryIndexTest.BasicAssertions
[       OK ] FaissQueryIndexTest.BasicAssertions (4 ms)
[----------] 1 test from FaissQueryIndexTest (4 ms total)

[----------] 1 test from FaissQueryIndexWithFilterTest1435
[ RUN      ] FaissQueryIndexWithFilterTest1435.BasicAssertions
[       OK ] FaissQueryIndexWithFilterTest1435.BasicAssertions (9 ms)
[----------] 1 test from FaissQueryIndexWithFilterTest1435 (9 ms total)

[----------] 1 test from FaissQueryIndexWithParentFilterTest
[ RUN      ] FaissQueryIndexWithParentFilterTest.BasicAssertions
[       OK ] FaissQueryIndexWithParentFilterTest.BasicAssertions (5 ms)
[----------] 1 test from FaissQueryIndexWithParentFilterTest (5 ms total)

[----------] 1 test from FaissFreeTest
[ RUN      ] FaissFreeTest.BasicAssertions
[       OK ] FaissFreeTest.BasicAssertions (0 ms)
[----------] 1 test from FaissFreeTest (0 ms total)

[----------] 1 test from FaissInitLibraryTest
[ RUN      ] FaissInitLibraryTest.BasicAssertions
[       OK ] FaissInitLibraryTest.BasicAssertions (0 ms)
[----------] 1 test from FaissInitLibraryTest (0 ms total)

[----------] 1 test from FaissTrainIndexTest
[ RUN      ] FaissTrainIndexTest.BasicAssertions
[       OK ] FaissTrainIndexTest.BasicAssertions (0 ms)
[----------] 1 test from FaissTrainIndexTest (0 ms total)

[----------] 1 test from FaissCreateHnswSQfp16IndexTest
[ RUN      ] FaissCreateHnswSQfp16IndexTest.BasicAssertions
[       OK ] FaissCreateHnswSQfp16IndexTest.BasicAssertions (5 ms)
[----------] 1 test from FaissCreateHnswSQfp16IndexTest (5 ms total)

[----------] 1 test from FaissIsSharedIndexStateRequired
[ RUN      ] FaissIsSharedIndexStateRequired.BasicAssertions
[       OK ] FaissIsSharedIndexStateRequired.BasicAssertions (0 ms)
[----------] 1 test from FaissIsSharedIndexStateRequired (0 ms total)

[----------] 1 test from FaissInitAndSetSharedIndexState
[ RUN      ] FaissInitAndSetSharedIndexState.BasicAssertions
WARNING clustering 256 points to 16 centroids: please provide at least 624 training points
[       OK ] FaissInitAndSetSharedIndexState.BasicAssertions (339 ms)
[----------] 1 test from FaissInitAndSetSharedIndexState (339 ms total)

[----------] 1 test from IDGrouperBitMapTest
[ RUN      ] IDGrouperBitMapTest.BasicAssertions
[       OK ] IDGrouperBitMapTest.BasicAssertions (0 ms)
[----------] 1 test from IDGrouperBitMapTest (0 ms total)

[----------] 1 test from NmslibIndexWrapperSearchTest
[ RUN      ] NmslibIndexWrapperSearchTest.BasicAssertions
[       OK ] NmslibIndexWrapperSearchTest.BasicAssertions (0 ms)
[----------] 1 test from NmslibIndexWrapperSearchTest (0 ms total)

[----------] 1 test from NmslibCreateIndexTest
[ RUN      ] NmslibCreateIndexTest.BasicAssertions
[       OK ] NmslibCreateIndexTest.BasicAssertions (2 ms)
[----------] 1 test from NmslibCreateIndexTest (2 ms total)

[----------] 1 test from NmslibLoadIndexTest
[ RUN      ] NmslibLoadIndexTest.BasicAssertions
[       OK ] NmslibLoadIndexTest.BasicAssertions (1 ms)
[----------] 1 test from NmslibLoadIndexTest (1 ms total)

[----------] 1 test from NmslibQueryIndexTest
[ RUN      ] NmslibQueryIndexTest.BasicAssertions
[       OK ] NmslibQueryIndexTest.BasicAssertions (2 ms)
[----------] 1 test from NmslibQueryIndexTest (2 ms total)

[----------] 1 test from NmslibFreeTest
[ RUN      ] NmslibFreeTest.BasicAssertions
[       OK ] NmslibFreeTest.BasicAssertions (0 ms)
[----------] 1 test from NmslibFreeTest (0 ms total)

[----------] 1 test from NmslibInitLibraryTest
[ RUN      ] NmslibInitLibraryTest.BasicAssertions
[       OK ] NmslibInitLibraryTest.BasicAssertions (0 ms)
[----------] 1 test from NmslibInitLibraryTest (0 ms total)

[----------] 1 test from CommonsTests
[ RUN      ] CommonsTests.BasicAssertions
[       OK ] CommonsTests.BasicAssertions (0 ms)
[----------] 1 test from CommonsTests (0 ms total)

[----------] Global test environment tear-down
[==========] 22 tests from 20 test suites ran. (1101 ms total)
[  PASSED  ] 22 tests.

Issues Resolved
#1506
Check List

[X] New functionality includes testing.

[X] All tests pass

[X] New functionality has been documented.

[X] New functionality has javadoc added

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

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

@martin-gaievski , @jmazanec15 added a new rev where the JNI tests are fixed and the comments are resolved.


Deployment on azure API

Hello,
I have an issue when I'm using this code.
In debug (local) I don't have any.
But when I am on a server API, I'm getting this exception :
“The credentials supplied to the package were not recognized”
on the line Client.Connect().
Do you know how can i correct this ?

hopes it helps :
https://github.com/dotnet/runtime/issues/20356

I meet same issue

Has anyone got a solution to this?


TypeError: <discord.utils.CachedSlotProperty object at 0x00000170DFAD0CD0> is not a callable object

Summary
Error in import
Reproduction Steps
I typed in the following and got an error
from discord.ext import commands
Error : TypeError: <discord.utils.CachedSlotProperty object at 0x00000170DFAD0CD0> is not a callable object
Code
No response
Expected Results
Nothing error.
Actual Results
An error is displayed.
System Information

Python v3.10.11-final
discord.py-self v2.1.0-alpha

discord.py-self metadata: v2.1.0a4774+g6f69d084

aiohttp v3.7.4.post0
system info: Windows 10 10.0.19045

Checklist

[X] I have searched the open issues for duplicates.
[X] I have shared the entire traceback.
[X] I am using a user token (and it isn't visible in the code).

Additional Information
No response

I am unable to reproduce this. Can you please provide example code that showcases this issue?

wow
I didn't know when I could do that.
Thank you.

I am unable to reproduce this. Can you please provide example code that showcases this issue?

Hey, i actually have this problem, i actually got the backup of the installed packages and every time this happens
Traceback (most recent call last):   File "D:\Selfbot\root\TXListenerV3.py", line 43, in <module>     import discord   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\__init__.py", line 27, in <module>     from .audit_logs import *   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\audit_logs.py", line 40, in <module>     from .member import Member   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\member.py", line 219, in <module>     @flatten_user      ^^^^^^^^^^^^   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\member.py", line 213, in flatten_user     func = utils.copy_doc(value)(func)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\utils.py", line 341, in decorator     overridden.__signature__ = _signature(original)  # type: ignore                                ^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\Python311\Lib\inspect.py", line 3279, in signature     return Signature.from_callable(obj, follow_wrapped=follow_wrapped,            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\Python311\Lib\inspect.py", line 3027, in from_callable     return _signature_from_callable(obj, sigcls=cls,            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\Python311\Lib\inspect.py", line 2447, in _signature_from_callable     raise TypeError('{!r} is not a callable object'.format(obj)) TypeError: <discord.utils.CachedSlotProperty object at 0x000001460250AE90> is not a callable object
do you happen to know whats causing this?
so basicly how this happened is i created backup from packages installed on my phone and just pasted them to my pc ( since the discord selfbot was working on my phone and not my pc )

I am unable to reproduce this. Can you please provide example code that showcases this issue?

Hey, i actually have this problem, i actually got the backup of the installed packages and every time this happens
Traceback (most recent call last):   File "D:\Selfbot\root\TXListenerV3.py", line 43, in <module>     import discord   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\__init__.py", line 27, in <module>     from .audit_logs import *   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\audit_logs.py", line 40, in <module>     from .member import Member   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\member.py", line 219, in <module>     @flatten_user      ^^^^^^^^^^^^   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\member.py", line 213, in flatten_user     func = utils.copy_doc(value)(func)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\utils.py", line 341, in decorator     overridden.__signature__ = _signature(original)  # type: ignore                                ^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\Python311\Lib\inspect.py", line 3279, in signature     return Signature.from_callable(obj, follow_wrapped=follow_wrapped,            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\Python311\Lib\inspect.py", line 3027, in from_callable     return _signature_from_callable(obj, sigcls=cls,            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\Python311\Lib\inspect.py", line 2447, in _signature_from_callable     raise TypeError('{!r} is not a callable object'.format(obj)) TypeError: <discord.utils.CachedSlotProperty object at 0x000001460250AE90> is not a callable object
do you happen to know whats causing this?
so basicly how this happened is i created backup from packages installed on my phone and just pasted them to my pc ( since the discord selfbot was working on my phone and not my pc )

What is the pkg version? (python -m discord --version)

python -m discord --version

hello, i am getting the same issue importing the module.
Running the commands gives me:
- Python v3.11.3-final
- discord.py-self v2.0.0-final
- aiohttp v3.8.4

python -m discord --version

hello, i am getting the same issue importing the module.
Running the commands gives me:
- Python v3.11.3-final
- discord.py-self v2.0.0-final
- aiohttp v3.8.4

Can you please provide a traceback?

I am unable to reproduce this. Can you please provide example code that showcases this issue?

Hey, i actually have this problem, i actually got the backup of the installed packages and every time this happens
Traceback (most recent call last): File "D:\Selfbot\root\TXListenerV3.py", line 43, in <module> import discord File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\__init__.py", line 27, in <module> from .audit_logs import * File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\audit_logs.py", line 40, in <module> from .member import Member File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\member.py", line 219, in <module> @flatten_user ^^^^^^^^^^^^ File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\member.py", line 213, in flatten_user func = utils.copy_doc(value)(func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\imajo\AppData\Roaming\Python\Python311\site-packages\discord\utils.py", line 341, in decorator overridden.__signature__ = _signature(original)  # type: ignore ^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\inspect.py", line 3279, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\inspect.py", line 3027, in from_callable return _signature_from_callable(obj, sigcls=cls, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\inspect.py", line 2447, in _signature_from_callable raise TypeError('{!r} is not a callable object'.format(obj)) TypeError: <discord.utils.CachedSlotProperty object at 0x000001460250AE90> is not a callable object
do you happen to know whats causing this?
so basicly how this happened is i created backup from packages installed on my phone and just pasted them to my pc ( since the discord selfbot was working on my phone and not my pc )

What is the pkg version? (python -m discord --version)

2.3.0.... btw i managed to fix it , the version was also 2.3.0 in my phone ( termux ) but for some reason it worked on my phone, so i took a look into it and apparently the discord 2.3.0 library that was on my phone and the one that was on my pc were diffrent somehow :Skull: idrk how that happened but yeah

This should finally be fixed in master, still unsure why I could never reproduce it.


Encrypted content streamer

Brief
This PR brings in an additional Streamer implementation - CENC. It should be verified and merged along with this PR.
This streamer implementation consists of two main libraries:

Thunder plugin (CENC)
Gstreamer plugin (gstcencdecrypt) - contains a custom transform element, which handles the decryption of encrypted container files.

CENC
Serves the purpose of instantiating a generic pipeline capable of playing the selected content. It exposes a Streamer API (not fully functional), which can be used for manipulating the stream.
On top of standard debugging messages relayed from the gstreamer pipeline, this plugin also provides means for generating gstreamer dot files.
gstcencdecrypt
A gstreamer element, about which you can find out more here.

https://jenkins.code.rdkcentral.com/job/github-triggered/1072/ started

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/ThunderNanoServices/83/rdkcentral/ThunderNanoServices

Commit: ea8003cde7687a30b3786c2f452e3fc38f825a47

Report detail: gist

https://jenkins.code.rdkcentral.com/job/github-triggered/1073/ started

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/ThunderNanoServices/83/rdkcentral/ThunderNanoServices

Commit: a9efb16d21c25e22a6c4696dd76c73ee7e55970d

Report detail: gist

Hi,
The blackduck failure is happening for a few reasons:

Code match which is essentially boilerplate - happy with this.

Search found GST_PLUGIN_DEFINE.  This is using LGPL which is correct here.  However, RDK's approach to GStreamer plugins is that all files which comprise the plugin must be licensed as LGPL, and therefore the headers on these files should be LGPL instead of Apache.

Warning: Licensing a component with parts licensed different to the main Apache license is under active discussion with Comcast Legal, and has not yet been approved.  It is possible that the gstreamer plugin here may have to go in a separate repository.  Otherwise, if approved, we may request some license file rework (but not code changes) in the near future.

Martin
Martin Hughes RDK CMF Compliance  Team
Appendix: LGPL header is as follows:
/*

Copyright  RDK Management

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation, version 2
of the license.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301, USA.
*/

https://jenkins.code.rdkcentral.com/job/github-triggered/1077/ started

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/ThunderNanoServices/83/rdkcentral/ThunderNanoServices

Commit: 8ee2667a5c43464a30311b62f5eb3830b4d54b79

Report detail: gist

Copyright scan failure
Commit: b250ee0538beb4650dea207819af2997b2652f8c
Report detail: https://gist.github.com/97f24aa508c6b920d708a8a187c57f68

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/ThunderNanoServices/83/rdkcentral/ThunderNanoServices

Commit: b250ee0538beb4650dea207819af2997b2652f8c

Report detail: gist

https://jenkins.code.rdkcentral.com/job/github-triggered/1079/ started

Hi Krystian,
Have you added LGPL headers to all files here which are part of the plugin?  So everything here that is part of the plugin's .so file is now headered as LGPL?
Our tools do not handle this very well at the moment so there will be more complaints.  (It is a new situation for the tools etc.)
Thanks.

https://jenkins.code.rdkcentral.com/job/github-triggered/1086/ started

Copyright scan failure
Commit: 88d9907adefcadb2c9a62ad331e96c4dd68f0263
Report detail: https://gist.github.com/836acb223b0883241813b5961844f09e

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/ThunderNanoServices/83/rdkcentral/ThunderNanoServices

Commit: 88d9907adefcadb2c9a62ad331e96c4dd68f0263

Report detail: gist

@mhughesacn Thanks for pointing that out, but there still seems to be a problem with copyright flagging it as an invalid license header? On top of that I don't seem to understand, why blackduck is failing. All files used for building the gstreamer plugin(source files, build scripts), have the LGPL prefix that you've specified.

  Tools currently don't handle this well, but will approve manually as quickly as possible.

Commit: 88d9907adefcadb2c9a62ad331e96c4dd68f0263

Hi Krystian, Thanks for making the changes.  I approved in blackduck, but our other scan tools don't handle the mixed copyright well, so changes to the LGPL files will complain for now.  (I will try to fix this soon, but it is a new situation which has arisen in this and other components.)  For now, I'll approve manually as soon as I see it.  Just to be aware than Comcast Legal may torpedo this arrangement and require some code reorg.  It is under active discussion. - Martin

Hi @mhughesacn, thanks for helping out and I'll keep this in mind. I can definitely separate the gstreamer plugin, shall a need for it arise.

@krp97 (Kristian) Maybe it is good to already make a dedicated lib/so for the gstreamer decryptor element as that was the long term goal anyway (our next step). Lets take that step now. For now we will move this component/part (with different license) to our public WPEPlatformForEmbedded repository (temporary) till ComCast decided on the repository for the LGPL code and than we can move it there.

Yeah it's already a shared library since I thought we might want to move it somewhere. Let's move it then and I'll adjust the recipes and build scripts to find it.

https://jenkins.code.rdkcentral.com/job/github-triggered/1202/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/1203/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/1209/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/1272/ started


[SPARK-12188] [SQL] [FOLLOW-UP] Code refactoring and comment correction in Dataset APIs

@marmbrus This PR is to address your comment. Thanks for your review!

Test build #47400 has started for PR 10214 at commit 145cd5b.

Test build #47400 has finished for PR 10214 at commit 145cd5b.

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/47400/
Test PASSed.

Merged build finished. Test PASSed.


Store uns scalars as group metadata, not 1D arrays [WIP]

Context: #88

Update -- this will require a mod in TileDB-Py.
While we can enumerate/discover metadata values for TileDB arrays, we cannot yet for TileDB groups. Tracking is in TileDB Shortcut task 18080.

thanks @gspowley ! :)


[FEATURE] hoist keyword

Is there an existing issue for this?

[X] I have searched the existing issues

Is your feature request related to a problem?
This is kind of me just splurging my thoughts into this issue (haven't really looked into the technicalities of it yet) but I often find myself writing this code (ignoring ternaries exist for a second):
var someVariable;

if (condition) {
    someVariable = ...;
} else {
    someVariable = ...;
}

print(someVariable);

// OR
var contents;

with ("file.txt", "r") {
    contents = file.read();
}

print(contents);

I wonder what thoughts would be on a new hoist keyword which works the same as var except it is available to the scope above it was defined in, it means we are able to get rid of the initial declaration (in theory)
if (condition) {
    hoist someVariable = ...;
} else {
    hoist someVariable = ...;
}

print(someVariable);

with ("file.txt", "r") {
    hoist contents = file.read();
}

print(contents);

Describe the solution you'd like
Open to other ideas as well
Describe alternatives you've considered
No response
Additional context
No response

I don't think this is a good idea imho because it makes code a lot less readable and introduces pitfalls of scopes when "reading" code.
Personally i don't really mind writing this code explicitly but something zig or rust(i think?) does is something like
var someVariable = if (condition) {
    ...;
} else {
    ...;
};

var contents = with ("file.txt", "r") {
    file.read();
}

there could also be a explicit return rather then implicit capture of the value. not returning a value should be a compile time error()

We wouldn't want the with statement (or I guess now expression) block to have to return a value as you wouldn't always have to (think of writing to a file (we also wouldn't be able to work out the file opening mode either until runtime))
Maybe I was trying to solve an issue that wasn't there, but I got a little annoyed at having to wrote var contents to then change it in the with block.
Appreciate the challenge on this though, good to bounce ideas!

I can def see it getting annoying with the with statement, maybe it would be worth considering another way of directly getting file content, like python allows to call open without with, with the tradeof of having to explicitly close the fd

Oops sorry missed this response - yeah potentially a good shout! I'm probably with you though that the hoist keyword isn't the way to solve that issue so gonna close this out, thanks for the spitball!


Expose low-level database file access methods (sqlite3_file and sqlite3_io_methods) for a connection

Hi folks! 👋 Would you be interested in exposing a wrapper around the low-level OS interface database file methods? My use case is a little unusual, and I'm not sure how useful it would be without also exposing a safe wrapper for VFSes (#1145), but I wanted to ask just in case!
I've been experimenting with enabling memory-mapped I/O for SQLite-backed key-value storage in Firefox. SQLite supports memory-mapping via PRAGMA mmap_size, but cautions that file corruption and I/O errors will lead to crashes.
Chromium's SQLite wrapper tries to mitigate that in a clever way. When the wrapper opens an SQLite database, it reads ahead some number of bytes in the database file using sqlite_io_methods->xRead, starting at the high-water mark from the last read. If the read succeeds, the wrapper advances the high-water mark, and sets PRAGMA mmap_size to it. If the read fails, the wrapper invalidates the high water-mark for that database, and disables memory-mapped I/O from then on.
I was curious how it would look to do the same in Rust with Rusqlite, so I implemented Chromium's approach in linabutler/skv#1, using Rusqlite's Connection::get_handle to get at the low-level methods.
You can see my attempt at wrapping xFileSize and xRead in a SqliteDatabaseFile wrapper here. Reading through #1145, I think my wrapper is trying to express the same abstraction as @jalcine's Resource trait.
I'm wondering if there's a case for having an interface like that in Rusqlite today, separately from full VFS support? Concretely, something like:
impl Connection {
    // Calls `sqlite3_file_control(SQLITE_FCNTL_FILE_POINTER)`, then wraps
    // the `sqlite3_file` in a `DatabaseFile`.
    pub fn get_database_file(&'conn self) -> DatabaseFile<'conn>;
}

impl DatabaseFile<'conn> {
    // Wrappers around https://www.sqlite.org/c3ref/io_methods.html

    // `sqlite3_io_methods->xClose`; `Resource::close` in jalcine/rusqlite#1.
    pub fn close(&self) -> Result<()>;

    // `sqlite3_io_methods->xRead`; `Resource::read_bytes` in jalcine/rusqlite#1.
    // I named this `read_exact_at` because its semantics match Rust's
    // `std::fs::File::read_exact_at`.
    pub fn read_exact_at(&self, buf: &mut [u8], offset: u64) -> Result<()>;

    // `sqlite3_io_methods->xWrite`; `Resource::write_bytes` in jalcine/rusqlite#1.
    pub fn write_at(&self, buf: &[u8], offset: u64) -> Result<()>;

    // `sqlite3_io_methods->xTruncate`.
    pub fn truncate(&self, size: u64) -> Result<()>; // xTruncate

    // `sqlite3_io_methods->xSync`; `Resource::sync` in jalcine/rusqlite#1.
    pub fn sync(&self, flags: SyncFlags) -> Result<()>;

    // `sqlite3_io_methods->xFileSize`; `Resource::file_size` in jalcine/rusqlite#1.
    pub fn size(&self) -> Option<u64>;

    // And so on...
}

It does feel a little odd exposing some of these without VFS support, particularly methods like truncate(), write_at(), unlock(), etc...calling those in a way that SQLite doesn’t expect will almost certainly corrupt the database file.
But, it would...(1) address my very, very specific need ☺, and (2) I think still be compatible with adding VFS support in the future, in the style of jalcine/rusqlite#1.
Thanks!

https://github.com/search?q=lang%3Arust+sqlite3_file_control+SQLITE_FCNTL_FILE_POINTER+NOT+is%3Afork&type=code
gives
https://github.com/tursodatabase/libsql/blob/d0edd1d728704f56f109d5860fef5b318f3df849/libsql-sys/src/connection.rs#L351
https://github.com/losfair/mvsqlite/blob/ec0cb13a9657ae0f503a2a289f5da78ac90fa4d2/mvsqlite/src/util.rs#L31
So there are at least two other similar usages of sqlite3_file_control.


Bugfix: Fixes issue where headers were treated as case sensitive after deserialization.

This bug seems to have been introduced when the MultiValuedTreeMap was added to support multi valued headers.
The bug:
When the MultiValuedTreeMap used for the multiValueHeaders property on AwsProxyRequest is deserialized the default constructor is used. The result is that the  headers keys are treated as case sensitive because the String.CASE_INSENSITIVE_ORDER comparator is not used for the underlying TreeMap.

Thank you! I've merged the changes in the core branch where I'm working on the next release.


Travis CI config

Travis CI config file was added.

We usually test in python 2.7, 3.4, 3.5 and 3.6. @Strilanc can you help us configure travis based on this PR?

@sunqm let me know when you are going to work on this repo imminently. We can then prioritize setting up travis (which is going to be somewhat of a battle I fear).

@babbush Don't worry. No rush on me.
I'm figuring that if I made changes on my fork, it may mess up the PR.  Will it be more convenient if I close this PR now and wait for you guys deciding how to set up travis?

It is fine to leave it open actually. Feel free to mess it up ;-)
But you are also welcome to close it. Makes no difference to me.


Error after updating package: "vite_ssr_import_2.defu is not a function"

I was admittedly being a bit careless in updating some npm packages and am now getting the following error:
500
vite_ssr_import_2.defu is not a function
at ./node_modules/@nuxtjs/supabase/dist/runtime/plugins/supabase.server.mjs:14:40
at fn (./node_modules/nuxt/dist/app/nuxt.mjs:148:27)
at Object.callAsync (./node_modules/unctx/dist/index.mjs:49:19)
at callWithNuxt (./node_modules/nuxt/dist/app/nuxt.mjs:150:23)
at applyPlugin (./node_modules/nuxt/dist/app/nuxt.mjs:94:29)
at Module.applyPlugins (./node_modules/nuxt/dist/app/nuxt.mjs:104:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async createNuxtAppServer (./node_modules/nuxt/dist/app/entry.mjs:30:7)
at async default (./node_modules/@nuxt/vite-builder/dist/runtime/vite-node.mjs:27:18)

@nuxtjs/supabase v 0.3.0 somehow got installed so I tried rolling it back to 0.2.4 (the version my package.json showed in my last commit). That doesn't seem to be working either.
Any help?

Did you also update nuxt to the stable v3 ? Can you try to remove your .nuxt, node-modules folders and your lock file then install again ?


Implement and test retry classifier sorting

Motivation and Context

#3322
Description

I gave classifiers priorities but never actually sorted them. This PR fixes that.
Testing

I wrote a test
Checklist

[x] I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

I also fixed a few random things that IntelliJ didn't like.


Cannot render to frame buffer

Hi,
Thanks for this excellent library, I was using sokol_gfx directly in a 2D engine and sokol_gp made my life a lot easier.
However, I can't seem to be able to render to a frame buffer. My rendering starts with a start call, which receives an optional render target:
void start(rm::RenderTarget const* target) override {
    _renderTarget = target;

    if (_renderTarget == nullptr) {
        sgp_begin(_size.width(), _size.height());
        sgp_viewport(0, 0, _size.width(), _size.height());
        sgp_project(0.0f, _size.width(), 0.0f, _size.height());

        sgp_set_color(0.0f, 0.0f, 0.0f, 1.0f);
        sgp_clear();
        sgp_reset_color();
    }
    else {
        rm::Size<long> const& size = _renderTarget->size();
        sgp_begin(size.width(), size.height());
        sgp_viewport(0, 0, size.width(), size.height());
        sgp_project(0, size.width(), 0.0f, size.height());

        sg_pass_action action = {};
        action.colors[0].action = SG_ACTION_CLEAR;
        action.colors[0].value.r = 0.0f;
        action.colors[0].value.g = 0.0f;
        action.colors[0].value.b = 0.0f;
        action.colors[0].value.a = 1.0f;
        sg_begin_pass(static_cast<SokolRenderTarget const*>(_renderTarget)->_pass, &action);
    }
}

After that, I can draw quads, textured or not:
void draw(rm::Quad const& quad, rm::Texture const* const texture, Post post) override {
    rm::Point const& position = quad.position();
    rm::Size<float> const& size = quad.size();
    rm::Point const& center = quad.center();
    rm::Vec2 const& scale = quad.scale();
    float const angle = -quad.angle();
    rm::Color const& color = quad.color();

    rm::Point const screencenter(position.x() + center.x(), position.y() + center.y());

    sgp_push_transform();
    sgp_scale_at(scale.x(), scale.y(), screencenter.x(), screencenter.y());
    sgp_rotate_at(angle, screencenter.x(), screencenter.y());

    sgp_set_color(color.r(), color.g(), color.b(), color.a());
    sgp_set_blend_mode(SGP_BLENDMODE_BLEND);

    if (texture != nullptr) {
        sgp_set_image(0, static_cast<SokolTexture const*>(texture)->_texture);
        sgp_draw_textured_rect(position.x(), position.y(), size.width(), size.height());
        sgp_reset_image(0);
    }
    else {
        sgp_draw_filled_rect(position.x(), position.y(), size.width(), size.height());
    }

    sgp_reset_blend_mode();
    sgp_reset_color();
    sgp_pop_transform();
}

And then I call present to commit the draw calls:
void present() override {
    if (_renderTarget == nullptr) {
        sg_pass_action action = {0};
        sg_begin_default_pass(&action, _size.width(), _size.height());

        sgp_flush();
        sgp_end();

        sg_end_pass();
        sg_commit();

        _platform->swapBuffers();
    }
    else {
        sgp_flush();
        sgp_end();
        sg_end_pass();

        _renderTarget = nullptr;
    }
}

When I render to the screen, I can see everything is there (it's just one textured quad), but if I render to a framebuffer, all I see when I render it to the screen is a white quad. If I set a breakpoint at draw I can see that texture is not null, and all the other values are good. I can also see that the framebuffer path is being taken in start and present.
This is how I'm creating the framebuffer:
SokolRenderTarget(long const width, long const height, Filter const filter) : rm::RenderTarget(width, height) {
    {

        sg_image_desc desc = {};
        desc.render_target = true;
        desc.width = width;
        desc.height = height;
        desc.pixel_format = SG_PIXELFORMAT_RGBA8;
        desc.min_filter = filter == rm::Texture::Filter::Nearest ? SG_FILTER_NEAREST : SG_FILTER_LINEAR;
        desc.mag_filter = desc.min_filter;
        desc.wrap_u = SG_WRAP_CLAMP_TO_EDGE;
        desc.wrap_v = SG_WRAP_CLAMP_TO_EDGE;
        _target = sg_make_image(&desc);
    }

    {
        sg_desc sgdesc = sg_query_desc();

        sg_image_desc desc = {};
        desc.render_target = true;
        desc.width = width;
        desc.height = height;
        desc.pixel_format = SG_PIXELFORMAT_DEPTH_STENCIL;
        desc.sample_count = sgdesc.context.sample_count;
        _depth = sg_make_image(&desc);
    }

    {
        sg_pass_desc desc = {};
        desc.color_attachments[0].image = _target;
        desc.depth_stencil_attachment.image = _depth;
        _pass = sg_make_pass(&desc);
    }
}

I followed the framebuffer example to write the code, but the example is a bit contrived in that it follows a fixed path whereas I need the flexibility to draw anything, anytime to a framebuffer, but still it looks correct to me.
Any help is greatly appreciated.

Hm I've tried so many things that I can't tell why it's working now. It was my fault of course, as the framebuffer sample worked just fine.
Well, sorry for the noise, and thanks again for this great library.


Stack overflow when loading a website

There seems to be a problem when loading the page "wikinewforum.com". It crashes with stackoverflow.
I am using AngleSharp 0.9.6.

Any more information? I will try to reproduce but usually websites are a rather bad source for reproducing errors (they may change frequently and the error may also be related to a specific version shown for a range of IP addresses, etc.).

Tell me if you cannot reproduct it and I will attach the html or try to debug it myself.
Another website that crashes:
http://www.sollentuna.se

Thanks for the report. I could reproduce both errors (they were different ones, even though both lead to one conclusion).
Both fixed - will be part of v0.9.7!


Feature Request: Global Statusline

NeoVim recently introduced the global statusline, which sounds great to me, because it would allow me to display global information like the current working directory, global settings, git/project related information in the global statusline and buffer/file related information in the window statusline.
It also should be possible to turn on/off the global and the window statuslines individually.
Remark: I'm not a NeoVim user but I know that the multiline statusline is a thing that many Vimmers are wishing for. And now with the concept of a global statusline it is almost like multiline because we would have 2 statuslines. And with a single window it would even look like a 2 line statusline.
I checked if such requests exist, but I couldn't find any. Feel free to link.

Here the link to the proposal on nvim side
https://github.com/neovim/neovim/issues/9342

So it is no longer clear what the contents of window is?  I would think a global statusline would be an extra line above the command line, not replacing the existing statuslines but moving some items there.

So it is no longer clear what the contents of window is? I would think a global statusline would be an extra line above the command line, not replacing the existing statuslines but moving some items there.

The question I don't understand, but yes the global statusline is an extra line (or more) above the commandline.
I think it would be nice if one could configure the global statusline independently from the window statuslines.
And also deciding if the global statusline is visible or not, and if window statuslines are visible or not, or only when the window is focused.
an example configuration could be...
the global statusline shows current working directory and git branch name
the window statuslines show the filename number of the current line, total number of lines
but of course one can configure whatever is desired.
I could also configure to only have the global statusline, and only show the information of the currently focused window.

Here 2 more images as described in my previous message.

I noticed that when someone has 4 splits or more, that then the statusline is taking either too much space vertically, or the statusline is too short and not all information fits. And a global statusline would solve that issue, because it is 1 line only and has the full width.

So it is no longer clear what the contents of window is? I would think a global statusline would be an extra line above the command line, not replacing the existing statuslines but moving some items there.

Ah you mean that in vertical splits we wouldn't be able to see where a window ends and the next split window starts?
Okay now I see that my vertical space argument is not valid, because in Terminal we still need a full line even if we only want to display a thin separator line as shown in the image. But still visually clean and gives the impression of more space.
So this would mean that in the images above where a window has no statusline, the space where the statusline would have been gets replaced with a separator line? Maybe with box drawing characters?
Yes that sounds right and logical to me, thanks @brammool for pointing it out.

@marcotrosi It's not how global statusline currently works in neovim. It's just one statusline and other windows just have borders not another statuslines.

So it is no longer clear what the contents of window is? I would think a global statusline would be an extra line above the command line, not replacing the existing statuslines but moving some items there.

And why only above command line? Maybe as first line of the screen would be better or an option where to place it?

@marcotrosi It's not how global statusline currently works in neovim. It's just one statusline and other windows just have borders not another statuslines. So Bram question was actually on point.

that is correct, but I want it differently, I didn't want the NeoVim solution. And with my general approach users can configure whatever they need. If they want window statuslines they can have them, if they dont they dont.

So it is no longer clear what the contents of window is? I would think a global statusline would be an extra line above the command line, not replacing the existing statuslines but moving some items there.

And why only above command line? Maybe as first line of the screen would be better or an option where to place it?

This is theoretically possible, it would be then above the tabline. But to be honest, this is already a quite heavy feature request, and I don't want to bother Bram too much. So I would like to keep it simple and increase the chances of getting such feature.

The nvim solution is better to me. And I even want  putting global status line and cmd line together into a single line, just like vscode.

I was wondering the same recently.
If I have to express my personal preference, I would go for this:
https://github.com/vim/vim/discussions/15702#discussioncomment-10709040
Tidy and clean. That also remind me the macos menu bar that switches depending on who is active at that point in time.
Note that if you have a crowded statusline, then the window content may not be clear anyway. In that case, is better to have a global statusline so at least you know what is one window content (i.e. the active window content). Plus, and I may be wrong, it looks like common practice among IDE:s to have a unique statusline that switch its content depending on the active window, I think we could easily align.
Finally, note that the request does not imply any changes of existing behaviour, so that for those not interested nothing will change. All in all I don't think it is an unreasonable request, given also the number of thumbs up on top of the first post that you seldom see. :)
My two cents.

I've also wanted to separate buffer-specific information from information which concern the state of vim itself. My two cents is that I'd want to move the global statusline to the very top. I seldom use tabs nor splits, and still want this.


API request header IP

This may be intended, but I was wondering; I have a get request that I do with axios. When this happens on the client, it will send headers with the IP address of the user in it.
However, when I send it from the server through redux-connect, the axios request will send the IP address of the server, so http://localhost:3000 instead.
I was wondering is there a way, when axios is loaded async, to also return the headers with the IP address of the user, instead of the server?

I think you will have to pass your ip address (i.e. req.remoteAddress) to your loadOnServer function.

@hanjukim how would you go about passing headers to the loadOnServer function?

@dawidvdh through helpers / utilities


Fix cron

Changes

Fix the cron job, should be working properly now (will check on 14th Dec for logs)

Had to create a one line bash script with the python command (i hate this fix)

Adjust behaviour if project ids are not set after all CLI command

This change is

Cron job is not fixed

Still not fixed


Is genes an optional or required argument for prettyForestPlot + other prettyForestPlot issues

The documentation says that genes is optional but when I run this function without it I get an error. Can the function be fixed to work without this option specified and/or the docs be updated to make this required?
prettyForestPlot(maf=bl_coding,metadata=bl_meth_meta,comparison_column="cluster",comparison_values=c("cluster1","cluster2"))
 Error in h(simpleError(msg, call)) :
error in evaluating the argument 'table' in selecting a method for function '%in%': argument "genes" is missing, with no default

I think it's best to update the documentation for this function so that it is clear that genes is a required parameter.
Specified genes in this parameter are required to filter the incoming maf and this is what the error you are seeing relates to.
In addition, there is a check at the beginning of this function that is meant to stop the function if no genes are provided. However, this currently does not work as intended. Will be fixed in a PR dedicated to resolving the issues raised for this function.

There's another issue related to this plot:
prettyForestPlot(maf=bl_coding,metadata=bl_meth_meta,comparison_column="cluster",comparison_values=c("cluster1","cluster2"),genes=dlbcl_genes,max_q = 0.1)
FONT: 20 POINT: Inf 0
Error in `check_aesthetics()`:
! Aesthetics must be either length 1 or the same as the data (1): ymin, ymax, x and y
Run `rlang::last_error()` to see where the error occurred.

Wouldn't it be better to have it work as advertised though? Some folks may want to run the test on all genes rather than have to subset them upfront

Of course, that sounds reasonable. I can add this functionality, no problem.

Resolved?

Resolved!


lumberg gem does't working

Hi Sir,
I am trying to use this lumberg gem inside my User model,
require 'lumberg'
  def self.create_cpanel_acct
	server = Lumberg::Whm::Server.new(
	  :host => 'connecttheory.com',
	  :user => 'connectt',
	  :hash => 'secretpassword'
	)

	result = server.account.create(
	  :username => 'newuser',
	  :domain   => 'newuser.com',
	  :password => 'password'
	)

	if result[:success]
	  return result[:message]
	else
	  return "not created"
	end
  end

and yet when I call the
User.create_cpanel_acct
I got the message "not created"
I have no Idea how to troubleshoot it.
Any help will be much appriciated.
Regards,
Amul

The raw response from WHM is available via Server#raw_response. Can you try something like this:
  def self.create_cpanel_acct
    server = Lumberg::Whm::Server.new(
      :host => 'connecttheory.com',
      :user => 'connectt',
      :hash => 'secretpassword'
    )

    result = server.account.create(
      :username => 'newuser',
      :domain   => 'newuser.com',
      :password => 'password'
    )

    if result[:success]
      return result[:message]
    else
      return server.raw_response # return raw WHM response
    end
  end

Thanks for your reply.
I got this response....
#Net::HTTPForbidden:0x70834deae1b0
and I wonder what is the meaning of this?...

It means that the authentication with WHM has failed. If you're using a password instead of API hash, that functionality is only available on the develop branch right now. You can add this to your Gemfile to use that instead of version 1.0.0 from ruby gems:
gem "lumberg", :git => "git://github.com/site5/lumberg.git", :branch => "develop"

I still get the error,
I wanna try using the API hash, is the "API hash" is the same as the "Remote Access Key"... if not where can I get It?