How to set charging state from a calculated sensor value

I'm trying to show a charging state indicator using a calculated value. I have a mini lora weather station based on a Heltec cubecell dev board, which doesn't provide charging information on it's own. I could try to calculate the charging information on the board by averaging the last n battery voltage measurements, but then I have to get to it and reprogram it.
So I tried to do the calculation in home assistant. For this purpose I'm using a derivative sensor. The sensor itself works. It shows values above zero when the battery is charging from the solar panel and zero or below when it's is going down over night.

Don't know what caused the peak at 5am...
YAML configuration
entities:
  - entity: sensor.outdoor_01_battery_level
    name: Wetterstation
    charging_state:
      entity_id: sensor.outdoor_01_derivative
      value: 0
      operator: '>'
title: Batteriestatus
type: custom:battery-state-card

My expectation was that I can compare the sensor.outdoor_01_derivative to a value directly, but this doesn't seem to work as expected. No matter if I set the operator to < or >, the charging indicator is always shown as in the screenshots below.

Is there an error in the configuration?
Is the delta (in the range of -0.01V..+0.01V per hour) too small for the comparison?
Should I make a binary sensor based on the derivative sensor and use this instead?

Screenshot

> comparison

< comparison
Version
V2.1.1

Hey! There is no such a thing like operator for charging_state. Please look at documentation: https://github.com/maxwroc/battery-state-card#charging-state-object
To solve your problem you need to create a separate template (binary) sensor, where you will have your condition, and use it in charging_state config.

Thanks, this answer was kind of what I expected.
The following parts from your examples:
  - entity: sensor.samsung
    charging_state: # uses is_charging attribute on sensor.samsung entity
      attribute:
        name: "is_charging"
        value: "yes"

and:
filter:
  include: # filters for auto-adding
    - name: entity_id # entities which id ends with "_battery_level"
      value: "*_battery_level"
    - name: attributes.device_class # and entities which device_class attribute equals "battery"
      value: battery
  exclude: # filters for removing
    - name: state # exclude entities above 99% of battery level
      value: 99
      operator: ">"

made me hope that I could also compare a sensor value this way.

Would you consider this worth a feature request or do you think a separate binary sensor is good enough?

It depends how common are such cases and how many users would be interested in such functionality.
There is always a problem of balance between reach functionality and code complexity. If you add new functionality the card is more useful (or easier to setup) but in the same time due to more code there is a higher chance of a bug (any other additional change can introduce a bug too) and all users pay the penality in terms of the card code size which keeps increasing (although IMO it is not very important for HA).

OK, solved it with a combination of derivative/threshold sensor. Just for posterity if anyone comes across this problem too:
In sensors.yaml I defined a derivative sensor that monitors the incoming battery voltages over the past hour. Rounded to three digits in my case, because the changes are very small:
- platform: derivative
  name: "Outdoor 01 Derivative"
  source: sensor.outdoor_01_battery
  round: 3
  unit_time: h
  time_window: "01:00:00"

In binary_sensors.yaml I defined a threshold sensor that returns on when the derivative is above zero (which means the voltage is rising).
- platform: threshold
  name: "Outdoor 01 Charging"
  entity_id: sensor.outdoor_01_derivative
  upper: 0

The card configuration:
entities:
  - entity: sensor.outdoor_01_battery_level
    name: Wetterstation
    charging_state:
      entity_id: binary_sensor.outdoor_01_charging
      state: 'on'
title: Batteriestatus
type: custom:battery-state-card

returns the expected result:

So really no need to add it to battery state card once you get your head around it.
Thanks again!


Register app as a way to share images

This pr address #133 .
For now, I have added the functionality to share images, I will now work on sharing any type of files.
After sharing an image, the ZulipActivity starts and a spinner is shown during the upload. After uploading, the link of the image on server is added to the messageEt textView of composeBox.
During upload

After upload is finished

Automated message from Dropbox CLA bot
@Sam1301, it looks like you've already signed the Dropbox CLA. Thanks!

@niftynei Thanks so much for the rigorous code review, learnt a lot from it :)

For android 6.0 and higher, I have requested read extenal permission at run time.

I noticed that we have been using an extra forward slash in RecyclerMessageAdapter.setUpGravatar() too. The problem traces back to UrlHelper.addHost() which should return host url without an appended '/' in the end. Since this change was in the existing codebase, I made a different commit for it :)

