Add support for i2s audio

@miketeachman published an i2s module targeting i2s audio on esp32, see
https://github.com/micropython/micropython/pull/4471
and related examples:
https://github.com/miketeachman/micropython-esp32-i2s-examples
This would make a perfect addition to this nice T-Watch 2020 Micropython fork.

Currently in progress

I2S is already supported here, as part of espidf module.
Try import espidf
"espidf" is an additional library that some as part of LVGL.
It includes I2S, SPI master, ADC, Heap functions, PCNT, MDNS.
Latest version (which is not yet integrated here) also includes HTTP client.

I2S is already supported here, as part of espidf module

It would be interesting to try this approach.  At this point I don't know if anyone has attempted using the espidf module to implement I2S.  It's certainly worth checking out.  The way to do this is to look at the C code in the PR and duplicate that in MicroPython.
If developer time efficiency and certainty in operation are a concern, then integrating the I2S PR is likely the way to go.  It's been used by 100's of people and has documentation.
https://github.com/miketeachman/micropython-esp32-i2s-examples
The PR integration consists of adding one C file, and one-line edits to 3 others.

It would be interesting to try this approach. At this point I don't know if anyone has attempted using the espidf module to implement I2S. It's certainly worth checking out. The way to do this is to look at the C code in the PR and duplicate that in MicroPython.

@miketeachman - I have used it.
I'm using it with SPH0645 microphone and it works well.
It's currently on a private repo as part of an internal project but I could probably send an example if anyone would be interested.

If developer time efficiency and certainty of operation are a concern, then integrating the I2S PR is likely the way to go. It's been used by 100's of people and has documentation.

It's great that there are alternatives!
If your I2S PR works well and tested by 100's of people, by all means I would recommend anyone to use it.
My alternative is just a transparent translation of esp-idf API to Micropython, and in this case it's already part of this ttgo twatch repo so anyone can already use it with an existing prebuilt FW.
I2S is just part of it. The module provides many other esp-idf APIs.

@amirgon the example of using esp-idf I2S binding would be much appreciated!

@jmiskovic Here is an simplified example, extracted from a private project with some irrelevant parts removed:
import gc
import espidf as esp
from espidf import I2S_MODE
from espidf import I2S_COMM_FORMAT
from espidf import I2S_CHANNEL_FMT
from espidf import I2S_BITS_PER_SAMPLE
from espidf import I2S_CHANNEL
from espidf import GPIO_MODE

class Recorder:
    I2S_PIN_NO_CHANGE = const(-1)
    BYTES_PER_SAMPLE = const(4)
    BYTES_PER_OUTPUT_SAMPLE = const(2)
    OVERSAMPLE_MULTIPLIER = const(1)
    INVALID_VOLUME = const(10000)

    def __init__(self, bclk = 2, dout = 36, ws = 22, freq = 16000, i2s_num = esp.I2S_NUM._0):
        self.bclk = bclk
        self.dout = dout
        self.ws = ws
        self.freq = freq
        self.sample_rate = freq * OVERSAMPLE_MULTIPLIER
        self.i2s_num = i2s_num
        self.bits_per_sample = self.BYTES_PER_SAMPLE * 8
        self.dma_buf_count = 6
        self.dma_buf_len = 1024
        self.bytes_to_read = (self.dma_buf_count * self.dma_buf_len)

        # Init I2S

        self.i2s_config = esp.i2s_config_t({
            'mode': I2S_MODE.MASTER | I2S_MODE.RX,
            'sample_rate': self.sample_rate,
            'bits_per_sample': self.bits_per_sample,
            'communication_format': I2S_COMM_FORMAT.I2S | I2S_COMM_FORMAT.I2S_MSB,
            'channel_format': I2S_CHANNEL_FMT.ONLY_RIGHT,
            'intr_alloc_flags': (1<<1), # ESP_INTR_FLAG_LEVEL1
            'dma_buf_count': self.dma_buf_count,
            'dma_buf_len': self.dma_buf_len,
            'use_apll':0
        })

        self.i2s_pin_config = esp.i2s_pin_config_t({
            'bck_io_num': self.bclk,
            'ws_io_num': self.ws,
            'data_out_num': self.I2S_PIN_NO_CHANGE,
            'data_in_num': self.dout,
        })

        esp.i2s_driver_install(self.i2s_num, self.i2s_config, 0, None)
        esp.i2s_set_pin(self.i2s_num, self.i2s_pin_config)
        esp.SPH0645_WORKAROUND(self.i2s_num)
        esp.i2s_stop(self.i2s_num)

    def close(self):
        esp.i2s_driver_uninstall(self.i2s_num)

    def record(self):
        input_buf = bytearray(self.bytes_to_read)
        self.input_view = memoryview(input_buf)
        bytes_read_ptr = esp.C_Pointer()
        gc.disable()
        esp.i2s_start(self.i2s_num)

        while self.recording:
            res = esp.i2s_read(self.i2s_num, self.input_view, self.bytes_to_read, bytes_read_ptr, 0)
            if res != 0: raise RuntimeError('i2s_read completed with error %d' % res)
            bytes_read = bytes_read_ptr.uint_val
            if bytes_read == 0: continue

            # Do something with input_buf

        esp.i2s_stop(self.i2s_num)
        gc.endale()

Thank you!
Because I also wanted to play sounds, I searched around some more. There is a fork of this repo that already integrated I2S.

a fork
working example of playing 16000 rate 16-bit wav

It should be useful to someone.


Compute parent permissions from available metadata

Previously we were querying Graph to get the current permissions and then using that to compute the permission diff. This changes that to use the metadata that we have available locally to do the computation avoiding a graph call to get permissions.

Does this PR need a docs update or release note?

[ ] :white_check_mark: Yes, it's included
[ ] :clock1: Yes, but in a later PR
[x] :no_entry: No

Type of change

[x] :sunflower: Feature
[ ] :bug: Bugfix
[ ] :world_map: Documentation
[ ] :robot: Supportability/Tests
[ ] :computer: CI/Deployment
[ ] :broom: Tech Debt/Cleanup

Issue(s)

fixes https://github.com/alcionai/corso/issues/2976

Test Plan

[ ] :muscle: Manual
[x] :zap: Unit test
[x] :green_heart: E2E

The test is catching some issue with the permissions backup. Let me look into what is going on.


Quick info returns wrong jsdoc tag for function overload

TypeScript Version:  3.4.0-dev.20190301

Search Terms:

quickInfo
jsdoc
tags

Code
declare function foo(): void;

/**
 * @deprecated
 */
declare function foo(x: number): void;

foo()

Hover on foo on the last line

Expected behavior:
No deprecation tag shown since we are using the non deprecated
Actual behavior:
A deprecation tag is returned in the quickinfo response:
[Trace  - 5:08:21 PM] Response received: quickinfo (311). Request took 2 ms. Success: true
Result: {
    "kind": "function",
    "kindModifiers": "declare",
    "start": {
        "line": 8,
        "offset": 1
    },
    "end": {
        "line": 8,
        "offset": 4
    },
    "displayString": "function foo(): void (+1 overload)",
    "documentation": "",
    "tags": [
        {
            "name": "deprecated"
        }
    ]
}

Playground Link:
Related Issues:

Hi, I'll like to take this.

@RyanCavanaugh Should Milestone now be changed to 3.8.0?


execute-job/fork-branch/10e22143-8d2e-4d47-aad8-d92f89bc6b9c

PR for testing a089dd5a70475a14b98490ce193013b89a1a5e09

padding /canonical/self-hosted-runners/run-workflows a089dd5a70475a14b98490ce193013b89a1a5e09 padding


Make Cloudinary work

set up cloudinary and use secure_url and public_id from response as a value to store for user avatar and avatarId

logic work as expected


Readme link in sched report policy is wrong

Policy Template Name
Scheduled Report
Issue Type
Bug
Policy Template version (Bug Only)
1.1
Code Snippet (Bug Only)
Readme link in description is wrong (missing a trailing 's'):
See README for more details"

Addressed in #177


Split the Deployment

What this PR does / why we need it:
Splits the Deployment into separate proxy and controller Deployments. Adds settings to configure the Deployments settings separately where settings previously configured the one unified Deployment. Rearranges some settings.
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #921

Special notes for your reviewer:
Currently this is just a bunch of TODOs explaining the tasks needed to handle this, for easier understanding of what the end result would look like.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[ ] PR is based off the current tip of the main branch.
[ ] Changes are documented under the "Unreleased" header in CHANGELOG.md
[ ] New or modified sections of values.yaml are documented in the README.md
[ ] Commits follow the Kong commit message guidelines

Was this superseded by #947 ?

Archived in my fork: https://github.com/rainest/charts-citest/tree/split-kong


Bump versions in release/3.1.x branch

Bump versions in release/3.1.x branch

Closing this stale PR. Will start a fresh PR later.

Looks good. We'll have to tweak the CI script when we do https://github.com/cedar-policy/cedar/issues/488, but no harm
merging this now.


Make legend colors more sensible

^ this is a mess. A possible solution might be to sort the preset colors in an order based on the deriving palette and skip colors which are too similar.

Right now, we have same colors sorted by hue

This looks like an improvement but since there are 22 colors used out of 30, we can remove some of them based on how similar they are to neighbours.

Another issue is that a systematic ordering of colors has made the later models more visible since their curves are drawn at the end.

@nickreich thoughts?

Could we have a single color represent each "team" (based on unique model name prefix) and then within a team have different hues? I.e. Delphi has hues of green, ReichLab hues of blue, etc..?
In terms of the issue with overlapping, maybe we could have a default be to not show confidence intervals if there are >k models (where k=8?) or something like that?


Let Robocopy copy all local files to the collection share

At the moment only the current file is copied using Robocopy to the collection shares, LPR and SKV.
Change it so that al local files are transfered.
file.lpr > *.lpr

Solved with issue4 code changes


Fix Inkscape-Dev Manifest

Closes #1165

[x ] I have read the Contributing Guide.

This PR would fix the .json manifest for Inkscape-Dev

Thanks for the PR but this has already been fixed in https://github.com/ScoopInstaller/Versions/pull/1151 :)


sst/NextjsSite: Update NextjsSite.about.md

When we applied the config in its original form, the Next dev mode reported:

Warning: Reverting webpack devtool to 'eval-source-map'. Changing the webpack devtool in development mode will cause severe performance regressions.

The Next.js documentation suggests to avoid changing the devtool in dev mode: https://nextjs.org/docs/messages/improper-devtool

Oh I see. Thank you!


Add Reflect polyfill for native

Turns out native is currently broken outside of browser debugging mode because we were leaning on Chrome's support of the es6 Reflect API.
~This change switches babel-plugin-transform-builtin-extend to use an alternate transform that doesn't require newfangled ES6 functions.~
This is needed by babel-plugin-transform-builtin-extend. I added this two days ago and didn't think to test in this way. Oops! :sweat:
:eyeglasses: @keybase/react-hackers

