[Enhancement] [CameraView] Allow access to the live camera feed in CameraView

Summary
With on-device machine learning libraries like Google's ML Kit becoming popular, it's important that we have a way to access the live camera feed so that image processing can happen in real time.
API Changes
Shared Code Changes:
This would require that a new CameraCaptureMode value be added:
public enum CameraCaptureMode
{
	Default,
	Photo,
	Video,
	Preview // New capture mode for just showing the camera preview
}

Android Changes:
NOTE: For Android, this is no longer the proposed solution as it is dependent on the screen resolution of the device, which doesn't really make sense (especially for low-res devices).  See the discussion in the comments.  I'll update this issue if the new solution works out in testing.
CameraFragment.android.cs
When the CameraCaptureMode is set to Photo, CameraTemplate.Preview is used in CameraFragment.  That would likely have to change to CamaraTemplate.StillCapture.  This seems more appropriate anyway, according to Google's documentation (it prioritizes image quality over frame rate).  Then we could use CameraTemplate.Preview when CameraCaptureMode is set to Preview.
If the CameraCaptureMode is set to Preview, this could be checked in TextureView.ISurfaceTextureListener.OnSurfaceTextureUpdated(SurfaceTexture surface).  Then a call could be made to an implementation of the following interface (which would be registered in DependencyService by a consumer of XCT):
public interface ICameraPreviewProcessor
{
    Task Process(Bitmap bitmap, int rotationDegrees);
}

What OnSurfaceTextureUpdated() might look like:
async void TextureView.ISurfaceTextureListener.OnSurfaceTextureUpdated(SurfaceTexture surface)
{
    if (cameraTemplate == CameraTemplate.Preview && cameraPreviewProcessor != null)
    {
        // This using is needed to ensure that the Bitmap is garbage collected
        using var bitmap = texture?.Bitmap;
        if (bitmap == null)
        {
            return;
        }

        await cameraPreviewProcessor.Process(bitmap, GetDisplayRotationDegrees());
    }
}

Also, in CameraFragment.PrepareSession(), we would make sure that only the previewSurface is added to the capture session.
iOS Changes:
FormsCameraView.ios.cs
In InitializeCamera(), we can add an AVCaptureVideoDataOutput output to  captureSession with a custom sample buffer delegate whose sole purpose is to take the sample buffer and pass it along to the registered iOS implementation of ICameraPreviewProcessor (same name as the Android variant, but different interface):
public interface ICameraPreviewProcessor
{
    Task Process(CMSampleBuffer sampleBuffer, AVCaptureVideoOrientation orientation);
}

Windows Changes:
I admittedly haven't looked into Windows yet.  I'm hoping it's not much different from the other two platforms.
Intended Use Case
The consumer of Xamarin Community Toolkit would implement the ICameraPreviewProcessor interfaces for each platform to be able to hook into the live camera feed.  Each frame could then be passed on to other libraries for processing.
Who Will Do The Work?

[x] I am willing to take this on myself (I've already made these changes for Android and iOS here in this branch on my fork - Quick link to a compare - No tests yet since I figured I'd run it by the group first)
[ ] Just putting this out there for someone to pick up

I tested your fork in my android app instead of the main XCT, and made it work using the CameraPreviewProcessor.
I found that it works as expected in CaptureMode="Preview" mode, but if I want to use the standard CaptureMode="Photo", it displays just black.
You can reproduce it in the standard XTC Sample app.
The bitmap preview is 960*720, is there a setting for an higher resolution?
Thanks

Hi @MattiaDurli, I can try to take a look at the black photo thing when I get some time in the next week.
Regarding the resolution, this is just pulling from the live camera preview that is rendered on screen.  The main purpose of this mode would be for on-device live camera processing with ML Kit etc.  For text recognition, Google's input image guidelines recommend a 640x480 image for business card type documents and 720x1280 for a letter-sized piece of paper.  In the test app I created for this, I was able to get input images of 1570*2023 on my Pixel 4 XL which was more than enough for my use case.
I suppose we could look into pulling the preview camera feed from something else to get a higher resolution image, but I'd have to look at what the other options are.  I'm definitely not an expert in this area, so if anybody has some suggestions, I'd love to have them.  I just couldn't find any out of the box options out there so I figured I'd try modifying the XCT CameraView to suit my needs.
One thing to consider for these on-device ML libraries is that performance is important and if your input image is too big, your performance will drop.

Hi @MattiaDurli, I can try to take a look at the black photo thing when I get some time in the next week (I just tested it real quick in the XCT Sample app and it works fine on my Pixel 4 XL).

Hello @mavispuford , the issue, when CaptureMode="Photo", is that the onscreen preview is black, I havent't tried to take a photo.
I'll do some other test tomorrow, with my Pixel 3a using the XTC Sample for reference.

Regarding the resolution, this is just pulling from the live camera preview surface that is rendered on screen. The main purpose of this mode would be for on-device live camera processing with ML Kit etc. For text recognition, Google's input image guidelines recommend a 640x480 image for business card type documents and 720x1280 for a letter-sized piece of paper. In the test app I created for this, I was able to get input images of 1570*2023 on my Pixel 4 XL which was more than enough for my use case.

For now what I'm trying to do is to evaluate the preview frame bitmap to be sure that the text/barcode is focused.
Only when in focus the user will be allowed to take a photo.
So it's ok for the preview frame to be low res, for my evaluation, but I was looking for something a little bit more than the 720960 I'm getting.
I've tried the sample on a Zebra TC21, an industrial device with a screen resolution of 7201280 (so same number of rows of the frame I get).
I'm wondering if on such a device is possible to get a higher resolution preview frame, or if the preview frame is always the same of the screen resolution.

I suppose we could look into pulling the preview camera feed from something else to get a higher resolution image, but I'd have to look at what the other options are. I'm definitely not an expert in this area, so if anybody has some suggestions, I'd love to have them. I just couldn't find any out of the box options out there so I figured I'd try modifying the XCT CameraView to suit my needs.

Same here, trying to find a solution studying XTC source and your fork.

One thing to consider for these on-device ML libraries is that performance is important and if your input image is too big, your performance will drop.

Of course, I'm trying to get from 720 to 1080, then it would be enough.
I'll do some tests also to verify if it is possible to switch from preview to photo mode, or be able to process the frames, but also take the high res photo when the shutter event is called.

@MattiaDurli - I've created a new branch that approaches this differently for Android.
Instead of piggybacking off of the on-screen preview texture in OnSurfaceTextureUpdated(), I'm using a separate ImageReader with its own IOnImageAvailableListener implementation.  This seems to work in my initial testing, but I haven't had the chance to try consuming it on the other side of the ICameraPreviewProcessor.  This method allows us to set our own dimensions for the image reader, though, so that should help you with your resolution problem.
Let me know what you think.

@mavispuford - First of all thanks because with some mods to your previous branch I've been able to accomplish what I needed.
I can process the livefeed frames (Android.Graphics.Bitmap) in real time, and when process is ok I can take the high res picture.
I now updated eveything to your latest branch, and had to just move the initializer of _cameraPreviewProcessor to the second constructor, because the first wasn't called.
public OnPreviewImageAvailableListener()
		{
			_cameraPreviewProcessor = DependencyService.Get<ICameraPreviewProcessor>();
		}

		public OnPreviewImageAvailableListener(Context context)
            : base()
		{
			_context = context;
			_cameraPreviewProcessor = DependencyService.Get<ICameraPreviewProcessor>();
		}

The Android.Media.Image that is captured is now at an higher resolution, but I'm stuck at the conversion of the Android.Media.Image to Android.Graphics.Bitmap (in the previous branch ProcessCamera produced a Bitmap).
Any hint on how to do it?
Also, the Photo mode of the CameraView produces a byte[] that is a JPG.
Before sending to the server, I want to crop it so I have to decode, crop and reencode.
I see that I can set the ImageFormat to ImageFormatType.Yuv420888 for the StillPicture instead of ImageFormatType.Jpeg, like you did for the preview, but then what kind of data would I get? an Image? a Bitmap?
So far, for me it would be great to be able to get a Android.Graphics.Bitmap for both frame and photo.
Also, there's a lot of Camera2API features not exposed by the CameraView of the XTC, it's a pity.
I'll experiment more and let you know.

@MattiaDurli - That's really good to hear that you were able to get that piece working.  And good call on the initializer thing, I wasn't able to test an implementation of ICameraPreviewProcessor yet.  I think I meant to put : this() in that second constructor instead of : base().  Oops.

The Android.Media.Image that is captured is now at an higher resolution, but I'm stuck at the conversion of the Android.Media.Image to Android.Graphics.Bitmap (in the previous branch ProcessCamera produced a Bitmap).
Any hint on how to do it?

I'm not quite sure, actually.  For my use case, I've been able to pass either a Bitmap OR an Image off to ML Kit for processing without having to do any conversions.  Searching around, it seems like you have to do a YUV to RGB conversion.  This Stack Overflow answer might help.  They link to a tensorflow project that seems to do what you need (it's Java code, though).
The reason I changed the Process() signature in ICameraPreviewProcessor is because that's how the frames come out of the ImageReader and I figured I'd let the consumer do any necessary conversions.

I updated the LiveCameraFeed-Surface branch. CameraView now has a PreviewFrameQuality bindable property.  This allows you to choose between Quality and Performance from the Xaml side.  I'm not quite sure what the different resolutions for those should be, but for now, Performance sets the minimum resolution to 600x800 and Quality mode sets the minimum to 720x1280.  Also for now, it's Android-only but I plan to use that in iOS etc. too.

Thanks @mavispuford but I'm still stuck with Android.Media.Image instead of Android. Graphics.Bitmap as result of CameraProcess. It can't be that hard, there must be something I'm obviusly missing.
With Bitmap, I was able to process the frame with Emgu/OpenCV,  to save it to disk, to send it to server as bytearray/jpg/png.
Can't find a way to process the Image.
I tried to convert Image to Bitmap with various stackoverflow suggestions but the final result is garbage.
But still, Image and Bitmap are different representation of a picture, on the same system, there must be an easy way to convert them.

@MattiaDurli Sorry to hear you're still having issues with the format conversion.  Have you come across this article in your research?  It looks pretty well put together (including benchmarks for each solution).  It's crazy that Google doesn't have any convenient APIs for doing this conversion.

Hi @mavispuford yes I've already been thorugh that article, converted everything to C#, but resulting image is garbage.
I've posted here  https://stackoverflow.com/questions/66968240/convert-from-android-media-image-to-android-graphics-bitmap-possibily-with-xama to ask for help, because all other questions on StackOverflowd doesn't seem to work, I tried them all.
I see that you set Yuv420888 for the new reader, would it be possible to set it to another format to be able to retrieve a Bitmap from CameraProcess?
previewReader = ImageReader.NewInstance(previewSize.Width, previewSize.Height, ImageFormatType.Yuv420888, 1);

Yes! I would love to have this and looks like you already have a great piece of the work done. Love that :)
I'll let some other team members chime in a little on this. Since you already have something working, you might put it in a PR targeting develop so we can test it for a bit too. Only if that is not too much trouble

