[8.x] Enable to modify HTTP Client request headers when using beforeSending() callback

Basically, I'm trying to add a request header when sending an HTTP request using HTTP Client from Laravel. But I want to make this thing dynamically since it requires the targeted URL as the header data and it will be used in many further HTTP request. So I decide to use the Http::beforeSending() method and take the given Illuminate\Http\Client\Request parameter to get the URL as the example shown below.
<?PHP

use Illuminate\Http\Client\PendingRequest;
use Illuminate\Http\Client\Request;
use Illuminate\Support\Facades\Http;

Http::beforeSending(function (Request $request, array $options, PendingRequest $pendingRequest) {
    $requestLine = sprintf(
        '%s %s HTTP/%s',
        $request->toPsrRequest()->getMethod(),
        $request->toPsrRequest()->getUri()->withScheme('')->withHost(''),
        $request->toPsrRequest()->getProtocolVersion()
    );

    // this way doesn't work as I mention below.
    $pendingRequest->withHeaders(['Authorization' => 'Bearer '.$requestLine]);

    // this way works, but need some changes in the HTTP client.
    return $request->toPsrRequest()->withHeader('Authorization', 'Bearer '.$requestLine);
})->get('http://foo.com/json');

The problem is the request header wasn't changed at all since the PendingRequest::runBeforeSendingCallbacks() used to run this callback doesn't bring that into the real HTTP request as I expect. Using PendingRequest::withHeaders() also doesn't work because the actual HTTP Request was already created, so any modification that comes from the PendingRequest instance is useless.
This PR will fix that problem, so every registered beforeSending callback on the HTTP Client that returns a GuzzleHttp\Psr7\RequestInterface or Illuminate\Http\Client\Request value will be applied to the HTTP request instance.

@taylorotwell Could you please also bring this fix into 9.x?


Negative UNL amendment

The amendment corresponding to the NegativeUNL feature is not available for voting at this time.
The XRPL Foundation believes that the NegativeUNL functionality is critical to the long-term health of the XRPL, not only in principle but also in practice.
The code to introduce the amendment for this feature should be released immediately and made available in the form of an hotfix.
We are prepared to make such a release ourselves for validators who wish to deploy it.

+1

+1 - I believe the NegativeUNL is an overall great idea, and I think it would be appropriate to roll it in for voting with the next hotfix.
Based on my experiences running infrastructure and watching validation streams, the benefits to liveliness make this code worthy of being promoted to an actual amendment. It is asking a lot for validator operators to be available to respond instantaneously 24/7/365, and I know an amendment like this would have saved me some stress over the last few years!
Increasing the number of validators on the UNLs has alleviated some of the stress, however, I think the NegativeUNL is still a more robust idea, as it adds 20% more leeway (up to 40% of the original number of validators can be offline, rather than the current 20%).
I believe that the feature has been in testing since about v1.6.0, though I would also appreciate additional information about this.

+1, if this has been tested and no issues are found.

All for it :)

+1, good luck.


[Feature][UI Next]Fix the routing problem of project management module

Purpose of the pull request
Please refer to the issue #8070 .

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

Codecov Report

Merging #8236 (f185579) into dev (f3d663a) will increase coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                dev    #8236      +/-   ##
============================================
+ Coverage     44.98%   45.01%   +0.02%
- Complexity     3955     3956       +1
============================================
  Files           672      672
  Lines         26218    26218
  Branches       2826     2826
============================================
+ Hits          11795    11801       +6
+ Misses        13300    13290      -10
- Partials       1123     1127       +4

Impacted Files
Coverage Δ

...dolphinscheduler/remote/future/ResponseFuture.java
81.96% <0.00%> (-1.64%)
:arrow_down:

...e/dolphinscheduler/remote/NettyRemotingClient.java
52.81% <0.00%> (-0.71%)
:arrow_down:

...inscheduler/common/task/sqoop/SqoopParameters.java
74.00% <0.00%> (ø)

...he/dolphinscheduler/common/enums/SqoopJobType.java
88.88% <0.00%> (+88.88%)
:arrow_up:

Continue to review full report at Codecov.

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


Inventory Display Page

Create the page to display the inventory information.

Inventory Display page implemented with proper button navigation to/from the Home Page. ID page displays all food items in the database with it's name, expiration date, and time added to the database.


Proposal: Add dynamic metadata to rate limit actions

Description: Currently to pass information from the dynamic metadata to the rate limit actions one would need to use the Lua filter to append a header with the relevant information. Instead, it would be more useful to be able to use the dynamic metadata directly as one of the actions of the rate limiter.
The action can follow the current MetaData schema[1] to get the value:
actions:
  - { dynamic_metadata: { key: “…”, path: [] } }

key: The key name of metadata to retrieve the Struct from the metadata.
path: The path to retrieve the value from the Struct
Links:

https://www.envoyproxy.io/docs/envoy/latest/api-v3/type/metadata/v3/metadata.proto.html

Seems reasonable functionality; how will a value in the action be interpreted?

I think we can interpret it the same way we interpret the values from the other actions.

SGTM, should I assign this to you?

Yes, thanks!


schema name null fix

This is to fix the issue mentioned here
https://github.com/springdoc/springdoc-openapi/issues/1266
I can reproduce it with my test case so I debug and I found the name for the schema is not set.

@frantuma @char0n @gracekarinina @HugoMario @ponelat
Could any one of you please approve the build workflow?
This is a very easy fix.


Add a shopping cart page

A shopping page should show how products are displayed at checkout

[ ] Add search bar


chore: merge unstable into stable

About
This PR merges unstable into stable for a new pre release.
Checklist

[x] I've ran pre-commit to format and lint the change(s) made.
[x] I've checked to make sure the change(s) work on 3.8.6 and higher.
[x] This fixes/solves an Issue (If existent):

resolves that we really needed a new pr template

I've made this pull request for/as: (check all that apply)

[x] Documentation
[x] Breaking change
[x] New feature/enhancement
[x] Bugfix

Marking this as ready now


add test for sync include/exclude options.

Codecov Report

Merging #1896 (0d89e6b) into main (d3ca368) will decrease coverage by 0.04%.
The diff coverage is n/a.

:exclamation: Current head 0d89e6b differs from pull request most recent head eed72b1. Consider uploading reports for the commit eed72b1 to get more accurate results

@@            Coverage Diff             @@
##             main    #1896      +/-   ##
==========================================
- Coverage   61.54%   61.49%   -0.05%
==========================================
  Files         135      135
  Lines       23415    23428      +13
==========================================
- Hits        14411    14408       -3
- Misses       7331     7344      +13
- Partials     1673     1676       +3

Impacted Files
Coverage Δ

pkg/vfs/reader.go
77.18% <0.00%> (-3.11%)
:arrow_down:

pkg/vfs/writer.go
78.64% <0.00%> (-1.02%)
:arrow_down:

pkg/vfs/vfs.go
78.15% <0.00%> (+0.17%)
:arrow_up:

pkg/sync/sync.go
46.04% <0.00%> (+0.76%)
:arrow_up:

pkg/meta/sql_lock.go
75.00% <0.00%> (+2.56%)
:arrow_up:

Continue to review full report at Codecov.

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


Update client.py

.next() and .previous() wouldn't walk through results properly using something like:
sp = spotipy.Spotify()

def get_tracks(artist, locale=None):
    result = sp.search(q=artist, type='album', limit=10, market=locale)

    while True:

        # do something with the results.

        result = sp.next(result['albums'])

        if result is None:
            break

Both methods were update to go off the offset, limit, and total, of result instead of the next url returned.
market was also added as an argument in .search as the API allows to search in a specific market.

I believe that the bug in the API has been fixed, so this change is no longer needed.


BookList Implementation

Changes

BookList Object now utilizes String for IDs to work with Firestore.

Implements BookListServlet which integrates Firestore.

BookLists can now be create and stored on Firestore.
BookLists can now be update on Firestore.
BookLists can now be fetch on Firestore.

Very basic Frontend implementation of BookList

Can create a BookLists.
Can add Books to BookLists using @antoniolinhart  Search implementation.
Can fetch User's BookLists from Firestore.

Dependencies

Depends on https://github.com/STEP-Pod-Capstone-Project/Capstone-Project/pull/34 and @antoniolinhart https://github.com/STEP-Pod-Capstone-Project/Capstone-Project/pull/46

Should probably review and approve these PRs first before this one.

Demo

Bigger Video

Great work with user authentication! I would try basing this off of master, as many of the changes in here are from other PRs that have already been merged to master. This would make it easier to review the changes that you made in isolation from other changes made by me and Antonio on unrelated parts.

Hi Steven, I think I am going to change the UUID and Servlet methods in another PR. Let me know when you Generic Firestore methods are ready.


Add EntityPath and FullyQualifiedNamespace properties to processor args

Addresses https://github.com/Azure/azure-sdk-for-net/issues/28769 and https://github.com/Azure/azure-sdk-for-net/issues/23582

/azp run net - servicebus - tests

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.Messaging.ServiceBus

/azp run net - servicebus - tests


Calling craftItem from ME-Bridge (connected@AE2) returns Java.IllegalStateException

Descripe
Calling craftItem from ME-Bridge (connected at a Applied Energistics 2 network) returns a Java.IllegalStateException
(Latest AP + AE2 version)
Steps to reproduce
bridge = peripheral.find("meBridge")
bridge.craftItem({ name="minecraft:gray_dye", count=1 })

Multiplayer?
Yes
Version
0.7.1r (Latest)
Minecraft, Forge and maybe other related mods versions
36.2.2
Screenshots or Videos
https://ibb.co/tXYdt5n
Crashlog/log
No response

@SirEdvin this is your fault :P
I will fix that in the next update

@SirEdvin Shame!   Thanks for doing this.

