Issue with sending msgs from central_system to charge_point

#81
I'm trying to setup an application using remote_start_transaction msg. I followed the code from the above mentioned issue and it seem to work for me in a charge_point.py script.
central_system.py
import asyncio
import logging
from datetime import datetime

try:
    import websockets
except ModuleNotFoundError:
    print("This example relies on the 'websockets' package.")
    print("Please install it by running: ")
    print()
    print(" $ pip install websockets")

import sys

sys.path.append('../../../')

from ocpp.routing import on
from ocpp.routing import after
from ocpp.v16 import ChargePoint as cp
from ocpp.v16.enums import Action, RegistrationStatus, RemoteStartStopStatus
from ocpp.v16 import call_result
from ocpp.v16 import call

from main.v16.models.hardware_model import HardwareModel
from main.v16.models.transaction_model import TransactionModel
from main.v16.helpers.common_helper import convert_datetime_str_to_unixtime
from main.v16.libraries.make_api import MakeApi

logging.basicConfig(level=logging.DEBUG)

connected = set()
# clients = dict()
ping_counter = 0
clients_couter = 0

class ChargePoint(cp):
    charge_point = 0
    hardware_model = HardwareModel()
    transaction_model = TransactionModel()
    current_time_utc = datetime.utcnow()

    @on(Action.BootNotification)
    def on_boot_notification(self, charge_point_vendor: str, charge_point_model: str, charge_box_serial_number: str,
                             charge_point_serial_number: str, firmware_version: str, meter_serial_number: str,
                             meter_type: str):
        boot_info = {
            "charge_point_vendor": charge_point_vendor,
            "charge_point_model": charge_point_model,
            "charge_box_serial_number": charge_box_serial_number,
            "charge_point_serial_number": charge_point_serial_number,
            "firmware_version": firmware_version,
            "meter_serial_number": meter_serial_number,
            "meter_type": meter_type
        }
        self.hardware_model.cp_id = self.charge_point
        self.hardware_model.save_on_boot_info(boot_info, self.current_time_utc.timestamp())
        return call_result.BootNotificationPayload(
            current_time=self.current_time_utc.isoformat(),
            interval=10,
            status=RegistrationStatus.accepted
        )

    @on(Action.Heartbeat)
    def on_heartbeat(self):
        current_time_utc_timestamp = self.current_time_utc.timestamp()
        self.hardware_model.cp_id = self.charge_point
        self.hardware_model.update_last_live(current_time_utc_timestamp)
        return call_result.HeartbeatPayload(
            current_time=self.current_time_utc.isoformat()
        )

    async def remote_start_transaction(self):
        request = call.RemoteStartTransactionPayload(
            id_tag='1234',
            connector_id=1
        )
        print('sending remote start')
        response = await self.call(request)
        if response.status == RemoteStartStopStatus.accepted:
            print("Transaction Started!!!")

    async def remote_stop_transaction(self):
        request = call.RemoteStopTransactionPayload(
            transaction_id=1
        )
        print('sending remote stop')
        response = await self.call(request)
        if response.status == RemoteStartStopStatus.accepted:
            print("Stopping transaction")

async def on_connect(websocket, path):
    """ For every new charge point that connects, create a ChargePoint
    instance and start listening for messages.
    """
    try:
        requested_protocols = websocket.request_headers[
            'Sec-WebSocket-Protocol']
    except KeyError:
        logging.error(
            "Client hasn't requested any Subprotocol. Closing Connection"
        )
        return await websocket.close()
    if websocket.subprotocol:
        logging.info("Protocols Matched: %s", websocket.subprotocol)
    else:
        # In the websockets lib if no subprotocols are supported by the
        # client and the server, it proceeds without a subprotocol,
        # so we have to manually close the connection.
        logging.warning('Protocols Mismatched | Expected Subprotocols: %s,'
                        ' but client supports  %s | Closing connection',
                        websocket.available_subprotocols,
                        requested_protocols)
        return await websocket.close()

    connected.add(websocket)
    print(connected)

    charge_point_id = path.strip('/')
    charge_point = ChargePoint(charge_point_id, websocket)
    try:
        charge_point.charge_point = charge_point_id
        await asyncio.gather(charge_point.start(), charge_point.remote_start_transaction())
    except websockets.ConnectionClosed:
        connected.remove(websocket)
        print("Charge Point disconnected")

async def main():
    server = await websockets.serve(
        on_connect,
        '<IP_ADDRESS>',
        9000,
        subprotocols=['ocpp1.6']
    )

    logging.info("Server Started listening to new connections...")
    await server.wait_closed()

if __name__ == "__main__":
    # asyncio.run() is used when running this example with Python >= 3.7v
    asyncio.run(main())

