Check on Zone definition

"Zone: A part of the DNS database
This would be www.amazon.com"
My take is Zone is a logical construct which is part of the Domain Name System.
"amazon.com" is the Zone and "www.amazon.com" is a record/recordset which
is hosted in the zonefile. Let me know if this makes sense.

Thanks @shoonyathaa, I don't know much about DNS other than this course so if you want to provide adjustments with a pull request I can merge it in.

A DNS zone is a portion of the DNS namespace that is managed by a specific organization or administrator. All the information about a zone is stored in a plain text file called a zone file. This file is stored on the zone's nameserver(s) and contains an actual representation of the zone and contains all the records for every domain within the zone.
A DNS zone refers to a certain portion or administrative space within the global Domain Name System (DNS). Each DNS zone represents a boundary of authority subject to management by certain entities. The total of all DNS zones, which are organized in a hierarchical tree-like order of cascading lower-level domains, form the DNS namespace. -- NTCHosting
The authority over each DNS zone is delegated to a legal entity or organization (i.e. a country-code top-level domain registry) or a company/individual registered to use a certain sub-domain within the system. Depending on the administrative rights delegated to a certain entity, DNS zones may consist of only one domain, or of many domains and sub-domains. Further authority over a sub-space could be delegated to other parties, if necessary. -- NTCHosting
A hosted zone is an Amazon Route 53 concept. A hosted zone is analogous to a traditional DNS zone file; it represents a collection of records that can be managed together, belonging to a single parent domain name. All resource record sets within a hosted zone must have the hosted zone’s domain name as a suffix. For example, the amazon.com hosted zone may contain records named www.amazon.com, and www.aws.amazon.com, but not a record named www.amazon.ca. You can use the Route 53 Management Console or API to create, inspect, modify, and delete hosted zones. -- Amazon

A DNS zone is a portion of the DNS namespace that is managed by a specific organization or administrator. All the information about a zone is stored in a plain text file called a zone file. This file is stored on the zone's nameserver(s) and contains an actual representation of the zone and contains all the records for every domain within the zone.
A DNS zone refers to a certain portion or administrative space within the global Domain Name System (DNS). Each DNS zone represents a boundary of authority subject to management by certain entities. The total of all DNS zones, which are organized in a hierarchical tree-like order of cascading lower-level domains, form the DNS namespace. -- NTCHosting
The authority over each DNS zone is delegated to a legal entity or organization (i.e. a country-code top-level domain registry) or a company/individual registered to use a certain sub-domain within the system. Depending on the administrative rights delegated to a certain entity, DNS zones may consist of only one domain, or of many domains and sub-domains. Further authority over a sub-space could be delegated to other parties, if necessary. -- NTCHosting
A hosted zone is an Amazon Route 53 concept. A hosted zone is analogous to a traditional DNS zone file; it represents a collection of records that can be managed together, belonging to a single parent domain name. All resource record sets within a hosted zone must have the hosted zone’s domain name as a suffix. For example, the amazon.com hosted zone may contain records named www.amazon.com, and www.aws.amazon.com, but not a record named www.amazon.ca. You can use the Route 53 Management Console or API to create, inspect, modify, and delete hosted zones. -- Amazon

Sorry for the late reply. Just saw your email and it has been long time
since I commented! Happy to contribute where required.
On Wed, 23 Dec 2020, 8:27 am alozano-77<EMAIL_ADDRESS>wrote:

Thanks @shoonyathaa https://github.com/shoonyathaa, I don't know much
about DNS other than this course so if you want to provide adjustments with
a pull request I can merge it in.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/alozano-77/AWS-SAA-C02-Course/issues/4#issuecomment-749808244,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFLM5BPPUR67BKEQRG3DOMDSWEMLTANCNFSM4PNJ2FTA
.

Sorry for the late reply. Just saw your email and it has been long time
since I commented! Happy to contribute where required.
On Wed, 23 Dec 2020, 8:27 am alozano-77<EMAIL_ADDRESS>wrote:

Thanks @shoonyathaa https://github.com/shoonyathaa, I don't know much
about DNS other than this course so if you want to provide adjustments with
a pull request I can merge it in.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/alozano-77/AWS-SAA-C02-Course/issues/4#issuecomment-749808244,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFLM5BPPUR67BKEQRG3DOMDSWEMLTANCNFSM4PNJ2FTA
.


zone.js loaded by twice, by two separate sources

I built a JS widget using angular 2 that is embedded on other websites. One of the sites that the widget is embedded on has another script that loads zone.js. So when my script loads I get the error:
Error: Zone already loaded. at new g...

Is there a way to configure angular-cli (1.0.0-rc.0)/webpack to not load zone.js if it has previously been loaded?

Is there any way to determine it or not?

I need to subscribe myself to this issue, waiting for a release of the fix.

I was able to solve this issue by ejecting the webpack config then namespacing my chunks via the jsonpFunction option.
To be honest I don't understand how this resolves the issue of zone.js being loaded twice- but it does.

Should the same be done for loading patches?


Traits to implement Interfaces

Would you consider a PR with Trait to implement common methods defined by Interfaces?
I've in mind this Interop\Queue\Message interface.
Almost all implementations define the same method bodies which makes a lot of code duplicate that could be cleaned up.

Sure, it would be a good addition.


Error 111 in urllib/requests causes script to stop

When searching for a username, if urllib/requests is refused a connection (in this case, from gitee.com), the script exits. See log portion below:
Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
    conn.connect()
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7ff7642a9690>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gitee.com', port=443): Max retries exceeded with url: /------- (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff7642a9690>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/uosint/uosint.py", line 32, in <module>
    Username_input(usernames=username)
  File "/home/----/uosint/modules/UserName/username.py", line 2910, in Username_input
    GITEE_Request = requests.get(GITEE_URL)
  File "/home/----/.local/lib/python3.10/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gitee.com', port=443): Max retries exceeded with url: /------- (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff7642a9690>: Failed to establish a new connection: [Errno 111] Connection refused'))

I'm sorry for showing the error, but I checked the script , it didn't show any error, please tell me the target user name, your OS name, OS version.
Image Url : https://prnt.sc/yvXgfTx4rFfz

I'm sorry for showing the error, but I checked the script , it didn't show any error, please tell me the target user name, your OS name, OS version.
Image Url : https://prnt.sc/yvXgfTx4rFfz

I just tried again, using the 'john' username in your example:
Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
    conn.connect()
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f35a4269180>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gitee.com', port=443): Max retries exceeded with url: /john (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f35a4269180>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/uosint/uosint.py", line 32, in <module>
    Username_input(usernames=username)
  File "/home/----/uosint/modules/UserName/username.py", line 2910, in Username_input
    GITEE_Request = requests.get(GITEE_URL)
  File "/home/----/.local/lib/python3.10/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gitee.com', port=443): Max retries exceeded with url: /john (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f35a4269180>: Failed to establish a new connection: [Errno 111] Connection refused'))

OS information:
┌──(----㉿kali-2022)-[~/uosint]
└─$ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2022.4
Codename:       kali-rolling

I'm sorry for showing the error, but I checked the script , it didn't show any error, please tell me the target user name, your OS name, OS version.
Image Url : https://prnt.sc/yvXgfTx4rFfz

I just tried again, using the 'john' username in your example:
Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
    conn.connect()
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f35a4269180>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/.local/lib/python3.10/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/home/----/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gitee.com', port=443): Max retries exceeded with url: /john (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f35a4269180>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/----/uosint/uosint.py", line 32, in <module>
    Username_input(usernames=username)
  File "/home/----/uosint/modules/UserName/username.py", line 2910, in Username_input
    GITEE_Request = requests.get(GITEE_URL)
  File "/home/----/.local/lib/python3.10/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/home/----/.local/lib/python3.10/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gitee.com', port=443): Max retries exceeded with url: /john (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f35a4269180>: Failed to establish a new connection: [Errno 111] Connection refused'))

OS information:
┌──(----㉿kali-2022)-[~/uosint]
└─$ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2022.4
Codename:       kali-rolling

This is a traceback of an error that occurred in a Python script. The error message suggests that there was an issue with the script trying to establish a new connection when making a GET request to the URL 'gitee.com' using the requests library. Specifically, it is raising a "ConnectionRefusedError: [Errno 111] Connection refused" error, which can happen when the server or network is down, or the script is trying to connect to an incorrect address.
It looks like the code is trying to access a user profile on gitee.com and the error is occurring on line 2910 of the file '/home/----/uosint/modules/UserName/username.py' where the script is trying to make a GET request to the GITEE_URL.
It might be possible that the website is down or there might be an issue with the internet connection.
You can check for the website status and also check your internet connection to troubleshoot the error.
I got 2 solutions here is :
Solution No 1 :-

Check All Module Install like requirements.txt and urllib
Use VPN when you run this tool

Solution No 2 :-

Remove 2906 to 2942 Line
PATH is "uosint/modules/UserName/username.py" save and run


Fix description of AV800

@henrikplate  sorry for being a bit inactive, but these months have been really hectic and I also lost the rights to push to the repo. I'm merging now and thanks for the contribution


[incubator-kie-drools-5933] [new-parser] PackageDescr.resource not set

Issue:

https://github.com/apache/incubator-kie-drools/issues/5933

Make sure to set Resource to every Descr objects.

@yurloc @mariofusco @gitgabrio Please review, thanks!