Should be fixed in 0.7.2r


Question about 302 redirects

Does the spec say how to deal with 302 redirects in import paths? I'm running into this "problem"
If I have a script like this:
import lodash from "https://unpkg.com/lodash"

I see a chain of redirects in the Network tab:
GET https://unpkg.com/lodash-es
> 302 Location<EMAIL_ADDRESS>GET<EMAIL_ADDRESS>> 302 Location<EMAIL_ADDRESS>GET<EMAIL_ADDRESS>> 200 OK

Then when the browser (Chrome 61.0.3163.100) resolves the imports of lodash, and sees
export { default as add } from './add.js';

It is making a request to
GET https://unpkg.com/add.js

rather than to
GET<EMAIL_ADDRESS>
And basically my question is - is Chrome doing the desired behavior and this has been discussed and decided already and I need to change how I'm writing this code? Or is this a potential area where Chrome, or the CDN, or the spec can be adjusted so this usage scenario works?
(finally, I apologize if this isn't the correct repo to create this issue. (It could be a Chrome-specific bug after all?) If you have a better idea about where to file this let me know)

Yes, this is the way that redirects work for ES modules, by design, and it is a known limitation. In fact it's quite refreshing to see these problems finally happening :)

Note that the use of a 301 redirect here should resolve the issue.

In fact it's quite refreshing to see these problems finally happening :)

I was thinking of that as I was creating this issue. I was thinking, "I've gone way past '1st world problems' haven't I? I'm living in yesterday's future." I feel like I'm reporting an issue with my time travel machine. But you know what they say: the future is already here, it's just not evenly distributed yet.
So obviously we wouldn't want this first redirect...
GET https://unpkg.com/lodash-es
> 302 Location<EMAIL_ADDRESS>
... to be a 301, because it goes from a generic package name to the latest version of a package, and that changes over time. But that's OK because that redirect does not change the folder depth. Right? Now this second redirect...
GET<EMAIL_ADDRESS>> 302 Location<EMAIL_ADDRESS>
...does change the folder depth, and therein lies the problem. It sounds like you're saying a 301 redirect here would resolve the resolving issue? I think this change would be a pretty safe change to make, because npm modules are immutable so I don't see why the main entry file for a released version of a module should ever need to change. I'll see if the @unpkg folk can be interested in this.

Hang on. Wait a sec. Why can't I reproduce this... (grumble grumble type type)

A 301 redirect can be cached with a short expiry, in order to match the intent here. Perhaps Chrome updated their implementation to work, always a possibility with this stuff!

I don't think it's them. I think it's me. I just can't remember HOW I got into this state. Oh well. I'll leave this open for now and if I can't figure out how to reproduce the problem this afternoon I'll close it.

A 301 redirect can be cached with a short expiry

Sounds risky, doesn't it? My understanding has always been that once your server returns a 301 there's no telling how various proxies and engines will treat it. It's not hard to imagine someone writing some software that unconditionally caches 301s forever w/out paying any attention to its expiration date.

Yeah I guess 302 probably is the better option, and the above should actually work regardless of 301 or 302.

Alright! I managed to replicate it. But it's a SystemJS specific issue, and maybe I just have something misconfigured? I'll open an issue in the systemjs repo.


Example of running multiple job listeners in a single process?

I've been using the library as a distributed job processor across over a dozen VM's, but scaling has not been the best experience.
Right now I have a Linux VM that runs a dotnet process as a systemd service. That process represents a single executor.
I templatized the service so I can spin up multiple copies, and run 20 instances of the dotnet service per server.  I can then replicate this across more servers as needed.
But I find that I don't do a good job of estimating how much CPU usage my jobs actually take, and adding/removing systemd services is a bit of a nuisance across more than a dozen VM's. I'd prefer if I could define the number of executors in code and run a single process with multiple job executors.
So a single VM, with a single dotnet service, that contains multiple job listeners in the process.
Any ideas on how to implement this? I was thinking maybe a thread pool, but I wasn't sure what your experience had been.

The safest approach would be to start a number of child processes from your root process. You can do this with the standard Process Class. This would also be the least likely to encounter any strange errors.
The simplest approach, and one I recommend testing out before going all out is just to wrap a bunch of TaskClient.Listen() methods in a Task.Run() and awaiting all of them. Something like this:
await Task.WaitAll(new [] {
    Task.Run(() => {
        var taskClient = new TaskClient(TaskQueue.Redis(redisConnectionString));
        await taskClient.Listen();
     }),
    Task.Run(() => {
        var taskClient = new TaskClient(TaskQueue.Redis(redisConnectionString));
        await taskClient.Listen();
     })
});

Make sure with the second approach you don't share a TaskClient between threads.
Also it's similar to what we do in the tests, except tasks are executed off the queue directly in multiple threads:
https://github.com/brthor/Gofer.NET/blob/master/Gofer.NET.Tests/GivenATaskSchedulerInAnotherThread.cs#L51

I was playing with the code, and went in a completely different direction. I added an override to Listen so you can define how many threads to start.  It partially works... for some reason sometimes all the threads run, other times it acts like there is a lock somewhere?
Not a real PR, just a convenient place to see a DIFF: https://github.com/brthor/Gofer.NET/pull/51/files

The redis connection held by the TaskQueue will likely be a bottleneck if it's shared.

Regarding your PR #51, having a user-defined number of task listeners in the TaskClient is interesting since it avoids the need to run multiple scheduler threads.
IIRC there are some concerns with the default number of threads available to the standard Task Executor.
I'm going to think on it some more.

Yeah, the PR is just some test code. Take your time to think about the right approach :)
For now, your approach is working.


16 Accessories - Question

@maximkulkin
I cant add more than 8 accessories. How is it possible?

@maximkulkin
I always see iid 7 when setupping on homekit app. Accessories disapperad if there are more than 8.
Processing element {
"aid":	2,
"iid":	7,
"value":	true
}

I never have tried that, can you provide your accessory database code (that HOMEKIT_ACCESSORY macro construct)

I tried a lot of combinations latest here:
homekit_accessory_t *accessories[] = {
  HOMEKIT_ACCESSORY(.id = 1, .category = homekit_accessory_category_switch, .services = (homekit_service_t*[]) {
    HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t*[]) {
      &name,
      &manufacturer,
      //&serial,
      HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "xxx"),
      HOMEKIT_CHARACTERISTIC(MODEL, "xxx"),
      HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.7.9"),
      HOMEKIT_CHARACTERISTIC(IDENTIFY, NULL),
      //            HOMEKIT_CHARACTERISTIC(IDENTIFY, switch_identify),
      NULL
    }),

    HOMEKIT_SERVICE(SWITCH, .primary = true, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 1"),
                             &switch_on_1,
                             NULL
    }),
    HOMEKIT_SERVICE(SWITCH, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 2"),
                             &switch_on_2,
                             NULL
    }),
    HOMEKIT_SERVICE(SWITCH,  .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 3"),
                             &switch_on_3,
                             NULL
    }),
    HOMEKIT_SERVICE(SWITCH, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 4"),
                             &switch_on_4,
                             NULL
    }),
    HOMEKIT_SERVICE(OUTLET,   .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 5"),
                             &switch_on_5,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),
    HOMEKIT_SERVICE(OUTLET, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 6"),
                             &switch_on_6,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),

    NULL
  }),

  HOMEKIT_ACCESSORY(.id = 2, .category = homekit_accessory_category_outlet, .services = (homekit_service_t*[]) {
    HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t*[]) {
      &name,
      &manufacturer,
      //&serial,
      HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "xxx"),
      HOMEKIT_CHARACTERISTIC(MODEL, "xxx"),
      HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.7.9"),
      HOMEKIT_CHARACTERISTIC(IDENTIFY, NULL),
      //            HOMEKIT_CHARACTERISTIC(IDENTIFY, switch_identify),
      NULL
    }),

    HOMEKIT_SERVICE(OUTLET,  .primary = true, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 7"),
                             &switch_on_7,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),
    HOMEKIT_SERVICE(OUTLET, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 8"),
                             &switch_on_8,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),
    HOMEKIT_SERVICE(OUTLET, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 9"),
                             &switch_on_9,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),

    HOMEKIT_SERVICE(OUTLET, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 10"),
                             &switch_on_10,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),
    HOMEKIT_SERVICE(OUTLET, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 11"),
                             &switch_on_11,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),
    HOMEKIT_SERVICE(OUTLET, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 12"),
                             &switch_on_12,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),

    NULL
  }),

  NULL
};

Ok, one thing that I can immediately spot is that you reuse characteristics in multiple places. Thing is that each characteristic should be assigned unique ID and should be associated with exactly one accessory. You are supposed to set .id property for each characteristic, but since it's so common and tedious operation that esp-homekit automates that for you. It seems that HomeKit on iOS side can detect inconsistencies and refuse to pair.
Bottom line: you should create separate characteristics and not reuse them (in your case, you're using same name and manufacturer characteristics for different accessories.
Also, your code formatting is inconsistent: instead of
    HOMEKIT_SERVICE(OUTLET, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 12"),
                             &switch_on_12,
                             HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
                             NULL
    }),

you should have
    HOMEKIT_SERVICE(OUTLET, .characteristics = (homekit_characteristic_t*[]) {
      HOMEKIT_CHARACTERISTIC(NAME, "Switch 12"),
      &switch_on_12,
      HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
      NULL
    }),

