PyPy3.6 support (no PySlice_Unpack)

Fixes #1395
I don't know where PYTHRAN_COMPILING_IN_PYPY should be defined...

Any chance there's a PyPy-specific macro definied in the PyPy headers?

I'm going to ask to PyPy developers...

It seems that the right way to fix this would be to fix PyPy (https://bitbucket.org/pypy/pypy/issues/3101/pyslice_unpack-usable-in-cpython-361#comment-54542731).
But in the mean time, don't you think that a quick fix like this could be acceptable?

But in the mean time, don't you think that a quick fix like this could be
acceptable?

It is. Just add it to the doc, in docs/INTERNAL.rst, so that it will act as a
test case too (needs to add a pypy dep in travis, if that's possible).

Sorry, I don't really get what I need to add in docs/INTERNAL.rst ?
It seems simple to add a pypy dep in travis: https://docs.travis-ci.com/user/languages/python/#pypy-support
To test Pythran + PyPy on Travis, I would just need to add another configuration, something like (?):
        - python: pypy3
          env: CC=clang-3.5 CXX=clang++-3.5 CXXFLAGS=-g TESTCASE='pythran/tests/test_[ab]*.py pythran/tests/test_c[b-z]*.py pythran/tests/test_numpy_[a-eg-r]*.py pythran/tests/test_numpy_f[a-t]*.py'

However, there are no wheels on PyPI for PyPy, so I guess the line
$PYTHON -m pip install --only-binary=numpy,scipy -U ply "networkx>=2" colorlog numpy scipy
would fail for the config using pypy3.

Sorry, I don't really get what I need to add in docs/INTERNAL.rst ?

Note that I thought about adding something like
$> pypy3 -m pip install pythran
...

but it triggers a build of Numpy for PyPy, so I guess it is not a good idea to do that in Travis.

To check this fix (for PyPy3.6) on Travis without locally building Numpy for PyPy, it seems that we have to wait for this https://github.com/antocuni/pypy-wheels/pull/19

ok, Let's just add a line on the doc and ship it then.

:+1:

Thanks for the follow-ups!


Compile postgres with ICU support

I saw requests about this

Yes, it will work, but IIUC won't be default unless explicitly specified. Would be good to make it default too. But that may be a different PR.

At this moment, after initdb en_US.utf-8 will be used for newly created db (because of env var).
I want to test the whole cycle on staging. Most probably, it requires steps you mentioned:)

At this moment, after initdb en_US.utf-8 will be used for newly created db (because of env var).

If I understand this comment correctly, this will change how initdb's work. Could this introduce some compatibility issues with timelines created before this PR, given the non-reproducable nature of initdb_lsns #2592?

At this moment, after initdb en_US.utf-8 will be used for newly created db (because of env var).

If I understand this comment correctly, this will change how initdb's work. Could this introduce some compatibility issues with timelines created before this PR, given the non-reproducable nature of initdb_lsns #2592?

Therefore I want to merge this PR after the next release to test these cases.
Even at this moment, our databases have UTF-8
neondb=> select datname, pg_encoding_to_char(encoding) from pg_database;
  datname  | pg_encoding_to_char
-----------+---------------------
 postgres  | UTF8
 template1 | UTF8
 template0 | UTF8
 neondb    | UTF8


Add tests for advanced configuration

fixed: https://github.com/open-cluster-management/backlog/issues/12863
Signed-off-by: clyang82<EMAIL_ADDRESS>

depend on https://github.com/open-cluster-management/observability-gitops/pull/30

/retest

/retest

/retest

/retest

/retest


New Create App Mutation

Use new mutation to create new projects.

Preview link: https://dashboard-staging-git-new-create-app-mutation-nhost.vercel.app/

Codecov Report

Merging #1669 (5dd2594) into main (c8c8948) will not change coverage.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##             main    #1669   +/-   ##
=======================================
  Coverage   86.90%   86.90%
=======================================
  Files          82       82
  Lines        8918     8918
  Branches      515      515
=======================================
  Hits         7750     7750
  Misses       1168     1168

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

I am waiting for @eugene-reuka for any potential design updates.

Can you please create a changeset for this PR? A patch bump will be fine


prevent Default inside passive event listener error on Chrome 73

Hello,
Thank you for your great project. I would like to know if this issue with the changes which made has been resolved or your chart also has the same problem?
https://github.com/rrag/react-stockcharts/issues/715

This has already been resolved. Thanks!


Add "implika.es" as a domain.

Implika is a Professional Institute in Spain (https://www.implika.es).

@josuealcalde lib/domains/es/implika.es: this request has an incorrect file path format, please ensure that you are familiar with     this repository rules located at the bottom of this page and change     your request accordingly. If you don't know how to change request, close it and open a new one.     If you are not able to make the pull request according the instructions, please send us an email to<EMAIL_ADDRESS>Please mention this request URL in the message.


feat: Add option to draw shadow behind toasts

This PR exposes the option to use a shadow on notifications in order to improve visibility. The shadow is optional.

Maybe also extend the examples to show the shadow

Maybe also extend the examples to show the shadow

I added a button to add shadows. Hope this works for you!

Could not spot any difference
with shadow:

without shadow:

I suggest changing the examples like this:
all.rs.txt

I suggest changing the examples like this: all.rs.txt

Done!

Also it says there are conflicts? you may need to rebase. and could you add a line to changelog I just created.

I have no idea how to resolve the conflicts in the fork to be honest... what I see from the gh tool and the web interface is not really helpful

I think I got it done using the web editor.


Workspace file not opening with vscode.openFolder()

Issue Type: Bug
I have a number of extensions installed that use vscode.openFolder() - see https://github.com/auchenberg/vscode-open-file-folder as a very simple example.
According to the documentation, VS Code should open the folder as a workspace if one exists, but it doesn't (there is no 'Workspace' tag in the Explorer tree).
VS Code version: Code 1.63.0 (7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e, 2021-12-07T06:26:56.179Z)
OS version: Windows_NT x64 10.0.18363
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz (8 x 2208)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.73GB (7.36GB free)

Process Argv
--crash-reporter-id 03e7ca5b-1570-4b62-9db2-6eb210844ee9

Screen Reader
no

VM
0%

Extensions (6)

Extension
Author (truncated)
Version

vscode-open-file-folder
auc
0.0.4

gitlens
eam
11.7.0

powershell
ms-
2021.10.2

favorites
ole
1.5.7

code-spell-checker
str
2.0.13

shell-launcher
Tyr
0.4.1

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsaa593cf:30376535
pythonvs932:30410667
vscop804cf:30404767
vscop940:30404999
vsrem710cf:30405999
vscexrecpromp3t3:30407764

Hi @bpasero - can you point me in the right direction as to what additional information you need?   I've had a quick read through the guidelines, but I can't see anything too obvious that I've missed.
Thanks, Rob

Maybe start with a minimal reproducible extension sample code to show the issue by pasting the code here.

This is the smallest piece of code I can get down to Banjamin :-
import * as vscode from 'vscode';
import * as os from 'os';
import * as path from 'path';
import * as fs from 'fs';
import { Uri, commands } from 'vscode';
. . . . .
let workspace_file = Uri.file(workspace)
commands.executeCommand('vscode.open', workspace_file, newWindow)

I've run it in debug mode, and the value of workspace is 'u:\WindowsPowerShell\Powershell Projects\Scratch Area\Scratch Area.code-workspace'
workspace_file come back from Uri.file as....
{
scheme: "file",
authority: "",
path: "/u:/WindowsPowerShell/Powershell Projects/Scratch Area/Scratch Area.code-workspace",
query: "",
fragment: "",
_formatted: null,
_fsPath: null,
}
VS Code re-opens the GUI with the workspace, but it appears to open it as a folder and NOT the workspace.
The code in vscode.Open() is compressed, so difficult for me to step through to see what exact methods are being called, and how it differs from the 'Open workspace from file....' option in the File menu.
Thanks, Rob.

I cannot reproduce, here is my code:
const uri = vscode.Uri.file('/Users/bpasero/Documents/playground.code-workspace');
vscode.commands.executeCommand('vscode.openFolder', uri);

Thanks Benjamin. I've been working with the author of Favorites.vscode as well, and he's sent me logging output that shows he's using exactly the same calls to openFolder() as I am but also doesn't see the same problem.
Clearly this is an environmental problem I'm experiencing, I'm guessing either virus scanner or Windows UAC.
I appreciate the time you've taken to help me get this far, and happy for you to close the issue.
Thanks, Rob.


Add contrast-checker extension

Description

Extension to get Contrast ratio and check if it compatible with WCAG requirements
Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Thanks for your contribution 🔥
Isn't this already possible with: https://www.raycast.com/lekoarts/polished


Retain Image Quality after Crop on front-end?

I am curious if this package retains the quality of the original image after the crop... if cropping happens on the front end as is shown in the demo?
The reason I ask is when I use the example (as shown below), the resulting crop looks a lot more pixelated and less quality image so I am curious if that is what the end result is on the front end?

The workaround would be to pass the crop parameters and the original image to backend and have another package crop the image, but that would require a lot more work so is there a way to do this well on the front-end?

Hi the quality is down to the settings of canvas.toBlob - https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
You see I've set it to image/jpeg if you remove that it defaults to PNG which is lossless. Also the last argument is qualityArgument between 0 and 1, I'm not sure what the default value is but I'm using the default in the demo which may not be 1.
The library itself doesn't have a crop preview built in it's more "this is how you could do it", there are other ways on the server (not sure about the client though).

I have this exact problem too. I couldn't figure out why the same cropped images looked so different depending on the device used and it turns out on mobile, the crop does not retain the same image quality.
Can't paste the video I made here for some reason, here's a link to the demo.
When you are cropping an image with text, the problem becomes really obvious. I tried setting the qualityArgument value to 1 in the toBlob invocation, but that did not have any effect.

@trevorwhealy did you try setting it to image/png too?

@DominicTobias thanks for the quick follow up - yes I did just test with image/png but to no avail

Hmm interesting, maybe there is a better way to do it then - will look into it

That would be awesome! Here's my demo image if it helps you!

I should mention that if I'm trying the crop the image on a very large screen where the photo is probably being rendered in its original size, the quality of the crop is perfect. I think the issue is creating a crop on an image that is being scaled down for smaller devices or smaller windowed views.
Demo of the result on a very big screen desktop view.

Thanks does it degrade as badly for you here? https://bkd3w.codesandbox.io/
Is that Chrome devtools emulator you are trying with? (just want to make sure I'm doing the same thing as I can't see the same level of degradation, if any, at the moment on my external monitor)

That is so interesting! I just tested with the link shared, and do still see degradation. It seems we are using the same Chrome dev tools too.

If you zoom in on your crop preview do you notice any degradation?
It could be that you need to zoom in a little bit

Ah yes I do notice the degradation when zooming 🤔

Hi did you get any further with this? I noticed that in general quality is reduced when zoomed with devtools - even the css borders for the drag handles are blurry. I would recommend trying it on a real phone as I suspect it could be a devtools issue.

Hello there!  I have been trying out your project, and, have come across the exact same issue.
My experience so far has been that when the canvas is creating the cropped image, it's using as the source, the display image.  The problem here is that the display image resolution is determined by the available space used for presentation on the web page.
Think about what the web browser does to make the image fit into the available space for the user.  It's re-sampling the original image, and putting that into the image element that you're seeing on-screen.
So, that's where the lack of resolution in the cropped image is coming from.
What I have been doing here is: create a hidden image element (which holds the full-resolution image, because the browser is not trying to resize it to fit inside anything), and when it comes time to create the crop, use that hidden image as the source instead of the visible image.
Of course, the crop details have reference to the displayed image pixels, so they have to be scaled up to match the resolution of the actual source image.  ie: x,y, width, height - they're all with reference to the displayed image instead of relative to the source image.
Does that make sense?

Whoops forgot to read that @peter-hoa, good point. Sounds like a reasonable hypothesis I'll have a think/look around to see how this could be solved

qualityArgument set to 1 and looks so blur.

Whoops forgot to read that @peter-hoa, good point. Sounds like a reasonable hypothesis I'll have a think/look around to see how this could be solved

Hey @DominicTobias, I've not only provided what I think is a description of what the cause is, but, I also go on to mention how I've avoided the issue.  ie: I actually am doing this, and it works quite well.  Client crop gets the best possible resolution as the outcome.  If you incorporate having the hidden image element, and use that for the generation of the crop on the client, then you should be able to replicate the results I'm seeing using this approach.
Admittedly, I'm doing most testing using Chrome browser on desktop, so, your mileage may vary.
I'm also using a quite large source image, so that the quality issues are easily verifiable.
Keep up the good work!
:)

Hey @peter-hoa, could you provide us with a code example for your solution? Would really appreciate :)