Hey @Sam1301 thanks for the fixes. This is looking really good. I found one large issue that I'm not sure is a blocker, but I'd like to get your opinion on before merging this in.
Basically the problem is that if the app is open and in the background but the activity hasn't been destroyed yet, sharing to Zulip fails.  The reason for this is that the code to kick off a share intent is in onCreate, since the activity was never destroyed (just Stopped), then it's never created again.
I added some logging to onCreate, onStart & onResume so you can see this happen in the logs:
Here's a share where the activity has been destroyed:
10-19 15:25:49.026 11146 11146 I status  : suspend
10-19 15:25:55.162 11146 11146 I status  : create
10-19 15:25:55.441 11146 11146 I status  : onStart
10-19 15:25:55.441 11146 11146 I status  : Intent { act=android.intent.action.SEND typ=image/jpeg flg=0x10000001 cmp=com.zulip.android.dev/com.zulip.android.activities.ZulipActivity clip={image/jpeg U:content://com.google.android.apps.photos.contentprovider/0/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F204876/REQUIRE_ORIGINAL/NONE/551220734} (has extras) }
10-19 15:25:55.446 11146 11146 I status  : resume
10-19 15:25:55.446 11146 11146 I status  : android.intent.action.SEND

And here's a share where the activity has been backgrounded, but not completely destroyed yet.  Note that create wasn't called.  In this case, the logic to upload the shared file isn't triggered.
10-19 15:27:01.560 11146 11146 I status  : suspend
10-19 15:27:17.736 11146 11146 I status  : onStart
10-19 15:27:17.737 11146 11146 I status  : Intent { act=android.intent.action.SEND typ=image/jpeg flg=0x10000001 cmp=com.zulip.android.dev/com.zulip.android.activities.ZulipActivity clip={image/jpeg U:content://com.google.android.apps.photos.contentprovider/0/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F204876/REQUIRE_ORIGINAL/NONE/551220734} (has extras) }
10-19 15:27:17.743 11146 11146 I status  : resume
10-19 15:27:17.743 11146 11146 I status  : android.intent.action.SEND

I think there's a few ways to fix this, the best suggestion being to use onNewIntent, which gets called when a new Intent is sent to the Activity.  Here's a log of onNewIntent being called even when onCreate isn't:
10-19 15:43:52.519 14476 14476 I status  : suspend
10-19 15:44:05.646 14476 14476 I status  : onNewIntent
10-19 15:44:05.728 14476 14476 I status  : onStart
10-19 15:44:05.729 14476 14476 I status  : Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.zulip.android.dev/com.zulip.android.activities.ZulipActivity bnds=[13,811][224,1053] (has extras) }
10-19 15:44:05.738 14476 14476 I status  : onResume

Thanks, I didn't think about this test case, will make necessary changes to the pr :+1:

Made the suggested changes, now the user can upload images even when the activity hasn't been destroyed.

Thanks! This has been merged.

Should I try to extend this functionality to all types of files or will it be better to share all types of files using attachment uploads?

Extending it to all file types sounds good to me, but there's a lot to this.  The one thing I think it's really missing right now is being able to share text from other apps as well.

I agree, I would love to give it a try 👍


Small changes for Fleur interface

I had some stuff lying around and since I need to define a variable as mentioned by @atztogo, it is a good point to merge again.
Changes:

I was a bit overzealous in saying Fleur can do DFPT phonons. We are still on that.
N defined properly at @atztogo 's request
'factor' and 'shift' features from the Fleur input generator can now be used
0.0 scales in the inpgen can be properly used 1.0s

Best, Alexander Neukirchen

Thanks, @neukirchen-212. I think N=1 in your change of calculator.py (additional_info does not exist in the scope), and I did so. I merged your PR to the refactoring branch currently I am working on, which will be merged to the develop branch.


Update estimator.py

Replace summary_io.SummaryWriterCache for tf.summary.FileWriterCache

Can one of the admins verify this patch?

@tensorflow-jenkins test this please

@tensorflow-jenkins test this please


10.2.0 minor fixes

Despite this branch's name, all that is in this PR is a memory leak fix, a small graph ql utils optimisation, and masking capability attributes from the frontend on login.

This also removes the attribute object sending out to the frontend inside Question, since the frontend already only makes use of the attributeCode, so the Attribute object inside question bloats the json unnecessarily


responsive to main

Proper responsive of login, topics and questions page
Made card's size Symmetric
Styled cards of topic and questions page
Removed duplicate aos divs from problems page
Added back to top button on topics page and questions page

Checked everything, great work! I will however, change the cards symmetry once again.


In the example _label widget do not set an 'id' attribute for the label element.

Because the 'id' attribute was set for the label, the input element,
and the label use the same id. The new behavior is consistent with how
BoundField.label_tag works in Django.
Also see:

https://docs.djangoproject.com/en/2.0/ref/forms/api/#django.forms.BoundField.id_for_label
https://github.com/django/django/blob/master/django/forms/boundfield.py#L129

Thanks for that!


How can i invoke promise within an event

feature request?
Need to invoke a promise for a particular event
Description:
E.g.
...
loading: {
        on: {
          RESOLVE: {
            invoke: {
              src: somePromise,
              onDone: 'success'
            }
          },
          REJECT: 'failure'
        },
      },
...

Here is https://xstate.js.org/viz/?gist=7ce411c7e7bccf6df1474ce2b52bf968
I am aware of actions, but those are fire-n-forget, i wud like to have the promise resolved and then it moves to target state. So in above e,g, After firing RESOLVE event, I expect the machine to fire my invoke promise and after it resolves it shud move to targeted state.

U have to split this into two states - make idle state which listens to RESOLVE, on RESOLVE move to loading which has invoke definition in it (directly on the loading state)

Thanks for quick response!


[$250] Android - When you navigate back using the back arrow the keyboard takes time to close @thesahindia

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to settings > Profile
Tap on any field so that your keyboard gets open
Press back arrow ( top left )

Expected Result:
Keyboard should close instantly
Actual Result:
Keyboard takes a while to close
Workaround:
Unknown
Platform:

Where is this issue occurring?

Android

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): any
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/93399543/163720856-dec5d2c9-b20b-46a4-86ae-8a9d2bfb61e5.mp4
Expensify/Expensify Issue URL:
Issue reported by: @thesahindia
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1647380047867809
View all open jobs on GitHub

Set as monthly since it doesn't break the app or affect users too much.
Tested here and this only happens in Android

Upwork post here

Hello there
I understood the issue you described and recorded a video.
this will work exactly you are looking:
InputMethodManager imm = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
if(imm != null){
imm.toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY);
}
It will hide the keyboard before the user moves to the back screen.

Proposal
Add a condition inside the onPress back arrow button to check if the virtual keyboard is opening then hide it before landing back in previous screen at HeaderWithCloseButton.js (src/components/HeaderWithCloseButton.js)
By re-use isOpen common function that defined in virtualKeyboard (src/libs/virtualKeyboard/index.js).
Note: Perhaps it isn't necessary to check by Platform = Android
...
{props.shouldShowBackButton && (
    <Tooltip text={props.translate('common.back')}>
        <TouchableOpacity
            onPress={() => {
                if(virtualKeyboard.isOpen()) {
                    Keyboard.dismiss();
                }
                props.onBackButtonPress();
            }}
            style={[styles.touchableButtonImage]}
        >
            <Icon src={Expensicons.BackArrow} />
        </TouchableOpacity>
    </Tooltip>
)}
...

Demo
https://user-images.githubusercontent.com/5449119/166426040-90c7c357-15e6-45ca-9539-a435c1801f02.mp4

@phivh @Santhosh-Sellavel Thanks for the proposal and review. Looks good to me 👍
@bfitzexpensify can we please assign @phivh to this job

Sure! @phivh please apply for the job on Upwork and let me know when you have done so.

Sure! @phivh please apply for the job on Upwork and let me know when you have done so.

@bfitzexpensify applied for Upwork job.

@bfitzexpensify It's time for payment!

Hey @phivh and @thesahindia - I tried to pay out your contracts but got a timeout error on Upwork. Can you confirm if you received payment? This happened last week and the payment went through, but would be good to either/both of you to confirm!

Hi @bfitzexpensify I still didn't get the payment.

Thanks for confirming — we're working with our Upwork account manager to get this sorted, as soon as they can let me know what's going on I'll process the payment. Thanks for your understanding!

Wait @bfitzexpensify , there are something, let me check again. Hm seems Upwork has issue.

So does it look like it worked @phivh?

@bfitzexpensify it seems double charged. There are two pending transactions

OK, thanks for letting me know. We're chatting to Upwork support to get this figured out, and I'll let you know here once that's complete.

@bfitzexpensify, I have received the payment correctly

Thanks for letting me know!

OK, it looks like we've figured out things with Upwork.
@Santhosh-Sellavel - I've paid one and cancelled the other, please confirm all is correct from your end
@phivh - have you received payout for both? We've been advised by Upwork to request a refund on one, so I'll do that shortly
@thesahindia - you were the lucky one who received payment correctly, so I think you're all good
Sorry for the mess here! The root issue I had with managing issues seems to have been fixed now.

yes @bfitzexpensify both transactions still there.

I think @phivh you can initiate a refund from the contract.

I believe I sent a request for a refund of one transaction @phivh - thanks!

Great, thanks @phivh! OK, finally all squared away here I believe.


My lower version of gorm

My gorm version is:
github.com/jinzhu/gorm v1.9.16
I want to introduce DB resolver into our project to achieve a read/write split and so on.
But I found the DB resolver can't match the using gorm version.
Can u give me some advice?

need to upgrade it to gorm.io/gorm https://gorm.io/docs/v2_release_note.html

The API is not backward compatible completely, we try to upgrade gorm some times ago and rollback.
Try to edit this repo source code is a better choice. @jinzhu


Add security plugin

Description

adds security plugin
moves errors to opensearch package
add more error types and parse them by type assertion

The changes made to error are more or less braking changes as they get moved to another package.
Normal use should still work but for uses who try to parse the error with errors.As it is braking.
Issues Resolved
Closes #94
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

:partying_face: CI is green. I am going to split all the unrelated stuff into separate PRs.

Nice. Did you roll this code out by hand?

Yes, as the API spec is IMO not in a great state because of issue like this and my focus is on adding the missing plugins I need. As I have no experience with code generation it would take way more time to add the plugins and iron out all the issues the api spec has.
I am also working on the ISM plugins but the API spec is totally missing and I am trying to get what I need from the Docs but this is also a lot of pain.

@Jakob3xD we have done a lot of work in https://github.com/opensearch-project/opensearch-api-specification, moving it to OpenAPI, adding bodies, and generally are going to push on teams such as ISM to add specs. You can get a lot of mileage "for free" there. Remember that we have 8 clients, so in order to keep up with API changes we have to automate.

@Jakob3xD rebase?


Support the AWS_PROFILE environment variable

The aws cli tool allows one to specify what profile from ~/.aws/credentials to use by using AWS_PROFILE=name-of-profile, rather than having to pass explicit access key IDs. It would be great if awsinfo (via whalebrew) supported the same.

As a work around, I'm using AWS_DEFAULT_PROFILE :)

@io41 thanks for reporting, fixed and released.

@flomotlik wow, that was fast. I've tried the lastest (see below) just now, but it doesn't appear to be working...
latest: Pulling from flomotlik/awsinfo
Digest: sha256:7cd9f140e55b7f69d29dc795e32c5cb0d32782c748bc933f1c0e8580b24e4fed
Status: Image is up to date for flomotlik/awsinfo:latest
[tim:~] $
$ AWS_PROFILE=dev awsinfo route53
Unable to locate credentials. You can configure credentials by running "aws configure".
[tim:~] $
$ AWS_DEFAULT_PROFILE=dev awsinfo route53
-------------------------------------------------------------------------------------
|                                  ListHostedZones                                  |
+-----------------------+------------------------------+------------+---------------+
|        1.Name         |            2.Id              | 3.Private  | 4.RecordSets  |
+-----------------------+------------------------------+------------+---------------+
...```

You have to reinstall with whalebrew otherwise the new environment variable
doesn't get picked up. Reinstall with force option.
best,
Flo
Am 20. Oktober 2017 um 19:39:05, Tim Kersten<EMAIL_ADDRESS>schrieb:

@flomotlik https://github.com/flomotlik wow, that was fast. I've tried
the lastest (see below) just now, but it doesn't appear to be working...
latest: Pulling from flomotlik/awsinfo
Digest: sha256:7cd9f140e55b7f69d29dc795e32c5cb0d32782c748bc933f1c0e8580b24e4fed
Status: Image is up to date for flomotlik/awsinfo:latest
[tim:~] $
$ AWS_PROFILE=dev awsinfo route53
Unable to locate credentials. You can configure credentials by running "aws configure".
[tim:~] $
$ AWS_DEFAULT_PROFILE=dev awsinfo route53
|                                  ListHostedZones                                  |
+-----------------------+------------------------------+------------+---------------+
|        1.Name         |            2.Id              | 3.Private  | 4.RecordSets  |
+-----------------------+------------------------------+------------+---------------+
...```
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flomotlik/awsinfo/issues/30#issuecomment-338274454,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIGLd3C2UIlGo4H_I11ECuCZVLmUEaSks5suNq4gaJpZM4QAy11
.

Awesome, thank you


Implement run_example.sh to build-and-test simple_app_under_oe sample program.

To be filled out ... This commit brings-in simple_app_under_oe/run_example.sh to implement the build-instructions steps.

This work has been squashed, productized and re-implemented off of /main. Change set has been submitted for review under PR #70 .
No further work is needed on this PR, so am closing it out.


Check for previous/existing GitHub issues/module proposals

[X] I have checked for previous/existing GitHub issues/module proposals.

Check this module doesn't already exist in the module indexes

[X] I have checked for that this module doesn't already exist in the module indexes; or I'm proposing the module to be migrated from CARML/TFVM.

Bicep or Terraform?
Terraform
Module Classification?
Resource Module
Module Name
avm/res/document-db/database-account
Module Details
This is for the Azure CosmosDB resource. the Terraform equivalent of #366
Do you want to be the owner of this module?
Yes
Module Owner's GitHub Username (handle)
No response
(Optional) Secondary Module Owner's GitHub Username (handle)
No response

Duplicated of #336


Allow multiple extension request

Previously, the API did not allow the creation of more than one request at a time. To address this limitation, modifications were made under the 'dev' flag. A new function, fetchLatestExtensionRequest, was introduced. When triggered, this function retrieves the latest extension request and checks its status. If the status is either 'Approved' or 'Denied,' it allows users to create another extension request.
Additionally, a new field, requestNumber, was introduced. This field increments each time a user submits a new request. This increment is reflected both on the user's end within my site and on the dashboard site for super users.
Here is the demo video of it:
ExtensionRequest.webm
Here is the workflow of it :

Here are the changes done in each site to achieve that:

Test cases result :

convert all date into UTC while saving to database

Hi @iamitprakash Thank you for raising this concern. I understand that there's an issue with the storage of dates .If I just convert extension dates to UTC, it might cause problems with the "taskEndsOn" field and discrepancies on other pages.

Good work @MayurLund and Thank you for video and test cases
Thanks @shubhamsigdar1!

convert all date into UTC while saving to database
Hi @iamitprakash its converting into UTC only. I verified it.

NIT: Please break controller in small code, and move that to service or utils


fix(deps): sigstore revert from v1.9 to v1.8

fixes issues #2873 through #2912 (e2e test failures)
Sigstore v1.9 introduces errors on retrieving the token as if the workflow is not seen as GHA but as a browser.
Example workflow using 1.9: https://github.com/enteraga6/bazel_docker_test/actions/runs/6631189448
It fails on slsa-setup with "error retrieving identity token"
Example workflow using 1.8: https://github.com/enteraga6/bazel_docker_test/actions/runs/6631199842
Token generation and retrieval completes successfully.
What causes the issue is currently unknown, but I think that it is a change heading towards the major version bump which will require refactoring of which packages are used to get the token. See here: https://github.com/sigstore/sigstore-js/releases/tag/sigstore%402.0.0, especially bullet pt 3 which conflicts with current signing attestation action.
This PR reverts Sigstore dependencies to 1.8 to allow the workflows to properly run and not fail on setup.

@enteraga6 Can you maybe create an issue on the sigstore-js repo with this info? I think that this backwards compatibility breakage might be unintentional?
At least we'll be able to get more clarification.

@ianlewis Certainly! Tracking the issue here: https://github.com/sigstore/sigstore-js/issues/833


Allow format timeouts to be set individually

Feature description
Currently, the timeout for format on save is set to a uniform 1000 ms. (code)
Some formatters require more than 1000 ms to complete, causing a timeout error.
Can this be modified so that it can be set per formatter or inherits the timeout setting for none-ls?
Additional information
No response

We can make it a configurable option which applies for all formatter. IMO no need to use none-ls to configure it b/c it's lsp that is used instead of the formatter from none-ls for some language.

#1275


Multiple file matching with wildcard

Is the can example if I have multiple file names to match?  I have couple of NuGet packages to download but I want to provide wildcard for the version number.
If my build artifact is like
CommonLibrary
File<IP_ADDRESS>.nupkg
File<IP_ADDRESS>.npkg
I tried using
CommonLibrary/(File1|File2)*.nupkg
This did not match any file even though the build contained both the files in the build artifacts
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: b913056a-d919-94b4-15a9-305ca835ac9b
Version Independent ID: 000c1ff3-85a6-1134-ead4-1d2628a32375
Content: File matching patterns reference - Azure Pipelines
Content Source: docs/pipelines/tasks/file-matching-patterns.md
Service: azure-devops-pipelines
Sub-service: azure-devops-pipelines-tasks
GitHub Login: @steved0x
Microsoft Alias: sdanie

@srikcgaa2 -- thank you for your feedback.  Please consider these resources:

Azure DevOps Services
Azure DevOps on Stack Overflow

@steved0x -- please look into the documentation aspects of this issue.

Thanks for your feedback. We've moved this issue to our internal tracking system as we transition to a new feedback system.


Better locking for Windows logging

Description
When adding text to the logging stream buffer, a mutex is needed. But as both Windows threads, as well as FreeRTOS tasks may send logging, using the W32 mutex is not a good option.
The current method will increase the thread priority to TIME_CRITICAL. @RichardBarry commented that setting the thread priority might not become effective immediately.
I tested this, and indeed the stream buffers get corrupted when there are both FreeRTOS tasks and Windows threads sending frequent logging.
After a lot of testing, I found that the "interlocked" functions work best:
void vBitOpsAcquire( LONG volatile *plValue )
{
    /* Return the value of bit-0 before setting it, as an atomic operation. */
    while( _interlockedbittestandset( plValue, 0U ) == 1 )
    {
        /* It would be good to yield here, but that would not
         * work for a Windows thread. */
    }
}

void vBitOpsRelease( LONG volatile *plValue )
{
    /* Return the value of bit-0 before clearing it, as an atomic operation. */
    BOOLEAN rc = _interlockedbittestandreset( plValue, 0U );

    /* If the bit was not set, this is a fatal error. */
    configASSERT( rc != 0 );
}

I tested this locking with 2 FreeRTOS tasks which have a IDLE priority. Also I had a Windows thread sending constant logging.
Checklist:

[x] I have tested my changes. No regression in existing tests.
[x] My code is Linted.

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

There is something strange: I recently submitted PR #3006, which was merged, but the same changes appear in this PR, as though the merge was not successful.

As the project "ecc608a_plus_winsim" has a copy of "aws_demo_logging.c", I updated that as well. See
vendors/microchip/boards/ecc608a_plus_winsim/aws_demos\application_code
I tested the changes again, using 4 FreeRTOS tasks and 4 Windows thread. They all produce a continuous stream of logging:
    22064 4219 [xxx] Task   0: 1004
    22065 4219 [xxx] Thread 0: 4509
    22066 4219 [xxx] Thread 1: 4485
    22067 4219 [xxx] Task   0: 1005
    22068 4219 [xxx] Thread 1: 4486
    22069 4219 [xxx] Task   0: 1006
    22070 4219 [xxx] Task   0: 1007
    22071 4219 [xxx] Thread 3: 4480
    22072 4219 [xxx] Thread 1: 4487
    22073 4219 [xxx] Thread 1: 4488
    22074 4219 [xxx] Thread 2: 4529
    22075 4219 [xxx] Task   0: 1008
    22076 4220 [xxx] Task   1: 1003
    22077 4220 [xxx] Thread 0: 4510

The threads get more attention than the tasks because they can run on any core, whereas FreeRTOS tasks have an affinity mask of 0x01.
When I removed the locking mechanism, the stream buffer would get corrupted.
Also, when I restored the old locking by raising thread priority, corruption would occur.
In prvLoggingFlushBuffer(), I added a few asserts that check if the stream buffer is corrupted. It is nicer to see an assert rather than a Windows exception.

/bot run checks

/bot run checks

/bot run checks

"Build Checks" says: Build finished. 132 tests run, 0 skipped, 0 failed.
And yet it gets a  ?

/bot run checks

"Build Checks" says: Build finished. 132 tests run, 0 skipped, 0 failed.
And yet it gets a  ?

Yes, that means that some tests did not run. It is a known issue and we are actively working on fixing it.
Apologies for the trouble. For now, we shall re-trigger the checks and track them.

/bot run checks

/bot run checks

/bot run checks


Http2.0 protocol and m3u8 format address cannot be played

Use version：video_player: ^0.10.9+1
Computer version：macOS  10.15.2
Network protocol：http2.0

 Video address: https://<IP_ADDRESS>:8443/fs/v1/6570255ceb09709311cb152cdc565e12.m3u8
remarks：This address can play normally on safari
##------- iOS - log --------
No error message, unable to play.
##------- Android - log --------
error message :
I/ExoPlayerImpl(13743): Init 77aceec [ExoPlayerLib/2.9.6] [generic_x86_arm, AOSP on IA Emulator, Google, 28]
E/ExoPlayerImplInternal(13743): Source error.
E/ExoPlayerImplInternal(13743): com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: Unable to connect to https://<IP_ADDRESS>:8443/fs/v1/6570255ceb09709311cb152cdc565e12.m3u8
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:281)
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:83)
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:102)
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.DataSourceInputStream.open(DataSourceInputStream.java:65)
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:156)
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381)
E/ExoPlayerImplInternal(13743): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/ExoPlayerImplInternal(13743): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/ExoPlayerImplInternal(13743): 	at java.lang.Thread.run(Thread.java:764)
E/ExoPlayerImplInternal(13743): Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:229)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:192)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:149)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
E/ExoPlayerImplInternal(13743): 	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:26)
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:528)
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:444)
E/ExoPlayerImplInternal(13743): 	at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:279)
E/ExoPlayerImplInternal(13743): 	... 8 more
E/ExoPlayerImplInternal(13743): Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:661)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:539)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:495)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:418)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:339)
E/ExoPlayerImplInternal(13743): 	at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
E/ExoPlayerImplInternal(13743): 	at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:88)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:208)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(ConscryptFileDescriptorSocket.java:404)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:375)
E/ExoPlayerImplInternal(13743): 	at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:224)
E/ExoPlayerImplInternal(13743): 	... 23 more
E/ExoPlayerImplInternal(13743): Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
E/ExoPlayerImplInternal(13743): 	... 35 more
E/flutter (13743): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: Unable to connect to https://<IP_ADDRESS>:8443/fs/v1/6570255ceb09709311cb152cdc565e12.m3u8, null)
E/flutter (13743): #0      ChewieController._initialize (package:chewie/src/chewie_player.dart:291:7)
E/flutter (13743): <asynchronous suspension>
E/flutter (13743): #1      new ChewieController (package:chewie/src/chewie_player.dart:197:5)
E/flutter (13743): #2      _PlayerControllerState._initChewieView (package:netschool/models/home/controller/player_controller.dart:63:29)
E/flutter (13743): <asynchronous suspension>
E/flutter (13743): #3      _PlayerControllerState._curriculumList.<anonymous closure> (package:netschool/models/home/controller/player_controller.dart:350:11)
E/flutter (13743): #4      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:705:14)
E/flutter (13743): #5      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:788:36)
E/flutter (13743): #6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
E/flutter (13743): #7      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
E/flutter (13743): #8      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
E/flutter (13743): #9      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
E/flutter (13743): #10     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter (13743): #11     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
E/flutter (13743): #12     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
E/flutter (13743): #13     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter (13743): #14     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter (13743): #15     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter (13743): #16     _rootRunUnary (dart:async/zone.dart:1138:13)
E/flutter (13743): #17     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
E/flutter (13743): #18     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
E/flutter (13743): #19     _invoke1 (dart:ui/hooks.dart:273:10)
E/flutter (13743): #20     _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5)
E/flutter (13743):