i tried this code but it use too much heap..
HOMEKIT_ACCESSORY(.id = 1, .category = homekit_accessory_category_outlet, .services = (homekit_service_t*[]) {
  HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t*[]) {
    &name,
    &manufacturer,
    HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "get_my_ip"),
    HOMEKIT_CHARACTERISTIC(MODEL, "xxx"),
    HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.7.9"),
    HOMEKIT_CHARACTERISTIC(IDENTIFY, NULL),
    //            HOMEKIT_CHARACTERISTIC(IDENTIFY, switch_identify),
    NULL
  }),
  HOMEKIT_SERVICE(OUTLET, .primary = true, .characteristics = (homekit_characteristic_t*[]) {
    HOMEKIT_CHARACTERISTIC(NAME, "Switch 9"),
    &switch_on_9,
    HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
    NULL
  }),
  NULL
}),
HOMEKIT_ACCESSORY(.id = 2, .category = homekit_accessory_category_outlet, .services = (homekit_service_t*[]) {
  HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t*[]) {
    &name,
    &manufacturer,
    HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "get_my_ip"),
    HOMEKIT_CHARACTERISTIC(MODEL, "xxx"),
    HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.7.9"),
    HOMEKIT_CHARACTERISTIC(IDENTIFY, NULL),
    //            HOMEKIT_CHARACTERISTIC(IDENTIFY, switch_identify),
    NULL
  }),
  HOMEKIT_SERVICE(OUTLET, .primary = true, .characteristics = (homekit_characteristic_t*[]) {
    HOMEKIT_CHARACTERISTIC(NAME, "Switch 10"),
    &switch_on_10,
    HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
    NULL
  }),
  NULL
}),
HOMEKIT_ACCESSORY(.id = 3, .category = homekit_accessory_category_outlet, .services = (homekit_service_t*[]) {
  HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t*[]) {
    &name,
    &manufacturer,
    HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "get_my_ip"),
    HOMEKIT_CHARACTERISTIC(MODEL, "xxx"),
    HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.7.9"),
    HOMEKIT_CHARACTERISTIC(IDENTIFY, NULL),
    //            HOMEKIT_CHARACTERISTIC(IDENTIFY, switch_identify),
    NULL
  }),
  HOMEKIT_SERVICE(OUTLET, .primary = true, .characteristics = (homekit_characteristic_t*[]) {
    HOMEKIT_CHARACTERISTIC(NAME, "Switch 11"),
    &switch_on_11,
    HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
    NULL
  }),
  NULL
}),
HOMEKIT_ACCESSORY(.id = 4, .category = homekit_accessory_category_outlet, .services = (homekit_service_t*[]) {
  HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t*[]) {
    &name,
    &manufacturer,
    HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "get_my_ip"),
    HOMEKIT_CHARACTERISTIC(MODEL, "xxx"),
    HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.7.9"),
    HOMEKIT_CHARACTERISTIC(IDENTIFY, NULL),
    //            HOMEKIT_CHARACTERISTIC(IDENTIFY, switch_identify),
    NULL
  }),
  HOMEKIT_SERVICE(OUTLET, .primary = true, .characteristics = (homekit_characteristic_t*[]) {
    HOMEKIT_CHARACTERISTIC(NAME, "Switch 12"),
    &switch_on_12,
    HOMEKIT_CHARACTERISTIC(OUTLET_IN_USE, true),
    NULL
  }),
  NULL
}),

impossible to add 10-16 accesories

It's not about putting every service into a separate accessory, it's about every accessory referencing the same NAME and MANUFACTURER characteristics:
HOMEKIT_ACCESSORY(.id = 4, .category = homekit_accessory_category_outlet, .services = (homekit_service_t*[]) {
  HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t*[]) {
    &name,           // <=== This is a problem
    &manufacturer,   // <=== And this is a problem
    HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "get_my_ip"),
    HOMEKIT_CHARACTERISTIC(MODEL, "xxx"),
    HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.7.9"),
    HOMEKIT_CHARACTERISTIC(IDENTIFY, NULL),
    //            HOMEKIT_CHARACTERISTIC(IDENTIFY, switch_identify),
    NULL
  }),
  ...

Ok, just for giggles I flashed a dynamic_services example with 12 pins (although they were repeated as it does not matter here) so I've got an accessory with 12 relays. It paired fine, I was able to switch them on and off and see their status changing in serial monitor.

Be sure to update to latest code version

@maximkulkin Thank you.
 When adding more than 8 accessories, HomeKit can not add more than 8 FAVORITE devices.
This means i didnt checked rooms which shows all accessories.
Dynamic services example works and everything is clear.

It's not about putting every service into a separate accessory, it's about every accessory referencing the same NAME and MANUFACTURER characteristics:

Hi @maximkulkin , I was hoping to pick your brain on this. Say I started putting my design in production, the name and manufacturer would be fixed. Why would Home app not want to connect to two of my (identical but incremented serial number) devices in the same home?

Manufacturer or serial number values are really not important at all. But the problem there is with NAME (characteristic inside ACCESSORY INFO service) of first accessory - it is used as hostname and as service name in mDNS announcements. HomeKit spec requires accessories to do conflict resolution on mDNS names, but unfortunately it is not implemented currently, so you need to manually make sure those names are unique. In a lot of accessory examples that name is suffixed with first 6 digits of device MAC address in runtime, so that gives enough flexibility to avoid those conflicts, so this is a recommended workaround.
I was looking into improving mDNS recently, but haven't implemented it yet and it is not on top of my priority list.


Feature/calendar component

Description
adding calendar view for viewing events.  Looks extremely similar to figma mockup for calendar component.  added mock seed data to test component functionality and mapping through data.
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Change Status

[x] Complete, tested, ready to review and merge
[ ] Complete, but not tested (may need new tests)
[ ] Incomplete/work-in-progress, PR is for discussion/feedback

How Has This Been Tested?

[x] basic jest tests to check for text on each component, or that a div with classname exists.  aka, basic render tests.
[ ] full unit testing of each component and function

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] My code has been reviewed by at least one peer
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] There are no merge conflicts

 View Events Component


Dropdown menu errors out when navigating with keyboard

Steps

Use the dropdown with Dropdown.Menu and Dropdown.Item. For example: http://react.semantic-ui.com/modules/dropdown#search-in-menu

Click on the Search In-Menu dropdown to open it.

Press down arrow on the keyboard, then it errors out.
The error message in the console is: app.61ca82f….js:6621 Uncaught TypeError: Cannot read property 'length' of undefined

Expected Result
User should be able to navigate through the dropdown using up and down arrow.
Actual Result
It throws errors if the dropdown is created with Dropdown.Menu and Dropdown.Item
Version
0.61.7

Per the info message on the example:

The example below shows the desired markup but is not functional. Needs to be defined via shorthand, which is not yet possible.
If there's no pull request open for this, you should contribute!

This is not a bug but a missing feature, PRs welcome.

Closing as a dupe of #889


Driver load failed

Hi when try to use driver with xenos injector on vmware (OS:Win10 64bit) injector says driver load failed,
i turned on test mode, and also disabled driver signing moreover it working in my laptop what can be the problem ?

This is the wrong project, you should make an issue here: https://github.com/DarthTon/Xenos
Also try adding the error code

Can you post the log?

Check build version(if win 10 works only on 10586 build) and add error code

Any updates?


Deprecated Library Functions

The following errors were encountered when running src/compare.py

ValueError: Object arrays cannot be loaded when allow_pickle=False

Solution: downgrade numpy to 1.16.1

AttributeError: module 'scipy.misc' has no attribute 'imread

Solution: downgrade scipy to 1.1.0

I downgrade scipy to 1.1.0, but the AttributeErrors is still there.(I am setting up a new machine)
Solution: install pillow

Trying out this library in 2021 and encountered the same errors, found this issue and later some solutions. I'll try to describe what I did:
Python version is 3.7.10
tensorflow-gpu version is 1.15 (replaced requirements.txt tensorflow==1.7 with tensorflow-gpu==1.15)

ValueError: Object arrays cannot be loaded when allow_pickle=False

have to update the py files, all calls to np.load have to include allow_pickle=True
e.g. detect_face.py:85, data_dict = np.load(data_path, encoding='latin1', allow_pickle=True)

AttributeError: module 'scipy.misc' has no attribute 'imread'

scipy deprecated scipy.misc.imread, you may also need to install pillow if you haven't already done so
install imageio, find and replace misc.imread with imageio.imread and import imageio in all files that need it

in align_dataset_mtcnn.py I also replaced

misc.imsave with imageio.imwrite
misc.imresize(cropped, (args.image_size, args.image_size), interp='bilinear')
with
np.asarray(Image.fromarray(cropped).resize((args.image_size, args.image_size), resample=Image.BILINEAR))
(remember to include from pillow import Image at the top)

hope that helps.


Flask session cookie secure flag is not getting set.

Expected Behavior
Flask session cookie secure flag is not getting set.
One chrome developer tools, i see in the cookie sesction. the cookie name "session" is not have secure colum checked.
app.config.update(
    SESSION_COOKIE_SECURE=True, - -> This one
    DEBUG=True,
    REMEMBER_COOKIE_SECURE=True,
)

Actual Behavior

Paste the full traceback if there was an exception.

Environment

Python version: 3.6
Flask version: 1.x
Werkzeug version:

As the docs for this configuration variable said:

The application must be served over HTTPS for this to make sense.

You should test this configuration variable on an HTTPS server.

Yes, it is serving over HTTPS,
Is it possible to add the secure flag to the default flask session cookie, i tried session_cookie_secure to True , but no luck.. however when i add the secure to set cookie for any other cookies, it works verified the same in browser.. but the flask default session (cookie) isn’t getting the flag

There may be something wrong with your other code. I just deployed a minimal application here with the following code:
from flask import Flask, session

app = Flask(__name__)

app.config.update(
    SECRET_KEY='test',
    SESSION_COOKIE_SECURE=True,
)

@app.route('/')
def hello():
    session['name'] = 'grey'
    return 'Hello, world!'