@mavispuford do you think if we use the CameraX this will be easier to implement/handle/maintain?

@MattiaDurli - The main reason I chose Yuv420888 is because Google says that's the most efficient format (see the image parameter under fromMediaImage()) to use for ML Kit.  I suppose we could make it configurable somehow.  We definitely don't want to make this feature only work for a single use case.
@jfversluis Good to hear!  I'll try to get a PR out for review, though it still needs a bit of refinement (I noticed a couple things in my testing that I want to confirm).
@pictos It'd probably be better in the long run to use CameraX.  Performance-wise, Google says Camera (not Camera2 or CameraX) is the best API to use. Since we're already using Camera2 here, that performance ship has already sailed.

@mavispuford I searched through that same doc and all other sources says that Yuv420888 is the way to go for both performance and reliability (other formats are not guaranteed to be supported on all cameras). So that's ok.
Probably MLKit takes care of all the conversion stuff, but there definetely should be a helper to convert the YUV to a easier to manage format, for other processing libraries.

@jfversluis, @pictos, @MattiaDurli
Alrighty, I'm kind of in a dilemma here.  As mentioned above, I went down the path of using an ImageReader/IOnImageAvailableListener combo which is much better than my first approach.  However, in my testing with ML Kit, it was having a ton of performance issues (lots of UI jank as soon as ML Kit would process anything).  I tried several things (different threading approaches, adjustments to input image size, etc.) and they all had pretty terrible performance.  We're talking frame rate drops that would freeze the camera feed in the UI for 800-1400 ms depending on the size of the image.  One weird thing to point out, though, is that the jank only happened in the CameraView and not on any Xamarin Forms UI in  my experience.
After hitting that wall, I decided to try moving over to CameraX which actually solved all my performance issues.  No frame drops at all during processing, the camera feed is buttery smooth.  However, as you might know, the CameraX libraries are still in beta ("They are ready for production use but may contain bugs.").  On top of that, they only seem to officially support photo capture at the moment.  There are APIs in CameraX for video (see blog post here) but they are restricted and require you to silence the compiler with a @SuppressLint("RestrictedApi") annotation.
The interesting thing is CameraX still leverages Camera2 behind the scenes.  It's basically a layer of abstraction on top of Camera2 that handles lifecycle events and other things for you.  But they must be doing something different (Java threading magic?) that makes the performance so much better when using their IAnalyzer pattern.
So here are my options:

Submit a PR with my original Camera2 changes that add an ImageReader/IOnImageAvailableListener which works but has performance issues - at least with ML Kit
Submit a PR with my CameraX implementation, using the IAnalyzer pattern to smoothly process frames, but then we would lose video capture or we'd have to use their restricted APIs for it

@mavispuford your CameraX implementation is even with our Camera2 implementation? If so, you can send a PR using CameraX. If not we need to first migrate our code to use CameraX and accept your PR right after.
Even in beta we think that CameraX could bring more value to the control

@mavispuford some updates on my part: my primary issue was how to deal with the YUV420888 image produced by Camera2.
It can be passed to MLKit, but if you want to use it with other libraries like OpenCV or just save it as Bitmap, you have to convert it, and all the examples I found, even Emgu conversion, was producing garbage. Then I changed camera preview resolution, and it worked.
The answer is that while the Camera2 API on different devices reports dozen of supported preview sizes available to choose from, not all of them work. I started with 1440x1080 and it was not working on my device. Then I tried on another one and it worked. Then I went on with trial and error and found that some work and some not. 640x480 or 800x600 work on all the 4  devices I tested. It doesn't depend on aspect ratio. On the one I need to develop on, 1600x1200 work, but not 1440x1080.
So I continued to develop my solution with your Camera2 implementation, using Emgu as processing library (it processes every frame, by cropping it, applyng a convolution to detect if is blurry or not) and I get a 28fps with 1200x960 and 23 with 1600x2000, consistently, that is great for me.
I haven't experienced any of your camera feed problem, for me your implementation of Camera2 API works very well.
While I was trying to solve my YUV conversion problem, I looked through CameraX documentation, but it seemed "very" beta to me, and missing some features.
What I'm still trying to do, with your implementation, is to change focus type.
I need to read at a few cm (just like barcodes) and it takes some time to get the focus. Using CONTROL_AF_MODE_MACRO should help, but it's quite tricky to implement. Unlike CONTROL_AF_MODE_CONTINUOUS_PICTURE that you set at the beginning, wih macro you have to send AF_TRIGGER requests continuosly and check the status.
I wonder if CameraX helps with that.

@qz2rg4 do you have something to add to this discussion?

@pictos My CameraX implementation doesn't have feature parity with the current Camera2 code since I only set up image analysis, but image capture could easily be added.  The biggest problem would be video capture, as that's not an official feature of CameraX at the moment.  I'm not even sure if those classes are fully exposed through the bindings.
@MattiaDurli Interesting find.  It's possible that CameraX would help with the resolution problem.  You can specify the target resolution and it finds the closest match that works with the device.  I'm not sure about the focus issue, though.  I can see that you can call StartFocusAndMetering() but it looks like it only accepts a point and doesn't let you control the focus distance:
var point = _previewView.MeteringPointFactory.CreatePoint(xPos, yPos);
var action = new FocusMeteringAction.Builder(point)
                        .DisableAutoCancel()
                        .Build();
camera.CameraControl.StartFocusAndMetering(action);

Thanks! However, we are no longer adding new features to Xamarin Community Toolkit, focusing on the .NET MAUI Community Toolkit.
Please open a New Feature Discussion to implement this feature in the .NET MAUI Community Toolkit.
I've posted more information about the Future Of Xamarin Community Toolkit here: https://devblogs.microsoft.com/xamarin/the-future-of-xamarin-community-toolkit/?WT.mc_id=mobile-0000-bramin


chore: revive beta tap and bucket

What kind of change does this PR introduce?
release
What is the new behavior?
allows beta release

brew install supabase/tap/supabase@beta
scoop install supabase@beta

Additional context
Add any other context or screenshots.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
7 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.07%) to 63.434%

Files with Coverage Reduction
New Missed Lines
%

internal/gen/keys/keys.go
7
7.94%

Totals

Change from base Build<PHONE_NUMBER>:
-0.07%

Covered Lines:
4566

Relevant Lines:
7198

💛  - Coveralls


Automated cherry pick of #2928: scheduler: fix baremetal disk and storage not match

Cherry pick of #2928 on release/2.12.
#2928: scheduler: fix baremetal disk and storage not match

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.12@348934f). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             release/2.12   #2929   +/-   ##
==============================================
  Coverage                ?   7.06%
==============================================
  Files                   ?     477
  Lines                   ?   76355
  Branches                ?       0
==============================================
  Hits                    ?    5396
  Misses                  ?   70507
  Partials                ?     452

Flag
Coverage Δ

#aFlag
7.06% <ø> (?)

Continue to review full report at Codecov.

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


ORM bugfix and enhancement

Versioned table fix

DataQuery::applyRelation now supports versioned tables
ManyManyThroughList no longer leaks draft content

column() supports related table lookup

column function now accepts table prefix format of DB fields, which allows querying data of related tables (via join)
column function now throws InvalidArgumentException if an invalid field is provided instead of failing on the query later

Behaviour changes
column without table prefix
No change
column with table prefix
Before
throw DatabaseException with a non-sensical error message (complaining about empty column name)
After
if valid table prefix
correct data fetch
else
throw InvalidArgumentException
Related issues
https://github.com/silverstripe/silverstripe-framework/issues/9387
Dependencies
https://github.com/silverstripe/silverstripe-versioned/pull/253
Notes
Split from https://github.com/silverstripe/silverstripe-framework/pull/8856

@mfendeksilverstripe are you able to rebase this off the top of 4.5 and target 4.5 instead?

This is a bugfix, I think it's fine targetting this (supported) branch?
We can merge up later.


Dynamic number of benchmark repetitions

Problem
The benchmark pallet command is invoked with --steps and --repeat arguments which decide how often a benchmark should be repeated.
This can cause issues for very short benchmarks since the time-frame on the machine is too short to get constent performance.
It especially applies to VMs which can have CPU steal and other kind of short-lived disturbances, which do not impair the average performance but destroy the bench results.
Proposed Solution
Instead of running each bench with a fixed number of repetitions, we could look to criterion for more statistical driven results.
For example running the benchmark until we get consistent average results and error otherwise with "inconsistent hardware detected".
Ideally we could also get nicer prints to directly compare with past results :smile:
Benchmarking DAG 1k/1k: Collecting 100 samples in estimated 5.0000 s (133M iter)
DAG 1k/1k               time:   [37.627 ns 37.723 ns 37.834 ns]
                        change: [-29.326% -28.527% -27.771%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  2 (2.00%) low mild
  1 (1.00%) high mild
  7 (7.00%) high severe

For example running the benchmark until we get consistent average results and error otherwise with "inconsistent hardware detected".

When we have long running benchmarks, we will have problems :P
What I just thought about for this issue, could we maybe not use criterion? Or would that be too crazy?

What I just thought about for this issue, could we maybe not use criterion? Or would that be too crazy?

Unfortunately criterion doesn't seem to expose APIs which are low level enough for us to use as-is, but considering it is relatively small (~10k lines of code, most of which we shouldn't need anyway) and liberally licensed we could just copy the relevant code verbatim into a separate helper crate and use that; should be relatively straightforward to do from what I can see.

What I just thought about for this issue, could we maybe not use criterion? Or would that be too crazy?

Criterion requires nightly, but we could maybe work around that. Anyway for a first version I would just hack it together instead of doing a larger refactor to integrate Criterion.


compileDebugJavaWithJavac fails with NoAnnotatedMethodsException when using Kotlin

It seems that the fix to issue #109 either introduced a new issue, or has only just made it possible to actually reach this problem.
:app:compileDebugKotlin UP-TO-DATE
:app:compileDebugJavaWithJavac FAILED
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> permissions.dispatcher.processor.exception.NoAnnotatedMethodsException: Annotated class 'MainActivity' doesn't have any method annotated with '@NeedsPermission'