convert_from_path() I need to make hacks for it to work on Windows

Expected it to work.  Actual is it won't do anything
Using Windows 10 & 11
Python 3.9 - 3.11
To make the convert_from_path() work I have had to make 2 changes to the library EVERY release.
Let me know if there is a better way to get this to work every release so I don't need to hack the code
First need to change the call  to:
args = _build_command(
["-r", str(dpi)],
pdf_path,
output_folder,
Then replace the _build_command() in its entirety as its easier then making a bunch of changes
def _build_command(
    args,
    pdf_path,
    output_folder,
    first_page,
    last_page,
    fmt,
    jpegopt,
    output_file,
    userpw,
    use_cropbox,
    transparent,
    single_file,
    grayscale,
    size,
    hide_annotations,
):
    if use_cropbox:
        args.append("-cropbox")

    if hide_annotations:
        args.append("-hide-annotations")

    if transparent and fmt in TRANSPARENT_FILE_TYPES:
        args.append("-transp")

    if first_page is not None:
        args.extend(["-f", str(first_page)])

    if last_page is not None:
        args.extend(["-l", str(last_page)])

    if fmt not in ["pgm", "ppm"]:
        args.append("-" + fmt)

    if fmt in ["jpeg", "jpg"] and jpegopt:
        args.extend(["-jpegopt", _parse_jpegopt(jpegopt)])

    if single_file:
        args.append("-singlefile")

    args.append(pdf_path)

    if output_folder is not None:
        args.append(os.path.join(output_folder, output_file))

    if userpw is not None:
        args.extend(["-upw", userpw])

    if grayscale:
        args.append("-gray")

    if size is None:
        pass
    elif isinstance(size, tuple) and len(size) == 2:
        if size[0] is not None:
            args.extend(["-scale-to-x", str(int(size[0]))])
        else:
            args.extend(["-scale-to-x", str(-1)])
        if size[1] is not None:
            args.extend(["-scale-to-y", str(int(size[1]))])
        else:
            args.extend(["-scale-to-y", str(-1)])
    elif isinstance(size, tuple) and len(size) == 1:
        args.extend(["-scale-to", str(int(size[0]))])
    elif isinstance(size, int) or isinstance(size, float):
        args.extend(["-scale-to", str(int(size))])
    else:
        raise ValueError("Size {} is not a tuple or an integer")

    return args

Yes, PDT2Image

How is it related to OpenCV?

Closed as non-relevant for OpenCV.


Separate send into public_send and __send__

In Ruby, there seems to be a trend to separate send into public_send and __send__.
https://github.com/ruby/ruby/commit/3198e7ab
RuboCop does not override send, so this PR enables Style/Send cop to prevent use send method.
In future, Style/Send may be able to move to Lint/Send, but for now I think it's good to stay with Style department.
Also, Style/Send remains disabled by default because considering user applications overriding send method.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[ ] Added tests.
[ ] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

I don't mind public_send, but I do find __send__ very ugly and I'd prefer if it was restricted for the very rare case where we do not know the class of the receiver and where it is possible that send might be overriden.
I feel that apart from some basic forwarding / callback libraries, there's not need to use __send__.

BTW, this "trend" is because the current Ractor class defines send for communication to a Ractor. A few people (me included) would prefer that send not be used.

Thank you for the information. AFAIK, this separation is also beginning to apply in the rails/rails repository. The following is an example:
https://github.com/rails/rails/commit/09939f8657e13ab5eb638593ed7ec9ef959a5f60
In any case, I think it is possible to change to public_send to suppress unnecessary scope to (private, protected) method calls. On the other hand, I think it's possible to wait for a while to change to __send__ (in that case, disable Style/Send again).
So, I will update the PR to not make the change to __send__ if the change to __send__ is premature :-)

Thank you for the information. AFAIK, this separation is also beginning to apply in the rails/rails repository. The following is an example:
rails/rails@09939f8

This example is a good example where it is important to test that the method is public. Use public_send in these cases. For example in RuboCop, it's not a bad idea that our Commissioner use public_send.

(And the change to __send__ hasn't started yet in the rails/rails repo 💦 )

Very different concern.

So, I will update the PR to not make the change to __send__ if the change to __send__ is premature :-)

Sounds great to me 👍

Thanks for your advice! I updated this PR.

RuboCop does not override send, so this PR enables Style/Send cop to prevent use send method.

Did you reconsider this part, as I don't see the cop enabled for RuboCop?

I do find send very ugly

I do find everything wrapped in underscores to be very ugly. :D For me such names go against the spirit of Ruby, but thankfully I rarely have to use of them.

I didn't update the PR description 💦 and I updated it. So, Style/Send cop remains disabled.

Got it. Thanks!


Restore history

Just restore history of the project.
No code changes as all the code that was previously touched by the lost commits got erased anyway.
I'll do a second PR restoring functionality later.

r? @canndrew
(maidsafe_highfive has picked a reviewer for you, use r? to override)


Add curly (typographic) single apostrophes

The curly apostrophes—‘ and ’—are slightly different than the straight one you typically see in source code—'. It's subtle, but I appreciate seeing the curly ones in blog posts/articles.

Added this in https://github.com/samwho/symbol.wtf/commit/e78243eaed68aa2cfbd6ea0ebbd50b67eeaf14de and added you as a co-author so you're credited for the change. Thank you for your contribution! 🙏


Nuget restore : temp nuget config file doesn't respect relative paths

Environment

Server - TFS on-premise

If using TFS on-premises, provide the version: 2018 update 2

Agent - Hosted or Private:

If using private agent, provide the OS of the machine running the agent and the agent version: Windows Server 2016, agent version vsts-agent-win-x64-2.138.2

Issue Description
When adding the Nuget restore task, and specifying a nuget.config file with the feeds to use. This task will copy the nuget.config file to its own temp folder. However, when the (original) nuget.config file contains relative paths (eg. //config/repositoryPath, feeds, ...) they will be taken as is. The relative paths are not corrected for the new location (or made absolute).
Example nuget.config file:
<?xml version="1.0"?>
<configuration>

  <config>
    <add key="repositoryPath" value="..\..\packages" />
    <add key="globalPackagesFolder" value="..\..\packages" />
  </config>

  <packageSources>
    <add key="Local source" value="..\..\lib-packages" />
  </packageSources>

</configuration>

Example build (in this case task group):

See also #7505 , where I also created a work-around.


[APIC-66] ENH add job and run IDs as custom headers in API calls

This PR adds job and run IDs as custom headers in API calls, so that jobs and runs are more easily identifiable by their IDs through Civis Platform's logging.

[x] (For Civis employees only) Reference to a relevant ticket in the pull request title
[x] Changelog entry added to CHANGELOG.md at the repo's root level
[x] Description of change in the pull request description
[x] The CircleCI builds have all passed

@mattyb Tagging you for review for this pull request, but I'm going to move the discussion to the linked ticket, in order to avoid discussing internal Platform knowledge in a public repo here.


chore(release): switch release workflow to have tag trigger

Fixes #
Description
Working towards a more automated release process. Removing the manual step of triggering with specified tag to automatic trigger based off tagging.
This is aligned behavior with the aws provider:

https://github.com/aws/karpenter-provider-aws/blob/9e113aaca23bce17e99cd6f14447927e7c89e3d4/.github/workflows/release.yaml

How was this change tested?
Nothing additional
*
Does this change impact docs?

[ ] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[x] No

Release Note

NONE

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 97.766%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
36286

Relevant Lines:
37115

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 97.766%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
36286

Relevant Lines:
37115

💛  - Coveralls

pproved, but does this mean we should lock down who can actually create tags to be scoped directly to our team? Is it already fairly locked down?

We already have restrictions around version tags, but I will do a sanity check over current permissions. Good callout.


[bug]: (InterOp) Update_Fee Message only advance state if peer does accept the new feeupdate

Background
Interoperability Issue between CLN (version: 23.02) <=> LND (version: 16.2)
A noderunner run into the situation where the Peer did not accept the Update_Fee message and since then the channel is not able to reactivate because Lnd already advanced the state with the not accepted FeeRate (IMO) . The Spec Bolt02 states:
if the update_fee is too low for timely processing, OR is unreasonably large:
MUST send a warning and close the connection, or send an error and fail the channel.

(https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#updating-fees-update_fee)
The Lnd node experienced a bitcoind crash which wiped the mempool of this bitcoind node. This lead to the situation where lnd was now proposing feeupdates to peers which were way too low compared to their local ones. In the attached logs you see it sent a proposed feeupdate of 253 sat/kw. Now the CLN node responded with a warning, that it did not accept the new feeupdate. Though Lnd already advanced the Commitment State of the LocalChain (real: Remote Commitment Tx). Now when reestablishing the Channel Lnd always has this new Update in its Chain and basically this channel cannot continue because the Peer will never ACK this update.
Not sure where there is Room for improvement, but seems like Lnd should not advance the state before maybe waiting a little time to make sure the Peer did not reject this Update_Fee msg. I don't see how the CLN node should have behaved differently.
Logs:
Basically channel cannot re-establish itself because Peer does not accept the new state and will not ACK it:
2023-05-03 21:45:04.633 [DBG] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): sampled fee rate for 3 block conf: 34176 sat/kw
2023-05-03 21:45:04.634 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): updating commit fee to 34176 sat/kw sat/kw
2023-05-03 21:46:04.634 [ERR] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): failing link: unable to complete dance with error: remote unresponsive
2023-05-03 21:46:04.635 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): stopping
2023-05-03 21:46:04.635 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): exited
2023-05-03 21:46:56.184 [INF] PEER: Peer(033533e2db6311c1d417d41279c067d8713ad8a7d577a0d91e65df2f6a82c5b862): Loading ChannelPoint(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1), isPending=false
2023-05-03 21:46:56.185 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): starting
2023-05-03 21:46:56.185 [INF] CNCT: Attempting to update ContractSignals for ChannelPoint(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1)
2023-05-03 21:46:56.185 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): HTLC manager started, bandwidth=1809226713 mSAT
2023-05-03 21:46:56.185 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): attempting to re-synchronize
2023-05-03 21:46:56.252 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): received re-establishment message from remote side
2023-05-03 21:46:56.260 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): sending 2 updates to synchronize the state
2023-05-03 21:46:56.261 [DBG] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): loaded 1 fwd pks
2023-05-03 21:46:59.126 [WRN] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): received warning message from peer: chan_id=ec000e91979a9b930e8ec6ee6057a139d2fcb0deb00cf666163be79f0d4cb61e, err=update_fee 253 outside range 872-341765 (currently 9330)
2023-05-03 21:46:59.328 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): stopping
2023-05-03 21:46:59.328 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): exited