Here is my code, @DominicTobias is right abou the quality parameter.
The problem with the original code of the following is that it was making the canvas size in relation to the cropper size and not the native image size. So if your Cropper was shrunk by css or smaller/bigger container size, it would effect the final canvas image size.
See belows changes, you may add the image back in parameters if you want.
`      getCroppedImg(crop, fileName) {
let image = this.imageRef;
const canvas = document.createElement('canvas');
const scaleX = image.naturalWidth / image.width;
const scaleY = image.naturalHeight / image.height;
canvas.width = Math.ceil(crop.widthscaleX);
canvas.height = Math.ceil(crop.heightscaleY);
const ctx = canvas.getContext('2d');
    ctx.drawImage(
      image,
      crop.x * scaleX,
      crop.y * scaleY,
      crop.width * scaleX,
      crop.height * scaleY,
      0,
      0,
      crop.width*scaleX,
      crop.height*scaleY,
    );

    // As Base64 string
    // const base64Image = canvas.toDataURL('image/jpeg');
    // As a blob
    return new Promise((resolve, reject) => {
      canvas.toBlob(blob => {
        blob.name = fileName;
        resolve(blob);
      }, 'image/jpeg',1);
    });
  }`

To retain image quality after crop on front-end, just make the canvas size larger. In my case, I also want to restrict the cropped image width under 1200px. Below is my code:
`getCroppedImg(image, crop, fileName) {
const canvas = document.createElement("canvas");
const scaleX = image.naturalWidth / image.width;
const scaleY = image.naturalHeight / image.height;
var originWidth = crop.width * scaleX;
var originHeight = crop.height * scaleY;
// maximum width/height
var maxWidth = 1200, maxHeight = 1200 / (16 / 9);
var targetWidth = originWidth,
targetHeight = originHeight;
if (originWidth > maxWidth || originHeight > maxHeight) {
if (originWidth / originHeight > maxWidth / maxHeight) {
targetWidth = maxWidth;
targetHeight = Math.round(maxWidth * (originHeight / originWidth));
} else {
targetHeight = maxHeight;
targetWidth = Math.round(maxHeight * (originWidth / originHeight));
}
}
// set canvas size
canvas.width = targetWidth;
canvas.height = targetHeight;
const ctx = canvas.getContext("2d");
ctx.drawImage(
  image,
  crop.x * scaleX,
  crop.y * scaleY,
  crop.width * scaleX,
  crop.height * scaleY,
  0,
  0,
  targetWidth,
  targetHeight
);

return new Promise((resolve, reject) => {
  canvas.toBlob(
    blob => {
      if (!blob) {
        console.error("Canvas is empty");
        return;
      }
      blob.name = fileName;
      window.URL.revokeObjectURL(this.fileUrl);
      this.fileUrl = window.URL.createObjectURL(blob);
      resolve(this.fileUrl);
    },
    "image/png",
    1
  );
});

}`

To retain image quality after crop on front-end, just make the canvas size larger. In my case, I also want to restrict the cropped image width under 1200px. Below is my code:
getCroppedImg(image, crop, fileName) {
    const canvas = document.createElement("canvas");
    const scaleX = image.naturalWidth / image.width;
    const scaleY = image.naturalHeight / image.height;
    var originWidth = crop.width * scaleX;
    var originHeight = crop.height * scaleY;
    // maximum width/height
    var maxWidth = 1200, maxHeight = 1200 / (16 / 9);
    var targetWidth = originWidth,
      targetHeight = originHeight;
    if (originWidth > maxWidth || originHeight > maxHeight) {
      if (originWidth / originHeight > maxWidth / maxHeight) {
        targetWidth = maxWidth;
        targetHeight = Math.round(maxWidth * (originHeight / originWidth));
      } else {
        targetHeight = maxHeight;
        targetWidth = Math.round(maxHeight * (originWidth / originHeight));
      }
    }
    // set canvas size
    canvas.width = targetWidth;
    canvas.height = targetHeight;
    const ctx = canvas.getContext("2d");

    ctx.drawImage(
      image,
      crop.x * scaleX,
      crop.y * scaleY,
      crop.width * scaleX,
      crop.height * scaleY,
      0,
      0,
      targetWidth,
      targetHeight
    );

    return new Promise((resolve, reject) => {
      canvas.toBlob(
        blob => {
          if (!blob) {
            console.error("Canvas is empty");
            return;
          }
          blob.name = fileName;
          window.URL.revokeObjectURL(this.fileUrl);
          this.fileUrl = window.URL.createObjectURL(blob);
          resolve(this.fileUrl);
        },
        "image/png",
        1
      );
    });
  }

thats good but when i crop imag it has balck background!!

The real size of the image croped is base on the size of the image that  present.
I made the  size larger, problem resolved.

You need to set the height of the image to 100% to fill it's parent container.

Here's what I had to do to fix the quality issue. The action became a bit slow. I can live with it as its only for admin purposes. You might want to scale it further down if you want the speed.
// Base64 Image to Canvas with a Crop   async image64toCanvasRef(canvasRef, image64, pixelCrop) {     const canvas = canvasRef;     const ctx = canvas.getContext('2d');     const image = new Image();     image.src = image64;     let url = '';     const scope = this;     image.onload = function () {       canvas.width = image.naturalWidth;       canvas.height = image.naturalHeight;       const scaleX = image.naturalWidth / scope.state.width;       const scaleY = image.naturalHeight / scope.state.height;       ctx.drawImage(         image,         pixelCrop.x * scaleX,         pixelCrop.y * scaleY,         pixelCrop.width * scaleX,         pixelCrop.height * scaleY,         0,         0,         image.naturalWidth,         image.naturalHeight,       );       url = canvas.toDataURL('image/jpeg', 0.8);       scope.convertBas64ToImage(url);       scope.setState({ croppedImageSrc: url });     };   }

You should be able to make that faster by converting it to a blob instead
of a data url
On Tue, 24 Sep 2019, 17:08 sri-wml<EMAIL_ADDRESS>wrote:

Here's what I had to do to fix the quality issue. The action became a bit
slow. I can live with it as its only for admin purposes. You might want to
scale it further down if you want the speed.
// Base64 Image to Canvas with a Crop async image64toCanvasRef(canvasRef,
image64, pixelCrop) { const canvas = canvasRef; const ctx =
canvas.getContext('2d'); const image = new Image(); image.src = image64;
let url = ''; const scope = this; image.onload = function () { canvas.width
= image.naturalWidth; canvas.height = image.naturalHeight; const scaleX =
image.naturalWidth / scope.state.width; const scaleY = image.naturalHeight
/ scope.state.height; ctx.drawImage( image, pixelCrop.x * scaleX,
pixelCrop.y * scaleY, pixelCrop.width * scaleX, pixelCrop.height * scaleY,
0, 0, image.naturalWidth, image.naturalHeight, ); url =
canvas.toDataURL('image/jpeg', 0.8); scope.convertBas64ToImage(url);
scope.setState({ croppedImageSrc: url }); }; }
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/DominicTobias/react-image-crop/issues/263?email_source=notifications&email_token=AAFZT6S7QLNT6TQYDHQJWKTQLI3QBA5CNFSM4HPMQE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7O45AQ#issuecomment-534630018,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFZT6RNRPEVCOLJ6BS2CVDQLI3QBANCNFSM4HPMQE3Q
.

There may be another issue occurring regardless of how the client crop is handled. I came across this because I was originally using the image directly from the upload:
        <input
          type='file'
          style={{ display: 'none' }}
          accept='image/*'
          onChange={this.handleImageUpload}
          ref={this.fileInput} />

in the handleImageUpload method I would append the image to the class body. However this full-resolution version of the image differed from what was returned by the internal onImageLoaded = (image: HTMLImageElement): void  method. Until I set the image to be the image returned by the onImageLoaded method, the crop dimensions were off (since they were based on a lossy image and applied to the full-resolution image). Unfortunately, the tradeoff of using the image returned by onImageLoaded  was having to display the lower resolution image on the client.

Hi, I am still troubled by this problem。
My usage scenario is that I want to output the cropped picture to the specified size。For example，i have an image which size is 867×360，actually i have to upload it by the size 289 ×120,  which means the image need to zoom 3 time. So i select the whole image and crop. Then i get an image which size is 289×120, but it has a bad quality.
I have read the comments before, but it doesn't seem to work.
The point maybe that when i scale the image cropped from canvas, it has a bad quality（
Here is my code
https://codesandbox.io/s/exciting-darkness-jhinc
Here is my image
https://sf3-ttcdn-tos.pstatp.com/img/tos-cn-i-0000/d7ddfa1c08f34b988aa6295c19aeb9f7~tplv-noop.jpeg
and the screenshot, obviously the image cropped (the right one) has a low quality

@maximus123123 working perfectly!