Sorry, this needed one more line. Should have made it into the previous PR, but I goofed up git :smile:
:eyeglasses: @keybase/react-hackers


valueForUndefinedKey "currentUnityController": Crash

After below line its crashing:
UnityAppController* currentUnityController = (UnityAppController *)[delegate valueForKey:@"currentUnityController"];
***Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ valueForUndefinedKey:]: this class is not key value coding-compliant for the key currentUnityController.
Any help please?

I have used this tutorial before with no issues, but I just tried it in a new project and I'm getting the exact same issue.

I could able to resolve the issue by integrating unity to my existing code as I could able to locate the currentUnityController object created in app's bridging header file under derived sources.
I somehow feel this have something to do with a new project or the bridging headers are not connected well. Still confused!

Indeed! it worked... Thanks for your help. Appreciated!

Hi, If you want to continue to use Swift 4.0, only you need to do is:
class AppDelegate: UIResponder, UIApplicationDelegate {     @objc var currentUnityController: UnityAppController? .... }
In Swift 4.0, when you need to access the swift code in the ObjectC code you have to put "@objc" before the attribute.
You can see this in: https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithObjective-CAPIs.html

I tried that earlier, but can't able to make that work. However I will still give that a try! Thanks

This worked great. Thank you @igoredington!


OpenCL SPIR build errors macOS 14, Intel GPU