...

2023-05-03 21:47:01.563 [INF] PEER: Peer(033533e2db6311c1d417d41279c067d8713ad8a7d577a0d91e65df2f6a82c5b862): Loading ChannelPoint(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1), isPending=false
2023-05-03 21:47:01.563 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): starting
2023-05-03 21:47:01.564 [INF] CNCT: Attempting to update ContractSignals for ChannelPoint(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1)
2023-05-03 21:47:01.564 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): HTLC manager started, bandwidth=1809226713 mSAT
2023-05-03 21:47:01.564 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): attempting to re-synchronize
2023-05-03 21:47:01.632 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): received re-establishment message from remote side
2023-05-03 21:47:01.636 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): sending 2 updates to synchronize the state
2023-05-03 21:47:01.636 [DBG] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): loaded 1 fwd pks

...

Credit goes to @feelancer21 I just wrote the issue in regards of his analysis.

Though Lnd already advanced the Commitment State of the LocalChain (real: Remote Commitment Tx).

I don't think so. To advance states we'd need the new acked state from the remote, and this update_fee is saved in remoteUnsignedLocalUpdate. Do you happen to have more debug logs?

The Lnd node experienced a bitcoind crash which wiped the mempool of this bitcoind node. This lead to the situation where lnd was now proposing feeupdates to peers which were way too low compared to their local ones.

Based on bolt02 I think the remote node needs to close the conn and fail the channel. Also don't have a good solution here - maybe don't crash bitcoind node or have a web fee estimator.

@yyforyongyu thanks for your reply :)
So I don't think they are in the remoteUnsignedLocalUpdate  bucket because the doc says "acked by the remote", but in the above case the peer is not acking the commitment we sent him:
// remoteUnsignedLocalUpdatesKey is an entry in the channel bucket that
// contains the local updates that the remote party has acked, but
// has not yet signed for in one of their local commits.
remoteUnsignedLocalUpdatesKey = []byte("remote-unsigned-local-updates-key")

```

My reasoning was the following according to the above logs, wait I think I did not add the most important logs, sry:
It has this unacked commitment state which keeps the ` revocation window exhausted`.

```
2023-05-03 23:46:56.415 [DBG] LNWL: Returning 34179 sat/kw for conf target of 3
2023-05-03 23:46:56.415 [DBG] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): sampled fee rate for 3 block conf: 34179 sat/kw
2023-05-03 23:46:56.415 [INF] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): updating commit fee to 34179 sat/kw sat/kw
2023-05-03 23:46:56.415 [TRC] LNWL: ChannelPoint(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): local owes commit: true (local updates: true, remote updates false)
2023-05-03 23:46:56.415 [TRC] LNWL: ChannelPoint(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): waiting for remote ack=true, nil RemoteNextRevocation: false
2023-05-03 23:46:56.415 [TRC] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): PendingCommitTicker resumed
2023-05-03 23:46:56.415 [TRC] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): revocation window exhausted, unable to send: 1, pend_updates=([]models.CircuitKey) {
}
, dangling_closes([]models.CircuitKey) {
}