Here is my code, @DominicTobias is right abour the quality parameter.
The problem with the original code of the following is that it was making the canvas size in relation to the cropper size and not the native image size. So if your Cropper was shrunk by css or smaller/bigger container size, it would effect the final canvas image size.
See belows changes, you may add the image back in parameters if you want, the only changes is the quality "1" parameter in toBlob, and the crop.width_scaleX, crop.height_scaleY.
Math.ceil to make sure the natural image isn't reduced by 1 pixel sometimes.
getCroppedImg(crop, fileName) {
        let image = this.imageRef;
        const canvas = document.createElement('canvas');
        const scaleX = image.naturalWidth / image.width;
        const scaleY = image.naturalHeight / image.height;
        canvas.width = Math.ceil(crop.width*scaleX);
        canvas.height = Math.ceil(crop.height*scaleY);
        const ctx = canvas.getContext('2d');
        ctx.drawImage(
          image,
          crop.x * scaleX,
          crop.y * scaleY,
          crop.width * scaleX,
          crop.height * scaleY,
          0,
          0,
          crop.width*scaleX,
          crop.height*scaleY,
        );
        // As Base64 string
        // const base64Image = canvas.toDataURL('image/jpeg');
        // As a blob
        return new Promise((resolve, reject) => {
          canvas.toBlob(blob => {
            blob.name = fileName;
            resolve(blob);
          }, 'image/jpeg',1);
        });
      }

you are the best

A canvas element will be blurry on retina devices unless you size it up by the pixel ratio and then still show it at the original dimensions:
const pixelRatio = (typeof window !== 'undefined' && window.devicePixelRatio) || 1
const yourCropPreviewWidth = 600;
const yourCropPreviewHeight = 400;

<canvas
  width={yourCropPreviewWidth * pixelRatio}
  height={yourCropPreviewHeight * pixelRatio}
  style={{
    width: yourCropPreviewWidth,
    height: yourCropPreviewHeight,
  }}
/>

I've updated the hook example for this: https://codesandbox.io/s/react-image-crop-demo-with-react-hooks-y831o
Couple of things to note:

I keep the preview as a canvas since it's a lot faster than converting it to a blob and assigning that to an image but that's up to you
I added a download button to show what converting it to a blob would look like (or if you want to send it to the server). The crux is that you need to size it back down to the original dimensions if it has been sized up for retina.

@DominicTobias hey man, the cropped image is not downloading on the sandbox

A canvas element will be blurry on retina devices unless you size it up by the pixel ratio and then still show it at the original dimensions:
const pixelRatio = window.devicePixelRatio || 1
const yourCropPreviewWidth = 600;
const yourCropPreviewHeight = 400;

<canvas
  width={yourCropPreviewWidth * pixelRatio}
  height={yourCropPreviewHeight * pixelRatio}
  style={{
    width: yourCropPreviewWidth,
    height: yourCropPreviewHeight,
  }}
/>

I've updated the hook example for this: https://codesandbox.io/s/react-image-crop-demo-with-react-hooks-y831o
Couple of things to note:

I keep the preview as a canvas since it's a lot faster than converting it to a blob and assigning that to an image but that's up to you
I added a download button to show what converting it to a blob would look like (or if you want to send it to the server). The crux is that you need to size it back down to the original dimensions if it has been sized up for retina.
If you want to show the crop at the size relative to the original image you can still scale it like @maximus123123 showed.

@DominicTobias hey man, the cropped image is not downloading on the sandbox

A canvas element will be blurry on retina devices unless you size it up by the pixel ratio and then still show it at the original dimensions:
const pixelRatio = window.devicePixelRatio || 1
const yourCropPreviewWidth = 600;
const yourCropPreviewHeight = 400;

<canvas
  width={yourCropPreviewWidth * pixelRatio}
  height={yourCropPreviewHeight * pixelRatio}
  style={{
    width: yourCropPreviewWidth,
    height: yourCropPreviewHeight,
  }}
/>

I've updated the hook example for this: https://codesandbox.io/s/react-image-crop-demo-with-react-hooks-y831o
Couple of things to note:

I keep the preview as a canvas since it's a lot faster than converting it to a blob and assigning that to an image but that's up to you
I added a download button to show what converting it to a blob would look like (or if you want to send it to the server). The crux is that you need to size it back down to the original dimensions if it has been sized up for retina.
If you want to show the crop at the size relative to the original image you can still scale it like @maximus123123 showed.

Unfortunately it's blocked due to being in an iframe - you need to access it from https://y831o.csb.app/
The solution for being in an iframe would be to always generate a blob and put it in the anchor instead of programmatically triggering a click e.g. <a href={blobUrl} download="imagePreview.png" />

okayy!,
also If i try to upload the image below its preview doesnt show up. Is it because it is a high pixel image? tried this on your sandbox

@arendjr hm it's working fine for me in latest Chrome with your image

I noticed that the crop preview was blurry even on a non-retina screen. I've fixed the issue by always setting the pixel ratio to x4 and disabling imageSmoothingEnabled on the canvas.
Before:

After:

I've updated the hooks demo: https://codesandbox.io/s/react-image-crop-demo-with-react-hooks-y831o?file=/src/App.js

and here is my code for the hook version, note that I moved the function inside the body of the module to avoid passing parameters
const getResizedCanvas = () => {
const scaleX = imgRef.current.naturalWidth / imgRef.current.width;
const scaleY = imgRef.current.naturalHeight / imgRef.current.height;
const tmpCanvas = document.createElement("canvas");
tmpCanvas.width = Math.ceil(crop.widthscaleX);
tmpCanvas.height = Math.ceil(crop.heightscaleY);
    const ctx = tmpCanvas.getContext("2d");
    const image = imgRef.current;
    ctx.drawImage(
        image,
        crop.x * scaleX,
        crop.y * scaleY,
        crop.width * scaleX,
        crop.height * scaleY,
        0,
        0,
        crop.width*scaleX,
        crop.height*scaleY,
    );

    return tmpCanvas;
}

For the React hook example this simple adjustment fixed the issue for me:
 React.useEffect(() => {
    if (!completedCrop || !previewCanvasRef.current || !imgRef.current) {
      return;
    }

    const image = imgRef.current;
    const canvas = previewCanvasRef.current;
    const crop = completedCrop;

    const scaleX = image.naturalWidth / image.width;
    const scaleY = image.naturalHeight / image.height;
    const ctx = canvas.getContext("2d");
    const pixelRatio = window.devicePixelRatio;

   // FIX No.1
   // We need to set the canvas width & height to the original image's size
   // Otherwise, the image is scaled down
    canvas.width = scaleX * crop.width * pixelRatio;
    canvas.height = scaleY * crop.height * pixelRatio;

    ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
    ctx.imageSmoothingQuality = "high";

   // FIX No.2
   // We draw the cropped piece with it's original dimensions
    ctx.drawImage(
      image,
      crop.x * scaleX,
      crop.y * scaleY,
      crop.width * scaleX,
      crop.height * scaleY,
      0,
      0,
      crop.width * scaleX,
      crop.height * scaleY
    );
  }, [completedCrop]);

Essentially, the canvas.width attribute is not the same canvas.style.width. More here

For the React hook example this simple adjustment fixed the issue for me:
 React.useEffect(() => {
    if (!completedCrop || !previewCanvasRef.current || !imgRef.current) {
      return;
    }

    const image = imgRef.current;
    const canvas = previewCanvasRef.current;
    const crop = completedCrop;

    const scaleX = image.naturalWidth / image.width;
    const scaleY = image.naturalHeight / image.height;
    const ctx = canvas.getContext("2d");
    const pixelRatio = window.devicePixelRatio;

   // FIX No.1
   // We need to set the canvas width & height to the original image's size
   // Otherwise, the image is scaled down
    canvas.width = scaleX * crop.width * pixelRatio;
    canvas.height = scaleY * crop.height * pixelRatio;

    ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
    ctx.imageSmoothingQuality = "high";

   // FIX No.2
   // We draw the cropped piece with it's original dimensions
    ctx.drawImage(
      image,
      crop.x * scaleX,
      crop.y * scaleY,
      crop.width * scaleX,
      crop.height * scaleY,
      0,
      0,
      crop.width * scaleX,
      crop.height * scaleY
    );
  }, [completedCrop]);

Essentially, the canvas.width attribute is not the same canvas.style.width. More here

Nice one, I've update the sandboxes

import React, { useRef, useState } from "react";
import ReactCrop, {
centerCrop,
makeAspectCrop
} from 'react-image-crop';
import 'react-image-crop/dist/ReactCrop.css';
import demoImage from "../assets/findImage.png";
function centerAspectCrop(
mediaWidth,
mediaHeight,
aspect
) {
return centerCrop(
makeAspectCrop(
{
unit: '%',
width: 90,
},
aspect,
mediaWidth,
mediaHeight,
),
mediaWidth,
mediaHeight,
)
}
function ImageCropper(props) {
const { imageToCrop, onImageCropped } = props;
const [crop, setCrop] = useState("")
const imageRef = useRef("");
const onImageLoad = (e) => {
    const { width, height } = e.target;
    setCrop(centerAspectCrop(width, height, 1))
}

async function cropImage(crop) {
    if (imageRef && crop.width && crop.height) {
        await getCroppedImage(
            imageRef.current,
            crop,
            'croppedImage.jpeg' // destination filename
        );
    }
}

function getCroppedImage(sourceImage, cropConfig, fileName) {
    const canvas = document.createElement('canvas');
    const scaleX = sourceImage.naturalWidth / sourceImage.width;
    const scaleY = sourceImage.naturalHeight / sourceImage.height;

    var originWidth = cropConfig.width * scaleX;
    var originHeight = cropConfig.height * scaleY;
    // maximum width/height
    var maxWidth = 1200, maxHeight = 1200 / (9 / 9);
    var targetWidth = originWidth,
        targetHeight = originHeight;
    if (originWidth > maxWidth || originHeight > maxHeight) {
        if (originWidth / originHeight > maxWidth / maxHeight) {
            targetWidth = maxWidth;
            targetHeight = Math.round(maxWidth * (originHeight / originWidth));
        } else {
            targetHeight = maxHeight;
            targetWidth = Math.round(maxHeight * (originWidth / originHeight));
        }
    }
    // set canvas size

    canvas.width = targetWidth;
    canvas.height = targetHeight;
    const ctx = canvas.getContext('2d');

    ctx.drawImage(
        sourceImage,
        cropConfig.x * scaleX,
        cropConfig.y * scaleY,
        cropConfig.width * scaleX,
        cropConfig.height * scaleY,
        0,
        0,
        targetWidth,
        targetHeight
    );

    return new Promise((resolve, reject) => {
        canvas.toBlob(
            (blob) => {
                if (!blob) {
                    reject(new Error('Canvas is empty'));
                    return;
                }
                const file = new File([blob], "cropped-image.jpg", { type: "image/jpeg" });
                blob.name = fileName;
                const croppedImageUrl = window.URL.createObjectURL(blob);
                onImageCropped({ file: file, url: croppedImageUrl });
                resolve(croppedImageUrl);
            }, 'image/jpeg'
        );
    });
}

return (
    <div className="max-h-[500px] overflow-y-auto">
        <ReactCrop
            crop={crop}
            onComplete={(crop) => cropImage(crop)}
            onChange={(crop) => setCrop(crop)}
            crossorigin="anonymous"
            aspect={1}
        >
            <img ref={imageRef} alt="crop image" src={imageToCrop || demoImage} onLoad={onImageLoad} />
        </ReactCrop>
    </div>
);

}
ImageCropper.defaultProps = {
onImageCropped: () => { console.log("AAAAAAAAAAAAAAAAA") }
}
export default ImageCropper;