The configuration variable is work as expected.

I think i was not clear enough. If i set any manually key into session , it works fine with the flag.
what am trying to know is the default session that flask provides ( which is basically a cookied stored in browser) hashed with the secret key.
i can see that in the browser console in under cookies section.
a cookie names "session" encoded
So can we set this cookie flag as secure.

session
eyJjc3JmX3Rva2VuIjoiNzE2MWQ5MjA3N2Q1ZTM5NGY3N2JhYjZhMjFhY2ExNzgwNjU2MzNiNCJ9.X7e9fQ.QbdNNUKo363HMz8BH9_p2Bcyu5o
sumdeb-ieewebportal.anka.corpee.example.com
/
Session
118
✓

Medium

Flask won't create the session cookie if you didn't set any value in flask.session. Besides, If you set SESSION_COOKIE_SECURE to True, it will also not create the session cookie when the connection is insecure (http://). You may need to remove your old cookie in browser before test.
Since I can confirm this is not a issue about Flask itself, if you have any further question, please use Stack Overflow or Pallets Discord's #questions channel.

Its a https site, even in the app home page, i don't have any manual cookie.
Yes am using flask-wtf for csrf, that is getting set in the flask session ,
Okay i will check in stack overflow.

I was to fix this issue. thanks for your support.


Feature Request: A way to apply effects to all tokens in a scene

Ideally with some way to filter between 'all' and 'party'. Maybe disposition? This would allow for things like:

Scouting, and other 'all party members' effects without a range.
Things that would be affecting any creature in the environment, such as Planar effects, or speed penalties for being in a blizzard, etc

This would be super useful!
Especially if it allowed for party wide macro/skill usage such as everyone rolling a perception check or survival check etc as a group.


add documentation generator for the API

docs: add make step for docs generation (make docs) https://github.com/contentful-labs/k8s-secret-syncer/pull/20/files#diff-b67911656ef5d18c4ae36cb6741b7965R102

uses https://github.com/elastic/crd-ref-docs/ to generate docs
this generates into asciidoc using the template in docs/_template and config in docs/_doc.yaml
docs/_config.yml contains jekyll config for gh-pages hosting
generates docs from the api/v1 package, into docs folder which in turn will be a jekyll site. It also copies README.md as the index for the site.

Closing this PR, not trying to land it in anymore.


[HTML5] Produce the editor zip in release folder.

It's time we start distributing the web editor as self-hostable
application if so desired.

Thanks!


Parsing name error with update file

Hello!
While trying to downgrade to version <IP_ADDRESS>6, The scan_updates function fails to find the update file while looking through the directory. Namely, this part:
p = f.split('_')
if len(p) != 2:
   continue

will fail to find the update file named rm2_<IP_ADDRESS>6_reMarkable2-JLWa2mnXu1-.signed because of the first underscore at the beginning (rm2_) and thus when trying to update will throw this KeyError:

In order to get around this I had to rename the file rm2_<IP_ADDRESS>6_reMarkable2-JLWa2mnXu1-.signed to <IP_ADDRESS>6_reMarkable2-JLWa2mnXu1-.signed

Sorry for the unrelated question, but could you please elaborate on how you found the version name ("JLWa2mnXu1") for this update?


How to generate the mobilenet.mlmodel file?

Thank you for this awesome project!
When I compile the project, I got this error:
coremlc: Error: unable to read document: /Users/qyvideo/work/deep_learning/SwiftOpenPose/SwiftOpenPose/Resources/mobilenet.mlmodel
detail: validator error: unable to open file for read
and how to generate this file? Is it in this section:
OpenPose Keras Mobilenet-Model
Result: However it did not work.

Thank you for trying.
You need to create a model converted from Caffe-Model to MLModel with reference to the next section.
https://github.com/infocom-tpo/SwiftOpenPose#the-following-is-how-to-execute-this-project
Apart from that, I can try out a model trained with the high speed mobilenet layer that we will release today.
https://s3-ap-northeast-1.amazonaws.com/swiftopenpose/MobileOpenPose.mlmodel
thank.

Cool!


nexusmods-app: use finalAttrs and buildInputs

Description of changes

nexusmods-app: use finalAttrs for recursive fixpoint
nexusmods-app: use buildInputs for dependencies

Follow up to #331355, make use of the finalAttrs support added to buildDotnetModule in #331398. Hopefully anything recursive in the package is now done correctly.
I was unsure how to handle the relationship between executables and meta.mainProgram, so I decided to define both explicitly for now. Perhaps buildDotnetModule should consider setting mainProgram automatically to head executables?
I also replaced the manual wrapper PATH creation with buildInputs for the desktop-file-utils dependency.

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

cc @corngood @l0b0

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 336221 run on x86_64-linux 1

2 packages built:

nexusmods-app
nexusmods-app-unfree

@MattSturgeon Everything seems to be addressed, right?  Okay if I merge?

@MattSturgeon Everything seems to be addressed, right? Okay if I merge?

Yes, everything should be good :+1:


Fix auto-render \[…] bug

Fixes issue #1075.
Currently, a row separator such as \\[0.3em] will cause the auto-render extension to fail if the row separator is placed between \(…\) math delimiters.
This PR re-orders the array of left delimiters that get searched for, putting \[ last in the list.  Then, \( is found before \\[0.3em] and the row delimiter is no longer mistaken for a math delimiter.

Update. Now I have done a local build from the source code and tested the result. It works fine and it does in fact resolve the \\[ bug when inside \(  \) delimiters.


Removed filter details enabled automatically when we click on back button.

Environment - staging
Devices used - Samsung Galaxy s8
Browser - Google chrome
1.Click on Request help.
2.click on medical.
3.provide location
4.you can see the onboarding details in the filter.
5.Remove all the Filter .
6.click on back button
Expected result
Removed filter details should not enable again.
Actual result
Removed filter details enable again automatically.

'Back' button retain the history.


KeyError: 'curvature(K(16))'

Describe the bug
I was trying to exactly replicate the code here on stackoverflow:
https://stackoverflow.com/questions/42476839/is-gaussian-mean-curvatures-applicable-for-rough-surfaces/42489903?noredirect=1#comment72136158_42489903
And the following command gives an error:
curvature = cloud.points["curvature(K(16))"]
raise KeyError(key) from err
KeyError: 'curvature(K(16))'
Expected behavior
I was trying to get edges from the original pointclouds as shown in the stackoverflow post.
Desktop (please complete the following information):

OS: Ubuntu 20.04
Version: pyntcloud 0.1.4

Additional context
I couldn't find any documentation regarding this "curvature(K(16))" in cloud.points and do the task I want to do. I wonder whether this is under modification since the comment on stackoverflow was posted in 2017.

Never mind, I figured out.

Hola @kidpaul94 , what was the fix?? Using `"curvature(K(10))"¿

cloud.add_scalar_field("curvature", ev=ev) gave me curvature(11), so I used that.


PageState is lost after page refresh or form submission

Describe the bug
When refreshing a page (or submitting a form) with a PageState, the PageState is lost. However, when checking the history.state['sveltekit:states'], we see that the expected state is still attached to the current history entry.
Reproduction
The following +page.svelte demonstrates the issue:

App PageState: {$page.state.filter}

History state: {JSON.stringify(historyState)}

<button on:click={() => replaceState('', { filter: 'banana' })}>Replace state with banana</button>
<button on:click={() => (historyState = history.state['sveltekit:states'])}>
  Refresh from state.history
</button>

After initial loading the $page.state.filter is undefined

Click on "Replace state with banana
=> PageState shows {"filter":"banana"}
Click on "Refresh from state.history"
=> PageState and history state show {"filter":"banana"}
Refresh the browser page
=> PageState shows undefined
Click on "Refresh from state.history"
=> history state shows {"filter":"banana"} but page state remains undefined

Logs
No response
System Info
System:
    OS: Windows 11 10.0.26063
    CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
    Memory: 13.65 GB / 31.71 GB
  Binaries:
    Node: 21.1.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.7 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Chrome: 122.0.6261.112
    Edge: Chromium (123.0.2420.10)
    Internet Explorer: 11.0.26063.1
  npmPackages:
    @sveltejs/adapter-node: ^4.0.1 => 4.0.1
    @sveltejs/kit: ^2.5.2 => 2.5.2
    @sveltejs/vite-plugin-svelte: ^3.0.2 => 3.0.2
    svelte: ^4.2.10 => 4.2.10
    vite: ^5.1.2 => 5.1.2

Severity
serious, but I can work around it
Additional Information
No response

Just encountered this myself, took a while to debug. I just switched all of my modals to use shallow routing, as suggested by the docs. But because of this issue it seems like I'll have to abandon this work and keep using stores instead, since some of my modals contain forms, which close the dialog when submitted. Additionally, hitting the back button after this happens does nothing, because it pops the state from the history, but since $page.state was already undefined, nothing happens.
Additionally, I've encountered a bug where closing the model sometimes causes the whole page to go back. Which means that, sometimes, $page.state is set even when it shouldn't be anymore (back navigation already happened).

Seems like this is noted as a caveat in the docs. I can't explain why though.

During server-side rendering, $page.state is always an empty object. The same is true for the first page the user lands on — if the user reloads the page (or returns from another document), state will not be applied until they navigate.
https://kit.svelte.dev/docs/shallow-routing#caveats

That's very interesting. Maybe Svelte 5/associated SvelteKit major version will change this behaviour. I find it very difficult to find even a single use case of shallow routing that doesn't break with those "caveats".

I read those lines in the docs as well, but thought that it applied to server side rendering only.
If these caveats also apply on the client, shallow routing would only be useful in the simpler cases like a navigating to a dialog.

Simple but useful workaround:
Root +layout.svelte:
    onMount(() => {
        $pageState = history.state["sveltekit:states"] ?? {}
    })

    $: onStateChange($page)

    function onStateChange(page: Page) {
        console.log("state change", page.state)
        $pageState = page.state
    }

Some .ts file in lib folder:
export const pageState = writable<App.PageState>({})

Going to keep this open while I don't know the reason for $page.state being reset on browser refresh https://github.com/sveltejs/kit/issues/11956#issuecomment-2004266264
However, for issues related to $page.state being lost after an enhanced form submission (which invokes invalidateAll) see https://github.com/sveltejs/kit/issues/11783

I believe an issue I have with this system is that the state isn't completely reset on re-load, but I'm not sure if this is fixable:
Page A -> pushState -> Reload

This results in a state where the back button does nothing (it pops history.state, but this doesn't affect $page.state as it was already). I don't remember but I think then hitting forward does apply the state which wasn't applied initially.

This issue is critical for those who want to display the popup again upon refreshing, as it disregards the default state behavior of the browser. Is there any solution for this?

Consider one of the primary use cases that shallow routing was added to solve: Instagram-style navigation, where clicking on a photo on /[user] opens a preview page but also updates the URL.
If you reload the page, you'll get a server rendered page for a different route — /[user]/[photo]. The previous $page.state just doesn't apply here, and it could even be detrimental (depending on what you do with it). You certainly don't want to navigate from /[user]/[photo] back to /[user] (where the $page.state does apply) upon hydration, because that would cause flashing.
And in general that applies to any use of $page.state — because it's not available during SSR, it would at minimum cause some flashing and weirdness if it was applied post-hydration.
It's definitely possible that there are some cases where you do want to apply state on hydration, flickering be damned. Perhaps an option would make sense for that:
pushState('', state, {
  hydrate: true
});

I don't think it should be the default though.

The behavior of SSR hydrating should be a concern for developers implementing SSR, not an issue to be solved by blocking actual browser functionality. Isn't it natural for SSR operations to ignore history.state by default? Why should the existence of SSR prevent the use of history.state in the browser entirely?
Do other frameworks have implementations that completely block basic browser functionality? I think it's a serious problem for a framework to prevent the use of the browser's basic functionality.


Deleting a task returns to page 1

When I delete a task from a challenge, I get thrown back to page 1.
Now, when there are 150 pages (and there's no "Go to page X"), that can be a little annoying.

The UI in maproulette2 will very shortly deprecated and all new development is happening on the new MapRoulette3 UI. If this is still an issue on MapRoulette3 please open an issue in that repo.


bump to 3.0.6

% git lg v3.0.5..
* 4ecf5db - (origin/master, master) [skip ci] Travis: update LOGSTASH_BRANCH from 6.[0..4] to 6.5 (4 weeks ago) <Rob Bavey>
* e69a8e3 - pin bundler version to < 2 (5 weeks ago) <Rob Bavey>
* d9c9482 - [skip ci] update license to 2018 (1 year, 1 month ago) <Joao Duarte>
* c42d0ef - Merge pull request #35 from lingfish/patch-1 (1 year, 2 months ago) <Jake Landis>
* 9fc2503 - Various nitpicks and typos. (1 year, 2 months ago) <Jason Lingohr>

Thanks @guyboertje


Create command to copy link to users clipboard

We need to add a new command that when called generates a permalink for the file and copies it to the users clipboard

Would love to use this!

@tomi2108 You know what they say, be the change you want to see in the world. Thanks for contributing!


Common Data quota

Imported, not modified tables should not count for user quota.
cc @javisantana @xavijam

I'd start filling a ticket in cartodb-postgres to define the API it should
export to allow this feature
El 6/2/2015 13:08, "Juan Ignacio Sánchez Lara"<EMAIL_ADDRESS>escribió:

Imported, not modified tables should not count for user quota.
cc @javisantana https://github.com/javisantana @xavijam
https://github.com/xavijam
—
Reply to this email directly or view it on GitHub
https://github.com/CartoDB/cartodb/issues/2110.

Postponed.

There has been no activity on this issue for more several months. We are closing it. If you think this still needs to be addressed please open a new issue.


Add custom page

Add custom page to examples. I believe this is an excellent feature that is missing in examples. It is very common that clients require how many pages there are and if there is a next or previous page based on the page they are. I think it is better if this task is handled by backed instead of clients.
Reference: https://uriyyo-fastapi-pagination.netlify.app/customization/

Hello, @uriyyo thanks for your feedback I have not noticed fastapi_pagination.links.Page


Add German translation

See title.

Thank you for making the effort to contribute to this project. Sadly I have to reject your PR as there is no i18n support for this app yet.
The labels in the strings.xml are nowhere used.


Explain undocumented options in Rancher CLI docs

This doc issue comes from this Slack conversation:
the rancher cli has undocumented options for example rancher up is available in the v2.2.0 cli. But that option is not documented here https://rancher.com/docs/rancher/v2.x/en/cli/
adrian [12:04 PM]
i think it's legacy 1.6. it's analagous to docker-compose up
or at least it was
dan [12:08 PM]
It's for importing a cluster and projects
cjellick [12:49 PM]
@dan link that doc where it actually does explain this. It’s actually well documented just not where the rest of cli docs are I think
dan [1:11 PM]
@mak3r we refer to it as 'cloning a cluster' in the docs https://rancher.com/docs/rancher/v2.x/en/cluster-admin/cloning-clusters/ (edited)
But I agree, the cli help needs updated

@SheilaghM The Rancher CLI has some undocumented options, but I don't know what they are. More research needs to be done to figure out what the gap is.


FCL_elliptic: return P0 if P1 is zero

as discussed :)

The actual comparizon flaw returns the infinity (neutral) point when performing ecadd(infinity, P1) instead of returning P1. While not affecting the main verification (only call is over public key and base points that cannot be neutral by construction), correction is necessary for other use.


RUM-5873: Reactivate Session Replay instrumented test for API 21

What does this PR do?
Reactive Session Replay instrumented test for API 21,
Fix a drawable resolving issue due to the different behavior on lower API.
Motivation
RUM-5873
Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

Codecov Report
Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.34%. Comparing base (d13c96a) to head (d5adb23).

Files with missing lines
Patch %
Lines

...sessionreplay/utils/LegacyDrawableToColorMapper.kt
25.00%
2 Missing and 1 partial :warning:

Additional details and impacted files
@@                       Coverage Diff                       @@
##           feature/sr-integration-test    #2342      +/-   ##
===============================================================
- Coverage                        70.35%   70.34%   -0.01%
===============================================================
  Files                              739      739
  Lines                            27562    27564       +2
  Branches                          4617     4619       +2
===============================================================
- Hits                             19391    19389       -2
- Misses                            6878     6890      +12
+ Partials                          1293     1285       -8

Files with missing lines
Coverage Δ

...sessionreplay/utils/LegacyDrawableToColorMapper.kt
46.51% <25.00%> (+0.08%)
:arrow_up:

... and 29 files with indirect coverage changes

@0xnm I am not sure what do you mean, can you elaborate?

I mean AssertJ is using some Java 8+ classes (ex. java.time.*) when printing failure message which don't exist on API 21.

The only quick workaround is desugaring, but I don't think we want to enable it. So let's keep it like that.


WSATest certificate in project expired?

Hello Joost,
I was trying to deploy this example to my HoloLens and found the VS2019 gave me the error "Certificate cannot be opened: WSATestcertificate.pkx ".
I encountered this issue before working on other projects - usually it can be fixed by regenerating a new certificate in Unity. I've tried to recreate one, delete the old one, recreate one again for a few times - making sure it's not expired/new. But every time it gives me the same error when it tries to build in VS.
I also tried to use the "fully built package" version mentioned in your post - it also gave me an error saying the publisher certificate could not be verified and suggested me to contact app developer when I attempted to open the package.
Any clues why? Thanks in advance!

I assume you mean this package: https://1drv.ms/u/s!AjesCJDYqwYk2Zc7XqpooYbolCqA5A?e=aE3SZq
Have you tried installing it via the Windows Device Portal? Works fine with me :)

As to the PFX: make sure to close Unity, delete all instances of the PFX, and try again

Hello Joost,
Thanks for your advice! It worked!
I tried your advice on PFX - tho it's slightly different. I followed by delete all pfx in the unity project folder, and create a new build files for deployment. Originally it gave me the same error in VS code. Then I noticed in VS "Solution Explorer" there was another .pfx, I deleted it directly and the deployment worked in seconds!
I haven't tried using device portal yet.
Thanks again and hope above notes can be helpful for others too!


Adding ChangeHistory in mixin params giving error

I have used ChangesHistory instead of ChangeHistory in mixin params then it worked for me

I have used ChangesHistory instead of ChangeHistory in mixin params then it worked for me


Dynamic updates and hot reloading of config value changes in config sources

Often configuration values are stored and retrieved from an external remote resource, server or service in order to better facilitate a central cohesive management of your environment. The result of this is that configuration values for a particular application/service are often changed on the external service.
Right now if an application uses the Configuration API it will not know if or when a particular configuration value was changed or updated. The change would eventually get detected the next time a particular configuration value was queried through the API (if it's not cached). However for values that are typically only read at startup, they may never get updated.
On top of updating the values when queried, we should have a relatively lightweight API to enable ConfigSources to notify the application using the Configuration API of any (or selected) config value changes that occur within the ConfigSource. The notification could be a simple CDI event we define or we can enable applications to register a listener in non CDI environments.
How updates are detected would be left to the ConfigSource implementation (polling, watches on files, ...).
The same API or functionality could be used to notify the application of updates when a config file changes, as discussed in #8 .

Can you add your comments on #8, so that we can just discuss on one thread?

No problem. Added.

This is more complex as suggested. Letting a ConfigSource triggering an event directly for me makes no sense, because a ConfigSource does not know it a change of a value has any effect on the overall configuration, where a ConfigSource is included. We might think of a mechanism, where a ConfigSource can trigger a ChangeEvent for itself, so a Configuration can listen to the event and react as needed. Though using an SE approach there is nothing such as an event. So this scenario should be discussed as well.

Anatole, that's almost word for word what I wrote ;)
The point is that the ConfigSource must notify the Config itself. The Config then needs to re-evaluate the whole chain and compare it with the previous value. If changed -> send event to the user code.

We might think of a mechanism, where a ConfigSource can trigger a ChangeEvent for itself,
so a Configuration can listen to the event and react as needed.
Though using an SE approach there is nothing such as an event.

Of course there are ways in SE to do it. See my code example in #8.
/**
 * This callback should get invoked if an attribute change got detected
 */
default void setOnAttributeChange(Consumer<Set<String>> reportAttributeChange) {
     // do nothing by default. Just for compat with older ConfigSources.
}

After a ConfigSource gets picked up this method gets called by the Config, providing a callback function. And whenever a ConfigSource detects an attribute change it needs to invoke this very method.

Yes agree. A ConfigSource itself should not be able to notify the application itself, which should be the responsibility of the main Config.
As was already mentioned and suggested in #8 such a mechanism could be made of two parts or APIs. The internal part or API, which the ConfigSources could use to notify the main Config implementation and the public user/application part or API, which the main Config could use to deliver the final notification. This way each ConfigSource is responsible for watching its config values and notifying the main Config, while the latter would be responsible for delivering the notification to the end user/application (or not) depending on whether its relevant or not. Higher order ConfigSources may override the value that was detected to change.

+1 @TFaga. When re-reading @atsticks mail I think he initially didn't fully get what I tried to express. But I think we are on the right track, given that he also ends up with basically the same approach - at least if I understood his mail correctly ;)

I would like to know a real use case.
There are roughly three patterns:
(1) I can use the old value, even if the config value is changed.
(2) I want to use always a new value. But I don't care when it was changed.
(3) I want to use a new value immediately after the config value is changed.
This is very emergency. I don't want to miss a chance.
I can imagine (1) and (2), but not (3).
If there is so emergency case, you can use other mechanism such as messaging.
Why does Conig API need so emergency ?
I do not insist to consider about (3), but just want to know the use case.

@kazumura some use cases:

You have a Websocket based endpoint on the server and want to integrate a feature toggle. If the feature toggle is active or deactivated should be defined in config. When the flag changes something should be send to a connected client.

In a Java based client you want to change the font size. The font size is defined in the config. Once the config (like a property file) is changed the font size on the screen should change.

(1) something where updating is not supported/wanted. Could be everything,
normal case.
(2) A background color.
(3) A feature toggle or when I wan to disable some functionality or users,
e.g. in case of frauds.
2017-10-31 11:34 GMT+01:00 Kenji Kazumura<EMAIL_ADDRESS>
I would like to know a real use case.
There are roughly three patterns:
(1) I can use the old value, even if the config value is changed.
(2) I want to use always a new value. But I don't care when it was changed.
(3) I want to use a new value immediately after the config value is
changed.
This is very emergency. I don't want to miss a chance.
I can imagine (1) and (2), but not (3).
If there is so emergency case, you can use other mechanism such as
messaging.
Why does Conig API need so emergency ?
I do not insist to consider about (3), but just want to know the use case.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/eclipse/ConfigJSR/issues/9#issuecomment-340722641,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC5sc4-atK4W0iqXeIn4FHBGWE3QEpcXks5sxveYgaJpZM4QJKTA
.

--
Anatole Tresch
PPMC Member Apache Tamaya
JCP Star Spec Lead
Switzerland, Europe Zurich, GMT+1
*maketechsimple.wordpress.com http://maketechsimple.wordpress.com/ *
Twitter:  @atsticks, @tamayaconf
Speaking at:
[image: JSD_Speaker_2017][image: J-Con 2017 logo][image: JVM Con]

+1 My answers were dependent on the order of input (=issues) I have read ;-)
2017-10-31 11:17 GMT+01:00 Mark Struberg<EMAIL_ADDRESS>
+1 @TFaga https://github.com/tfaga. When re-reading @atsticks
https://github.com/atsticks mail I think he initially didn't fully get
what I tried to express. But I think we are on the right track, given that
he also ends up with basically the same approach - at least if I
understood his mail correctly ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/eclipse/ConfigJSR/issues/9#issuecomment-340718665,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC5sc9Q3YgNabimJO2uF1pEViiAZ1ZBUks5sxvPHgaJpZM4QJKTA
.

--
Anatole Tresch
PPMC Member Apache Tamaya
JCP Star Spec Lead
Switzerland, Europe Zurich, GMT+1
*maketechsimple.wordpress.com http://maketechsimple.wordpress.com/ *
Twitter:  @atsticks, @tamayaconf
Speaking at:
[image: JSD_Speaker_2017][image: J-Con 2017 logo][image: JVM Con]

@atsticks, @hendrikebbers
Thank you for use cases.
I understand these might be the cases.
But my question is using config is a best practice or not to achieve these features.
In case of the font, the usual steps are as follows:
(a) you interact with application to change the font
(b) application write a new value to the config
(c) application fire a paint event
(d) application receive the event, re-read the config, and re-paint.
If Config has the dynamic notification feature,
steps become  as follows:
(a) you interact with application to change the font
(b) application write a new value to the config
(c) application are notified by Config, and application fire a paint event
(e) application receive the event, re-read the config, and re-paint.
Is the latter a better way?

I do agree with Kenji that the font example is probably not the best one. The page which requests the change could easily also send the notification.
Regarding the socket change example. This is also not a real-time change. Even if you switch ports then it takes a while to get propagated over the cluster (especially in MicroServices). So you have a few seconds where both ports are around. And then it's also a matter of your firewall/router.The sane way to do this would be a ripple-start. 1.) Fire up a few instances with the new port.
2.) Change the port configuration3.) Wait for all the clients to pick this up (time doesn't really matter - could be 10 minutes)4.) shut down the old instances.
My gut feeling tells me that here of course are cases where notification is indeed useful. But the question is whether it is justified that we add the complexity right now or whether we can live without it for v1.0.
Actually there are 2 questionsa.) do we like provide the active notification in v1.0 ?
b.) do we like to provide better support for 'local caching with timeout' like the ConfigValue I posted?
LieGrue,strub
On Tuesday, 31 October 2017, 12:33:46 GMT+1, Kenji Kazumura<EMAIL_ADDRESS>wrote:

@atsticks, @hendrikebbers
Thank you for use cases.
I understand these might be the cases.
But my question is using config is a best practice or not to achieve these features.
In case of the font, the usual steps are as follows:
(a) you interact with application to change the font
(b) application write a new value to the config
(c) application fire a paint event
(d) application receive the event, re-read the config, and re-paint.
If Config has the dynamic notification feature,
steps become as follows:
(a) you interact with application to change the font
(b) application write a new value to the config
(c) application are notified by Config, and application fire a paint event
(e) application receive the event, re-read the config, and re-paint.
Is the latter a better way?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

About font: not in JFX ;) in Swing you can work with repaint, yes
Von meinem iPhone gesendet

Am 31.10.2017 um 12:55 schrieb Mark Struberg<EMAIL_ADDRESS>I do agree with Kenji that the font example is probably not the best one. The page which requests the change could easily also send the notification.
Regarding the socket change example. This is also not a real-time change. Even if you switch ports then it takes a while to get propagated over the cluster (especially in MicroServices). So you have a few seconds where both ports are around. And then it's also a matter of your firewall/router.The sane way to do this would be a ripple-start. 1.) Fire up a few instances with the new port.
2.) Change the port configuration3.) Wait for all the clients to pick this up (time doesn't really matter - could be 10 minutes)4.) shut down the old instances.
My gut feeling tells me that here of course are cases where notification is indeed useful. But the question is whether it is justified that we add the complexity right now or whether we can live without it for v1.0.
Actually there are 2 questionsa.) do we like provide the active notification in v1.0 ?
b.) do we like to provide better support for 'local caching with timeout' like the ConfigValue I posted?
LieGrue,strub
On Tuesday, 31 October 2017, 12:33:46 GMT+1, Kenji Kazumura<EMAIL_ADDRESS>wrote:
@atsticks, @hendrikebbers
Thank you for use cases.
I understand these might be the cases.
But my question is using config is a best practice or not to achieve these features.
In case of the font, the usual steps are as follows:
(a) you interact with application to change the font
(b) application write a new value to the config
(c) application fire a paint event
(d) application receive the event, re-read the config, and re-paint.
If Config has the dynamic notification feature,
steps become as follows:
(a) you interact with application to change the font
(b) application write a new value to the config
(c) application are notified by Config, and application fire a paint event
(e) application receive the event, re-read the config, and re-paint.
Is the latter a better way?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Trying to catch up with the discussion. I think @kazumura listed the three situations:
(1) I can use the old value, even if the config value is changed.
(2) I want to use always a new value. But I don't care when it was changed.
(3) I want to use a new value immediately after the config value is changed.
for (3) basically not much waiting time is needed. In this case, reduce cache time might do the trick.
I can even think another scenario;
(4) I want to use the old value if the new value is not what I want. Basically you can choose what new value you want.
In this use case, maybe the configured value is not valid etc. I can continue functioning with the old value until a better value is provided.
I have been thinking about the event notification solution.

We need to compute the config and then cache it.
For a pre-configured time period, go back to check the config sources again
calculate the value again.
Compare this value with old value and then fire events.

Let's not prebake any solution as yet. We might come up with a simple solution.

+1 the proposal for caching and comparing configs regularly exactly matches
what Tamaya does in its event module...
Am 31.10.2017 15:58 schrieb "Emily Jiang"<EMAIL_ADDRESS>Trying to catch up with the discussion. I think @kazumura
https://github.com/kazumura listed the three situations:
(1) I can use the old value, even if the config value is changed.
(2) I want to use always a new value. But I don't care when it was changed.
(3) I want to use a new value immediately after the config value is changed.
for (3) basically not much waiting time is needed. In this case, reduce
cache time might do the trick.
I can even think another scenario;
(4) I want to use the old value if the new value is not what I want.
Basically you can choose what new value you want.
In this use case, maybe the configured value is not valid etc. I can
continue functioning with the old value until a better value is provided.
I have been thinking about the event notification solution.

We need to compute the config and then cache it.
For a pre-configured time period, go back to check the config sources
again
calculate the value again.
Compare this value with old value and then fire events.

Let's not prebake any solution as yet. We might come up with a simple
solution.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/eclipse/ConfigJSR/issues/9#issuecomment-340789376, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC5sc7fkevL64sIKZ52UjUMI7OMQgHfLks5sxzWegaJpZM4QJKTA
.

Sorry but for me toggle feature and background aren't good use case.

Toggle feature is more complex than active / deactivate a feature.
Background is more concept of preference that configuration.

I prefer Mark's use case with changing port.
Also, this use case show that event should fire when config changed.
Any more, what happens if we have two modified properties? for example hostname and port number.
We have two events ?

Each property will trigger a event. The event body should be the property name and value.

+1 for aiming towards a simple solution.
Notifications would mostly be used when the end user/application would need to explicitly react to a config value change. I've had a case where multiple microservices logger configuration was stored on an external service (consul in my case, which natively supports watches, so we didn't want to do custom polling). And we needed to trigger logger reconfiguration in the code as part of the config updating. These kind of use cases, however, are usually not so common, so if we add watches/notifications they should probably be on an opt-in basis per value, as well as try to keep them simple from the API perspective.
Other config value changes would most likely be sufficiently resolved the next time the application queries the config value as was already mentioned. A configurable cache policy would help to fine tune the rate of refreshes.

Is there an actual use case for (3)?
If I want to use the value immediately after it is changed, I'd better not cache it at all and call Config.getValue() every time I need to know its value.

I am not a CDI expert so sorry in advance if I'm proposing something stupid but isn't the CDI API we have enough for application to be notified of config value changes?
If I annotate a Consumer function with a @ConfigProperty paramter, couldn't the implementation calls the consumer when the value is changed:
 void myFunction(@ConfigProperty(name = "foo", defaultValue = "bar") String foo) {
  // called when the value of the "foo" property is changed
 }

If I want to get an initial value when my app is deployed and be notified of any change, I just need to annotate a property and a parameter:
// injected at deployment time, provide an initial value
@ConfigProperty(name = "foo", defaultValue = "bar")
String foo;

// called whenver the foo property is changed
void observeFoo(@ConfigProperty(name = "foo") String foo) {
}

That's for the CDI use case.
For the plain Config API, we coud add a getValue(String, Consumer<T>) that is called whenever the config detects a change in the configuration value. It would then be used like:
config.getValue("foo", (Consumer<String>) prop -> {
   System.out.println("prop = " + prop);
 });

we will need a CDI observer plus a SE way to register an Observer.

@struberg right. my comment was focusing on the Config API that the user is facing.
We will need to have observers for the SPI so that ConfigSource can notify the Config of some events but I don't see the need to include an Observer patter, in the API.

@jmesnil was talking about the user facing Config part as well.

I currently see several flaws with the current ConfigValue:

The methods asList, asSet are not available on the Config interface, which IMO creates a assymmetric API, the methods should either be added to Config, or removed, since I can achieve the same result by passing a custom converter in useConverter.
Similarly this applies for useConverter. I would then also expect that I can pass a custom converter, when accessing a value from the Config directly.
I think it would be more logical to define the lookup chain, when accessing the ConfigValue from the Config, instead of creating another ConfigValue with a different lookup chain from a ConfigValue.
Instead of "hard-coding" variable substitution, why not passing a Function<String,String> ? This is much more flexible and allows to externalize how variable resolution or similar things are implemented.
Naming: I would rename ConfigChanged to ConfigChangeListener, longer name, but clearly says, what it is ;)

The current method withLookupChain(String...) adds a specific way of chain lookups to the API. I would rather expect the lookup chain to be defined explicitly, hereby not passing the chain parts, but the different lookup values explicitily. This makes the API more explicit and does not prescribe any lookup chain algorithm.

Just quickly @atsticks :

Instead of "hard-coding" variable substitution, why not passing a Function<String,String>

The key point here is that the user code doesn't care. If a configured value uses a variable in it is totally up to to the maintainer of the config.

The methods asList, asSet are not available on the Config interface

That's a matter of taste and not a technical limitation. Happy to vote about it.

since I can achieve the same result by passing a custom converter in useConverter

No, the param is a Class not a Type. Adding real ParameterizedType handling would blow up the code rather heavily!

Naming: I would rename ConfigChanged to ConfigChangeListener

Yes perfectly fine for me.

One more feedback for dynamics. I've already presented this finding at the EG meeting but adding it here for more publicity.
Recently my colleague @elexx and I discussed how we could force a value refresh for ConfigValue.
Of course we are using Apache DeltaSpike at this project, but the design remains the same.
Our solution was to extend the ConfigSource with the one method we introduced in the ConfigJSR as well. That means a DatabaseConfigsource sharing information over a whole app cluster would have a background thread which gets all the values from a property table every second. Then compares those values with the previously fetched ones and detects any changed attributes. Those will then be given to the Config.
But instead of further propagating the changed attributes to the user code we simply reset a 'last changed' field in the Config:
https://github.com/apache/deltaspike/blob/master/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/ConfigImpl.java#L49
https://github.com/apache/deltaspike/blob/master/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/ConfigImpl.java#L202
In the ConfigValue (In DeltaSpike that's our TypedResolver) we now can simply check whether something has changed in the meantime. So even if we would cache for 1 hour we would immediately pick up new values if some change got notified to the Config.
https://github.com/apache/deltaspike/blob/master/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/TypedResolverImpl.java#L220

@struberg Regarding useConverter, my point was adding something like the following to the Config interface:
<T> T getValue(String key, Converter<T> converter);
<T> Optional<T> getOptionalValue(String key, Converter<T> converter);
Despite adding another method to the API, why this should be an issue?

From my original point the following I think is the most important:

I think it would be more logical to define the lookup chain, when accessing the ConfigValue from the Config, instead of creating another ConfigValue with a different lookup chain from a ConfigValue.

+1 for adding a latest changed timestamp to the Config interface. It would make it easy to detect changes from (ConfigValue, Config) instance implementations, by simply polling and checking for value changes. When a change has been detected, the values can be read and listeners be informed.

Here are fixed links from @struberg:
https://github.com/apache/deltaspike/blob/11e1cf724a0e40949882ab09bd5f57ad50a509c2/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/ConfigImpl.java#L49
https://github.com/apache/deltaspike/blob/11e1cf724a0e40949882ab09bd5f57ad50a509c2/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/ConfigImpl.java#L202
https://github.com/apache/deltaspike/blob/04cf7acd667d27ed8faebb6c1668a98ca7aa92a8/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/TypedResolverImpl.java#L220

I think we can consider this as closed, right?
Smallish improvements as separate tickets please!


3004 Board Server OpenAPI spec

Fixes #3004
Created an OpenAPI spec for the board server.

OMG AMAZING


use forEach instead of Object.keys in compiler Attributes constructor

use forEach instead of Object.keys in compiler Attributes constructor

@googlebot I signed it!

I believe Object.keys() + for-loop was used for performance reasons.
What is the reason (other than readability maybe) for changing it ?

@gkalpak:

Are there so many cases that attributesToCopy has a deep prototype inheritance structure?
Suppose it is the case, why not refactor forEach to use Object.keys instead of for in in the last two else:

function forEach(obj, iterator, context) {
    ...
    } else if (typeof obj.hasOwnProperty === 'function') {
      // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed
      for (key in obj) {
        if (obj.hasOwnProperty(key)) {
          iterator.call(context, obj[key], key, obj);
        }
      }
    } else {
      // Slow path for objects which do not have a method `hasOwnProperty`
      for (key in obj) {
        if (hasOwnProperty.call(obj, key)) {
          iterator.call(context, obj[key], key, obj);
        }
      }
    }
    ...

so that it does not have the for in performance issue, meanwhile get forEach benefits:

support obj.forEach:

    } else if (obj.forEach && obj.forEach !== forEach) {
        obj.forEach(iterator, context, obj);
    }

may be faster in isBlankObject case:

    } else if (isBlankObject(obj)) {
      // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
      for (key in obj) {
        iterator.call(context, obj[key], key, obj);
      }
    }

)

Here is the relevant commit: https://github.com/jiubao/angular.js/commit/54fa16e45d8769ce6708a28388326db0eea53c7e
attributesToCopy always has extra properties up the prototype chain.

OK, thanks for the explains!


Add QuadTree/Octree or insertions to KDTree

Is your feature request related to a problem? Please describe.
I'd like to be able to insert to a nearest neighbor data structure.
Describe the solution you'd like
For the project I'm working on, I frequently need to find the nearest data points within a certain range. The points that I'm working with are 2d, so it seems like a quadtree would be a beneficial data structure to have for this task. If we have a quadtree, it would make sense to have an octree too.
Describe alternatives you've considered
Right now, it is fastest to just use numpy and calculate the distances between all points and the point that I'm interested in, but it feels like there should be a better way to do this.
Ex:
points = np.random.random((10000, 2))
point= np.random.random(2)
threshold = 0.02
distances = np.linalg.norm(points - point, axis=1)
neighbors = distances > threshold

KDTrees don't allow insertion/deletion, and I'd rather not have a dependency for a separate quadtree library which runs the risk of conflicting dependencies and not being maintained. I could implement one myself, but if I'm going through that effort, it feels like it should be on scipy.
Additional context (e.g. screenshots)

A good quadtree and/or octree implementation would be a great addition to scipy.spatial imho. There may be a library out there already though. Have you searched for existing implementations in Python/C/C++?

I found this question on stack overflow.
https://stackoverflow.com/questions/2298517/are-any-of-these-quad-tree-libraries-any-good
It seems like the best implementation is in pygame http://www.pygame.org/wiki/QuadTree. I haven't used pygame, but it seems like this isn't even an importable library and they're suggesting that you copy the code yourself.
It seems like there are many QuadTree implementations in C++/C. Google finds a bunch of examples
https://gist.github.com/shadmar/f0562eb9e2abec5637b3
https://stackoverflow.com/questions/4544928/quadtree-explanation-and-c-implementation
It seems like there's many more, but I haven't tested any of them

If I were to work on this, should I just copy them and include a reference to the source code I'm basing it off of or should we import the existing libraries? I can always go based off of Wikipedia and other sources and just write it from scratch. I think it probably makes sense to have both a Python implementation and a C/C++ implementation given that that's the case for the KDTrees.

I think it probably makes sense to have both a Python implementation and a C/C++ implementation given that that's the case for the KDTrees.

I think just the faster implementation with an appropriate Python API above it might be preferred, though I may be wrong. I feel like almost everyone just uses cKDTree now instead of the Python version, though perhaps there are interesting exceptions.

The Python version of kd-tree will be removed and just kept as a fancy test class. It is just a historical relic.

I would like to advice though, that the key to performance when querying a spatial data structure is in the details.  It is very easy to write a kd-tree, ball-tree, quad-tree, oct-tree, etc. that will be slow as hell, but otherwise correct. If you look at cKDTree you will see that the query code keeps nodes and neighbors in heaps, prefetches data points, uses a specialized memory allocator, etc. When building the tree, the cut-offs are decided intelligently, using quickselect or sliding midpoints. This is the kind of machinery you need to get a fast query. If you do not, chances are your quad-tree will be slower than just running cKDTree on the same data set.

Yeah, I took a look at the code and was caught off guard by KDTree's
complexity. Now since you seem to understand this better than I do, I want
to ask: how much of the machinery in the KDTree can be reused? And how much
faster should we expect a QuadTree to be? In terms of implementation, I was
already thinking of possibly not even using a QuadTree, instead using a
tree-pyramid with a different grid structure, having leaf nodes with many
points in order to take advantage of the branch predictor, etc. It might
not even make sense to use a tree-pyramid at all, but at least for the
special cases of 2d and 3d, it seems like there should be more
optimizations we can make to produce a faster data structure than a KDTree,
which was built to handle the more general problem.
On Sun, Aug 4, 2019, 3:53 AM Sturla Molden<EMAIL_ADDRESS>wrote:

I would like to advice though, that the key to performance when querying a
spatial data structure is in the details. It is very easy to write a
kd-tree, ball-tree, quad-tree, oct-tree, etc. that will be slow as hell,
but otherwise correct. If you look at cKDTree you will see that the query
code keeps nodes and neighbors in heaps, prefetches data points, uses a
specialized memory allocator, etc. When building the tree, the cut-offs are
decided intelligently, using quickselect or sliding midpoints. This is the
kind of machinery you need to get a fast query. If you do not, chances are
your quad-tree will be slower than just running cKDTree on the same data
set.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/scipy/scipy/issues/10551?email_source=notifications&email_token=ABORCYZSWUHRSDYSZUTUKELQC2KJJA5CNFSM4IHVOKVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3P5L4I#issuecomment-517985777,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABORCYZM3BP6SRPY75W34PTQC2KJJANCNFSM4IHVOKVA
.

Well, one can probably reuse a lot. A kd-tree is fundamentally related to a quad-tree (and an oct-tree).
With a 2D space it goes like this:

At each node in a kd-tree you split the space into two rectangles along one dimension. Each node will then have two children. Then you alternate which dimension to split, according to some heuristic.

At each node in a quad-tree you split the space into four rectangles, by splitting along both dimensions. Each node will then have four children.

The machinery will thus be roughly the same, e.g. using heaps as priority queues for deciding which node to trace first. A quad tree will theoretically be faster, but requires a bit more logic.


Calculation of Sampling Rates Not Correct in get_channel_table

It looks like sampling rates are being calculated by taking the full time delta and dividing it by the total number of samples. It should be dividing by (n-1) because that represents the number of steps.
It is a pretty small difference but something we should fix. I believe this error is in the Lab too in the recording properties area.

@shanlyMIDE I think this was fixed in 1.1.0; can you check?

Yep!


All samples not working without setting rendermode to InteractiveServer or InteractiveWebAssembly

Description
In each component that raises or received an EventHandler callback the interactive rendermode must be set to get the samples work:
@rendermode InteractiveServer (Server side Interactive)
or
@rendermode InteractiveWebAssembly (Client side interactive)
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/event-handling?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/components/event-handling.md
Document ID
5e8ef502-ccf9-659d-f25a-0f8f3c75f6e0
Article author
@guardrex

It's in progress now and tracked by https://github.com/dotnet/AspNetCore.Docs/issues/31029. Should be resolved across the doc set by the end of the week 🤞🍀.


adding tech stack badges and shields in readme

i would like to add tech stack badges and shields in readme . it makes the readme look more pretty and give better information about the technologies used.
please assign me this issue as gssoc contribution
example:

Yes sure, go ahead @mridulsaggi


Look at the jpeg

Challenge Name

Issue Description

Browser Information

Browser Name, Version:
Operating System:
Mobile, Desktop, or Tablet:

Your Code

Screenshot

HOW CAN THIS POSSIBLY BE WRONG??

@ThoresenPride You spelled length wrong on line 33.
For future reference, you can ask other campers for help on Gitter and likely get a quicker response.

Thanks @augmt Closing as resolved.


Enhancement of PR Agent with new commands

Type of PR:
Enhancement

PR Description:
This pull request enhances the functionality of the PR Agent by introducing new commands. The PR Agent can now handle requests to review, describe, improve code, and answer questions about a PR based on specific commands. The commands are '/review', '/describe', '/improve_code', and '/ask_question'. The changes are reflected in the 'pr_agent.py', 'github_app.py', and 'github_polling.py' files.

PR Main Files Walkthrough:

pr_agent/agent/pr_agent.py: The 'handle_request' method has been updated to handle new commands. The PR Agent can now review, describe, and suggest improvements to a PR, as well as answer questions about it. The method now returns a boolean indicating whether the command was successfully handled.
pr_agent/servers/github_app.py: The 'handle_request' method has been updated to use the '/review' command when handling a request.
pr_agent/servers/github_polling.py: The 'polling_loop' method has been updated to use the PR Agent's 'handle_request' method to handle commands. If a command is not successfully handled, a help message is published.

/describe

/ask "write me a poem about the PR"

/ask suggest title for this PR


Revert ansible-language-server to working version 1.2.1

Describe your changes
Redhat devs are working on incorporating ansible-language-server in vscode-ansible repo.
Latest version is broken. Reverting it while they fix the issue would allow us to have a working version available through mason without too much config.
Issue ticket number and link
https://github.com/ansible/vscode-ansible/issues/1266
Checklist before requesting a review

[x] I have successfully tested installation of the package.
[x] I have successfully tested the package after installation.

Thanks!

Thanks a lot !


Support Android 12 (build tools 31)

Solves https://github.com/pusher/push-notifications-android/issues/123
If you target Android 12 when building (targetSdkVersion 31), you get this error:
Manifest merger failed : android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

You need to set android:exported for everything that has an intent in the manifest.
note: as a workaround I set this in my apps' AndroidManifest.xml, but I should not:
        <!-- Fixes to Pusher to support Android 12 -->
        <service
            android:name="com.pusher.pushnotifications.fcm.EmptyMessagingService"
            android:exported="false"
            tools:node="merge" />
        <activity
            android:name="com.pusher.pushnotifications.reporting.OpenNotificationActivity"
            android:exported="false"
            tools:node="merge" />

hey @akaita! Thank you for the PR.
Can you help me a little bit to understand this change (I'm not an Android dev)?
My question is whether this will have an impact on other users of the sdk.
The docs say that android:exported practical default is already to false... We do define a intent-filter there. Do you think other people could be using this?

👋  @Oleur, @obuiron and @YvesDelerm
you guys gave an upvote. Maybe you can help me with my question? 🙏

👋 @Oleur, @obuiron and @YvesDelerm
you guys gave an upvote. Maybe you can help me with my question? 🙏

Hi @marcelcorso ! Happy to tell you more about that :)
According to the documentation to support Android 12:
If your app targets Android 12 and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components.
The Pusher libraries defines a Service and an Activity that are not yet compliant. Without specifying the exported attributes in the library, we are not able to compile our apps that target Android 12.
Feel free to ping if you need more details about that!

@Oleur thank you. I understand better now.
My question is: If we make explicitly android:exported = false can it cause problems to users of the library that are upgrading?

No problems should appear as the components are already android:exported = false but implicitly :)


nixos/zfs: populate PATH with needed programs for zed

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

cc @nyanloutre

Did you test it ? Because I had problems using sendmail, the ZED provided scripts are expecting the mail binary

@nyanloutre I did not test the mail feature since I was expecting them to be compatible. I will remove this commit for now.