Hi @LHWen
I see there's an open issue addressing the case you described.
Please follow up on that issue,
I'm closing the current one as duplicate.
If you disagree please write in the comments
and I will reopen it.
Thank you

I don't know how to solve this problem，hope to get a solution.
https://rtmp.api.rt.com/hls/rtdru.m3u8 and http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8 is feasible.
I used it (https://<IP_ADDRESS>:8443/fs/v1/6570255ceb09709311cb152cdc565e12.m3u8)  is not feasible. I don't know how to set it.

Hi @LHWen
I see there's an open issue addressing the case you described.
Please follow up on that issue,
I'm closing the current one as duplicate.
If you disagree please write in the comments
and I will reopen it.
Thank you

I don't know how to solve this problem，hope to get a solution.
https://rtmp.api.rt.com/hls/rtdru.m3u8 and http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8 is feasible.
I used it (https://<IP_ADDRESS>:8443/fs/v1/6570255ceb09709311cb152cdc565e12.m3u8) is not feasible. I don't know how to set it.


Please add a license file too

@hypeartist ,
please add a license file too
:)

I'd like to second this request. Without a license, it is impossible to reuse your library :( Please add a license so possible users know how to give credit to you and what usage is legal :)

@prepare @sschoener Will ZLib suit you? (I am a total nube in all that licensing stuff)

zlib, BSD, and MIT licenses are on the very permissive end of the spectrum; I would generally recommend them :) You cannot really do anything wrong with those -- they basically all say that you are not to blame for any problems caused by your code and your code can be used by whoever in whatever way they please as long as they a) point out if they changed your code and b) give credit to you as the original author. I usually simply slap an MIT license on everything I publish, but zlib is great, too! :)

