Quantiles from pooled ensemble members

Addressing a Problem?
I am using xclim-sdba to bias correct 50 ensemble members of the CESM2 climate model. I am using the MBCn technique from Cannon 2018 and following the tutorial here: https://xclim.readthedocs.io/en/stable/notebooks/sdba.html#Fourth-example-:-Multivariate-bias-adjustment-with-multiple-steps-(Cannon,-2018). I would like to pool all 50 ensemble members into a single distribution from which the quantiles will be computed. However, I don't see a way of doing this. It seems like the observational and model datasets need to have the same time dimension for the code to work. So, I can bias correct each ensemble member individually without problems, but this is not always the preferred approach. I have tried to place the ensemble members into a separate dimension ('realizations') but I am still unable to perform the adjusting procedure. Could this option be added to xclim?
Potential Solution
No response
Additional context
No response
Contribution

[ ] I would be willing/able to open a Pull Request to contribute this feature.

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi @dmitri1357 !
There's a way to do it, but it's not clean and I don't know if it works with MBCn, which is a way more complicated than the other base adjustment (EQM, DQM, etc).
xclim's sdba.Grouper object accepts a add_dim argument that gives extra dimensions to consider in the grouping. This is where you want to pass your "realization" dimension name so that the quantiles are computed across both the time and the realizations.  However, the issue is that this was not coded as cleanly and it will fail if the  added dim does not appear on the reference. So the hacky solution is to replicate your realization dimension on your reference data. In theory, the duplication of the data won't change the distribution.  This is exactly issue #1739.
Code example. Assuming you have a ref DataArray with only a "time" dimension, and scenh / scens  that have an extra  "realization" dimension.
ref2 = ref.expand_dims(realization=scenh.realization)
# ...
group = Grouper("time", add_dims=['realization'])

with xc.set_options(sdba_extra_output=True):
    out = sdba.adjustment.NpdfTransform.adjust(
        ref,
        scenh_std,
        scens_std,
        base=sdba.QuantileDeltaMapping,
        base_kws={"nquantiles": 20, "group": group},
        n_iter=20,  # perform 20 iteration
        n_escore=1000,  # only send 1000 points to the escore metric (it is really slow)
    )

Again, I've never tested the add_dims thing with MBCn. I'll try to tomorrow.

Hi @aulemahal, thank you for taking a look. That's good to know about the Grouper object! Yes, please let me know if this could possibly work with MBCn. No rush since I have elected to bias-correct using one ensemble member, so I am no longer trying to pool the ensemble members for this particular project. But it is something that may be necessary for later work.


Update the camera example to include asking permissions for phone applications

Is your feature request related to a problem? Please describe.
I was frustrated about the camera example that it throws the JVM exception error at opening android camera. Now I figure out it just needs android permissions to run on android phone.
Describe the solution you'd like
The code can run on android phones but not on PC. To run it on PC you have to remove android.permissions and other associated methods.
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.utils import platform
from android.permissions import request_permissions, Permission
import time

request_permissions([
    Permission.CAMERA,
    Permission.WRITE_EXTERNAL_STORAGE,
    Permission.READ_EXTERNAL_STORAGE
])

Builder.load_string('''
<CameraClick>:
    orientation: 'vertical'
    Camera:
        index: 0
        id: camera
        resolution: (640,480)
        play: True
        allow_stretch: True
        canvas.before:
            PushMatrix
            Rotate:
                angle: -90
                origin: self.center
        canvas.after:
            PopMatrix
    Button:
        text: 'Capture'
        size_hint_y: None
        height: '48dp'
        on_press: root.capture()

''')

class CameraClick(BoxLayout):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)

    def capture(self):
        '''
        Function to capture the images and give them the names
        according to their captured time and date.
        '''
        camera = self.ids['camera']
        timestr = time.strftime("%Y%m%d_%H%M%S")
        camera.export_to_png("IMG_{}.png".format(timestr))
        print("Captured")

class TestCamera(App):

    def build(self):
        return CameraClick()

TestCamera().run()

This was a lifesaver honestly. Nothing else was working for me except explicitly asking for the android permissions.

It is really much-needed update. But in my case it works only when I put request_permissions(...) call into build method.

Thanks a lot, saved me hours of searching!!!!

A PR adding this to the example would be welcome (commented out so people can remove the comment guards when testing for android, with a text comment indicating this).
Although I don't you normally ask these permissions during the build stage? Or do you still need to request it before using?

I think it is required to put the permissions call in the build stage, else there can be a fatal issue on_resume()

@matham perhaps moving the permissions section inside a platform conditional would suffice?

I don't think it's a good idea to mix deployment stuff (like permissions) into the core framework because they are separate stages/processes. And we haven't done it for other permissions either.
Documenting where the permission needs to be asked is the better approach (especially considering what @RobertFlatt said).

helloo, tks, it worked here! but when I deploy to mobile where will the photos be saved?

I'll update the docs which are not clear, thanks for helping me see that https://github.com/Android-for-Python/Camera4Kivy#location-
Android default is DCIM///.jpg

https://github.com/kivy/python-for-android/blob/develop/doc/source/apis.rst#storage-paths
But files can only be saved to app_local_storage() on Android >= 10 .  Your app is then responsible for moving to the MediaStore if required.
Or try https://github.com/Android-for-Python/Camera4Kivy

We can use the same code both in PC and Android Pad
try:
from android.permissions import request_permissions, Permission
request_permissions([
Permission.CAMERA,
Permission.WRITE_EXTERNAL_STORAGE,
Permission.READ_EXTERNAL_STORAGE,
Permission.INTERNET,
Permission.BODY_SENSORS,
Permission.BLUETOOTH
])
except Exception as e:
logging.warn(e)

Will the code be updated finally in https://kivy.org/doc/stable/examples/gen__camera__main__py.html please?
It took me many hours to debug with non working tips, an finally to found this solution...


feat(mint-time): add mint-time show under creator

…reator
Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.
PR type

[ ] Bugfix
[x] Feature
[ ] Refactoring

What's new?

[x] PR closes #2219
[x] add mint-time show under creator and add choice at setting to control

Before submitting Pull Request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality
[x] I've posted a screenshot of demonstrated change in this PR

Optional

[ ] I've tested it at </rmrk/collection/26902bc2f7c20c546a-1FVG7>
[x] I've tested PR on mobile and everything seems works
[ ] I found edge cases
[ ] I've written some unit tests 🧪

Had issue bounty label?

[x] Fill up your KSM address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot

[x] My fix has changed something on UI; a screenshot is best to understand changes for others.

https://user-images.githubusercontent.com/38389586/155082953-6226aff5-e6ff-4e8c-9f2c-4317f6df0e32.mp4

Not correct tbh
The issue asked only for when the collection was created
query created {
  collectionEntity(id: "900D19DC7D3C444E4C-ROOMS") {
    id
    createdAt
  }
}

The task is to extend collectionById.graphql with createdAt and then format it (this part looks good)

got it, thanks

yes please, keep quality code 🥺 and better reuse/refactor components into reusable components.
we are against duplicating code where we can be smart about it )

Thanks for vikiival, now I'm refactor format function with Vue Mixin, and reuse query to get createdAt data, plz review again.

pay 100 usd

😍 Perfect, I’ve sent the payout
💵 $100 @ 121.02 USD/KSM ~ 0.826 $KSM
🧗 EgCzZLpVe7zg7RHh79qPyC8UrykVkA22YY2oj7sWMZf15Ws
🔗 0xa4da27a2b2b50a1e901c6e12bad0e3af9a942f8d96d6b347f9bc1b783bf40971
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


start vtk garbage collector on initialize.