help me?

If you crop an image, the image quality deteriorates.


Use pytest-runner and more

dropped support for py2.6 and py3.2
add testing dependencies on flake8, pytest-cov, etc
few flake8 warnings fixed
add testing on py3.5 and py3.6

I'm also thinking about moving branch submodule to a file (right now it's a subdir).  Let me know what do you think about.

Dead upstream, see #12.


Animated_3D_cube

Description
This total code is done by me,  so  I requested you please accept this.
Fixes #289

@Ankitsingh2001 its looking great
how much time it takes btw

only 2  hours


expired Moves token error

Attempting a 'moves' data retrieval for the following Member results in an API error on the Moves website, reporting an expired token.
Member.objects.get(user__id=1494)
This is unexpected, we should be receiving a fresh token (with refresh occurring automatically in the background).

This will be fixed by migrating to the new refresh token endpoint (implemented for Fitbit processing).


Add code coverage report generation & coveralls check

[ ] Code coverage report generation
[ ] Coveralls check

This has become a HIGH PRIORITY after a technical review was done on the source code of the repository and this was recommended as seen here https://github.com/onaio/kujaku/issues/193#issuecomment-439012092


[Register for Build-a-thon 2022]:

Team name
AI_ML_SSD
Total number of team members
3
Contact Details of team member 1
<EMAIL_ADDRESS>Contact Details of team member 2
<EMAIL_ADDRESS>Contact Details of team member 3
<EMAIL_ADDRESS>Contact Details of team member 4
No response
Contact Details of mentor
<EMAIL_ADDRESS>tell us more about yourself
Dr. Sk Subidh Ali, Assistant Prof, IIT Bhilai, India
Sudev Kumar Padhi, PHD Student, IIT Bhilai, India
Debanka Giri, Project Scientist, IIT Delhi,India
Code of Conduct

[X] I agree to follow the Challenge Code of Conduct

https://extranet.itu.int/sites/itu-t/focusgroups/an/input/FGAN-I-296-R1.docx


decorators: new allow_anonymous option

Signed-off-by: Jiri Kuncar<EMAIL_ADDRESS>--
addresses inveniosoftware/invenio-records-rest#81

Coverage increased (+0.05%) to 96.846% when pulling 875eecf5d151b3c38b37c5411b76bf0dd1908515 on jirikuncar:allow_anonymous into 1de3a4a536349cfdc830331e0a0d89b28a4c752e on inveniosoftware:master.

Coverage increased (+0.05%) to 96.846% when pulling d572f585064fdfd0ee13a6c3441e35a5734a2126 on jirikuncar:allow_anonymous into 1de3a4a536349cfdc830331e0a0d89b28a4c752e on inveniosoftware:master.

Coverage increased (+0.05%) to 96.846% when pulling 028fd17ab80acb03d7701a8af7ce89117df776b2 on jirikuncar:allow_anonymous into 1de3a4a536349cfdc830331e0a0d89b28a4c752e on inveniosoftware:master.


Add requirements.txt install note?

As someone who's not a Pythonista, the step missing in the instructions for me was:
``pip install -r requirements.txt`
I was going to do a PR, but I wanted to check whether you want this, or would prefer to point to the (soon to come) VirtualEnv tutorial.

As a fellow of a different year taking a stab at this, I got hung up also trying to install this locally as well and was recommended to install this through heroku. (Although I'm actually still having some problems getting the zipped file URL within heroku-buildpack-pygeo working properly...)


Support for explicitly specified row heights

Feature Request
Description of Problem:
As per the conversation here, one interesting feature that @lumino/datagrid has that regular-table is currently lacking is support for explicitly specifying row height.
For at least some set of possible "fat" rows (eg double-height, img with set height, etc), it seems reasonable that the <regular-table> author would know in advance what the "height anomaly" would be for a given row. It would be neat if we could support this use case.
Potential Solutions:
The ideal solution would allow for:

correct calculation of virtual scroll position, such that there is parity in behavior, thumb size, etc between the virtual scrollbar of a <regular-table> and the scrollbar of an eagerly rendered vanilla <table>
preservation of current regular-table virtual rendering, in which only the for-real visible rows get rendered

As implemented in datagrid, the idea is that you can deal with the various complications introduced by variable row height in O(n) time, where n is the count of rows with custom heights that are affected by a given operation (eg see here). For rendering, n would only be the count of currently visible non-default-height rows.
Non-solutions:
This feature is distinct from the bug discussed in #96, whereby if any row is larger than the default 19px it causes the breakage of the calculation of number of rows to render. The solution for #96 just has to prevent the complete breakage of an affected <regular-table> (eg it doesn't have to completely fix the virtual scroll behavior, etc). Also hopefully there will be a reasonable solution for #96 that won't require explicitly known/specified heights

https://github.com/finos/regular-table/pull/191


avoid exec_script_ahn! forking another process

proposal for loading script/ahn in the same process (avoiding exec) ... details for doing so at https://github.com/adhearsion/adhearsion/issues/532

@benlangfeld curious why some of those features have @skip_jruby, could you give some background on those directives?

@Jared-Prime Those are daemonization related which isn't supported on JRuby

gotcha. thanks

@benlangfeld does it make sense ... to try cleaning up those features to match the non-forked behaviour?

I can't consider this change unless the features pass, if that's what you're asking.

Coverage remained the same at 97.38% when pulling bfc712a609d67623636e19f69bd332dee3251dd7 on kares:no-exec-dev into d1896853d03cfab7196b6b6bd9628298751d1a4a on adhearsion:develop.

Thanks Ben, in the end it really caused regressions - now as much as I understand and specs / features cover all is the same - let me know if it's green with you and I can squash the commits with a changelog.

Coverage remained the same at 97.38% when pulling f1a60617542e520f6d6b4f5fafe64da26d2d2c3d on kares:no-exec-dev into d1896853d03cfab7196b6b6bd9628298751d1a4a on adhearsion:develop.

Coverage remained the same at 97.38% when pulling f1a60617542e520f6d6b4f5fafe64da26d2d2c3d on kares:no-exec-dev into d1896853d03cfab7196b6b6bd9628298751d1a4a on adhearsion:develop.

Looking good. I'll do a final review after a squash, changelog entry and the tests pass :)

actually passed: https://travis-ci.org/kares/adhearsion/builds/52757410 ... but adding proposed in_ahn_application? makes it fail ;(

No problem then @kares, leave it as it is :)

@benlangfeld thanks for the restart ... and all the feedback!
failed again - this time on out-of-memory (seen those with JRuby before sometimes) give it another spin maybe :) ... also more JRUBY_OPTS memory tunings might help those
for the record with the proposed change the failures are: https://travis-ci.org/kares/adhearsion/jobs/52794751 - might look at those later ( but cucumber season takes me some time ) - seemed weird on first sight that it regressed

Coverage remained the same at 97.38% when pulling 42ef6f95c90c9c3d785bad026cf22384496216b0 on kares:no-exec-dev into d1896853d03cfab7196b6b6bd9628298751d1a4a on adhearsion:develop.

Coverage remained the same at 97.38% when pulling 42ef6f95c90c9c3d785bad026cf22384496216b0 on kares:no-exec-dev into d1896853d03cfab7196b6b6bd9628298751d1a4a on adhearsion:develop.

Unfortunately this appears to have broken loading an Adhearsion application across versions, for example using the installed ahn at v2.6.1 to load an app bundled at Adhearsion's develop branch. This is why the forking was in place.
I'm looking at this now to see if it can be mitigated by loading less of Adhearsion at what used to be the pre-fork point, and if so I'll go ahead with that. If not, I'll have to revert this.

See https://github.com/adhearsion/adhearsion/commit/1ce80d12fb5f79b62f45f71300b7ba7ba693487e and https://github.com/adhearsion/adhearsion/commit/66e1609eaf153d80053337c6e5235d056370a904.
If you can come up with some way of addressing your performance concerns which don't break application loading (perhaps in Adhearsion 3 where there is room to break backward compatibility), I'd love to see it, but 2.6.2 will be released shortly including this reversion.

@benlangfeld That's unfortunate, but I understand the need to move forward with 2.6.2 for now.   Thanks for the head's up!  Hopefully we can re-integrate it in 2.x later somehow without breaking backwards compatibility.

It would be ahn start, but binstubs obviate this issue.

Phew, that's great news...  I was hoping that binstubs would resolve the issue.
In that case, @kares and I would like to discuss re-introducing the no-spawn optimization to ahn 3.0.0.RC.  Here are some important reasons for us to try to reincorporate the solution that prevents forking.  Forking:

Slows down booting
Makes it more difficult to get the correct adhearsion pid to monitor.
Under JRuby, duplicates certain debugging instrumentation in both processes, causing adhearsion it to crash.  As a result, you simply can’t use certain standard JVM debugging tools on Adhearsion that you otherwise could.


Fix site.title and page.id

This should fix #182.
The site.title has been implemented like jekyll, but the page.id has some differences:
In Jekyll with the permalink /:categories/:year/:month/:day/:title/index.html the page id will be something like that: "/fr/2014/11/26/myfirstpost/myfirstpost".
In Pretzel it will be: "/fr/2014/11/26/myfirstpost/".
The other difference is that in Jekyll the pages have no id, only the posts have. In Pretzel both will have a generated id.
@shiftkey, @JakeGinnivan are you okay with that?

:thumbsup:

@shiftkey sorry to bother you, but is the TeamCity server working?
If not can I set an AppVeyor.com project for the Ci part?

Not sure, I'd have to ask @JakeGinnivan what's up.
If you want to take charge of the CI process, I'd highly recommend AppVeyor. I don't think Jake would mind either!

Nope, happy for it to change.
I can also give you admin permission to the teamcity build if you want to modify that?
The biggest issue with the build is that when you release it doesn't upload the zip to github, it just pushes the chocolatey package which points to a zip which has not been uploaded

Build is working - http://teamcity.ginnivan.net/viewType.html?buildTypeId=bt52
Report status to github is not setup though.

@laedit just create an account and I will set you up

Done. And sorry about the failing test, I will fix it ASAP.

@laedit done, you are project admin on the Pretzel project in teamcity.
If you need a hand setting anything up I am more than happy to help!

Weird, it seems that the GitHub repoart status plugin is well configured and activated but do nothing...
Could you update it to the latest version?
At least it supports the use of the GitHub personal access token, it will spare you to store you password.

Will try to update it tonight.

The Team CIty server seems to not responding. Not a big problem, I have set up an AppVeyor project.
@shiftkey there is one little problem thought, the AppVeyor do not seem to add a build in the queue for each push, could you tell me if the "push" and "pull request" trigger are checked in the repo options?
Thanks.

could you tell me if the "push" and "pull request" trigger are checked in the repo options?

I can only see "push" is configured - could you check the TeamCity settings and see if something is missing there?

Sorry, I wasn't clear, the Team CIty server is out.
But for AppVeyor, the configuration need to be done in the settings of the repo: could you check the "pull request" trigger for the AppVeyor webhook (https://ci.appveyor.com/api/github/webhook?id=rp8nq03r4b7mdecf)?
Thanks.

@laedit ok, I've added the webhook for the AppVeyor URL

@shiftkey Thanks! :smile:


Rename package to ComplexityMeasures.jl

See discussion in https://github.com/JuliaDynamics/Entropies.jl/issues/188

Instructions for renaming a package are here

We will lose the download stats after the rename:

I don't know if this is enough of an argument for not renaming. But it does sound appealing to quite this large number in applications. so for you this could be relevant. I guess we should modify the readme to quote both before and after rename download stats?

Can't we just keep the badge for both? The download tracker will have keep Entropies in its database, even though we register ComplexityMeasures.
We'll have to start the readme by saying that this was previously the Entropies package anyways.

yes

With #229 merged, I have no issues passing ProbabilitiesEstimators upstream any longer. Shall we go ahead with this process straight away?

Renaming is the same as publishing, but I want to have an external reviewer have a look before we publish 2.0. So we can wait here and in the meantime shift focus to causality tools as it seems all is done here.

Renaming is the same as publishing

Yes, publishing was the idea.

I have an external reviewer have a look before we publish 2.0

Do you have anyone in mind?

So we can wait here and in the meantime shift focus to causality tools as it seems all is done here.

Sure. I am currently stripping down all the V2 stuff to its bare minimum, so that we can get a release out as quick as possible. I'll tag you explicitly in relevant CausalityTools PRs when its done. I will need a day or two to get it in a review-ready state.

I got a review from Inga so I'll go ahead and do a minor push of docs and then rename and publish.


Type instantiation is excessively deep and possibly infinite.

When I use any of the new openai-function functionality in langchain, I get many kinds of errors on typescript and eslint also takes over 30 seconds to run.
Specifically, when using the DynamicStructuredTool with this zod schema:
    z.object({
      query: z
        .string()
        .describe("The actual text or keywords to search for on the database."),
      search_type: z
        .number()
        .describe(
          "This parameter determines the type of search that will be performed.",
        ),
    }),

This seems like a simple schema but somehow I get the error `Type instantiation is excessively deep and possibly infinite.
Additionally, it is also giving me this error Types have separate declarations of a private property  _cached