@sschoener Thanx for info! Added a MIT license file (didn't find ZLib in templates). Please check if it's ok.

Thank you
:)


enclave-tls: fix build warnings

verify_evidence.c: In function 'sgx_ecdsa_verify_evidence':
verify_evidence.c:70:34: warning: passing argument 1 of 'sgx_qv_verify_quote' from incompatible pointer type [-Wincompatible-pointer-types]
   70 |   dcap_ret = sgx_qv_verify_quote(pquote, quote_size,
      |                                  ^~~~~~
      |                                  |
      |                                  sgx_quote3_t * {aka struct _sgx_quote3_t *}
In file included from verify_evidence.c:8:
/usr/include/sgx_dcap_quoteverify.h:107:20: note: expected 'const uint8_t *' {aka 'const unsigned char *'} but argument is of type 'sgx_quote3_t *' {aka 'struct _sgx_quote3_t *'}
  107 |     const uint8_t *p_quote,
      |     ~~~~~~~~~~~~~~~^~~~~~~

cc -c -std=gnu11 -fPIC -ggdb -O0 -ggdb -O0 -ggdb -O0 -I/root/inclavare-containers/enclave-tls/samples/sgx-stub-enclave -I/root/inclavare-containers/enclave-tls/src/include -std=gnu11 -fPIC -ggdb -O0 -ggdb -O0 -ggdb -O0 -I/root/inclavare-containers/enclave-tls/samples/sgx-stub-enclave -m64 -O0 -g -DSGX_ENCLAVE -I/opt/intel/sgxsdk/include -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wcast-qual -Wconversion -Wredundant-decls -I/root/inclavare-containers/enclave-tls/build/include -I/root/inclavare-containers/enclave-tls/src/include -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants -std=gnu11 -fPIC -Wno-attributes -DDEBUG -UNDEBUG -UEDEBUG  -DWOLFSSL_SGX_ATTESTATION -DWOLFSSL_ALWAYS_VERIFY_CB -DKEEP_PEER_CERT -Wno-stringop-truncation -DWOLFSSL_SGX_ATTESTATION -DWOLFSSL_KEY_GEN -DWOLFSSL_CERT_GEN -DWOLFSSL_CERT_EXT -DWOLFSSL_ALWAYS_VERIFY_CB -DKEEP_PEER_CERT -DWOLFSSL_TEST_CERT -DWOLFSSL_SMALL_CERT_VERIFY -std=gnu11 -fPIC -ggdb -O0 -ggdb -O0 -ggdb -O0 -I/root/inclavare-containers/enclave-tls/samples/sgx-stub-enclave  -I/root/inclavare-containers/enclave-tls/build/include -o ocalls.o ocalls.c
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:23:22: warning: redundant redeclaration of 'ias_response_body_oid' [-Wredundant-decls]
   23 | extern const uint8_t ias_response_body_oid[];
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:6:15: note: previous definition of 'ias_response_body_oid' was here
    6 | const uint8_t ias_response_body_oid[] = OID(0x02);
      |               ^~~~~~~~~~~~~~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:24:22: warning: redundant redeclaration of 'ias_root_cert_oid' [-Wredundant-decls]
   24 | extern const uint8_t ias_root_cert_oid[];
      |                      ^~~~~~~~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:7:15: note: previous definition of 'ias_root_cert_oid' was here
    7 | const uint8_t ias_root_cert_oid[] = OID(0x03);
      |               ^~~~~~~~~~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:25:22: warning: redundant redeclaration of 'ias_leaf_cert_oid' [-Wredundant-decls]
   25 | extern const uint8_t ias_leaf_cert_oid[];
      |                      ^~~~~~~~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:8:15: note: previous definition of 'ias_leaf_cert_oid' was here
    8 | const uint8_t ias_leaf_cert_oid[] = OID(0x04);
      |               ^~~~~~~~~~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:26:22: warning: redundant redeclaration of 'ias_report_signature_oid' [-Wredundant-decls]
   26 | extern const uint8_t ias_report_signature_oid[];
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:9:15: note: previous definition of 'ias_report_signature_oid' was here
    9 | const uint8_t ias_report_signature_oid[] = OID(0x05);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:28:22: warning: redundant redeclaration of 'quote_oid' [-Wredundant-decls]
   28 | extern const uint8_t quote_oid[];
      |                      ^~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:11:15: note: previous definition of 'quote_oid' was here
   11 | const uint8_t quote_oid[] = OID(0x06);
      |               ^~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:29:22: warning: redundant redeclaration of 'pck_crt_oid' [-Wredundant-decls]
   29 | extern const uint8_t pck_crt_oid[];
      |                      ^~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:12:15: note: previous definition of 'pck_crt_oid' was here
   12 | const uint8_t pck_crt_oid[] = OID(0x07);
      |               ^~~~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:30:22: warning: redundant redeclaration of 'pck_sign_chain_oid' [-Wredundant-decls]
   30 | extern const uint8_t pck_sign_chain_oid[];
      |                      ^~~~~~~~~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:13:15: note: previous definition of 'pck_sign_chain_oid' was here
   13 | const uint8_t pck_sign_chain_oid[] = OID(0x08);
      |               ^~~~~~~~~~~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:31:22: warning: redundant redeclaration of 'tcb_info_oid' [-Wredundant-decls]
   31 | extern const uint8_t tcb_info_oid[];
      |                      ^~~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:14:15: note: previous definition of 'tcb_info_oid' was here
   14 | const uint8_t tcb_info_oid[] = OID(0x09);
      |               ^~~~~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:32:22: warning: redundant redeclaration of 'tcb_sign_chain_oid' [-Wredundant-decls]
   32 | extern const uint8_t tcb_sign_chain_oid[];
      |                      ^~~~~~~~~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:15:15: note: previous definition of 'tcb_sign_chain_oid' was here
   15 | const uint8_t tcb_sign_chain_oid[] = OID(0x0a);
      |               ^~~~~~~~~~~~~~~~~~
In file included from ../wolfssl/un_negotiate.c:7,
                 from ocalls.c:4:
../wolfssl/wolfssl.h:34:21: warning: redundant redeclaration of 'ias_oid_len' [-Wredundant-decls]
   34 | extern const size_t ias_oid_len;
      |                     ^~~~~~~~~~~
In file included from ocalls.c:3:
../wolfssl/oid.c:21:14: note: previous definition of 'ias_oid_len' was here
   21 | const size_t ias_oid_len = sizeof(ias_response_body_oid);
      |              ^~~~~~~~~~~
In file included from ocalls.c:4:
../wolfssl/un_negotiate.c: In function 'find_oid':
../wolfssl/un_negotiate.c:38:22: warning: passing argument 1 of 'memmem' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   38 |  uint8_t *p = memmem(ext, ext_len, oid, oid_len);
      |                      ^~~
../wolfssl/un_negotiate.c:12:20: note: expected 'void *' but argument is of type 'const unsigned char *'
   12 | void *memmem(void *start, unsigned int s_len, void *find, unsigned int f_len)
      |              ~~~~~~^~~~~
../wolfssl/un_negotiate.c:38:27: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'unsigned int' may change value [-Wconversion]
   38 |  uint8_t *p = memmem(ext, ext_len, oid, oid_len);
      |                           ^~~~~~~
../wolfssl/un_negotiate.c:38:36: warning: passing argument 3 of 'memmem' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   38 |  uint8_t *p = memmem(ext, ext_len, oid, oid_len);
      |                                    ^~~
../wolfssl/un_negotiate.c:12:53: note: expected 'void *' but argument is of type 'const unsigned char *'
   12 | void *memmem(void *start, unsigned int s_len, void *find, unsigned int f_len)
      |                                               ~~~~~~^~~~
../wolfssl/un_negotiate.c:38:41: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'unsigned int' may change value [-Wconversion]
   38 |  uint8_t *p = memmem(ext, ext_len, oid, oid_len);
      |                                         ^~~~~~~
../wolfssl/un_negotiate.c: In function 'extract_x509_extension':
../wolfssl/un_negotiate.c:75:25: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
   75 |  int rc = find_oid(ext, ext_len, oid, oid_len, &ext_data, &ext_data_len);
      |                         ^~~~~~~
../wolfssl/un_negotiate.c: In function 'sha256_rsa_pubkey':
../wolfssl/un_negotiate.c:152:29: warning: conversion to 'word32' {aka 'unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
  152 |  wc_Sha256Update(&sha, buf, pub_rsa_key_der_len);
      |                             ^~~~~~~~~~~~~~~~~~~
ocalls.c: At top level:
ocalls.c:6:15: warning: function declaration isn't a prototype [-Wstrict-prototypes]
    6 | static double current_time()
      |               ^~~~~~~~~~~~
ocalls.c: In function 'current_time':
ocalls.c:10:9: warning: implicit declaration of function 'gettimeofday' [-Wimplicit-function-declaration]
   10 |         gettimeofday(&tv, NULL);
      |         ^~~~~~~~~~~~
ocalls.c:12:9: warning: unsuffixed floating constant [-Wunsuffixed-float-constants]
   12 |         return (double)(1000000 * tv.tv_sec + tv.tv_usec) / 1000000.0;
      |         ^~~~~~
ocalls.c: In function 'ocall_low_res_time':
ocalls.c:39:17: warning: conversion from '__time_t' {aka 'long int'} to 'int' may change value [-Wconversio]
   39 |         *time = tv.tv_sec;
      |                 ^~
ocalls.c: In function 'ocall_recv':
ocalls.c:44:16: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'ssize_t' {aka 'long int'} may change the sign of the result [-Wsign-conversion]
   44 |         return recv(sockfd, buf, len, flags);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ocalls.c: In function 'ocall_send':
ocalls.c:49:16: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'ssize_t' {aka 'long int'} may change the sign of the result [-Wsign-conversion]
   49 |         return send(sockfd, buf, len, flags);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ocalls.c:4:
ocalls.c: In function 'verify_certificate':
../wolfssl/un_negotiate.c:233:26: warning: 'tls_ctx' may be used uninitialized in this function [-Wmaybe-uninitialized]
  233 |  tls_wrapper_err_t err = tls_wrapper_verify_certificate_extension(tls_ctx, &evidence, hash);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ocalls.c: In function 'ocall_low_res_time':
ocalls.c:39:19: warning: 'tv.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
   39 |         *time = tv.tv_sec;
      |                 ~~^~~~~~

cc -std=gnu11 -fPIC -ggdb -O0 -ggdb -O0 -ggdb -O0 -I/root/inclavare-containers/enclave-tls/samples/sgx-stub-enclave -m64 -O0 -g -DSGX_ENCLAVE -I/opt/intel/sgxsdk/include -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wcast-qual -Wconversion -Wredundant-decls -I/root/inclavare-containers/enclave-tls/build/include -I/root/inclavare-containers/enclave-tls/src/include -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants -std=gnu11 -I/opt/intel/sgxsdk/include/tlibc -I/opt/intel/sgxsdk/include/libcxx -nostdinc -ffreestanding -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector  -std=gnu11 -fPIC -ggdb -O0 -ggdb -O0 -ggdb -O0 -I/root/inclavare-containers/enclave-tls/samples/sgx-stub-enclave -m64 -O0 -g -DSGX_ENCLAVE -I/opt/intel/sgxsdk/include -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wcast-qual -Wconversion -Wredundant-decls -I/root/inclavare-containers/enclave-tls/build/include -I/root/inclavare-containers/enclave-tls/src/include -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants -std=gnu11 -fPIC -Wno-attributes -DDEBUG -UNDEBUG -UEDEBUG  -DWOLFSSL_SGX_ATTESTATION -DWOLFSSL_ALWAYS_VERIFY_CB -DKEEP_PEER_CERT -Wno-stringop-truncation -DWOLFSSL_SGX_ATTESTATION -DWOLFSSL_KEY_GEN -DWOLFSSL_CERT_GEN -DWOLFSSL_CERT_EXT -DWOLFSSL_ALWAYS_VERIFY_CB -DKEEP_PEER_CERT -DWOLFSSL_TEST_CERT -DWOLFSSL_SMALL_CERT_VERIFY -DUSER_TIME -DWOLFSSL_SGX -DFP_MAX_BITS=8192 -c ecalls.c -o ecalls.o
In file included from ../wolfssl/pre_init.c:1,
                 from ecalls.c:5:
../wolfssl/pre_init.c: In function 'wolfssl_pre_init':
/root/inclavare-containers/enclave-tls/src/include/enclave-tls/log.h:45:3: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   45 |   printf("[" #level "] %s()@L%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
      |   ^~~~~~
/root/inclavare-containers/enclave-tls/src/include/enclave-tls/log.h:39:3: note: in expansion of macro '__PR__'
   39 |   __PR__(DEBUG, stdout, fmt, ##__VA_ARGS__);      \
      |   ^~~~~~
../wolfssl/pre_init.c:6:2: note: in expansion of macro 'ETLS_DEBUG'
    6 |  ETLS_DEBUG("called\n");
      |  ^~~~~~~~~~
In file included from ecalls.c:5:
../wolfssl/pre_init.c:2:1: note: 'printf' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
    1 | #include <enclave-tls/log.h>
  +++ |+#include <stdio.h>
    2 | #include <enclave-tls/tls_wrapper.h>
ecalls.c: At top level:
ecalls.c:60:6: warning: conflicting types for 'printf'
   60 | void printf(const char *fmt, ...)
      |      ^~~~~~
In file included from ../wolfssl/pre_init.c:1,
                 from ecalls.c:5:
/root/inclavare-containers/enclave-tls/src/include/enclave-tls/log.h:45:3: note: previous implicit declaration of 'printf' was here
   45 |   printf("[" #level "] %s()@L%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
      |   ^~~~~~
/root/inclavare-containers/enclave-tls/src/include/enclave-tls/log.h:39:3: note: in expansion of macro '__PR__'
   39 |   __PR__(DEBUG, stdout, fmt, ##__VA_ARGS__);      \
      |   ^~~~~~
../wolfssl/pre_init.c:6:2: note: in expansion of macro 'ETLS_DEBUG'
    6 |  ETLS_DEBUG("called\n");
      |  ^~~~~~~~~~
ecalls.c: In function 'recv':
ecalls.c:97:6: warning: unused variable 'sgxStatus' [-Wunused-variable]
   97 |  int sgxStatus = ocall_recv(&ret, sockfd, buf, len, flags);
      |      ^~~~~~~~~
ecalls.c: In function 'send':
ecalls.c:104:6: warning: unused variable 'sgxStatus' [-Wunused-variable]
  104 |  int sgxStatus = ocall_send(&ret, sockfd, buf, len, flags);
      |      ^~~~~~~~~
CC   <=  ecalls.c

This issue has been resolved by https://github.com/alibaba/inclavare-containers/commit/423a71da29924dea64e02928395d7a96e483a1e8


how to stop ConnectionResetError from appearing in the console?

not that big of a deal but its kinda annoying having these errors pop up when checking the proxies, how can i stop em from showing up?

Honestly, I don't know why this happens, but it only happens on Windows. I have not yet been able to find a solution to this problem. You can try setting less MaxConnections, maybe this will improve the situation. In general, these errors can be ignored.

it seems to error when a proxy closes connection or something like that, but yeah it doesnt really affect the program itself its just kinda annying to see them pop up, anyways thanks for the response.


Draft SIG's new charter

Draft doc - awaiting reviews

https://docs.google.com/document/d/1Y-1kkSzeN_ugxbUNsZgOfbK7gPouHSEbWgjqwDcVjeM/edit
Draft is ready for review @avillela @danielgblanco

Looks good! I left a couple of comments!

Submitted a PR to add this to our repo! https://github.com/open-telemetry/sig-end-user/pull/60

Merged.


Mine levels

Modpack: Farming Valley version 0.7.7
Harvest Festival version 1.10.2-0.5.27
I have made it to level 4 of the mine but at Y-187 there is nowhere to continue on.  Also have only found up to gold at this point.  Is there anything else beyond this?

I have had this happen to sometimes (2 different worlds) the mine doesn't spawn a way to the lower level. I've made it one of the cheating exceptions where I'm allowed to use creative in my survival world. It seems to be a bug in the random generation for the mines. use creative and break 3 blocks down and if there's no room patch the hole and try another spot there are rooms under it but I can't find anyway to fix it without cheating.

Since the mine is a dimension would it not work to just delete the DIM folder for that dimension and just enter the mines again? The mine resets everyday as far as I know so deleting and re-entering the dimension should not affect your gameplay too much.

I don't believe it would work the mining dimension seems to always generate the same for your seed. I had a testing world and survival world with the same seed and got identical mining dimensions even if I placed the hill at a different location. Essentially to get a different mining dimension means a new world along with it.

Oh yes I forgot that dimensions are based on the seed.

I changed the generation in 0.6. So hopefully this will be fixed in the future. For now you'd have to cheat and make a hole in the floor.


NVIDIA Jetson TK1 support

Hello,
Can you please add support for the TK1/TX1/TX2 platforms?
Thanks,

@sagnibak I tried on a TK1 and a TX2, and unfortunately it does not work!

hiya we now have blinka support for jetson, please try it
https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano


lein play-clj template crashes on exit

I've entered
"$ lein new play-clj my-app"
Then I've changed directory to "./my-app/desktop" and run
"$ lein repl"
"my-app.core.desktop-launcher=> (-main)"
Default "Hello World!" window appeared.
After I press close button, repl crashes. I can copy/paste a trace that got to my terminal emulator.
Is this default behavior and I need to add something in the template code?

Yeah that is known behavior. I think it has to do with the fact that there are multiple threads running and the REPL thread is destroyed when the window is closed.

Is there a clean way to terminate the program from within the game? It looks like "easy" solutions like (System/exit 1) don't work either.

@noffle Try (app! :exit)

Hey Zach. I gave that a shot, but I'm still seeing the repl crash:
clojure-gdx-hello.core.desktop-launcher=> (-main)
nil
clojure-gdx-hello.core.desktop-launcher=> Exception in thread "Thread-3" clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 255}
	at clojure.core$ex_info.invoke(core.clj:4403)
	at leiningen.core.eval$fn__6725.invoke(eval.clj:236)
	at clojure.lang.MultiFn.invoke(MultiFn.java:231)
	at leiningen.core.eval$eval_in_project.invoke(eval.clj:337)
	at leiningen.repl$server$fn__10717.invoke(repl.clj:241)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invoke(core.clj:624)
	at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1862)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invoke(core.clj:628)
	at clojure.core$bound_fn_STAR_$fn__4140.doInvoke(core.clj:1884)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.lang.Thread.run(Thread.java:745)

SocketException The transport's socket appears to have lost its connection to the nREPL server
	clojure.tools.nrepl.transport/bencode/fn--7491/fn--7492 (transport.clj:95)
	clojure.tools.nrepl.transport/bencode/fn--7491 (transport.clj:95)
	clojure.tools.nrepl.transport/fn-transport/fn--7463 (transport.clj:42)
	clojure.core/binding-conveyor-fn/fn--4145 (core.clj:1910)
	java.util.concurrent.FutureTask.run (FutureTask.java:262)
	java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
	java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
	java.lang.Thread.run (Thread.java:745)
Bye for now!

Oh, I didn't realize you were trying to keep the REPL alive. I have not found a way to do that. Is there a reason you want to? There is a way to restart the game if you want to start with fresh state.

This is a old question but I am currently facing the same problem.
I have found the issue to be caused by lwjgl backend: by default its mainloop thread calls System.exit(-1) on close, which terminates the mainloop but also others threads including the repl one.
(for more details see method LwjglApplication.mainLoop() in https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java)
This behaviour can be changed by passing a custom configuration object to the application, disabling the System.exit call by setting forceExit attribute to false.
I have attached next the patch that works on my environment (patch on desktop-launcher.clj file). As I'm new to clojure I may not write good code, so feel free to refactor it if needed. :)
--- desktop-launcher.clj	2016-11-09 09:12:04.283550194 +0100
+++ desktop-launcher-patch.clj	2016-11-09 09:09:08.000000000 +0100
@@ -1,10 +1,16 @@
 (ns {{desktop-namespace}}
   (:require [{{namespace}} :refer :all])
-  (:import [com.badlogic.gdx.backends.lwjgl LwjglApplication]
+  (:import [com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplicationConfiguration]
            [org.lwjgl.input Keyboard])
   (:gen-class))

 (defn -main
   []
-  (LwjglApplication. {{game-name}} "{{app-name}}" 800 600)
+  (let [config (LwjglApplicationConfiguration.)]
+    (set! (.-title config) "{{app-name}}")
+    (set! (.-width config) 800)
+    (set! (.-height config) 600)
+    (set! (.-vSyncEnabled config) true)
+    (set! (.-forceExit config) false)
+    (LwjglApplication. {{game-name}} config))
   (Keyboard/enableRepeatEvents true))


NO-JIRA: cert-inspection: replace node name from annotation value

etcd is now including IP in cert description, it needs to be replaced with <master-index> too

/lgtm
/approve


Moving to an organization

I the past few months I was not active in this project. I've already mentioned that I've burned out.
I think it would be better to move this repo to an organization when people would feel like their contributing to their project rather than my personal project. Moreover, there is a few important pros of moving to an organization:

Organization has a discussion feature, so maintainers can have discussions
Better team management, more delicate access management
I've mentioned earlier about Section Registry (#717) and this requires a separate repo
Decoupling website from this repo would decrease repo size for installing and this needs a repo as well

In upcoming days, I will move this repo to a https://github.com/spaceship-prompt organization, fix all paths in the code, redirect links, etc.
Let me know what you think about it.

I agree with you.

This sounds good.

I think it's a great idea, this has many benefits like you mention, and hopefully it will give the project another boost. Thanks!
I think we should also use this opportunity to ask the community who else is actively using this prompt and might be interested to co-maintain it, as there haven't been much commits lately, but there are many issues to be fixed and open PRs waiting to be tested and reviewed and potentially merged 🙂

Any updates on this. If it's being done slowly, that's completely understandable.

there haven't been much commits lately, but there are many issues to be fixed and open PRs waiting to be tested and reviewed and potentially merged

I am absolutely willing to do this if I am given the current set of triaging rights.

Done. The repo is under @spaceship-prompt org now. It also has a brand new website spaceship-prompt.sh.

Awesome😄


make-col-offset: Remove percentage if it's zero.

Another case is flex: 1 0 0%;. Is this on purpose? In theory using 0 should work just fine.
Or maybe flex: 1 0?

Another case is flex: 1 0 0%;. Is this on purpose? In theory using 0 should work just fine.

Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
We should add a note to the source code for it.

I will add the note tomorrow, thanks.
On Oct 3, 2017 23:50, "Mark Otto"<EMAIL_ADDRESS>wrote:

Flexbugs #4 https://github.com/twbs/bootstrap/issues/4:
https://github.com/philipwalton/flexbugs#4-flex-
shorthand-declarations-with-unitless-flex-basis-values-are-ignored
We should add a note to the source code for it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/twbs/bootstrap/pull/24229#issuecomment-333972823, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAVVtdCJWjdMXR2DNCGPGgV0xtFyO3JQks5sop4EgaJpZM4PsoGN
.

@mdo: done

Now that I think about it, wasn't this % stripping something CSS Comb or a linter was doing for us?

We just used CSSLint back then in v3. In stylelint I already have it enabled but apparently it doesn't warn for 0%. 0px works as expected. We'll need to report it.
I have a branch where I attempt to tighten things a little more but we'll probably need to work on it together.

I reported the issue here: https://github.com/stylelint/stylelint/issues/2940

@mdo: I don't think this will be supported so we can just merge this (just approve).
This didn't work with scss-lint either BTW. I'll see if I can come up with something else later.


Type inference for readCotract

Make the readContract type inferred from the ABI

[X] The function names should be suggested based on the ABI provided
[ ] The input types should be inferred based on the ABI and the function name
[ ] The output types should be inferred based on the ABI and the function name
[ ] It should be extended to writeContract and the corresponding react hooks

I am interested to take on this issue
i have experience working on a SDK
i built https://www.npmjs.com/package/saasuke


Launch DDP processes before initializing trainer

🚀 Feature Request
Our current trainer relaunches itself N times to create N processes for DDP. The problem with this is that DDP does so by rerunning the very script that launched the trainer in the first place. This is problematic for any user invoking DDP via a custom script, and also for testing.
The canonical solution to this problem is to provide a launch executable that wraps a user provided script to initialize a trainer. The launch executable runs the script N times to create N processes. This appears to be the direction that many ML frameworks, including DeepSpeed, are moving towards.
Motivation
This will simplify testing and allow us to accurately calculate coverage metrics. This is also essentially a prerequisite to integrating the trainer with DeepSpeed, which also uses an executable.

Closed via #65


Output just the source's URL rather than the whole html?

Is there a way to output just the emoji's source URL?

Never mind, I figured it out.

@Mirakurun and your solution? The documentation is rather unclear.

@guanzo No, I didn't use that twemoji-parser.
What I did was, for example, to get this emoji :grinning:
const grinning = 'ud83d\ude00';

function getEmoji(surrogatePair) {
  return `${twemoji.base}svg/${twemoji.convert.toCodePoint(surrogatePair)}.svg`; // => https://twemoji.maxcdn.com/v/12.1.5/svg/1f600.svg
}

getEmoji(grinning);


Sharing remove Gameobject

I was not yet able to figure out how a spawned object could be removed.
I tried this (but it's only deleted locally):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HoloToolkit.Unity.InputModule;
using HoloToolkit.Sharing.SyncModel;
using HoloToolkit.Sharing.Spawning;

public class removeGameObject : MonoBehaviour, ISpeechHandler, ISyncModelAccessor
{
    public SyncSpawnedObject SyncModel { get; private set; }

    public void SetSyncModel(SyncObject syncObject)
    {
        SyncModel = (SyncSpawnedObject)syncObject;
    }

    public void OnSpeechKeywordRecognized(SpeechKeywordRecognizedEventData eventData)
    {
        Debug.Log(this.SyncModel.GameObject);
        switch (eventData.RecognizedText.ToLower())
        {
            case "remove":
                Destroy(this.SyncModel.GameObject);
                this.SyncModel.GameObject = null;
                break;
        }
    }
}

You need to keep a cached reference to the GameObject you're creating.  You also need to make sure that the user "owns" the object when spawning.
Here's an example of something I've done:

public class SpawnTest: MonoBehaviour
{
    private PrefabSpawnManager spawnManager;
    public List<SyncSpawnedObject> spawnedObjects;

    private void Start()
    {
        spawnManager = FindObjectOfType<PrefabSpawnManager>();
    }

    private void SpawningMethod()
    {
        if (spawnManager != null)
        {
            var spawnedObject = new SyncSpawnedObject();
            spawnManager.Spawn(
                dataModel: spawnedObject,
                localPosition: new Vector3(x: 0f, y: -1.5f, z: 2f),
                localRotation: Quaternion.identity,
                parent: gameObject,
                baseName: "SyncSpawnedObject",
                isOwnedLocally: true);
            spawnedObjects.add(spawnedObject);
        }
        else
        {
            Debug.LogError("Unable to find spawn manager!");
        }
    }

    // TODO whatever logic you need to find the one you want to delete
    private void DeleteMethod(SyncSpawnedObject objectToDelete)
    {
        if (spawnedObject != null)
        {
            spawnedObjects.remove(objectToDelete);
            spawnManager.Delete(objectToDelete);
        }
    }
}

@DominicBoettger, check out my updated sharing spawn test scene in 513.


Update broken links in Quickstarts Sample.

What issue does this PR address?
Update broken links in Quickstarts Sample.
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements

[ ] The commit follows our guidelines
[ ] Unit Tests for the changes have been added (for bug fixes / features)

Other information:

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: sunilshahi sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

thanks!


enable clang-tidy by opt-in

at the moment clang-tidy is completly disabled as I have got multiple reports that they are not usable anymore.

I would be great to have such a feature for /clang-tools-extra/clangd. We recently cleaned up a couple of findings in our subfolder and we would like to prevent backsliding.

Please bring back clang-tidy, that was really valuable to have on review when it was enabled!
I just landed > 27 commits to fix various clang-tidy issues in mlir/.

@metaflow I would be interesting in working on this as we would like to use it for clangd.
I guess this would involve:

Investigate how much of clang-tidy-diff.py and run-clang-tidy.py we could reuse and replace our own logic.
Unify all the clang-tidy related config options into a single yaml file to make configuration easier.
Introduce a new config option to suppress findings using a mix of include and exclude rules using path prefixes (as today).  I'm thinking of something like this to only enable for MLIR:

# The first matching rule is applied in the order of their definition.

# excludes from the current clang-tidy.ignore
- exclude:
 - mlir/examples/standalone
 - mlir/include/mlir-c/Bindings
 - mlir/include/mlir/Bindings
 - mlir/lib/Bindings
 - mlir/test
 - mlir/tools/mlir-cuda-runner
 - mlir/tools/mlir-rocm-runner
# turn on for the rest of mlir
- include:
  - /mlir
# turn off for all other paths
- exclude:
 - /

As this would be a significant refactoring, migrate the new/changes scripting to the monorepo.

This would be a step towards #186 .
However then the pre-merge scripting would be distributed across 2 repos (until we migrate the rest some day).
We would need to figure out where to put these files in the monorepo.

integration of this script with the pipeline:

Input: git hash to analyze (or last git commit if no hash was set)
Output: filtered clang-tidy findings as Python object or JSON
The caller of this script would then need to take the findings and upload them to Phabricator
The new script would be run on Linux after the build, so that all necessary header were generated already.

clang-tidy-diff.py already does most of the work around filtering findings related to a patch. I added JSON output in my patch so we don't have to parse the text output in our scripting.


Add pgbouncer support

My suggestino is to add PGBouncer in 2 different ways:

As a connection pool for PG depoyed by kubedb (#69)
As a sole component used to connect to any DB (kubedb or external) like an "ingress" for PG Dbs

Which are the advantages?:

very low memoery footprint
can be deployed as HA
set connection details (user/pw/pool-size) for security and control
allows to extract some stats of external DBs adn send it to prometheus

The flow would be:

define a pgbouncer deploy (replicas/name/etc)
deploy a default configmap
be able to add to configmap new connections configurations
reload pgbouncer when configmap is modified

I would like to see this as then I could integrate our PG clusters properly into your Datadog monitoring solution.

Design doc topics:

Show CRD YAML?

Version matching?

Do we need a new pgbouncer release for each supported Postgres?
Do we add this in the PostgresVersion crd?

pgbouncncer <- 1: 1 -> postgres?

username / password

How does it work with KubeVault provisioning?
How do we rotate this password?

deployment / statefulset?

points to pg primary service?

Prometheus metrics? https://github.com/spreaker/prometheus-pgbouncer-exporter

@iamrz1 has opened a design doc for this https://github.com/kubedb/project/pull/579 . If you are interested, please take a look and give your feedback.

Docker image:

https://github.com/edoburu/docker-pgbouncer
https://github.com/gmr/alpine-pgbouncer
https://github.com/angristan/docker-pgbouncer

How to reload config

appscode/fsloader
Use runit
Example: https://github.com/kubedb/elasticsearch/tree/master/hack/docker/elasticsearch/5.6.4

Prometheus Exporter
https://youtu.be/vnZAxOQQnkc
pgBouncer

- 5432 - svc

spec:
  selector:
    <match_labels>
  ports:
  - targetport: db
    port: 5432
    name: db

-------------------------

- 7890 - svc-stats
  selector:
    <match_labels>
  ports:
  - targetport: stats
    port: 8970
    name: stats

-------------------------

PgBouncer Pod
  labels:

c0 - pgbouncer
port - db

c1 - exporter
port - stats

Support CA Bundles (TCP over TLS)

https://gist.github.com/denji/12b3a568f092ab951456
https://pgbouncer.github.io/config.html#tls-settings

Grafana Dashboard:

https://grafana.com/grafana/dashboards/9760
https://grafana.com/grafana/dashboards/8711

https://gist.github.com/jalberto/4c47d73578f1e1ccddf8956d71816257


Added hover effect in the navbar buttons

Fixes Issue #75
Closes #75
Changes proposed

[x] Added hover effect in the navbar buttons

Can you please add the pictures?
__
  Summary: :hammer_and_wrench: This code needs a fix  |  Tags: Inefficient

The contact is not showing the effect have a look also links under learn and community are showing no effect, fix it


Home Assistant report wrong state for person occupancy after restart

Version of the custom_component

v3.0.0
Configuration

Describe the bug
When Home Assistant start it reports no person occupancy even if frigate is reporting a person (validated using frigate debug option). The value is not updated until there is a change in the scene (i.e. the person leaves the scene and comes back, or a different person is detected)
Debug log

@NickM-27 this issue is still happening and I haven´t been able to find a workaround for it so every time I restart HA all my automations relying on Frigate person detection fail, is the plan to replace MQTT with websockets still in the roadmap? any idea about the timelines?

Not stale as the issue is still happening, not sure if it will be fixed after MQTT is replaced with websockets


Work on responsiveness of parallax image.

Desktop view :

Mobile  view :

Fix needed.

Care if I work on this issue?

@sautumn  Sure go on.


Encountering "current database router prevents this relation" with single database

Given that I'm not seeing others encountering this issue, it may be something wrong with my code, but I'm seeing "ValueError: Cannot assign "<_ModelMock spec='Account' id='180462412'>": the current database router prevents this relation." when trying to instantiate a model using mocked attributes.
Google indicates that this error occurs when trying to make a relation that spans DBs, but I have a single sqlite DB. I assume the issue is that the mocked ID doesn't exist in the test DB.
Is there something wrong with the way I'm using mock_django?
Example code:
from django.utils import unittest
from django.contrib.auth.models import User

from mock_django import ModelMock

from accounts.models import Account
from badges.models import Badge

class EarnedUnitTestCase(unittest.TestCase):
    def test_earned_unicode(self):
        account = ModelMock(Account)
        badge = ModelMock(Badge)

        earned = Earned(account=account, badge=badge)
        self.assertEqual(unicode(earned), "Account's Badge")

Adding this properties will make it work:
account._state = Mock()
account._state.db = None
badge._state = Mock()
badge._state.db = None

Hi
I have found these instructions  because I was having the:
(raise ValueError('Cannot assign "%r": the current database router prevents this relation.' % value)
ValueError: Cannot assign "": the current database router prevents this relation)
error and now doing what @mariocesar suggested got the following error:
Traceback (most recent call last):
  File "/Users/r/Developing/w/walletAPI/wallets/tests.py", line 32, in setUp
    self.wallet = Wallet.objects.create(owner=owner, token=token)
  File "/Users/r/.virtualenvs/w/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/Users/r/.virtualenvs/w/lib/python3.7/site-packages/django/db/models/query.py", line 411, in create
    obj = self.model(**kwargs)
  File "/Users/r/.virtualenvs/w/lib/python3.7/site-packages/django/db/models/base.py", line 467, in __init__
    _setattr(self, field.name, rel_obj)
  File "/Users/r/.virtualenvs/w/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 300, in __set__
    super().__set__(instance, value)
  File "/Users/r/.virtualenvs/w/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 257, in __set__
    remote_field.set_cached_value(value, instance)
  File "/Users/r/.virtualenvs/w/lib/python3.7/site-packages/django/db/models/fields/mixins.py", line 23, in set_cached_value
    instance._state.fields_cache[self.get_cache_name()] = value
TypeError: 'Mock' object does not support item assignment

This is the piece of code that is failing:
from mock_django import ModelMock
from mock import Mock
***
  def setUp(self):
        owner = ModelMock(Client)
        owner._state = Mock()
        owner._state.db = None
        token = ModelMock(Token)
        token._state = Mock()
        token._state.db = None
        self.wallet = Wallet.objects.create(owner=owner, token=token)

Owner and Token are OneToOne and ForeignKey to other models.
Is there a way to be able to save related ModelMocked objects?
Its been run locally: Python3.7 on djangorestframework==3.9.2.
Thanks in advance

@pilamb I have the same problem, did you find the solution?


memcpyopt: Ensure source local isn't clobbered before the new memcpy

Description
When combining a load+store into a memcpy, the optimization was missing a check that the source isn't clobbered (stored to) in between the load and store.
The optimization thus is enabled for copy types too.
Issue #4345
Checklist

[x] I have linked to any relevant issues.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have updated the documentation where relevant (API docs, the reference, and the Sway book).
[x] I have added tests that prove my fix is effective or that my feature works.
[x] I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
[x] I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
[x] I have requested a review from the relevant team or maintainers.

Looks like you need to update the contract hashes in the require_contract_deployment tests.


KAFKA-4481: relax streams api type contraints

Make appropriate methods contravariant in key and value types.

@dguy sure, happy to add some tests

@dguy rebased on latest trunk and updated tests to catch type constraint problems

retest this please

Retest this please

@xvrl Could you first close the KIP-100 voting thread and update the KIP wiki with this proposal first, and also rebase on the above conflicted class?

@guozhangwang rebased and fixed conflicts

retest this please

Retest this please

LGTM!

Merged to trunk.


BACKLOG-22873: Bump moonstone to 2.7.3

JIRA

https://jira.jahia.org/browse/BACKLOG-22873

Resolution of react-file-viewer/**/ajv has been automatically removed. Note that it has been added with https://github.com/Jahia/jcontent/commit/0e5f7d1443d022ab863467c55fc3faad11ed24ac (TECH-1166) but without any explicit reason


[FIX] set undeployable to empty array instead of null

Description
The put_partial endpoint was setting null values for undeployable and skipped_for_undeployable if both the previous' version set and the current partial compile's set were empty instead of empty arrays.
This was causing internal server errors when performing a dryrun after a put_partial call.
closes  https://github.com/inmanta/inmanta-core/issues/7065
Self Check:
Strike through any lines that are not applicable (~~line~~) then check the box

[x] Attached issue to pull request
[x] Changelog entry
[x] Type annotations are present
[x] Code is clear and sufficiently documented
[x] No (preventable) type errors (check using make mypy or make mypy-diff)
[x] Sufficient test cases (reproduces the bug/tests the requested feature)
[x] Correct, in line with design
- [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
- [ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see test-fixes for more info)

Processing this pull request

Failed to merge changes into iso6 due to merge conflict. Please open a pull request for these branches separately by cherry-picking the commit that was made on the branch master (git cherry-pick f30d4337fc20ef50b3293d24fb25ae97d63a81c9).

Merged into branches master, iso7 in f30d4337fc20ef50b3293d24fb25ae97d63a81c9

Not closing this pull request due to previously commented issues for some of the destination branches. Please open a separate pull request for those branches by cherry-picking the relevant commit. You can safely close this pull request and delete the source branch.

This branch was not deleted as it seems to still be in use.


class prop do not append to component template root attribute in multiple template roots

Version
3.0.0-beta.14
Reproduction link
https://github.com/Jackbennett/vue3-dev-build/tree/vite
Steps to reproduce
Provided in the repo are screenshots for a quick view:
vite serve classes on the component used by app.vue are appened to the class property in the component vue.
vite build in production, the classes props are not appended to the component roots.
There is also a vue-cli branch reproducing the effect (with screenshots) to rule out the vite project. I'm not sure how vue changes into the production code to narrow much more down.
As you can see below look at the middle row background colours missing and the class attributes are removed in the build version.
What is expected?
vite serve output
What is actually happening?
vite build

v-if/v-else template root items work as expected, and I can manually bind the class prop as can be seen in expected.vue

Not really a bug, because syntactically that’s three separate v-ifs that may or may not be true at the same time. So it’s considered a fragment root. Use v-else-if to avoid the ambiguity.


Adding C programming playlist

Fixes Issue
Closes #1986

Changes proposed
Adding C programming playlist link
Screenshots

Note to reviewers

@CBID2 @rupali-codes


chore(electric): Limit client connections when the sync service's Postgres connection is down

Fixes VAX-1290.
This change also addresses the problem where a request sent to /api/status could time out if the Postgres Manager process was itself blocked on an IO call at the time.

@icehaunter @magnetised Let me share my reasoning behind this change.
Rejecting this change would not by itself solve the thundering herd problem. First, we're not immediately killing live connections here. Second, the Satellite client has exponential backoff behaviour implemented. Third, we still need to be ready to handle thundering herd type of load to avoid getting easily DoS'ed.
Allowing a client to connect and authenticate with the server when we know it can't pull any data from the server or push local changes to it makes the client's state more complicated. Instead of just having a connectivity state that the developer can reasonably treat to mean "sync with the server is on/off", the client would have separate connectivity state and "being able to read-write data" state. If the server ends up being misconfigured after a configuration update or Postgres is down for a prolonged period, the client would keep reporting the connection as being fine, effectively masking the server's unavailability.
Having a more direct relationship between connectivity and "writability" makes debugging problems easier in development and later in prod.
Now, in saying the above, I'm glossing over the fact that, even with this change in place, live client connections won't get dropped when Postgres becomes unavailable. This is a more complicated case to handle. I think we shouldn't drop such connections immediately to smooth out remporary Electric<->Postgres connectivity problems. But there likely needs to be a timeout after which Electric should close client connections if it can't re-establish connectivity with Postgres in time.

@alco I get your point, however, to expand on the thundering herd problem: yes, Electric in general should be resilient to high load, but I don't see a reason to make it harder for Electric to cope after a restart. We already have states like "being able to read/write data" - we have a handshake in each direction of the protocol replication, if the server never asks for data the client won't just start pushing (and thus won't update the replication state), and the other way around as well. Client code already treats pre-finished-handshake state as not-yet-connected, so I don't find "new client state" argument compelling given we're already explicitly handling it.
Your point about exponential backoff is correct, however it's still exactly that -- exponential. If the server goes down and up, all the clients will initially be trying to reconnect quite a lot repeatedly. Holding an open connection feels cheaper for us than going through denies on loop.
My concern is about Electric fully crashing (although unlikely under Erlang) and restarting, leading to a lot of clients reconnecting, being denied and then immediately reconnecting again


Disabled Audio

Audio is disabled in some torrents.
http://www.torrentz.com/4367d111560f00fc814680e486f7d8c754c36ab0

when you're saying "disabled" you mean that you won't hear anything even when moving the volume bar, right?
some audio and video formats aren't support in chrome.
the complete list of supported ones should be identical to the chrome-cast list:
https://developers.google.com/cast/docs/media
p.s. the next version of Bit-player will support chrome-cast, i'm just waiting for the release of version 49 which will support casting from apps.

"Disabled" means that the volume bar don´t show up. The file type is mkv (DTS).

it seems like in chrome 49 the green part of the volume slider is not visible.
this isn't related to which video you're playing.
i'll release a new version in the next few days (hopefully).


discord-canary: 0.0.140 -> 0.0.142

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for discord-canary is: "All-in-one cross-platform voice and text chat for gamers"
meta.homepage for discord-canary is: "https://discordapp.com/"
meta.changelog for discord-canary is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.0.142 with grep in /nix/store/6962gihgsmhv4sd69vsp7y2nrh4k7qy0-discord-canary-0.0.142
found 0.0.142 in filename of file in /nix/store/6962gihgsmhv4sd69vsp7y2nrh4k7qy0-discord-canary-0.0.142

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

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
discord-canary

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/6962gihgsmhv4sd69vsp7y2nrh4k7qy0-discord-canary-0.0.142 \
  --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 discord-canary https://github.com/r-ryantm/nixpkgs/archive/4d071a64955b08b5b85ece76ac1f90833d71aa01.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/6962gihgsmhv4sd69vsp7y2nrh4k7qy0-discord-canary-0.0.142
ls -la /nix/store/6962gihgsmhv4sd69vsp7y2nrh4k7qy0-discord-canary-0.0.142/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.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

discord-canary

Maintainer pings
cc @MP2E @devins2518 @Artturin @Infinidoge for testing.

Oh hey, Discord fixed the problems in 0.0.141.
This should be good to merge, and I'll close my PR.


ValueError spacy.en.English() instantiation, version 0.70

I just upgraded to 0.70, and when I try creating an instance of spacy.en.English, like this:
import spacy.en
nlp = spacy.en.English()
this happens:
ValueError                                Traceback (most recent call last)
 in ()
----> 1 nlp = spacy.en.English()
//anaconda/lib/python2.7/site-packages/spacy/en/init.pyc in init(self, data_dir)
74         else:
75             tok_data_dir = path.join(data_dir, 'tokenizer')
---> 76             tok_rules, prefix_re, suffix_re, infix_re = read_lang_data(tok_data_dir)
77             prefix_re = re.compile(prefix_re)
78             suffix_re = re.compile(suffix_re)
//anaconda/lib/python2.7/site-packages/spacy/util.pyc in read_lang_data(data_dir)
14 def read_lang_data(data_dir):
15     with open(path.join(data_dir, 'specials.json')) as file_:
---> 16         tokenization = json.load(file_)
17     prefix = read_prefix(data_dir)
18     suffix = read_suffix(data_dir)
//anaconda/lib/python2.7/json/init.pyc in load(fp, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
288         parse_float=parse_float, parse_int=parse_int,
289         parse_constant=parse_constant, object_pairs_hook=object_pairs_hook,
--> 290         **kw)
291
292
//anaconda/lib/python2.7/json/init.pyc in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
336             parse_int is None and parse_float is None and
337             parse_constant is None and object_pairs_hook is None and not kw):
--> 338         return _default_decoder.decode(s)
339     if cls is None:
340         cls = JSONDecoder
//anaconda/lib/python2.7/json/decoder.pyc in decode(self, s, _w)
364
365         """
--> 366         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
367         end = _w(s, end).end()
368         if end != len(s):
//anaconda/lib/python2.7/json/decoder.pyc in raw_decode(self, s, idx)
380         """
381         try:
--> 382             obj, end = self.scan_once(s, idx)
383         except StopIteration:
384             raise ValueError("No JSON object could be decoded")
ValueError: Expecting property name: line 567 column 1 (char 15406)

Please run:
$ python -m spacy.en.download all

There's an error in a data file that's in the pip version. It will be fixed in the next release, which has been delayed slightly. I hope to have it out in the next few days.

Thank you much!


refactor(interactive): Introduce call_proc as a new physical operator and implement it

Currently have too kinds graph queries. One is adhoc query, the other is call_proc query. We provide two different route and APIs for these two kind of queries, but it is possible to merge call_proc query into adhoc query, as an operator.
In this PR, we Introduce a CALL_PROCEDURE operator into PhysicalPlan proto. So, we could remove the /v1/graph/{id}/query from compiler side. However, we still need the API in server side, for SDK to use.
TODO

[x] Revisit the dependency introduce by procedure_call.cc, including get app_base, and get session. Ideally, we shoud not only involve interfaces of ReadTransaction.   -> Negative
[x] Make sure the introduce of StdStringValue is necessary. -> Removed.
[x] Finish all if-else check in procedure_call.cc.
[x] We need to call the procedure for each record. Could we optimize?  -> Negative

User now could embed the call_proc in a cypher query, for example
MATCH(p: person) with p.id as oid CALL k_neighbors("person", oid, 1) return label_name, vertex_oid;

where k_neighbors is a builtin procedure.
Fixes #4278

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 58.78%. Comparing base (0aa119e) to head (49479f8).
Report is 3 commits behind head on main.

Additional details and impacted files

@@             Coverage Diff             @@
##             main    #4288       +/-   ##
===========================================
+ Coverage   36.96%   58.78%   +21.82%
===========================================
  Files         126       12      -114
  Lines       13235      592    -12643
===========================================
- Hits         4892      348     -4544
+ Misses       8343      244     -8099

see 114 files with indirect coverage changes

Continue to review full report in Codecov by Sentry.

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


how is it used?

it gives me an error

Please install xterm

Don't worry, have you had a look at the code? It just performs a flood ping to the given Bluetooth MAC address. Instead of installing this, you might as well type it straight to the console: sudo l2ping -f
Usage:
l2ping [-i device] [-s size] [-c count] [-t timeout] [-d delay] [-f] [-r] [-v]
-f  Flood ping (delay = 0)
-r  Reverse ping
-v  Verify request and response payload

I think part of the issue here is that the output is clunky (includes a lot of "\033[0m" characters). This is probably because if you run it with ./, it'll just run with whatever the default interpreter is set to (so if you have zsh, like kali uses by default now, it won't be very legible).
I'd recommend either updating the readme to say "bash bluedoser.sh", or (best) adding a shebang to the file header like the following:
#!/bin/bash
file: bluedoser.sh
Filename is just syntactic however this will tell it what interpreter to use so the colors always work.

hey guys
can someone explain which password to enter at the beginning? i always get asked by linux and thought it was kali. otherwise it would be nice if someone could show examples of use. sorry for being so ignorant.

Hi,
Bluedoser is scanning indefinitely but it can't find my bluetooth speaker paired with my phone.
The two devices are next to my computer runnig Linux Kali (2022.4). If the speaker is not paired though Bluedoser's scan shows me the device.
Why the scan can't see it while paired ?

same here... its scanning indefinitely


Allow lens in case of predicate

WIP and not yet ready to be merged

Codecov Report

Merging #157 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #157   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           1      1
  Lines        1033   1036    +3
=====================================
+ Hits         1033   1036    +3

Impacted Files
Coverage Δ

dist/partial.lenses.cjs.js
100% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


support datax hive to mysql

Did support use datax to synchronize hive to mysql? I can find it in release-1.3.0

use python mode

yes of course you can, if only datax support the reader source or write r source, you can use it to synchronize data

The Datax node is support custom json config (datax json), don't know if it meets you needs.

Use native dataX to customize the configuration.  hive(hdfs)->mysql