This PR addresses the problem that long running jobs that use MeshIO run out of memory at some point (issue #193).
The fix is to start the VTK Garbage Collector explicitly on calling scalismo.initialize().

I'm afraid it's not that easy, because you may also have to ensure that the VTK garbage collector is stopped, so that your program will reliably exit.
See the scalismo.ui.rendering.Rendering class for how this is currently implemented in the UI. That code would also have to be adjusted accordingly (to take into account the new behavior of initialize() ).


[vulkan-hpp] make vulkan-hpp actually fetch all of Vulkan-Hpp

Is your feature request related to a problem? Please describe.
It looks like [vulkan-hpp] is only copying vulkan/vulkan.hpp into the package but in reality it consists of multiple files, and the only reason why including other files from Vulkan-Hpp works is that VulkanSDK is (most probably) in default include path (/usr/lib/include/ or such) and it itself contains other Vulkan-Hpp headers.
Also those headers require <vulkan/vulkan.h> to be visible, but the package doesn't guaranee it (again... relaying on VulkanSDK being in some default include path).
Also [vulkan-headers] already have contents of Vulkan-Hpp repository (linking to Vulkan::Headers) (same with [vulkan]) so why would this package even exist?
Proposed solution
Just deprecate this package to reduce possible problems.
All packages that are currently dependent on this package should depend on [vulkan-headers] or [vulkan] and link to Vulkan::Headers which already contains Vulkan-Hpp headers and doesn't cause problems with VulkanSDK already installed on the system.
There are no packages currently in vcpkg that depend on [vulkan-hpp] so no changes in vcpkg ports are needed to be made.
I will make it a forwarder to [vulkan-headers] (to guarantee a correct header version) and message users when installing this package.
Describe alternatives you've considered

Just doing no-op because Vulkan-Hpp is already in VulkanSDK and so [vulkan] package and just changing the usage file, but than again why would this package even exist, VulkanSDK from FindVulkan already has Vulkan::Headers.

Additional context
You can see what I am talking about just by doing:
cmake_minimum_required(VERSION 3.8)
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")
project(test CXX)

find_path(VULKAN_HPP_INCLUDE_DIRS "vulkan/vulkan.hpp")
find_path(VULKAN_HPP_RAII_INCLUDE_DIRS "vulkan/vulkan_raii.hpp")
find_path(VULKAN_H_INCLUDE_DIRS "vulkan/vulkan.h")

message("Vulkan hpp path: ${VULKAN_HPP_INCLUDE_DIRS}")
message("Vulkan hpp-raii path: ${VULKAN_HPP_RAII_INCLUDE_DIRS}")
message("Vulkan h path: ${VULKAN_H_INCLUDE_DIRS}")

note that vulkan/vulkan.hpp requires vulkan/vulkan.h to be present and that vulkan_raii.hpp is also a part of Vulkan-Hpp

Please add something like "vulkan-headers already contains vulkan-hpp" to the description of vulkan-hpp, instead of just showing deprecated.


connectEngine needs auth check before returning global

added in 1.0.0 (makes "GetUniqueID" call to ensure auth is working)


django-q2 and django-channels together

Hi,
I am trying to run django-q2 and django-channels together but it fails.
Everything only works fine with qcluster in sync mode (sync=True)
My chain calls:
Regular django app -> async_task with hook  ->   hook that send channels message.
Any thoughts what can be wrong?
# asycn_task
def create_auto_snapshot(grid_uid: str):
   # do some work with django orm

    return new_grid_uid

# hook called from task
def hook_create_auto_snapshot(task):
    grid_uid = task.result

    # Send notification to all clients in the group
    channel_layer = get_channel_layer()
    channel_group_name = f"grid_group_{grid_uid}"

    async_to_sync(channel_layer.group_send)(
        channel_group_name,
        {"type": "send_notification"},
    )

django-channels together but it fails

Does it give any error at all? What you have looks fine to me.

I ran into this comment with the same type of issue.
https://stackoverflow.com/questions/77157325/sending-django-channels-message-from-inside-async-task
It`s possible that some passed context  is missing for the function hook_create_auto_snapshot
It looks like I am gonna have to switch to Cellery. But I don't like...

The problem solved.
The reason was missing package standard  for uvicorn.


'GraphicsCollection' object has no attribute 'font'

I am trying to extract the font of a text in a pdf. Following is the piece of the code where I try to do the same.
letterings_font = page.letterings.font
But I keep getting the error 'GraphicsCollection' object has no attribute 'font'.
The documentation says that I can access the font from the letterings object.
Any help would be appreciated.

letterings is a collection, not an individual lettering. You probably want to iterate through the page.letterings object


Update to Minecraft 1.20

update extractor to 1.20
update gradle to 8.1
docs: describe how to update valence to new nc version
update extractor mod metadata
update extracted data
replace 1.19.4 strings with 1.20

Description
Updates valence to 1.20
closes #357
Not yet complete. I have no idea why its not building right now.

Thanks for working on this.

I have no idea why its not building right now.

The entity extractor is a bit buggy and the way it handles tracked data is incorrect. The output is nondeterministic which causes some weirdness. If you change 0 air to 1 air in the generated entities.json it should pass the assertion in the build script for now.

I'm getting this for the block_entities example:
the trait bound `Value: From<valence::prelude::Uuid>` is not satisfied

Seems weird. Did we have this impl before?

Seems weird. Did we have this impl before?

I think I changed the default feature flags for valence_nbt in the top-level Cargo.toml. Try adding the uuid feature to it.

Not sure why it's producing an error now though.

I don't have enough context about how the connection handshake works to continue debugging this, but it seems like something changed with packet decoding.

Update 1.20 diff on wiki.vg

I believe the packet that causes the error is LoginSuccessS2c


Kapacitor .exec() not working

Hi everyone,
I am fairly new to TICK and I am trying to have kapacitor run a bash script then email me a notification. The following is my tickscript:
`var db = 'telegraf'
var rp = 'autogen'
var measurement = 'syslog'
var groupBy = []
var whereFilter = lambda: ("appname" == 'sshd') AND ("facility" == 'authpriv') AND ("hostname" == 'vyos') AND ("severity" == 'notice')
var period = 10s
var every = 30s
var name = 'Brute Force Attack'
var idVar = name
var message = ''
var idTag = 'alertID'
var levelTag = 'level'
var messageField = 'message'
var durationField = 'duration'
var outputDB = 'chronograf'
var outputRP = 'autogen'
var outputMeasurement = 'alerts'
var triggerType = 'threshold'
var details = 'script has been ran'
var crit = 3
var data = stream
|from()
.database(db)
.retentionPolicy(rp)
.measurement(measurement)
.groupBy(groupBy)
.where(whereFilter)
|window()
.period(period)
.every(every)
.align()
|count('timestamp')
.as('value')
var trigger = data
|alert()
.exec('/usr/bin/bash', '/scripts/script.sh')
.crit(lambda: "value" >= crit)
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.details(details)
.email()
.to('italianoaj@**********')
trigger
|eval(lambda: float("value"))
.as('value')
.keep()
|influxDBOut()
.create()
.database(outputDB)
.retentionPolicy(outputRP)
.measurement(outputMeasurement)
.tag('alertName', name)
.tag('triggerType', triggerType)
trigger
|httpOut('output')
`
the script reads:
`#!/bin.bash
echo "test" > /var/lib/kapacitor/test.txt`
When the script fires, the email is sent but the script doesn't run being the test.txt file is not created. Am I using .exec() properly? Again I am very new to this and would like to implement TICK for some of my system's syslogs and have scripts run in response to certain log anomalies. Thank you in advance for your help.

Hi,
I guess that you need to put the path as first arg and the program as second like:
.exec('/usr/bin/bash/scripts', 'script.sh')
Hope this works!!

@arturo-mondelo Thanks Ill give that a shot a let you know if it works!

@arturo-mondelo That did not work. When inside of the directory /usr/bin/bash/scripts and I run 'sudo -u kapacitor bash script.sh' the script works. My inital concern was that the kapacitor user could not run the script but that proved to be false. Any other advice would be helpful. Thanks again!

|alert()
    .crit(lambda: "value" >= crit)
    .exec('/bin/echo', '1', '>>', '/tmp/alert.json')

I thought it would be easy to get everything I wanted, but I just saw the log printed
/tmp/alert.json is empty
Does it have anything to do with the container I'm using

The .exec() command syntax is .exec('command', 'arg') so make the script executable, that is 'chmod +x /scripts/script.sh' and then try .exec('/scripts/script.sh', '')


Bugs fixed and TaskDetailPage functions

#72
#70
#60
#44
Enable these buttons

Add content check for TaskEditor -- only have task name can submit

update CSS for TaskTagDropDown and TaskTagCheckList

As we discussed in last week's meeting, I suggest removing the checkmark on the right side.
The notification system's style differs significantly from my previous version, which could be due to merge conflicts?

The original Todoist have it. :)

The conflict is from somethin about SingleItem, to adjust the CSS of popup card


[Suggestion] Add shadowproperties to control

Add the shadow properties as bindable properties.

Problem with this is that on Android the shadow is far less configurable than on iOS. Droid only let's you set elevation, which influences the radius/distance of the shadow. iOS supports different colors, offsets, radii etc. There's not really a lot of things shared between the two to abstract into a property.


@auth directive with 'oidc' provider error

Current Behavior
I'm trying to set up the OIDC authentication and retrieving the error:
@auth directive with 'oidc' provider found, but the project has no OPENID_CONNECT authentication provider configured.
I'm using the Cognito from another account as the OIDC.
The error happens running the cdk synth command.
Code that doesn't work:
schema.graphql

// this is copied from https://aws.amazon.com/blogs/mobile/graphql-security-appsync-amplify/

type Post
  @model
  @auth(
    rules: [
      { allow: owner, provider: oidc, identityClaim: "custom:id" }
      {
        allow: groups
        groups: ["Bloggers", "Readers"]
        operations: [read]
        provider: oidc
        groupClaim: "custom:groups"
      }
    ]
  ) {
  id: ID!
  description: String
}

lib/cdk-init.ts

   const myAppSync = new AppSyncTransformer(this, "my-cool-api", {
      schemaPath: "./schema.graphql",
      authorizationConfig: {
        defaultAuthorization: {
          authorizationType: appsync.AuthorizationType.OIDC,
          openIdConnectConfig: {
            oidcProvider: "https://cognito-idp.us-east-1.amazonaws.com/us-east-XXX",
          },
        },
      },
      xrayEnabled: true,
    });

If I remove  provider: oidc  and fields related to it, then everything works fine.
What should happen
It should generate the VTL files and GraphQL schema without the error.
Using  "cdk-appsync-transformer": "^1.77.8"
The same example is tested using only AWS Ampify, and everything works without error.

I've found the bug:
SOLUTION:
inside cdk-appsync-transformer/schema-transformer.js
this.authTransformerConfig.additionalAuthenticationProviders
add:
{
     authenticationType: "OPENID_CONNECT",
     openIDConnectConfig: {
            oidcProvider: "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_XXX",
     },
}

@zgajo Will add this in tomorrow!

@zgajo version 1.77.9 contains your fix!


Page load issues for tokens list

When I navigate to the Tokens list page, the tokens load so slowly that I first see a spinner and a "Add tokens to get started!" message.
This is with 225 tokens.

this work has been deprioritized.


Update index.md

Updated "this" to "these" as referring to multiple design patterns

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Closed and Reopened this PR to attempt to resolve a specific Travis build failure.


Map window keys to global object

Codecov Report

Merging #25 into master will increase coverage by 0.05%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
+ Coverage    97.7%   97.76%   +0.05%
==========================================
  Files           2        2
  Lines         131      134       +3
  Branches       28       29       +1
==========================================
+ Hits          128      131       +3
  Misses          3        3

Impacted Files
Coverage Δ

src/ReactTester.js
98.01% <100%> (+0.06%)
: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 1003525...e013855. Read the comment docs.


H5107 Temperature/Hygrometer Sensors Not Supported

Which model is this? Need the Hxxxx number.

H5107

Which type of device is this? Light, heater, leak sensor, etc.

Temperature/hygrometer sensor

Which connection methods does this device have? Wifi? Bluetooth? LAN mode? All?

WiFi/LoRa

Anything else?

{"device":"01:32:52:C1:04:3B:0F:4B","deviceName":"H5107_0F4B (3)","model":"H5107","httpInfo":{"groupId":0,"device":"01:32:52:C1:04:3B:0F:4B","sku":"H5107","spec":"","versionHard":"4.1","versionSoft":"1.7","deviceName":"H5107_0F4B (3)","deviceExt":{"deviceSettings":"{\"temMin\":-2000,\"temMax\":6000,\"temWarning\":true,\"fahOpen\":false,\"temCali\":0,\"humMin\":0,\"humMax\":10000,\"humWarning\":true,\"humCali\":0,\"netWaring\":true,\"uploadRate\":10,\"battery\":100,\"wifiLevel\":0,\"sno\":2,\"gatewayId\":440202,\"gatewayInfo\":{\"device\":\"0A:9F:60:74:F4:F3:DD:32\",\"sku\":\"H5043\",\"topic\":\"GD/98e7d908f6168e80618079a2c99991cc\",\"bleName\":\"ihoment_H5043_DD33\",\"address\":\"60:74:F4:F3:DD:33\",\"secretCode\":\"DDjH01NUepU=\"},\"sku\":\"H5107\",\"device\":\"01:32:52:C1:04:3B:0F:4B\",\"deviceName\":\"H5107_0F4B (3)\",\"versionHard\":\"4.1\",\"versionSoft\":\"1.7\"}","lastDeviceData":"{\"online\":false,\"tem\":2090,\"hum\":5650,\"lastTime\":1716852600000,\"avgDayTem\":2090,\"avgDayHum\":5650}","extResources":"{\"skuUrl\":\"https://d1f2504ijhdyjw.cloudfront.net/sku-img/d139fd2e87653e32e6413583ce53a14b-add_list_type_device_5107.png\",\"headOnImg\":\"\",\"headOnImgNew\":\"\",\"headOffImg\":\"\",\"headOffImgNew\":\"\",\"ext\":\"\",\"ic\":0}"},"share":0,"deviceId":21432124,"gidConfirmed":true,"goodsType":220,"attributesId":0,"supportScene":0}}

I would also love to see support for this device.


Use pre-commit hook to lint neo4j

Close #266

This would have been useful at the time, but we now intend to remove Neo4j altogether.


Implement on-card key generation & backup

Most wallets are using BIP39 with the mnemonic seed for backup/restore. This means that the key always leaves the device (having the user write it down on paper also counts as leaving the device) even for hardware wallets.
We must certainly support BIP39 (we do!), but we also need to allow generating keys on-card, with the ability to back them up to other cards.
The issue here is doing this backup safely. One solution could be the following

The card issuer (i.e: Status) provisions a secret backup key on all their cards. The key is only known to the issue and eventually the manufacturer.
The user can export the private key by entering a password which is converted to a key as well
The card concatenates the issuer's key with the user's key and hashes it. The resulting key is used to encrypt the private master key to be exported.

Restoring would be a symmetric process, where the user key is sent along with the encrypted data to the card, which generates the actual decryption key and saves the key.
The advantages of this approach are:

straightforward: with one phone/computer and two cards you can do your backup
no MITM attack: The client mediating the backup only knows one factor used to generate the encryption key
limited trust to issuer: The issuer does not have enough information to decrypt backups, since it only knows one factor used to generate the encryption key

The disadvantages are:

compatibility: only cards from the same issuer would have the same keys and thus could backup/restore their respective keys.
some trust in issuer: if the issuer key leaks, then one of the two factors used in the backup procedure is lost, opening the doors to MITM if the device mediating the backup is compromised
burden for the issuer: on the reverse side, the issuer has the burden to keep a secret key and share it only with trusted manufacturing partners.

I am very open to other ideas which can solve the two issues  above. A possibility would be to have the user set both parts of the backup key but using different devices. So on one phone you prepare cards by setting the first half of the key and on the other phone you do the actual backup. This would make the process a little less straightforward and some user might do both steps on the same device (which is bad). Also this works if both devices are not compromised by the same party (or parties which communicate with each other). If at least one is uncompromised then of course it is OK. This would also solve the compatibility problem and would make the first half of the backup key "short-lived", since it would be changed before any backup, which is a good thing.

cc @nagydani

I am thinking the option of using 2 devices to perform the backup on the user side is the safest one and requires less trust. I can actually verify on-card that the device is a different one (at least, a different pairing key... doing a double pairing on the same device just to circumvent the security measure is less convenient that doing it right).

Regarding backup and restore, I will update the original issue with a refined proposal which goes more in details on how things happen

I love the use of moving away from recovery phrases, and this procedure (at first glance) seems to mitigate most issues with trusting devices to perform the backup.
Practically speaking, for an average user, how many devices are readily available to perform such a procedure (phone and desktop)?  This could start as functionality for people holding larger amounts of funds, which is prompted when a user stores past X amount, to remind them they should up their security game.
To that point, the UX has to be on point to make this easy to understand, as most people don't understand the need for multiple clients.

Practically speaking, for an average user, how many devices are readily available to perform such a procedure (phone and desktop)? This could start as functionality for people holding larger amounts of funds, which is prompted when a user stores past X amount, to remind them they should up their security game.

Except for the main client which needs to be paired and where user enters PIN, the other devices can be completely untrusted, so one can ask friends, family or collegues. Ideally it is matter of sitting together 5 minutes and doing this thing.

To that point, the UX has to be on point to make this easy to understand, as most people don't understand the need for multiple clients.

You hit the nail on the head, UX is crucial for this work in the real world. From the card side I will make sure the minimal amount of user input is required, but the user interface must help with this. I think it is important for the UX to be easy if you want to assist someone in doing this procedure.


Show Discourse version in juju status

Show Discourse version in unit status

Quite minor comment, but while the CI is running the test, wouldn't it be interesting to add an assert on the exec to get the version ? That'll cover this addition in the unittests

Quite minor comment, but while the CI is running the test, wouldn't it be interesting to add an assert on the exec to get the version ? That'll cover this addition in the unittests

Added


Venafi issuer produces a mixture of structured and unstructured log messages from the vcert library

The Venafi issuer uses the vcert library which produces unstructured logs.
This clashes with the structured logs produced by cert-manager.
It'd be nice if the vcert log messages could translated into structured logs.
It'd be good to also supress those logs unless cert-manager is configured to log at debug level.
In https://github.com/jetstack/cert-manager/pull/2979#pullrequestreview-440061427 @wallrj  wrote:

2.3. I see the vcert library logging in a different (non-structured) format among the structured cert-manager logs

I0630 13:59:37.924699       1 controller.go:152] cert-manager/controller/certificaterequests-issuer-ca "msg"="syncing item" "key"="default/demo-certificate-2982765813"
I0630 13:59:37.925018       1 controller.go:162] cert-manager/controller/certificaterequests-issuer-ca "msg"="finished processing work item" "key"="default/demo-certificate-2982765813"
I0630 13:59:39.236327       1 logs.go:52] vCert: Got 200 OK status for POST https://uvo1t505nvj4he1imjw.env.cloudshare.com/vedsdk/authorize/
I0630 13:59:39.953175       1 logs.go:52] vCert: Got 200 OK status for POST https://uvo1t505nvj4he1imjw.env.cloudshare.com/vedsdk/certificates/checkpolicy
I0630 13:59:40.721125       1 logs.go:52] vCert: Got 200 OK status for POST https://uvo1t505nvj4he1imjw.env.cloudshare.com/vedsdk/certificates/retrieve
I0630 13:59:40.722211       1 venafi.go:177] cert-manager/controller/certificaterequests-issuer-venafi/sign "msg"="certificate issued" "related_resource_kind"="Issuer" "related_resource_name"="venafi-tpp-issuer" "related_resource_namespace"="default" "resource_kind"="CertificateRequest" "resource_name"="demo-certificate-2982765813" "resource_namespace"="default"

/kind bug

Prow seems to be dead...
/kind bug
/priority important-soon
/area venafi


[Spring Framework] Add commercial (TuxCare) endless support

Add commercial (TuxCare) endless support for Spring Framework EOL versions.

We are not adding ANY of 3rd party Support things !


separate patches into dedicated source files

Look good, really like that change, much better overview and easier to add new mods in the future! 👍🏽

Look good, really like that change, much better overview and easier to add new mods in the future! 👍🏽

@FranciscoDA What did you use for code formatting, do you have a .clang-format you may want to commit to keep the code style. Seems clean and nice.

@FranciscoDA What did you use for code formatting, do you have a .clang-format you may want to commit to keep the code style. Seems clean and nice.

@FranciscoDA What did you use for code formatting, do you have a .clang-format you may want to commit to keep the code style. Seems clean and nice.

Manually formatted I'm afraid :cold_sweat:  (although I honored the original formatting a bit)
I've added a .clang-format file and reformatted the sources according to that.

@FranciscoDA What did you use for code formatting, do you have a .clang-format you may want to commit to keep the code style. Seems clean and nice.

Manually formatted I'm afraid :cold_sweat:  (although I honored the original formatting a bit)
I've added a .clang-format file and reformatted the sources according to that.

Thank you! :yellow_heart:

Thank you! :yellow_heart:

Nice! 👍🏽

Nice! 👍🏽


I am not able to use camera in Flutter.

Launching lib/main.dart on Infinix X690 in debug mode...
Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/Camera.java:23: error: cannot find symbol
import android.media.EncoderProfiles;
^
symbol:   class EncoderProfiles
location: package android.media
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/Camera.java:951: error: cannot find symbol
EncoderProfiles getRecordingProfile() {
^
symbol:   class EncoderProfiles
location: class Camera
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:10: error: cannot find symbol
import android.media.EncoderProfiles;
^
symbol:   class EncoderProfiles
location: package android.media
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:29: error: cannot find symbol
private EncoderProfiles recordingProfile;
^
symbol:   class EncoderProfiles
location: class ResolutionFeature
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:63: error: cannot find symbol
public EncoderProfiles getRecordingProfile() {
^
symbol:   class EncoderProfiles
location: class ResolutionFeature
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:187: error: cannot find symbol
public static EncoderProfiles getBestAvailableCamcorderProfileForResolutionPreset(
^
symbol:   class EncoderProfiles
location: class ResolutionFeature
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:8: error: cannot find symbol
import android.media.EncoderProfiles;
^
symbol:   class EncoderProfiles
location: package android.media
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:24: error: cannot find symbol
private final EncoderProfiles encoderProfiles;
^
symbol:   class EncoderProfiles
location: class MediaRecorderBuilder
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:36: error: cannot find symbol
@NonNull EncoderProfiles encoderProfiles, @NonNull String outputFilePath) {
^
symbol:   class EncoderProfiles
location: class MediaRecorderBuilder
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:51: error: cannot find symbol
@NonNull EncoderProfiles encoderProfiles,
^
symbol:   class EncoderProfiles
location: class MediaRecorderBuilder
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:186: error: cannot find symbol
@TargetApi(Build.VERSION_CODES.S)
^
symbol:   variable S
location: class VERSION_CODES
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/Camera.java:208: error: reference to MediaRecorderBuilder is ambiguous
mediaRecorderBuilder = new MediaRecorderBuilder(getRecordingProfileLegacy(), outputFilePath);
^
both constructor MediaRecorderBuilder(CamcorderProfile,String) in MediaRecorderBuilder and constructor MediaRecorderBuilder(EncoderProfiles,String) in MediaRecorderBuilder match
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:118: error: cannot find symbol
EncoderProfiles profile =
^
symbol:   class EncoderProfiles
location: class ResolutionFeature
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:120: error: package EncoderProfiles does not exist
List<EncoderProfiles.VideoProfile> videoProfiles = profile.getVideoProfiles();
^
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:121: error: package EncoderProfiles does not exist
EncoderProfiles.VideoProfile defaultVideoProfile = videoProfiles.get(0);
^
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:200: error: cannot find symbol
return CamcorderProfile.getAll(cameraIdString, CamcorderProfile.QUALITY_HIGH);
^
symbol:   method getAll(String,int)
location: class CamcorderProfile
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:204: error: cannot find symbol
return CamcorderProfile.getAll(cameraIdString, CamcorderProfile.QUALITY_2160P);
^
symbol:   method getAll(String,int)
location: class CamcorderProfile
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:208: error: cannot find symbol
return CamcorderProfile.getAll(cameraIdString, CamcorderProfile.QUALITY_1080P);
^
symbol:   method getAll(String,int)
location: class CamcorderProfile
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:212: error: cannot find symbol
return CamcorderProfile.getAll(cameraIdString, CamcorderProfile.QUALITY_720P);
^
symbol:   method getAll(String,int)
location: class CamcorderProfile
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:216: error: cannot find symbol
return CamcorderProfile.getAll(cameraIdString, CamcorderProfile.QUALITY_480P);
^
symbol:   method getAll(String,int)
location: class CamcorderProfile
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:220: error: cannot find symbol
return CamcorderProfile.getAll(cameraIdString, CamcorderProfile.QUALITY_QVGA);
^
symbol:   method getAll(String,int)
location: class CamcorderProfile
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:224: error: cannot find symbol
return CamcorderProfile.getAll(cameraIdString, CamcorderProfile.QUALITY_LOW);
^
symbol:   method getAll(String,int)
location: class CamcorderProfile
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:241: error: package EncoderProfiles does not exist
List<EncoderProfiles.VideoProfile> videoProfiles = recordingProfile.getVideoProfiles();
^
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:243: error: package EncoderProfiles does not exist
EncoderProfiles.VideoProfile defaultVideoProfile = videoProfiles.get(0);
^
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:32: error: reference to MediaRecorderBuilder is ambiguous
this(camcorderProfile, outputFilePath, new MediaRecorderFactory());
^
both constructor MediaRecorderBuilder(CamcorderProfile,String,MediaRecorderFactory) in MediaRecorderBuilder and constructor MediaRecorderBuilder(EncoderProfiles,String,MediaRecorderFactory) in MediaRecorderBuilder match
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:79: error: package EncoderProfiles does not exist
EncoderProfiles.VideoProfile videoProfile = encoderProfiles.getVideoProfiles().get(0);
^
/home/aakash/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+5/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:80: error: package EncoderProfiles does not exist
EncoderProfiles.AudioProfile audioProfile = encoderProfiles.getAudioProfiles().get(0);
^
27 errors
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':camera:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 20s
Exception: Gradle task assembleDebug failed with exit code 1

May i know the minSdk version of the project?

Hi @aakashtyagiwmp, Thanks for filing the issue. This is a duplicate of https://github.com/flutter/flutter/issues/93714 (closed).
Please set the target SDK version to 31 as mentioned here https://github.com/flutter/flutter/issues/93714#issuecomment-970390516 and that should resolved the build failure.
Closing as this is already resolved. Feel free to write back if you still encounter the issue.

issue is resolved

Thanks sir.


Remove unused fortawesome dependency

The dependency below doesn't appear to be imported anywhere in our the UI.
https://issues.redhat.com/browse/COST-2700

Codecov Report

Merging #2389 (bee68fe) into main (a2ac5a9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##             main    #2389    +/-   ##
========================================
  Coverage   70.11%   70.11%
========================================
  Files         409      409
  Lines        7790     7790
  Branches     1836     1836
========================================
  Hits         5462     5462
+ Misses       2325     2221   -104
- Partials        3      107   +104

Impacted Files
Coverage Δ

src/utils/cookie.ts
58.33% <0.00%> (ø)

src/utils/format.ts
67.70% <0.00%> (ø)

src/api/orgs/orgUtils.ts
37.50% <0.00%> (ø)

src/api/queries/query.ts
43.85% <0.00%> (ø)

src/utils/localStorage.ts
79.74% <0.00%> (ø)

src/store/metrics/selectors.ts
75.86% <0.00%> (ø)

src/api/resources/resourceUtils.ts
17.18% <0.00%> (ø)

src/components/exports/exportsLink.tsx
43.75% <0.00%> (ø)

src/components/permissions/permissions.tsx
22.05% <0.00%> (ø)

src/pages/components/currency/currency.tsx
31.25% <0.00%> (ø)

... and 24 more

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 a2ac5a9...bee68fe. Read the comment docs.


[Windows] Fix TestProcess.swift

Modified the error handling of launching a process in a non existing
working directory so that it matches POSIX behaviour. This causes all
the Process tests to pass on Windows now.

@swift-ci please test


Fix variable name typo in README

Hey 👋 ,
the variable name in the usage demo has been mixed up.

Good catch! 👍


Fix cocl bug under Fedora 25.

Fedora 25 has '-grecord-gcc-switches' in llvm-config --cxxflags. Simply removing ' -g' will mess this up.

Thanks!


Auxillary connection information for a secret

Issue type
[X] Feature request
[ ] Bug report
[ ] Documentation

Environment

Python version:  3.4.5
NetBox version:  2.2.6

Many of our secrets involve the use of additional information in order to authenticate with a device or service on a device.  This is non-sensitive information related  to the secret.  It might be a connection endpoint for a service such as https://host:port/service or a information about a 2FA mechanism.  In extreme cases we may make notes about use or purpose of access related to a secret.
We envision this could be accomplished any number of ways, the most flexible of which would be custom fields for secrets.  The addition of 2 fields, one for connection information and one for connection notes would help.

The secret model is intended solely to hold sensitive data. Services and other ancillary data should be modeled elsewhere (in fact, there is a service model specifically for this). Could you explain exactly what it is you're trying to do?

There are commonly other pieces of information hat are required in order to use a secret.  Specific examples follow:

Multiple instances of software such as MS SQL Server installed on a single device with different SQL user’s in each instance.  We have no way to document which secrets on the device tie to which instances of SQL server on that same device in netbox.

In 2FA scenarios, it is handy to know what apparatus, phone number, email address, etc is to be used to acquire the secondary authentication information.

Some secrets are only valid in certain scenarios on a device — for example against certain services.  For example a root account password might be accepted via console but not via SSH.  It would be handy to document this in some way — custom fields would go a long way on secrets.

On Nov 29, 2017, at 2:02 PM, Jeremy Stretch<EMAIL_ADDRESS>wrote:
The secret model is intended solely to hold sensitive data. Services and other ancillary data should be modeled elsewhere (in fact, there is a service model specifically for this). Could you explain exactly what it is you're trying to do?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/digitalocean/netbox/issues/1739#issuecomment-347961987, or mute the thread https://github.com/notifications/unsubscribe-auth/AFj-lKwPG4Dha4trZEWDagZ0qfraINV0ks5s7apVgaJpZM4QtxcA.

Enabled custom fields for secrets in 0c0799f for the v2.4 release.


abstract IncrementalIndex cursor stuff to prepare for using different "views" of the data based on the cursor build spec

changes:

introduce IncrementalIndexRowSelector interface to capture how IncrementalIndexCursor and IncrementalIndexColumnSelectorFactory read data
IncrementalIndex implements IncrementalIndexRowSelector
move FactsHolder interface to separate file
other minor refactorings

This has already been backported in #17257 , so added it to the milestone.


New script to filter relative dev requirements

Script to remove relative reference to azure packages from dev requirements ( helper scripts for tox tests)

Can one of the admins verify this patch?


chore: update System.Text.Json to latest

Pull Request Test Coverage Report for Build<PHONE_NUMBER>6
Details

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

Totals

Change from base Build<PHONE_NUMBER>1:
0.0%

Covered Lines:
823

Relevant Lines:
979

💛  - Coveralls


Support for String.CompareTo

Might be related to #1767.
I have some classes that returns expressions that afterwards are compiled into a final expression. This code does not translates to SQL:
        public override Expression<Func<Comment, bool>> GetAfterExpression(Comment after)
        {
            if (IsDescending)
            {
                return m => m.Path.CompareTo(after.Path) > 0;
            }
            else
            {
                return m => m.Path.CompareTo(after.Path) < 0;
            }
        }

The warning is:
warn: Microsoft.Data.Entity.Query.Internal.SqlServerQueryCompilationContextFactory[0]
      The LINQ expression '([f].Path.CompareTo(__after_Path_1) < 0)' could not be translated and will be evaluated locally.

Is this the expected behavior?
Update:
If I switch to this:
        public override Expression<Func<Comment, bool>> GetAfterExpression(Comment after)
        {
            if (IsDescending)
            {
                return m => string.Compare(m.Path, after.Path) > 0;
            }
            else
            {
                return m => string.Compare(m.Path, after.Path) < 0;
            }
        }

I get an exception with this bug: #3464
fail: Microsoft.AspNet.Diagnostics.DeveloperExceptionPageMiddleware[0]
      An unhandled exception has occurred while executing the request
      System.InvalidOperationException: Extension node must override the property Expression.Type.
         at System.Linq.Expressions.Expression.get_Type()
         at System.Linq.Expressions.Expression.AndAlso(Expression left, Expression right, MethodInfo method)
         at Microsoft.Data.Entity.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor.VisitBinary(BinaryExpression binaryExpression)
         at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor visitor)
         at Remotion.Linq.Parsing.ThrowingExpressionVisitor.Visit(Expression expression)
         at Microsoft.Data.Entity.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor.Visit(Expression expression)
         at Microsoft.Data.Entity.Query.RelationalQueryModelVisitor.VisitWhereClause(WhereClause whereClause, QueryModel queryModel, Int32 index)
         at Remotion.Linq.Clauses.WhereClause.Accept(IQueryModelVisitor visitor, QueryModel queryModel, Int32 index)
         at Remotion.Linq.QueryModelVisitorBase.VisitBodyClauses(ObservableCollection`1 bodyClauses, QueryModel queryModel)
         at Remotion.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel)
         at Microsoft.Data.Entity.Query.EntityQueryModelVisitor.VisitQueryModel(QueryModel queryModel)
         at Microsoft.Data.Entity.Query.RelationalQueryModelVisitor.VisitQueryModel(QueryModel queryModel)
         at Microsoft.Data.Entity.Query.Internal.SqlServerQueryModelVisitor.VisitQueryModel(QueryModel queryModel)
         at Microsoft.Data.Entity.Query.EntityQueryModelVisitor.CreateAsyncQueryExecutor[TResult](QueryModel queryModel)
         at Microsoft.Data.Entity.Storage.Database.CompileAsyncQuery[TResult](QueryModel queryModel)
         at Microsoft.Data.Entity.Query.Internal.QueryCompiler.<>c__DisplayClass19_0`1.<CompileAsyncQuery>b__0()
         at Microsoft.Data.Entity.Query.Internal.CompiledQueryCache.GetOrAddAsyncQuery[TResult](Object cacheKey, Func`1 compiler)
         at Microsoft.Data.Entity.Query.Internal.QueryCompiler.CompileAsyncQuery[TResult](Expression query)
         at Microsoft.Data.Entity.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query)
         at Microsoft.Data.Entity.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression)
         at Microsoft.Data.Entity.Query.Internal.EntityQueryable`1.System.Collections.Generic.IAsyncEnumerable<TResult>.GetEnumerator()
         at System.Linq.AsyncEnumerable.Aggregate[TSource,TAccumulate,TResult](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, Func`2 resultSelector, CancellationToken cancellationToken)
         at System.Linq.AsyncEnumerable.Aggregate[TSource,TAccumulate](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, CancellationToken cancellationToken)
         at System.Linq.AsyncEnumerable.ToList[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken)
         at Microsoft.Data.Entity.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
         at Chincheta.Data.EntityFramework.ReadOnlyModelRepository`1.<GetAsync>d__11`1.MoveNext() in E:\Repositories\Chincheta\src\Chincheta.Data.EntityFramework\ReadOnlyModelRepository.cs:line 74
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
         at Chincheta.Data.EntityFramework.ReadOnlyModelRepository`1.<GetListingAsync>d__22.MoveNext() in E:\Repositories\Chincheta\src\Chincheta.Data.EntityFramework\ReadOnlyModelRepository.cs:line 233
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
         at Chincheta.Managers.ModelManagerBase`1.<GetListingAsync>d__20.MoveNext() in E:\Repositories\Chincheta\src\Chincheta.Core\Managers\ModelManagerBase.cs:line 79
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
         at Chincheta.Managers.CommentManager.<GetDescendantsAsync>d__11.MoveNext() in E:\Repositories\Chincheta\src\Chincheta.Core\Managers\CommentManager.cs:line 152
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
         at Chincheta.Web.Areas.Posts.Controllers.CommentsController.<Index>d__3.MoveNext() in E:\Repositories\Chincheta\src\Chincheta.Web\Areas\Posts\Controllers\CommentsController.cs:line 57
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Mvc.Controllers.ControllerActionExecutor.<CastToObject>d__8`1.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker.<InvokeActionAsync>d__6.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
         at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.<InvokeActionFilterAsync>d__53.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.<InvokeAsync>d__44.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.<RouteAsync>d__6.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute.<RouteAsync>d__10.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Routing.RouteCollection.<RouteAsync>d__9.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Session.SessionMiddleware.<Invoke>d__8.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at Microsoft.AspNet.Session.SessionMiddleware.<Invoke>d__8.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.IISPlatformHandler.IISPlatformHandlerMiddleware.<Invoke>d__8.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Diagnostics.StatusCodePagesMiddleware.<Invoke>d__3.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Diagnostics.Entity.MigrationsEndPointMiddleware.<Invoke>d__5.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.<Invoke>d__6.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.<Invoke>d__6.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Microsoft.AspNet.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__7.MoveNext()

To answer the questions: Path is a string.

What would be the SQL translation?

@ErikEJ I guess it depends on what type is Path.
For numeric values for instance, it's very easy to translate to SQL.

@ErikEJ a simple WHERE Path > 'something'.

@Villason in SQL (well at lest on MSSQL), strings comparison is simply a length comparison
Anyway it's translatable, but probably not supported.
Did you check if it was supported in EF 6 or not?

@gdoron that is not correct. > and < operands compare the strings "alphabetically".

@Villason ohh my bad, this was what I remembered...
Anyway I think I have never had to use string comparison in SQL.
(Except obviously from sorting)

@gdoron well, this is why I am using it. The code is part of a "Load more" pattern implementation.

This should be working in 1.0.0 already. @Villason - Can you verify?


Add pyarrow 14.0.1

Hi @jayqi, could you please add pyarrow 14.0.1 to the runtime?
Thanks

@rasyidstat Due to subdependency conflicts, I have added pyarrow v12.0.1 instead of v14.0.1. If you specifically need v14.0.1, then let me know and we can try to work out the conflicts with other dependencies.
https://github.com/drivendataorg/water-supply-forecast-rodeo-runtime/commit/2754072b934694f47510f0697a2af97c1afe5c10


Tasks in linux

There is no way to create a persistent local task, the session will be closed or disconnected and the task will terminate.
In addition, nohup has & characters and cannot be used in powershell
Steps to reproduce

Expected behavior

Actual behavior

Environment data

If you would like to see a PowerShell-native solution, I suggest you flesh out your proposal with more details and use cases.
Generally, please use the right issue template, and fill in the section templates.

In addition, nohup has & characters and cannot be used in powershell

The nohup utility doesn't itself use &; it is typically called with Bash's postpositional & operator so as to launch the program passed to nohup in the background, given that nohup itself executes synchronously.
While using PowerShell's & background operator (or Start-Job) isn't an option, because terminating the job will also terminate child processes launched from it, you can use Start-Process to achieve the desired effect.
The following example launches a background PowerShell instance that stays alive even after you close the launching terminal; it emits a .  every second, and nohup collects both stdout and stderr output in file nohup.out in the current directory:
Start-Process nohup 'pwsh -nop -c "while ($true) { write-host . -nonewline; sleep 1 }"'

It does not have a consistent experience, so what is the significance of the existence of powershell?

To recap:

Your initial post contained a cursory reference to a scenario that currently isn't natively supported in PowerShell (and generally has no direct, tool-based implementation on Windows).

I encouraged you to detail the scenario, make a case for it, and perhaps suggest a design / implementation. I personally can see that providing PowerShell-specific, cross-platform support (including in Windows) for this scenario could be useful.

Your initial post also contained misleading information about nohup, which I've tried to correct, along with showing how make nohup work in PowerShell, after all.

If you disagree with the correction or have a problem with the workaround, please argue specific points.

As you can see, there are constructive ways to respond to the feedback you've been given; your previous comment doesn't fall into that category.

@mklement0
1 Why should I use ‘nohup + bash’ in powershell?
My main powershell process needs to exit, and keep subprocess run（bash）
using bash -c instead of pwsh -c, mainly because pwsh occupies more memory.
2 How to use nohup + & in powershell?
$nohupargs = @"
bash -c "docker pull xxx"> /dev/null 2>&1 &
"@
Start-Process -FilePath /usr/bin/nohup -ArgumentList $nohupargs
3 What's wrong with this use?
This usage is not perfect, "> /dev/null" does not work,"nohup.out" file always found.
if main process is bash ,"> /dev/null" will work.

oh,I was the one who just got stuck. With start-process, nohup is not needed.

@kasini3000
You do need nohup if you want the process to stay alive after exiting the originating shell.
It is only on Windows you don't need it, because Start-Process can create separate console windows there, which you can hide with -WindowStyle Hidden; e.g.:
# Runs for 2 minutes and collects all output in ./out.txt
Start-Process -WindowStyle Hidden pwsh '-c "1..120 | % { Write-Output . >> out.txt; sleep 1 }"'

There's no need to involve bash in your example, assuming you don't mind collecting output in nohup.out:
# Short for: Start-Process -FilePath /usr/bin/nohup -Args 'docker pull xxx'
Start-Process /usr/bin/nohup 'docker pull xxx'

If you do want to suppress all output, you can do what you did, except you don't need the trailing &, and you must place the redirections inside the -c argument:
Start-Process /usr/bin/nohup 'bash -c "docker pull xxx >/dev/null 2>&1"'

However, note that nohup always creates a nohup.out file - even if no output is produced.
(If there is output and a nohup.out file already exists, it is appended to.)

It turned out to be so, thank you


What is next?

This is a list of possible items that I am thinking about the potential next version
There will be breaking changes, the goal is API similarity but not full api compatibility

Use the new context api, making the library depend on react 16.3 and above
Drop SVG support and go full canvas, however provide the ability for each component to create and render their own markup (html or svg)
In the beginning react-stockcharts supported svg only, then canvas was added later, this has led to all the props having svg attributes, like stroke in svg is strokeStyle on canvas, strokeDashArray in svg is lineDash in canvas, since the decision to drop svg support, it makes sense to use canvas properties all around.
Ability to contain Chart in a different component, till 0.7.x

<ChartCanvas ...>
  <MainChart />
</ChartCanvas>

//   MainChart.js
<Chart id=... ...>
  ...
</Chart>

is not possible, every Chart has to be a direct child of ChartCanvas

Add Flow / Typescript (or may be use Reason?) definitions for every component. I am leaning towards Flow
Rename ChartCanvas ->  Plot and Chart -> SubPlot it is confusing for beginners to understand or explain that multiple Charts make up a single component. Plot/SubPlot is the naming used by matplotlib in python

and some smaller issues I have seen over time which I wish to solve in the new version

Dynamic width yaxis
Y axis tick values, (esp for crypto currencies) run like 0.000001234, there are also tickers which need to show just 2 precision, This makes the width of the y axis dynamic, depending on the data shown, till v 0.7.x it is not possible have a dynamic width y axis tick.

Don't bother about resize

How to fit the chart to the height and width of the container?

is possibly the most asked question here. In the new version I want to make resize to fit the container the default behavior.

@WaiSiuKei awesome work. will certainly take ideas from cc

I love the roadmap :100:

happy to help with dynamic resize, I've actually gotten this working in my project where I'm using this lib

This is an awesome roadmap. It would also be great if there's additional updates to the documentation as I found it really tough figuring out how to do a lot of things without knowing too much about D3. Great job with the lib!

I believe Flow would be a mistake. The defacto strongly typed language used for libraries is TS (either completely written in the language or at least providing definition files).
The community around React + TS is larger when compared to Flow. There are several articles out there comparing the two, but given the maturity of the ecosystem and the tooling built around and for TS I believe using Flow would be wasted effort going forward.


Feature Request: Tuning Table

Description
Now: Sampler is tuned for 12 Tone Equal Temperament (12TET), defined in #define NOTE_HZ(midiNoteNumber) ( 440.0f * pow(2.0f, ((midiNoteNumber) - 69.0f)/12.0f) ) in CoreSampler.cpp
New: Add possibilty to load tunings from AudioKit/Microtonality:TuningTable.
Proposed Solution
Maybe full feature set of Tuning Table is not needed. Could limit it like SynthOne does:

Tunings are stored in a tuning table of size 128 (a mapping from midi note number to frequency)
Tunings are octave-based, so there is always a well-defined notion of "notes-per-octave" used (to scale samples). However, AudioKit TuningTable is generalized and has no limitation on whether a tuning is octave-based or not.
The "pitch wheel" is a log2(frequency) modulo 1 representation of the frequencies of one octave of the tuning table with middle C (note number 60) as 12 o'clock

Additional Context

Could this new "noteDetune" on SampleDescriptor make DunneSampler compliant to TuningTable of our Microtonality Package?
Good overview of Microtonality and AudioKit, written by Marcus Hobbs with videos: https://audiokitpro.com/tuneup/

implemented with https://github.com/NickCulbertson/DunneAudioKit/commit/56295dfd85c0c4e7e892b22f7c943bc2d4d64bef

Add the notes of the issue to documentation.


Documentation refers to out of date concept "macros"

In the documentation "Integrating javascript tags with Google Tag Manager" it refers to "macros" and various out of date screenshots.
Macros as such do not exist anymore in Google Tag Manager.
Suggested solution: new screenshots + rewrite text.

https://github.com/contact?report=0xABAB

@alexanderdean - Updated the larger half of the doc. The new version of GTM is quite different. It's time consuming to update all the screenshots and instructions due to the sheer size of the article and the fact I have never used GTM before. You can either push what I currently modified or wait till I complete the whole page.

Thanks - let's wait!

@alexanderdean - please, review and push (can be closed).

Hi @ihortom - which pages are updated for this ticket?

@alexanderdean - https://github.com/snowplow/snowplow/wiki/Integrating javascript tags with Google Tag Manager. Are there any more? The local copy is here.

Thanks @ihortom - the best people to review this are @yalisassoon and @fblundun - assigning to Yali to review. I can push once finalized.

@yalisassoon - could you, please, review the page. There are so many in the "backlog" because of this waiting to be pushed. The local copy I created is here.
Note the last screenshot (preview) does not reflect the actual scenario discussed on the page but it is the representation of the current Google look. Thus if you do have (or can produce) that screenshot for  the actual scenario, please, share.
/cc @alexanderdean / @fblundun

"//://{{SUBDOMAIN}}.cloudfront.net/sp.js.cloudfront.net/2.6.0/sp.js"
should be
"//{{SUBDOMAIN}}.cloudfront.net/sp.js.cloudfront.net/2.6.0/sp.js"
Other than that it looks good to me...

@fblundun - thanks for spotting this. Corrected.

Looks great @ihortom! I've added a screenshot here: setup-guide/images/gtm-debug.png @alexanderdean please merge.

Merged!

@alexanderdean - updated the last screenshot (kindly provided by @yalisassoon)

Re-pushed


Setting up continuous integration server

Following our conversation I would like to set up a minimal continuous integration server for us. I will do a bit of research in the coming days on the best strategy to do this.
The problem I see, straight away is that I don't want to break minimality of MUI, but any kind of testing will require to create executables. I will study now how other header only library do this. Perhaps they have a minimal Make/CMake/autoconf to create tests separately.
In one of my older projects I have tests compile as an option. If the user wanted test to compile gtest and benchmark were downloaded. This is also something to consider. @yhtang @SLongshaw please let me know if you have any thoughts on it.
Expect updates on this and a pull request from my fork.

@robertsawko, did you have any further thoughts on this? I've used Travis CI in the past, which is free for open-source. If everyone is happy, I can set this up, and start some minimal testing based on the ping-pong app as a starting point.

I'm going to close this issue as it has been open for a long time with the added comment that the need for introducing CI for the library is extremely important and will be done ASAP.
Most likely this will be done using Travis CI.


feat(all): rewrite configuration and options management

Closes https://github.com/ekino/drupal-debug/issues/6, https://github.com/ekino/drupal-debug/issues/7, https://github.com/ekino/drupal-debug/issues/9 and https://github.com/ekino/drupal-debug/issues/10.
Needs a lot of tests but the base is here.

I'm gonna merge it so people can actually test it by being on dev-master and add / update tests / write doc in others pull requests.


A ECRAccessRead policy will enable Cloudbreak client to describe repo…

…sitories. CDP has a new feature which requires customers to define custom ECR repositories and Cloudbreak client will need to have rights to be able to describe repositories if the custome repo is defined on the same account.
See detailed description in the commit message.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

yes

Can one of the admins verify this patch?

yes


Allow for easier subclassing

Type of changes
Allow for DRY:er subclasses by allowing us to reuse Heading.create

[ ] Bug fix
[ ] New feature
[ ] Documentation / docstrings
[ ] Tests
[x] Other

Checklist

[x] I've run the latest black with default args on new code.
[ ] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.

There's no CONTRIBUTORS.md file to update, I did update the CHANGELOG.md

[ ] I've added tests for new code.

This is a tiny change mainly changing one function to adhere to the other functions. Since you are currently not testing subclassing for the other classes I didn't add anyone here.

[x] I accept that @willmcgugan may be pedantic in the code review.

Description
Please describe your changes here. If this fixes a bug, please link to the issue, if possible.
The markdown.Headings class unlike all other MarkdownElement subclasses were using an explicit self reference in it's factory/create-method. This forced us to overload the create-method every time subclassing Heading so that we could reference the new subclass instead (or as I used, a self reference). By using the implicit cls-reference instead we don't need to overload the create method making code inheriting Heading DRY:er and less error-prone if create-method internals is changed in the future. All the other markdown element classes already uses this approach.
Example of how a Heading subclass could look today:
class SubtleHeading(Heading):
    @classmethod
    def create(cls, markdown: "Markdown", node: Any) -> "Heading":
        heading = cls(node.level)
        return heading

    def __init__(self, level):
        # Defering all headings by one level to avoid the borderd box for H1, hence level 2 is max
        super().__init__(level + 1)

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        # Overwriting this to avoid the center-alginment
        # h1 is unused since we defer all levels by one level
        text = self.text
        # Styled text for h2 and beyond
        if self.level == 2:
            yield Text("\n")
        yield text

Same change after this PR:
class SubtleHeading(Heading):
    def __init__(self, level):
        # Defering all headings by one level to avoid the borderd box for H1, hence level 2 is max
        super().__init__(level + 1)

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        # Overwriting this to avoid the center-alginment
        # h1 is unused since we defer all levels by one level
        text = self.text
        # Styled text for h2 and beyond
        if self.level == 2:
            yield Text("\n")
        yield text

For additional background, I discovered this as a follow up to this twitter thread.

Thanks.


Cannot disable AppBar leading if use StreamBuilder (null-safety)

Use case

I want to control AppBar leading manually.
To build widget for the leading with StreamBuilder, I must return a widget. I cannot return null in case I don't need the leading because the builder is typedef AsyncWidgetBuilder<T> = Widget Function(BuildContext context, AsyncSnapshot<T> snapshot); which only accepts non-nullable value.
Proposal

builder method should allow to return null.

@nguyenxndaidev
can you provide a minimal reproducible code sample,
what about passing as nullable element in the stream ? StreamBuilder<Foo?>(...

@nguyenxndaidev
can you provide a minimal reproducible code sample,
what about passing as nullable element in the stream ? StreamBuilder<Foo?>(...

return Scaffold(
      appBar: AppBar(
        leading: StreamBuilder<bool>(
          stream: myStream,
          builder: (BuildContext context, AsyncSnapshot snapshot) {
            // if blalala return Icon

            // leading accepts Widget? (nullable type)
            // but StreamBuilder.builder method doesn't allow to return null! It forces to have a Widget as a result.
            return null;
          },
        ),
      ),
    );

return Scaffold(
      appBar: AppBar(
        leading: StreamBuilder<bool>(
          stream: myStream,
          builder: (BuildContext context, AsyncSnapshot snapshot) {
            // if blalala return Icon

            // leading accepts Widget? (nullable type)
            // but StreamBuilder.builder method doesn't allow to return null! It forces to have a Widget as a result.
            return null;
          },
        ),
      ),
    );

what about passing as nullable element in the stream ? StreamBuilder<Foo?>(...

it's the input of the stream. I am only talking about the output of the builder method.

what about passing as nullable element in the stream ? StreamBuilder<Foo?>(...

it's the input of the stream. I am only talking about the output of the builder method.

I can reproduce this issue. As a workaround you can return SizedBox.shrink(), I didn't tested this but it will return a widget with no size.

code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        appBar: AppBar(
          title: Text('PageA'),
          leading: StreamBuilder<bool?>(
            stream: null,
            builder: (context, shot) {
              return null;
            },
          ),
        ),
      ),
    );
  }
}

I can reproduce this issue. As a workaround you can return SizedBox.shrink(), I didn't tested this but it will return a widget with no size.

code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        appBar: AppBar(
          title: Text('PageA'),
          leading: StreamBuilder<bool?>(
            stream: null,
            builder: (context, shot) {
              return null;
            },
          ),
        ),
      ),
    );
  }
}

SizedBox.shrink()

It doesn't work. I think AppBar only remove leading if it's null. Otherwise, and empty space is always added. Currently, my workaround is to add an icon to my app to avoid this useless space to users.

SizedBox.shrink()

It doesn't work. I think AppBar only remove leading if it's null. Otherwise, and empty space is always added. Currently, my workaround is to add an icon to my app to avoid this useless space to users.

any update on this. I'm having the same issue

Same with FlexibleSpaceBar::background. I have to wrap the whole FlexibleSpaceBar in StreamBuilder and have to rebuild multiple widgets just to set background.

I think  StreamBuilder could be used differently
import 'package:flutter/material.dart';

Stream<bool> get _hasLeading async* {
  while (true) {
    await Future.delayed(const Duration(seconds: 1));
    yield DateTime.now().second % 2 == 0;
  }
}

void main() => runApp(
      MaterialApp(
        title: 'Flutter Demo',
        home: StreamBuilder<bool>(
          stream: _hasLeading,
          builder: (context, isLeading) => Scaffold(
            appBar: AppBar(
              title: const Text('PageA'),
              leading: isLeading.data == true ? const FlutterLogo() : null,
            ),
          ),
        ),
      ),
    );

cc @darshankawar

@iapicca your snippet unnecessarily rebuilds Scaffold and AppBar for each _hasLeading stream value.
The ideal behavior would be to rebuild just the leading property.

Hi @xuan-nguyen-swe,  I believe that this is working as intended, StreamBuilder must return a widget (regardless of where it is located in the widget tree including around AppBar.leading). So As mentioned above its okay to return an empty widget when you don't need one using SizedBox.shrink.
Heres is a modified code sample

modified code sample
import 'dart:async';

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  bool showLeading = false;
  final leadingController = StreamController<bool>();

  void toggleLeading() {
    showLeading = !showLeading;
    leadingController.add(showLeading);
  }

  MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('PageA'),
          leading: StreamBuilder<bool?>(
            stream: leadingController.stream,
            builder: (context, snapshot) {
              if (showLeading) {
                return IconButton(
                  icon: const Icon(
                    Icons.arrow_back,
                  ),
                  onPressed: () {
                    Navigator.of(context).pop();
                  },
                );
              }
              return const SizedBox.shrink();
            },
          ),
        ),
        body: Center(
          child: ElevatedButton(
              onPressed: toggleLeading, child: const Text(' Toggle')),
        ),
      ),
    );
  }
}

flutter doctor -v (mac)
[✓] Flutter (Channel master, 3.7.0-3.0.pre.33, on macOS 12.6 21G115 darwin-arm64, locale en-IN)
    • Flutter version 3.7.0-3.0.pre.33 on channel master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision<PHONE_NUMBER> (38 minutes ago), 2022-12-05 18:27:21 -0800
    • Engine revision a309d239c4
    • Dart version 2.19.0 (build 2.19.0-463.0.dev)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.55.20221129

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 108.0.5359.94

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[✓] Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-arm, locale en-IN)
    • Flutter version 3.3.9 on channel stable at /Users/mahesh/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (24 hours ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.53.20221101

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Closing as this is working as intended, Incase you disagree feel free to write in the comments and we will reopen it.
Thank you.

I haven't dug back into this in a while, but if nothing has changed than the point mentioned in this comment is still an issue.

SizedBox.shrink()

It doesn't work. I think AppBar only remove leading if it's null. Otherwise, and empty space is always added. Currently, my workaround is to add an icon to my app to avoid this useless space to users.


Coordinates Stored Incorrectly in v2.1.0

Hello!
After updating to v2.1.0, the value stored in the database for LocationField() has flipped on me. For example, an old record using v2.0.0 shows -99.91433437500096,44.55426270755038 (lng,lat), but after installing v2.1.0, the value is stored as 44.55426270755038,-99.91433437500096 (lat,lng).
This is a problem as rendering old values now cause problems as the -99 causes MapBox's Map() to throw an error with the invalid lat value.
First glance doesn't really indicate anything obvious as to why this changed, but this is definitely an issue as values should be stored in lng,lat format since v1.4.0.

@simon-the-shark - I spent some time looking at this, and the removal of forms.LocationField.to_python() is what changed the storage of the values in the database from being lng,lat to lat,lng.
That said, what should the intended behavior be? Should this be configurable, or is this a breaking change?

@simon-the-shark We have the same problem. After updating to 2.1.0 the existing locations are messed up in the view.


Add some HTTP security-related headers

Hi,
This PR adds some HTTP headers that will raise the grade from F to B (Grafana), F to A (Node-Red) on https://securityheaders.com.
Also, https://www.ssllabs.com now gives an A+.
@terrillmoore There are still Referrer-Policy and Feature-Policy left to be defined, but those are kind of touchy. If you have any ideas, please let me know !
Regards,

This looks good to me, thank you. You ready for me to merge?

Hi, please don't yet.
Some last minutes changes to be fixed:

noticed the double Http Only rewrite for grafana cookies
also droping (my previously wrong) CSP header for Grafana sends back to B
also not sure if influxdb deserves all those headers ?
node red looks ok
had to add the cookie proxy pass rewrite for Grafana since that would break cookies for Traccar (the other app I'm adding right now, but no idea if this would be of interest to you)
Basically it's not that urgent to merge this, better take some more time ?

@terrillmoore I think it's ok now !

ssllabs.com: A+
securityheaders.com:

A+ for InfluxDB
A for Grafana and Node-Red

Thanks!

You're welcome !
Found a #ttn on freenode is this related to the project ?

I'm not much involved with freenode (slack, etc., sort of fill my time) -- it's possible. #ttn is often used as the abbreviation for "The Things Network".  There's much traffic at thethingsnetwork.org and on the global thingsnetwork slack; not sure if they also have a freenode group.

Religion forbids me using proprietary software :(


Sleeves are not validating job assignment

I'm not yet sure if this is a known v2 bug, but it's currently possible for your scripts to assign a sleeve a task using the ram dodge, but the sleeve doesn't actually switch tasks, and your script has no way of confirming that because the ram dodge returned a true even though the sleeve assignment failed.
I'm still trying to hunt down the root cause, but putting this out here if anyone else wants to help with the digging.
I added some basic logging to confirm the issue.
Here is sleeve.js trying to assign a sleeve a task:
INFO: Using a temporary script (/Temp/sleeve-setToBladeburnerAction.txt.js) to execute the command:
let r;try{r=JSON.stringify(
ns.sleeve.setToBladeburnerAction(ns.args[0], ns.args[1], ns.args[2])
);}catch(e){r="ERROR: "+(typeof e=='string'?e:e.message||JSON.stringify(e));}
const f="/Temp/sleeve-setToBladeburnerAction.txt"; if(ns.read(f)!==r) await ns.write(f,r,'w')
With the following arguments:    [6,"Field Analysis",""]
Process 139 is done. Reading the contents of /Temp/sleeve-setToBladeburnerAction.txt...
Read the following data for command ns.sleeve.setToBladeburnerAction(ns.args[0], ns.args[1], ns.args[2]):
true    <-- ram dodge getNsDataThroughFile() returns true
SUCCESS: Set sleeve 6 to Bladeburner Field Analysis
LOG: But Sleeve is actually doing RECOVERY <-- live check of ns.sleeve.getTask(i).type shows task did not change.
INFO: Sleeve 6 is doing Field Analysis in Bladeburner.

Indeed, there appears to be a game bug that incorrectly returns "true" for all bladeburner actions, even if they've failed.
That said, I think I also have a bug here that's resulting in the task not being set correctly (perhaps "Field Analysis" is not the correct string). I'll dig into the code and see.

I stumbled upon this when I realized the script struggled to assign any job to sleeve 6, and only sleeve 6.  There is definitely weirdness going on with sleeves in general in v2.

Figured this out - the game now expects lower-case "a" "Field analysis" rather than "Field Analysis" - the code that tests this is currently very strict and case-sensitive.
Doesn't fix the overall validation of job assignments, but I think I'll just wait on the game to fix that rather than add a workaround.


Add (set_)?{send,recv}_buffer_size methods for UdpSocket

Hey there! I saw in this issue that the SO_* options will be introduced with socket2, but that you are accepting PRs.
This PR largely duplicates the SO_SNDBUF/SO_RCVBUF-related methods on TcpSocket for UdpSocket.
I called these set_{send/receive}_buffer_size/{send/receive}_buffer_size since most of the methods in this project seem to follow this naming scheme. However, for TcpSocket they are currently named set_{send/receive}_buffer_size/get_{send/receive}_buffer_size. Please let me know if the latter get_ naming scheme is preferred.

This would be a lot easier with a lot less code if #1431 is merged first.

This would be a lot easier with a lot less code if #1431 is merged first.

Looks good, I can resubmit this one once the #1431 landed.

Looks good, I can resubmit this one once the #1431 landed.

We've decided we're going to follow the std lib's API, which doesn't include these functions. So, I'm going to close this.
In the mean time the socket2 library can be used for this.