2023-05-03 23:46:56.416 [TRC] HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): BatchTicker resumed, PendingLocalUpdateCount=1
2023-05-03 23:46:56.416 [DBG] PEER: Peer(033533e2db6311c1d417d41279c067d8713ad8a7d577a0d91e65df2f6a82c5b862): Sending UpdateFee(chan_id=ec000e91979a9b930e8ec6ee6057a139d2fcb0deb00cf666163be79f0d4cb61e, fee_update_sat=34179) to 033533e2db6311c1d417d41279c067d8713ad8a7d577a0d91e65df2f6a82c5b862@<IP_ADDRESS>:9735
2023-05-03 23:46:56.416 [TRC] PEER: Peer(033533e2db6311c1d417d41279c067d8713ad8a7d577a0d91e65df2f6a82c5b862): writeMessage to peer: (*lnwire.UpdateFee)(0xc00892a1c0)({
 ChanID: (lnwire.ChannelID) (len=32 cap=32) ec000e91979a9b930e8ec6ee6057a139d2fcb0deb00cf666163be79f0d4cb61e,
 FeePerKw: (uint32) 34179,
 ExtraData: (lnwire.ExtraOpaqueData) <nil>
})
```

Wondering if the noderunner could log whats sent to the Peer during the channel-reestablishment, whether this message:
HSWC: ChannelLink(1fb64c0d9fe73b1666f60cb0deb0fcd239a15760eec68e0e939b9a97910e00ec:1): loaded 1 fwd pks could be more verbose, wondering what fwd pks is replayed during reestablishment. (I have the feeling its the 253 sat/kw feeupdate)
Let me know whether you need some detailed log-levels of specific subsystems

Intereting find, def worht investigating. Similar to that other issue, the state machine as defined by the spec doesn't really allow for "unwinding". So if we send a fee update that they don't like, the only option is really to close out the channel as, we'll always retransmit that same update. Also since we don't have any programmatic error codes, we aren't able to programmatically detect that they rejected our fee update and should instead re-calibrate.
One thing we could do here defensively is restrict the drop in fee rate we'd propose to like x%. So that would prevent us going from say 50 sat/byte to 1 sat/byte.

One thing we could do here defensively is restrict the drop in fee rate we'd propose to like x%. So that would prevent us going from say 50 sat/byte to 1 sat/byte.

I like this idea as a short/medium term measure to not run in the above situation, we already restrict the feeUpdates in case the increase is not (shouldAdjustCommitFee )10% greater/smaller so I think thats a pretty small change.
Remaining question is how much we will allow the drop to be maybe 30%. If its more we cap at 30% so we make sure we decrease but not too much. The time interval between updates is 10min-1h so definitely enough to eventually increase the fee to a desired level.

Issue #7756 seems to be the same issue. More examples in that ticket.

One thing we could do here defensively is restrict the drop in fee rate we'd propose to like x%

That wouldn't be guaranteed to avoid this situation where the peer rejects the update_fee then LND gets stuck due the state having advanced. The underlying state bug needs to be fixed where if the mempool is later fixed it is able to recover on its own.

That wouldn't be guaranteed to avoid this situation where the peer rejects the update_fee then LND gets stuck due the state having advanced. The underlying state bug needs to be fixed where if the mempool is later fixed it is able to recover on its own.

Could you elaborate more ? We do not want to negotiate fees when sending feeupdate for a channel? Either the peer accepts the new feeupdate or we/them fail the channel much like (UDP). I do not think there is currently some rewinding foreseen for commitment states in the current protocol?
How does CLN handle this case when it is the initiator of the channel and allowed to send feeupdates ? When the peer rejects the feeupdate do you try lower fees until the peer accepts it? How do you make sure the peer does not ever accept fees above a specific feerate?


Standard library is very outdated

Current version of standard in package.json points to version 3.7.0 while current version is 5.1.0.

Fixed by #5


feat: add thumbnail sizes to media folder of manufacturers, specify suitable sizes for media folders of manufacturers and products

1. Why is this change necessary?
Manufacturer logos don't have any thumbnail size.
Product image in the listing is announced for 280px size, but there is none - the next one is 400px.
2. What does this change do, exactly?

thumbnail sizes for manufacturers: 200px (used generally), 360px (used in minimal product view), 1920px (default)
thumbnail size for products: 280px (used in listing)

3. Describe each step to reproduce the issue or behaviour.
4. Please link to the relevant issues (if any).
5. Checklist

[x] I have rebased my changes to remove merge conflicts
[x] I have written tests and verified that they fail without my change
[x] I have created a changelog file with all necessary information about my changes
[x] I have written or adjusted the documentation according to my changes
[x] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfil them.

🤖 Generated by Copilot at 0a04bc8
This pull request adds thumbnail support for manufacturer media in the core and storefront. It introduces two migration classes that create and assign thumbnail sizes for the product manufacturer media and product media folders. It also updates the templates for the cms-element-manufacturer-logo and the product-detail-headline to use the sw_thumbnails function with the appropriate sizes parameter to render the manufacturer logos with the optimal quality and performance.

🤖 Generated by Copilot at 0a04bc8

Create and assign thumbnail sizes for product manufacturer media and product media folders (link, link)
Use sw_thumbnails function to render manufacturer logos with thumbnails on the storefront (link, link)

Please note: the error thrown in platform/tests/integration/php/Core/Checkout/Document/Renderer/InvoiceRendererTest.php:167 has nothing to do with this PR. This occurs on single digit dates 👍

@shyim any new status? :-)

Thanks for you contribution :tada: . Your PR got merged some minutes ago.


make device_class an enum

We can provide comments then so people know they want the HID one for mice, keyboards joystics etc vs googling

Sorry, I don't quite understand. What did you have in mind?

    unsafe {
        USB_HID = Some(HIDClass::new(&bus_allocator, MouseReport::desc(), 60));
        USB_BUS = Some(
            UsbDeviceBuilder::new(&bus_allocator, UsbVidPid(0x16c0, 0x27dd))
                .manufacturer("Fake company")
                .product("Twitchy Mousey")
                .serial_number("TEST")
                .device_class(0xEF) // <- MISC instead of 0xEF
                .build(),
        );
    }

Ah, the device class in the USB Device descriptor.
I'm happy to add an enum for HID specific values, but shouldnt more generic ones like MISC be exposed in something like the usb-device crate?

Yes but those that are HIDs like mouse, joystick and keyboard should be in this crate, right? :)

Yeppers, I think it would be nice to have the really common descriptors ready to go in this crate (keyboard/mouse/joystick/etc). But i dont think we should try and be exhaustive.


clean FieldReader

r? @Emilgardis
(rust-highfive has picked a reviewer for you, use r? to override)


Separated out the reusable content into an abstract class and pulled …

Add support for the LRIS data service.

[X] pull out the data service specific information into separate classes one for Linz and one for Lris
[X] add tests for the LRIS to test a variety of geometry_name's
[x] add secret containing a LRIS key to the repo for use by GH Actions during CI testing.

Once the tests are passing and the base class extends ABC I will approve this. Looks like some good changes to add new features while improving the code

Cool! Changes made.


MSFT build ?

Does density build with Microsoft VS ?
I see:
#if !defined(clang) && !defined(GNUC)
#error Unsupported compiler.
#endif
but then many checks for _WIN ...

Hello Mark,
No it does’ build on MSVC anymore, it used to that’s why there might be those windows macro checks.
The problem is that MSVC did not provide the optimization environment I was looking for.
Good point though, I’ll remove these shortly !
Thanks
Guillaume
Le 14 juillet 2015 à 22:18:33, Mark Kelly<EMAIL_ADDRESS>a écrit:
Does density build with Microsoft VS ?
I see:
#if !defined(clang) && !defined(GNUC)
#error Unsupported compiler.
#endif
but then many checks for _WIN ...
—
Reply to this email directly or view it on GitHub.

Just to add to this, the _WIN macro tests are used to compile on windows, not using MSVC but either Clang or GCC for windows.

This is a terrible way to handle the issue.  If you really want to discourage people from using MSVC you could make this a #warning, and maybe slap a notice on the home page about MSVC being slow.
Some people will still want to use MSVC even with the performance drop.  Maybe DENSITY still provides better performance than the alternatives for their use case.  Maybe they don't really care about performance, but need DENSITY for compatibility with something else.
Lots of people want to use MSVC because they like the Visual Studio IDE, and you pretty much have to use MSVC if you want that (clang is working on something, but last time I checked it's not production-ready).  Maybe they'll even use something else for production builds.
Also, note that you're not disallowing MSVC here (you could do something like #if defined(_MSC_VER) … for that), you're disallowing everything except clang and gcc.  Well, almost… some compilers define __GNUC__ even though they're not GCC, including clang (which makes the defined(__clang__) part of that directive interesting) and I think Intel.  Do you really want to disallow EKOPath, IBM XL, Cray, Pelles, etc.?

FWIW I have something that I think should work in https://github.com/nemequ/density/tree/dev
I haven't even tried to compile it yet with MSVC, though an earlier version (in the "master" branch of that repo) does compile.  Unfortunately I don't have a good way to build it until I port the Squash plugin to the new API.

Hey Evan,
Thanks for your great feedback as usual. I had a look at your proposal but the problem is it doesn't work with Clang on windows.
I had actually tried to do exactly the same thing (use a DENSITY_RESTRICT macro) but for some reason the preprocessor or the compiler does not accept this syntax on windows, probably the pointer star (*) before is a troublemaker.
So I'm still looking for an elegant solution to this problem, maybe I'll try with a newer Clang.
I'm reopening the issue since MSVC support seems to be a concern.
BTW I hope the Squash compression benchmark is doing great !

Interesting.  That sounds like a bug with clang, and it doesn't seem like the kind of issue which would be platform-dependent.  What version of clang are you using?  Do you remember what the error message was?
One possibility could be defining DENSITY_RESTRICT to __restrict instead of __restrict__ (or restrict) when defined(__GNUC__); MSVC supports __restrict, so there is probably a better chance of clang supporting that on Windows…


[red-knot] Literal special form

Handling Literal type in annotations.
Resolves: #13672
Implementation
Since Literals are not a fully defined type in typeshed. I used a trick to figure out when a special form is a literal.
When we are inferring assignment types I am checking if the type of that assignment was resolved to typing.SpecialForm and the name of the target is Literal if that is the case then I am re creating a new instance type and set the known instance field to KnownInstance:Literal.
Why not defining a new type?
From this issue I learned that we want to resolve members to SpecialMethod class. So if we create a new instance here we can rely on the member resolving in that already exists.
Tests
https://typing.readthedocs.io/en/latest/spec/literal.html#equivalence-of-two-literals
Since the type of the value inside Literal is evaluated as a Literal(LiteralString, LiteralInt, ...) then the equality is only true when types and value are equal.
https://typing.readthedocs.io/en/latest/spec/literal.html#legal-and-illegal-parameterizations
The illegal parameterizations are mostly implemented I'm currently checking the slice expression and the slice type to make sure it's valid.
Not covered:

I did not find an easy way to error on things like Literal["foo".replace("o", "b")] because I cannot fully disable attribute expressions in the Literal since enum members are allowed.
parenthesized Tuples are not allowed. Although pyright allows this in the doc is stated that tuples containing valid literal types are illegal. Tuples are valid in case of Literal["w", "r"] for example.

The union creation with Literals is not working because I saw comments about Union not implemented yet.
https://typing.readthedocs.io/en/latest/spec/literal.html#shortening-unions-of-literals

Summary

Test Plan

I applied the comments will spend another day on adding diagnostic messages https://typing.readthedocs.io/en/latest/spec/literal.html#legal-and-illegal-parameterizations

Okay I added more parts of the legal and illegal parameters from the spec. Right now we have:

All Literal types
Nested Literals

I did not find an easy way to error on things like Literal["foo".replace("o", "b")] because I cannot fully disable attribute expressions in the Literal since enum members are allowed.
parenthesized Tuples are not allowed. Although pyright allows this in the doc is stated that tuples containing valid literal types are illegal. Tuples are valid in case of Literal["w", "r"] for example.

Explaining the commit I just pushed:
My intent in suggesting InstanceType was that it would not be a Salsa interned struct, but just a regular struct that would be stored inline in Type, so we wouldn't add an extra layer of database queries. That's why I was discussing the size of Type. I wanted to verify that this really worked, and didn't increase the size of Type, before making the suggestion -- and once I had verified that, I figured I might as well push the changes and not ask you to make them again :)

Thanks for your time and guidance, I appreciate it.


[elfio] Add new vcpkg port elfio

Adds a new new port the elfio library
Fixes #14313

I wrote one for this lib myself, as I planned to use it. Funny how someone already did it.
I just have one thing to ask, Is there any reason you used a usage file over using vcpkg_fixup_cmake_targets in the portfile?

Is there any reason you used a usage file over using vcpkg_fixup_cmake_targets in the portfile?

Only that I did not know it existed :) Thanks for the pointer!

LGTM, thanks for your PR.

Thanks for your help!

Thanks for your help!

Thanks for your changes as well!


showinfo and rel are not working for the Android.

Can we make the showinfo and info work for android?
I just want to hide the watch later, share option and more videos from the player. Can we achieve that with the react-native-youtube on android?

have you found any solution to this issue ???

No @fariya12 . I have searched a lot but haven't found any method/solution to make them work. To disable watch later and share option, I have just put an absolute positioned view over the buttons so that user won't be able to press those buttons and for the video suggestions being played at the end of the video, I just finish off the video 2 seconds prior to the end and seek to the 0 second so that those video suggestions could not come.
As far I have researched, showinfo and info have been disabled by the google itself to have a uniform user experience across all over the platforms.


Suggestion: Provide tagged union discriminator as compile-time constant

Currently, when using tagged unions, describing the discriminator member has to be done with a string/number/boolean constant type and can't be done by a constant. This means that the value has to be manually duplicated when a check is made, and the two has to be kept in sync.
My suggestion is to make the discriminator syntactically available as a static property on the type. For example:
type Fruit = IApple | IBanana;

const appleType = "apple";

interface IApple {
    type: "apple"; // this can't be `appleType`, it has to be a literal
    numberOfSeeds: number;
}

interface IBanana {
    type: "banana";
    ripeness: number;
    bendInRadians: number;
}

const fruit: Fruit;

switch (fruit.type) {
    // only possible current option
    case "apple":
        // fruit is implicitly IApple here
        break;

    // proposed option, would be functionally identical
    case IApple.type:
        // fruit is implicitly IApple here too
        // because of type being equal to "apple"
        // just as before
        break;
}

The generated code would be the discriminator value as defined in the interface's property declaration ("apple" for IApple above). The declaration files would need no new information and this would work with existing declaration files..
Of course, no such shortcut can be used for anonymous interfaces in a tagged union, like:
const oneOrTheOther: { type: "a"; x: number; } | IApple;
// can't say `[anything].type` to get "a"

I think that's fine. This is an extra feature for named types - if this is desired, just name the interface.
However, which code should be generated when the type declaration is missing is unclear to me. If TypeScript has no idea what IApple.type is, generating anything could result in JavaScript with garbage logic.

If the desired effect is to have a single declaration of each discriminant value you could write your code this way:
type Fruit = IApple | IBanana;

const APPLE = "apple";
const BANANA = "banana";

interface IApple {
    type: typeof APPLE;
    numberOfSeeds: number;
}

interface IBanana {
    type: typeof BANANA;
    ripeness: number;
    bendInRadians: number;
}

declare var fruit: Fruit;

switch (fruit.type) {
    case APPLE:
        // Handle apples
        break;
    case BANANA:
        // Handle bananas
        break;
}

The above works with the nightly build. With 2.0.x you'll need to declare the const constants with a type annotation:
const APPLE: "apple" = "apple";
const BANANA: "banana" = "banana";

@ahejlsberg That's great! Before I posted this, I tried simply:
const APPLE = "apple";

interface IApple {
    type: APPLE;
}

it didn't occur to me that typeof APPLE would be a compile-time constant in a way that getting the value of it isn't. I think that's a good enough replacement for the same idea, even though it's a bit counterintuitive - then again, so's my suggested method.


fix error docker-compose ls "command not found" coused by old version…

Hi ,
in the function "install_docker" there is a small bug.
if the command docker-compose existed, it uses it in the script but first it should be checked for "docker-compose ls" command existence . because in case docker-compose has already been installed but in older version , it does not have "docker-compose ls" command and script fails to run properly.
So I add another state to check for "docker-compose ls " existence and if it was not found, download the newer version and use absolute path of newer version not to change the default docker-compose and old installations.

Thanks for your contribution.
Can you tell me in which version of Docker and Docker Compose you see this bug?
As far as I know, docker-compose ls was introduced in Docker Compose v2, which was released 3 years ago.
We do not intend to maintain backward compatibility for that long!

well the main confusion is that there is two docker-compose on apt repositories. first one is named docker-compose that unfortunately installs v 1.29 and for latest version of docker-compose they should install docker-compose-v2 package.and this can lead to some confusion for those who are new to docker .


Improve the in-source docs of the PackageDescription API for better readability.

This PR improves the in-source docs of the PackageDescription API for better readability and clarity.

@swift-ci smoke test


Getting 404 error when submttting company info step

This issue was originally posted by @kevinksullivan in the Expensify/Expensify repo, but after researching it I determined it is due to issues with code in the App repo. I've re-created the issue here and closed it in the Expensify/Expensify repo
Problem
I cannot continue past company info step on staging only
Reproduction steps

Create workspace
Select Connect Bank Account tab
Select [Connect bank account]  button
Enter routing/account number
Enter fake company info, hit 404 error, company address clears

I feel like this has something to do with the company address change in https://github.com/Expensify/App/pull/5643 , since the address is clearing every time I try to submit, but I'm not sure.
Solution
I would expect to move forward, and if not, company info not to clear every time if I fail a certain check.
.

Looking into this:

Cannot seem to reproduce the 404 error on dev nor on staging 🤔
Even if the company information form is submitted successfully, the company address field is cleared if the user goes back to the form. So it looks to me that the company address field just needs to be set correctly.

No, let's close this out till we reproduce again.


Technet camera warmup

The interesting commit here is 78ba6121b33d4c16e8dc4094b752392037eb5a27. The preceding commits are already included in #10.

I've been thinking about this some more and I think we probably want a way to trigger whether the "warmup" happens from Python. I'm not sure how we'd name that for the capture call though. I'm currently thinking of having either bool needs_warmup or maybe even int frames_to_skip on both the cvopen and cvcapture functions.
This was actually what I started with, before falling back to the current change. However as I think we do want to be able to support more than one type of camera I think we need to let Python configure this.


Search by id

Hi,
I try to search (ajax) by id. For example when I run get request:
http://....index.php?id=1
I would like to search node whose id = 1 and after select it.
Currently I have something like this:
$("#device_tree").on(
"ready.jstree",
function(e, data) {
data.instance.search("OWW2/50");      //search by text not id
}
);
$('#device_tree').on('search.jstree', function (e, data) { data.instance.select_node(data.res); });

Hi,
ajax search is only meant to tell jstree which nodes need to be opened in order to reveal the matches. The actual matching is done on the client and by default uses the node text content. If you want to control what is considered a match take a look at the docs for search_callback
Best regards,


Eq/Ord instances for Variant

This looks good :+1:
I think it'd be worth trying to have a general version of the two lookup functions. Perhaps combining with variantTags to reduce boilerplate - all the functions are basically the same.
I've just been off on a tangent thinking about a crazy version of this with deciding Leibniz equality of reified keys and a record of well-typed binary functions instead of the two lists.  I got very carried away.
Here's a rough sketch if you care to delve into it 😈 - In which BinaryVariantSub r o ro replaces a row r = { x :: x, y :: y } with ro = { x :: x -> x -> o, y :: y -> y -> o }:
class BinaryVariantSub r o ro <= BinaryVariant (r :: # Type) o | r -> o where
  binaryVariant :: forall lk rk lt.
    -- keys lk and rk are reified variant case keys
    -- key lk associated with type lt
    RowCons lk lt _ r =>
    -- key rk is in r
    RowCons rk _ _ r =>
    -- proxy for inference
    RProxy r ->
    -- decide equality of keys or result `o`
    (SProxy lk -> SProxy rk -> Either (Leibniz (SProxy lk) (SProxy rk)) o)
    -- record of binary functions to `o`
    Record ro ->
    -- lookup values of lk and rk, if keys are the same then values are the same type
    (Leibniz (SProxy lk) (SProxy rk) -> {lhs :: lt, rhs :: lt}) ->
    -- result
    o

You'd need to have a way of reifying a variant key with the extra constraint that the key is a valid option of the variant.
Complexity wise, I think the only real thing this would have over your current version is the near constant lookup time of the functions from a record instead of walking through the lists you pass around.  Or in your case, maybe StrMap (VariantCase -> VariantCase -> o).
Anyway.  You're probably better off with staying with String and VariantCase - it's a lot shorter (less to mess up/maintain).
I might have a play around with this at the weekend and see how far we can take it.

There are a couple reasons I went with the two lists:

Building a record or StrMap as a dictionary might be faster for dispatch (my original approach did this), but I think it could be slower to build. If the compiler was better about sharing and lifting instances, I'd probably go that route. You could maybe do it through unsafe mutation, since it should actually be safe. It's probably worth a benchmark in any case. The list approach is still just linear, as is normal pattern matching with large ADTs.
By building a separate list of tags, it can be shared when you instantiate Ord. Otherwise you end up with a lot of duplicate IsSymbol dictionaries all over the place, and this makes a huge difference with large variants. Again, I wish the compiler was better about sharing these.

I split out the dispatch function. I think this is a good initial implementation given my goals. Maybe when we flesh out a records library, we can revisit it if there are more efficient operations to work with. Thanks @LiamGoodacre.

Yeah looks great :+1:


Restarting actively-staking Provisioners won't recover consensus

Describe the bug
When the genesis Provisioner restarts, it is incapable of keeping up with the consensus. We need to check whether this affects also the Provisioners in a multi-staking scenario
To Reproduce
Stop/restart the genesis Provisioner
Expected behaviour
The consensus should keep accepting blocks
Logs/Screenshot
TBD

As per findings and tests performed there is not issue with syncing up procedure for provisioner/non-provisioner node.
root cause: Due to ~1s Consensus time  sometimes it could happen a race condition in which Provisioner node is terminated  a few milliseconds before it completes the procedure of accepting next valid block.  In a single-provisioner network, this will result into an inconsistency issue and consensus gets halted.
Example networks state:
9500{"data":{"blocks":[{"header":{"height":31}}]}}
9501{"data":{"blocks":[{"header":{"height":32}}]}}
9502{"data":{"blocks":[{"header":{"height":32}}]}}
9503{"data":{"blocks":[{"header":{"height":32}}]}}
9504{"data":{"blocks":[{"header":{"height":32}}]}}


Teltonika FM1125 – CODEC_12 - Send Commands from Traccar

Is it possible to send commands back to device using codec_12 with Traccar web page Command function?
The response message structure is nearly the same:

| 0x00000000 | Data Size |  0x0C  | Command quantity |  0x05  | Command size | Command | Command quantity |   CRC   |
|   4 Bytes  |  4 Bytes  | 1 Byte |       1 Byte     | 1 Byte |   4 Bytes    | X Bytes |      1 Byte      | 4 Bytes |

It can be considered as an arbitrary text.
It is a command that the serial device connected to Teltonika FM1125 can understand.

Teltonika commands are implemented.

Dear Anton,
First of all, thanks for your hard work as always.
I've compiled the new code and I've updated test server but I'm still don't see the option to send custom commands in the web page. What I'm doing wrong?

Is device connected? Does it show as green?

Yes, it is connected and shown as green in the web page with position updated.

Is 5th button in the toolbar enabled? That's the one to send commands.

That's the problem. I only see Add, Edit, Remove and Command buttons on the left. Follow and Settings on the right toolbar. I'm using the last GIThub version "...NetBeansProjects\traccar\web"

app.min.js was the problem. Now I can see the new buttons!
I've make a new installation of Traccar_3.6 and I have used this file. How can we generate the app.min.js in every rebuild at NetBeans?

I would recommend to use debug version:
<entry key='web.debug'>true</entry>

It uses original JavaScript file, so you don't need to generate anything.

Everything perfect, working like a charm!
Thanks you very much for your help.


Write tests to prevent code wrapped in Docker containers does not bit rot

We have code that we depend on for tests like serve_hostname.go and webserver.go which is built using a Makefile and then wrapped in a Docker container and then used by tests. However, it is easy for this code to bit rot. We should have tests to at least make sure this code still compiles.

dup of #3665


Update Composer dependencies (2022-01-15-21-12)

Visual regression test passed!
View the visual regression test report


Request to add a Call notification

Hello. I'm using your app to get notifications. I wanna be able to also get call notifications and I'm gonna add a small vibration motor to it so that I'm notified with haptics. Is it possible to get call notifications?
Huge thanks for your work!

maybe with the new update it is possible?

The app now supports the ability to notify a connected device when a new notification is posted. It will still require the bluetooth device to request the notifications string from the phone, but it won't require constant polling as of 2.0.2


Add password security to staging site

Something like this should work:
config/environments/staging.rb
MyApp::Application.configure do
config.middleware.insert_after(::Rack::Lock, "::Rack::Auth::Basic", "Staging") do |u, p|
[u, p] == ['username', 'password']
end
#... other config
end

As long as we have the ENV variables protected as in the rest of the blog post, that would work.


"panel --install-examples" does not work

Following http://panel.pyviz.org/#usage, I couldn't get the examples:
$ panel --install-examples
usage: /home/ceball/mc3/envs/panel/bin/panel [-h] [-v] {html,info,json,png,sampledata,secret,serve,static,svg} ...
/home/ceball/mc3/envs/panel/bin/panel: error: unrecognized arguments: --install-examples

I was going to add pyct to make panel examples available (in common with other pyviz projects), but I'm not sure how I ought to do that, because there doesn't seem to be any existing argparse parser I can add to - bokeh's main() is  just called.

@jlstevens is going to need to add argparse-based options anyway, so can you please set it up to be like all our other projects except that if a command doesn't match and it would otherwise show a usage message, instead it call's bokeh's main()?

@jlstevens, it looks like our instructions still don't match what panel currently does, and everything will be more consistent if we change what panel does rather than the instructions...

It should now be working, though I think the command is just panel examples. Closing.


Initial Code Donation (Do Not Merge w/ out code owner approval)

Made minimum changes to remove vendor specific information
Updated the change log to reflect the code donation
Fixed formatting in markdown & yaml files
Fixed broken links

Referencing this issue: https://github.com/open-telemetry/opentelemetry-demo-webstore/issues/14

Merging per Julianos comment in slack. Reileys review is enough to move forward


Replace the sql builder with ORM(Object-Relational Mapping)

Signed-off-by: myan<EMAIL_ADDRESS>
Deprecate the pgx connection pool(fixed connections) with gorm database connection pool(dynamic db connection size)
Remove the poor readability SQL builder from the database
Remove the heartbeat bundle for the managed hub

This is split from PR: https://github.com/stolostron/multicluster-global-hub/pull/717

It looks good for me.
Do you think we should enable a unit-test for all? I mean include the global-resources test

Since we care about the global resource. I think we can open the e2e test for all.


test writing

there is no test, all tests should be written, code review will be done while writing tests, corrections will be made

Could you verify it . I run it but not done


RCS_UI: Field sharedAccounts to accountIds when send consent decision to RCS backed

Describe the feature/improvement
When user accept the consent and the consent decision is send to RCS backend the field array that contains the accounts is sharedAccounts and RCS backend map this field into accountIds in the consent decision object.
RCS-UI could send the accounts directly in the field accountIds instead of in the field sharedAccounts so the RCS backend will map directly this field without specific Json annotations to map it.
Tasks

[ ] RCS-UI: Modify the field sharedAccounts to accountsIds
[ ] RCS backend: Modify the consentDetailsRequest to map directly the accountId field received from RCS-UI.
[ ] Ensure that functional tests passed with no fails.

Hey team! Please add your planning poker estimate with ZenHub @andra-racovita @mariantiris


how to test on custom images?

Unlike monocular depth estimation, which predicts depth from custom images, depth completion requires sparse depth maps as input ( e.g., usually from ToF, LiDAR, SLAM, or SfM).


fix: Set relying party ID to COOKIE_DOMAIN if it is available

See #457

It is even worth with WebAuthn: you cannot then register a key on a subdomain:

cc @dd32 - please see above - for some reason, GitHub does not allow me to comment on your PR.

U2F

Key registered
Domainlogin
Subdomainlogin

domain
✅
❌

subdomain
❌
✅

Login fails with "Registration failed 4".
Migrated U2F Key

Key registered
Domainlogin
Subdomainlogin

domain
✅
❌

subdomain
❌
✅

Login fails with "You cannot use this key to log in" (InvalidStateError).
WebAuthn

Key registered
Domainlogin
Subdomainlogin

domain
✅
✅

subdomain
✅
✅

I think it's good to go.

Awesome, thanks @sjinks and @dd32 🎉


how to allow allow_read_across_tenant in seed file

how to allow MultiTenantSupport.allow_read_across_tenant in seed file ,  tried adding this line in seed file but didn't worked

@hoppergee

What kinds of "didn't work"? Any error messages? It will be better if you can give an example or sample code.

@hoppergee after wrapping seed file code in do blocked worked for me
MultiTenantSupport.without_current_tenant do
MultiTenantSupport.allow_read_across_tenant
MultiTenantSupport.turn_off_protection
==========seed file data  ===========
end
it would be great if you add console like feature in initializer
eg:
seed do |config|
config.allow_read_across_tenant_by_default = true
end

it would be great if you add console like feature in initializer

Maybe you can try to get this feature by simply put MultiTenantSupport.allow_read_across_tenant on the top. Then it behaves like "default"

it would be great if you add console like feature in initializer

Maybe you can try to get this feature by simply put MultiTenantSupport.allow_read_across_tenant on the top. Then it behaves like "default"

it didn't worked  throwing error
MultiTenantSupport::MissingTenantError: MultiTenantSupport::MissingTenantError

The current_tenant is nil by default. When you need to create records under a tenant you can use
MultiTenantSupport.under_tenant(your_tenant) do
  # ...
end

BTW, most time you don't need MultiTenantSupport.without_current_tenant, unless you are doing something like this:
MultiTenantSupport.under_tenant(your_tenant) do
  # ...
  MultiTenantSupport.without_current_tenant do
    # ...
  end
end

@hoppergee helpful , you can close this issue, you did great work @hoppergee 🔥


Documentation seems incorrect for "Send with options" should include /set to be clear

Checklist

[X]  I am not using Home Assistant. Or: a developer has told me to come here.
[X] I have checked the troubleshooting section and my problem is not described there.
[X] I have read the changelog and my problem is not mentioned there.

Deploy method
Docker
Z-Wave JS UI version
latest
ZwaveJS version
latest
Describe the bug
If you go to the documentation and got to set (https://zwave-js.github.io/zwave-js-ui/#/guide/mqtt?id=set-values) then look for set with options the topic name reads

However as previous it should include the set like
zwave/office/light/38/0/targetValue/set
This is correct in the regular set documentation above it.
To Reproduce
Try to call a similar topic without the /set on your local and notice it doesn't work. Add the /set and notice it still respects the options.
Expected behavior
I would expect the documentation to have the correct topic with the /set
Additional context
No response

Correct. Let me fix this asap


Data Augumentation not same with BYOL?

color jitter and gaussian kernel, sigma is not same with BYOL, does the paper use the special parameter?

@guanfuchen i'm actually using the set from SimCLR i believe, but let me check on this later and get back to you!

@guanfuchen i'm actually using the set from SimCLR i believe, but let me check on this later and get back to you!

@guanfuchen just like my other libraries, you can customize your own augmentation functions by passing in augment_fn and augment_fn2

@guanfuchen just like my other libraries, you can customize your own augmentation functions by passing in augment_fn and augment_fn2

I refer the other implementaion. Thxs. @lucidrains

I refer the other implementaion. Thxs. @lucidrains


Add an ability to parse "return" statements

I consider it necessary to be able to get all the return statements parsed.
For example, to add a returns property to the CallableDeclaration. So when you get this declaration, you would be able to iterate over the returns and also see the types of the statements that are returned (a function call, or a variable, or a constant, etc).
WDYTAT? This ability does not contradict the idea of the node-typescript-parser?

Hey @vyshkant
That's a good question.. It's not a direct conflict with the main idea of the parser.
What's the usecase of this request?

Actually, the return type of a method or a function is already parsed. You got those information in the "type" of a function or method.


Type 'boolean' is not assignable to parameter of type '(false | Observable) & (true | Observable)

Playground Link
Tested on tslib v2.3.0 and latest 2.5.0

I think you're looking for: https://github.com/microsoft/TypeScript/issues/new/choose


Add docs style guide

Add docs style guide
Minor editorial changes to the coding conventions section.

Merging. @pappasilenus let me know if you want to add/change anything.


Issue when installing via composer if you already got guzzle 6

I have encountered the following issue when you try to install the google-api-php-client via composer, here is the error from the composer:
Problem 1
    - google/apiclient v2.0.0-RC3 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
    - google/apiclient v2.0.0-RC2 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
    - google/apiclient v2.0.0-RC1 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
    - google/apiclient v2.0.0-RC8 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
    - Conclusion: don't install google/auth v0.8
    - Installation request for guzzlehttp/psr7 (locked at 1.3.0) -> satisfiable by guzzlehttp/psr7[1.3.0].
    - google/apiclient v2.0.0-RC6 requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
    - google/apiclient v2.0.0-RC7 requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
    - Conclusion: don't install google/auth v0.7
    - google/apiclient v2.0.0-RC4 requires google/auth 0.5 -> satisfiable by google/auth[v0.5].
    - google/apiclient v2.0.0-RC5 requires google/auth 0.5 -> satisfiable by google/auth[v0.5].
    - Conclusion: don't install google/auth v0.5
    - Installation request for google/apiclient ^2.0.0@RC -> satisfiable by google/apiclient[v2.0.0-RC1, v2.0.0-RC2, v2.0.0-RC3, v2.0.0-RC4, v2.0.0-RC5, v2.0.0-RC6, v2.0.0-RC7, v2.0.0-RC8].

I've got guzzle 6.2 on my composer.json.
Any idea what might be the problem? And why is it that even though I just need the latest one which is RC8, it checks for all different RCs?

Ok, I think I know what might be the issue. It's not with google-php-api-client but with the dependency that is google-oauth (https://github.com/google/google-auth-library-php). It doesn't support guzzlehttp/psr7 1.3 yet it only supports the 1.2. So the one that needs to be upgraded is the google-oauth.


(FACT-1321) Install facter batch files on windows

As we switch to building puppet-agent for windows with vanagon, we need
access to resources that currently live in puppet_for_the_win. Though
these resources depend on resources that are made available in
puppet-agent, it makes sense to store these in the project specific
repo.
This takes advantage of environment.bat in puppet-agent installed with https://github.com/puppetlabs/puppet-agent/pull/512

:+1:

cc/ @MikaelSmith @kylog @joshcooper could one of you review this?

These look like they need to be installed. We could make them part of the CMake install task on Windows, something like what we do for man pages at https://github.com/puppetlabs/facter/blob/master/CMakeLists.txt#L152.

@MikaelSmith yeah, that seems totally legit. I wasn't sure how to do that. Thanks for pointing me to that example!

It installs the files as expected on windows
C:\ProgramData\chocolatey\lib\cmake\content\cmake-3.2.2-win32-x86\bin\cmake.exe -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: C:/Program Files/Puppet Labs/puppet/share/man/man8/facter.8
-- Installing: C:/Program Files/Puppet Labs/puppet/bin/facter.bat
-- Installing: C:/Program Files/Puppet Labs/puppet/bin/facter_interactive.bat
-- Installing: C:/Program Files/Puppet Labs/puppet/bin/run_facter_interactive.bat
-- Installing: C:/Program Files/Puppet Labs/puppet/lib/libfacter.so.a
-- Installing: C:/Program Files/Puppet Labs/puppet/bin/libfacter.so
-- Installing: C:/Program Files/Puppet Labs/puppet/include/facter

A change to puppet-agent that installed these new files before the cmake change was merged, and now needs to be reverted. https://github.com/puppetlabs/puppet-agent/pull/526

Fine with this; I think it'd be cleaner to only have the batch files in "C:/Program Files/Puppet Labs/bin" and point to puppet/bin, but we can leave that for later. I'm not sure how you want to deal with that.

:+1:

Looks good in stand-alone install and a puppet-agent build. :+1:


how to preprocessing image before feeding AI model?

In pytorch model, I am using transform, as follows:
"loader = transforms.Compose([
        transforms.Resize(225),
        transforms.CenterCrop(224),
        transforms.ToTensor(),
        transforms.Normalize([x, x, x], [x, x, x])
    ])

How can I transform this code into Flutter before feeding the AI model?

You can use an image package to transform your image before sending them to my package,
The only processing I do on images is just scaling to match the model inputs.

No need for tensors, if I remember correctly it should be image bytes, I handle the tensors from my side too
Yes no need to normalize the image

I used the following to resize and center crop. Its input is the path of image (taken by ImagePicker)
Uint8List preprocessImage(String imagePath) {
  // Load the image
  final File imageFile = File(imagePath);
  final Uint8List imageBytes = imageFile.readAsBytesSync();
  final img.Image? image = img.decodeImage(imageBytes);

  // Resize the image
  final Image resizedImage =
      imageLib.copyResize(image!, width: 225, height: 225);

  // Center crop the image
  final int centerX = (resizedImage.width - 224) ~/ 2;
  final int centerY = (resizedImage.height - 224) ~/ 2;
  final Image croppedImage = imageLib.copyCrop(
    resizedImage,
    x: centerX,
    y: centerY,
    width: 224,
    height: 224,
  );

  // Convert image to Uint8List
  final Uint8List processedBytes = croppedImage.getBytes();

  return processedBytes;
}

I call getImagePrediction as follows:
List<double> means = [0.485, 0.456, 0.406]
List<double> std = [0.229, 0.224,0.225];
final Uint8List processedImage = preprocessImage(_file.path);
String? _imagePrediction = await _imageModel!.getImagePrediction(processedImage,mean:means,std:std);

Then, the following errors appeared when executing the getImagePrediction function.
D/OpenGLRenderer(  954): --- Failed to create image decoder with message 'unimplemented'
E/PytorchLitePlugin(  954): error reading image
E/PytorchLitePlugin(  954): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
E/PytorchLitePlugin(  954): 	at com.zezo357.pytorch_lite.PytorchLitePlugin.getImagePredictionList(PytorchLitePlugin.java:155)
E/PytorchLitePlugin(  954): 	at com.zezo357.pytorch_lite.Pigeon$ModelApi$-CC.lambda$setup$2(Pigeon.java:193)
E/PytorchLitePlugin(  954): 	at com.zezo357.pytorch_lite.Pigeon$ModelApi$$ExternalSyntheticLambda2.onMessage(Unknown Source:2)
E/PytorchLitePlugin(  954): 	at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:217)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.flush(DartMessenger.java:173)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.lambda$dispatch$0$io-flutter-embedding-engine-dart-DartMessenger$SerialTaskQueue(DartMessenger.java:163)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue$$ExternalSyntheticLambda0.run(Unknown Source:2)
E/PytorchLitePlugin(  954): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
E/PytorchLitePlugin(  954): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
E/PytorchLitePlugin(  954): 	at java.lang.Thread.run(Thread.java:1012)
E/PytorchLitePlugin(  954): error classifying image
E/PytorchLitePlugin(  954): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
E/PytorchLitePlugin(  954): 	at org.pytorch.torchvision.TensorImageUtils.bitmapToFloat32Tensor(TensorImageUtils.java:50)
E/PytorchLitePlugin(  954): 	at com.zezo357.pytorch_lite.PytorchLitePlugin.getImagePredictionList(PytorchLitePlugin.java:172)
E/PytorchLitePlugin(  954): 	at com.zezo357.pytorch_lite.Pigeon$ModelApi$-CC.lambda$setup$2(Pigeon.java:193)
E/PytorchLitePlugin(  954): 	at com.zezo357.pytorch_lite.Pigeon$ModelApi$$ExternalSyntheticLambda2.onMessage(Unknown Source:2)
E/PytorchLitePlugin(  954): 	at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:217)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.flush(DartMessenger.java:173)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.lambda$dispatch$0$io-flutter-embedding-engine-dart-DartMessenger$SerialTaskQueue(DartMessenger.java:163)
E/PytorchLitePlugin(  954): 	at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue$$ExternalSyntheticLambda0.run(Unknown Source:2)

Can you help me with this?

Can you try saving the image as a file and resending the saved bytes? And let me know
I think the code can't get the image width and height from the bytes

@zezo357 I save the image to file, and read it again using the following, but it did not work.
List<double> means = [0.485, 0.456, 0.406]
List<double> std = [0.229, 0.224,0.225];
final Uint8List processedImage = preprocessImage(_file.path);

final directory = await getApplicationDocumentsDirectory();
File temp = File("${directory.path}/test.jpg");
await temp.writeAsBytes(processedImage);
String? _imagePrediction = await _imageModel!.getImagePrediction(await File(temp.path).readAsBytes(),means:means, std:std);

The same error as above

@zezo357 I save the image to file, and read it again using the following, but it did not work.
List<double> means = [0.485, 0.456, 0.406]
List<double> std = [0.229, 0.224,0.225];
final Uint8List processedImage = preprocessImage(_file.path);

final directory = await getApplicationDocumentsDirectory();
File temp = File("${directory.path}/test.jpg");
await temp.writeAsBytes(processedImage);
String? _imagePrediction = await _imageModel!.getImagePrediction(await File(temp.path).readAsBytes(),means:means, std:std);

The same error as above

Okay will check it today, and will let you know if I found a workaround, sorry I am taking time since i am busy these days.

Glad to hear. It helps me a lot. I have used your library for several AI models without preprocessing. I do not want to change to another library just for this problem.
Looking forward to your feedback.

Just to speed up my process, can you provide a  one file code sample so I test on it ?

Sure. My project has a lot of things. But the relevance to current problem are as follows:

my crop_image.dart

import 'dart:io';
import 'dart:typed_data';

import 'package:image/image.dart' as img;

Uint8List preprocessImage(String imagePath) {
 // Load the image
 final File imageFile = File(imagePath);
 final Uint8List imageBytes = imageFile.readAsBytesSync();
 final img.Image? image = img.decodeImage(imageBytes);

 // Resize the image
 final img.Image resizedImage =
     img.copyResize(image!, width: 225, height: 225);

 // Center crop the image
 final int centerX = (resizedImage.width - 224) ~/ 2;
 final int centerY = (resizedImage.height - 224) ~/ 2;
 final img.Image croppedImage = img.copyCrop(
   resizedImage,
   x: centerX,
   y: centerY,
   width: 224,
   height: 224,
 );

 print("origin image's size ${image.height}, ${image.width}");
 print("resizedImage's size ${resizedImage.height}, ${resizedImage.width}");
 print("croppedImage's size ${croppedImage.height}, ${croppedImage.width}");
 // Convert image to Uint8List
 final Uint8List processedBytes = croppedImage.getBytes();

 return processedBytes;
}

My main.dart

import 'crop_image.dart';
import 'model.dart';

ImagePicker  imagePicker =  ImagePicker();
final _file = await imagePicker.pickImage(source: ImageSource.camera, imageQuality: 5);

List<double> means = [0.485, 0.456, 0.406]
List<double> std = [0.229, 0.224,0.225];
final Uint8List processedImage = preprocessImage(_file.path);

ClassificationModel?   _imageModel =  await BreedModelLoader().model;

final directory = await getApplicationDocumentsDirectory();
File temp = File("${directory.path}/test.jpg");
await temp.writeAsBytes(processedImage);
String? _imagePrediction = await _imageModel!.getImagePrediction(await File(temp.path).readAsBytes(),means:means, std:std);

my "model.dart"

class BreedModelLoader {
  static final BreedModelLoader _singleton = BreedModelLoader._internal();
  late Future<ClassificationModel> _model;
  BreedModelLoader._internal() {
    _model = _loadModel();
  }
  factory BreedModelLoader() {
    return _singleton;
  }

  Future<ClassificationModel> _loadModel() async {
    String path = "assets/models/model.pt";
    ClassificationModel temp_model = await PytorchLite.loadClassificationModel(
        path, 224, 224,
        labelPath: "assets/labels/labels.txt");
    return temp_model;
  }

  Future<ClassificationModel> get model => _model;
}

thank you very much, will check it at night and let you know what i found,(hopefully a fix)

Do you have any update on this? If you found anything, you can share. I am willing to help.

I am very sorry, I am busy these days so I am trying to check it , but I can't find enough time

@KennyTC you forgot to reencode your image this why it was failling
  Uint8List preprocessImage(String imagePath) {
    // Load the image
    final File imageFile = File(imagePath);
    final Uint8List imageBytes = imageFile.readAsBytesSync();

    final img.Image? image = img.decodeImage(imageBytes);

    // Resize the image
    final img.Image resizedImage =
        img.copyResize(image!, width: 225, height: 225);

    // Center crop the image
    final int centerX = (resizedImage.width - 224) ~/ 2;
    final int centerY = (resizedImage.height - 224) ~/ 2;
    final img.Image croppedImage = img.copyCrop(
      resizedImage,
      x: centerX,
      y: centerY,
      width: 224,
      height: 224,
    );

    print("origin image's size ${image.height}, ${image.width}");
    print("resizedImage's size ${resizedImage.height}, ${resizedImage.width}");
    print("croppedImage's size ${croppedImage.height}, ${croppedImage.width}");

    // Convert image to Uint8List
    final Uint8List processedBytes =
        img.encodePng(croppedImage).buffer.asUint8List();
    return processedBytes;
  }

Thanks very much. I did not know that. So, the problem is not your library's.

Yes

Thanks a lot. We are using your library, and want it runnable in Iphone too. If you could support IOS, we will very much appreciate.


The requestFactory not used in ApprovalStoreUserApprovalHandler

However it is necessary injecting in ApprovalStoreUserApprovalHandler.
public void afterPropertiesSet() {
    Assert.state(approvalStore != null, "ApprovalStore must be provided");
    Assert.state(requestFactory != null, "OAuth2RequestFactory must be provided"); // Is need this line ?
}

I think null check is not need and setRequestFactory method should be deprecated.
What do you think ?

Thanks for the report @kazuki43zoo. I'm not sure why setRequestFactory() needs to be @Deprecated?
Either way, ApprovalStoreUserApprovalHandler is now @Deprecated, so I don't think it's necessary to merge the PR at this point. Therefore, I will close it.


Added parameter sensu::install_repo as the first condition to manage …

Currently, if a user does not want to install the repositories by setting the parameter class install_repo to false, and this is declared in hiera, there is an error about duplicated resources apt::source (resource declared in manifests/repo/apt.pp file).
This PR changes the checks of the if statement to avoid this error about duplicated resources.

Where is the second declaration of apt::source{ 'sensu': }?  Are you declaring it in your manifests as well?  The module intentionally declares it so it can remove the repo if you don't want it and should be just setting ensure => 'absent'` on the repo itself.