This happens with Kotlin version 1.0.0, Android Studio 2.0 beta 6, Gradle version 2.0.0 beta 6 and JDK 1.8.0 update 65. No idea if it's the same with other versions.
These are the relevant lines from the gradle file (updated to 2.0.8):
compile 'com.github.hotchemi:permissionsdispatcher:2.0.8'
kapt 'com.github.hotchemi:permissionsdispatcher-processor:2.0.8'

And this is the activity:
@RuntimePermissions
class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        findViewById(R.id.btn_camera).setOnClickListener {
            MainActivityPermissionsDispatcher.showCameraWithCheck(this)
        }
    }

    @NeedsPermission(Manifest.permission.CAMERA)
    fun showCamera() {
        Toast.makeText(this, "Showing camera", Toast.LENGTH_SHORT).show()
    }

    @OnShowRationale(Manifest.permission.CAMERA)
    fun showRationaleForCamera(request: PermissionRequest) {
        AlertDialog.Builder(this)
                .setMessage("Requesting camera")
                .setPositiveButton("Allow", { dialog, button -> request.proceed() })
                .setNegativeButton("Deny", { dialog, button -> request.cancel() })
                .show()
    }

    @OnPermissionDenied(Manifest.permission.CAMERA)
    fun showDeniedForCamera() {
        Toast.makeText(this, "Camera denied", Toast.LENGTH_SHORT).show()
    }

    @OnNeverAskAgain(Manifest.permission.CAMERA)
    fun showNeverAskForCamera() {
        Toast.makeText(this, "Camera always denied", Toast.LENGTH_SHORT).show()
    }
}

Steps to reproduce:

Clone this repository
Open with Android Studio
Rebuild
Run

Interestingly enough the previous issue gave the error during rebuilding, while this one only throws it once you actually try to run it.

Umm wired...thx for your report.

refs. https://github.com/hotchemi/PermissionsDispatcher/blob/e0dde623c415b666f3de6ee0b56daed52d2d4943/processor/src/main/kotlin/permissions/dispatcher/processor/util/Validators.kt#L56

I think the problem is kapt. Realm has the same issue with this. Check their issue. https://github.com/realm/realm-java/issues/509
So, for now, according to them, we need to change annotation's retention @Retention(RetentionPolicy.CLASS).
I could not find good documentation for this issue except in Japanese blog post http://sys1yagi.hatenablog.com/entry/2016/02/02/130402 (Thanks @sys1yagi)

@shiraji Thx!

This issue might be fixed in master branch so I'll test it tonight and release new version.

Did you already happen to get around to testing the possible fix?

Sorry I forgot to do that, do it soon.

@fdorssers Just released 2.0.9. Sorry for the late.


Unify SGMCMC API

Currently we have sgld and sghmc return step functions with no init, whilst csgld and sgnht return a MCMCSamplingAlgorithm with an init function.
It may be desirable to unify this API so that all SGMCMC algorithms have the same MCMCSamplingAlgorithm API with an init function that may just be a dummy function e.g. lambda position: position. This would be desirable so that the user can seamlessly switch between algorithms.
One question is how to format the init, i.e. should we enforce a rng_key input even though some algorithms (e.g. csgld) do not require a random key on init
To me, there seems to be four options

Leave it as is, each sampler has its own structure and we do not enforce an init
Enforce an init but no structured signature
Enforce an API like init(rng_key: PRNGKey, position: PyTree, alpha: float = 0.01) where rng_key is enforced but not necessarily used. Any additional arguments come after position.
Swap position and rng_key so that we can give the default rng_key=None for algorithms that do not need it.
E.g. init(position: PyTree, rng_key: PRNGKey = None, alpha: float = 0.01). Problem here is if the algorithm init requires additional arguments that are not optional, they would have to come between position and rng_key which would disturb the swappable API. This would not be a problem for the current sgmcmc suite but it could feasibly be for new algorithms.

We should also keep in mind the API for blackjax.mcmc and other parts of the package when deciding on this design.
WDYT @albcab ?

+1 to standardized it with init so the top layer API return a MCMCSamplingAlgorithm as well (option 4).