macOS Mojave, 10.14.6
MBP 13" 2019, Intel Iris Pro 655
On the first run, OpenCL building kernels produces errors (but doesn't show any UI warning).
[OpenCL] [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: Build Program driver returned (10015)
[OpenCL] OpenCL Warning : clBuildProgram failed: could not build program for 0x1024500 (Intel(R) Iris(TM) Plus Graphics 655) (err:-2)
[OpenCL] [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:

error: undefined reference to `_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f()'
undefined reference to `_Z11read_imagefPU3AS110_image2d_tuSamplerDv2_f()'

error: backend compiler failed build.

[OpenCL] [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: Build Program driver returned (10015)
[OpenCL] OpenCL Warning : clBuildProgram failed: could not build program for 0x1024500 (Intel(R) Iris(TM) Plus Graphics 655) (err:-2)
[OpenCL] [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:

error: undefined reference to `_Z11read_imagefPU3AS110_image2d_tuSamplerDv2_f()'

error: backend compiler failed build.

[OpenCL] [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: Build Program driver returned (10015)
[OpenCL] OpenCL Warning : clBuildProgram failed: could not build program for 0x1024500 (Intel(R) Iris(TM) Plus Graphics 655) (err:-2)
[OpenCL] [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:

error: undefined reference to `_Z11read_imagefPU3AS110_image2d_tuSamplerDv2_f()'

error: backend compiler failed build.

[OpenCL] [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: Build Program driver returned (10015)
[OpenCL] OpenCL Warning : clBuildProgram failed: could not build program for 0x1024500 (Intel(R) Iris(TM) Plus Graphics 655) (err:-2)
[OpenCL] [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:

error: undefined reference to `_Z11read_imagefPU3AS110_image2d_tuSamplerDv2_i()'
undefined reference to `_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f()'

error: backend compiler failed build.

[OpenCL] [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: Build Program driver returned (10015)
[OpenCL] OpenCL Warning : clBuildProgram failed: could not build program for 0x1024500 (Intel(R) Iris(TM) Plus Graphics 655) (err:-2)
[OpenCL] [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:

error: undefined reference to `_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f()'

error: backend compiler failed build.

Disabling SPIR fixes these compiler errors.
--> Disable SPIR by default when creating apps?

Not reproduced with current Studio 2.4.0 build.


Provide search capability on pod details Logs tab

Today when clicking on a pod to get the pod details sidecar, the Logs tab will show either the streaming logs or not (if the user disables streaming).  While this is useful, if there is a lot of log output, it may be hard to locate specific log statements the user cares about.
If using a normal text based terminal window, a user might run a logs command piped through grep someRegularExpression.  Typing such a command in a Kui session opens up the pod details sidecar to the Logs tab, but that results in an error that grep does not understand the --tail parameter.  This is not surprising as the Logs tab is not designed to work with piped commands.  The user task, however, is a desire to search/filter log output to find something specific.  It would be useful for the Logs tab to support some type of search feature where the user could enter a search string and then have the Logs tab filter the output to show the matches (and then be able to clear the search).
Some UX design work would be needed to have this follow similar other search patterns, but the feature would be useful.

adding a 'filter' field to the streaming log feature, would be a very nice capability for an Ops/SRE

nice, thanks for the great ideas!

/remove-lifecycle stale

Thanks for the issue, sorry for the delay here.
Is the request for find/highlight text? Or is it for filtering log lines (i.e. on a line-by-line basis) based on whether a given line contains a given pattern? I think the latter, but want to make sure. Thanks!

We could also offer a Download button, to help with employing external tools.

Yes it’s the latter, effectively a log tail with a grep. So having a filter box where I can I put the grep value and then the log follow will show me a reduced set of entries based on what is in the filter box.
We have another ctl being included for which a download capability would be very ideal! Not sure if our web browser based implementation can handle that thou.

@berenss thoughts?

Love it! Thx 🚀


fix: Returns 404 instead of 500 for unknown dashboard filter state keys

SUMMARY
Returns 404 instead of 500 for unknown dashboard filter state keys.
TESTING INSTRUCTIONS
1 - Execute all tests
2 - All tests should pass
ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Required feature flags:
[ ] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)

[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided

[ ] Introduces new feature or API
[ ] Removes existing feature or API

LGTM, but a second pair of eyes wouldn't hurt. Maybe @zhaoyongjie?


S3 putObject upload progress

In S3 class in putObject method I want to check percent progress of file upload for show it to UI. How I can do that? For example for image from user's gallery

You can use a AWSPayload.stream or AWSPayload.fileHandle to stream request data into putObject and at the same time update your UI.
If you data is already in memory you could use AWSPayload.stream to do the following
func streamData(_ buffer: ByteBuffer) -> EventLoopFuture<Void> {
    let blockSize = 32*1024
    var buffer = buffer
    let payload = AWSPayload.stream(size: bufferSize) { eventLoop in
        let size = min(blockSize, buffer.readableBytes)
        // don't ask for 0 bytes
        if size == 0 {
            return eventLoop.makeSucceededFuture(.end)
        }
        let slice = buffer.readSlice(length: size)!
        // Update your UI here
        ...
        return eventLoop.makeSucceededFuture(.byteBuffer(slice))
    }
    return s3.putObject(body: payload, bucket: "mybucket", key: "myfile").map { _ in }
}

This supplies your data to the request in 32kb chunks and you can update your UI at the same point.
If you are loading data from a file your can use AWSPayload.fileHandle.
func streamFile(_ filename: String) -> EventLoopFuture<Void> {
    let fileIO = NonBlockingFileIO(threadPool: threadPool)
    return fileIO.openFile(path: filename, eventLoop: eventLoop).flatMap { fileHandle, fileRegion in
        let payload = AWSPayload.fileHandle(fileHandle, size: fileRegion.readableBytes, fileIO: fileIO) { progress in
            // Update UI
        }
        return s3.putObject(body: payload, bucket: "mybucket", key: "myfile").map { _ in }
    }
}

The fileIO object requires a NIOThreadPool you should create this separately to avoid creating and destroying threads repeatedly.
let threadPool = NIOThreadPool(numberOfThreads: 1)
threadPool.start()

@WGPavell did that answer your query

@adam-fowler yes, thank you!


Move process_sync_aggregate call into process_operations

Issue
https://github.com/ethereum/eth2.0-specs/pull/2473#issuecomment-856880216

As #2473 pointed out, process_block is a bit inconsistent when calling process_sync_aggregate.
sync_aggregate and execution_payload  are considered as "operations" in test format. The pattern (type signature) of process_sync_aggregate is similar to process_SSZ_CONTAINER(state, SSZ_CONTAINER) functions  like process_attestation(state, attestation). IMHO "process_operations" should be the function to process all operations.

20210713 updated: reverted the change of process_execution_payload

Proposed solution
Call process_sync_aggregate in process_operations instead of directly in process_block. So the name "process_operations" makes more sense.
Note that process_randao and process_eth1_data should have been "operations" in testing. However, it was too late to change phase0 spec. :'(

Even though they are considered "operations" in the testing today, I would argue that they aren't semantically operations like the other operation lists are.
Sync aggregate is certainly closer to an operation (a system level TX) than execution payload, but I think I'd stand pretty firm that execution payload is not an operation and should be segregated out in process_block as it's own call

@djrtwo @mkalinin
Thanks for your feedback and signal!
I reverted the change of process_execution_payload and updated the operation tests README file to be more compatible for both "operations" and "execution payload".

Where do you currently stand on this @hwwhww?
I lean toward "do nothing" on the altair front. I understand that this is a non-substantive change, but it would likely induce a wave of minor code changes on all clients and on some related infra (e.g. beaconfuzz).
Any input @protolambda or @ralexstokes?

Personally I don't like like the process_operations endpoint for various reasons:

We don't use it in testing anyway
Ideally everything that happens inside the body should be encapsulated and tested nicely in isolation. Not doing it this way for randao and eth1 voting was a mistake.
Removing the distinction between operation and encapsulated block body content seems like the most viable way to make the two kinds consistent.

At the same time I don't like to reorganize Altair, so I would avoid breaking changes there. Then with the Merge we have an opportunity to do it right, and just encapsulate every small change.

I agreed that it seems too late for Altair since the testnet fork is coming really soon.

it would likely induce a wave of minor code changes on all clients and on some related infra

Then with the Merge we have an opportunity to do it right, and just encapsulate every small change.

I'm afraid of if we induce a wave of minor code changes to The Merge. If there are more small changes that should be addressed, then we can consider if it makes sense to have a small "clean-up" HF before The Merge.

bring back up for discussion in the merge!


[vcpkg] vcpkg requires dumpbin.exe with clang on windows

Using vcpkg with cmake, ninja and clang on windows fails because there is a dependency on the dumbin.exe tool in applocal.ps1: https://github.com/microsoft/vcpkg/blob/9b4535e7ee7673fb8515d1f4f256990423a0d952/scripts/buildsystems/msbuild/applocal.ps1#L60
Environment

OS: Windows
Toolchain: CMake with Ninja
Compiler: clang-10.0.0

To Reproduce

source.cpp with contents int main(){return 0;}
CMakeLists.txt with contents:

cmake_minimum_required(VERSION 3.16)
project(Test CXX)
add_executable(main source.cpp)
find_package(sqlite3 CONFIG REQUIRED)
target_link_libraries(main sqlite3)

Install sqlite3:x64-windows package in vcpkg
Run cmake.exe . -G Ninja -DCMAKE_TOOLCHAIN_FILE=<vcpkg-path>/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows
Run ninja.exe

Failure logs
dumpbin : The term 'dumpbin' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\dev\tmp\vcpkg-fork\scripts\buildsystems\msbuild\applocal.ps1:60 char:12
+     $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^    [^ ...
+            ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (dumpbin:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Additional context
I guess clang is not officially supported on windows? We are using it successfully – this issue and #11466 are the only things that don't work out of the box.
I will gladly provide a PR to fix this issue, I'm just not sure what the best way forward is here. I see two options:

Try to find a dumpbin by looking for a msvc installation in the registry or using the VS2019INSTALLDIR env var.
Add support for llvm-objdump which comes with clang.

Is either of those an acceptable way forward for you?

I would think one would need to use the dumpbin with the associated version of Visual Studio being use, 2015, 2017 or 2019 and whether VCPKG_VISUAL_STUDIO_PATH, VCPKG_DEFAULT_TRIPLET, VCPKG_PLATFORM_TOOLSET and VCPK_TARGET_ARCHITECTURE is populated or not in order to allow cross-compiles using specific architecture, version and toolset.

Dumpbin is only used to extract the list of dependent dlls. Why do you think that operation is toolset or target architecture dependent?

Dumpbin is only used to extract the list of dependent dlls. Why do you think that operation is toolset or target architecture dependent?

@Chronial Thank you for the information, I am still learning C++ and its mysteries.

Will have to accept the statement if one is obtaining only dependent dlls to be true.
It would be good if vcpkg honored the _IsNativeEnvironment and/or PreferredToolArchitecture environment variables instead using the Visual Studio location and appending hard-coded \bin\Hostx86\x86\dumpbin.exe in the visualstudio.cpp source file.


Google searches still lead to 0.18 docs

For example, the top goole result for "http4s cors" (and the only one leading to http4s docs) is to https://http4s.org/v0.18/cors/. Fixing this / stopping it from happening will need some SEO expertise unfortunately (I've seen similar things for Doobie).

Perhaps the best solution to this is to take down the 0.18 docs and have the URLs redirect to a later version?

https://developers.google.com/search/docs/advanced/crawling/block-indexing
Seems it's as simple as adding this tag to the relevant pages.
<meta name="robots" content="noindex">

Won't that result in no docs showing up though?

Well, I was thinking we'd just put it on the v0.18 docs (and any other old ones). Can't be any worse than taking them down?

I was thinking that if we make the 0.18 urls redirect to newer versions then we'll keep the existing search result positions but they'll go somewhere more relevant. But maybe that's not how it works?

My search results look like this. First entry is 0.18, second is 1.0. So I assume that would replace it. But I won't claim to have any idea how these work :)

Ok yes, I think you're right 🙂

Some projects do a nice thing where the top of obsolete docs redirects to the latest with an ugly banner at the top.  We could implement that now, except GitHub pages doesn't support a 3xx we could point.  Rewrites are why we started hosting the site on Netlify, but bus factor of administration is an issue there, so we'd like to wean ourselves from that.  I don't know how to point 0.18 at the latest and keep it there, without republishing from 0.18 every time there's a new version.  I guess it could always be N hops away.
Sadly, the recent changes to 0.18 came up because we have a service on that still, and a new developer doing their job found a mistake in it.  It would be a shame for it to go away entirely.

It would be a shame for it to go away entirely.

IMHO I think leaving them live but off Google results is reasonable compromise.

I don't know how to point 0.18 at the latest and keep it there, without republishing from 0.18 every time there's a new version. I guess it could always be N hops away.

We already have a /latest path for the latest docs - just point to that?

IMHO I think leaving them live but off Google results is reasonable compromise.

Agreed.  Does that robots work at a directory level, or does it need to be in the server root?

We already have a /latest path for the latest docs - just point to that?

That feature requires Netlify, unless I missed some new development.

My understanding of their documentation is that we need to include the meta-tag on each affected page.
https://developers.google.com/search/docs/advanced/crawling/block-indexing
<meta name="robots" content="noindex">

We should be able to do that easily enough from one of the Hugo templates.

I'm reading about <link rel="canonical" href="..."> and it's an alternative we may want to consider to <meta name="robots" content="noindex">.
IIUC when you have more than one version of the same page, linking "canonical" version of that page indicates to search engines which one they should show in search results.

What this does is “merge” the two pages into one from a search engine’s perspective. It’s a “soft redirect” without actually redirecting the user. Links to both URLs now count as the single, canonical version of the URL.

Of course this is a matter of opinion whether e.g the v0.23 site is the canonical for all the http4s versions. But to me this seems like a reasonable choice: it will condense all of our search engine results that may currently be scattered across versions, and viewers can use the version picker.
Obviously this would be something to upstream into sbt-typelevel or probably Laika.

It looks like maybe Read The Docs uses this approach: https://haha.readthedocs.io/en/latest/canonical.html


How to change display layout?

Like inputing filed on top, and Card shown at bottom?

Like inputing filed on top, and Card shown at bottom?

good point
will add it
https://www.npmjs.com/package/v-credit-card-component


Video Tutorial

Hello,
Thanks for this awesome code ... works well ... could please add a video tutorial ?

I believe it's too early for that since the project is still under dramatic change. However if you believe it would be useful and you'd like to record that i'm more than happy to link to your video from the README.

here is one ... its in italian tho .. but i think it can help
https://www.youtube.com/watch?v=AZkcyAOF00Y&gl


When and why to create a device engine?

The readme explains how to create a device engine but I have a few things I'm not clear about:

Do I always need to create my own device engine? It looks like hive_mind_mobile and hive_mind_tv are pulled in by default.
Does device in this case refer to a category of devices? What granularity? (e.g. phone, android, samsung galaxy s5?)

You would only need to create a device engine if the mobile or tv engines do not satisfy your need. I should probably move that section to the bottom of the README.
The purpose of the engine is to provide additional functionality that is not in the base device class. For example, the mobile engine adds attributes serial and imei and this is probably sufficient for you unless there are android or samsung specific details that need recording.

Documentation to be updated.


Activity LED using the original iSight LED

Thanks for the excellent project. After getting a build working I've been playing around with adding an LED to show when the camera is active.
Showmewebcam handily switches GPIO 21 to HIGH when the camera is in-use so it's possible to put an LED in the place of the one that would have been on the original iSight.
All that's required is a 330ohm resistor and an LED. As seen in this test run:

I pulled out the original LED from the iSight and carefully soldered two cables either side of the surface mount LED. I used some shrinkwrap to shield the connections from the case and used shrinkwrap with a hole punched in it to aim to get the light only going up into the small clear plastic diffuser. A small amount of rearwards leakage was fixed with some Aluminum tape on the body.
Here's the end result:

Very cool!

Very cool!

@muffinresearch Super cool! Does the original LED need a 330ohm resistor too or was it just plug and play?

@muffinresearch Super cool! Does the original LED need a 330ohm resistor too or was it just plug and play?

Yep, I added the same size resistor with the original led too.


I added a button to the column in the table but when I clicked on the button it did not work

I added a button to the column in the table
Table.getColumnModel().getColumn(2).setCellRenderer(new ButtonRenderer());
Table.getColumnModel().getColumn(2).setCellEditor(new ButtonEditor(new JCheckBox(), this));
and this is Event click it.
public class ButtonEditor extends DefaultCellEditor {
protected JButton button;
private String label;
private int row_;
private JTable table_;
private boolean isPushed;
private int count;
private static Connection con;
private static ResultSet rs;
Main_Screen m1;
private static String status = "";
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("Resource/Bundle");

public ButtonEditor(JCheckBox checkBox, Main_Screen m) {
    super(checkBox);
    button = new JButton();
    button.setOpaque(true);
    m1 = m;
    button.addActionListener((ActionEvent e) -> {
        System.out.println("custom.ButtonEditor");
        fireEditingStopped();
    });
}

@Override
public Component getTableCellEditorComponent(JTable table, Object value,
        boolean isSelected, int row, int column) {
    count = 0;
    if (isSelected) {
        button.setForeground(Color.decode("#43B7BA"));
        button.setBackground(table.getSelectionBackground());
    } else {
        button.setForeground(table.getForeground());
        button.setBackground(table.getBackground());
    }
    label = (value == null) ? "" : "button";
    button.setText(label);
    table_ = table;
    isPushed = true;
    row_ = row;
    return button;
}

@Override
public Object getCellEditorValue() {
    if (isPushed) {
        count = count + 1;
        if (count == 1) {
            selected();
        }
    }
    isPushed = false;
    return label;
}

public void selected() {
}

@Override
public boolean stopCellEditing() {
    return super.stopCellEditing();
}

@Override
protected void fireEditingStopped() {
    super.fireEditingStopped();
}

}
but it is not worked.I appreciate all everybody help.

Seems to be a question related to swing JTable in general (and not specifically to this library). I suggest you to compose a short self contained example and re-post it at stackoverflow.com:

short: current version contains redundant imports, color switching, empty method - clean it before posting
self contained: it should be possible to simply run it as is - there's no main() method at the moment

Also, add explanation of what this example is supposed to do. Is it for a clickable checkbox?


Masthead update

Updated the colors of the mouseover tooltip
Added a new Tag component to be used with labels
Updated the masthead layout, changed the data present added a state badge

Changed the StateBadge as the borderless badge looked odd in the masthead

Updated the DetailTop layout and changed the data present

If there is no content for DetailTop to display it will display a single line that's the same color of the border
If there are no details the details column will not be displayed
If there are no labels or annotations the second column will not be displayed

Updated all the pages making use of detail top to make use of new interface and removed fields such as 'created'

I used an array and not weights to maintain order. If that's a problem let me know and I'll switch it.

Updated several usages of the CreateEditView mixin as it wasn't being added to the components properly.

The table of annotations will be updated with Lauren's change
rancher/dashboard#817
Tooltip

Tag

StateBadge

Variations of Layout/Look and Feel

[ ] Is there a way to have the label vertically aligned with the words Labels? They look to b slightly lower than the text.
[ ] Age is typically how old it is so it would be something like 2.9 hours instead of 2.9 hours ago. I'm not sure how/what you guys are using to calculate that in the code, but @vincent99 do you know what needs to be changed for it?
[ ] For labels, what is the max width set on it? So that it will cut off if you have a really long label name.

The "ago" is just a suffix that can be removed.
Annotations should say how many there are ("Show 7 annotations")
I think Label key and value should be more separated (at least [colon][space])
Type in the header should be singular for detail/edit, plural for list.

The only major issue I noticed was the font baseline in the tag when aligned horizontally with a label.

I updated the label alignment.
Removed the Age 'ago' suffix
There currently isn't a max width. Do we want to give it a pixel width or max it out to the width of the current row? Do we want to show a tooltip that shows the full label if it's too long?
Added the count to annotations
Made the type singular

I know this is consistent with the way navigation works but is this actually what we want? When click on 'Service' it takes me to a page with the heading 'Services'

Can DetailTop just take in the model directly and get description/annotation/labels/etc from it instead of them all having to be individually passed in for every resource and silently breaking if missed (which some, e.g. GenericDetail, do)?
Does DetailTop even need to be a separate component from the Masthead anymore?

Reduced the amount of DetailTop usage

Since there isn't much usage anymore I left the props as is

Moved detail customization from slots to a property on the models and using formatters

@vincent99 let me know if you're okay with the changes.


Fix up contract fuzz failures

Codecov Report
Patch and project coverage have no change.

Comparison is base (d04bcb9) 100.00% compared to head (3357774) 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##               1.5     #1170    +/-   ##
==========================================
  Coverage   100.00%   100.00%
==========================================
  Files           46        46
  Lines         2652      2414   -238
  Branches       396       354    -42
==========================================
- Hits          2652      2414   -238

Flag
Coverage Δ

foundry
?

production
100.00% <ø> (ø)

reference
100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 29 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


[otbn,dv] Add a "small value" snippet generator

This generates small values in the range [-10, 10] and writes them to
GPRs. The idea is that it should make it much easier to generate
things like LOOP instructions because now we have more values
available to be used as iteration counts.
@ctopal: This might be a good starting point for the similar sort of thing you're doing for WDRs?

Out of interest and since I'd just use only x0 as base: is there a coverage hole you can plug by using registers other than x0?

Good point! It wasn't particularly difficult to write, but the code doesn't really serve any useful purpose. I'll rip it out.


chapSecretValidation breaks Argo CD multi source applications

When deploying the hpe-csi-driver chart using a multi source Argo CD application where the first source is the hpe-csi-driver chart and the second source is a custom chart with the secret containing the iscsi.chapSecretName secret, Argo CD cannot deploy the charts and fails with
(hpe-csi-driver/templates/pre-install-hook.yaml:26:15): Secret hpe-chap-credentials not found in namespace addon-hpe-storage

Instead of using a custom pre-install-hook I suggest using a Kubernetes native way of ensuring the secret is available and correct.
This could for example be mounting the secret into the container and validating it using an init container.

The whole point of a cluster wide secret for CHAP was that it needs to exist prior to installing the Chart. I agree this pre-install-hook isn't the prettiest solution but fail to understand you can't reverse the order in your workflow?

We use ArgoCD for deploying Helm charts. In our case the validation fails even though the secret already exists prior.
Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): helm template . --name-template hpe-csi-driver --namespace addon-hpe-storage --kube-version 1.30 --values /tmp/f6f6d0e6-41eb-4543-9861-cbfbae542c86  --include-crds failed exit status 1: Error: execution error at (hpe-csi-driver/templates/pre-install-hook.yaml:26:15): Secret hpe-chap-secret not found in namespace addon-hpe-storage Use --debug flag to render out invalid YAML

I'm not familiar with what you're exactly trying to do here but is it possible to pass --no-hooks to that helm command?

Sadly this is not available in Argo CD. I have created https://github.com/hpe-storage/co-deployments/pull/399 to work around the issue in a sensible way.


minio-go fails on gcs gateway

Below is an error when running mint against gcs gateway
Running minio-go tests ... FAILED in 29 seconds
{
  "alert": "",
  "args": {},
  "duration": 1400,
  "error": "A header you provided implies functionality that is not implemented",
  "function": "testFunctionalV2()",
  "message": "SetBucketPolicy failed",
  "name": "minio-go",
  "status": "fail"
}

Server side log is below
ERRO[0030] Unable to create a bucket.                    cause=Bucket already owned by you: aws-sdk-php-bucket-34012 source=[gateway-handlers.go:633:gatewayAPIHandlers.PutBucketHandler()] stack=gateway-gcs.go:386:(*gcsGateway).MakeBucketWithLocation gateway-handlers.go:631:gatewayAPIHandlers.PutBucketHandler gateway-router.go:113:(gatewayAPIHandlers).PutBucketHandler-fm
ERRO[0433] Unable to validate content-md5 format.        cause=illegal base64 data at input byte 4 source=[gateway-handlers.go:205:gatewayAPIHandlers.PutObjectHandler()]
ERRO[0435] {"method":"PUT","reqURI":"/awscli-mint-test-bucket-1445/datafile-1-MB","header":{"Accept-Encoding":["identity"],"Authorization":["AWS4-HMAC-SHA256 Credential=minio/20171021/us-east-1/s3/aws4_request, SignedHeaders=content-length;content-md5;host;x-amz-content-sha256;x-amz-date, Signature=4cf6cc069ae069c1a9949feb3c98769f13cf8041ceb28bd13eea429fd125a28a"],"Content-Length":["1048576"],"Content-Md5":["/jCUCgXnG9eMBe+0n5jvOw=="],"Expect":["100-continue"],"Host":["<IP_ADDRESS>:9000"],"User-Agent":["aws-cli/1.11.112 Python/3.5.2 Linux/4.10.0-24-generic botocore/1.5.75"],"X-Amz-Content-Sha256":["194fda391f171a59875c3917110e0be72d9ac3d1abc6fbefaebede244e53b5f9"],"X-Amz-Date":["20171021T163608Z"]}}  cause=Signature does not match source=[gateway-handlers.go:295:gatewayAPIHandlers.PutObjectHandler()]

fixed by minio/minio-go#853


#11125  Changed relationships between models from v1alpha2 to v1beta1

Notes for Reviewers
This PR fixes #
Signed commits

[x] Yes, I signed my commits.

Excellent! Thank you, @Danko-chan 😄


Revert "[GSB] Hack the ordering of adding requirements for a signature."

I don't think this is necessary anymore.
This reverts commit 3e80a616c446822c7710e754a811635aec8545a8.

@swift-ci Please test

@swift-ci Please test source compatibility

@DougGregor There were no test cases in the original PR, do you remember what this was for?

Ahh, thank you! I'd meant to get rid of this. This hack predates the point where we were smart about "delaying" requirements when we couldn't resolve the type, and the canonical form of generic signatures would break because it would introduce weird ordering problems that broke the build of the standard library. Hence the "hack with no test cases" commit.


Issues with unicode characters in XML

I haven't been able to dive in, but we've seen a few issues with parsing the response data from Braintree.  I added some additional logging, and it looks like the custom XML parsing is failing on:
<payer-first-name>José</payer-first-name>
<payer-last-name>Smith</payer-last-name>

To add a bit more tracing, here, the parser receives that payer-first-name field as a list:
[{:xmlText, ["payer-first-name": 20, paypal: 106, transaction: 1], 1, [], 'Jos',
  :text},
 {:xmlText, ["payer-first-name": 20, paypal: 106, transaction: 1], 2, [], [233],
  :text}]

It's certainly easy to reproduce. I have a separate project where I've been using fast_xml for parsing instead, and it handles the HTML entities just fine. I'll port it over soon, busy with a few other things currently.

Thanks!  My current branch where I've fixed two issues with XML handling:
https://github.com/revzilla/braintree-elixir/commits/dont-gzip-for-now
The last gotcha we've noticed, is that some requests will fail with {:error, ":closed"} which seems to be an HTTPoison/Hackney issue when a pooled connection has been close.  Not sure if a re-try mechanism is available further down the stack, of if you had any thoughts about that.

@nauger I've pushed up support for entity encoding and decoding, which seems to work as far as the tests show. Please test it out and let me know how it goes. If this solves the problem I'll release a new version.

@sorentwo Thanks!  We'll test shortly.  I know this isn't an issue with your library, but have you noticed {:error, ":closed"} in your apps too?
Not sure if it's Braintree about being more aggressive about closing sockets, or Hackney keeping them open longer?  I'm just not sure where to dive in on that one.

Sorry, I haven't seen that one so far. I've seen failures while testing due to how Braintree rate limits certain calls (using the same card repeatedly, etc), but that's it.


Potential improvement to EM::Synchrony.sync's handling of EM::Deferrable called with multiple arguments

Hi!
I'm working on providing an em-synchrony friendly version of ZK::EventMachine, but have run into trouble with the way that EM::Synchrony.sync handles callbacks that have their succeed method invoked with multiple arguments. I make extensive use of this pattern throughout my code, so for me this is a pretty important thing to have working :)
Below I have an example fix for sync. I created a fork and branch of em-synchrony and made the change, but I couldn't figure out how to set up all of the required dependencies to run the specs.
I've included below a small demonstration of the problem (for me) and the proposed fix. If it's easier for you, you can also check out a gist of this code and run it that way.
The change is pretty minor, if you can instruct me on how to configure mongo and mysql, etc. so I can run the test suite, i'd be happy to. If you don't mind making the change in your environment and seeing if there are any ill effects, that'd work too.
#!/usr/bin/env ruby

require 'rubygems'
require 'eventmachine'
require 'em-synchrony'

module EventMachine
  module Synchrony
    def self.new_sync(df)
      f = Fiber.current
      xback = proc {|*args|
        if f == Fiber.current
          return *args
        else
          f.resume(*args)
        end
      }
      df.callback &xback
      df.errback &xback

      Fiber.yield
    end
  end
end

def gimme_deferreds
  a, b = EM::DefaultDeferrable.new, EM::DefaultDeferrable.new

  EM.next_tick do
    a.succeed(1, 2, [:foo, :bar])
    b.succeed(:single_arg)
  end

  return a, b
end

def current_implementation
  EM.synchrony do
    a, b = gimme_deferreds

    rval = EM::Synchrony.sync(a)
    puts "a rval: #{rval.inspect}"

    rval = EM::Synchrony.sync(b)
    puts "b rval: #{rval.inspect}"

    EM.next_tick { EM.stop_event_loop }
  end
end

def proposed_fix
  EM.synchrony do
    a, b = gimme_deferreds

    rval = EM::Synchrony.new_sync(a)
    puts "a rval: #{rval.inspect}"

    rval = EM::Synchrony.new_sync(b)
    puts "b rval: #{rval.inspect}"

    EM.next_tick { EM.stop_event_loop }
  end
end

if __FILE__ == $0
  puts <<-EOS
call signature:
a.succeed(1, 2, [:foo, :bar])
b.succeed(:single_arg)

  EOS

  puts "this is the return value of the current implementation:"
  current_implementation

  puts "\nthis is the proposed change:"
  proposed_fix
end

__END__

call signature:
a.succeed(1, 2, [:foo, :bar])
b.succeed(:single_arg)

this is the return value of the current implementation:
a rval: 1
b rval: :single_arg

this is the proposed change:
a rval: [1, 2, [:foo, :bar]]
b rval: :single_arg

Thanks!
Jonathan

Jonathan, that looks great, just merged and pushed your patch into master.
P.S. ZK-eventmachine -- awesome!

ah, excellent! thank you so much!


Delay in prisma:get-platform during first call after AWS lambda deployment.

Bug description
From:

To:

I read an article about Prisma reducing Lambda's cold start time by 9x. However, no matter what method I used, the cold start time couldn't be reduced below a certain point. After enabling debug mode and testing, I discovered that the prisma:get-platform command was consuming approximately 1.5 seconds.
I currently use a read-replica, so the second prisma:get-platform log shows the one from the read replica.
How to reproduce

AWS Lambda Node 20.X environment
Bundle source codes with esbuild and zip with rhel-openssl-3.0.x(libquery_engine-rhel-openssl-3.0.x.so.node) engine file.
Deploy & test

Expected behavior
Enhanced database connection performance like <1s
Prisma information

generator client {
  binaryTargets   = ["native", "rhel-openssl-3.0.x"]
  provider        = "prisma-client-js"
  output          = "../../node_modules/@prisma/client/cms"
  previewFeatures = ["prismaSchemaFolder", "relationJoins", "nativeDistinct"]
}

generator json {
  provider = "prisma-json-types-generator"
}

generator kysely {
  provider = "prisma-kysely"
  output   = "../common/generations/prisma"
  fileName = "kysely.types.ts"
}

datasource database {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

/** Initializes the clients. */
export function initializeClients() {
  if (!prisma) {
    const prismaClients = createPrismaClients();
    prisma = prismaClients.finalClient;
    prismaConnectionResolver = prismaClients.initialClient.$connect();
  }

  if (!eventManager) {
    eventManager = createEventStoreClient({
      prisma,
    });
    eventManager.useSagas(Sagas as unknown as Record<string, EventSaga>);
    eventManager.init();
  }
}

  const start = Date.now();
  logger.http('Initializing the clients.');
  initializeClients();
  await prismaConnectionResolver;
  logger.http(`Clients are initialized. (${Date.now() - start}ms)`); // Almost all cases take 1.5 seconds. (When running the Lambda for the first time)

prisma client version is 5.17.0
Environment & setup

OS: Lambda Node 20.X
Database: PostgreSQL
Node.js version: 20.11.0

Prisma Version
5.17.0

After conducting many tests, I found that the issue was related to setting NODE_OPTIONS=--enable-source-maps. (with the large modules load)
So, this was not an issue. I apologize for the insufficient testing and wish all the Prisma contributors success.


How to activate filesystem

Hi,
This is may be a little bit newby but it would be great if somebody could help me with this.
I try to upload a file via bruno like:
curl -X 'POST' \   'https://xxx.xxx.xxxx.com/sboms' \   -H 'accept: application/json' \   -H 'Authorization: token xxxx' \   -H 'Content-Type: multipart/form-data' \   -F 'file=@abc.json;type=application/json'
but bruno tells me:
Error invoking remote method 'send-http-request': VMError: Module 'C:...\bruno\fs' is not allowed to be required. The path is outside the border!
I have read in #385 that I need to activate the filesystem in bruno.json and use a pre-request scripts to do so, but I can't find such a file on my filesystem. I found it in the repository but not in my lokal installation of bruno.
It would be great if someone could tell me how to activate the filesystem in bruno!
Bruno Version:
1.8.0 for Windows X64
https://github.com/usebruno/bruno/releases/download/v1.8.0/bruno_1.8.0_x64_win.exe
thx in advance
regards

hey @Silence-TP! remember that little pop-up window that appeared when you created the collection?

That's where you can find the bruno.json file. If you can't recall where you saved your collection, don't worry, it happens to me all the time. Just click the three dots on your collection, select settings, then info, and finally location. Once you find the bruno.json file, just copy and paste the following code snippet into it:
"scripts": {
    "filesystemAccess": {
      "allow": true
    }

Hope that helps!

Hi @sanjai0py
Great, thanks for the hint! It seems to work now. I don't know why i couldn't find that by my own :-D
I still need to customize the pre-script in a way to achive somethin simular like with curl -F 'file=@abc.json;type=application/json' but therefore I just need to get a little bit more familiar with nodejs. I think I can achive that by my own.
Your reply realy helped me.
Thx again!

I finally got it running!
thx again 4 your help!


Proper code styling template and mechanism to enforce it

Ken has committed in the past an Eclipse formatting file:
http://code.google.com/p/crawler-commons/source/browse/trunk/doc/eclipse-formatt
er.properties

We should have a generic styling file which will match all IDEs (I personally
use IntelliJ Idea for example).

If the styling template is accepted by us we should use it, or we can compare
it to other styling files used by other groups and upgrade it if we see fit.

We should also find a mechanism which will use this file in Maven at the
"Compile" task automatically.

Possible candidate will be:
http://code.google.com/p/maven-java-formatter-plugin/

Summary:
* Find suitable styling guidelines
* Enforce it using a generic (xml ?) file
* Find a good maven plugin which will run it every compile

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 9 Aug 2014 at 6:58

Use [http://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle.html] plugin?

of for IntelliJ users [https://plugins.jetbrains.com/plugin/6546]

[http://mblanchette.github.io/maven-java-formatter-plugin/0.4/usage.html] looks good but requires a XML formatting file, like the one we had prior to [https://github.com/crawler-commons/crawler-commons/commit/761c9fa64869663d17cf7f79da8d622dc0d9d69e].
This would allow us to apply the formatting with Maven. I'll have a look and see if I can get it to work


chore(react-componnets): 分析配置组件包初始化

👀 PR includes

🔧 Chore

[ ] Test case
[ ] Docs / demos update
[ ] CI / workflow
[ ] Release version
[x] Other ( @antv/s2-react-componnets 初始化)

📝 Description

确定的点:

新增 主题风格配置面板/宽高调整面板/文本对齐 三个配置组件

后面可以做的 (待讨论的点):

现有分析组件 (行列切换/高级排序) 等从 s2-react 迁移至 s2-react-components 中, 很多人其实不需要用到这些, 包解耦, 减少体积

移除 SheetComponents 的 header (switcher/advanceSort) 配置, 只保留导出, 如果需要使用分析组件, 自行组合使用即可.

该 PR 改动点:

初始化 s2-react-components 包
React 升级到 18.3, 移除废弃的 defaultProps 写法
新增 prettier-plugin-packagejson 和 prettier-plugin-organize-imports 插件, 自动移除未使用的导入
修复 pnpm 和 typescript 类型 reference 问题

🖼 Screenshot

Before
After

❌
✅

🔗 Related issue link

🔍 Self-Check before the merge

[ ] Add or update relevant docs.
[ ] Add or update relevant demos.
[ ] Add or update test case.
[ ] Add or update relevant TypeScript definitions.

ref: #1790，看看这个是不是可以顺带优化

ref: #1790，看看这个是不是可以顺带优化

可以, 后面分不同的 PR 优化吧, 这个 PR 只做初始化和代码格式化

Codecov Report
Attention: Patch coverage is 97.67442% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 80.16%. Comparing base (ecdc9c8) to head (15ae8bd).
Report is 380 commits behind head on next.

Files
Patch %
Lines

packages/s2-core/src/cell/data-cell.ts
50.00%
0 Missing and 1 partial :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2751      +/-   ##
==========================================
+ Coverage   75.77%   80.16%   +4.39%
==========================================
  Files         257      176      -81
  Lines       11994    10210    -1784
  Branches     2464     2311     -153
==========================================
- Hits         9088     8185     -903
+ Misses       1398      599     -799
+ Partials     1508     1426      -82

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:tada: This PR is included in version @antv/s2-v2.0.0-next.24 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version @antv/s2-react-v2.0.0-next.23 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version @antv/s2-vue-v2.0.0-next.15 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version @antv/s2-react-components-v1.0.0-next.1 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


number_input components with convenience setter do not respect State int variable

Describe the bug
I have a State variable of type int.
I have this bound to a number_input with input_mode="numeric" by using the convenience setter.
When I check the type of the State variable in the backend after an on_change event set to the convenience setter set_my_var was triggered by clicking on the frontend increment arrow, my State variable gets cast to a string
To Reproduce
Follow above.
Expected behavior
I would expect the number_input component or the convenience setter bound to a state variable of type int to respect the typing.
Screenshots
Specifics (please complete the following information):

Python Version: 3.10.12
Reflex Version: 0.2.4
OS: Darwin (M1)
Browser (Optional): Chrome

Additional context

This is working in 0.5.3! Please reopen if issues persist


New pypi release

Hello heatpump lovers,
heating season is near. Although my time is short, I would like to advance the new code base of the HA component.
If someone would like to support, you can install the preview or make code review for the core module.
For the new code I use luxtronik==0.3.14 and the new functions with an own Luxtronik class. (But time.sleep is not allowed in a core module...)
It would be great if we could get a new stable version here that I can then use.
What is missing for a new stable version?

Sorry about the additional ping @Bouni or @kbabioch, but I'm also really looking forward to a new pypi release. Can we help in some way to get that going?

Yes, this would be nice. But I think that there are some issues which should be addressed before a new release, e.g., #132 and maybe also #135?

I will take another look at #135.

@Bouni or @kbabioch sorry to bother you folks, but is there some way to get the new pypi release made?

Hey everyone, sorry for the long silence from my side but personal things had (still have) priority over hobby projects 😓
I actually lost tack of what we added after 0.3.14 and whats necessary to release a stable 0.3.15 or even a 0.4.0
@kbabioch @gerw @BenPru what do you guys think is necessry for a new release. Can we might just release a intermediate 0.3.15 version now and a lets say 0.4.0 when the features are complete we inteded for the next "big" release?

@gerw Do you think #132 is a must have for a 0.3.15 release?
If not I would like to release 0.3.15 and we can plan on having #132 for the 0.3.16 or whatever release in the future.

@Bouni At least we should discuss, how we handle that issue. Currently, main has a breaking API change compared to 0.3.14 and that issue proposes to revert this breaking change. From my point of view, it does not make sense to release 0.3.15 with this braking change and then revert it in 0.3.16.
[The API change is that parameters is no longer a member of Luxtronik. Instead read() returns the parameters.]

@Bouni Now, #163 is almost finished. After merging, I propose to deal with #128 (should be a quick one). It would also be nice, to start a basic changelog, see #135.
Actually, what has been changed since 0.3.14?

Identified datatype of many parameters / calculations
Internal refactoring
The connection to the heat pump is reused (instead of connect & disconnect for each read/write operation)
TBD: New way to access the software version (#128)

I guess we have to do the changelog for a new version manually this time. Afterwards I tend to introduce commitlint / conventionalcommits to ensure commit messages that allow for a semi-automatic changelog generation.
What do you guys think about this?

Guzz-T found some incompatibilities to 0.3.14 in #132. These should also mentioned in the change log.
I have no experience with this, but we could try conventionalcommits. Do I get it right, that every commit will end up in the change log?

I took the liberty to create a new milestone for the next release. This way we can focus on the necessary changes to publish the release in the next time.

ping @Bouni @kbabioch


HTTPSubscriber: detect when list is not append-only

Extracted from https://github.com/protocol/badbits.dwebops.pub/issues/32733

We are working on simplifying denylist handling at ipfs.io/dweb.link (https://github.com/ipshipyard/waterworks-infra/issues/113) and want to solely rely on nopfs support in rainbow, where a denylist is passed via RAINBOW_DENYLISTS=https://badbits.dwebops.pub/badbits.deny.
Problem
Right now, the list is sorted, and the new double-hashed entries can be added in the middle of the denylist.
This runs into the current limitation of HTTPSubscriber.downloadAndAppend() which assumes every list is append-only, and makes a blind range request for new bytes beyond the ones it already has.
This means subscribing to current badbits or some third-party list that is not append-only is error-prone: client will be missing updates that were inserted in the middle of the file, and not appended at the end (example).
Proposed solution
HTTPSubscriber could remember the last rule, and if the same rule is seen again in Range response beyond the end of old file, we know the update has likely inserted some entries earlier.
In such case we would discard Range response and refresh the entire file to ensure we don't miss any updates.
The file would be downloaded only on actual update once #38 is also implemented.

It is not sustainable to re-download and re-process everything every minute because of a single-line added to a file (like it happens now for ipfs.io gateways). Adding such feature allows people to keep using non-append only lists. What I'd like is to force people to use append-only lists.
It also means more code, when no more code is necessary really.

Also, it is simpler to fix badbits to publish append-only lists than to implement dealing with sorted lists.


correcting the ylim for the y axes

Limits of the axes are incorrectly set, small typo

Thanks for the pull request, i just saw i missed an earlier one (#2) with the same fix, which is now merged. So closing this one.


app-gallery-deploy 1.1.0

What to do if the build fails?
At the moment contributors do not have access to the CI workflow triggered by StepLib PRs. In case of a failed build, we ask for your patience. Maintainers of Bitrise Steplib will sort it out for you or inform you if any further action is needed.
New Pull Request Checklist
Please mark the points which you did / accept.

[x] I will not move an already shared step version's tag to another commit
[x] I read the Step Development Guideline
[x] I have a test for my Step, which can be run with bitrise run test (in the step's repository)
[x] I did run bitrise run audit-this-step (in the step's repository - note, if you don't have this workflow in your bitrise.yml, you can copy it from the step template.)
[x] I read and accept the Abandoned Step policy

Hi @klamborowski,
Thanks for your contributions to the Bitrise Step Library!
I was wondering if you could add a step icon to the step as well. While it's not mandatory, but it definitely helps the step to stand out a bit.
Here's the documentation about it:
https://devcenter.bitrise.io/contributors/create-your-own-step/#adding-a-step-icon
Let me know!
Cheers,
Janos


Add support for singularizing entities

Hi,
For context: It is quite common to have tables name in their plural form to describe what the table contains. This is the approach that Ruby on Rails takes as well. Our model Car, will be stored in a "cars" table.
Would it be possible to have a "singularise-entities" to turn:
export interface Users {
  id: string;
  email: string;
}

export interface Database {
  users: Users;
}

into
export interface User {
  id: string;
  email: string;
}

export interface Database {
  users: User;
}

The same way that camelCase works?
Another reason to do that is to avoid having mixed types with reserved table names. User table name is not allowed in PG for example. In the same example, from memory, mysql won't allow table names like admin, backup, channel, action

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.

This is an interesting idea. I would probably use pluralize for this.
I think, if this is implemented, we will sooner or later need a way to provide custom singularization rules as well. In that case, we might also need configuration capabilities as in #30.

Created a PR for this: https://github.com/RobinBlomberg/kysely-codegen/pull/162

Should be released in<EMAIL_ADDRESS>🚀


Scoreboard: Team History

It would be very helpful if a click on a team launches a detail view for this team:
Showing the past rounds for this team in the table, instead of multiple teams.
We had this feature in past CTFs and it's usually very handy.

done


about interaction loss

hello! In the paper, you mentioned using interaction loss to ensure security between level k and k-1. But it seems that this part is not included in the code, can I get the code of this part? Thx a lot!

Hi, @fshi2006. Please refer to the code in the main repo GameFormer.

thx a lot! So why didn't add this loss in planner repo?

thx a lot! So why didn't use this loss in planner repo?

This is because adding the interaction loss would significantly slow the training. Given the large amount of data from the nuPlan dataset, we need to remove this loss to speed up the training and thus train on more data.


initADA js error strange

Hi,
config: v 1.5.9
with multiple sliders + carousels on the same page, i had a strange issue with sometimes error message $slides is null (on initADA function)
So i had if(.$slideTrack) {...}, and next in activateADA function if(.$slideTrack) {...} and all is ok now
thanks

Hey I'm going to close this because there's no fiddle, but if you whip one up we can check it out further.  Thanks @skobeo


add new color scheme for more distinguishing colors

As discussed in #130, there were many overlapping colours for the technologies such that some were not well distinguishable in the summary plots.
This is the first step to change that. But I am not yet happy with all the colours. Happy to gather your thoughts!

I would suggest changing the colors of "resistive heaters"  and "power-to-heat" to something similar as the other power-to-heat technologies, e.g.
 "power-to-heat":"#4f940c"
"resistive heaters": "#d8f9b8"
I haven't tested though how similar the colors are with the battery colors.


--no-color option

I think it would be useful to have a command line option to disable ANSI color output.
When using dockle in build pipelines in Jenkins, sometimes it is useful to capture the output of dockle and show it somewhere, like in the Pull Request conversation. Taking the output of dockle as-is results in ANSI escape sequences being shown.
Example:
�[33mWARN�[0m - �[36mCIS-DI-0001�[0m: Create a user for the container
Having a --no-color option, and even supporting the NO_COLOR informal standard, would be useful in these situations.
I am not an experienced Go programmer, but I volunteer to attempt a Pull Request if this suggestion is welcome.
Cheers.

@cfzlp Done! Please update to v0.3.17.

Awesome! Thank you.


how to delay save state into pastStates

hi everyone, i want delay save state into pastStates
Ex: i have flag state is isSave, if isSave = true, allow save state to pastStates,  if isSave = false skip save.
Can do it?
Tks all!

after search topic i see it like this issue
https://github.com/charkour/zundo/issues/71
i will close post tks!


Json rx server

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Finding Orientation of 3D Pose

Using the 3D pose estimation model, how can I calculate the yaw, pitch and roll rotation Euler angles?
For example, if I raised my left arm in front of me, level to the ground, how can I determine that the pitch in this example is 90 degrees?
Similar issues:
https://github.com/google/mediapipe/issues/2809
https://github.com/google/mediapipe/issues/1561
The only issue these threads is address is for the face mesh estimation. I’m looking for the entire pose.
Python 3.9 on Windows.
Edit: I’m not knowledgeable in 3D coordinate physics like matrices. Please tell me more than just giving me a resource where I can calculate these angles.
Thanks.

in your case you can use the camera look at concept. let's say they shoulder is the eye and the elbow the target and you want to rotate the shoulder to the elbow.
Here a sample code to get going:
def vec_length(v: np.array):
    return np.sqrt(sum(i**2 for i in v))

def normalize(v):
    norm = np.linalg.norm(v)
    if norm == 0:
       return v
    return v / norm

def look_at(eye: np.array, target: np.array):
    axis_z = normalize((eye - target))
    if vec_length(axis_z) == 0:
        axis_z = np.array((0, -1, 0))

    axis_x = np.cross(np.array((0, 0, 1)), axis_z)
    if vec_length(axis_x) == 0:
        axis_x = np.array((1, 0, 0))

    axis_y = np.cross(axis_z, axis_x)
    rot_matrix = np.matrix([axis_x, axis_y, axis_z]).transpose()
    return rot_matrix

this function returns a 3x3 rotation matrix from which you can calculate a quaternion.

Hi @mmbaguette ,
Can you provide code changes to investigate further on this issue.

I will take a look soon today, as I'm occupied atm. Wdym by code changes?

Hi @mmbaguette .
Hope this https://github.com/google/mediapipe/issues/3226#issuecomment-1096846680  helped to resolve this issue .

I was looking for the same and I found this video that does Head Pose Estimation using Mediapipe in Python.
Youtube video
python script

w

Anyone knows how to convert the 3d pose to quaternion based?

도움이 될지 모르겠지만
나는 아래 사이트에서 원하는 각도를 구했습니다 행운을 빌어요
@.***/head-pose-estimation-with-mediapipe-and-opencv-in-javascript-c87980df3acb
2023년 2월 2일 (목) 오후 9:50, JinTian @.***>님이 작성:

Anyone knows how to convert the 3d pose to quaternion based?
—
Reply to this email directly, view it on GitHub
https://github.com/google/mediapipe/issues/3226#issuecomment-1413694924,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A24DNS5KKF36WDYM2YTBGLLWVOUTDANCNFSM5SK4NZCQ
.
You are receiving this because you commented.Message ID:
@.***>

사이트 없어요

I don't know if it'll help.
I found the angle I wanted on the site below.
사이트 게시글제목 : Head Pose Estimation with MediaPipe and OpenCV in Javascript
<EMAIL_ADDRESS>위 url이 잘 안나오네요
https://is.gd/qc3Y1k

고마워,저는 3D Pose 이용해요. 그러나 그것을 읽을 거예, 아마 그것은 돕아요

@lucasjinreal Did you find how to convert the 3D landmarks from mediapipe to quaternions?

Not yet, not easy to do so, need use IK in game software


Add content length header to django_irods download view response

django_irods.views.download() should set the Content-Length header.  This probably entails getting file stat from an iRODS icommand.  This will allow user agents to provide feedback on file download progress.
Assigning to @hyi for now.

@selimnairb could you test it out on dev and close if working there?

tested on dev and it works as expected. Closing.


Archive C++ implementation to onramp-c++ dir

See notes in #20

Archive branch is archive-onramp-c++, tag: https://github.com/azavea/onramp/releases/tag/archive-c%2B%2B


Check that datatables sortable headers are over proper columns and are functioning.

referenced in #301

Search boxes should return data filtered by the search text.
Clicking available headers for sorting should return data sorted by that key.
Remove sensitivity to site-level refresh with dataTables, since they update their data dynamically with every sort or search. And at worst, the chart will refresh while the user is in the middle of accessing data.

Events Browser dataTable will require some special handling to implement sort due to the massaging required to get that table functioning with dynamically changing header sets.


Initial backend work

Description
This PR does several things:

Creates an initial database schema (very rough)
Adds a script under the bin directory that will take a dictionary file from JMdict and import it into the database. Currently this script is quite slow (about 1 hour -- the file is quite large). If this begins to hinder development, I will look into ways that the script can be improved but I think this is a good place to start.

Things to fix
After looking through an example of the TSV format that anki expects, I realized that the current import script does not pull out information regarding part of speech. I will update the schema and the script to reflect this.

Also to let you know after running the script these are the numbers I got:
irb(main):002:0> Word.count
   (23.0ms)  SELECT COUNT(*) FROM "words"
=> 187920
irb(main):003:0> Definition.count
   (68.6ms)  SELECT COUNT(*) FROM "definitions"
=> 214520
irb(main):004:0> Reading.count
   (26.8ms)  SELECT COUNT(*) FROM "readings"
=> 415206
irb(main):005:0>


make failes

mdziardziel@PC-076 ~/g/fisherman> make
Adding configuration to ~/.config/fish/config.fish
Downloading the index for the first time...
fish: Could not expand string “"$$spinners"”
/home/mdziardziel/git/fisherman/functions/wait.fish (line 68):             set spinners "$$spinners"
^
in function “wait”,
called on line 72 of file “/home/mdziardziel/git/fisherman/functions/fisher_update.fish”,
with parameter list “--spin=pipe --log=/home/mdziardziel/.config/fisherman/cache/.debug_log
curl --max-time 5 -sS https://raw.githubusercontent.com/fisherman/fisher-index/master/INDEX > /home/mdziardziel/.config/fisherman/cache/.index.tmp
”
in function “fisher_update”,
called on standard input,
with parameter list “--index”
fisher: Connection timeout. Try again.
Ahoy! Reset your shell and type 'fisher '
read: Unknown option “alias”
/home/mdziardziel/git/fisherman/functions/fisher.fish (line 2): while read -la alias
^
in function “fisher”,
called on standard input,
with parameter list “help -a”
   read - read - read line of input into variables

@Fiedzia
Hi. What is your fish-shell version?

mdziardziel@PC-076 ~/g/fisherman> fish --version
fish, version 2.1.1

This is a fish-shell version problem, one fix that comes to mind is extracting the index update logic to a __fisher_update_index and call this directly in the part where make downloads the index for the first time. There is no need to show the progress indicator there (in fact I think you can't even see it, so it's useless).

Ok, upgrading fish helped.

@Fiedzia Good to know. I will still ship a simple fix for those non-2.2.0 users (there are some I guess) in the next milestone so I'll have this open for now.

Closing in favor of #50.


No more duplicated model/class names

Right now, we have multiple classes with the same name because Device and Device configuration models are both named the same. This is confusing.
Proposal: rename Session and Acquisition classes to "Config". Then we would have a Laser device in used in a Rig, and a LaserConfig used in a Session.

This should not be a problem when defining the classes in pydantic, if i understand correctly? Since they could, in theory, have different namespaces (i.e. modules). This will however be a problem when serializing/deserializing as JSON which, as opposed to XML, does not have the concept of namespaces. Would it be a good idea to add a new field to the aforementioned objects that establish a namespace when serialized (ie. which module do they come from)?

@bruno-f-cruz They are different concepts, so they should have different names. Better to fix the root problem.

Should be closed by https://github.com/AllenNeuralDynamics/aind-data-schema/pull/608


Reformatting package side of code

Mainly putting here for a reminder for discussion points.  I have been going through the repo and just going to put some notes and goals.

Cleaning up code.
Reading up on R packages, I found this little note.

Don’t use library() or require(). These modify the search path, affecting what functions are available from the global environment. Instead, you should use the DESCRIPTION to specify your package’s requirements, as described in chapter 8. This also makes sure those packages are installed when your package is installed.

(found at https://r-pkgs.org/r.html,  chapter 7.5).
Should we stick to R packaging guidelines? This prevents overrides like   1: replacing previous import 'dplyr::combine' by 'gridExtra::combine' when loading 'mpnstXenoModeling'
It might also clean up the markdowns, where all those packages will be installed when we install the package via the DESCRIPTION.
it also addresses the warnings in the github actions (https://github.com/sgosline/mpnstXenoModeling/runs/4538089629?check_suite_focus=true) .

Please use :: or requireNamespace() instead.

I don't mind making the adjustments once I get a hang of the tests, but mainly wanted to know everyone's thoughts on using such guidelines.  I don't think it will require a lot of work.

This is all good - but the moving the synapse install inside the package is breaking the github action. I tried to debug but it seems challenging. have you seen any examples?  This is the only one i foudn: https://github.com/rstudio/reticulate/issues/999

I think i fixed this


How can I resize HtmlFrame widget?

I cannot resize it when I want to use place function to place HtmlFrame into somewhere in tkinter frame. Can you show me an example for resizing HtmlFrame when I place it with place function?
By the way this is my code:
update = Tk()
update.resizable(height=False, width=False)
update.attributes("-fullscreen", False)
update.geometry("600x200")
update.maxsize("600","200")
update.minsize("600","200")
HTML = #This is my html, never mind it.
frame = HtmlFrame(update)
frame.load_html(HTML)
frame.enable_caches(True)
frame.enable_objects(True)
frame.enable_forms(True)
frame.set_zoom(1)
frame.enable_images(True)
frame.place(?) #What should I do here?

Hello!
you can resize HtmlFrame by calling frame.html.config(width=new_width,height=new_height) or frame.pack(fill='both',expand=True)

Hello @Yilmaz4!
You can use frame.place(height=200, width=600) to make it the same dimensions as the window. As @maxim3007 also mentioned (thank you, by the way), if you don't need to use place, you can also use frame.pack(fill='both',expand=True). This will resize the frame to fit the window. Changing the dimensions of the window will also resize the frame.
 Likewise, the zoom is automatically set to 1.0, so calling frame.set_zoom(1) doesn't change anything either.
Hopefully this answers your question!

I was already tried height and width parameters but it wasn't worked in begining, I've looked to older issues and find a issue that telling these parameters aren't working, then I tried frame.grid_propagate(0) and this solved my problem without using .pack(). By the way I heard that this command was used to disable size override but I wasn't overrided the size using .pack(fill="both",expand=True) etc. I think there is a problem.
By the way again, set_zoom was set to 0.8, I was changed it to 1 before copying here :) also thanks for information saying these other commands was already enabled!

The height and width parameters of HtmlFrame don't take effect until grid_propagate(0) or pack_propagate(0) (depending on your geometry manager) are called. That being said, .place(width, height) should work fine.
Also, pack(fill="both",expand=True) actually does override the width and height of the widget, because it is telling the widget to expand whenever possible. That's why you'd need pack_propagate(0) in this case, it tells Tkinter that

@Yilmaz4 Have we answered your question, or are you still having difficulties?


Add release workflow

Summary

This adds a GitHub workflow for releasing the sigstore-go binary and provenance attestation.
I have made a few decisions that need consideration:

So far, sigstore-go's releases have been source code only. With this workflow, sigstore-go will release binaries with attestation for these binaries. This might not be the way that users consume sigstore-go at the moment, and we should consider if we should add attestations for the source code instead.
The workflow builds and releases binaries for linux, macos and windows. Should sigstore-go do that?
Should the release workflow run make test or should that be a separate workflow?
The names of the final binaries are "sigstore-go-${{ matrix.os }} with ".exe" for windows.
There is no attestation for windows binaries because it is not supported.
For easier testing, the triggers are now either dispatch or push.

The windows runner is giving me some problems which is why I am hardcoding the binary name:
      with:
          name: 'sigstore-go-windows-latest.exe'
          path: 'sigstore-go-windows-latest.exe'

It could be refactored to look nicer.
Release Note

Documentation

@haydentherapper Could you have a look?

So far, sigstore-go's releases have been source code only. With this workflow, sigstore-go will release binaries with attestation for these binaries. This might not be the way that users consume sigstore-go at the moment, and we should consider if we should add attestations for the source code instead.

This was intentional to only release source code archives. We want to discourage users using the sigstore-go CLIs - they are meant as examples for signing and verification.
I'd say we only need a provenance attestation on how the source archive was built.

I would also not recommend releasing any binaries by the reason @haydentherapper mentions.

Current status with https://github.com/sigstore/sigstore-go/pull/280/commits/c3d757f54b58e9c44edfc0ef15e712821f884b4c
I have adjusted the workflow so that it generates verifiable provenance for the compressed sigstore-go  source archives.
The interoperability between the compressed source archives and https://github.com/actions/attest-build-provenance is not great (although there are many good things to say about https://github.com/actions/attest-build-provenance), so I've had to do some workarounds. The following areas lack support to make generating provenance for source archives simpler:

AFAICT, we don't have access to the source archives before a release has been issued. I have mitigated this by first issuing a releasing, then download the source archives and generate provenance for them.
There are multiple ways you can download the source archives, and they all have different formats. We need to generate provenance for all of them. The main difference is what the directory is called after you compress it. Decompressed archives will be called sigstore-sigstore-go-latest-commit (7 first digits). Another will be called sigstore-go-0.7.0 (without "v"), and another will be called sigstore-go-v0.7.0 (with "v"). GitHub needs an attestation for each compressed archive, because the gh binary will look up attestation based on the compressed archives checksum.
GitHub generates the compressed source archives by way of git archive. I have tried to reproduce the command that generate the archives, but I can't.

With the current state of the workflow, users can download the sigstore-go source archives by any of the following ways. These are tested out on my own repo, so I am adding reproducible steps that succesfully verify:
First, generate a token with content:read permissions for https://github.com/AdamKorcz/test-releasing.
Next setup the gh CLI tool locally.
Then, do one of the following:
Method 1: curl (zipball)

curl -L
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer "
-H "X-GitHub-Api-Version: 2022-11-28"
https://api.github.com/repos/AdamKorcz/test-releasing/zipball/v0.2.6 > artifact.zip
gh attestation verify artifact.zip --repo=AdamKorcz/test-releasing

Output:
Loaded digest sha256:22d5242aa2107d16920d2d3aeb9b4fd7b0d8992b0ebb604b21b190de1447c99e for file://artifact.zip
Loaded 1 attestation from GitHub API
✓ Verification succeeded!

sha256:22d5242aa2107d16920d2d3aeb9b4fd7b0d8992b0ebb604b21b190de1447c99e was attested by:
REPO                      PREDICATE_TYPE                  WORKFLOW
AdamKorcz/test-releasing  https://slsa.dev/provenance/v1<EMAIL_ADDRESS>
Method 2: curl (tarball)

curl -L
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer "
-H "X-GitHub-Api-Version: 2022-11-28"
https://api.github.com/repos/AdamKorcz/test-releasing/tarball/v0.2.6 > artifact.tar.gz
gh attestation verify artifact.tar.gz --repo=AdamKorcz/test-releasing

Output:
Loaded digest sha256:6a2b5cf8671de291aad4fab2020341044905efa2a9e9f352ab82be1e7b394b9d for file://artifact.tar.gz
Loaded 1 attestation from GitHub API
✓ Verification succeeded!

sha256:6a2b5cf8671de291aad4fab2020341044905efa2a9e9f352ab82be1e7b394b9d was attested by:
REPO                      PREDICATE_TYPE                  WORKFLOW
AdamKorcz/test-releasing  https://slsa.dev/provenance/v1<EMAIL_ADDRESS>
Method 3: wget archive/tags/REF (zipball)

wget https://github.com/AdamKorcz/test-releasing/archive/tags/v0.2.6.zip
gh attestation verify v0.2.6.zip --repo=AdamKorcz/test-releasing

Output:
Loaded digest sha256:dee47b879d1493dce252032f2793af459b43ba49fc966baf6843cdc8192bbb54 for file://v0.2.6.zip
Loaded 1 attestation from GitHub API
✓ Verification succeeded!

sha256:dee47b879d1493dce252032f2793af459b43ba49fc966baf6843cdc8192bbb54 was attested by:
REPO                      PREDICATE_TYPE                  WORKFLOW
AdamKorcz/test-releasing  https://slsa.dev/provenance/v1<EMAIL_ADDRESS>
Method 4: wget archive/tags/REF (tarball)

wget https://github.com/AdamKorcz/test-releasing/archive/tags/v0.2.6.tar.gz
gh attestation verify v0.2.6.tar.gz --repo=AdamKorcz/test-releasing

Output:
Loaded digest sha256:4af7194a96f05a08189a5c0fc824bfcfacc8cbd0e5f9f37787727d513a3a91b7 for file://v0.2.6.tar.gz
Loaded 1 attestation from GitHub API
✓ Verification succeeded!

sha256:4af7194a96f05a08189a5c0fc824bfcfacc8cbd0e5f9f37787727d513a3a91b7 was attested by:
REPO                      PREDICATE_TYPE                  WORKFLOW
AdamKorcz/test-releasing  https://slsa.dev/provenance/v1<EMAIL_ADDRESS>
Method 5: wget archive/refs/tags/REF (zipball)
(same as Source code (tar.gz) link from release page

wget https://github.com/AdamKorcz/test-releasing/archive/refs/tags/v0.2.6.zip
gh attestation verify v0.2.6.zip --repo=AdamKorcz/test-releasing

Output:
Loaded digest sha256:cfd47adfae74fbdeeebf1fee424317aef540e65875017b52296a473235fca973 for file://v0.2.6.zip
Loaded 1 attestation from GitHub API
✓ Verification succeeded!

sha256:cfd47adfae74fbdeeebf1fee424317aef540e65875017b52296a473235fca973 was attested by:
REPO                      PREDICATE_TYPE                  WORKFLOW
AdamKorcz/test-releasing  https://slsa.dev/provenance/v1<EMAIL_ADDRESS>
Method 6: wget archive/refs/tags/REF (tarball)
(same as Source code (zip) link from release page

wget https://github.com/AdamKorcz/test-releasing/archive/refs/tags/v0.2.6.tar.gz
gh attestation verify v0.2.6.tar.gz --repo=AdamKorcz/test-releasing

Output:
Loaded digest sha256:4af7194a96f05a08189a5c0fc824bfcfacc8cbd0e5f9f37787727d513a3a91b7 for file://v0.2.6.tar.gz
Loaded 1 attestation from GitHub API
✓ Verification succeeded!

sha256:4af7194a96f05a08189a5c0fc824bfcfacc8cbd0e5f9f37787727d513a3a91b7 was attested by:
REPO                      PREDICATE_TYPE                  WORKFLOW
AdamKorcz/test-releasing  https://slsa.dev/provenance/v1<EMAIL_ADDRESS>

@haydentherapper @kommendorkapten I am keeping this in draft, but could you consider https://github.com/sigstore/sigstore-go/pull/280/commits/c3d757f54b58e9c44edfc0ef15e712821f884b4c and https://github.com/sigstore/sigstore-go/pull/280#issuecomment-2310823926


Money

the ability to automatically create Carbon objects from a stored value is great. I think this feature should be extended to automatically create Money objects from a stored value.

To utilize this functionality it is as simple as creating a monies property on your model, with the key being the field/attribute name, and the value being the currency you wish to use for it.
protected $monies = [
    'price'  => 'usd',
    'price2' => 'eur',
    'price3' => 'aud',
];

this also adds a helper method for migrations to create a money field.  it is simply a wrapper for unsigned integer. this means that monies should be stored in their sub units (i.e cents) rather than their base units (i.e. dollars).
$table->money('price')

I am using a Money package I created myself.
If you want/need this for your own projects, just create a base model and make your own models extend it, pretty basic stuff.

@brunogaspar normally I'd agree with you, but when I find myself overriding laravel framework methods, that's when i start thinking about the PR. also, i imagine a large percentage of projects utilize money. wouldn't this be another great feature for laravel to offer?

This would make sense as a package.


Rewriting URLs breaks hydration

Summary
Rewriting URLs breaks hydration. Probably because hydration is based on the current URL.
Steps to reproduce

Get repro git clone https://github.com/Breek/solid-stat-rewrite-middleware
Get into dir cd solid-stat-rewrite-middleware
Start app pnpm install && pnpm dev
Navigate to http://localhost:3000/
Open browser console.
Click About Company
On the new page, click the <Counter /> component.

Expected behavior
When I navigate to /about this should happen:

The route page about-company.tsx should be rendered by the server.
The route page about-company.tsx should be hydrated.
The <Counter /> component should work.

Actual behavior
When I navigate to /about this should happen:

The route page about-company.tsx should be rendered by the server: OK
The route page about-company.tsx should be hydrated: KO
The <Counter /> component should work: KO
Errors shown in the browser’s console shows that the hydration process of the […404] page route is triggered.

Additional context
MPA: the application should be a Multi Page App - related commit. I’m using <a> instead of <A>.
My understanding: hydration happens based on the browser current URL. I don’t really know, nor understand, the internals of Solid Start, but I guess this happens thanks to the manifest.
I think that for this kind of use cases, hydration should be fired based on rendered route as opposed to current browser URL.
Rewrite: some months ago, I had a chat with @nksaraf where he suggested me this kind of approach to do URL rewriting (Discord chat with Nikhil).
I’ve seen the internal-fetch branch of Solid Start. And especially this commit seems to deal with rewrite:
test("should rewrite", async ({ page }) => {
  let app = new PlaywrightFixture(appFixture, page);
  await app.goto("/api/rewrite", true);
  await page.waitForSelector("[data-testid='redirected']");
});

But I don’t know if this is related to my issue 🧐.
Would love some help on this.
Cheers,
Jérémy

Thanks for the really detailed exploration. Had been away for the holidays. Will explore this week.

Hi @nksaraf!
I was wondering if you've had a chance to take a look at this issue? If you have any advice or could point me in the right direction to investigate, I would really appreciate it.
Thank you,
Jérémy

I finally could implement full URL rewriting by patching Solid Router.
First I created a middleware which gets the Solid Start route for a given URL (this is done server-side):
if (pathname === "/about") {
      console.debug("🛫 We want to rewrite `/about` to `/about-company`");
      // Let's create a new URL
      const url = new URL(`/about-company`, "http://internal");
      const request = new Request(url.href);

      for (const [key, value] of event.request.headers) {
        request.headers.set(key, value);
      }

      const prevPath = event.request.headers.get("x-solid-referrer");
      //...
}

Second I declare a global variable to be able to catch it on the client side, so I add this in root.tsx (this is also server-side):
import { useLocation } from "@solidjs/router";

export default function Root() {
  const location = useLocation(); // ⬅ Get location
  return (
    <Html lang="en">
      <Head>
        <Title>SolidStart - Bare</Title>
        <Meta charset="utf-8" />
        <Meta name="viewport" content="width=device-width, initial-scale=1" />
        <!-- ⬇ Populate "matchedRoute" with the rewritten URL -->
        <script>{`matchedRoute = "${location.pathname}";`}</script>
      </Head>
      <Body>
      <!-- Stuff here -->
      </Body>
  </Html>);
}

Third I patched Solid Router to assign the matched route instead of getting it from the current browser URL:
diff --git a/dist/components.jsx b/dist/components.jsx
index 1ffb7f8d13879724b708c3dc3c3da871462a9e23..7c9572657b03f03ea50dd07325cfe23be1f29106 100644
--- a/dist/components.jsx
+++ b/dist/components.jsx
@@ -15,7 +15,7 @@ export const Routes = (props) => {
     const parentRoute = useRoute();
     const routeDefs = children(() => props.children);
     const branches = createMemo(() => createBranches(routeDefs(), joinPaths(parentRoute.pattern, props.base || ""), Outlet));
-    const matches = createMemo(() => getRouteMatches(branches(), router.location.pathname));
+    const matches = createMemo(() => getRouteMatches(branches(), globalThis.matchedRoute ? globalThis.matchedRoute : router.location.pathname));
     const params = createMemoObject(() => {
         const m = matches();
         const params = {};

And tadadada 🥳 hydravion works!
I would love to have this included in a less hacky way.
Do you have thoughts on this?
Working repro: https://github.com/Breek/solid-stat-rewrite-middleware/tree/patched_router
Cheers,
Jérémy

Yea URL rewriting would be really helpful for multi tenancy where React Router fails basically.
Currently evaluating all options 🤓
Any news on first class support?

Honestly not sure where this belongs after the refactor:
In setting up for SolidStarts next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See https://github.com/solidjs/solid-start/pull/1139 for more details.


Replaced deprecated UIAlertView

The provided solution does not show an alert to the user.
Instead, the UIAlertView call will be removed and an example will be added to show a possible usage of the showErrorBlock function.


Tab completion not working for Import-Module '.\partialname'

Steps to reproduce
Navigate to the root of the powershell repo
ipmo .\bu{tab}
Expected behavior
.\bu followed by a tab is completed with .\build.psm1
Actual behavior
Nothing happens.
Note that dir .\bu{tab} and impo -FullQualifiedName .\bu{tab} do complete as expected.
Environment data
Repro'd with a build sync'd 6/14/2017
PSVersion                      6.0.0-beta
PSEdition                      Core
CLRVersion
GitCommitId                    v6.0.0-beta.2-32-g8731747c3e412edf537c3dc0b4ce6a09e6fd7d95
OS                             Microsoft Windows 10.0.16202
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Found it stopped working since Jun 7, 2017.
By looking at the commits on Jun 7, 2017, I believe it's broken by either https://github.com/PowerShell/PowerShell/commit/a52adcd3cf4f87f474131f0d3421841c39cf09c0 or https://github.com/PowerShell/PowerShell/commit/312576447637a7c12c622e8984ea091dc699a868. The former commit is more suspicious.