I've defined this resource using hiera and create_resources.
The problem is that once the resource is defined by that file as ensure => absent (by setting $sensu::install_repo = false), I cannot define it by hiera.
The check of this PR is as it is performed for yum repos.

The packages create a repo with the name of sensu and setting install_repo ensures they get removed.  If you'd like to define your own sensu repository, you'll need to name it something other than sensu.

That's true, I could change just the name of the resource in hiera to solve the duplicated resource, but I did not explained myself well above.
This error appears because I need to manage apt packages/repositories by means of stages. My stages are defined as:
stage{ 'provisioning': }
Stage['provisioning'] -> Stage['main']
class { 'apt': stage => 'provisioning' }

In this way, the definition of this resource in the sensu module produces a circular dependency when used with stages, even when it is declared as absent by means of setting $sensu::install_repo = false.
This PR tries to solved this circular dependency by avoiding the declaration of the apt resource when the parameter install_repo is set to false.

I just hit the same issue today.

I'm not a fan of removing the management of the repo if install_repo is false because then the repo installed with the package never gets removed.
For your stage setup, what about just adding
Apt { stage => 'provisioning' }

I'm thinking in another option to keep both approaches.
It could be added another boolean parameter to the module named "manage_repo" with default value true.
class sensu (
...
$manage_repo = true,
...

This new parameter 'manage_repo' would handle the apt resource definition and install_repo will keep enabling or removing the new repo as previously. Adding this parameter will allow us to break the circular dependency when stages are used if it is redefined by means of hiera.
if $sensu::manage_repo {
  if defined(apt::source) {

    $ensure = $sensu::install_repo ? {
      true    => 'present',
      default => 'absent'
    }

    if $sensu::repo_source {
      $url = $sensu::repo_source
    } else {
      $url = 'http://repos.sensuapp.org/apt'
    }

    apt::source { 'sensu':
      ensure   => $ensure,
      location => $url,
      release  => 'sensu',
      repos    => $sensu::repo,
      include  => {
        'src' => false,
      },
      key      => {
        'id'     => $sensu::repo_key_id,
        'source' => $sensu::repo_key_source,
      },
      before   => Package['sensu'],
    }

I could go for that.  I don't like adding additional (potentially confusing) parameters, but I understand the problem and can't think of anything else.  Could you wrap the yum repo as well with it?

Thanks!
I'll do the change for yum repo too and I'll update this PR.

Perfect!  If you get this in the next day or two I'll get it in the next release I need to push up.

I've updated the PR, but introducing these changes into yum repos is not an easy task.
Depending on the puppet version, the yumrepo has different behavior. For instance, in puppet 3.3 yumrepo has no ensure parameter and it causes that the tests fail.

What about instead of putting it in the repo::type class we just put it in package.pp and avoid the class altogether?

I'll give it a try

Updated the PR, moving the condition using sensu::manage_repo to package.pp

Awesome!  looks a whole lot cleaner.  One last request and then I'll merge it and do a release today - can you throw a couple tests in for manage_repo = false and make sure the repo classes aren't included?

I've added some tests to check the behavior using manage_repo variable

Thanks!  Release coming shortly as well.


Make BattleAgent a function type, not an interface

Since it only needs to contain one method, it can be simplified into a function type. This shouldn't affect NetworkAgent too much, but the ExperienceNetwork in scripts/train would need to return the tensors it generates and have ExperiencePSBattle handle them somehow.

Closing. The statefulness of ExperienceNetwork and ExperiencePSBattle can't be abstracted for general sim use without significant refactoring.

This could actually be done with some generics and a bit of reworking. Might reopen.