The Issue I'm facing is that when i run this script with an acting charge_point script, the messages initiated from central_system gets called and it works. But when the above central_system.py script runs with an actual charger which supports OCPP v1.6, messages are sent from central_system, but I never receive a response from the charge_point.
I receive timeout errors as follows
  ERROR:websockets.server:connection handler failed
  Traceback (most recent call last):
    File "/home/ubuntu/.local/lib/python3.8/site-packages/ocpp/charge_point.py", line 274, in call
      await self._get_specific_response(call.unique_id,
    File "/home/ubuntu/.local/lib/python3.8/site-packages/ocpp/charge_point.py", line 307, in _get_specific_response
      response = await asyncio.wait_for(self._response_queue.get(),
    File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
      raise exceptions.TimeoutError()
  asyncio.exceptions.TimeoutError

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/legacy/server.py", line 232, in handler
      await self.ws_handler(self)
    File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/legacy/server.py", line 1146, in _ws_handler
      return await cast(
    File "central_system.py", line 162, in on_connect
      await asyncio.gather(cp.start(), cp.remote_start_transaction())
    File "central_system.py", line 98, in remote_start_transaction
      response = await self.call(request)
    File "/home/ubuntu/.local/lib/python3.8/site-packages/ocpp/charge_point.py", line 277, in call
      raise asyncio.TimeoutError(
  asyncio.exceptions.TimeoutError: Waited 30s for response on [2,"f1a60db6-d387-4c79-8539-e609885a8c46","RemoteStartTransaction",{"idTag":"1234","connectorId":1}].
  DEBUG:websockets.server:! failing connection with code 1011
  DEBUG:websockets.server:= connection is CLOSING
  DEBUG:websockets.server:> CLOSE 1011 (unexpected error) [2 bytes]
  INFO:websockets.server:connection closed

Did you ensure that the charger is plugged in to the vehicle?

Yes

Are you receiving the boot and status notification from the charger?

yes i am. i'm acknowledging and sending back response too. even heartbeat.

do you see anything wrong with my code, in the way im sending back requests for remote start txn?

Its not just with remoteStartTransaction, I've tried other type of messages being initiated from CSMS too, and they all hung up. Tried other methods to send msg as well.
I've tried this:
   async def get_configuration(self):
      request = call.GetConfigurationPayload(
          key=[
              'AuthorizeRemoteTxRequests'
          ]
      )
      response = await self.call(request)
      print(response)

  @on(Action.GetConfiguration)
  async def on_get_configuration(self, configuration_key):
      print('ConfigurationValue :: ', configuration_key)

and this:
    async def send_get_config(websocket):
        request = call_result.GetConfigurationPayload(
            configuration_key="AuthorizeRemoteTxRequests"
        )
        print('sending remote start')
        return websocket.send(request)

still got a hung up response, timeout after 30 seconds.
    asyncio.exceptions.TimeoutError: Waited 30s for response on [2,"b93c5762-b599-4180-b338-71c827e7bc06","GetConfiguration",{"key":["AuthorizeRemoteTxRequests"]}].
    DEBUG:websockets.server:! failing connection with code 1011
    DEBUG:websockets.server:= connection is CLOSING
    DEBUG:websockets.server:> CLOSE 1011 (unexpected error) [2 bytes]
    INFO:websockets.server:connection closed
    DEBUG:websockets.server:= connection is CLOSED

What could be wrong here?

I've been able to figure out this issue. What was happening was that
await asyncio.gather(charge_point.start(), charge_point.remote_start_transaction())

this part was executing remote_start_transaction before i even received the boot_notification from the charge point.
I tried to sequence the requests in boot_notification itself before sending the response, like this:
await self.remote_start_transaction()

return call_result.BootNotificationPayload(
    current_time=self.current_time_utc.isoformat(),
    interval=10,
    status=RegistrationStatus.accepted
)

This is not the ideal solution, nor what i wanted to achieve. What i do want to do with this sequence call is set a configuration value before sending back response from boot notification:
     request = call.ChangeConfigurationPayload(
         key='AuthorizeRemoteTxRequests',
         value='0'
     )
     response = await self.call(request)

The issue in this is that the api call happens, but the response takes a lot of time to be back, some times it comes before timeout of 30 seconds, sometimes it takes more than that. What could be the issue? Also is this the correct way to sequence the api calls?

Unfortunately, it is quite difficult to work through problems with custom implementations. This library is generally intended to provide the building blocks to build a charge station and CSMS / Central system. I will close this for now


Add support for capturing connection pool metrics

Fixes https://github.com/spring-cloud/spring-cloud-gateway/issues/2241

Ah this is already handled by https://github.com/spring-cloud/spring-cloud-gateway/pull/2250/. My bad.

Will close this in favour of https://github.com/spring-cloud/spring-cloud-gateway/pull/2250/.


chore: add modules tab & cleanup ui

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#227
#226
#225  👈
#224
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @NathanFlurry and the rest of your teammates on  Graphite


make the "login" link randomly pick an actively updated site

currently that's Login and Loggo i think?

there are many more now 😆


modal error

when i click play button always appear a modal error :
Error detected with the following parameters:
INDEX_SIZE_ERR: 1
DOMSTRING_SIZE_ERR: 2
HIERARCHY_REQUEST_ERR: 3
WRONG_DOCUMENT_ERR: 4
INVALID_CHARACTER_ERR: 5
NO_DATA_ALLOWED_ERR: 6
NO_MODIFICATION_ALLOWED_ERR: 7
NOT_FOUND_ERR: 8
NOT_SUPPORTED_ERR: 9

This error just happened to me. I was using in an application without domain name, just IP, when I changed the application with domain name the code works perfect.

Hello,
In both cases, did you use a https connection?
Regards
András
On Sun, 25 Nov 2018 at 06:04, Bruno Ribeiro<EMAIL_ADDRESS>wrote:

This error just happened to me. I was using in an application without
domain name, just IP, when I changed the application with domain name the
code works perfect.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/andrastoth/webcodecamjs/issues/57#issuecomment-441415733,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6rcY3ibU7bkGMFPXIFnXO3u4rw6-sdks5uyiTqgaJpZM4TCW1y
.

--
*Best regards *
Tóth András

Works in http or https, but just with domain name, with IP address doesn't work.

Hello,
It works for me.
Important:
With non secure connection, works only <IP_ADDRESS> (localhost).

I hope, it will help you.
Regards
András


TESTING #242

Summary

The "what"; a concise description of each logical change
Another change

The "why", or other context.
Test plan
Issues

"THING-1234" or "Fixes #123"

Coverage increased (+0.003%) to 99.568% when pulling 0873952fada98eca0c79d57c8b05ad5130ca58d7 on oakbani/test-rloomba-proxy-config into 6ea2681b9cc11cfec29b64d9188751d0155167f2 on master.


crypto/rand: does not verify /dev/urandom is a character device

Posting here per my e-mail conversation with rsc@
--

What version of Go are you using (go version)?

1.6.2

What operating system and processor architecture are you using (go env)?

GOOS=linux
GOARCH=amd64

What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

An error because /dev/urandom isn't a character device.

What did you see instead?

A normal read of the bad file.
Kernel versions < 3.17 read /dev/urandom instead of calling
getrandom(2). This allows an attacker to redirect modify /dev/urandom so
to a block device instead of a character device. A simple check (e.g.,
f.Mode()&ModeCharDevice == 0) would mostly mitigate this.
Additionally, the min:maj could be checked to see if it matches what
Linux says it's supposed to be (man 4 random says 1:9 for /dev/urandom)

CC @agl

Sure, but if the attacker can substitute a file for /dev/urandom he/she could also substitute a character device.  /dev/zero would be just as bad as hello world, right?

@randall77 it would be.
However, I'm under the impression it's common practice.
See: https://github.com/jedisct1/libsodium/blob/c752eb55d9e9992bc38e7790128953427aa0a89f/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c#L164
And https://twitter.com/CiPHPerCoder/status/733904477196029954

This is too risky for Go 1.7. I'm not convinced we should do this at all. Certainly not for Go 1.7. At the least I would want to see serious evidence that no Linux distribution anywhere has ever or will ever ship different device numbers.

@rsc, what's your opinion on checking for char device (the crux of this
issue)?
On Thu, May 26, 2016 at 7:18 PM Russ Cox<EMAIL_ADDRESS>wrote:

This is too risky for Go 1.7. I'm not convinced we should do this at all.
Certainly not for Go 1.7. At the least I would want to see serious evidence
that no Linux distribution anywhere has ever or will ever ship different
device numbers.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/15850#issuecomment-222044284, or mute
the thread
https://github.com/notifications/unsubscribe/AFnwZ4FLU06HoRo5xkoHmWuyh5f7a4J1ks5qFlRtgaJpZM4Inxf2
.

I also think that if the attacker is able to replace /dev/urandom,
then nothing prevents him from loading a kernel module to
defeat this kind of checks. It's basically protecting the wrong
thing.

@minux I agree that if an attacker has has enough access to swap out /dev/urandom then you're hosed anyway.
But messing up /dev/urandom isn't just limited to attackers (esp. attackers with a root shell). IMO it's good security etiquette to inform the user that what should be a CSPRNG isn't.

Demoting to Go1.8Maybe.
I'm not very convinced by this either.
Does OpenSSL or anybody else do this?

Apparently libsodium and random_compat:
https://mobile.twitter.com/ELagergren/status/733904157514424321
On Sun, Sep 25, 2016 at 4:19 PM Brad Fitzpatrick<EMAIL_ADDRESS>wrote:

Demoting to Go1.8Maybe.
I'm not very convinced by this either.
Does OpenSSL or anybody else do this?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/15850#issuecomment-249453061, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFnwZ17AMEq1fYL6pJE8TvJVcJWN25Y7ks5qtwGLgaJpZM4Inxf2
.

The world is migrating to syscall based entropy gathering, and I think
this issue is much less important now. And I still don't think the check
is useful. If the attack has gained enough access to tamper /dev/urandom,
I imagine he would rather do others much more useful tricks than to
tamper with /dev/urandom.
Is there any realistic attack scenarios that the attacker would just
swap /dev/urandom? The only benefit of switching /dev/urandom is
perhaps generating deterministic random numbers, but if the attacker
has root, then it's easier to just steal the private key, which leaves
no trace and enables the attackers to do basically the same with
making CSPRNG deterministic.
If it's the user that replaces /dev/urandom, then we shouldn't bother
either because this is Unix, and the user with root is supposed to
know what they are doing.
I don't think OpenSSL does this check (it did do fstat on the fd, but
it's to avoid reading entropy multiple times from the same device.)

I agree with Minux that the scenarios seem contrived. However, it does seem
like common courtesy to say, "hey, your system is obviously borked"
Also: I think dropping the dev numbers part of this issue is a good idea.
But still maintain checking to see if it's a char device is a good idea.
On Sun, Sep 25, 2016 at 5:08 PM Minux Ma<EMAIL_ADDRESS>wrote:

The world is migrating to syscall based entropy gathering, and I think
this issue is much less important now. And I still don't think the check
is useful. If the attack has gained enough access to tamper /dev/urandom,
I imagine he would rather do others much more useful tricks than to
tamper with /dev/urandom.
Is there any realistic attack scenarios that the attacker would just
swap /dev/urandom? The only benefit of switching /dev/urandom is
perhaps generating deterministic random numbers, but if the attacker
has root, then it's easier to just steal the private key, which leaves
no trace and enables the attackers to do basically the same with
making CSPRNG deterministic.
If it's the user that replaces /dev/urandom, then we shouldn't bother
either because this is Unix, and the user with root is supposed to
know what they are doing.
I don't think OpenSSL does this check (it did do fstat on the fd, but
it's to avoid reading entropy multiple times from the same device.)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/15850#issuecomment-249455546, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFnwZ2m0oLEgieDnDw5xPDamJUoFI326ks5qtw0WgaJpZM4Inxf2
.

But dropping the device number requirement means replacing
/dev/unrandom with /dev/zero goes undetected.
If we must do anything, I'd rather do some basic statistical tests
on the RNG output. But even that has debatable benefit.

That is true. But it seemed the consensus was checking dev nos was too
risky because a specific distribution might change it, so the choices are
either check and either bend over backwards to ensure compat or ignore it
and risk the situation you described.
The nice thing about checking char device is it's at most a handful of
instructions which doesn't have much startup overhead which I heard you
guys were trying to avoid.
On Sun, Sep 25, 2016 at 5:36 PM Minux Ma<EMAIL_ADDRESS>wrote:

But dropping the device number requirement means replacing
/dev/unrandom with /dev/zero goes undetected.
If we must do anything, I'd rather do some basic statistical tests
on the RNG output. But even that has debatable benefit.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/15850#issuecomment-249457116, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFnwZ5-2APOxNXHwd146aLJ5d-Z_lz6iks5qtxOWgaJpZM4Inxf2
.

I remain unconvinced that we should do this. I would like to see evidence that either (1) there exists a plausible attack this defends against, or (2) this is a widespread, standard best-practices check. I haven't seen evidence of either. And as I mentioned above, it seems more likely this will break incorrectly than it will defend against an actual attack.
Can someone make the case for doing this? If not, let's close this. Thanks.

I don't have anything else to add. I'll abandon the CL.


wide margins with empty days around activities (undocumented scrollableHorizonFactor)

This can be seen in the Activity Chart example:

By scrolling to the left of the first activity, a lot of days are present, but empty; the same is rendered to the right, after the last activity.
I've tracked down this behavoiur to these lines:
https://github.com/IBM/gantt-chart/blob/f72eea31bd4208131050c7110c2e4e534a26dc55/packages/ibm-gantt-chart/src/jquery/timeline/timeline.js#L38-L41
Where scrollableHorizonFactor is used to calculate the (vis) Timeline component start and end parameters from the activity times. It can be configured too, thus giving it a value of e.g. 1.2 brings the component to a much narrow size:
const config = {
  scrollableHorizonFactor: 1.2,
  type: Gantt.type.ACTIVITY_CHART,
  data: {

A couple of notes:

the configuration parameter is undocumented
it is still a multiplicative factor, so the wider the span (difference between the start of the earlier activity and end of the later one) the bigger the empty timeline areas - it would be better if a fixed margin / padding was available

Configuring the timeWindow seems to have an effect on the timetable area, so with:
const config = {
  scrollableHorizonFactor: 1,
  type: Gantt.type.ACTIVITY_CHART,
  data: {
    timeWindow: {
        data: {
          start: '2023-04-01 00:00:00',
          end: '2023-05-16 00:00:00',
        },
    },
    dateFormat : "yyyy-MM-dd HH:mm:ss",

The whole chart can be centered and maximized so there's almost no need for horizontal scrolling.


Add DomainMapping yaml

Problem
DomainMapping was added since Serving v0.19 https://github.com/knative/serving/tree/release-0.19/config/domain-mapping.
But operator did not add the manifest in https://github.com/knative/operator/tree/release-0.19/cmd/operator/kodata/knative-serving/0.19.0.
We expected that 3-serving-domainmapping.yaml is added like 3-serving-hpa.yaml.

As per Slack, this is waiting until it was folded into one of the other yamls.


Use concat_elements_utf8 from arrow rather than custom kernel

Which issue does this PR close?
re https://github.com/apache/arrow-datafusion/issues/1474
Rationale for this change
I noticed https://github.com/apache/arrow-datafusion/pull/3026#discussion_r937996173 that datafusion is not yet using the great concat_elements kernel added by @ismailmaj  in https://github.com/apache/arrow-rs/pull/1720
What changes are included in this PR?
Use arrow kernel, remove custom datafusion one
Are there any user-facing changes?
No

Codecov Report

Merging #3036 (c77ef6c) into master (d07a775) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3036      +/-   ##
==========================================
- Coverage   85.85%   85.84%   -0.01%
==========================================
  Files         286      286
  Lines       51670    51658      -12
==========================================
- Hits        44360    44347      -13
- Misses       7310     7311       +1

Impacted Files
Coverage Δ

...on/physical-expr/src/expressions/binary/kernels.rs
63.15% <ø> (-8.85%)
:arrow_down:

datafusion/physical-expr/src/expressions/binary.rs
97.88% <100.00%> (ø)

datafusion/expr/src/window_frame.rs
92.43% <0.00%> (-0.85%)
:arrow_down:

datafusion/expr/src/logical_plan/plan.rs
77.60% <0.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


Allow specifying before & after tolerance on seek

Updated seekToTime with a non-breaking source change that optionally allows you to specify beforeTolerance and afterTolerance as 2nd & third arguments. Current calls to seekToTime will all work and behave exactly as before as I've set the defaults to kCMTimePositiveInfinity, which the documentation states is equivalent to calling seekToTime: directly.

Thank you for this! Looks good :)


Correctly handle attached properties on root instance.

Fixes #61.
Not sure it's the correct fix. Also needs tests.

Fixed in another commit. Thanks for the code. It fixed the issue! Since I created tests it was easier for me to upload my code. Otherwise, I would have gladly merged this one :)


chore: drop mbhall88

Drop @mbhall88, as requested in #5.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Updating the documentation to include the base abstract class case in TPH

Hi!
I'm not convinced with my writing, but please feel free to use this as a starting point for a better PR.
TL;DR: there was no mention of using an abstract class in TPH.
I'm mapping a model to an existing database, and I found a very useful scenario for discriminators. We have a Products table, a Licenses table and a ProductLicenses table. The Licenses table has only six entries, and each one represents a license type with a very specific business logic.
In the old code I'm rewriting, we checked the Id to find out the license type and then handle it. E.g.:
product.ProductLicenses.Any(l => l.LicenseId == Guid.Parse("....")); // if we offer this specific license type do something

This seemed ugly, and with EFCore I found I can strong-type this and have a simpler code. I'm setting up a discriminator like this:
modelBuilder.Entity<ProductLicense>(entity =>
{
    entity.HasDiscriminator(e => e.LicenseId)
        .HasValue<SomeProductLicense>(Guid.Parse("F26E3C37-4709-496E-81B0-3AFFD6776D01"));
});

Declaring ProductLicense abstract (this is important! otherwise it complains you haven't set up a discriminator for the base type).
public abstract class ProductLicense

And then the check is not only strongly-typed but much simpler:
product.SomeProductLicense != null // if we offer this specific license type

Let me know if I can help or clarify!

Hi @tinchou, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla2.dotnetfoundation.org.

TTYL, DNFBOT;

@tinchou, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, DNFBOT;

Using the primary key as a discriminator so that you can have a special type for one row in the database doesn't seem like a common use case, so I don't think it belongs in the documentation.


Rework how HttpServerFixture handles connection

Previously, a connector was assigned to the server, then the server was
started, and we entered a loop to check if connection was successful. If
not, then we tried again.
However, the initial start() could fail, because we already assigned
a connector which was started. If for some reason the port is unavailable,
or another error occurs, then we never entered the retry loop.
This commit fixes the problem by starting the server first, then assign
and start a connector.

We should merge this to release.

I'll cherry pick to release.


I'd like to submit a pull request to make Chirpy support twikoo comment system

According to your "Contributing Guidelines" , I submit this issue to ask if it is necessary to add a Twikoo comment system.

What Twikoo?


slight style changes

@w3ichen This will create a new release right? I'll update the default-2022 & default-2023 envs after these changes are merged?
@PointlessUser still WIP or good to be reviewed?

@w3ichen This will create a new release right? I'll update the default-2022 & default-2023 envs after these changes are merged?
@PointlessUser still WIP or good to be reviewed?

It's good to be reviewed, but it's not ready for a new release. These are minor tweaks in case there is a new release in the future

@kwiskel this does not automatically create a new release. You have to go to releases and then create a release. https://github.com/MecSimCalc/MecSimCalc-utils/releases


SPIKE/BUG: Fake 'report_file' entries

Look into the rules around when a 'report_file' record is created without an actual report, there may be a bug around it.
Per Jim:
There are entries in report_file table now, associated with actions with http_status of 400.     However, there are other actions with http_status of 400, which do not have report_file entries.

This query in prod returns 8 submissions that failed with 400:
select action_id, http_status, sending_org from action where action.action_id > 16494092
and sending_org is not null
and http_status != 201
and sending_org != 'pmg'
order by action_id;
16494643	400	primary
16536175	400	imagemover
16536470	400	imagemover
16536764	400	imagemover
16536857	400	imagemover
16542479	400	primary
16601050	400	primary
16601199	400	simple_report

But when you look in the report_file table, some of them have report_file entries and some do not.    I can’t see any logic to why.
select report_id, sending_org, item_count, created_at from report_file
where action_id in (select action_id from action where action.action_id > 16494092
and sending_org is not null
and http_status != 201
and sending_org != 'pmg'
order by action_id);
b769e984-bec5-402d-b8f8-7ec1b95f66d1	imagemover	0	2022-07-05 17:55:51.051 -0400
0756f610-707a-4bf3-9465-f65728301519	imagemover	0	2022-07-05 18:05:50.852 -0400
03548685-7d07-4cb8-b27f-43587c0be19f	imagemover	0	2022-07-05 17:50:50.845 -0400
08d430ce-6cc9-4cce-9169-267ee851df81	imagemover	0	2022-07-05 18:00:50.944 -0400

The following incantations are very useful for looking up detailed info on any one action or submitted report_id, and easier than writing db queries:
./prime login --env prod
export TOK=$(cat ~/.prime/accesstoken.json | grep token | cut -d"," -f1 | cut -d":" -f2 | tr -d ")
curl -H "authentication-type: okta" -H "Authorization: Bearer $TOK" "https://prime.cdc.gov/api/waters/report/b769e984-bec5-402d-b8f8-7ec1b95f66d1/history"
The “export” grabs the bearer token from the secret file and puts it in an env var.   We should change ./prime login --env prod so that it does that automatically.

This issue is causing at least one bug I saw:  the submissions list query returns non-null “id” (report UUIDs) even when the submission returned a 400.   (Per our sender programmer’s guide, we promise that if the submission failed, the UUID will be null)

Here’s how to reproduce that bug:
./prime login --env prod
export TOK=$(cat ~/.prime/accesstoken.json | grep token | cut -d"," -f1 | cut -d":" -f2 | tr -d ")
curl -H "authentication-type: okta" -H "Authorization: Bearer $TOK" "https://prime.cdc.gov/api/waters/org/pmg/submissions?showfailed=true"
It just so happens that right now PMG has a ton of failed submissions in Prod, and they show up like this:
{
"submissionId" : 16613157,
"timestamp" : "2022-07-07T06:16:23.177Z",
"id" : "f0789fe2-eb00-49bb-8f5a-bb84c2d0bfdd",
"topic" : "covid-19",
"reportItemCount" : null,
"sender" : "pmg",
"httpStatus" : 400
}
The bug is: Per our rule, the “id” should be null, and it isn’t.   We could change the rule, or change the code, to fix this.  If we change the rule we need to notify senders who may be using this to check for failures.
(Also a minor bug I saw:   the showfailed flag is showfailed in the code but its showFailed in the openapi spec.   This threw me for a little while.)

	unknown sender = no record at all

	HL7 invalid file (bad element) = no report
	HL7 invalid file (missing element) = no report
	HL7 bad content type = no report
	HL7 duplicate = report

	CSV unknown sender = no record at all
	CSV invalid file (bad header) = report
	CSV invalid file (bad value) = report
	CSV bad content type = no report
	CSV dupliate = report

	summary -
		HL7 invalid file = no report
		CSV invalid file = report
		bad content type = no report
		duplicate = report

Spike complete, bug #6114 created


Error: Invalid string date type 'all-releaseBundles' is missing

Hello Team,
We have imported the one of the xray_watch to terraform using xray_watch resource, while reapplying the xray_watches resource using 'terraform' it throughs below error.

Error: Invalid string
expected type to be one of [all-repos repository all-builds build project all-projects], got all-releaseBundles

Snip of resource block

We believe that resource type 'releaseBundles' is missing here is causing the error. Please have a look and any quick fix to this problem is highly appreciated.
Expected behavior
Import the existing 'xray watches' using terraform xray provider, copy the configuration from terraform state, update watch_recipients details to configuration locally and re-apply the terraform without any error.

@AdiUbarale Thanks for the report! We will add the support for release bundles soon.


Map skipping to Record Collection after Accessing Nested Arrays

Map skipping to Record Collection

Challenge Name

Record Collection
Issue Description

The FCC map skipped to Record Collection in the Advanced Algorithm Scripting section after I completed Accesssing Nested Arrays in Basic Javascript. I wasn't aware that this was out of order until someone else posted on the forum about this issue.
Record Collection - it was very hard but I worked on it accidentally
I checked my profile after reading this post and saw that Record Collection was way down. I noticed this challenge was above the level I had been working on and also that the next few challenges were a lot easier in comparison.
I added a screenshot of my profile which shows I completed Accessing Nested  Arrays then Record Collection on December 22. Then it jumped back into Basic Javascript with Iterate Odd Numbers With a For Loop on December 23. The original poster in the thread above thinks he might have clicked on Record Collection by mistake. I don't recall doing that and for the most part follow the path prescribed by FCC. Other posters also noticed they skipped to that challenge.
This is my first time posting on Github and only doing so to point out a possible bug. Let me know if I missed something and if this is an actual bug in the system.
Thanks,
Browser Information

Browser Name, Version: Chrome, Version 55.0.2883.87 m
Operating System: Windows 7 Home Premium - SP1
Mobile, Desktop, or Tablet: Desktop

Screenshot

Profile screenshot showing challenges completed before and after Record Collection.

Record Collection Challenge

@the-thief sorry about the delay in getting back to you. Looks like this got lost somehow in the pile of issue that were opened last month. Sincerest apologies.
Now coming to your issue, I can't seem to reproduce this locally or on the live website.
Is there a chance that you happened to visit the challenge from the map or someone else's profile, or a link somewhere in the chat, accidentally? We store the last visited challenge in your browser.
So, unless that was the case, I am uncertain how this happened. Apologies for your inconvenience in any case.

@raisedadead Hi I'm not really sure what went wrong but I know I was working through challenges and went straight to Record Collection. I remember thinking this was way hard but worked on it until I managed to solve it. I don't really look at other camper's maps or profile's so I would eliminate that.
I didn't realize this was even an issue until I saw a thread about it on the forum. That's the only real reason I started this thread, because I saw other campers were having the same problem. Did you see the thread that was started on the forum about this? https://forum.freecodecamp.com/t/record-collection-it-was-very-hard-but-i-worked-on-it-accidentally/71913 I posted this when I opened the issue.
This tells me it's not an isolated issue. Did you test on a new account? One that has not completed this challenge yet?
This is way beyond my level of comfort otherwise I would look at how to solve this.
Thanks,

Hi, thanks for the sharing the thread. I'll try and check once again.


Correcting help text pointing to Glossary

I see some additional text was added pointing people to the glossary through the menu system.
So I tried it, and it's not there. It is under "Get Started", not "Core Concepts" although I guess if you're guessing that's where it should be then it probably should be, I mean how many people "Get Started" by reading through a Glossary? "Hey Steve, watchya doing over there?" "Oh, I'm learning Japanese, I thought I'd start by learning ALL THE WORDS".
Anyway, might be an idea to actually check before committing, right?
I do like this though, I, like you, didn't know where it was in the menu system and, like you, didn't bother to go find it either so it is good to let the reader know how to access it. Providing of course you tell them the right place, and of course if the right place is in a logical place then that would help too.
Have a nice day ;)
sbp

OH, OK, I get it, you're saying these things are described under BOTH sections, Core Concepts and Glossary in the menu above, so it's ME being the arsehole not even bothering to look at the menu RIGHT ABOVE ME.
Sorry ;)


Shapes aren't generic

"Generic Implementation: Works with any data type that implements the Point trait."
This doesn't seem to be quite right - Rect can only be constructed with nalgebra::Point & none of the objects containing P2 are generic.
Side note - it may be more idiomatic to use Into<P2> in the interface if the Point trait is simply a conversion, & if it's not a conversion, it should model whatever interface required from nalgebra::point
& a side side note - ideally, users of the library shouldn't need to depend on nalgebra directly & the required types could be re-exposed with a pub use in lib.rs.

If you're open to it I wouldn't mind taking a crack at some of these when I have some time

Thanks for the feedback!

"Generic Implementation: Works with any data type that implements the Point trait."
This doesn't seem to be quite right - Rect can only be constructed with nalgebra::Point & none of the objects containing P2 are generic.

The quote is referring to the data type T that is stored in QuadTree<T>, which is defined by the user. The Shape trait and its implementors (just Rect and Circle for now) are specifically for spacial querying.

Side note - it may be more idiomatic to use Into in the interface if the Point trait is simply a conversion, & if it's not a conversion, it should model whatever interface required from nalgebra::point

In this case it's not a conversion, it's a property accessor method. Implementing Point is just a way of providing the 2d position of whatever data type T the user defines.

& a side side note - ideally, users of the library shouldn't need to depend on nalgebra directly & the required types could be re-exposed with a pub use in lib.rs.

Good call, will include this in the next release.


[#780] Don't insert file contents literally

I was able to reproduce both issues reported in https://github.com/raxod502/straight.el/issues/780 (modifications always detected, and text decoding errors), and with this change, neither occur anymore.

Excellent. This sidesteps the rabbit hole I was going down trying to figure out how to properly encode/decode while still inserting literally.


Fixed compilation with latest IE: 2021.1 master

Hi @ilya-lavrenov
Thank you for the pull-request. @maloel - could you please take a look?

@dorodnic could you please review and merge? All refactoring of your cmake can be done after.


Disqus comments are not visible in light mode

Browser: Chrome

Hi @sanjithpk are you using the latest version of this gatsby starter?

i haven't tried the latest version, but in v1 it's working properly, and i just opened https://elemental.netlify.app. and it seems it's not happened there, can you tell us your chrome version?

I'm using the latest version of the elemental starter.
My chrome version is: 83.0.4103.116 (Official Build) (64-bit)

Hey @sanjithpk this issue occurs when you switch the theme after load. ie if you were initially on dark mode and then change to light, Disqus will keep using the light mode until the browser window is refreshed.
I will try to create an update that solves the issue by refreshing Disqus when the theme is changed.

Hey @sanjithpk check #33  should fix it

@akzhy , yes it works!
Thanks


" in json output is html escaped

When running criterion with --template json --output mydata.json, the json output contains html escapes.
[{"reportAnalysis":{"anMean":{"estError":{"confIntLDX"

Stack lts 13.26

Good catch. For some bizarre reason, json.tpl is using {{json}}, which causes the contents of json to be HTML-escaped. I think we actually want {{{json}}}, which avoids the escaping.
Patch incoming.

With #220, the output of --template json is:
[{"reportAnalysis":{"anMean":{"estError":{"confIntLDX":...

Is this to your liking, @reactormonk?

:+1:

I've uploaded criterion-<IP_ADDRESS> to Hackage with these changes.


Basic auth issue with gRPC

Hi,
I have setup a Bazel remote instance, all is working as expected, except basic authentication with gRPC (it works with http and https).
When I use basic auth on remote with gRPC like this : --remote_cache=grpcs://user:password@lb:9092
Bazel gives me this error :
INFO: Invocation ID: 9a76d3b6-4d7a-4a8a-aa34-f6d3c0b030e0
ERROR: Failed to query remote execution capabilities: UNAUTHENTICATED: no authentication metadata found

Anybody has an idea where this error may come from ?
Setup :

Bazel-remote on a compute instance behind a AWS ALB proxy

Versions :

Bazel-remote : 2.3.3
Bazel client : 4.2.2

Hmm, is the AWS ALB proxy trying to handle the authentication? BTW you should not try to load-balance across multiple bazel-remote instances, if a bazel client switches from one cache to another during a build it can fail. Maybe the simplest thing to do is try without the load balancer?

I use mono instance, the ALB is only here for handle certificate and the endpoint to simplify the management. I don't have any rules on this on, it's only forwarding.
When I target directly the instance, I can't use gRPC due to http2 exception. I will check for debug this error.

I managed to make it work (even with AWS ALB).
After hours of debug, I have created a new configuration file from zero. Put the same parameters in, but this time it's working with gRPCs :thinking:
To be honest I don't really know what is the root cause (all parameters are the same).
Thanks for the help :) I close this issue.

@mostynb I have the same issue as @DamyrFr but I'm not that lucky to have it auto-magically resolved. I have an ALB with a single service and service pod behind. The ALB is just forwarding the traffic to proper target group. From some reason I'm getting the same error.
WARNING: Failed to query remote execution capabilities: UNAUTHENTICATED: no authentication metadata found

or actually, it is a warning

@leszczynskimikolaj: I don't have any experience with ALB unfortunately. I wonder if you could share a redacted version of the configuration- maybe something will jump out at us?

@mostynb you mean remote cache config?

I meant the ALB config. But your bazel-remote config might be useful too.

Env vars that I set in my k8s bazel remote cache pod:
BAZEL_REMOTE_DIR=/home/nonroot/app/cache
BAZEL_REMOTE_MAX_SIZE=128
BAZEL_REMOTE_STORAGE_MODE=zstd
BAZEL_REMOTE_ZSTD_IMPLEMENTATION=go
BAZEL_REMOTE_GRPC_ADDRESS=<IP_ADDRESS>:9092
BAZEL_REMOTE_IDLE_TIMEOUT=0s
BAZEL_REMOTE_MAX_QUEUED_UPLOADS=1000000
BAZEL_REMOTE_NUM_UPLOADERS=100
BAZEL_REMOTE_S3_ENDPOINT=<redacted>
BAZEL_REMOTE_S3_BUCKET=<redacted>
BAZEL_REMOTE_S3_PREFIX=cache
BAZEL_REMOTE_S3_AUTH_METHOD=iam_role
BAZEL_REMOTE_S3_DISABLE_SSL=false
BAZEL_REMOTE_S3_UPDATE_TIMESTAMPS=false
BAZEL_REMOTE_S3_REGION=us-west-2
BAZEL_REMOTE_DISABLE_HTTP_AC_VALIDATION=false
BAZEL_REMOTE_DISABLE_GRPS_AC_DEPS_CHECK=false
BAZEL_REMOTE_ENABLE_AC_KEY_INSTANCE_MANGLING=false
BAZEL_REMOTE_ENABLE_ENDPOINT_METRICS=false
BAZEL_REMOTE_EXPERIMENTAL_REMOTE_ASSET_API=false
BAZEL_REMOTE_ACCESS_LOG_LEVEL=all
BAZEL_REMOTE_HTPASSWD_FILE=/etc/bazel-remote-cache/.htpasswd
BAZEL_REMOTE_TLS_CERT_FILE=/opt/certs/cert.pem
BAZEL_REMOTE_TLS_KEY_FILE=/opt/certs/key.pem

and the ALB:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: brc-ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-2-2017-01
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS": 9092}]'
    alb.ingress.kubernetes.io/target-type: ip
    alb.ingress.kubernetes.io/backend-protocol: HTTPS
    alb.ingress.kubernetes.io/backend-protocol-version: GRPC
    alb.ingress.kubernetes.io/target-group-attributes: deregistration_delay.timeout_seconds=30

The bazel-remote config looks OK to me, and the ALB config seems ok too (though I have no experience with ALB).
@DamyrFr: does this look like your working setup?

@mostynb I verified that when I add the BAZEL_REMOTE_UNAUTHENTICATED_READS=true to my bazel remote cache config and I remove the Base auth from my requesting url(so instead grpcs://<USER>:<PASSWORd>@<URL>:<PORT> I use grpcs://<URL>:<PORT>) all is working as expected

OK, but unless you only want read access I guess you'll still need to figure out why ALB is removing the authentication headers.

@mostynb are auth passed as headers? I thought base auth is passed as part of the url.

I think the way basic auth works when a client takes a URL with a username and password in it, it adds a Authorization: Basic <base64 of user:pass> header in the request. The full URL doesn't appear in the request IIUC.
https://www.rfc-editor.org/rfc/rfc2617.html#section-2

@mostynb I don't know what is the issue with ALB and how did @DamyrFr fixed his problem. In my case I found a workaround via implementing and NLB instead of ALB, which is an AWS type of load balancer that works on L4 of ISO/OSI model opposed to ALB which operates on L7. Thanks to that move, the NLB listens on the TCP port, it does not terminate the TLS session and it simply forwards the request to proper target from proper target group. This worked like a charm. My feeling is that ALB is not acting as a simple forwarder but instead it does something magical. Thanks for ur help!

Sorry for delay. Finally I have downgrade to a L4 load balancer on my side like @leszczynskimikolaj.

@DamyrFr good to know! Thanks for the info. @mostynb I think we may be hitting that issue with ALB because it does not support grpcs as a version protocol. See this thread. For more details: when you specify you ingress using ALB you achieve it via alb-specific ingress annotations. Here is the full list. For our usecase, there are 2 annotations that are quite important. It is:

alb.ingress.kubernetes.io/backend-protocol // e.g. HTTP or HTTPS
alb.ingress.kubernetes.io/backend-protocol-version // e.g. HTTP1, HTTP2, GRPC

I had a similar issue while trying to debug the username / password authentication with Postman and grpcurl.
Not entirely sure but I believe that bazel-remote-cache is not implementing HTTP basic auth, and is not looking at any Authorization: Basic ... header like others suggested above.
The code extracting the username / password seems to look it up from the GRPC call metadata. I tried to add some metadata in my Postman GRPC requests without success.
Anyway, in the end, I realized the authentication was working from Pants - which is the most important :)


Make ZK startup only after network is up

In order to avoid name-resolution and connectivity issues to other cluster nodes, especially when a server reboot occurs, make sure ZK only starts up after the network has started up properly.

:+1: for the change
will check why
The command "sudo apt-get install docker-engine=$DOCKER_VERSION -yq --no-install-suggests --no-install-recommends --force-yes -o Dpkg::Options::="--force-confnew"" failed and exited with 100 during .

build started to fail

cc @Darwiner


[🐛 in site]:  esl-animate fade animation is not presented

Open the page
Navigate to "Grouped and repetitive animation" playground tab
Observe "Fade" animation chosen from the settings panel.

Current behavior
"Fade" behaves the same as "Slide Up"
Expected behavior
Fade animation should consist of opacity transition only, the position of card should not being animated or changed

:tada: This issue has been resolved in version 5.0.0-beta.14 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 4.17.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


The application “PinPlus.app” can’t be opened.

I get this error message in the below popup when trying to run the app. Let me know if there's anything I can do to test/debug this for you.

❯ npx envinfo

  System:
    OS: macOS 10.15.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 22.16 GB / 64.00 GB
    Shell: 3.1.2 - /usr/local/bin/fish
  Binaries:
    Node: 10.20.1 - /var/folders/mk/06g84ks148s28yyss_2tcly00000gn/T/fnm-shell-8980500/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /var/folders/mk/06g84ks148s28yyss_2tcly00000gn/T/fnm-shell-8980500/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    Homebrew: 2.2.16 - /usr/local/bin/brew
    pip3: 20.1 - /usr/local/bin/pip3
    RubyGems: 3.0.3 - /usr/bin/gem
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 4.2.1 - /usr/bin/gcc
    Git: 2.26.2 - /usr/local/bin/git
    Clang: 1<IP_ADDRESS> - /usr/bin/clang
    FFmpeg: 4.2.2 - /usr/local/bin/ffmpeg
  Servers:
    Apache: 2.4.41 - /usr/sbin/apachectl
    Nginx: 1.17.10 - /usr/local/bin/nginx
  Virtualization:
    VirtualBox: 6.1.6 - /usr/local/bin/vboxmanage
  IDEs:
    Nano: 2.0.6 - /usr/bin/nano
    Sublime Text: Build 3211
    VSCode: 1.45.1 - /usr/local/bin/code
    Vim: 8.1 - /usr/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Perl: 5.18.4 - /usr/bin/perl
    PHP: 7.3.11 - /usr/bin/php
    Python: 2.7.16 - /usr/bin/python
    Python3: 3.7.7 - /usr/local/bin/python3
    Ruby: 2.6.3 - /usr/bin/ruby
  Databases:
    SQLite: 3.28.0 - /usr/bin/sqlite3
  Browsers:
    Chrome: 83.0.4103.61
    Edge: 81.0.416.68
    Firefox: 76.0.1
    Firefox Developer Edition: 77.0
    Safari: 13.1

Right click it and pick “Open”. Does that work?

@vitorgalvao no, I'm afraid not.

Can you do a Get Info on it? How did you download the application?

I downloaded the app from the releases page in this repo. Here's the get info you asked for.

@vitorgalvao ok, so I don't know why I didn't try this before, but I cloned the repo and built the app from the latest on master and it works.. I don't know why, but I see that there is one difference between master and the 1.1.6 release and it doesn't involve any changes to the app itself. I guess I can close this now, but it would be useful to know why it wasn't working from the download on the releases page

it would be useful to know why it wasn't working from the download on the releases page

Agreed. My bet is the fault is Catalina’s. But since I’ll never install it unless I’m forced, I can’t confirm.

It could be Catalina, but I reckon that when I installed the dependencies, one or a few of them may have been installed more recent versions of some packages. It all depends on the semver ranges in the package.json of your dependencies. Perhaps you could cut a new release with updated dependencies and see if that resolves the issue..

I just tried to to update the dependencies, and while the app still works, stuff gets shoved out of place for essentially no reason.
I’ll take a PR to fix it or may take another look if enough people bump into your problem, but otherwise I can’t afford the time commitment to look into it right now.


Guess The Number

Is your feature request related to a problem? Please describe.
Yes, the task is to guess a number in between 1 to 100 and to find out the total no.of trials  in which the user has correctly  guessed a randomly generated number. Below are the rules of the game:
If the guessed number is bigger than the actual number, the program will respond with the message that the guessed number is higher than the actual number.
If the guessed number is smaller than the actual number, the program will respond with the message that the guessed number is lower than the actual number.
If the guessed number is equal to the actual number , the program will end with a suitable message.
Describe the solution you'd like
The approach is to generate a random number .
Now using a loop, take input from the user and for each input print whether the number is smaller or larger than the actual number. and along with that also count the no.of trials using a counter variable.
If  the user guessed the number correctly, print that the user won. and also  print the total no.of trials done to guess the randomly generated number.
Additional context
The solution to this issue will be available in all the four languages C,C++,Java, Python.
Sir, Kindly assign me this issue under  SSOC 2023 as this will be my first PR and I have already started working on it.

Do not raise questions to solve interview questions


Update simplemud.py using Location class

simplemud.py currently uses a dictionary to represent locations. Let's fix that, and use the new Location class, defined in location.py
Differences in user experience should be minimal.

Fixed by @adamvanbelkum


Upgrading generator fails

Description
Starting of with Angular1 + Webpack , I find an issue with sass-loader on the version: 1.0.0-rc1. I try to upgrade the generator by running the yo command . Below is what I during upgrade
Error Message & Stack Trace
bash-3.2$ yo
? 'Allo Ashique! What would you like to do? Update your generators
? Generators to update generator-fountain-webapp
/Users/ashique/.nvm/versions/node/v7.5.0/lib
└──<EMAIL_ADDRESS>

I've just updated your generators. Remember, you can update
a specific generator with npm by running:

    npm install -g generator-_______

Config
  "generator-fountain-angular1": {
    "version": "1.0.0-rc1",
    "props": {
      "framework": "angular1",
      "modules": "webpack",
      "js": "js",
      "ci": [],
      "css": "scss",
      "resolved": "/usr/local/lib/node_modules/generator-fountain-webapp/node_modules/generator-fountain-angular1/generators/app/index.js",
      "namespace": "fountain-angular1",
      "argv": {
        "remain": [],
        "cooked": [],
        "original": []
      },
      "sample": "techs",
      "router": "uirouter"
    }
  }
}

I dont understand why upgrading generator does not update the .yo-rc.json file.
Environment
Node : v7.5.0
NPM: 4.1.2
yo:1.8.5

No issue here. You should rerun generator after update.
And IF issue happens with yo you are un thé wrong repo.
Next time go to https://github.com/yeoman/yo
Next time don't spam me on Twitter.

Sorry!!.


Correct fishhook import Fixes #16039

RCTReconnectingWebSocket is not compiling correctly because of an incorrect import (https://github.com/facebook/react-native/issues/16039).

Please merge this one in, it is causing a lot of confusion with CocoaPods users.

please merge

I suspect this isn't the desired fix since this hasn't been an issue within FB's codebase or else they would have fixed the compiler error. The Xcode project needs to be set up to treat fishhook as a header directory.

What's the nuance between this and #import <React/fishhook.h>

I've moved on from our implementation of react-native for now, but this likely would only be an issue for the cocoapod installation method. A #import <React/fishhook.h> is a module import, whereas a #import "fishhook.h is a file import.
Either one would work I believe, just not #import <fishhook/fishhook.h> because Cocoapod subspecs are not built as modules.

@ide FB's codebase might not use react-native as a cocoapod so they wouldn't see this issue. Not sure.

@ide header_path doesn't work, there is a PR for it https://github.com/facebook/react-native/pull/16192

FB's codebase might not use react-native as a cocoapod so they wouldn't see this issue. Not sure.

Yes, and their builds haven't been failing because of this so I suspect the issue is with how the pods are configured.  To be on the same page I would like us to figure out how to fix compilation issues (fwiw I've tested with pods and don't run into this) without modifying the import to not impact FB's build.

@ide The issue here is that cocoapod subspecs are not built as modules so the existing import will never work with cocoapods. From the commenters above and on the related issue it appears this happens with new cocoapod installations, so i'd imagine existing installations would work purely from some leftover DerivedData magic.
It appears none of the travis jobs/tests cover a cocoapod installation which is why this issue has probably gone undetected.
@jgsamudio mentioned in the issue thread that removing !use_frameworks resolved this issue for anyone following along: https://github.com/facebook/react-native/issues/16039#issuecomment-341144015 . However, if your project has any swift cocoapods this is not an option.

@macdoum1 the real issue here is people working in objective-c not taking into account the swift ecosystem, we see that with google projects everyday already

The issue is still there in 0.51.0.

still happening with 0.53.3

And in 0.54.0

This should probably be solved using this approach: https://github.com/facebook/react-native/issues/13198#issuecomment-371749528

This should probably be solved using this approach: https://github.com/facebook/react-native/issues/13198#issuecomment-371749528

This works for me, but now I can't import React without getting the "Could not build Objective-C module React" error. Any ideas? Is this related?

@macdoum1 Can you change the import to use <React/fishhook.h> because FB has implemented #import <React/RCTDefines.h> just a line above.

@keshavkaul Done, adding release notes & test plan now

@keshavkaul Done, adding release notes & test plan now

This should brake non-CocoaPods installation so is not a correct fix. The technique described in https://github.com/facebook/react-native/issues/13198#issuecomment-371749528 would be the right direction:
#if __has_include(<React/fishhook.h>)
#import <React/fishhook.h>
#else
#import <fishhook/fishhook.h>
#endif

@ikesyo Good point, making that change now

@ikesyo Done!

You should also rebase onto current master to make CI run correctly.

@ikesyo Rebased this morning, should be good to go

@macdoum1 It seems that the parent commit of this PR is https://github.com/facebook/react-native/commit/780938170b0add35e6a4151892154fa0aa5f6b57 on 10 Nov 2017, not the today's HEAD of master.

Alright, now we should be up to date

0.55.4 was released several months ago - as you can see above, the fix was merged to master 4 days ago. You can expect this in a future release - 0.57 most likely (0.56 was released last month).

Is the cherry-pick request to 0.56 rejected?
https://github.com/react-native-community/react-native-releases/issues/14#issuecomment-401224900

@ikesyo best to keep that discussion in the release thread.


Fix error seen while stopping container under normal code flow

Root Cause:
When a container is stopped, hcsshim throws "rpc error: code = NotFound desc = exec:  in task:  not found" error while killing the associated task.
The call to  func (p *pod) KillTask(ctx context.Context, tid, eid string, signal uint32, all bool) happens twice in the callstack - once with the argument all = false and the second time with all = true. The taskId associated with the container is killed during the first call and is already in the shimExecStateExited state when kill() gets called for the second time, resulting in the task not found error.
Fix:
Since the task we are looking for has already exited, it is safe to have the code behave as a no-op here and return successfully. The fix also adds an info log for the same.
Testing
Tested the fix manually and also ran tests under hcsshim/test locally.

You'll need to sign-off on your commit to please our CI
git commit --amend -s

Sync-ed up with Kathryn offline. Since the vendor function athttps://github.com/microsoft/hcsshim/blob/f50f9750ce18de430c47bff1f16fa855daaf124e/vendor/google.golang.org/grpc/status/status.go#L52 logs any error that get returned from shim, it might not be a good idea to filter the logging on shimExecStateExited since it is in the vendor code path. All the necessary clean up is also happening as expected along the container stop code flow. Will leave the code as is for now.


Client will install bash completion file.

Add bash completion file to package and document python-argcomplete.
JIRA: PDC-1161

@lubomir @xychu
I think this one needs some discussion:

if we choose to add bash completion file in /etc/bash_completion.d/ and not ask users to do the configuration manually, we will only have bash support. And if we only want bash support, we can use the global_completion to further simplify the process by simply adding PYTHON_ARGCOMPLETE_OK mark to executables rather than add the bash completion file to user system.
if we want to support both bash and zsh (i haven't tested on other shells), we will have to do the configuration manually according to argcomplete issue 10 and global_completion.

So do we need to support bash as well as zsh or just support bash and drop zsh?

I would say let's do one then the other if the requirement is required from customer, but we need to NOTE it in the document.

It would be nice to support more shells, but I don't want zsh blocking bash.
These changes look fine to me. However, the main thing must change in the packaging: assuming user has python-argcomplete installed already and installs the client package, the completion must work without any manual intervention.
I don't see the advantage of global support. It still requires us to install a completion file, and has the potential of interacting with other python programs, which I think is not desirable.

@lubomir global support doesn't require completion file, we just have to add PYTHON_ARGCOMPLETE_OK before executables in order to make it work. So there is no eval or completion file needed, everything is contained in in the script which we want to have auto completion capability.

@lubomir I see pip has the function we want: if we press <tab> after typing pip install , pip gets stuck for a while to fetch package index cache from the web. This trick may work for pdc where we can ask users whether to install python-argcomplete if he presses  after pdc  without python-argcomplete being installed.

@lao605 Does that work completely automatically or did you have to run activate-global-python-argcomplete at some point in the past?

@lubomir yes, users will have to run activate-global-python-argcomplete first where python-argcomplete.sh will be installed. Although these two means of implementation all have a file installed (one is pdc  and another is python-argcomplete.sh), global support is cleaner, that is, we don't have to install completion files for future executables (if there are).

It is a problem that users have to run a command. How are they going to know they should do it?
Apart from knowing that running the command is necessary, is is also required to have root access (to put the file under /etc) or further modify the configuration (sourcing the file from ~/.bashrc). None of these options is user-friendly.

@lubomir As for user-friendliness, the implementation you mention is better: user will just have to install python-argcomplete to get auto-completion work. Although we can put some notes about that command  in the doc, it seems unnecessary if we can skip that (maybe as less commands as possible). User-friendliness is more important than extensibility at this point, am I correct?

I think of a third solution where we can put python-argcomplete.sh file in /etc during package installation rather than put completion file of pdc specifically in etc. So I think there are totally three plans we have now:

put pdc completion file (the result of eval "$(register-python-argcomplete pdc)") in bash completion scripts directory (which is always /etc/bash_completion.d/ for CentOS/RHEL)
let user run eval "$(register-python-argcomplete pdc)" when they need it
put python-argcomplete.sh (which is what activate-global-python-argcomplete puts in bash completion scripts directory); and developers should leave a PYTHON_ARGCOMPLETE_OK at the head of executables ready for auto-completion.

I have taken three factors in account: user-friendliness, extensibility and support for shells. So here is my analysis:
user-friendliness
by saying user-friendliness, I mean the steps users needed to do to make auto-completion work for pdc.

for plan 1, there will be two steps users (rather than one): install bash-completion using yum and install python-argcomplete using yum or pip. bash-completion functionality is not automatically enabled for CentOS/RHEL and must be enabled manually.
for plan 2, there will be two steps for users: install python-argcomplete using yum or pip and put the eval command argcomplete suggests in ~/.bashrc
for plan 3, there will be two steps for users which is the same with the first plan.

Although they all require 2 steps to make it work, plan 1 and plan 3 outweight plan 2 because in the plan 2 editing of ~/.bashrc file is needed. plan 1 and plan 3 wins.
extensibility

plan 1: for developers, when a new executable is to be added to pdc (if any), he will have to add a completion file for that exec and edit the spec file. This produces completion files scattered in pdc_client; for users, there is nothing to do when pdc upgrades.
plan 2: for developers, there is nothing to do other than write the new exec; for users, they have to manually add that to ~/.bashrc
plan 3: for developers ,there is nothing needed to do other than add a PYTHON_ARGCOMPLETE_OK at the top of the exec; for dev, there is nothing needed to do.

So, as for extensibility, plan 3 wins.
support for shells

plan 1 only supports bash
plan 2 support bash and zsh although there seems to be a different mechanism for zsh to do auto-complete
plan 3 only support bash

so, as for support for shells, plan 2 wins. But shells support is not of primary concern.
plan 3 is the same with plan 1 in user-friendliness and beat plan 1 and plan 2 in extensibility. I think it is a workable plan.

Good news is that pdc-client repo is ready,
bad news is that this pull request is not included, sorry for the inconvenience.
Please create it again against the new repo.


Roadmap

[ ] Add script to vendor hex_erl into other builds tools (rewrite vendor_hex_erl task in bash or something; include hex_erl version in generated files)
[ ] Add ETag support to hex_repo
[ ] Add hex_api client per https://github.com/hexpm/specifications/blob/master/http_api.md
[ ] Add  functions to build registry resources (hex_registry:build_names etc, ref: https://github.com/hexpm/hexpm/pull/647#discussion_r174561126)

regarding "ETag" support I think we can do the following; change:
-spec get_tarball(name(), version(), options()) -> {ok, tarball()}.

to:

-spec get_tarball(name(), version(), etag(), options()) -> {ok, tarball()} | {ok, cached}.

alternatively, we could also pass it in options, I guess the users would then call it as e.g. hex_repo:get_tarball(Name, Version, [{etag, ETag} | hex_repo:default_options()])

Add cache_dir to options hex_repo.erl:14, and on 304 Not Modified we read from cache; this way the successful return value is always {ok, tarball()}

I think we could start with 1. and later maybe add 2

I'd like to work on this, unless you've already started.

Go for it


Patch pytest-flake8-1.1.1 to fix dependencies

Checklist

[x] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

See conda-forge/pytest-flake8-feedstock#20

Downloading: https://conda.anaconda.org/conda-forge/noarch/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/noarch/repodata.json.bz2
noarch::pytest-flake8-1.1.1-pyhd8ed1ab_0.tar.bz2
-    "flake8 >=3.5",
-    "pytest >=3.5",
-    "python >=3.5",
+    "flake8 >=4.0",
+    "pytest >=7.0",
+    "python >=3.7",
Downloading: https://conda.anaconda.org/conda-forge/linux-64/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/linux-64/repodata.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/linux-armv7l/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/linux-armv7l/repodata.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/linux-aarch64/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/linux-aarch64/repodata.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/linux-ppc64le/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/linux-ppc64le/repodata.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/osx-64/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/osx-64/repodata.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/osx-arm64/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/osx-arm64/repodata.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/win-32/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/win-32/repodata.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/win-64/repodata_from_packages.json.bz2
Downloading: https://conda.anaconda.org/conda-forge/win-64/repodata.json.bz2

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


prevent http and redirect

is there any way to prevent an HTTP response，or redirect,thanks.

Not sure that there's an issue here, so I'm closing this one.


dashboards v0.3.0.ndjson hangs on import and then fails.

I am having issues getting this to import. I have used the convenience scripts to install LME. (Latest release as of 11/08/20)
Apart from replacing 'ChangeThisDomain' with my DNS information 'https://MyServer.Domain' (As instructed), I then import it and after a long time of hanging it eventually displays error stating this 'file can not be processed'. I have cloned from Git a number of times thinking potentially the file had corrupt in someway? Maybe a syntax error in the code? Not sure if anyone else has had this issue?
Screenshot of error: https://imgur.com/a/FRCY1Kf
Environment information:
Ubuntu 18.04.4 LTS
2vCPU
12GB RAM
50GB HDD
Proxy in environment = No
Kibana 7.8.0
Elasticsearch 7.8.0
Logstash 7.8.0
Thanks

Hey @MichaelJKelly
Can you confirm that when you do the find/replace steps as detailed in https://github.com/ukncsc/lme/blob/master/docs/chapter4.md you have included the trailing backslash in the domain?

Hey @a-d-a-m-b
Yes I can confirm that I have replaced 'ChangeThisDomain' with 'https://MyServer.Domain'  (Including the backslash)

Has anyone else had this issue?
Potentially anything else i can try?
Cheers

Morning Guys,
As our team are looking to move to the latest LME release, apart from what was mentioned by @a-d-a-m-b are there any other fixes we can try to allow the dashboards templates to import for this latest version? Otherwise we will stick with the previous version.
Many thanks

Just updated from 0.2 to 0.3 and had the same issue, amongst others.
Using a backslash before each forward slash seems to have fixed it for me so instead of 'https://MyServer.Domain' I used https://MyServer.Domain'

Hey @anderoo6,
Any chance you can post or upload the dashboard file for me to have a look at. Still not having any luck over here.

This is what mine looks like now:
,\"params\":{\"parsedUrl\":{\"origin\":\"https:\/\/kibana.domain.local\",
dashboards v0.3.0upl.ndjson.txt
My initial problem was that the upgrade didn't apply properly and ES wasn't the right version for the dashboard.
If you run 'docker ps', note the container id for kibana,  then run 'docker logs' followed by the container id you should see the errors from the import. I was getting errors such as:
':"UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token \ in JSON at position 2317\n    at JSON.parse (<anonre/server/saved_objects/routes/utils.js:33:19)'

I had the same problem. I tried everything above but then I changed browser from Chrome to Firefox and it imported successfully in Firefox.

@MichaelJKelly & @anderoo6 ... was this resolved?

@a-d-a-m-b
Yes this was simply resolved for me by making the edit within Notepad++ which didn't introduce extra characters on saving the file, like it was when editing with regular notepad.

closing


literal tags with type annotations, sql...

Does prettier-plugin-embed work with generic type annotations on literal tags?
The following snippet doesn't seem to work if I have the <Revenue> annotation after the "sql" tag. If I remove the <Revenue> annotation or use /* sql */ inline it does work.
Doesn't seem to work:
    const data = await sql<Revenue>`
      SELECT
        *
      FROM
        revenue
    `;

This does work.
    const data = await sql<Revenue>/* sql */ `
      SELECT
        *
      FROM
        revenue
    `;

Thanks for the great tool!

Oops, I am not sure what happened. It does seem to work now.

Not sure if this applies to your use case, but sometimes you'll have to reload the vscode window for them to take effect if there're changes in your Prettier config (supposing you're using the vscode Prettier extension).
If you encounter the problem again with reproducible steps, feel free to file an issue.


Fix MKL macOS bug

The problem is that mkl tries to run in parallel mode without proper openmp available. I found that these options solve the problem:

Install openmp and link to it (which is what I did here)
Tell mkl programatically to run in sequential mode if openmp is not available (not the best solution, since it wasn't designed to solve linking problems. mkl_rt should solve those).
Don't use the dynamic signle library mkl_rt and link to each single library needed (mkl_core, etc.), and use the sequential library mkl_sequential.

Impressive! :)

If no one has objections I guess this could be merged such to bring back to like MacOS MKL tests :)

yup, go for it!

kudos for bringing the CI back :)


upgrade to sbt 0.13.11

test run: https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-community-build/234/consoleFull (temporarily 404 while Jenkins huffs and puffs)

failure was surely spurious, but anyway, new test run: https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-community-build/235/consoleFull

"surely spurious", famous last words. the failure has not gone away in subsequent runs, e.g https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-community-build/236/consoleFull

The error is a failure to retrieve an sbt 0.13.5 artifact. So apparently whatever dbuild is doing to force everything to build with 0.13.11 (except for projects that explicitly set extra.sbt-version) isn't working on this one project.
This wasn't causing errors before; I don't know why it would have regressed. Perhaps it has to do with repo.typesafe.com and the company name change — but I don't think so, because we already saw this error back before the name change, on Feb 13 in https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-community-build/231/consoleFull
But rather than investigate the cause for the regression, I'd like to make it so it isn't using sbt 0.13.5 at all.
We track Play's 2.3.x branch in the 2.11.x/JDK6 community, build since 2.4 requires JDK 8. The 2.3.x branch has val buildSbtVersion = propOr("play.sbt.version", "0.13.5") so it appears to be doing something funny with the sbt version besides just specify it in project/build.properties, as most repos do.

my deja vu finally kicked in — there is some past discussion of this from just a month ago at https://github.com/scala/community-builds/pull/210

ah cripes, and I already proposed a fix in https://github.com/SethTisue/community-builds/commit/218687a6352d5c09c74ffd3e51724288c132b0fb

new test run: https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-community-build/237/consoleFull

yay, play2-core passed. waiting for its reverse dependencies to pass, too.

FYI @eed3si9n

I also merged the change onto the 2.11.x-jdk8 and 2.12.x branches and started test runs


Android: Disabled States does not announce or disable function for some components

Description
Does not announce "disabled" on the following components:

[x] Button #30934
[x] Image  #30935
[x] ImageBackground #30936
[ ] Text #30937
[ ] TextInput  #30938
[ ] Slider #30939
[x] Picker #30940
[ ] ProgressBarAndroid #30941

Doesn't disable click functionality of the following components:

[x]  Button #30943
[ ]  Switch #30944
[x]  Slider  #30945
[x]  Picker #30946 (Picker's own "enabled" property works correctly here)
[x]  Text  #30947
[ ]  TextInput #30948
[x]  Pressable #30949
[x]  TouchableHighlight  #30950
[x]  TouchableOpacity #30951
[x]  TouchableNativeFeedback #30952
[x]  TouchableWithoutFeedback  #30953

This behavior is usually due to there being both a "disabled" prop on the component itself, that does not necessarily sync with the accessibilityState's "disabled" field. When "disabled" is set, we should just automatically set accessibilityState: disabled as well so that they stay in sync. (You can see an example of this fix in the linked Pressable issue).
When testing a component, be sure to test both the accessibilityState and the components own disabled prop if one exists, and make sure all combinations of them work as expected. This commit has a great example of snapshot tests added to ensure the component behaves as expected.
Issue #30246 is similar to this issue and should be taken into account when creating a solution.
React Native version:
v0.63
Expected Results
When a component is "disabled", screen readers should announce this as part of their focus announcement. Clicks to these elements should also have no effect.
If a component has both a "disabled" prop and allows "accessibilityState: disabled", the "disabled" prop should be the authority on the state of the component (ignoring accessibilityState: disabled).
Snack
https://snack.expo.io/d1Ikg7nqo
Android details
To disable an element for Talkback, the AccessibilityNodeInfo's enabled property should be set to false and the clickable, longClickable, or focusable attribute should be true (one of these is likely already true if the element was clickable, it's important that it remains that way).
If an AccessibilityAction of AccessibilityNodeInfo.ACTION_CLICK, AccessibilityNodeInfo.ACTION_LONG_CLICK, or AccessibilityAction.ACTION_CONTEXT_CLICK is set on the AccessibilityNodeInfo, it should be removed.
All of the above can be achieved automatically by simply setting the enabled property of the View itself to false, but this means that the components own "disabled" prop (if one exists, such as with ), and the accessibilityState's "disabled" field, must remain in sync.

@blavalla Is the expectation that accessibilityState: disabled and disabled prop to function the same way? What is the purpose of having both options then? Should we consolidate to one way?

@lunaleaps, I would expect both properties to have the same experience. As for why they are separate, it's likely because the "disabled" prop also applies some sort of visual indicator of its state (dimming the element, etc.) which is what it is often used for. The accessibilityState: disabled only applies to the accessibility system, so won't do anything visually to the element itself. The accessibilityState: disabled prop is also part of a set of props that are on many different components (here), and disabled seems to be something implemented on a component-by-component basis.
When disabled is set we should probably just automatically set accessibilityState: disabled as well, or alternatively in the mapping of RN props to the native Views, we should consider this prop in the same way we consider accessibilityState: disabled. I can't think of a valid reason for these two properties to ever be out of sync, so we should probably make sure they don't get that way.

@blavalla
I published PRs https://github.com/facebook/react-native/pull/33076 https://github.com/facebook/react-native/pull/33070 https://github.com/callstack/react-native-slider/pull/354 to fix this issues.
The PRs are in DRAFT. I will complete the PRs in a couple of days.
Thanks :pray:


SA0102 : False Positive (CSharp.CsParser : A syntax error has been discovered)

StyleCop returns a false positive with the new C# switch expression.
private static LogLevel ToNLogLogLevel(NpgsqlLogLevel level) =>
            level switch
            {
                NpgsqlLogLevel.Trace => LogLevel.Trace,
                NpgsqlLogLevel.Debug => LogLevel.Debug,
                NpgsqlLogLevel.Info => LogLevel.Info,
                NpgsqlLogLevel.Warn => LogLevel.Warn,
                NpgsqlLogLevel.Error => LogLevel.Error,
                NpgsqlLogLevel.Fatal => LogLevel.Fatal,
                _ => throw new ArgumentOutOfRangeException(nameof(level)),
            };

SA0102 is not a diagnostic reported by this project. Is it possible you are using StyleCop Classic instead of StyleCop Analyzers?

Thank you for the speedy reply.
Only StyleCop.Analyzers is used within my project.

Is it possible that the warning was copied incorrectly? There is no version of StyleCop Analyzers that ever reported SA0102 under any circumstance. It sounds like StyleCop Classic is in use, but the only thing I can say with certainty is StyleCop Analyzers is not reporting this.

SA0102 is StyleCop classic or StyleCop.MsBuild's way of saying that it encountered an error (or unknown construction in this case) during the parsing of the C# file. Closing this as external.


fix: redefine semiring instance on tensor product

!bench

!bench

I just pushed 612db697045a0725fc4f654b3059b2de88aabf37 as cleanup, but it's not showing up here...

The six remaining maxHeartbeats seem to me to be another issue so I'm happy to mark this awaiting-review and worry about the others later; but I'm also unclear about what's happening with #6141 (just to be clear, I don't mind at all which one is merged).

I'm a bit concerned that github is currently broken, and that there is no guarantee that bors will merge what we expect it to: so I think we should leave this until the commit I mention above appears!

Closing in favor of https://github.com/leanprover-community/mathlib4/pull/6141, which is simpler and faster. Thanks @kbuzzard  for working this one out!


Improving error message when getting non-json response body

Your issue may already be reported!
Please search on the issue tracker before creating one.
Is your feature request related to a problem? Please describe.
I am using the CreateImage method to generate images. Today, I noticed that my service has been consistently failing to generate images, so I started investigating the cause. I found that the OpenAI API service was down today, and the API consistently returned an HTTP status code of 403. Additionally, the response body was not in JSON format. The error message I obtained from the CreateImage method was
status code: 403, message: invalid character '<' looking for beginning of value

and the response body look like this
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | Cloudflare</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=
....

Should we change the error message when can't unmarshal the response body ?
This is just my personal opinion. If you think it's unnecessary, it's okay to close this issue. :p
Describe the solution you'd like
replace then error message in handleErrorResp when json decode failed
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Yes, I occasionally encounter this issue as well.


Add new Internship to the CZ

Description
Add new Internship to the CZ
Example  Fill x { [x] }  into  bracket

[x] I have checked the existing issues *
[x] I have read the Contributing Guidelines *
[x] I have starred the repository *
[x] Working under Gssoc24*

@HimanshuNarware can i work on this issue ?
and if yes , please explain me a little bit about this issue .

Can you explain me the issue a bit more?


[BugFix] Fix small table check limit

Fixes #issue

[FE PR Coverage Check]
:heart_eyes: pass : 1 / 1 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/statistic/StatisticsCollectJobFactory.java
1
1
100.00%
[]

@Mergifyio backport branch-3.0

@Mergifyio backport branch-2.5

https://github.com/Mergifyio backport branch-2.4


create the python notebook for assignment 1 and successfully get our fork running on it

the main deliverable for this project is the rewritten assignment
this issue will involve

creating the jupyter notebook within our fork
getting our version of NetML running on it successfully

this means being able to open up a small pcap, turn it into a dataframe, and see the DNS column

this once this basic functionality has finished, we can actually write the assignment 1 code in there with issue #5

Got it running, able to print out dns_transaction_id column


Profiler agent should extract service name from K_SERVICE env var

K_SERVICE is the env var where the Knative service name is stored. Profiler should use it instead of producing an error that the service has not been specified.
Today, I see "@google-cloud/profiler Error: Service must be specified in the configuration"

OOps, this is a dupe of https://github.com/googleapis/cloud-profiler-nodejs/issues/308


databricks.sql.connect hangs in a long retrying loop when an invalid access token is used

Steps to reproduce
Supply any invalid access token to databricks.sql.connect, e.g.
sql.connect(
     server_hostname=my_workspace_url,
     http_path=http_path_to_my_warehouse,
     access_token="this-is-not-a-valid-access-token"
)

Current behavior
The call gets stuck in a long retrying loop, eventually failing with a RequestError, which does not indicate an authentication error.
Expected behavior
The function immediately raises an exception indicating an authentication error.

Related
https://github.com/databricks/databricks-sql-python/issues/346#issuecomment-1967984742

The fix for this has merged.


add docs view filetype

As you can see, I have added file types for docs-view.
This will be more friendly to some plugins, such as: nvim-colorizer.lua
When there is no file type, no color is displayed:

With the file type:

LGTM. Thank you.


python38Packages.azure-mgmt-iothubprovisioningservices: 0.2.0 -> 0.3.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python38Packages.azure-mgmt-iothubprovisioningservices is: "This is the Microsoft Azure IoTHub Provisioning Services Client Library"
meta.homepage for python38Packages.azure-mgmt-iothubprovisioningservices is: "https://github.com/Azure/azure-sdk-for-python"
meta.changelog for python38Packages.azure-mgmt-iothubprovisioningservices is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 0.3.0 with grep in /nix/store/3fpllracvdxh73mf2l7s38fanf4qbv2i-python3.8-azure-mgmt-iothubprovisioningservices-0.3.0

found 0.3.0 in filename of file in /nix/store/3fpllracvdxh73mf2l7s38fanf4qbv2i-python3.8-azure-mgmt-iothubprovisioningservices-0.3.0

directory tree listing: https://gist.github.com/581553e4ddd4fd13d5a1b7f39308ecc0

du listing: https://gist.github.com/918713219c8182aa3665c19cf8defef1

Rebuild report (if merged into master) (click to expand)

12 total rebuild path(s)

3 package rebuild(s)

3 x86_64-linux rebuild(s)
3 i686-linux rebuild(s)
3 x86_64-darwin rebuild(s)
3 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
azure-cli
python38Packages.azure-mgmt-iothubprovisioningservices
python39Packages.azure-mgmt-iothubprovisioningservices

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/3fpllracvdxh73mf2l7s38fanf4qbv2i-python3.8-azure-mgmt-iothubprovisioningservices-0.3.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python38Packages.azure-mgmt-iothubprovisioningservices https://github.com/r-ryantm/nixpkgs/archive/f8eead5cdb87cd33a1af2494c22c855a3e0f246b.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/3fpllracvdxh73mf2l7s38fanf4qbv2i-python3.8-azure-mgmt-iothubprovisioningservices-0.3.0
ls -la /nix/store/3fpllracvdxh73mf2l7s38fanf4qbv2i-python3.8-azure-mgmt-iothubprovisioningservices-0.3.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
nixpkgs-review took longer than 45m and timed out

Maintainer pings
cc @jonringer @mwilsoncoding for testing.

Result of nixpkgs-review pr 134600 at f8eead5c run on x86_64-linux 1

1 package failed to build:

azure-cli

2 packages built successfully:

python38Packages.azure-mgmt-iothubprovisioningservices
python39Packages.azure-mgmt-iothubprovisioningservices

3 suggestions:

warning: unused-argument
Unused argument: python.
Near pkgs/development/python-modules/azure-mgmt-iothubprovisioningservices/default.nix:4:3:
  |
4 | , python
  |   ^

warning: unused-argument
Unused argument: isPy3k.
Near pkgs/development/python-modules/azure-mgmt-iothubprovisioningservices/default.nix:5:3:
  |
5 | , isPy3k
  |   ^

warning: python-include-tests
Consider adding a checkPhase for tests, or if not feasible, pythonImportsCheck.
Near pkgs/development/python-modules/azure-mgmt-iothubprovisioningservices/default.nix:35:0:
   |
35 |     description = "This is the Microsoft Azure IoTHub Provisioning Services Client Library";
   | ^

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.


Need to use the same case for this constant

On line 46 it is in all caps.

Included in https://github.com/trilitech/tezos-developer-docs/pull/312.


Use pyogrio for GeoDataFrame I/O

Gives a significant increase in performance, especially for writing: 5x faster.
For larger files this can give significant gains: eg. for a 400 MB gpkg this is a difference of more than a minute.

pyogrio doesn't support writing None geometries yet: geopandas/pyogrio#59

pyogrio doesnt't support writing timestamp columns yet: geopandas/pyogrio#58
This isn't really blocking, a workaround is already made in #65

pyogrio doesnt't support writing np.NAN values in eg. str columns: https://github.com/geopandas/pyogrio/issues/60
At the moment I this doesn't gives issues anymore in standard geofileops operations.


chore: delete garbage

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


ci: add precision to bundle size diff PR comment

Otherwise fake .00% appeared there due to precision loss

Current dependencies on/for this PR:

main

PR #151   👈

This stack of pull requests is managed by Graphite.


Update addtask command and UG&DG

Coverage decreased (-0.02%) to 85.819% when pulling 8630d21e28ac076080425506ee440fc727268bb2 on zhangshuoyang:theme_selection into 292f62b1fd1905a4b9f5f1f37342e31728b087d5 on CS2103AUG2017-W11-B1:master.


takport and ngogj

We finished all the questions and code.

I think this PR should be deleted, it doesn't appear to have any of your own work.


PHPDoc of Slim\Http\Request::getParams it's wrong

Hello, In my project we use PHPStan for the static analysis, and throw me an error from the method getParams from \Slim\Http\Request because say the method can return null or array.
But i reviewd the two returns of the method and in both only return an array, that are or $onlyParams or $params, is the PHPDoc returnwrong?

getParams from \Slim\Http\Request

In the latest version of slim/http the signature of ServerRequest::getParams looks like this:
/**
 * Fetch associative array of body and query string parameters.
 *
 * Note: This method is not part of the PSR-7 standard.
 *
 * @return mixed[]
*/
public function getParams(): array

But I could not find a Request::getParams method in  slim/http.
A Phpstan scan didn't give me any errors.
Do you use Slim 3 or Slim 4?

Sorry, I forgot to put the version we are using. We are in the version 3.11.0 for the moment

That's actually an error. We should fix that, it can only return an array.


Decode last two fields of PerpetualCairoOutput if present

I theory we could now differentiate between PerpetualRollup and Perpetual Validium modes type wise but I don't think that's necessary since we won't be using these new fields anyway


Secondary Spawns Points or Duplicate Spawns

This is a problem that can have two approaches (or more) and I realize that this is probably not consistent with RtL. So, I want to spawn a monster group at the start of the quest, but then add reinforcements as the rounds go on. I could do that manually by picking the monster group in advance and creating two spawns for the same monster group, but let's say that I want to randomize the group, then I'm not sure how I can.
Either we could have an initial spawn, then a secondary spawn point(s) callable by an event, trigger, or test.
Or we could have two (or more) spawns with the second spawn similar to the first spawn group. With more spawn groups or points, the app could randomize where they might appear as well as who should spawn.

The reinforce spawn should have the monster type set to the first spawn event.  I think this does what you want.  If you need to have multiple first spawn events you will also need multiple reinforce events.
Let me know if have have misunderstood.


How can I sync the icons I set up across all platforms?

Thank you for your great plugin.
I use the remote save  plugin to sync between PC and mobile, but I have disabled the plugin sync function, so the contents of the .obsidian folder will not be synced.
I found that the icons I set up are stored in the data.json file in the plugin directory.
So, how can I sync them across all platforms?
Is it possible to set the configuration files to a custom directory?

Thank you for your question. Maybe this answer here helps?


Write tests for raster module

Write tests for methods in matplotcheck/raster.py

this has been done! closing