Zod is pretty complex - what's your hardware setup?

I am using a Macbook Pro M1 Max 64GB Ram
That should not be an issue whatsoever, the schema is pretty simple, I use zod in many other parts of the project with very complex schemas and I have no issues. It is only when used with the DynamicStructuredTool.

Hmm... any other hints you can give me to help repro

I'm having the same exact issue - as soon as I used DynamicStructuredTool & zod, my project takes over 30 seconds for type checking to work.
My Zod schema in this tool is pretty simple as well, only 3 properties:
schema: z.object({
  taskId: z.string(),
  agentName: z.string(),
  status: z.nativeEnum([
    TaskStatus.IN_PROGRESS,
    TaskStatus.NEEDS_REVIEW,
    TaskStatus.BLOCKED,
  ]),
  message: z.string(),
}),

Errors:
Type instantiation is excessively deep and possibly infinite.
Types have separate declarations of a private property  _cached

Very odd - _cached shows up only once in the code base under TensorFlowEmbeddings.
Maybe share the zod and LangChain versions you're using?

@jacoblee93
"typescript": "^5.1.6
"langchain": "^0.0.129",
"zod": "^3.22.1

Having the same issuse with the following versions:
    "langchain": "0.0.129",
    "zod": "3.21.1",
    "typescript": "4.9.5"

I'm still not able to repro:
https://codesandbox.io/s/typescript-playground-export-forked-f42stg?file=/index.ts
Am I doing anything differently in the above sandbox than people are here?
Can we also check whether there's some other TypeScript version installed globally?

If i copy and past my code into the sandbox I can use it without a problem:
My schema is the following:
     schema: z.object({
            query: z
                .string()
                .describe("The actual text or keywords to search for on the database."),
            search_type: z
                .number()
                .describe(
                    "This parameter determines the type of search that will be performed. The value can be any number between 0 and 1.",
                ),
        }),

what i found was that the versions of zod that langchain used was different to the version of zod i installed, so you get conflicts with comparison checking it is doing ...
I was having the same issues as mentioned here, i simply removed zod from the root of my project and it just started working... (i know, this isn't a proper fix, but it allowed me to get work done!)

Ah very interesting! Thank you for digging in @MrRhodes!
Did you have a more recent or less recent version of zod? I'm not exactly sure what the best resolution would be but if it's more recent we can at least bump our version.

Leaving a comment to say I had the exact same problem:

as soon as I used DynamicStructuredTool & zod, my project also takes over 30 seconds for nodemon refreshes, type checking, etc to work.

I had zod v3.22.2 in my project. I've updated to match the langchain version of 3.22.3 and that has solved my problem

Hey, has someone found the solution ?

Seems like it's a zod version mismatch as best I can tell.

Just here to say, same exact issue, same fix. When i started playing with the langchain samples i just "added zod" via pnpm and for it installed a 3.21 version...  possibly because i was using that in a different project in my monorepo 🤔.
Fixing to 3.22.4 which is the version referenced all over the place for use by langchain in my lock file immediately resolved the issue.


[Bug]: java.lang.module.FindException: Module java.se.ee not found

Application
Outline Client
Describe the bug
I have used java 11 as mentioned in the requirements and which i tried to install the build-tools using following command.
$HOME/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-34" "build-tools;34.0.0"
it says you should use java 17 or above.
then i switched my java version to 17 and updated my Java home path in ~/.zshrc file and ran the same command. It's giving me following error.
$HOME/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-34" "build-tools;34.0.0"
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.se.ee not found
Steps to reproduce
When i run cordova requirements It gives following error.
npx cordova requirements android
Requirements check results for android:
Java JDK: installed 17.0.12
Android SDK: installed true
Android target: not installed
Command failed with exit code 1: avdmanager list target
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.se.ee not found
Gradle: installed /opt/homebrew/Cellar/gradle/8.10.2/bin/gradle
Some of requirements check failed
Any help will be greatly appreciated.
What did you expect to happen?
No response
What actually happened?
No response
Outline Version
Latest
What operation system are you using?
Android
Operating System Version
Sequoia 15.0
Screenshots and Videos
No response

You need to switch to Java 11 when building Outline, even if you have installed Java 17. Did you follow https://github.com/Jigsaw-Code/outline-apps/blob/master/client/src/cordova/android/README.md?

You need to switch to Java 11 when building Outline, even if you have installed Java 17. Did you follow https://github.com/Jigsaw-Code/outline-apps/blob/master/client/src/cordova/android/README.md?

I have used java 11 and it gives me following error.
`npx cordova requirements android
Requirements check results for android:
Java JDK: installed 11.0.24
Android SDK: installed true
Android target: not installed
Command failed with exit code 1: avdmanager list target
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
... 5 more
Gradle: installed /opt/homebrew/Cellar/gradle/8.10.2/bin/gradle
Some of requirements check failed`

Hi there,
We're closing this issue due to inactivity. We haven't heard back from you in a while, and aim to keep our issue tracker organized.
If you're still experiencing this problem or have any additional information to share, please feel free to reopen this issue or create a new one.
Thank you for your understanding!


TypeError: The operator "is" is not permitted

Describe the bug
I get a TypeError when using findAll() with a having parameter.
Stack trace
previous TypeError: The operator "is" is not permitted
    at operator (node_modules/knex/lib/formatter/wrappingFormatter.js:132:11)
    at QueryCompiler_MySQL.havingBasic (node_modules/knex/lib/query/querycompiler.js:650:7)
    at QueryCompiler_MySQL.having (node_modules/knex/lib/query/querycompiler.js:601:31)
    at node_modules/knex/lib/query/querycompiler.js:133:40
    at Array.forEach (<anonymous>)
    at QueryCompiler_MySQL.select (node_modules/knex/lib/query/querycompiler.js:132:16)
    at QueryCompiler_MySQL.toSQL (node_modules/knex/lib/query/querycompiler.js:73:29)
    at Builder.toSQL (node_modules/knex/lib/query/querybuilder.js:83:44)
    at QueryBuilder.execute (node_modules/@mikro-orm/knex/query/QueryBuilder.js:427:43)
    at MySqlDriver.find (node_modules/@mikro-orm/knex/AbstractSqlDriver.js:49:46)

To Reproduce
@Entity({ tableName: 'applications' })
export class ApplicationEntity {
  @PrimaryKey({ type: UuidType })
  public id!: string;

  @Property()
  public name!: string;

  @Property()
  public icon!: string;

  @Property()
  public createdAt!: Date;

  @Property({ nullable: true })
  public removedAt?: Date;
}

@QueryHandler(GetApplications)
export class GetApplicationsHandler implements ICommandHandler<GetApplications> {
  constructor(
    @InjectRepository(ApplicationEntity)
    private readonly applications: EntityRepository<ApplicationEntity>
  ) {}

  public async execute(query: GetApplications): Promise<ApplicationDto[]> {
    const applications = await this.applications.findAll({ having: { removedAt: null } }); // Triggered on this line

    return applications.map((application) => new ApplicationDto(application));
  }
}

Expected behavior
The having to create a valid query for getting all applications meeting the critiea.
Additional context
I believe the error is coming from here
https://github.com/mikro-orm/mikro-orm/blob/12398fdd489791577f8dd592f42a85fd404602ea/packages/knex/src/query/QueryBuilderHelper.ts#L432
The is operator is not listed here
https://github.com/knex/knex/blob/1cc1df9c35eedf2f48cea487693166bab1bcfb90/lib/formatter/wrappingFormatter.js#L10-L54
I have also ran into issues when trying to use the $in with a similar error that the in operator is not permitted.
Versions

Dependency
Version

node
14.19.0

mysql
5.7

typescript
4.7.4

mikro-orm
5.5.0

micro-orm/mysql
5.5.0

Please provide complete reproduction, this is not enough.

I figured out a solution to my problem, I should have been using .find() instead of .findAll().
That said, is this findAll() with having still a bug?

repo.findAll literally calls repo.find(), so that feels a bit unreal :]

My guess is you have some dependency mismatch after upgrading, try wiping node_modules and lock file and reinstall. I doubt findAll would behave differently than find given the implentation.

https://github.com/wSedlacek/recreate-mikro-orm-bug-operators
Here is a recreation.
I attempted to use stackblitz, but ran into limitations of sqlite there (not supporting returning), so to test you'll need to run it locally.
I have it setup so that localhost:3000/ triggers the issue on request. The recreation is dead simple, just pass in having to a findAll()

I was hoping for minimal reproduction. A script without any additional dependencies, not a nestjs webapp.

Let me see what I can do to get one that is just using MikroORM