MCMCSamplingAlgorithm currently enforces an init(position: PyTree) signature and it should be kept this way. Exceptions like ghmc or sgnht should add rng_key after position as an additional argument and use # type: ignore[arg-type] to ignore the signature when testing. Any other additional argument can come before or after rng_key, but after position.
In the specific case of sghmc and sgnht with the alpha and beta parameters: these are parameters of the kernel, so they should be passed in __new__. They are ignored now and passed as default, they should be passed as default in __new__ (possibly after a *, because you'd hope that the end user that is modifying these parameters actually knows what they are doing).
For sgnht you seem to be using alpha as an initial value for xi, you could keep it this way and avoid any additional parameters on the init function, or allow the user to pass any initial value for xi. If you choose the latter I would pass init_xi after rng_key with a default value of None and do something like cls.init(rng_key, position, init_xi or alpha).
In any case, going from hmc/sghmc to ghmc/sgnht will require the end user to pass an extra rng_key to the init. It should be this way because they are now working with a persistent momentum and you'd hope the end user is aware of this.

Maybe this ruins the seamlessly switching, but I do think it's important for the end user to know that there is another source of pseudo-randomness in the procedure now.


chore: add code style improvements

Closes #86

@rultor merge it.

@rultor merge it.

@rafamizes OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge it.

@rafamizes Done! FYI, the full log is here (took me 2min)


bug: repeat detection code doesn't work well when using a :lua keymap rhs

Did you check docs and existing issues?

[X] I have read all the flash.nvim docs
[X] I have searched the existing issues of flash.nvim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
all
Operating system/version
linux (arch btw)
Describe the bug
an rhs of :lua require("flash").jump()<CR> will trigger the repeat code because of the dot.
Steps To Reproduce
Create an rhs with :lua
Expected Behavior
Should not trigger repeat
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  { "folke/flash.nvim", opts = {} },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

test

As a workaround, you can use bracket notation: [[:lua require("flash")["jump"]()<CR>]]

You can also just use a function or a <cmd> string instead

Fixed by documenting this.


obsidian-export: 23.12.0 -> 24.11.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/zoni/obsidian-export/releases.
meta.description for obsidian-export is: Rust library and CLI to export an Obsidian vault to regular Markdown
meta.homepage for obsidian-export is: https://github.com/zoni/obsidian-export
meta.changelog for obsidian-export is: https://github.com/zoni/obsidian-export/blob/v24.11.0/CHANGELOG.md
Updates performed

Rust version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 24.11.0 with grep in /nix/store/dzxh0lazyxky83yjrvwj1qrjhh6sal00-obsidian-export-24.11.0
found 24.11.0 in filename of file in /nix/store/dzxh0lazyxky83yjrvwj1qrjhh6sal00-obsidian-export-24.11.0

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

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

obsidian-export

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/dzxh0lazyxky83yjrvwj1qrjhh6sal00-obsidian-export-24.11.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

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

Or:
nix build github:r-ryantm/nixpkgs/1de722f08c29ad267b77ece1e75be82319316dd2#obsidian-export

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/dzxh0lazyxky83yjrvwj1qrjhh6sal00-obsidian-export-24.11.0
ls -la /nix/store/dzxh0lazyxky83yjrvwj1qrjhh6sal00-obsidian-export-24.11.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review

x86_64-linux

:white_check_mark: 1 package built:

obsidian-export

Maintainer pings
cc @TomaSajt for testing.

[!TIP]
As a maintainer, if your package is located under pkgs/by-name/*, you can comment @NixOS/nixpkgs-merge-bot merge to automatically merge this update using the nixpkgs-merge-bot.

Add a :+1: reaction to pull requests you find important.

I'm getting some errors when exporting
Caused by:
   0: Failed to decode YAML frontmatter in '/home/toma/my-notes/path/to/some/note.md'
   1: invalid type: sequence, expected a YAML mapping

Didn't get this before.
Might look into why this happens

Also, the project was relicensed to BSD-2-Clause Plus Patent License, so that will have to be updated too.


Clarify the difference between fetching from a related resource URL and a relationship URL

In the Fetching Resources section, the example implies that the request
GET /articles/1/author

yields the response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "links": {
    "self": "http://example.com/articles/1/author"
  },
  "data": {
    "type": "people",
    "id": "12"
  }
}

In the Fetching Relationships section, the example implies that the request
GET /articles/1/links/author

yields the response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "links": {
    "self": "/articles/1/links/author",
    "related": "/articles/1/author"
  },
  "data": {
    "type": "people",
    "id": "12"
  }
}

Are GET requests to these URLs intended to be identical (except for the self link)? What is the difference between the /articles/1/links/author and the /articles/1/author endpoints?

The Fetching Resources section is all about fetching resources not relationships.
The first example is prefaced by "And the following request fetches an article's author:"
It should not yield the response you've indicated, but rather the author resource as primary data.
This is explained in the definition of "related resource URL" - see http://jsonapi.org/format/#document-structure-resource-relationships

Okay. This was unclear to me because it is possible for a "link object" and a "resource object" to be identical, if the representation of the resource includes only the minimum required elements (id and type).

Is there an example that makes this unclear to you? Knowing the distinction now, do you have a suggestion to clarify it for others?

I appreciate you taking the time to consider how best to convey this information!
I think an example showing the response on a request to a related resource URL would help clear this up. For example, "on a request to GET /articles/1/author the response would be ..." and "on a request to GET /people/1/articles the response would be ...", both in the Fetching Resources section.
Or I might just add a reminder that says "the response when fetching from a related resource URL is a resource object, whereas the response when fetching from a relationship URL is a link object." I know these are stated in the Document Structure section, but a reminder that appears physically closer to the Fetching Data section might be helpful.

Ok - thanks for the suggestions, @jfinkels! I'll reopen this as a reminder to add such a clarification.

This is already explained, just not in the Fetching Resources section.
If we're going to have a more detailed discussion on related resource URLs, then ideally it should address resource creation as well (#496). It's pretty obvious that if a (related) collection supports POST, a newly created resource MUST end up as part of that collection, i.e., it should become associated with the parent resource. Spelling this out might not be necessary, but it wouldn't hurt to at least say something about the POSTability of related resource URLs.

I believe this has been resolved in the latest revision of specification. I would be very open to a PR if it is deemed that further clarification is still needed.

I still don't understand what the difference is. Plus, some of the links in this thread are dead. Can anybody point me to a response example for each endpoint? In the Fetching Resources section I found examples of responses from endpoints with the format articles/1/relationships/author. For the format articles/1/author, the only example I found was for an article with a missing author, which really doesn't help illustrate the difference.

Thanks @dgeb , I get it now. Still I think an example would really help illustrate this.

@dgeb If there is always one author then why have a link for "articles/1/relationships/author" that does not contain the information. That doesn't seem useful.

@nickjuntilla Although you are not required to support either type of endpoint, they each serve a distinct function.
A relationship endpoint is specific to the relationship. Metadata (e.g. timestamps) and links can be returned that are specific to the relationship. Furthermore, the relationship can be mutated or deleted without affecting the resources involved. For instance, an article's author could be changed or cleared via a request to a relationship endpoint.
On the other hand, related resource links provide access to the related resource objects themselves (not the relationship).

@dgeb Could the relationship endpoint be derived from resource relationship in the URL? That is if there is a articles/1/authors can it be assumed that there will always be a articles/1/relationships/authors? I'm can see the usefulness as far as updating without affecting the contents of those objects, but now I'm wondering why we have to explicitly state something that seems like it can be obviously implied or at most implied with a boolean as to it's existence.

@nickjuntilla The base spec doesn't make any requirements of URLs - only recommendations. Furthermore, there's no requirement that any links at all be included by the server. However, doing so makes your API more discoverable.

@dgeb Thanks, that clears things up.


[Bug]: App crash due to add _meta.json or yaml format error

Version
System:
    OS: macOS 14.0
    CPU: (10) arm64 Apple M2 Pro
    Memory: 206.80 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 118.0.5993.96
    Safari: 17.0
  npmPackages:
    rspress: ^1.1.3 => 1.1.3

Details
After creating _meta.json, the app will crash. Then it prompts that the port is already in use, I should restart the app manually.

I changed the frontmatter in index.md, and the app also crashed. Throw out a yaml exception, that makes a bad DX.

Reproduce link
https://github.com/web-infra-dev/rspress/tree/main/packages/create-rspress/template
Reproduce Steps
Use rspress default template.

Update frontmatter in index.md, deliberately creating yaml syntax error.
Add new page, then add a _meta.json.

Thank you very much for feedback. I understand that it hurt DX a lot and i will fix the problem right away.


Missing action options

@rahuldhide please take a look.
The same Fixture instance has different actions.
Go to Fixtures screen -> click "three dot menu" button, the list contains: "Reassign" and "Delete" -> open this instance to see details -> click three dot button on top, the lis contains: "Create Instance", "Reassign Template", "Delete Class".

Similar issue is on the Volumes screen:

Fixtures:
Fixture class's interaction model is similar to the folders on file system. It's a container of fixtures. Therefore, when we are displaying a list of classes, we can't display action to add fixtures. Create Fixture should be available only when user in inside a class. Current model is correct.
We need to fix following issues for the fixture menus:

Use consistent icons for the actions
Display reassign only when it's applicable. @alexmt we have discussed those usecases in the past.

Volumes
Volumes list items and details page should have consistent actions. Add Edit option on the list.

@rahuldhide . I believe 'Reassign' should be available for all enabled classes. We are showing warning and encourage user to use 'Reassign' only if class template had been deleted but 'Reassign' button should be available any time.

@alexmt I have updated my previous comment based on our discussion about Reassign action.


Handle Bnnn when nnn + v0 is greater than 0xFFF

This condition puts the interpreter past the end of memory, which needs some sort error handling to be implemented. Maybe set an error flag? raise exception?
this should probably be thought of in concert with debugger / UI. Asking the emudev discord suggests that it's rare in practice, so it might not be worth handling immediately.

a suggestion for safe handling was new_PC = (V[0] + (opcode & 0xFFF)) & 0xFFF but this swallows the error and hides it from the user, which may be bad during debug.

This might be best done after #50 and other optional param tickets are done, and then have it be one of those optional quirks mode settings. Also check how other implementations handle it.

If XO Chip or other larger memory model modes are implemented, this might actually be fine.


wechat-uos broken with nixos-unstable

Reopen from #49
Same problem occured again after the nixos-unstable channel update to commit ad416d0
> /nix/store/a90bc7k65qdjl9v6c7dn2i92i3ld246h-wechat-uos-<IP_ADDRESS>/bin/wechat-uos
Has MIT-SHM     : true
Has MIT-SHM FD  : true
xcb_shm_attach() failed
failed to create System V shared memory segment (remote X11 connection?), disabling SHM
[0906/173328.614697:ERROR:directory_reader_posix.cc(42)] opendir /home/ltrump/.xwechat/crashinfo/attachments/8d59a1da-866c-47f3-9b06-9f6401735b51: No such file or directory (2)

Can you try the latest commit? This is caused by https://github.com/NixOS/nixpkgs/pull/332617

Can you try the latest commit? This is caused by NixOS/nixpkgs#332617

Its fixed! Thanks!!


"previous world is null"

So, I got a command block setup(using command hook along side multiverse) and I'm not sure if its either command hook or multiverse. There's nothing generating in console log indicating a problem with multiverse or command hook. I get spammed in the chat "previous world is null" while stepping on a pressure plate that teleports a player to an existing world, but then it teleports me to that existing world upon stepping onto a different pressure plate. Is this normal?

I'm going to need more information. What commands are the pressure plates running?

It's only running:
/mvtp @p lobby
Command hook adds support to for the @p

The message you're getting isn't found anywhere within Multiverse-Core or Multiverse-Inventories. Those are the only Multiverse plugins that could possibly be relevant. My best guess is some other plugin is causing those messages.

I don't know if this has to do with anything, but I just looked in the console, and I found something that was generated by Multiverse-Core.
"Multiverse-Core v4.0.0-b766 has a register a listener for org.bukkit.event.entity.EntyCreatePortalEvent on "public void com.onarandombox.MultiverseCore.listeners.MVPortalListener.entityPortalCreate(org.bukkit.event.entity.EntityCreatePortalEvent)", but the event is Deprecated. "Server performance will be affected"; please notify the authors." Then it lists the authors

As stated above, the error you're having isn't Multiverse related. As for the deprecated warning, Multiverse is aware of the deprecated event that you're informed about in console. The "performance impact" isn't noticeable and is fine to ignore.
Closing ticket. Please open a new ticket if you're having issues with Multiverse or for a faster response, you can also receive support on the Multiverse Discord.

@NanoParticles looks like it is LobbyAPI that causes this message.

Got here from google, and eventually found out that it is indeed from LobbyAPI:
Error line: https://github.com/ZombieStriker/LobbyAPI/blob/4f849fd65ffd3f410f0a3ed18a2345c177e6fac2/src/me/zombie_striker/lobbyapi/Main.java#L433
Reported issue:
https://github.com/ZombieStriker/LobbyAPI/issues/7


[axis] export orientation constants. fixes #79

https://github.com/hshoff/vx/issues/79
also design polish on legends demo

Coverage remained the same at 27.829% when pulling ac87752c2e15a7cd1336e7c2dee96760ac47a67a on harry-axis-export into f4ba4522587ee2d98e8d7387f8e9006b81c15619 on master.


Add reference generation tool to the repo

This tool can be used to generate unpublished "API" types. Check the README.md for more details.

Still reviewing
/approve cancel

I won't get to this till tomorrow.

This looks ready to merge in.
Thanks @tengqm .
/lgtm


replace time.Duration(1000) with time.Microsecond

Found using https://go-critic.github.io/overview#namedConst-ref

In some cases, like in this one (which is a test) I prefer to keep it as is, if you take a look at the json document it uses 1000 value. I think it's more clear to keep the assetion to time.Duration(1000).

BTW, feel free to re-open if you think that there are some advantages.

@gchaincl, your feedback is very appreciated, thanks.
This is the reason why I'm sending separate fixes in different PRs, so it's easier to reject particular things without much hassle.


Remake order is not remaking the order - misleading behavior

Currently the 'Remake Order' button in profile is only adding the same products to the cart. It's misleading. At bare minimum it should also redirect to checkout.

@anqaka how are things with this one? :)

@MikeSheward
If I use 'Remake order' from dropdown list
 - it works (I'm redirected to checkout) - BUT if I will remove products from cart and I will try again remake the same order then it doesn't work. Im' redirected to Home page and "Shopping cart is empty. Please add some products before entering Checkout" pop-up occurs and at the same time product is added to cart.

What more? If I click on "view order"  from dropdown list and after that I click 'Remake order' link (on order details page) it causes only adding product to cart (without redirecting to checkout)

Probably fixed in the https://github.com/DivanteLtd/vue-storefront/pull/2887

@pkarw I've been testing this issue on the newest version of your branch - problems reported by Alina no longer occur :)
But we have got one new issue now - 'remake order' doubles the product quantity in the order:

sometimes it is visible in the checkout summary

but often it is visible only after going to the order details of recently placed order

Could You please re-test? I've been working all day Today on this PR so it might been some side effects of the other fixes. Currently I can't reproduce this error

Retested, Works for me :) thanks


numeric OTP token input

improved on-screen keyboard support (for mobile)

Coverage remained the same at 84.381% when pulling dcb39652a8e27c6448dd195578ec396f199676c7 on radicallyopensecurity:numeric-otp into 3d8c2f6c3a61d5e2ea5e599ffe4aebc2d8c6f0e1 on CentauriSolutions:master.


Update default Docker port for .NET 8+

Update the default Docker image port, if specified, for .NET 8+.
Relates to #31.

@slang25 What do you think of this with regards to your suggestion when we spoke earlier today?

This is nice, I like it. Maybe an additional "Please update any related orchestration config accordingly", what I'm hoping is that this message is enough for most people to realise there is outstanding work for them to do.


Falling animation repeats

When glass gets breaked it apears once again and falls again :-X
I am adding view with default listener

	RelativeLayout relative = (RelativeLayout) getLayoutInflater().inflate(R.layout.view_break_glass, null);

	ImageView imageView = (ImageView) relative.findViewById(R.id.glass);

	BrokenView brokenView = BrokenView.add2Window(this);

	BrokenTouchListener listener = new BrokenTouchListener.Builder(brokenView).build();

	imageView.setOnTouchListener(listener);

	return relative;

@zhanyongsheng any idea what could be the reason for this?

I'm seeing the same issue on Android 8.  Doesn't happen on Android 6.

The problem seems to be in BrokenAnimator here:
        if (fraction > 0.8 && bPressed) {
            canReverse = false;
            setRepeatCount(1);
        }

Not exactly sure what the problem is, but I think this is where the repeated animation is set up.

Here's a hack that gets around the repeating animation.  It's probably not the best solution, but it works  so I'll use it for now.  In BrokenAnimator.draw change:
public boolean draw(Canvas canvas) {

    if (!isStarted()) {
        return false;
    }

    float fraction = getAnimatedFraction();

To this:
private HashMap<Integer,Float> stageToPercentageMap = new HashMap<>();

public boolean draw(Canvas canvas) {

    if (!isStarted()) {
        return false;
    }

    float whatAndroidThinksThePercentageIs = getAnimatedFraction();

    if (stageToPercentageMap.get(getStage()) == null ||
            stageToPercentageMap.get(getStage()) < whatAndroidThinksThePercentageIs)
    {
        stageToPercentageMap.put(getStage(),whatAndroidThinksThePercentageIs);
    }

    float fraction = stageToPercentageMap.get(getStage());

Android 8 seems to be running the animation too quickly and we end up getting a repeated FALLING state.  Basically, this just makes sure that the percentage completion for each state is always going UP, not down.

@metaphyze thx. How about a Pull Request, so the owner of this project will hopefully review it.


feat:: Added Keptn 0.17 jmeter integration based on job-executor

This PR adds the JMeter integration based on job-executor for Keptn 0.17.x based on the previous one (for version 0.13.x).
Never versions of Keptn might work, but I haven't had the chance to test it.

Thanks @StackScribe . I will take a look at them and adapt the PR.

Should this have some sort of "historical" note about the change in status for JMeter. If one is running an earlier version of Keptn, does. one still have jmeter as part of Keptn Core so that running it under JES would be superfluous? Et cetera.

I tried to avoid getting too much of historical information into the documentation of the integration itself, as there was always the option to not install jmeter-service, aswell as to install it manually (e.g., in a remote execution plane setup).
Anyway, the README.md file already contains the following information which should cover the aforementioned cases:

If you have installed jmeter-service, uninstall it
helm uninstall jmeter-service -n keptn


Does a HASH_CTX cannot be reuse after it already have >= *_BLOCK_SIZE bytes data?

Hi, @gbtucker, I have the following sample program. when I submit >= 64 bytes in a HASH_CTX, and then submit a zero-length array with the same HASH_CTX, I got HASH_CTX_ERROR_ALREADY_PROCESSING error.
But when I do the same procedure but have less than 64 bytes in the first submit, it's ok.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <assert.h>
#include <isa-l_crypto.h>
#include <endian.h>

int main(void) {
    fprintf(stderr, "ISA-L crypto version: %u.%u.%u\n", ISAL_CRYPTO_MAJOR_VERSION, ISAL_CRYPTO_MINOR_VERSION,
            ISAL_CRYPTO_PATCH_VERSION);

    MD5_HASH_CTX_MGR *mgr = NULL;

    int e = posix_memalign((void *) &mgr, 16, sizeof *mgr);
    assert(e == 0);
    assert(mgr != NULL);
    md5_ctx_mgr_init(mgr);

    MD5_HASH_CTX job;
    hash_ctx_init(&job);

    const char *msg = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
    uint32_t len = strlen(msg);

#if 1
    // Submit >= 64 bytes is NOT OK for later submit()
    MD5_HASH_CTX *ctx = md5_ctx_mgr_submit(mgr, &job, msg, len, HASH_FIRST);
#else
    // Submit < 64 bytes is OK
    MD5_HASH_CTX *ctx = md5_ctx_mgr_submit(mgr, &job, msg, len - 1, HASH_FIRST);
#endif

    if (ctx != NULL) {
        fprintf(stderr, "> #1 ctx->error = %d\n", ctx->error);
        assert(ctx->error == HASH_CTX_ERROR_NONE);
    }
    ctx = md5_ctx_mgr_submit(mgr, &job, NULL, 0, HASH_LAST);
    if (ctx != NULL) {
        fprintf(stderr, "> #2 ctx->error = %d\n", ctx->error);
        assert(ctx->error == HASH_CTX_ERROR_NONE); // L41
    }

    ctx = md5_ctx_mgr_flush(mgr);
    assert(ctx == &job);
    if (ctx->error == HASH_CTX_ERROR_NONE) {
        uint32_t *p = job.job.result_digest;
        printf("%x%x%x%x\n",
               htobe32(p[0]),
               htobe32(p[1]),
               htobe32(p[2]),
               htobe32(p[3])
        );
    } else {
        fprintf(stderr, "> #3 ctx->error = %d\n", ctx->error);
        assert(ctx->error == HASH_CTX_ERROR_NONE);
    }

    free(mgr);
    return 0;
}

$ gcc -Wall -Werror main.c -lisal_crypto && ./a.out
ISA-L crypto version: 2.24.0
> #2 ctx->error = -2
a.out: main.c:41: main: Assertion `ctx->error == HASH_CTX_ERROR_NONE' failed.
[1]    1234432 abort (core dumped)  ./a.out

Is this something that is related to the BLOCK_SIZE? for example MD5 have 64 bytes block size:
// Hash Constants and Typedefs
#define MD5_DIGEST_NWORDS	4
#define MD5_MAX_LANES		32
#define MD5_MIN_LANES		8
#define MD5_BLOCK_SIZE		64 // This
#define MD5_LOG2_BLOCK_SIZE	6
#define MD5_PADLENGTHFIELD_SIZE	8

Meaning when a single job(HASH_CTX) had submited >= BLOCK_SIZE bytes, later submit() will get HASH_CTX_ERROR_ALREADY_PROCESSING error.
So we must use a new job(HASH_CTX) for a later submit() in such a case? Am I right?

How can I cumulative calculate the md5 checksum of several input buffers? Just like md5sum.
(I can certainly tell that the above sample program usage is something wrong)

So we must use a new job(HASH_CTX) for a later submit() in such a case? Am I right?

If it is an update to a previously started job (more data for a single hash job before finalize) you must wait until that job has completed.  There is no way to run pieces of the same hash job in parallel since it is a cryptographic hash, only independent hash jobs can be run together.

How can I cumulative calculate the md5 checksum of several input buffers? Just like md5sum.

If they are independent checksum jobs (files like in md5sum) then it is possible to submit pieces from each to run in parallel and continue an update by monitoring the returned context and resubmitting.  There are some examples in unit tests and in examples/saturation_test.

If it is an update to a previously started job (more data for a single hash job before finalize) you must wait until that job has completed.

By mean you must wait until that job has completed, I need to monitor the returned context(not NULL) and submit another job on the returned context?

Another question, @gbtucker, as I tested:
Encode a single MD5 hash job with 2.0GiB data(HASH_ENTIRE), there isn't a significant time difference between ISA-L crypto and JDK 1.7 MessageDigest("MD5")
ISA-L crypto and JDK 1.8 LTS both spent around 4.3s to complete.
Is this an expected situation?
Hardware spec:
CPU: i9-9900T (AVX2)
RAM: 32GB (2666MHz)

The multi-buffer hashing is best utilized by allowing multiple independent hash jobs to run at the same time.  Doing _submit() and then _flush() in sequence as your example code does, will force one job at a time.  Doing it this way will likely be no faster than a single-buffer hash library.  Other examples found with the isa-l_crypto source will show how to keep submitting and re-using context to keep multiple lanes full at all times.

The multi-buffer hashing is best utilized by allowing multiple independent hash jobs to run at the same time.

So I have a single file, I want to give a single hash(like getting md5sum of this single file) value for the whole file, multi-buffer won't speed up in this case?
Since There is no way to run pieces of the same hash job in parallel since it is a cryptographic hash, only independent hash jobs can be run together.
In this case, a single whole file cannot be divided into independent parts.

There is no way to run pieces of the same hash job in parallel since it is a cryptographic hash, only independent hash jobs can be run together.

Does this rule apply to all cryptographic hash algorithms? like md5, sha1, sha256, sha512, etc.
Again, thanks for your patient replies!

The multi-buffer hashing is best utilized by allowing multiple independent hash jobs to run at the same time.

So I have a single file, I want to give a single hash(like md5sum foobar.bin) value for the whole file, multi-buffer won't speed up in this case?

No, but if you had md5sun foo.bin bar.bin ... etc this could be possible since you would have independent hash jobs.

Since There is no way to run pieces of the same hash job in parallel since it is a cryptographic hash, only independent hash jobs can be run together.
In this case, a single whole file cannot be divided into independent parts to get a single hash value.

It can be divided but they are dependent.  You must use the results of the previous chunk to process the next and so cannot be run in parallel.

There is no way to run pieces of the same hash job in parallel since it is a cryptographic hash, only independent hash jobs can be run together.

Does this rule apply to all cryptographic hash algorithms? like md5, sha1, sha256, sha512, etc.
Again, thanks for your patient replies!

That's correct.  This is a property of a cryptographic hash.

It is important to understand that md5-simd does not speed up a single threaded MD5 hash sum. Rather it allows multiple independent MD5 sums to be computed in parallel on the same CPU core, thereby making more efficient usage of the computing resources.

https://github.com/minio/md5-simd#md5-simd
What makes me confused is why single-dependent-lane SIMD-MD5 can't be accelerated?
Since my CPU is capable of AVX2, and it should be faster than JDK 1.8 MessageDigest("MD5")?
So my question is that why single-lane AVX2-MD5 is not faster than JDK 1.8 MD5 implementation?
JDK 1.8 MD5 seems have no SIMD optimization at all.

Hi @gbtucker,
As I looked into https://github.com/intel/isa-l_crypto/blob/master/md5_mb/md5_mb_rand_update_test.c#L109-L134
It seems that when all lanes are full, call submit() will likely return HASH_CTX_ERROR_ALREADY_PROCESSING, in above code, it resubmit the same job in spin way(keep busy retrying):
		// Resubmit unfinished job
		i = (unsigned long)(ctx->user_data);
		buf_ptr[i] += UPDATE_SIZE;

It seems that when all lanes are full, call submit() will likely return HASH_CTX_ERROR_ALREADY_PROCESSING, in above code, it resubmit the same job in spin way(keep busy retrying):

Not quite.  When all lanes are full, a submit() will run until at least one job is complete.  This will allow the user to replace the empty lane and keep all lanes full even when jobs/blocks of differing length are submitted.

		// Resubmit unfinished job
		i = (unsigned long)(ctx->user_data);
		buf_ptr[i] += UPDATE_SIZE;

I wouldn't say busy retrying.  The test will just submit a new block to update when a previous update block completes from job i but is not finalized yet.  It uses the ctx->user_data to keep an index of the job number.

Not quite. When all lanes are full, a submit() will run until at least one job is complete.

Glad to hear.
But what if I have several independent hash jobs, and not all lanes full, say, only half of them are full, and in submit(HASH_FIRST), all N independent jobs return NULL, how can I know if there any job has completed later on? so I can submit the next part of the input.

But what if I have several independent hash jobs, and not all lanes full, say, only half of them are full, and in submit(HASH_FIRST), all N independent jobs return NULL, how can I know if there any job has completed later on? so I can submit the next part of the input.

all N independent jobs return NULL

Can this even happen? (I haven't do my experiment)

A return of null usually means lanes are not yet full.  The underlying multi-buffer hashing routine will only run on submit() and all lanes are full or flush() is called.  You can check the jobs status at any time but using the returned context as a clue as to what to put next is a solid method to keep from ever searching.

HASH_CTX *ctx, *avai_ctx = NULL;

    for (uint64_t i = 0; file_size > 0; i++) {
        len = MIN(CHUNK_MAP_SIZE, file_size);
        mem = (char *) mmap(NULL, len, PROT_READ, MAP_SHARED, fd, offset);
        assert(mem != MAP_FAILED);

        if (avai_ctx == NULL) {
            avai_ctx = &ctx_arr[i % MAX_LANES];
        }
        avai_ctx = ctx_mgr_submit(mgr, avai_ctx, mem, len, HASH_ENTIRE);
        if (avai_ctx != NULL) {
            count++;
        } else {
            empty++;
            assert(i < 7); // AVX2
        }

        e = munmap(mem, len);
        assert(e == 0);
        offset += len;
        file_size -= len;
    }

    while ((ctx = ctx_mgr_flush(mgr)) != NULL) { // Segmentation fault (core dumped)
        count++;
    }

Hi, @gbtucker, As I followed your suggestion, I read a large file in chunks (each time 4MB), and calculate SHA256 for each 4MB chunk, but I got segfault when I do ctx_mgr_flush.
Basically, I just want to do SHA256 calc parallelly for each 4MB chunk.
I have no idea what's going wrong, sorry to bother you again.

Hi, @gbtucker, As I followed your suggestion, I read a large file in chunks (each time 4MB), and calculate SHA256 for each 4MB chunk, but I got segfault when I do ctx_mgr_flush.

Got it, the segfault is caused by munmap(), after unmap, the page memory will be invalidated, hence memory access got SIGSEGV signal.


Luci app mwan3 fixes

This PR fixes some minor problems:

track_ip could/should also be set to a dns hostname
The sorting of the interfaces on the interface page does not make sense
fixing css styling https://github.com/openwrt/packages/issues/4131

But at the same time I noticed that there is rather expensive looking statement in mwan3:
https://github.com/openwrt/packages/blob/master/net/mwan3/files/lib/mwan3/mwan3.sh#L733
in the iface_status assessment:
ps -w | grep mwan3track | grep -v grep

will fix it and send a PR on packages feed in the next days

do have to add a dependency in the make file if i us pgrep? Or is this a default packages which is always on board?

pgrep is built by default into busybox. It should be in all systems...
root@LEDE:~# pgrep
BusyBox v1.26.2 () multi-call binary.

And mwan3 already uses pgrep on other places...
E.g.
https://github.com/openwrt/packages/blob/master/net/mwan3/files/lib/mwan3/mwan3.sh#L393
https://github.com/openwrt/packages/blob/master/net/mwan3/files/usr/sbin/mwan3track#L13

mwan3 already uses pgrep on other places... (usually as "pgrep -f")
E.g.
https://github.com/openwrt/packages/blob/master/net/mwan3/files/lib/mwan3/mwan3.sh#L393
https://github.com/openwrt/packages/blob/master/net/mwan3/files/usr/sbin/mwan3track#L13

yes i know i have added this :-). I was not sure if i have to add this to the makefile dependency. But if it is in the default busybox then i will not add it


Use explicit tag rather than chart release to allow forking

See https://github.com/fluxcd/flux/tree/master/chart/flux as a good example.
Add the helm value
image:
  tag: 0.1.0

Then use that inside deployment.yaml.  This will allow people to fork your repository and use their own images.

Hi Jack. I believe I've done what you're looking for in this pull request: #7
Would you mind reviewing before I merge it please?
Thanks for the suggestion.


Ignore user-specific db connection and media files.

Ignore connect.inc.php and media/

Both are not part of the project.

While neither file are checked in to the project, everyone who works on the project will have their own versions of these files. These files should not be checked in, but it's annoying to see them in the "modified" list of files. Because everyone would have to create the exact same .gitignore file to ignore these files, it makes sense to commit the .gitignore file itself.
You can see further discussion of Should you commit .gitignore into the Git repos? on StackOverflow.


Remove the Silver counter

Is your feature request related to a problem? Please describe.
Now that Silver is gone, the counter is pretty worthless (could be easily repurposed for Royal Reputation though)
Describe the solution you'd like
Simply removing the counter makes most sense.
Describe alternatives you've considered
Hovering over the Confirm button could give what you'll get from the current scavenging.
Additional context
The Mastery update removed Silver and made more than just one thing obtainable from scavenging (namely Spirits).

I've already fixed the silver counter and made it show the material dust and ticket counters instead
Showing all items you'll get from scavenging over the confirm button could be good for any items other than dust and tickets
https://github.com/AsoDesu/IslandUtils/commit/e4b327312d87e7e3f0c8b39fc9f356ec92b839d2

Fixed in 1.6.2


need 9.4.24 postgres binary included

Hi Guys,
I am trying to deploy this chart, I would also need the 9.4.24 postgres binary to be available for connecting to our greenplum instances.
Is this easy to do? Can someone give me some pointers?
Would be grateful if you guys could help me out. Thanx for all your work so far.

@ronaldjeden you are able to build your own image and add the postgres binary, and in the values file adjust these settings to your own image:
image:
  registry: docker.io
  repository: dpage/pgadmin4
  tag: "5.7"
  pullPolicy: IfNotPresent


Embedded HDF5 fails to build with parallel support

In GitLab by @jbigot on Apr 29, 2021, 18:17

mentioned in commit d25c308abb21017c8eca11f0e4d04bb2baf3301a

mentioned in commit c8dd6c709acfbbe5941709a6f367eaa903769434

mentioned in commit c5d2e5c0a27b2b2de083c72d1412e9d7e4498ccc

created merge request !362 to address this issue


How to use .editable in a dynamically generated table

I use .editable like this:

        $('.editable').editable({ });

The table is display after click a submit button. But the .editable function does not work!~~
Thanks you so much.

Hi,
You need to use the option "selector" for dynamique generated DOM.
here documentation about it:
If selector is provided, editable will be delegated to the specified targets.
Usefull for dynamically generated DOM elements.
Please note, that delegated targets can't be initialized with emptytext and autotext options, as they actually become editable only after first click.
You should manually set class editable-click to these elements.
Also, if element originally empty you should add class editable-empty, set data-value="" and write emptytext into element:
example:

Empty

Operator


Monospace Link Roundtrip

Describe the bug
Monospace links are broken in the roundtrip
Screenshots

Additional context
This may need to be moved to markdown-editor?

I'm not sure I understand this issue. What's a monospace link?

I'm not sure I understand this issue. What's a monospace link?

The commonmark spec has a notion of link, but nothing font-specific. https://spec.commonmark.org/0.29/#links

Now that I think about it, maybe this is more of an issue for the markdown-editor. This is what I mean by monospace link:

This seems to be parsed and round-trip properly.
bash-3.2$ cat codeinlink.md
this is a [`monospace link`](https://google.com)
bash-3.2$ markus normalize --sample codeinlink.md --output test.md
11:18:44 AM - info: Creating file: test.md
11:18:44 AM - info:
this is a [`monospace link`](https://google.com "")

@jolene, what is the error you are getting?

Some more investigation, the Slate transform does lose the inline code:
bash-3.2$ markus normalize --sample codeinlink.md --output test.md --slate
11:29:28 AM - info: Creating file: test.md
11:29:28 AM - info:
this is a [monospace link](https://google.com "")

This issue isn't specific to code inlines inside links, but to anything other than a text node inside a link.
For instance, with emphasis:
bash-3.2$ cat test/data/linkem.md
this is a [*code link*](https://google.com)
bash-3.2$ ../markdown-cli/index.js normalize --sample test/data/linkem.md --slate
12:20:29 PM - info:
this is a [](https://google.com "")

This should be fixed with #171
bash-3.2$ cat test/data/linkem.md
this is a [*code link*](https://google.com)
bash-3.2$ ../markdown-cli/index.js normalize --sample test/data/linkem.md --slate
12:21:23 PM - info:
this is a [*code link*](https://google.com "")
bash-3.2$ more test/data/linkcode.md
more test/data/linkcode.md
this is a [`code link`](https://google.com)

this is a `code snippet`
bash-3.2$ ../markdown-cli/index.js normalize --sample test/data/linkcode.md --slate
12:22:25 PM - info:
this is a [`code link`](https://google.com "")

this is a `code snippet`

A more fancy test:
bash-3.2$ more test/data/linkmixed.md
[This is a *link* with `code` and **bold**](http://google.com)
bash-3.2$ ../markdown-cli/index.js normalize --sample test/data/linkmixed.md --slate
12:30:04 PM - info:
[This is a *link* with `code` and **bold**](http://google.com "")


feat(esl carousel) rework css carousel

Mergin in bounds of CSS preparation

:tada: This PR is included in version 5.0.0-beta.12 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Enabled http to https redirect

Developed the http_load_balancer to accept a new parameter to indicate whether http requests should be redirected to https. If enabled it creates a new load balancer that redirects the http requests to the https load balancer.

@sebastianmontero Thanks so much for this PR. Unfortunately we're sunsetting this repo and will not be able to make any further changes to it. As such - I'll encourage you to either consider reaching out if you'd like to be the new owner or just continue using your own fork.


Does not work with angular 6

I cannot import your component while using angular 6.1.0

:wave:

Hi, haven't had the time to make the update. You are welcome to send a PR, otherwise I will hopefully find some time to look into this next week. Best!

@Antarius225 I just released a version 2.0.0-beta.1 which should work with Angular 6. Please test and let me know if it works for you! Cheers

Cheers 🍾

@Antarius225 I understand this as confirmation that this is working for you now? I'll close this then, if you have more problems reopen this issue.
Cheers


KTX2 with KHR_image_basisu fails to load when using .glb/.bin embedding

The attached file contains several variants of a model, exported with gltfpack using KHR_image_basisu with KTX2 containers.
The "separate" version loads fine in Babylon JS using latest sandbox; this is the version with separate files.
Both "embedded" (textures inside .bin) and glb (single file) versions fail to load with a 2 MB error message along the lines of

Uncaught (in promise) Error: /textures/1: Error while trying to load image:
171,75,84,88,32,50,48,187,13,10,26,10,0,0,0,0,1,0,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,1,0,0,0,12,0,0,0,1,0,0,0,112,1,0,0,76,0,0,0,188,1,0,0,24,0,0,0,216,1,0,0,0,0,0,0,199,36,0,0,0,0,0,0,51,149,2,0,0,0,0,0,130,97,5,0,0,0,0,0,0,0,0,0,0,0,0,0,187,221,0,0,0,0,0,0,120,183,1,0,0,0,0,0,0,0,0,0,0,0,0,0,32,89,0,0,0,0,0,0,155,132,0,0,0,0,0,0,0,0,0,0,0...

Fallback texture was used

It would be nice to emit shorter error messages :) and also indicate the reason for the error. I'm reasonably sure that the file in question is correct, and it's a bug in Babylon.JS. Unsure what the problem is precisely, as the file header looks correct based on the error message (starts with "\xAB KTX 20"); maybe the MIME type isn't recognized correctly?
rubyrose.zip

Thanks @zeux for the report! I fixed this issue and fixed a bunch of other error handling issues too.
That's a nice looking model too. Where is it from?

gltfpack always preserves asset metadata to be fair to the creators :) https://sketchfab.com/3d-models/ruby-rose-2270ee59d38e409491a76451f6c6ef80


Drop vue1 support and add cssextracting

Hi,
I dropped vue 1 support  completely and introduced css extracting.
The styles of your component were added as inline css. Therefore it wasn't possbile to override styles in a comfortable way.
If someone now uses your component he will have to import the css manually. I don't think that's a big problem because you the user gets a lot more control about the styles.
If you apply this PR you will have to make a major release.
I also updated webpack and babel.
Would be nice to hear what you think ;).

Hi @mgmeiner, thanks for the suggestion and send changes along with it.
I totally agree with you on dropping Vue1, however in regards of css, my idea was to provide minimum built-in stylesheet and expose single entry point for those who care less about style. And I'm still leaning to it.
So would you explain more of your opinion about the "comfortable way"? I recall I do set those css selectors pretty loose in order to be overridden easily.
Looking forward to your further suggestions!

Hi @noru, thanks for the quick reply.
The problem with the current styles is, that they are added as inline styles and i have no control about them where they will be added. They always added to the bottom. And inline styles always 'win' the css-override war. Look at the example:

The et-wrapper class is from vue-easy-toast and the .toast-cstm-success should override styles of your  component. It is added after et-wrapper but because the styles of vue-easy-toast are inlined it will not override the styles. I can fix it by declaring all my styles with !important or also inline all the stlyes. But this is very ugly. If the css of vue-easy-toast would be extracted to separate css the user will get full control about the styles. He could even write is own styles and not reuse any of the default styles by not importing the css.
Hope this makes it a bit more clear :)

@mgmeiner Understood. But by simply using '.et-wrapper.toast-cstm-success' it should be ok, and no side effect. Are you planning to reuse that 'toast-cstm-success' class somewhere else?

@noru  yes you're right, this would fix the problem too. But i don't like the concept of adding inline-styles without control about it. Many other libs extract their css too.  It's up to you.

@mgmeiner I think I don't have to make the choice. Just build another 'lite' version without the inline css, and everybody's happy. Thanks for the feedback :)

v1 is released

Thanks @noru :)!


Use context instead of with_context

Replace .with_context(|| "…") with .context("…") to avoid calling a trivial closure. It is also shorter :)
On the other hand, use .with_context(|| format!(…)) instead of .context(format!(…)) to avoid unneeded string allocation.

@bors r+
Thanks!

:pushpin: Commit af04e54235ef30db0243c86a8f13a850bd9f0372 has been approved by weihanglo
It is now in the queue for this repository.

:hourglass: Testing commit af04e54235ef30db0243c86a8f13a850bd9f0372 with merge 73a1b767b900d7d84912c79c4d08c5e8a308e8df...

:sunny: Test successful - checks-actions
Approved by: weihanglo
Pushing 73a1b767b900d7d84912c79c4d08c5e8a308e8df to master...


Edit | 4.0.1 update release date

I had some suggestions in #1474 which were never reviewed. I can't make suggestions in the changes so can you manually add them?

I had some suggestions in #1474 which were never reviewed. I can't make suggestions in the changes so can you manually add them?

I though you was agree with the PR when you approved it! Are you sure you want them to be applied?

Done

I had some suggestions in #1474 which were never reviewed. I can't make suggestions in the changes so can you manually add them?

I though you were agree with the PR when you approved it! Are you sure you want them to be applied?

The conversations were resolved even though my changes weren't reviewed. I then reopened the conversations to ask for a review again. My mistake, I shouldn't have approved it without ensuring my suggestions would actually be seen. Yes, I want them applied, the original wording is awkward imo.

Changes made to /CHANGELOG.md during the review of #1474 weren't applied to /release-notes/4.0/4.0.1.md.

Nice catch. Done!


[TASK]: CI Build: paig-server CI build enhancement to build dependant modules first

Task Details
Task Details
paig-server uses paig-common and paig-authorizer-core modules. These decencies are currently pulled from public pypi repository.  In order to integrate and test the changes before public release  CI build needs to be updated to build and install dependant modules first.
Acceptance Criteria:

Build and install paig-common and paig-authorizer-core modules first in paig-server CI build.
Revisit the locked version of paig-authorizer-core in paig-server dependencies

Due Date
No response
Priority Level

[ ] Low
[X] Medium
[ ] High

Code of Conduct

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

paig-common is fixed .


[Bug]: Texts not so visible in light mode.

Give a brief about the bug ✍
Description

What is the expected behavior? 🤔
Description
The text must be of different colours in light mode.
Provide step by step information reproduce the bug 📄
Description
The text can be of different colour in light mode.
Select program in which you are contributing
GSSoC24
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @sristy17 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

/assign

Hey @sristy17 ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


Linux Brew - No such file or directory on install + FIX

brew config output
HOMEBREW_VERSION: 3.2.8
ORIGIN: https://github.com/Homebrew/brew
HEAD: f026dd21c195952747395ebdda24327204f012ec
Last commit: 21 hours ago
Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core
Core tap HEAD: e835fc84ca3fc862797a39bd4613582b13862d8f
Core tap last commit: 43 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0
HOMEBREW_MAKE_JOBS: 2
Homebrew Ruby: 2.6.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: dual-core 64-bit skylake
Clang: N/A
Git: 2.25.1 => /bin/git
Curl: 7.68.0 => /usr/bin/curl
Kernel: Linux 5.11.0-25-generic x86_64 GNU/Linux
OS: Ubuntu 20.04.2 LTS (focal)
Host glibc: 2.31
/usr/bin/gcc: 9.3.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@5: N/A
xorg: N/A

brew doctor output
Your system is ready to brew.

[X] I ran brew update and am still able to reproduce my issue.
[X] I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?
Install homebrew on a new Ubuntu 20.04 VM.
What happened (include all command output)?
Path error from the command line.
brew help /bin/bash: /home/linuxbrew/.linuxbrew/Library/Homebrew/brew.sh: No such file or directory
What did you expect to happen?
The help message.
Step-by-step reproduction instructions (by running brew commands)
As documented above.

FIX

I was able to get it to work by making a symbolic link from `Library` -> `Homebrew`
in `/home/linuxbrew/.linuxbrew`.

Sorry, you're going to need to supply more information here on what you tried and what the output was. As-is there's not enough information here to help you.


Initial Build Chain for Monoreo

Initail buildchain for the monorepo.  Review:
https://github.com/enspirit/makefile-for-monorepos
And review Makefile in this repo for doing sub-makefiles easily (get around docker build stuff...
https://github.com/khuedoan/homelab
Although may just leverage Skaffold to deal with Docker builds, and leave makefiles for higher-level builds

Adding gitpod as the initial bootstrap GUI - maybe adjust or abandon https://github.com/ssmiller25/blast/tree/main/apps/base/code-server-k8s.  May move to just selfhosted gitpod infrastructure with customized container


OS Places mocked service

Ticket Number

UCD-982
Description of change

Create OS Places mocked service and connect to Appeals Service API
Checklist

[ ] Requires infrastructure changes
[ ] I have updated the documentation accordingly
[ ] I have merged commits to avoid fixing things in this PR
[ ] New features have tests
[ ] Breaking change (team conversation required)

Important
Please do not merge from master (please only rebase). This keeps the history linear and easier to debug.

The data in here doesn't represent a real address (the postcodes are probably real, but I've made up the addresses). Only exception is the Southampton one, which is the exampled used in the docs website

Are you sure that it has been specifically requested ?

Are you sure that it has been specifically requested ?

It'll be needed either this sprint or next


Fix segfault in GetNumObjectsMatchingSelector

If the List method returns error the list object is nil and accessing list.Items results in segfault.
Ref. https://github.com/kubernetes/perf-tests/issues/1248

/lgtm

/lgtm

/hold cancel


[BUG] {{ dl search }} - {{ UI issues }}

Padding, margins, and gaps:

Change to margin-left to 5px.

Change the padding-left to 5px (The total gap between the search icon to the placeholder/label should be 10px).

The search icon is jumping while starting to type:

https://github.com/dataloop-ai/components/assets/121247551/0d7291b5-0c2e-4941-a9e7-852bf41c2dfb

The border should be highlighted in focus mode (dl-color-secondary).
Hover state is missing.

№2 and 3 are addressed in #921 (same issue in label picker because both use DlInput)


implement TaskModuleWithDocumentConverter

This implements the abstract class TaskModuleWithDocumentConverter. It allows to easily create "wrapped" taskmodules which have the same core functionality as the base taskmodule, but require to have some document conversion before the encoding / after prediction attachments.
It requires to implement the following methods:
@abstractmethod
def _convert_document(self, document: DocumentType) -> ConvertedDocumentType:
    """Convert a document of the taskmodule document type to the
    expected document type of the wrapped taskmodule.

    Args:
        document: the input document

    Returns: the converted document
    """
    pass

@abstractmethod
def _integrate_predictions_from_converted_document(
    self,
    converted_document: ConvertedDocumentType,
    document: DocumentType,
) -> TextDocumentWithLabeledSpansAndBinaryRelations:
    """Convert the predictions at the respective layers of the converted_document and add them
    to the original document predictions.

    Args:
        converted_document: the document returned by the wrapped taskmodule, including predictions
        document: document to attach the converted predictions to
    """
    pass

Codecov Report
Attention: Patch coverage is 57.89474% with 16 lines in your changes missing coverage. Please review.

Project coverage is 95.42%. Comparing base (cccdd33) to head (56a853d).

Files with missing lines
Patch %
Lines

...dules/common/taskmodule_with_document_converter.py
56.75%
16 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
- Coverage   95.71%   95.42%   -0.29%
==========================================
  Files          60       61       +1
  Lines        4990     5028      +38
==========================================
+ Hits         4776     4798      +22
- Misses        214      230      +16

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


Expose list of delegators for given height via gRPC

SUMMARY
New feature will return list of delegators for given height
ISSUE TYPE

Feature Idea

COMPONENT NAME
go/staking/api
ADDITIONAL INFORMATION

Implemented.


mypy: Use typing.Text in zerver/views/webhooks/

Automated message from Dropbox CLA bot
@NoelTautges, thanks for the pull request! It looks like you haven't yet signed the Dropbox CLA. Please sign it here.

Automated message from Dropbox CLA bot
@NoelTautges, thanks for signing the CLA!

@NoelTautges Thanks for contributing. This looks great. I will approve the task.
@timabbott Can you review and merge?

Merged, thanks @NoelTautges!

Thanks!


XML line limit

I'm having issues parsing and fetching the line numbers for a feed of XML which exceeds 65535 lines. Of course the limit of an unsigned short integer is 65535 which is why I assume this fails. Once this limit is hit the line number doesn't increase, which screws our return info. I haven't been able to look into this any further or to see if it's reasonable to change this type of integer (or whether this is an libxml issue?), but thought I'd post it anyway. Thanks!

Sample implementation for storing higher numbers:
https://github.com/rubys/nokogumbo/pull/55/files
Saving here for reference.

This will be fixed in v1.13.


Skopeo

This PR extends Registryman with Skopeo's functionality regarding replication rule management.

Is this skopeo binary pkg/skopeo/skopeo used somewhere?


Reconnection-aware payload tracking

Adds supports to "rcvd" field on every incoming payload received, which caches its value on a Set.
Also adds "get-rcvd-ids" and "clear-rcvd-ids" events. "get-rcvd-ids" event replies with a "rcvd-ids" event which has all the received "rcvd" values. It supports a "clear" field which clears the local set. "clear-rcvd-ids" clears the specified ids of on the local sets and doesn't emit any event.
If the websocket is closed and event buffering is enabled, it'll emit a "rcvd-ids" of the last connection into the event buffer so reconnected clients can know what to re-send.

Re-created this PR on #28


Merge, duplicate species is added due to a slight typo

Hi @mdoering! I'm testing how merging regional lists will work, I also want to have a general idea of the number of species these lists can add to COL checklist.
I did a project merging ITIS Mammalia with the Colombian Mammalian list  and I found a species that was added as an accepted species but it is due to a typo.
It is a one-letter typo  plus a difference on a space on the authorship:  Silvilagus fulvescens J.A. Allen, 1912 vs  Sylvilagus fulvescens J. A. Allen, 1912. Interestingly the species name was placed under the correct genus.
See: Silvilagus fulvescens J.A. Allen, 1912 (project 9999)

There is a way for the Merge algorithm to detect these kinds of issues and avoid adding this "wrong" species? Maybe using the parent information plus slight variations of the authorship?

Another option might be to have some settings for the merge sector that allows more lenient comparisons. That way we can use different strategies to merge sources of different quality. But that might lead to lots of curatorial work?

Having an overview of the kind of typos to deal with would be good. Can we curate a simple list on this wiki page please?

Will be handled by a generic orthograühoc variation detection feature: https://github.com/CatalogueOfLife/backend/issues/1363


Update default list of optimize event

Remove experiment_described, which is currently not supported. May bring back in the future

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

Comparison is base (a7110df) 27.06% compared to head (78796bb) 27.06%.
Report is 1 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #251   +/-   ##
=======================================
  Coverage   27.06%   27.06%
=======================================
  Files          43       43
  Lines        4533     4533
=======================================
  Hits         1227     1227
  Misses       3212     3212
  Partials       94       94

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


Add more 3xx status codes to SS_HTTPResponse::isFinished() method

This is so Controller::handleRequest() will halt processing for more redirect types, including 304 Not Modified :smile:

I suspect this should be placed against 3.x as it constitutes a functionality change.

I'd go one step further and move the 'finished_response_codes' into a config that can be customised on a per-project basis.

Arguably, if you read the rationale for the function, this sounds like a bug. This function is supposed to "return true if a redirect has already been requested", so I'd expect it to return true for any 3xx status code (which are all redirection codes).

@mateusz True, but I specifically only added 3xx status codes from the HTTP/1.1 spec.

Consulting the spec seems to indicate that the old behaviour of the code only supported http 1.0 codes, where this pr upgrades the method to support http 1.1. Perhaps we could say the code is outdated and this fix is necessary to bring behaviour in line with current specs?

It's changing the underlying behaviour of isFinished. Any code that relies on that - which I don't think would be that rare, could break if it's not looking out for 304s in particular.
I still think this should go in to 3, not 3.1. Sorry!

@tractorcow except 304 (which was missing) has existed since the original HTTP/0.9 spec :wink:
@willmorgan I actually made the pull-request because it improves the performance of 304's

I've got to agree that isFinished not returning true for all valid redirect codes is a bug (sorry @willmorgan).
I agree with @tractorcow that we should have config setting for "finished codes", but that is a new feature for 3.x-dev

:+1:

I'm happy :)
A piece of feedback for the future, @jacobbuck,  is that any bug fixes should have "BUG" or "FIX" in the commit message, as this helps us to build the changelog.
http://doc.silverstripe.org/en/contributing/code/#commit-messages
Thanks!

Awesome, thanks guys. And thanks for the feedback, will keep that in mind next time :+1:


Upgrade selenium libs

@moizjv Unsure if its worth it, but at one point in the past while debugging something i realized the selenium libs were old. Upgrading it
(there's some extra commits in this PR, but they'll go away on squash)

[Current coverage][cc-pull] is 59.61%

Merging [#21][cc-pull] into [master][cc-base-branch] will increase coverage by 1.24%

3 files (not in diff) in ...ava/com/saucelabs/ci were modified. more

Misses -9
Partials -2
Hits +11

File ...nectFourManager.java was modified. more

Misses +1
Partials 0
Hits -1

@@             master        #21   diff @@
==========================================
  Files            10         10
  Lines           963        968     +5
  Methods           0          0
  Messages          0          0
  Branches        174        175     +1
==========================================
+ Hits            562        577    +15
+ Misses          399        391     -8
+ Partials          2          0     -2

Powered by Codecov. Last updated by [7b4b756...2e0a0fd][cc-compare]
[cc-base-branch]: https://codecov.io/gh/saucelabs/ci-sauce/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/saucelabs/ci-sauce/compare/7b4b75669e918e8f527f6f05af37145e9b4b42d9...2e0a0fd99735aaae1c8212baf0adb587a0c45e50
[cc-pull]: https://codecov.io/gh/saucelabs/ci-sauce/pull/21?src=pr

👍


Error starting localhost:3000

The localhost:3000 doesn't connect.

Any solution for this issue ??


Why is HACs reporting against ZOOM when Zoom repository its not installed?

Version of the custom_component

Configuration

Add your logs here.

Describe the bug
HA error log reporting Zoom via HACs is installed when it was never installed.
Debug log

2020-11-18 20:04:35 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

Traceback (most recent call last):

File "/srv/homeassistant/lib/python3.8/site-packages/aiogithubapi/helpers.py", line 91, in async_call_api
response.data = await result.json()
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1021, in json
await self.read()
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 973, in read
self._body = await self.content.read()
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/streams.py", line 358, in read
block = await self.readany()
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/streams.py", line 380, in readany
await self._wait('readany')
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/streams.py", line 296, in _wait
await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/homeassistant/.homeassistant/custom_components/hacs/hacsbase/hacs.py", line 265, in prosess_queue
await self.queue.execute(can_update)
File "/srv/homeassistant/lib/python3.8/site-packages/queueman/manager.py", line 63, in execute
await asyncio.gather(*local_queue)
File "/home/homeassistant/.homeassistant/custom_components/hacs/operational/factory.py", line 25, in safe_common_update
await repository.common_update()
File "/home/homeassistant/.homeassistant/custom_components/hacs/helpers/classes/repository.py", line 247, in common_update
await self.repository_object.set_last_commit()
File "/srv/homeassistant/lib/python3.8/site-packages/aiogithubapi/objects/repository/init.py", line 169, in set_last_commit
response = await self.client.get(endpoint=_endpoint)
File "/srv/homeassistant/lib/python3.8/site-packages/aiogithubapi/client.py", line 36, in get
response = await async_call_api(
File "/srv/homeassistant/lib/python3.8/site-packages/backoff/_async.py", line 133, in retry
ret = await target(*args, **kwargs)
File "/srv/homeassistant/lib/python3.8/site-packages/aiogithubapi/helpers.py", line 101, in async_call_api
raise AIOGitHubAPIException(response.data)
File "/srv/homeassistant/lib/python3.8/site-packages/async_timeout/init.py", line 55, in aexit
self._do_exit(exc_type)
File "/srv/homeassistant/lib/python3.8/site-packages/async_timeout/init.py", line 92, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

2020-11-18 20:07:41 ERROR (MainThread) [custom_components.hacs.repository.integration.raman325.ha-zoom-automation]
2020-11-18 20:07:41 ERROR (MainThread) [custom_components.hacs.factory] raman325/ha-zoom-automation -

Nope, it isn't installed, it's just fetching metadata. Consider reinstalling HACS, and if that fixes it, consider closing?


Swap wrong key value from dataset mappings

Description
Swap wrong key value from dataset mappings
Motivation
Dataset mapping key and value are inverted
Fixes:

common/mappings.js

Tests included/Docs Updated?

[ ] Included for each change/fix?
[ ] Passing? (Merge will not be approved unless this is checked)
[ ] Docs updated?
[ ] New packages used/requires npm install?
[ ] Toggle added for new features?

@nitrosx I think we can merge this


Open API: Should the *RoomKeysBySessionId APIs really be plural?

Link to problem area:
putRoomKeysBySessionId
getRoomKeysBySessionId
deleteRoomKeysBySessionId
Issue
The operationIds say RoomKeys instead of RoomKey, however the descriptions clearly states that the operation only deals with a single key.
Can these be updated to putRoomKeyBySessionId, getRoomKeyBySessionId and deleteRoomKeyBySessionId respectively?
Maybe the BySessionId postfix could even be dropped?

I'll work on it!