Interesting. repo.find behaves exactly the same as repo.findAll, as expected, so not sure why you think there is any difference.
This looks like some artificial limitation of knex (https://github.com/knex/knex/issues/5203). cc @kibertoad
But when I add the operator to the place you linked (inside knex), the query compliles and ends up with SQLite error anyway. You are trying to create invalid query...

DriverException: select d0.* from data as d0 having d0.removed_at is NULL - SQLITE_ERROR: HAVING clause on a non-aggregate query

Huh, good to know. When I was writing this I was really looking for a where clause, and find() gives me that, so no problem there. Maybe the type for findAll() could be smarter to reduce what you can pass to having such that it would not result in a runtime error?
Either way I am off and running with my project, was just caught off guard with the having not working as I expected.


Add a way to enable survey questions per participant (per participant excluding current?)

Discussed solution: Create a "per-participant survey" stage that is similar to survey stage, but generates the question for each participant in the cohort (meaning the stage answer structure is different—a mapping of participant ID to answer instead of just answer)


MediaMetadata doesn't include some ID3 tags

Version
Media3 1.3.1
More version details
No response
Devices that reproduce the issue
Pixel 3a Emulator API 34
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps

Play any mp3 file which contains id3 tags with ids TCON, COMM, etc.
Check values in onMediaMetadataChanged and onTracksChanged

override fun onTracksChanged(tracks: Tracks) {
    tracks.groups.forEach { group ->
        for (i in 0 until group.length) {
            group.mediaTrackGroup.getFormat(i).metadata?.let { metadata ->
                for (j in 0 until metadata.length()) {
                    metadata.get(j).let {
                        if (it is TextInformationFrame) {
                            println("${it.id} ${it.values}") // TCON [<value>]
                        }

                        if (it is CommentFrame) {
                            println("${it.id} ${it.text}") // COMM <value>
                        }
                    }
                }
            }
        }
    }
}

override fun onMediaMetadataChanged(mediaMetadata: MediaMetadata) {
    println("genre: ${mediaMetadata.genre}") // null
    println("description: ${mediaMetadata.description}") // null
}

Expected result
Value of MediaMetadata.genre is filled with TCON frame content
Value of MediaMetadata.description is filled with COMM frame content
Actual result
MediaMetadata values described above are null
Media
Sample MP3 link
Bug Report

[ ] You will email the zip file produced by adb bugreport to<EMAIL_ADDRESS>after filing this issue.

Please can you try listening to Player.Listener.onMetadata? That's where I would expect this to be emitted, as described here: https://developer.android.com/media/media3/exoplayer/retrieving-metadata#during-playback

I played the provided link in the demo app and I see COMM and TCOM logged as part of the metadata in onTracksChanged (this logging is part of EventLogger, see https://developer.android.com/media/media3/exoplayer/debug-logging):
tracks [eventTime=1.27, mediaPos=0.00, window=0, period=0
  group [
    [X] Track:0, id=null, mimeType=audio/mpeg, bitrate=128000, channels=2, sample_rate=44100, supported=YES
  ]
  Metadata [
    COMM: language=xxx, description=
    TCOM: description=null: values=[SikhSangeet.com]
    TCON: description=null: values=[Shabad Kirtan]
    TCOP: description=null: values=[SikhSangeet.com]
    TENC: description=null: values=[SikhSangeet.com]
    WXXX: url=http://SikhSangeet.com
    TALB: description=null: values=[Teri Bhagat Na Chhodon]
    TIT2: description=null: values=[Nindo Nindo Mauko]
    TOPE: description=null: values=[Harjinder Singh (Sri Nagar Wale)]
    TPE1: description=null: values=[Harjinder Singh (Sri Nagar Wale)]
    TRCK: description=null: values=[01]
  ]
]

yes, onTracksChanged gets called but onMetadata doesn't, but my actual point of reporting this issue was that information such as "genre" is very basic which should be filled in MediaMetadata, right?

Ah gotcha, I misunderstood your original comment.

Value of MediaMetadata.genre is filled with TCON frame content

This makes sense, based on my reading of the definition of the TCON frame here, though we probably don't want to naively popoulate the string directly and instead optionally do the numeric resolution described there, and somewhat already implemented here (although there may be an off-by-one bug there, I'm going to dig a bit further):
https://github.com/androidx/media/blob/d833d59124d795afc146322fe488b2c0d4b9af6a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/MetadataUtil.java#L514-L527

Value of MediaMetadata.description is filled with COMM frame content

I'm not sure sure about this. COMM is described in a very free-form way, in particular there might be more than one, so I don't think it maps very clearly to MediaMetadata.description. I'm not sure that any of these ID3 frame types really contain a 'description'.

I'll prepare a change to map TCON to MediaMetadata.genre.

This is now implemented by the commits referenced above.


[run.sh] fix curl loop, trap nil HTTP code, check SSL cert

This is what I came up with, let me know if you want any changes.
The curl loop fix... not sure how we both missed it 😨
Fix #102

Let me know if you prefer to add -brief to the openssl command... but if there's an error the -brief might not give much information - even if there's a cert issue perhaps -brief is good enough.

Closing this and realized I had forgotten to update version, changelog - I admit the error pulled me out of another project.. I was a bit eager to fix the issue and go back to my project. Usually I don't make the same mistake twice 🤞


ci: Change docker builder to use image from docker hub

This allows the agent to not have to rebuild the image locally.

Is this good to go? It looks like the local_teamcity_runner image is gone so my other PRs aren't building unless I cherry pick this in.

Yeah this is good.


Description does not match example

The sentence
Next, you use SetAscending to sort City in descending order instead.
should be replaced by
Next, you use SetAscending to sort Name in descending order instead.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 49e7f1e1-e840-8a6f-81bc-a29dd248a327
Version Independent ID: c2ada013-a751-09ef-cac7-6c50b51e2411
Content: Record.SetAscending(Any, Boolean) Method - Business Central
Content Source: dev-itpro/developer/methods-auto/record/record-setascending-method.md
Service: dynamics365-business-central
GitHub Login: @SusanneWindfeldPedersen
Microsoft Alias: solsen

Thanks for catching this. Will be fixed with next doc refresh.


M/s when using weather integration with m/s as default

Describe the bug
When using the smhi weather integration it uses m/s as default wind unit. When selecting m/s in the card it converts from km/h to m/s. For instance smhi reports 3,9m/s the card converts it to 1.
Smhi

Thanks for reporting, I will fix this bug when implementing the support for imperial weather units. this will be included in V1.7.


Docker action fails with application assets

Summary
As soon as assets are added to the Python app's context directory (see ADD  and pip install in Dockerfile below) that this prevents the action container from being started.
Environment details:

local deployment, vagrant, native ubuntu, Mac OS, Bluemix, ...

$ wsk property get
whisk auth      b5d508cf-4ff2-41eb-984d-c229faa2d3a2: etc....
whisk API host      openwhisk.ng.bluemix.net
whisk API version   v1
whisk namespace     iainhouston_usexplore
whisk CLI version   2016-09-01T10:10:44+00:00
whisk API build     2016-09-01T11:24:32Z
whisk API build number  whisk-build-303

Steps to reproduce the issue:

$ wsk sdk install docker
Edit Dockerfile to include Python app's assets in \action directory e.g.   see `Dockerfile below
./buildAndPush.sh my_namespace/my_image

Provide the expected results and outputs:
Dockerfile:
# Dockerfile for Python whisk docker action
FROM openwhisk/dockerskeleton

ENV FLASK_PROXY_PORT 8080

# Install our action's Python dependencies
ADD requirements.txt /action/requirements.txt
RUN cd /action; pip install -r requirements.txt

# Ensure source assets are not drawn from the cache
# after this date
ENV REFRESHED_AT 2016-09-07T10:37:08Z
# Add all source assets
ADD . /action
# Rename our executable Python action
ADD test.py /action/exec

# Leave CMD as is for Openwhisk
CMD ["/bin/bash", "-c", "cd actionProxy && python -u action proxy.

test.py
#!/usr/bin/env python

import os
import sys
import json

def main():
    # accept multiple '--param's
    params = json.loads(sys.argv[1])
    # find 'myparam' if supplied on invocation
    myparam = params.get('myparam', 'myparam default')

    # add or update 'myparam' with default or
    # what we were invoked with as a quoted string
    params['myparam'] = '{}'.format(myparam)

    pyVersion = '{}'.format(sys.version)
    actVersion = '{}'.format(os.environ.get('REFRESHED_AT', 'no Dockerfile ENV'))
    print('Action version: {}'.format(actVersion))
    # output result of this action
    print(json.dumps({ 'allparams' : params, 'python': pyVersion, 'actionVersion': actVersion}))

if __name__ == "__main__":
    main()

Assets: requirements.txt (although program doesn't import them in this test case), neither does it read data.json which is also ADDed)
requests==2.11.1

Expected results:
This is what we get when requirements.txt is empty and there is no data file (e.g. data.json) in the context directory.
Command line
$ wsk action invoke --blocking --result my_action --param notmyparam 'not my param'
{
  "actionVersion": "2016-09-06T23:46:34Z",
  "allparams": {
    "notmyparam": "not my param",
    "timoutSeconds": "4"
  },
  "python": "details"
}

Poll
Activation: my_action (912395a29c1f4ec1b5ef3a972be43096)
[
  "2016-09-07T08:27:28.058817923Z stdout: Action version: 2016-09-06T23:46:34Z",
  "2016-09-07T08:27:28.059329603Z stdout: XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX",
  "2016-09-07T08:27:28.059650757Z stderr: XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX"
]

Provide the actual results and outputs:
Poll
Activation: sitemonitor (00099cd455094efa8111d5e64a1c681e)
[
  "Error starting container"
]

Command line
$ wsk action invoke --blocking --result my_action
{
  "error": "the action did not produce a valid JSON response"
}

Additional information you deem important:

issue happens as soon as app assets are included in the context directory
ran it first without assets; then with assets.

Adding the (non pip-installed) assets into a directory other than /action/ seems to solve it. Investigating further.
FROM openwhisk/dockerskeleton

ENV FLASK_PROXY_PORT 8080

# Ensure source assets are not drawn from the cache
# after this date
ENV REFRESHED_AT 2016-09-07T14:57:00Z

# Add all source assets
RUN mkdir /assets
ADD . /assets

# Install our action's Python dependencies
RUN pip install -r /assets/requirements.txt

# Rename our executable Python action
ADD test.py /action/exec
RUN chmod a+xr /action/exec

# Leave CMD as is for Openwhisk
CMD ["/bin/bash", "-c", "cd actionProxy && python -u actionproxy.py"]

I'm going to close this - we have zip file support for python actions as well as virtual environments.


CI: Suite-runtime.RuntimeFQDNPolicies Implements matchPattern: "*": DNS resolves but curl times out: Process exited with status 28

Suite-runtime.RuntimeFQDNPolicies Implements matchPattern: "*"
https://jenkins.cilium.io/job/cilium-master-runtime-kernel-4.9/2247/testReport/junit/(root)/Suite-runtime/RuntimeFQDNPolicies_Implements_matchPattern_____/
ad391c17_RuntimeFQDNPolicies_Implements_matchPattern___.zip
Possibly related to https://github.com/cilium/cilium/issues/16724.
Failing for the past 1 build (Since #2247 )Took 18 sec.
Stacktrace/home/jenkins/workspace/cilium-master-runtime-kernel-4.9/runtime-gopath/src/github.com/cilium/cilium/test/ginkgo-ext/scopes.go:518
Curl to world3.cilium.test failed when in deny-all due to toFQDNs
Expected command: docker exec -i  app1 curl --path-as-is -s -D /dev/stderr --fail --connect-timeout 5 --max-time 20 world3.cilium.test -w "time-> DNS: '%{time_namelookup}(%{remote_ip})', Connect: '%{time_connect}',Transfer '%{time_starttransfer}', total '%{time_total}'"
To succeed, but it failed:
Exitcode: 28
Err: Process exited with status 28
Stdout:
 	 time-> DNS: '0.009256()', Connect: '0.000000',Transfer '0.000000', total '5.000660'
Stderr:
/home/jenkins/workspace/cilium-master-runtime-kernel-4.9/runtime-gopath/src/github.com/cilium/cilium/test/runtime/fqdn.go:784Standard OutputNumber of "context deadline exceeded" in logs: 0
Number of "level=error" in logs: 0
Number of "level=warning" in logs: 0
Number of "Cilium API handler panicked" in logs: 0
Number of "Goroutine took lock for more than" in logs: 1
No errors/warnings found in logs
Standard Error17:31:58 STEP: Importing policy with matchPattern: "*" rule
17:31:58 STEP: Setting up policy: /home/vagrant/go/src/github.com/cilium/cilium/test/policy_0f5df029.json
17:31:59 STEP: Denying egress to any IPs or domains
FAIL: Curl to world3.cilium.test failed when in deny-all due to toFQDNs
Expected command: docker exec -i  app1 curl --path-as-is -s -D /dev/stderr --fail --connect-timeout 5 --max-time 20 world3.cilium.test -w "time-> DNS: '%{time_namelookup}(%{remote_ip})', Connect: '%{time_connect}',Transfer '%{time_starttransfer}', total '%{time_total}'"
To succeed, but it failed:
Exitcode: 28
Err: Process exited with status 28
Stdout:
time-> DNS: '0.009256()', Connect: '0.000000',Transfer '0.000000', total '5.000660'
Stderr:
=== Test Finished at 2021-06-29T17:32:06Z====
17:32:06 STEP: Running JustAfterEach block for EntireTestsuite RuntimeFQDNPolicies
===================== TEST FAILED =====================
17:32:06 STEP: Running AfterFailed block for EntireTestsuite RuntimeFQDNPolicies
<IP_ADDRESS> httpd1
<IP_ADDRESS> app3
<IP_ADDRESS> app2
<IP_ADDRESS> app1
<IP_ADDRESS> httpd3
<IP_ADDRESS> httpd2
<IP_ADDRESS> bind
<IP_ADDRESS> OutsideHttpd2
<IP_ADDRESS> OutsideHttpd1
<IP_ADDRESS> OutsideHttpd3
<IP_ADDRESS> WorldHttpd3
<IP_ADDRESS> WorldHttpd2
<IP_ADDRESS> WorldHttpd1
<IP_ADDRESS> cilium-etcd
<IP_ADDRESS> cilium-consul
<IP_ADDRESS> registry
cmd: sudo cilium endpoint list
Exitcode: 0
Stdout:
ENDPOINT   POLICY (ingress)   POLICY (egress)   IDENTITY   LABELS (source:key[=value])   IPv6                 IPv4            STATUS
ENFORCEMENT        ENFORCEMENT
374        Disabled           Disabled          2184       container:app=test            f00d::a0f:0:0:3b15   <IP_ADDRESS>   ready
container:id.app2
479        Disabled           Disabled          7762       container:app=test            f00d::a0f:0:0:9d7d   <IP_ADDRESS>    ready
container:id.httpd2
container:id.service1
578        Disabled           Disabled          283        container:app=test            f00d::a0f:0:0:aea1   <IP_ADDRESS>    ready
container:id.httpd3
container:id.service1
661        Disabled           Disabled          26095      container:app=test            f00d::a0f:0:0:ae24   <IP_ADDRESS>     ready
container:id.app3
1325       Disabled           Disabled          1          reserved:host                                                      ready
1678       Disabled           Disabled          21355      container:app=test            f00d::a0f:0:0:357a   <IP_ADDRESS>   ready
container:id.httpd1
container:id.service1
1970       Disabled           Disabled          4          reserved:health               f00d::a0f:0:0:5d8a   <IP_ADDRESS>   ready
3727       Disabled           Enabled           7233       container:app=test            f00d::a0f:0:0:7779   <IP_ADDRESS>     ready
container:id.app1
Stderr:
cmd: sudo cilium policy get
Exitcode: 0
Stdout:
[
{
"endpointSelector": {
"matchLabels": {
"container:id.app1": ""
}
},
"egress": [
{
"toPorts": [
{
"ports": [
{
"port": "53",
"protocol": "ANY"
}
],
"rules": {
"dns": [
{
"matchPattern": ""
}
]
}
}
]
},
{
"toFQDNs": [
{
"matchPattern": "world1.cilium.test"
},
{
"matchPattern": "world.cilium.test"
},
{
"matchPattern": "level*CNAME.cilium.test"
}
]
}
],
"labels": [
{
"key": "toFQDNs-runtime-test-policy",
"source": ""
}
]
}
]
Revision: 22
Stderr:
===================== Exiting AfterFailed =====================
17:32:15 STEP: Running AfterEach for block EntireTestsuite RuntimeFQDNPolicies
17:32:16 STEP: Running AfterEach for block EntireTestsuite
[[ATTACHMENT|ad391c17_RuntimeFQDNPolicies_Implements_matchPattern:_"*".zip]]

Possibly related to #16724.

Once https://github.com/cilium/cilium/issues/16754 (missing bugtool) is fixed, we can check if it's the same root cause.


Deactivate test runner (for now)

Per https://forum.exercism.org/t/cfml-test-runner-regularly-timing-out/10013, I'd like to deactivate the test runner. It consistently times out, which only serves to frustrate students using the online editor. Since CFML is coming up as a featured #48in24 language, we should be pragmatic about this since students can still solve the exercises offline.

I left a comment on the linked discussion.


UV refactor, secondary data broken up into smaller pieces.

Only partial refactor, the primary plot functions and data are still a WIP.

Coverage increased (+0.1%) to 91.065% when pulling f6a29d08e2ba7eaf9baa807aad095a8dd4abaeaa on thongsav-usgs:master into 9eb0cd972dd20f8ea36be9b1f70d9e81668ad907 on USGS-R:master.


How to integrate KITTI360 dataset into this?

Hi,
Thank you so much for adapting kitti2bag into ros2 environment.
I am trying to adapt KITTI360 dataset into this, however, the calibration file provided by KITTI360 are calib_cam_to_pose.txt, calib_cam_to_velo.txt, calib_sick_to_velo.txt, which are quite different from the KITTI's calibration file's setup(calib_cam_to_cam.txt, calib_imu_to_velo.txt, and calib_velo_to_cam.txt). The description of the KITTI360 calibration files are as follows:

Any suggestions on how to integrate KITTI360 into kitti_to_ros2bag?
Help will be greatly appreciated!!

Integrating the KITTI360 dataset with its unique calibration files into kitti_to_ros2bag will require some modifications. Given the differences in calibration file setups, you will need to map the KITTI360 calibration files to the expected formats used by kitti_to_ros2bag. Unfortunately, I won't be able to assist with this directly at the moment.
However, I welcome contributions and would be happy to review a pull request if you decide to implement these changes yourself. Your contribution could benefit others who are looking to use KITTI360 with ROS2.
Thank you for your understanding.


CODE CHANGE: Footer texts not visible

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the code change

In this footer section the texts are not visible and also icons are not correctly placed.
Assign this issue to me i would like to contribute in this section.
Proposed solution
The texts color can be changed and the icons can be placed in correct order so that the alignment and text doesn't look odd.
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[x] I want to work on this issue

@PriyaGhosal Please look into my PR.


Create a unified "Entity" table for more efficient searching.

Merge SQLArtist and SQLLabel into a single table. This can be extended to include Master releases.

id, primary key
entity_id
entity_type (1=artist, 2=label, 3=master)
name
description (?)

Done.


Infinite loop in paypal module

#PrestaShop 1.6.x
#PayPal module 3.12.1
In some circumstances, the file <id_cart>.txt opened at line 44 and with <id_cart> empty/false, already exists and it is not deleted by ipn.php.
This trigger an infinite loop in the while statement.
https://github.com/202-ecommerce/paypal/blob/b1e3bfe57b73e25db9d29d91c4050e2b9cc72f60/controllers/front/submit.php#L44-L50
Please fix the logic.
To workaround temporarily I changed this files:
paypal/controllers/front/submit.php at line 52-62
paypal/ipn.php at line 247-257
with this code to set a kind of timeout:
$seconds = 0;
if (!$res) {
    while (file_exists(dirname(__FILE__).'/../../'.$id_cart.'.txt')) {
        sleep(1);
        $seconds++;
        if($seconds >= 300)
        {
            @rename(dirname(__FILE__).'/../../'.$id_cart.'.txt', dirname(__FILE__).'/../../'.date('YmdHis').'_'.$id_cart.'.txt');
        }
    }
}

Hello !
Thank you for your contribution !
We will include it to the next release.
Best regards,
Iuliia


[RESOLVED] Interface eth0(): High error rate (>2 for 5m)

Problem started at 09:09:29 on 2023.07.13
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Operational data: errors in: 3, errors out: 0
Original problem ID: 32590
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23483&eventid=32590

Problem has been resolved in 6m 0s at 09:15:29 on 2023.07.13
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Original problem ID: 32590


UnoCSS Dist-chunk mode in Astro

TL;DR

UnoCSS mode dist-chunk sounds very promising for MPA style applications.
I can't make it work in Astro neither in SSG nor in SSR + Node adapter mode.
Actually, I'm not sure if there is an issue in UnoCSS, or in Astro, or even in Vite, or in combination of any of them.

I'm building MPA app with Astro + UnoCSS. Reading through available documentation, I've found dist-chunk mode in UnoCSS which should be a great fit for MPA style apps. Wanted to give it a try and encountered some issues.
It's just a starter app for Astro npm create astro@latest and UnoCSS in addition. The source code is available at astro-unocss-sample repo.
Using standard installation UnoCSS works just fine, dev, build & preview work like a charm.
Let's try to change the mode to dist-chunk in the configuration astro.config.mjs:
import { defineConfig } from 'astro/config';
import unocss from 'unocss/astro';

export default defineConfig({
    integrations: [
        unocss({
            mode: 'dist-chunk',
          }),
      ],
});

Now, running npm run build I get an error:
PS C:\Users\...\astro-unocss-sample> npm run build

><EMAIL_ADDRESS>build
> astro build

15:21:43 [build] output target: static
15:21:43 [build] Collecting build info...
15:21:43 [build] Completed in 34ms.
15:21:43 [build] Building static entrypoints...
[vite]: Rollup failed to resolve import "uno.css" from "astro:scripts/page-ssr.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
 error   [vite]: Rollup failed to resolve import "uno.css" from "astro:scripts/page-ssr.js".
  This is most likely unintended because it can break your application at runtime.
  If you do want to externalize this module explicitly add it to
  `build.rollupOptions.external`
  File:
    C:\Users\...\astro-unocss-sample\node_modules\vite\dist\node\chunks\dep-5605cfa4.js:45832:19
  Code:
    45831 |         if (!importer || !/\?commonjs-external$/.test(importer)) {
    > 45832 |             throw new Error(`[vite]: Rollup failed to resolve import "${id}" from "${importer}".\n` +
            |                   ^
      45833 |                 `This is most likely unintended because it can break your application at runtime.\n` +
      45834 |                 `If you do want to externalize this module explicitly add it to\n` +
      45835 |                 `\`build.rollupOptions.external\``);

Let's add uno.css to the build.rollupOptions.external:
import { defineConfig } from 'astro/config';
import unocss from 'unocss/astro';

export default defineConfig({
    integrations: [
        unocss({
            mode: 'dist-chunk',
        }),
    ],
    vite: {
        build: {
            rollupOptions: {
                external: ['uno.css'],
            },
        },
    },
});

And run npm run build:
PS C:\Users\...\astro-unocss-sample> npm run build

><EMAIL_ADDRESS>build
> astro build

16:09:54 [build] output target: static
16:09:54 [build] Collecting build info...
16:09:54 [build] Completed in 30ms.
16:09:54 [build] Building static entrypoints...
16:09:55 [build] Completed in 1.15s.

 generating static routes
 error   Cannot find package 'uno.css' imported from C:\Users\...\astro-unocss-sample\dist\entry.mjs
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'uno.css' imported from C:\Users\...\astro-unocss-sample\dist\entry.mjs
    at new NodeError (node:internal/errors:399:5)
    at packageResolve (node:internal/modules/esm/resolve:794:9)
    at moduleResolve (node:internal/modules/esm/resolve:843:20)
    at defaultResolve (node:internal/modules/esm/resolve:1058:11)
    at nextResolve (node:internal/modules/esm/loader:164:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:419:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
    at link (node:internal/modules/esm/module_job:76:36)

By default Astro runs in SSG mode. Let's try to switch to Astro's SSR mode by installing Node adapter npm install @astrojs/node  and changing the configuration correspondingly:
import node from '@astrojs/node';
import { defineConfig } from 'astro/config';
import unocss from 'unocss/astro';

export default defineConfig({
    output: 'server',
    adapter: node({
        mode: 'standalone',
    }),
    integrations: [
        unocss({
            mode: 'dist-chunk',
        }),
    ],
    vite: {
          build: {
            rollupOptions: {
                external: ['uno.css'],
            },
        },
    },
});

And run npm run build again:
PS C:\Users\...\astro-unocss-sample> npm run build

><EMAIL_ADDRESS>build
> astro build

16:18:17 [build] output target: server
16:18:17 [build] deploy adapter: @astrojs/node
16:18:17 [build] Collecting build info...
16:18:17 [build] Completed in 34ms.
16:18:17 [build] Building server entrypoints...
16:18:20 [build] Completed in 3.36s.

 finalizing server assets

16:18:20 [build] Rearranging server assets...
16:18:20 [build] Server built in 3.43s
16:18:20 [build] Complete!

Above looks promising. Let's run npm run preview:
PS C:\Users\...\astro-unocss-sample> npm run preview

><EMAIL_ADDRESS>preview
> astro preview

 error   The server entrypoint C:\Users\...\astro-unocss-sample\dist\server\entry.mjs does not exist. Have you ran a build yet?
  File:
    C:\Users\...\astro-unocss-sample\node_modules\@astrojs\node\dist\preview.js:23:13
  Code:
    22 |     if (err.code === "ERR_MODULE_NOT_FOUND") {
    > 23 |       throw new Error(
         |             ^
      24 |         `The server entrypoint ${fileURLToPath(
      25 |           serverEntrypoint
      26 |         )} does not exist. Have you ran a build yet?`

Let's look inside:
PS C:\Users\...\astro-unocss-sample\dist> ls -r

    Directory: C:\Users\...\astro-unocss-sample\dist

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          12/01/2023    16:18                client
d----          12/01/2023    16:18                server

    Directory: C:\Users\...\astro-unocss-sample\dist\client

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
da---          12/01/2023    16:18                assets
-a---          03/01/2023    15:44            873 favicon.svg

    Directory: C:\Users\...\astro-unocss-sample\dist\client\assets

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          12/01/2023    16:18           2152<EMAIL_ADDRESS>-a---          12/01/2023    16:18           2057 index.c5bcaae5.css

    Directory: C:\Users\...\astro-unocss-sample\dist\server

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          12/01/2023    16:18         432584 entry.mjs

So, there is entry.mjs as usual, also there's<EMAIL_ADDRESS>as well, and looking to the name it is supposed to be like a virtual entry but I can't find any documentation how to deal with it.
Long story short:

UnoCSS mode dist-chunk sounds very promising for MPA style applications.
I can't make it work in Astro neither in SSG nor in SSR + Node adapter mode.
Actually, I'm not sure if there is an issue in UnoCSS, or in Astro, or even in Vite, or in combination of any of them.

Any insights or help would be much appreciated.

Maybe you should try setting injectEntry to false, because the default behavior injects uno.css automatically into every .astro component.
https://github.com/unocss/unocss/blob/654c7f973878c41cc1c07207f85e439d9fd5869f/packages/astro/src/index.ts#L20
However, if you are using Vue or Svelte SFCs, the behavior of dist-chunk will inject the import script into the outer scope instead of the <script> tag, which is still buggy.

This works for me (I am using pnpm):
export default defineConfig({
  integrations: [
    Unocss({
      mode: "dist-chunk",
      injectEntry: process.env["NODE_ENV"] === "development",
    }),
  ],
});

Under dev mode, the Unocss Vite plugin uses global mode (even if dist-chunk is configured), which generates a "uno.css" file. The Astro integration automatically injects this import into every page. However, under production mode, there is no such "uno.css" file, as the generated style is directly emitted into each of the chunks, so this automatic injection will break the build. A workaround is to configure injectEntry manually according to the NODE_ENV mode.
PS: I'm not sure which tool injects this "NODE_ENV" env var (maybe pnpm or astro-cli), maybe you need some alternative logic to get this dev/prod mode.
PPS: I'm not sure whether this works for SSR.


[FAI-254] Add counterfactual explainer using OptaPlanner

Same codebase as PR 479 to kogito-apps.
Using the sandbox for the meantime to continue development.

@danielezonca, @tteofili ptal, thank you!


Allow circuit breaker settings to be runtime controllable

WIP - I need to make a couple tests creating clusters with a real runtime object to make sure that runtime settings override config settings.

per offline conversation:

runtime key needs to include cluster name
need to check for max inside max call (not during init)
use mock runtime for tests


glibc: expose enableCET as overridable argument, default permissive

Description of changes
This should be a gentler way to introduce CET-compiled binaries into general usage: the "permissive" mode will silently disable CET when a non-CET-compiled .so rather than throwing an error.
Non-permissive mode could still easily be enabled for e.g. pkgsExtraHardening.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

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

This should be a gentler way to introduce CET-compiled binaries into general usage: the "permissive" mode will silently disable CET when a non-CET-compiled .so rather than throwing an error.

While I understand the immediate effect, what's the rationale behind that? That this currently produces e.g. libs without CET if built on a builder that's too old (AFAIU --enable-cet=auto is the default for gcc)?

It's not just libs that were built on older systems, it's that we're probably going to have to disable CET on a bunch of packages that get broken by the funny stack shenanigans that CET performs (JITs maybe?). The default "hard fail" mode is probably stronger than most people are going to tolerate on a normal system.
Granted we're in a slightly better position than most distributions because at the time we're building an executable, we (mostly) know exactly what libs it's going to be linked to, so in theory we could put together some kind of mechanism that could check if any of the closure's packages have had CET disabled - but I see little point in putting such a build-time mechanism together when a runtime one is provided.
(FWIW other distributions have already started building packages with CET enabled, but I think that was probably a mistake on their part, as they've presumably not been able to test them properly until very recently and won't have been able to discover the ones that CET breaks.. suggesting there will be a lot of packages floating around in their ecosystem marked as "CET enabled" which may well break when CET mode is actually enabled)

cc @ajs124 who originally implemented that.

It's not just libs that were built on older systems, it's that we're probably going to have to disable CET on a bunch of packages that get broken by the funny stack shenanigans that CET performs (JITs maybe?). The default "hard fail" mode is probably stronger than most people are going to tolerate on a normal system.

I'm not sure I fully understand yet why this is a "new" problem: is it an existing problem or something new (given that "they've presumably not been able to test them properly until very recently")? in that case, glibc 2.39 + linux kernel >=6.6 is the cause? Asking because that might be relevant on whether we should schedule the upcoming glibc update together with this for instance.

glibc 2.39 + linux kernel >=6.6 is the cause?

That and the fact that we haven't been building CET-enabled packages so far - I haven't added the hardening flag for that yet. So there's no specific deadline for this, but it's another thing I'd like in place before I go adding hardening flags.

cc @ajs124 who originally implemented that.

Don't have any additional insight, but trust you to do the right thing.

Does this also affect dependencies of a program where this needs to be disabled?
The glibc INSTALL section only mentions the opposite case when using --enable-cet=permissive, i.e. that a CET-enabled program must not dlopen a non-CET program, so I’m not sure

That is a detail I had missed - I think you're right and that it's only for dlopen. I guess the idea is that libs you're linked against can probably be trusted, but the "immediate failure" is to protect against a program being tricked into opening a .so without CET support and disabling the protection.
Still, I'd argue that our preferred mode should be permissive, at least to start with.
A little bit more detail on support in various components here: https://lpc.events/event/7/contributions/729/attachments/496/903/CET-LPC-2020.pdf

That and the fact that we haven't been building CET-enabled packages so far

OK, that was part of what confused me, sorry!
I misread in https://gcc.gnu.org/install/configure.html that --enable-cet=auto being the default implies CET being enabled on our end. After rebuilding pkgs.hello with -fcf-protection and comparing the results with diffoscope I realized that this is clearly not the case.
My confusion came from the wrong assumption that part of this was already in place and thus at least people with 6.6 should've noticed issues already if any. Given that this is not the case, I agree with your assessment :+1:

Might I be able to get an approval for this?

@risicle just to confirm -- with the mode set to permissive, CET-enabled programs are still able to dlopen non CET-enabled programs, correct? As an example, setting the mode to permissive won't break any programs loading proprietary libraries that are not CET-enabled (like CUDA).

That is my understanding, yes. This mode is less strict than its current value, so it shouldn't "break" anything.

I'll probably file another trivial glibc change later (https://github.com/NixOS/nixpkgs/issues/303193). Would consider merging them in one round since both are rebuilds of the same (large) package.


refactoring for qibotf

Small adjustments to interface with qibotf.

@stavros11 we have some pylint import errors for windows. I think we can disable this check for the specific files given that we are not importing these libraries, except for the matrices.py import.

@stavros11 thanks, I will merge #402 as soon as test finish, and then fix this PR so we can continue in your #398.