Question: Use classic Windows 32 API Dll's in UWP Project

Hey! Can I get step-by-step instruction, how I should use Win32 dll in UWP C# Project? Has this method limitations like Windows 10 version? Thanks.
my win32api.dll
#include "pch.h"

#define DllExport   __declspec( dllexport )

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

extern "C"
{
    DllExport void GetRamSize(OUT long long& ramSize)
    {
        ramSize = 132312;
    }
}

@Alkanores It should work as long as the APIs you're trying to is available in UWP.

@Alkanores It should work as long as the APIs you're trying to is available in UWP.

Project Union exists for union of win32 and winrt api's? If Project Reunion cannot give me Windows API, why it exists?

@Alkanores Already many Win32 APIs are available in UWP before Reunion. Other APIs will come to UWP or may not come. See https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis

@Alkanores Already many Win32 APIs are available in UWP before Reunion. Other APIs will come to UWP or may not come. See https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis

Get HWID for hardware ban? MemoryWriter for anticheat?

@Alkanores No but you can proposethem in UWP for Reunion

@Alkanores No but you can proposethem in UWP for Reunion

I need this right now for production app, there must be another way.
Has .exe app limitations, if UWP launched it with Full Trust?

@Alkanores Full trust should have full access

@Alkanores Full trust should have full access

Full access to WinRT or Win32 api?

@Alkanores Full trust component should have full access to both

Full trust component should have full access to both however APIs related to XAML will not work from Win32 Full trust.

I don't need XAML Api from Win32 full trust, just run and communicate with UWP App by AppService. Just AntiCheat service.
Is this real?

@Alkanores Yes you can do that and it will work

@Alkanores Yes you can do that and it will work

I ask again just in case.

Can I launch win32 exe app from UWP app throught Full Trust?
Can I communicate with win32 app from UWP app throught AppService?
Can I use ALL functions from win32 API (even those that UWP doesn't support) in my win32 app which I launch througth Full Trust?

@Alkanores Yes you can do that and it will work

I ask again just in case.

Can I launch win32 exe app from UWP app throught Full Trust?
Can I communicate with win32 app from UWP app throught AppService?
Can I use ALL functions from win32 API (even those that UWP doesn't support) in my win32 app which I launch througth Full Trust?

@Jaiganeshkumaran

@Alkanores Checkout this article for using full trust access on UWP, I think using this method you can use most of the win32 Api's
https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-1/amp/?__twitter_impression=true

@Alkanores Checkout this article for using full trust access on UWP, I think using this method you can use most of the win32 Api's
https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-1/amp/?__twitter_impression=true

And how I can communicate between uwp app and win32 app?

@AathifMahir thanks!


fix segfault on terminate

pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_state_type);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &old_state_type);
and use pthread_testcancel(pthread_self()) to set cancel point.
i should anyway add
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_state_type); and pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_state_type); to protect critical sections (to avoid that it will exit without releasing a mutex, for example) so basically the code would be the same as now but with PTHREAD_CANCEL_DEFERRED instead of PTHREAD_CANCEL_ASYNC, so i don't see any benefit to use PTHREAD_CANCEL_DEFERRED in this case, it would be just slightly slower to terminate.

about atomic, it is needed because of (for example) this case:
pool_main_thread write status THREAD_CANCELLABLE
the thread that want to terminate pool_main_thread may still read THREAD_INIT and shut down xdag without wait
and if i use the mutex in the the finish_routine there can be a deadlock (so i would need two mutexes)

@sgaragagghu
Could you resolve conflicts?


Art: "Basic" patrons

Pick an animal to represent our basic patron and deliver some 3D art assets for that character
https://docs.google.com/document/d/1YmSmHOAYKzmCU9hBz_QsyhOy-GWBxBwKasGI5-ZyYhw/edit#bookmark=id.kh8wyr29fx3q

Refer to the GDD section 5.2, or refer to the "Sphere Patron" prefab, for more information on creating new patrons in Unity.

Bumping this up to "Feature" level, as having visually distinct patrons is important to gameplay


[TE] frontend - aaronucsd/Added new shared summary email feature

Summary:
Allow for a share feature from the dashboard. THe user can export the shared summary as pdf,
copy to clipboard and share a snapshot link. There is a way to hide metric and alert level from the final shared content.
The shared feature allows for high level comment and metric level comments.

fixed Wow to be predicted instead on dashbaord and shared summary
Added new ember data for shared summary
added new libs to support PDF download
added cryptojs for hash support

Added new route and controller unit tests for home/share-dashboard


RN 0.57.x Bundled large images have low quality when viewing using  component with 1:1 AR on Android

[✔] Review the documentation: https://facebook.github.io/react-native
[✔] Search for existing issues: https://github.com/facebook/react-native/issues
[✔] Use the latest React Native release: https://github.com/facebook/react-native/releases

Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
Memory: 111.21 MB / 12.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.9.0 - /usr/local/bin/node
Yarn: 1.9.2 - /usr/local/bin/yarn
npm: 6.2.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.1 => 0.57.1
Description
There is really low quality when loading large bundled images even when using resizeMethod="resize". This happens only on Android, not on any iOS simulator/device. Have tested it on Android 8.1 emulator and LG G6 with Android 8.0. Please see the screenshots bellow.

At the left screenshot we see the exact same code running with RN 0.56.0 and at the right screenshot we see RN 0.57.1. The code is just a simple image <Image source={require('./assets/ELHall1.png')} resizeMethod="resize" /> and the image size is 2111 x 4645 pixels. Both projects are fresh installed using react-native init RN057ImageTest and react-native init --version="0.56.0" RN056ImageTest
Reproducible Demo
It's the initial App.js with the <Text/> components commented and an <Image/> component added.
...
type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        {/*<Text style={styles.welcome}>Welcome to React Native!</Text>
        <Text style={styles.instructions}>To get started, edit App.js</Text>
        <Text style={styles.instructions}>{instructions}</Text>*/}
        <Image source={require('./assets/ELHall1.png')} resizeMethod="resize" />
      </View>
    );
  }
}
...

After converting the PNG image to JPG, it renders just fine in full quality. Digging a little bit further, and reading about resizing mode at http://frescolib.org/docs/resizing.html, I read that resizing method has a limitation:

Resizing has some limitations:
it only supports JPEG files

I don't know if this is related with PNG, but it works using PNG images in RN 0.56.0.

@clytras I have same issue with remote images.
I also try fast image but it's also low quality.
I'm using JPEG images and it's not fixed.
My React-Native version is 0.57.1
/CC: @DylanVann

I'm also seeing this issue in an application I'm working on. Using the RN Image component, I'm displaying a large .png image has actual dimensions larger that the screen, with the Image component resized to display within the screen's boundaries. The .png image displays, but at incorrect, low-quality, visibly pixelated resolution, on Android.
This bug does not occur on iOS. On Android, when I downgrade the app to React Native v.0.56, this bug also does not occur.

same issue with RN 0.57.2 on Android

Any plan to fix this? It's really annoying :disappointed:

This bug still exists in RN 0.59.0 and of course in the previous versions RN 0.58.x.

also in 0.59.1

Change to plan B, use WebView
... <WebView   originWhitelist={['*']}   source={{html: renderHtml(this.props.source)}} /> ... function renderHtml(source){   returnagan-chart}

@callcter there are some workarounds to this one like using a WebView or FastImage component or to replace the PNG image with an other format like JPG. This is a bug/issue started with RN 0.57.0 when then added a new metro bundler version/features. Best guess is that the bundler fetches a smaller/compressed/resized version of the image which is related to Fesco lib, the library that RN uses to handle images for Android.

FastImage is related to Glide and with error:
"Canvas: trying to draw too large(111720960bytes) bitmap"
@clytras

also in 0.59.3

@cpojer Any plan to fix this?
This issue really decrease my app quality anyone ask me why your image still buggy and I haven't any answer for this? :disappointed_relieved:

react-native-fast-image  v4.0.14 works fine but since v5.x it is broken.

react-native 0.59.5 encounter the same issue with local and remote .jpg images too 😂

react-native-fast-image v5.3.0 works for me 😂

react-native-fast-image v5.3.0 works for me 😂

@glacjay FastImage does not support local bundled images: https://github.com/DylanVann/react-native-fast-image/issues/248

@glacjay FastImage does not support local bundled images: DylanVann/react-native-fast-image#248

@clytras fortunately (or unfortunately) our projects doesn't use local bundled images 😂 so react-native-fast-image should be enough for me ... except that I need to change A LOT OF Images by FastImages 😂

Hey, this is Daniel from the Fresco team.
From the initial issue description it seems that the behaviour changed between 0.56.0 (June 2018) and 0.57.1 (Sep 2018). During this time the dependency of Fresco wasn't upgraded in ReactAndroid/build.gradle or ReactAndroid/gradle.properties. Only the OkHttp3 dependency was updated which seems unrelated.
For debugging, it would suggest to enable logging to logcat here:
https://github.com/facebook/react-native/blob/8d5ac8de766b9e435cbfa9bfa6b8a2b75b0e2a19/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/FrescoModule.java#L96-L114
You can follow https://frescolib.org/docs/listening-to-events.html under RequestListener on how to register the RequestLoggingListener which will dump all information to logcat. That would be helpful for deciding whether this is caused by Fresco or some other change.

How to reproduce this bug here as minimum example:

update create-react-native-app to the latest version:

node.js: 10.15.3
npm: 6.9.0
yarn: 1.16.0
create-react-native-app: 2.0.2

create-react-native-app TestImage

template: blank

App.js:

import React from "react";
import { Image, Dimensions, Text, View } from "react-native";

export default class App extends React.Component {
  render() {
    return (
      <View>
        <Text>Open up App.js to start working on your app!</Text>
        <Image
          source={{
            uri:
              "https://wagonsclub.oss-cn-beijing.aliyuncs.com/static/carousel/carousel1_bg.jpg"
          }}
          style={{ width: Dimensions.get("window").width, height: 1000 }}
        />
      </View>
    );
  }
}

yarn start
run on my android device (1+5):

is there a fix to this problem? i cant seem to find a workaround.
using rn 0.59.0

issue not fix on rn 0.59.8

Until today do I notice that create-react-native-app is deprecated...
So, here is the new minimum example project to reproduce this issue, created by react-native-cli v2.0.1, with the latest version of react and react-native. I'll try to keep it up to date until it's been solved.

Come across a temporary fix for my online project (not the example project above) for some cases, by remove some blurred images' borderRadius style. Hope it's helpful for someone.

I came across this issue as well.
Was working prior to v0.57. I'm now on v0.59.
In particular I was trying to render my image inside a ScrollView.
However I dont think that makes a difference from what I am seeing from others here as well.
My work around was to simply cut up my large image into smaller sections and have then render underneath one another.
As a bonus performance improvement, I then switched to using a FlatList which will only load  the corresponding image portion as the user is scrolling.
For reference, my image resolution was: 1154 x 3838
Afterwords, I cut the image in PS into 3 even parts.
Then just render:
<Image source={ imgPart1 } />
<Image source={ imgPart2 } />
<Image source={ imgPart3 } />

I know this may not be a applicable solution for others but might be worth checking out.
Hope this helps.

update example project to react-native v0.60.3 and the problem remains

any plan to solve this proble?

Why is this not fixed. My images look like garbage

This problem still exist in 0.59.9
Has anyone found out what is maximum dimensions that we can use before it begins to look blurry?

@OriginLive React and React Native are community driven and everybody can contribute. I've spent some time trying to debug and solve this problem, but with no results. There are some workarounds that you can do like using JPEG images, or using other components to display the images. Of course we all hope someone with the knowledge and time will pick this issue here and solve it for good.

This problem still exist in 0.60.4

React Native use Fresco to render images on Android, and every props passed to Image component will be passed to Fresco. So it's not really React Native issue. Anyone interested can work on Fresco to land the feature.

@dulmandakh I think where the issue belongs to still remains uncertain, see https://github.com/facebook/react-native/issues/21301#issuecomment-486620268
Better reopen this until there is a clear conclusion

I just tried to narrow the version range. Now I can confirm that the issue was introduced between 0.56.1 and 0.57.0-rc0

@dulmandakh you shouldn't have closed this. We have comments from @lambdapioneer from Fresco team here. You got this wrong, please read my initial post again, as this is not a FEATURE request, this is a BUG, a bug that didn't exists before 0.57 at least.
You just closed an existing RN bug, why? To reduce the issues number? Anyway, maybe you know better than all the people here.

@lambdapioneer Actually I found a fresco version bump https://github.com/facebook/react-native/commit/b6f2aad9c0119d11e52978ff3fa9c6f269f04a14

We cannot downgrade fresco version, and it's not supported in Fresco. If
Fresco adds support for it, I would happy to review and help to land it in
RN.

react-native-fast-image v5.3.0 works for me 😂

@glacjay FastImage does not support local bundled images: DylanVann/react-native-fast-image#248

Now,react-native-fast-image support local bundled images
<FastImage          style={{ width: MyTheme.width, height: MyTheme.width/1080*8100 }}          source={{ uri: Image.resolveAssetSource(require('../images/user_guide.jpg')).uri, cache: 'web' }}         resizeMode={FastImage.resizeMode.cover}         />
react-native: 0.60
react-native-fast-image: 7.0.2

#rant_begin
@dulmandakh if RN can't support things that where working and break them just like this and with no documentation and by end devs/users discovering them, then RN should get rid of these components from the core and transfer them to external repos like Geolocation and Async storage, because those components obviously can't be supported by RN itself. I believe you get the picture.... something now working like this and suddenly in the next version not working, and on top of that, contributors and collaborators tell end users that it's not RN fault, but other libraries that RN uses (from the same domain/org BTW, Fresco is Facebook OS). What do I suppose to do now? Go at Fresco repo and open an issue there? Really? You could do that yourself instead of just closing this.
#rant_end
@sunnylqm thanks for tracking down this issue and confirming my initial culprit. It's a bit obvious that Fresco is the problem here and now we know it for sure.
@zhuweideng thanks for letting people here know that FastImage now supports bundled images. I'd prefer an OOB way to handle large images because Image component exists and things where working until some point.

@clytras (Unfortunately) that's how oss works. You get both benefits and risks. Ask and wait and provide whatever you can provide, or just do it yourself, or walk away. Please stop blaming anyone working for this project.

@sunnylqm I am working to OSS projects myself and I know exactly how things work, please check my previous comment here https://github.com/facebook/react-native/issues/21301#issuecomment-516320519:

React and React Native are community driven and everybody can contribute. I've spent some time trying to debug and solve this problem, but with no results.

My rant is not for the nature of the OOS and that no-one picked this up to fix, besides please look the date that I committed the issue... it's almost a year ago. Since then please find a single comment that I complaint that contributors and collaborators do not do anything here. I don't think you'll find any. I'm frustrated about the fact that people just close an issue that is still there, that still exists. We have a problem here gentlemen and what do we do? we go and close the issue with no further actions. Well yes, the least I can do is to blame someone.

In Chinese we say "You are blessed if others help you, but they are not obliged to."
I also feel frustrated that how rn core team deal with issues (one-year-issue just can not get a name in the list), but I fully understand and I can see that they are improving. I can say that "contributors and collaborators do not do anything here" is NOT true because there was a member from fresco team commented here (though he missed the point), which is very rare in this repo believe me.
Everyone have their problems, and yes they can not blame anyone who does not owe them anything. You have the right to ask for help anytime anywhere in any mannerly way, and feel lucky if someone do.
P.S I am on holiday but still busy working. I got notification so I came here and spent some time to help debugging. I was planning to open an issue in fresco repo but I think I need a minimal example using different fresco version to demonstrate but I really have no time at present. And after all why should I do this?

@sunnylqm please, you got it wrong. I forgot to add a question-mark at the end of that:

Since then please find a single comment that I complaint that contributors and collaborators do not do anything here. (?)

What I mean there is that I DO NOT complaint about anyone here. I know that contributors and collaborators like you and @lambdapioneer working to make React and React Native better and we are all thankful for that. But when I think something is wrong I will tell/write about it. You call it as you like, OOS nature, disrespect, but I'll do it. I'd do it even if Mark Zuckerberg himself came here and close this issue. I have nothing personal to anyone, not you not @lambdapioneer. I explained what bothers me.
I never said that you are obligated or you have to go and report the issue at Fresco lib, I said that @lambdapioneer should have done that himself before he closed this but that is my point of view and I don't think I insult anybody by making that statement. So please don't go and report this bug at Fresco repo, I'll do it myself when I'll come back from my vacations.

Sorry for my misunderstanding. But you also got the wrong person, it's not @lambdapioneer who close this issue. Although I agree this issue should remain open, I understand the point that this is not directly related to RN and hence closing it is reasonable. If you want to argue, you better make a revert pr to discuss there. Anyway, I think this thread is done and further discussion should go to fresco repo and I'll follow there.

Yes, my bad! I'm sorry @lambdapioneer my rant does not go to you, but to @dulmandakh that closed this issue.
@sunnylqm I'll create an issue at Fresco next week when I'll return to my office. We can all discuss there about that issue and maybe finally fix it. Again thanks for helping track this down.

I contribute to RN on my spare time, and I had a time that I was creating
issues and waiting to be fixed. Some were fixable in RN, some others don't.
I found that issues that are related to third-party modules makes issue
tracking harder because we cannot do anything about it in RN. There are too
many third-party modules and we cannot keep track of them all. This is
s the reason I closed the issue and suggested to file in Fresco. Thank you

No worries :) no offense taken. I understand that it can be very frustrating when infrastructure breaks and the issue appear to be ignored and/or falls between the cracks.
@sunnylqm thanks for finding that version bump and confirming that the breaking change is associated with a particular Fresco change. That should help pinning down the underlying issue. Not sure how I missed that commit.
I assume it's related to how Fresco scales downs (sub-sampling) large images (which is an important feature for memory and performance concerns). There has been some changes in these area during that time mainly for removing native code dependencies to help reducing the also pressing .so unsatisfied link errors. So to say: it might be a side-effect of another large improvement.
Disclaimer: I no longer work at Facebook. I'll quickly link @oprisnik here who should be able to assign this accordingly :)

I'm just wondering why we can't keep this issue open until it's been fixed. Does the count of open issues matter so much?
And there are so many issues had been closed not because it's been confirmed been fixed, but just because there is no one commented for a while. Can't understand quite well.

@glacjay  The count of open issues matters simply because human can not read too much.  Imagine how would you deal with 5k+ issues? Where to start? You just get drowned.
Of course I agree sometimes it's ironic if people response with +1 it'll be locked ("too heat)", or no response it'll be closed ("inactive").

So I think we need a better issue management tool instead of just closing unfixed issues :-)

I am new to React Native and facing the same problem. Is there any solution yet?

@thnayan69 What is your react native's version? What are the dimensions of the images that you are using?

The discussion/workarounds are moved to https://github.com/facebook/fresco/issues/2397

@gorvinsky here's the details

react-native-cli: 2.0.1
react-native: 0.61.4
image size: 960*960

Just adding my 2 cents:
React Native (and therefore Expo) handles images in Android using @2x / @3.
So, just copying and renaming my image to<EMAIL_ADDRESS>and<EMAIL_ADDRESS>the rendered image quality was much better (not HD so, but, well, it wasn't blurry and it's readable).
Also, I used JPEG instead of PNG, as PNG looked really aliased for the same image quality with Android.

This issue still seem to exist in RN 0.64.0 with android. Changing from png to jpeg is a fix that works but doesn't make me happy 😕

I've had this issue for 2 years now and have just upgraded my projects to latest version of React and it's still happening. I can only solve it by only using images with both sides under 2048 pixels.  Anything bigger on either axis and it goes blurry. Most annoying bug ever.

I faced a similar problem ( https://github.com/facebook/react-native/issues/32031 ), but it seems the reason is the same as discussed here.
In the onload method, I get a smaller size than it actually is ...
Isn't there a solution yet?

This issue still happening on the latest React Native for me and all of the solutions haven't worked.

@pateljoel best solution for me was to use androids native image viewer. Of course that exposes downloading etc but it can be slightly customized natively.

@evanjmg hey is there any link to the android native image viewer you are talking about does it support RN? Could you clarify?

Why this issue is close? It is still a bug here.

I ended up using webview as it displays images as is.
<WebView     source={{ html: `<img src=${image_url} style="width: 100%;" />` }} />
It works for my usecase.

Still running into this as well

Still running into this as well
at the moment there are only 2 solutions:
1 - use react-native-fast-image instead of Image
2 - use WebView as shown above

There are no more normal solutions yet

converting to jpg workd

converting to jpg workd

no, the problem is not related to the format, but to the size.
In my case it is reproduced and JPG too

Yes, it happens with all images if either side is over 2048 pixels.
Sent from my iPhone

On 7 Apr 2022, at 08:14, valery-lavrik @.***> wrote:

converting to jpg workd
no, the problem is not related to the format, but to the size.
In my case it is reproduced and JPG too
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.

I don't understand why react-native developers don't do anything about this?

Still happening on 0.66.3 with a 3000x170 .png

I noticed that in horizontal orientation the quality is much better

an even weirder behavior is that the last time when I convert png to jpg, the problem was gone. Recently our designer updated those images,  and jpg stopped working as well.

@JoshuaGross    maybe you can tell me what to do? the problem is very serious, but no one is doing anything about it

So, just copying and renaming my image to<EMAIL_ADDRESS>and<EMAIL_ADDRESS>the rendered image quality was much better (not HD so, but, well, it wasn't blurry and it's readable).
Also, I used JPEG instead of PNG, as PNG looked really aliased for the same image quality with Android.

Have you tried this?

I don't think it will work because I open the images using a link from the Internet...
<Image source={{  uri: 'https://reactnativecode.com/wp-content/uploads/2017/05/react_thumb_install.png' }}/>

So, just copying and renaming my image to<EMAIL_ADDRESS>and<EMAIL_ADDRESS>the rendered image quality was much better (not HD so, but, well, it wasn't blurry and it's readable).
Also, I used JPEG instead of PNG, as PNG looked really aliased for the same image quality with Android.

Have you tried this?

I don't think it will work because I open the images using a link from the Internet...
<Image source={{  uri: 'https://reactnativecode.com/wp-content/uploads/2017/05/react_thumb_install.png' }}/>

@valery-lavrik Hello, did you manage to find a solution to your problem? I'm having the same problem as you, trying to render an image with a large height, but it doesn't get the right size.

@tarcisioandrade
The only way I've found is this. Not very nice, but it works
https://gist.github.com/valery-lavrik/11c2c1c3cb03918e1fb14fbb156945eb

@tarcisioandrade The only way I've found is this. Not very nice, but it works https://gist.github.com/valery-lavrik/11c2c1c3cb03918e1fb14fbb156945eb

@valery-lavrik Does this code cut the large image into pieces?

That's the kind of image I'm trying to render.

@tarcisioandrade
Yes, that's exactly what this code does.
And it is these images that I also show in my application. You can see an example of this implementation - https://lavrik.site/
There are a lot of very large images in this comic book reader. I often have to cut them into pieces

I saw it, but I noticed that in large images the scroll doesn't look very good with the slide, I think I'll render with webviews anyway :(

@tarcisioandrade
I don't have any problems with scrolling... Externally, a sliced image is no different from a simple one.
The option with rendering in webview does not suit me because I need to specify headers to upload images.

How is this STILL a problem???? I can't convert to jpg because I need the alpha channel

This is a result of using the Fresco image library under the hood, and I tried to provide some customization for this in #44803. Lemmie try to dive in and provide some context.
Some background
There are two problems afoot that have been smashed into one here: one is the result of aliasing issues (as is the case in the example provided here) and the other is the general blurriness that people see when using a particular prop resizeMethod (as is the case from the example provided here).
React Native has a prop on Android, resizeMethod, which lets you control how Fresco determines its own resizing mechanism. In Fresco's documentation, there's a few paragraphs that cover the differences between the mechanisms and which you should be reaching for:

If the image is not much bigger than the view, then only scaling should be done. It’s faster, easier to code, and results in a higher quality output. Of course, images smaller than the view are subset of those not much bigger than the view. Therefore, if you need to upscale the image, this should too be done by scaling, and not by resizing. That way memory won’t be wasted on a larger bitmap that does not provide any better quality. However, for images much bigger than the view, such as local camera images, resizing in addition to scaling is highly recommended.

As for what exactly “much bigger” means, as a rule of thumb if the image is more than 2 times bigger than the view (in total number of pixels, i.e. width*height), you should resize it. This almost always applies for local images taken by camera. For example, a device with the screen size of 1080 x 1920 pixels (roughly 2MP) and a camera of 16MP produces images 8 times bigger than the display. Without any doubt resizing in such cases is always best to be done.

Let me place emphasis on this part: if the image is more than 2 times bigger than the view (in total number of pixels, i.e. width*height), you should resize it
There are three resizeMethod options: scale, resize, and auto. When you don't set resizeMethod, React Native will
default to auto make the choice for you based on the image type: local images get set to resize and network images get set to scale. Scaling can result in antialiasing issues such as this one (notice that the image is pulled from network).
When you apply the resizeMethod of resize to an image, Fresco will take your source image, take the dimensions you wish to scale it to, and find a power of 2 closest to those dimensions. In memory, Fresco converts the source image to the resultant bitmap and renders it. So, if your source image is 1000x1000 but you want to render that image in a 150x150 box, Fresco scales the image down to 250x250 and passes it off to Android to take care of the rest. This is a bit more computationally expensive, but the resultant images are generally better looking.
There's a technique of resizing that Fresco can apply called downsampling. Rather than taking a power of 2, it can take a multiple of 2. This technique is only applied to JPG images, hence you see slightly better results from JPG in examples like this. Calling back to our previous example, our source dimensions of 1000x1000 can be scaled down 6x to 167x167 (Fresco rounds up). Rather than using 250x250, the resultant dimensions of 167x167 are much closer to the desired 150x150.
Finding a(n imperfect) solution
I've tried to remain concise on what React Native is doing, but you're probably more interested in how to fix this. Fresco isn't a perfect solution here. It applies really basic mechanisms for resizing and scaling images on the client that aren't perfect for every use case. First and foremost, I highly recommend producing images as close as possible to the destination sizing. If you can convert your 1000x1000 image to 150x150 ahead of time, this is less work for every client. It's important to recognize that different devices have different pixel densities, so on higher-end devices that 150x150 is actually 300x300 or 450x450. This is why React Native supports the @2x and @3x suffixes as outlined in documentation here. As long as the file names are consistent, React Native will always pick the best image for the pixel density of the device for you.
If you're going to render images served from the network, try fetching them in your desired destination resolution too. You can determine the "true" resolution of an image using React Native's PixelRatio.getPixelSizeForLayoutSize. It's a common, recommended practice to let your server apply resizing and you can reduce the computational overhead of manipulating bitmaps on the client.
If you still want the device to do resizing for you, but your resultant images are blurry, you can tweak the quality of the image with a bit more Fresco customization. Apply a combination of resizeMethod="resize" and resizeMultiplier as outlined in #44803 and the source image you're trying to change the size of will not downsample all the way but will let Android scale the image from a larger dimension. So, back to our 1000x1000 image as a PNG. Let's say you want to scale down to 30x30. If you use resize on its own, the image gets downsampled down to 32x32 (31.25 rounded up). This can result in extreme quality loss. However, if you set your resizeMultiplier to 2.0, then the image is only downsampled to 63x63 (62.5 rounded up). The hardware layer, with a bit of aliasing, will take care of the rest.
Every use-case is different, every solution is different. It's important to find the best solution for your needs. Resizing on the client every time is computationally expensive, but resizing once ahead of build-time is quick. Hope this helps a bit!

@Abbondanzo there are so many use cases that people want to use the original and actual size of the image, like when creating an interactive map (without messing with tiles hell etc.), zooming images without loosing quality, game and parallax backgrounds and the list can get bigger. IMO it's not a good thing for a library or a framework to enforece such optimizations without giving the option to the devs to eliminate such configurations and behaviours.
resizeMethod never worked for this issue, it was completely ignored regarding image downsampling. The only solution was to link Fresco from source, fix the issue by disabling downsample inside Fresco downsampling code and then complile Fresco to use with the app like mentioned here https://github.com/facebook/fresco/issues/2397#issuecomment-562118635, https://github.com/facebook/fresco/issues/2397#issuecomment-575646816, https://github.com/facebook/fresco/issues/2397#issuecomment-584210567.

Fresco isn't a perfect solution here.

I'd argue that, I believe Fresco is a very good image processing library for Android and it does a good job, IMO it's that it should allow people to customize using options when using optimizations and opinionated techniques.

resizeMethod never worked for this issue, it was completely ignored regarding image downsampling.

Downsampling should have been a new resizeMethod altogether. Unfortunately, the downsample mode (currently) can't easily be configured on a per-image basis.

I'd argue that, I believe Fresco is a very good image processing library for Android and it does a good job, IMO it's that it should allow people to customize using options when using optimizations and opinionated techniques.

Fresco is a great image processing library but not one-size-fits-all in every case. It does a decent job at rendering images provided a dimension but isn't designed to service some of the use cases you've provided, particularly in conjunction with the limitations set by ReactImageView. There's a higher incentive to craft assets fitted to exact uses, across multiple dimensions (and part of the reason why the Image component supports source sets). Forwarding that work to the client, whether it comes in the form of downloading a larger image over network or the processing time it takes to perform a resize, should be avoided if possible.
I'd love to open it up for further customization, and I'm all ears for ideas. The FrescoModule that React Native publicly exports lets you set your own ImagePipeline or ImagePipelineConfig and, one step further, the MainReactPackage takes an ImagePipelineConfig if you want to customize it even further. Since these settings are entirely Android-specific and set at the beginning of the application lifecycle, they don't make much sense as Image component props. Most of the defaults are sane (with the exception of the downsampling mode, that's being fixed) but if there are other optimizations or techniques that Fresco does haphazardly, we should fix 'em!

Downsampling should have been a new resizeMethod altogether. Unfortunately, the downsample mode (currently) can't easily be configured on a per-image basis.

Exactly, and that's why it can't work using resizeMethod per component as you suggested above.

Fresco is a great image processing library but not one-size-fits-all in every case. It does a decent job at rendering images provided a dimension but isn't designed to service some of the use cases you've provided, particularly in conjunction with the limitations set by ReactImageView. There's a higher incentive to craft assets fitted to exact uses, across multiple dimensions (and part of the reason why the Image component supports source sets). Forwarding that work to the client, whether it comes in the form of downloading a larger image over network or the processing time it takes to perform a resize, should be avoided if possible.

You are missing the point of consistency. The behaviour on iOS is different. This issue does not happen on iOS when using the RN stock <Image/> component. If we have a platform to support multiple devices using the same code/components/libraries, then that platform must ensure the consistent behaviour accross devices when using stock and built-in components. Fresco is a Meta project, that even though it's not bound to RN directly, it was originally made to feed the RN needs. Somewhere near 2018 (RN 0.56), they made image downsampling the default behaviour and they break that cross platform consistency.
The assets and images may be bundled inside the app, and I agree with you that large image sizes should be avoided, but if the use cases need such assets, then the platform must easily allow the developers to use such big assets, which wasn't the case here.

I'd love to open it up for further customization, and I'm all ears for ideas. The FrescoModule that React Native publicly exports lets you set your own ImagePipeline or ImagePipelineConfig and, one step further, the MainReactPackage takes an ImagePipelineConfig if you want to customize it even further.

Unfortunately that is not the case for image downsabling. We cannot alter that configuration using ImagePipelineConfig. We tried that in the past and it never worked because the downsabling flag was not connected within Fresco.

Since these settings are entirely Android-specific and set at the beginning of the application lifecycle, they don't make much sense as Image component props. Most of the defaults are sane (with the exception of the downsampling mode, that's being fixed) but if there are other optimizations or techniques that Fresco does haphazardly, we should fix 'em!

I think you are wrong here. RN does have dozens of platform specific component properties (to name some capInsets > iOS, fadeDuration > Android, onPartialLoad > iOS, progressiveRenderingEnabled > Android).

You are missing the point of consistency. The behaviour on iOS is different. This issue does not happen on iOS when using the RN stock <Image/> component. [...] Somewhere near 2018 (RN 0.56), they made image downsampling the default behaviour and they break that cross platform consistency.

iOS does its own downsampling too (source), so I believe that the intention was to bring Android's performance and approach to image rasterization inline with iOS here. It's just that downsampling isn't working as initially intended. Being prescriptive of optimizations or enhancements clearly didn't work in this case, so until that gap can be closed, it's best to disable the behavior and make it opt-in.

Unfortunately that is not the case for image downsabling. We cannot alter that configuration using ImagePipelineConfig. We tried that in the past and it never worked because the downsabling flag was not connected within Fresco.

The 3.2.0 version of Fresco has a new flag to disable downsampling outright, thanks to @sunnylqm's work. It can be manually configured if you wanted to set up your own pipeline config in the application, in the same spot you'd normally build the auto-generated PackageList. I've just spent a good while reading through all the comments in https://github.com/facebook/fresco/issues/2397 so your code snippets are right on the money. And I'm going to try my best to get https://github.com/facebook/react-native/pull/45078 merged soon so this change is automatically made for everyone.

RN does have dozens of platform specific component properties

Yep, and those are all useful for their various purposes, but the pipeline config is created while the React Native Host is being spun up. It's not something that can be tweaked on a per-image basis, that's where the ImageRequest from Fresco comes in. My intent was to call out that any modifications to the image pipeline config should happen in native code and there's really no room to push them into component props.

iOS does its own downsampling too (source), so I believe that the intention was to bring Android's performance and approach to image rasterization inline with iOS here. It's just that downsampling isn't working as initially intended. Being prescriptive of optimizations or enhancements clearly didn't work in this case, so until that gap can be closed, it's best to disable the behavior and make it opt-in.

I don't doubt that is does, but the images don't get any visual transformation at all, so here relies the issue with Android and iOS inconsistency. What you see in my OP of this issue does not happen on iOS.

The 3.2.0 version of Fresco has a new flag to disable downsampling outright, thanks to @sunnylqm's work. It can be manually configured if you wanted to set up your own pipeline config in the application, in the same spot you'd normally build the auto-generated PackageList. I've just spent a good while reading through all the comments in https://github.com/facebook/fresco/issues/2397 so your code snippets are right on the money. And I'm going to try my best to get https://github.com/facebook/react-native/pull/45078 merged soon so this change is automatically made for everyone.

Yes, after almost 6 years, in 3.2.0 after @sunnylqm fixed it; providing custom configuration for the ImagePipeline might work, but we didn't have had that back then when this issue appeared, we could not bypass this behavior easily just using configuration, that's my point.
This code that was there was preventing the downsampleEnabled flag to apply or not the downsampling algorithm.
-    if (downsampleEnabled || !statusHasFlag(status, IS_RESIZING_DONE)) {

Yep, and those are all useful for their various purposes, but the pipeline config is created while the React Native Host is being spun up. It's not something that can be tweaked on a per-image basis, that's where the ImageRequest from Fresco comes in. My intent was to call out that any modifications to the image pipeline config should happen in native code and there's really no room to push them into component props.

I know that and I already have agreed with you but still you seem to ignore this:

Downsampling should have been a new resizeMethod altogether. Unfortunately, the downsample mode (currently) can't easily be configured on a per-image basis.

Exactly, and that's why it can't work using resizeMethod per component as you suggested above.

Look @Abbondanzo, you discovered this issue recently and I appreciate the fact that you are eager to help as we all want that issue to be resolved, but keep in mind that we were here "fighting" for this 6 years ago and along those years passed we've done some progress.
This was an issue. Meta closed this issue back in 2019 because they said it was Fresco's issue regarding not handling the props https://github.com/facebook/react-native/issues/21301#issuecomment-520111321. Fresco team kept the issue opened until @sunnylqm commited some fixes that are based on some proposals like this https://github.com/facebook/fresco/pull/2500#issuecomment-1910851549. This means that they recognize this was indeed an issue and we now have better and easier ways to overcome this behavior.

Unbelievable to see multi billion sh** company unable to handle a 6 years old bug affecting millions of users. So easy to transfer respo to third party as usual...

x-posting my update from https://github.com/facebook/react-native/pull/45078

https://github.com/facebook/react-native/pull/46866 was merged and adds a new resizeMethod called none. This maps to the NEVER downsample mode in Fresco on a per-image basis.
I've added documentation regarding this new resize method to https://reactnative.dev/docs/next/image#resizemethod-android with a brief disclaimer about what I've shared here: it can be a footgun that causes runtime exceptions
https://github.com/facebook/react-native/pull/46873 adds a showcase of each of the four resizeMethod to the RNTester app. I'm setting up tests to run against these images to ensure that downsampling is always correctly turned off when this prop is supplied

You can follow along with the release status of this change by checking out the tags associated with 6202319ed544e4d23f1f327ff5334c480af3819d (right now there are none). When you pick up the change in a new release, it should be as simple as using it like this:
<Image
  source={require('./assets/my-large-image.png')}
  resizeMethod="none"
/>

Thank you @Abbondanzo for diving into this issue and providing such a nice solution 🔥
After 6 years we'll have this resolved for good. Better late than never!

x-posting my update from #45078

Add resizeMethod type 'none' to disable downsampling on Android #46866 was merged and adds a new resizeMethod called none. This maps to the NEVER downsample mode in Fresco on a per-image basis.
I've added documentation regarding this new resize method to https://reactnative.dev/docs/next/image#resizemethod-android with a brief disclaimer about what I've shared here: it can be a footgun that causes runtime exceptions
Add example of different resize methods #46873 adds a showcase of each of the four resizeMethod to the RNTester app. I'm setting up tests to run against these images to ensure that downsampling is always correctly turned off when this prop is supplied

You can follow along with the release status of this change by checking out the tags associated with 6202319 (right now there are none). When you pick up the change in a new release, it should be as simple as using it like this:
<Image
  source={require('./assets/my-large-image.png')}
  resizeMethod="none"
/>

You can't imagine how long I've been waiting for this!  how much shit code did I have to write because of this))))

x-posting my update from #45078

Add resizeMethod type 'none' to disable downsampling on Android #46866 was merged and adds a new resizeMethod called none. This maps to the NEVER downsample mode in Fresco on a per-image basis.
I've added documentation regarding this new resize method to https://reactnative.dev/docs/next/image#resizemethod-android with a brief disclaimer about what I've shared here: it can be a footgun that causes runtime exceptions
Add example of different resize methods #46873 adds a showcase of each of the four resizeMethod to the RNTester app. I'm setting up tests to run against these images to ensure that downsampling is always correctly turned off when this prop is supplied

You can follow along with the release status of this change by checking out the tags associated with 6202319 (right now there are none). When you pick up the change in a new release, it should be as simple as using it like this:
<Image
  source={require('./assets/my-large-image.png')}
  resizeMethod="none"
/>

You can't imagine how long I've been waiting for this! how much shit code did I have to write because of this))))

WOOW, Now I don't have to cut my images to pieces anymore 😂

@mnlbox did you find any fix for this issue? I am still stuck with RN 0.56 for now just because of this issue. The sad thing is that noone replies which makes me think this might be a missconfiguration or something related. I also have opened a SO question about this issue with irrelevant answears unfortunately.
EDIT Still there with RN 0.57.8. I'm also surprised how a behavior change such as this one, isn't marked as a bug since there is no documentation of how this type of behaviour changed and how would it work from now on.

It’s still an issue by the looks of things and that’s crazy to me….


enhanced authentication error logging for AWS components

Describe the feature
The coming v1.8 documentation release for AWS components would have better explanation about the correct usage of credentials versus IAM policies and roles.
This issues suggests adding a higher level of log verbosity to all authentication operations done by the AWS component. This might assist users to better understand what went wrong in case they didn't follow correctly through the new documentation
Release Note

RELEASE NOTE: ADD enhanced authentication error logging for AWS components

/assign

@amimimor is there an eta for this issue?

removing assignment due to inactivity


IconButton: New documentation and best practices

Summary

Links

[Jira](link to Jira ticket(s))
[TDD](link to Paper doc)
[Figma](link to Figma file)

Checklist

[x] Added documentation + accessibility tests
[x] Checked stakeholder feedback (e.g. Gestalt designers)

Test is failing leaving for you @ayeshakmaz to review before I disable


update clojure resource proxy to expose 'api'

Update the clojure resource proxy to export all of the resources available under 'api'.  The online documentation should also be updated to reflect this.

Ensure that all resources are protected with paging, etc.

[ ] check pagination by default (limit of 20 for example when no pagination)
[ ] check filtering available.
[ ] check authentication and ACL


Might have to pip random if running in VS code ( Alien Game)

--     For alien game ( https://github.com/CursedGhoul/Alien-Game ) if you run it in VS code you might have to run ( pip install random ) in the console, it would be nice to put that in the read me
@Stari-Div

There is in import random at the top to import it

Closed it under wrong thing


General fixes and updates

Fixed error on lc_gen_nft:
Sometimes sin_tests.ipynb was giving error. Changing the line
    k = np.arange(-times.size // 2, times.size / 2)

to
    k = np.arange(-times.size // 2, times.size // 2)

solves the issue (it ensures that k has an even number of element always.

starting from zero again


components: Fix support for 0-sized flags

This commit goes through and updates support in the various argument
passing routines to support 0-sized flags. A bit of a degenerate case
but clarified in WebAssembly/component-model#76 as intentional.

cc @dicej  as well

I pushed up two test fixes for the failed CI:

One updates make_echo_component to support zero-sized types
The other updates the Lower structure generated by the various procedural macros to guarantee an alignment that matches ValRaw to satisfy assertions in Wasmtime. (probably not strictly necessary but seems better to be safe here)


No way to set a __constant or __local parameters for the kernel

As far as I can see, there is no way to declare a constant/local array parameter for the kernel.
No attributes in the kernel declaration results in an error satin that all pointers must be either __global, __constant or __local.
The docs do not mention anything, and there doesn't seem to be an equivalent attribute for the second and third of the above-mentioned kinds.

I have added the [Local] and [Constant] kernel attribute which you can start using it with latest code and nuget package


Unify helper functions

There are too many copies of functions such as setValuesFromJSON. They should be unified into one file that all the executables can use.

Fixed with the move to cpp bcbf4adff3c93ea7fe4dd197d8ab9ee962cab362


:D server crash ticking block

latest.log
crash-2024-03-11_18.55.57-server.txt
debug.log

and + crash
crash-2024-03-11_18.57.44-server.txt

issue of ic2 itself

How can you disable multithreading on blocks from IC2? It’s just that the mod doesn’t have the source code, so it’s unlikely to be fixed. But there is an API, but I don't know how to use it.

I just have the server itself on IC2 classic as the main mod so there is no way to delete it


Context: Fix variable scoping issues for Eval

Previously, Context.Eval relied on Zend's zend_eval_script function for executing arbitrary strings. Unfortunately, the above contains a curious bit of functionality where the string passed is prepended with a return statement depending on whether or not a zval is passed for writing the return value.
This, of course breaks all but the simplest scripts, as we always write the return value to a zval (whether the user calling Context.Eval is to use the return value is another matter entirely).
This commit changes the implementation to a more direct (and therefore more controllable) approach. Some tests have been changed to cover this bug.

This closes #15.


Security & Compliance Center replacement

All instances to Security & Compliance PowerShell or applicable/Applicable values to Security & Compliance

Docs Build status updates of commit b01b38c:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/docs-conceptual/app-only-auth-powershell-v2.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/basic-auth-connect-to-scc-powershell.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/connect-to-scc-powershell.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/exchange-cmdlet-syntax.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/exchange-online-powershell-v2.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/find-exchange-cmdlet-permissions.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/index.yml
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/scc-powershell.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/toc.yml
:white_check_mark:Succeeded
View (exchange-ps)

exchange/docs-conceptual/v1-module-mfa-connect-to-scc-powershell.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Add-ComplianceCaseMember.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Add-RoleGroupMember.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Add-eDiscoveryCaseAdmin.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Connect-ExchangeOnline.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Connect-IPPSSession.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Delete-QuarantineMessage.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Enable-ComplianceTagStorage.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Enable-OrganizationCustomization.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Execute-AzureADLabelSync.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Export-FilePlanProperty.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Export-QuarantineMessage.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-ActivityAlert.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-AdaptiveScope.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-AppRetentionCompliancePolicy.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/Get-AppRetentionComplianceRule.md
:white_check_mark:Succeeded
View (exchange-ps)

This comment lists only the first 25 files in the pull request.
For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


"generate images"  not executed from within interactive docker

When running interactively, the generate-images ant target is not executed, since it has the if="${docker}" condition. Is it possible to signalize that the ant target is called from within an interactive docker shell? If so, this should be added to the README.

Ah, just realized that calling ant generate-images -Ddocker="true" from within an interactive docker shell, works fine.


Enhancement: Parallelogram

As a block-scheme master, I need to have a parallelogram to create schematic input data.

Do we have this possibility on the excalidraw?
If not we can add an additional point on the rectangle to configure the tilt angle (the orange point on the screen below).

What we can do now is this: https://excalidraw.com/#json=5647891951517696,f4xx9ivsDt2jMStnfw2VGg

It's possible to create it via lines (with sharp conerners): https://excalidraw.com/#json=6325810277384192,qba6KkIlHPLJMq2xFg09gw
You can then add this shape to your library and use it in other diagrams.

Looks usable, thanks.
I think this shape should be added to the community prebuilt common library (https://github.com/excalidraw/excalidraw/issues/1923).
But this topic can be closed.

https://excalidraw.com/#json=5647891951517696,f4xx9ivsDt2jMStnfw2VGg

Note that this may overwrite your entire series of tabs that have an Excalidraw project open


Incorrectly-decoded characters when parsing non-ascii characters from source PDF

I've found a PDF where a title containing an 'ö' gets decoded into '€ o'. This is when I use the 'api/processHeaderDocument' endpoint with no additonal headers. Am I missing anything RE: configuration headers for character encoding (or similar) or is this simply a bug (or potentially a specific issue in this PDF, see below)?
See attached for the PDF which generates the following XML excerpt:
<titleStmt>
    <title level="a" type="main">P.-O. L € owdin and the International Journal of Quantum Chemistry: A Kaleidoscopic Agenda for Quantum Chemistry</title>
</titleStmt>

where the title as rendered in the PDF is 'P.-O. Löwdin and the International Journal of Quantum Chemistry: A Kaleidoscopic Agenda for Quantum Chemistry'.
N.B:
Interestingly, when I copied that title directly from the PDF when opening it Preview on macOS, I get the string 'P.-O. Lo€wdin and the International Journal of Quantum Chemistry: A Kaleidoscopic Agenda for Quantum Chemistry'. This is obviously different to how Grobid is decoding the text (i.e. the '€' character is after the 'o' rather than before it as with Grobid), but it might be related.
NON ASCII-Manuscript.pdf

Hello @danielrbrowne !
This error is usually always coming from embedded font in the PDF with custom encoding. The unicode for € is actually used by the embedded font to refer to a glyph which is (visually) the diaeresis ¨, so not the right unicode character code. As a consequence, the extracted character is the correct unicode character for this code, but not the character corresponding to the referred glyph.
For instance doing:
lopez@work:~$ pdffonts  ~/Downloads/NON.ASCII-Manuscript.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
MFAMCJ+AdvOTee640837.B               Type 1C           Custom           yes yes yes     14  0
MFAMAE+AdvPSMySB                     Type 1C           WinAnsi          yes yes no      33  0
MFAMAF+AdvP4C4E59                    Type 1C           Custom           yes yes yes     10  0
MFAMAG+AdvMyriad-RS                  Type 1C           Custom           yes yes no       8  0
MFAMBG+AdvMyriad-IS                  Type 1C           WinAnsi          yes yes no       9  0
MFAMBH+AdvP80516                     Type 1C           Custom           yes yes yes    135  0
MFAMBI+AdvMyriad-BS                  Type 1C           WinAnsi          yes yes no      13  0
MFAMHJ+AdvULTSO-S                    Type 1C           WinAnsi          yes yes no      11  0
MFAMHI+AdvULTS-S                     Type 1C           WinAnsi          yes yes no      12  0
MFAPDI+AdvPSMySBI                    Type 1C           WinAnsi          yes yes no      69  0
MFBEDI+AdvP4C4E74                    Type 1C           Custom           yes yes no      95  0

The title text uses AdvPSMySB font so a WinAnsi encoding, and unicode is matching the glyphs code, everything fine as it should always be. But the diaresis character uses the font AdvP4C4E59 with custom encoding, so bad luck the code is not valid unicode, it's just for referencing an embedded glyph...
The fact that some tools will then put the  ¨/€ before or after the o is a bit random, actually the coordinates locate the two characters at the same place (there are combined to create the ö normally). With GROBID it follows the actual PDF stream order.
How to solve this issue? It's the worst case scenario, because 1) it's very hard to detect the problem because usually most of the time custom encoding the font follows unicode 2) even with an OCR, we would need to check in this case every glyphs of the embedded fonts with custom encoding which would create new errors due to OCR accuracy...
In the good "unsolved unicode" cases, we have an invalid unicode or something in the free unicode range (the right way to refer to embedded fonts) and we know when to apply OCR to recover unsolved encoding. MacOS Preview for instance is able usually to solves these "good" cases, because it has proprietary fonts and/or some fancy OCR processing in background to recover that - but it cannot solve this worst case scenario (apart Preview, no PDF tool is able to solve even the "good" case afaik).
Using an OCR for recovering encoding issues is still a long term goal of pdfalto (the tool used to parse the pdf in Grobid), it remains challenging of course to maintain high processing speed but we would like to be at least as good as MacOS Preview. However here your issue is even harder than usual glyph encoding errors, so it might remain still unsolved after we retire :D


Change Scrape Loop mtx to Mutex

It was still RWLock but we never use the read lock..
Signed-off-by: Julien Pivotto<EMAIL_ADDRESS>

:+1:


Header propagation middleware PR of PR

This is a PR of #16705
Internal review URL 3.1
Internal review URL 2.1

hello
how i run the project to sea the view result online

hello
how i run the project to sea the view result online


fix(core): separate promotions and coupons for order summary

What/Why?
This PR updates view for coupons and non coupons discounts in order making them separate items for order's summary.
Testing
locally
https://github.com/user-attachments/assets/9e1e4452-2b2e-460e-a6b0-5719914c72db
https://github.com/user-attachments/assets/a279451c-198f-4115-8ec7-8fbe9e585c74

Maybe hide Discount if there's a coupon code and no discount? 🤔

thanks Jorge. I'll double check it with Turner. Our logic here was that we synced the view with Cart where now discount line is presented even if there is no discount here. But let's see what Turner thinks about this.

Maybe hide Discount if there's a coupon code and no discount? 🤔

hey Jorge. After discussion with Turner discount line should only appear if a discount has been applied (even if it is $0). So eventually, both non-coupon & coupon discounts appear on Order summary block only when they have been applied.


Revert "fix word"

Reverts aksonov/react-native-router-flux#620

Cherry pick cf396ed into 3.24 if you want it.


snax_KUL_cluster and snax_gemmX_xdma_cluster

This PR updates the compilation form to integrate a new cluster.

Sorry that I accidentally created the PR to the upstream branch😂😂😂


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/94477

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/97169

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/108678

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/113510


Cow: Watch imsindia.com

Cow requests the watch of the watch_keyword imsindia\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

imsindia\.com has been seen in 1 true positive, 1 false positive, and 0 NAAs.

Approved by tripleee in Charcoal HQ

The FP seems dubious anyway


Feature Request: Tool to find duplicates

It will be great if you add a tool to detect duplicate photos (files) and option to remove duplicates.
Would be very helpful to clean up the duplicate uploads caused by issue #433 .

It's not planned to build this functionality into Lychee, but you could find and delete the duplicates in the database using the checksum of the photos. Keeping one image per checksum should do the job as Lychee uses the same file for equal photos.


feat: add better support for unique columns

Hello again!
I asked you how could I set a column as unique, you told me to use something like this:
index(ColumnIndex.unique, 'email', ['email']);

it didn't work because it generated this sql, which has a syntax error near INDEX(using postgres at least, but I checked in many AI models and both told me it is wrong for mysql too):
CREATE TABLE IF NOT EXISTS "users" (
    "id" SERIAL NOT NULL PRIMARY KEY,
    "name" VARCHAR(100) NOT NULL,
    "avatar" VARCHAR(250) NULL,
    "password" VARCHAR(200) NOT NULL,
    "email" VARCHAR(60) NOT NULL,
    "phone" VARCHAR(60) NULL,
    "description" TEXT NULL,
    "birthday" DATE NULL,
    "created_at" TIMESTAMP NULL,
    "updated_at" TIMESTAMP NULL,
    unique INDEX "email" ("email")
)

so I added an argument for each column type to generate unique columns with unique constraint, I tested for my migration and now it works, see the difference:
before:
await createTableNotExists('users', () {
      id();
      string('name', length: 100);
      string('avatar', length: 250, nullable: true);
      string('password', length: 200);
      string('email', length: 60);
      string('phone', length: 60, nullable: true);
      text('description', nullable: true);
      date('birthday', nullable: true);
      timeStamps();
      index(ColumnIndex.unique, 'email', ['email']);
});

after
await createTableNotExists('users', () {
      id();
      string('name', length: 100);
      string('avatar', length: 250, nullable: true);
      string('password', length: 200);
      string('email', length: 60,unique: true);
      string('phone', length: 60, nullable: true);
      text('description', nullable: true);
      date('birthday', nullable: true);
      timeStamps();
});

it now generates a query like this:
CREATE TABLE IF NOT EXISTS "users" (
    "id" SERIAL NOT NULL PRIMARY KEY,
    "name" VARCHAR(100) NOT NULL,
    "avatar" VARCHAR(250) NULL,
    "password" VARCHAR(200) NOT NULL,
    "email" VARCHAR(60) NOT NULL UNIQUE,
    "phone" VARCHAR(60) NULL,
    "description" TEXT NULL,
    "birthday" DATE NULL,
    "created_at" TIMESTAMP NULL,
    "updated_at" TIMESTAMP NULL
)

happy to help!

any updates here guys?

@WellingtonNico What if we have a combination of two columns?
ex: combination mobile with email

I think it's not a commom usage, thats way PRIMARY is made for...

We must consider all the conditions

@WellingtonNico
Thank you for the PR


feat(solid-query): SSR streaming support

Working off of the progress in https://github.com/TanStack/query/pull/4803.
Experimenting with an alternative approach that consolidates to a single createResource call. Instead of coordinating two createResource calls - one that sends down the dehydrated query state, and one that sends down the query data - this PR uses a single createResource that tracks and hydrates the entire query state.
I also beefed up the solid-start-streaming example to better showcase the various ssr patterns (and make it easier to experiment in real world).
Very much still experimenting.. ~tests don't pass~ (they do now), etc. But no hydration errors, and both traditional async suspense, as well as streaming, seem to be at least mostly working so I figured I'd get the thoughts up for others to consider / riff on if it seems promising.

Thanks for working on this! I really like it. Any idea why refetchOnWindowFocus doesn't seem to work?

Thanks for working on this! I really like it. Any idea why refetchOnWindowFocus doesn't seem to work?

No problem, it's been fun digging into tanstack query a bit more. Hmm, refetchOnWindowFocus: true is the default behavior right - are you saying it's not re-doing the queries for you after refocusing? Seems to work for me (do note that there's a staleTime of 10s on both queries).

Sorry I dont know what just happened. I accidentally edited your comment. But take a look at the codesandbox example created above! Doesn't seem to work on my device :/
https://user-images.githubusercontent.com/45807386/213616643-73dbcca5-2cf8-4fc7-849a-b3e467acb49b.mov

Ah, maybe that behavior is due to https://github.com/TanStack/query/commit/096da932ec5c8865125c65d39f631084c94555f4? I branched off of your ssr branch, and then merged in latest v5 before starting my work. Perhaps trying switching back and forth between browser tabs to see if the refetch on visibility change occurs?

Ah, maybe that behavior is due to 096da93? I branched off of your ssr branch, and then merged in latest v5 before starting my work. Perhaps trying switching back and forth between browser tabs to see if the refetch on visibility change occurs?

That seems to be it! If I change tabs I can see it refetch on coming back to the tab

Codecov Report

:exclamation: No coverage uploaded for pull request base (v5@8c373d2). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@          Coverage Diff          @@
##             v5    #4840   +/-   ##
=====================================
  Coverage      ?   90.76%
=====================================
  Files         ?       85
  Lines         ?     3488
  Branches      ?      881
=====================================
  Hits          ?     3166
  Misses        ?      301
  Partials      ?       21

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

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

@TkDodo  @marbemac made some awesome additions to createBaseQuery and this should be a good way to integrate both CSR and SSR in solid-query! Would love it if you could review it and merge the changes whenever convenient 😄 I'll close my PR once this gets merged

@marbemac I made a PR with some fixes with this approach.
The PR fixes two issues:

If we just use SSR (no Streaming) with Solid Start, when the query is hydrated, The data is updated due to it being a part of the resource. But the state store will be in its initial state. Where stuff like isFetching will be true, dataUpdatedAt will be 0, etc. This happens because there is no reactivity on the server! So even though we update the state store in the server subscription handler. The state variable never updates on server rendered DOM elements. So after the query is hydrated we can safely update the store
The second issue will be noticed if we have two queries with the same key but one of them has initialData set. When the second query mounts, it will already have data set but it will still wait for the fetcher to resolve instead of deduping the data.

This also was the reason why the unsubscribe function wasn't working correctly on the server. It is fixed now.

@ardeora great! I'll take a look in a few hours.

Hello @marbemac! Could you rebase again from the v5 branch? I'll create another PR to fix the svelte-query tests then :D If they haven't been fixed already and get this PR merged

Sure thing! Can get that done today.

@ardeora should be all set

@marbemac Thanks again for all the hard work on this. The changes have been merged now. v5 is going to be 💯


XNNPack delegate undefined reference

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: Android 10
TensorFlow installed from (source or binary): source
TensorFlow version: master
Python version: 3.6
Installed using virtualenv? pip? conda?:
Bazel version (if compiling from source): 3.1.0
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:
GPU model and memory:

Describe the problem
I'm trying to use xnnpack on Android 10 (arm64-v8a). I was able to build xnnpack delegate lib
bazel build -c opt --config=android_arm64 \
  //tensorflow/lite/delegates/xnnpack:xnnpack_delegate

And it produces static lib libs libxnnpack_delegate.a and libxnnpack_delegate.pic.a. But when linking into my Android project, we still have undefined reference errors as following
/proc/self/cwd/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc:3119: undefined reference to `xnn_initialize'

I am wondering what we are missing in these steps?
Provide the exact sequence of commands / steps that you executed before running into the problem
Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

@andreydung Is this still an issue? https://github.com/tensorflow/tensorflow/issues/42277#issuecomment-674723602

@ymodak Yes I’m still meeting this issue.

bazel doesn't actually produce self-contained static libs. Can you talk more about how you're using TFLite in your project? Are you using a static or shared library for the core TFLite library? Are you using prebuilts or are you building from source?

Having the same issue, where is xnn_initailize defined? I've been able to compile the other delegates by searching the file where it is defined seeing the bazel config and compiling and linking to it. Here, however, this function is not defined anywhere?

Apologies for the delay, looks like the issue wasn't properly labeled, @multiverse-tf can you help with this one?

Having the same issue, where is xnn_initailize defined? I've been able to compile the other delegates by searching the file where it is defined seeing the bazel config and compiling and linking to it. Here, however, this function is not defined anywhere? Thoughts? @jdduke

I've fixed my error.
Background: My interest was to create a wrapper around TFLiteInterpreter, feeding and gathering data from it + delegate support in user friendly way. This means, I had to compile and link XNNPACK delegate with my library.
What I did: It's not very intuitive at start, but in your bazel-bin, delegate/XNNPACK folder. This itself has some dependencies with fpthread. For a more detailed, follow the thread starting from this comment to the end.


Feature #21: Response headers now indicated in relevant error events

Addresses #21: Aligning with updates to the wiki's logging-event specification, the bulk-data-client now includes responseHeaders in emitted error events – specifically  kickOffEnd, exportError, and downloadError – and, in app.ts's eventlisteners, adds responseHeaders to the relevant logging events – specifically kickoff, status_error and download_error respectively. Note: since status_error and download_error are built from eventDetail directly, no change was needed after adding the information to exportError and downloadError's emitted eventDetails
Which headers are output is configurable at the level of the BulkDataClient's config files, using the new errorDebuggingHeaders parameter. (open to notes on this naming decision, names are always hard). This parameter accepts two kinds of values – a list of headers to filter down to in the list of responseHeaders, and the keyword all which, as you'd expect, includes all responseHeaders in the logs (this is the default value).
Relevant tests in logging.test.ts were updated to reflect these new fields in some events, and a new test file – utils.test.ts – is added to test the newly creted filterResponseHeaders method.
@mikix let me know if this branch works to expose the relevant Cerner debugging headers discussed in #21 , and if there are UX-feedback items you have for me, as the person who raised this issue initially.
@vlad-ignatov let me know what you think of these changes. Note that I discussed the logging-event specification changes with Dan before pushing them, and he's given me a thumbs up 👍 .  Also, since this is my first PR to this repo, let me know if I'm missing anything you'd like to see before reviewing/approving 😄

The code looks good to me (I didn't check the tests). I have some ideas for usability improvements though:

Having to pass [] to exclude all headers is not very intuitive. Perhaps it would be better to support "none" as another special keyword.
It is important to make those strings case insensitive (i.e., to convert them to lower case before comparing with the header names)
Realistic use case would be to want all custom headers (all starting with x-) plus one or more standard headers, and there is no way to that currently. For that reason I would propose that the option has the following type (TS) "all" | "none" | string | RegExp | (string | RegExp)[]. Then I would be able to use something like [/^x-.+/i, "content-type"].
Finally, I am also not trilled by that "errorDebuggingHeaders" parameter name. Proposing "logResponseHeaders"?

Thanks for the feedback Vlad!

Happy to support the passing of none 🎉
Good point. I'll add support and tests for that.
Sure sure – I was thinking about these as future improvements (I should have said as much in my PR description) but I don't have much better to do right now. Let me try adding support for all these different kinds of values, and I'll write back if any of them become more of a hassle than they're worth.
Love logResponseHeaders. Thanks for the feedback 😄

Good catch – forgot to update that comment everywhere

@mikix let me know if you wanted to give this a quick test before I merge. Happy to push forward, I just know you mentioned maybe taking a look at this in the AM and wanted to give you space to leave comments if needed. 😄

@Dtphelan1 I peaked at it and after talking with you, this sounds good to me! Thank you! :pray:


minor bug fix

Minor bug fix to have support for different matplotlib versions.
@enessenel have a look and add any other minor commits you might have.

Added a basic function for mapping cluster annotations on the reconstructed tissue space.


Allow indirection in secret names w/ secret-fetcher

Currently, the application and secret fetcher both use the full Vault paths to secrets. This tightly couples them to the exact names of those secrets in Vault.
Instead of taking a list of secret names to fetch, the fetcher should instead take a mapping of local name->vault name. When it fetches down the secrets by vault name, it writes them out to the secrets file using the local name. Applications could then reference the secret using a local name that's decoupled. No changes would be needed in the SecretsStore API since the names would just be transparently different.
Ideally it could recognize both forms of config for backwards compatibility which would make this effectively an opt-in change.

Credit to @eaceaser for the suggestion.


Delete HtmlAgilityPack.dll

Removing HtmlAgilityPack.dll from repo

This could be released on nuget as a "preview release" (1.1.7b) to allow proper testing

Pushing up a preview release now. Will include your flair changes as well.


Tracking issues of RFC-2133: Append API

RFC: #2133
Actions

[x] #2258
[x] #2259
[x] #2286
[ ] Add append operation support for services which has append API

[x] oss #2279
[ ] azblob
[x] fs #2296

I found that there are two different kinds of append, depending on whether the append operation can automatically create a new object that does not exist.
oss creates them automatically, while azblob does not. This makes it possible for the append operation to be inconsistent.
How do we deal with this problem?

Not to handle it, just report an error if it cannot be created. This prevents the user from creating an append-type blob through us.
Add a new method to the appender, such as init, so that the user can add a blob of this type.

WDYT?
cc @Xuanwo
references:

https://www.alibabacloud.com/help/en/object-storage-service/latest/appendobject
https://learn.microsoft.com/en-us/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs
https://learn.microsoft.com/en-us/rest/api/storageservices/append-block?tabs=azure-ad#remarks

I found that there are two different kinds of append, depending on whether the append operation can automatically create a new object that does not exist.

It's not a big different. append should creat new object if it doesn't exist.

2. Add a new method to the appender, such as init, so that the user can add a blob of this type.

No, we don't need it. To start an append process, we will need to head it first:

If the blob exists, we should record it's current pos (so that we can append to it)
If the blob doesn't exist, we should create it first.

If the blob doesn't exist, we should create it first.

So we can specifically handle the not existing error in our implementation.

Sftp services also support append API natively. Do I need to implement it?

Sftp services also support append API natively. Do I need to implement it?

You can have a try if you want to do it. Have fun!

Have implemented.

I'm guessing obs, cos, wasabi has been missed.

Already reopened. 🤣 I'll check them.

I would like to implement the wasabi part.

@Xuanwo I would take the obs part.


video seems a bit old

that video is showing the classic portal, perhaps might be time for an update?

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

ID: 41479e32-d4b4-3477-e258-5ec015599121
Version Independent ID: 7fc19c3a-1647-7331-33f6-df296381fc37
Content: Export using Stream Analytics from Azure Application Insights - Azure Monitor
Content Source: articles/azure-monitor/app/export-stream-analytics.md
Service: azure-monitor
Sub-service: application-insights
GitHub Login: @lgayhardt
Microsoft Alias: lagayhar

@lucidqdreams Thanks for the feedback.
Assigning @lgayhardt for visibility, review and document enhancement consideration as appropriate.

@lucidqdreams Thank you catching that! =) I made a PR to remove the video from the docs since it is now out of date. The update should go live next week. I'll let the PMs know about the video to see if they want to make an updated one.
#please-close


Have scales and plugins register themselves

This should hopefully allow users to import just the scales that they need and allow the others to be tree-shaken out
We will need to do one of two things to really make this work:

Create a controller registration service similar to the scale registration service instead of having users add to Chart.controllers as suggested in the docs
Or stop using strings to specify chart and scale types and use the object types instead as suggested in https://github.com/chartjs/Chart.js/issues/4461. This would be more type safe and work better with tools like eslint, Typescript, etc. E.g. right now if you have a typo like you want to use the 'yime' scale instead of 'time' then you won't find out until runtime. But if instead you passed in YimeScale then that should be able to be caught at build time

These aren't necessarily mutually exclusive and we could possibly support them both, but I personally don't have time to do both and I think it would be potentially confusing to users to support multiple ways of creating charts (have to document everything twice, all the stackoverflow answers and docs look different, etc.). @etimberg @kurkle do you have a preference on approach here?

Adding a note here for posterity. The custom css rollup plugin has now been removed in master so this PR could be revisited if we decided on an API that looks like this


code:in does not work correct with valueSets that have more than 1000 codes

Describe the bug
Pre calculated expansions of ValueSets can have more than 1000 code.
In my case I have a ValueSet with 1001 codes. When I use code:in search, the last code is not considered and resources with this 1001th code are not returned. Is this another bug?
To Reproduce
Steps to reproduce the behavior:

Create valueSet with more than 1000 codes
Create obersvation resource that uses the 1001th code from the valueset in observation.code
Search for observations where code is in the new ValueSet
Observation from step 2 is not part of the result

Environment (please complete the following information):

HAPI FHIR Version 6.1.0
user this docker  image: docker pull hapiproject/hapi:v6.1.0-tomcat
Query tool: postman

Additional context
I described this already here: https://github.com/hapifhir/hapi-fhir/pull/3901
I'm not sure if this is issue is solved with this patch, because there is no later version than 6.1.0 on Dockerhub.

In Hapi Version 6.2.1 this bug is still present.
I think the problem is caused because the pre calculated valueSet expansion seems to expand only the first 1000 codes.
(See screenshot:)

If I query for all Observations with code from this valueSet, an Observation that has the 1001st code is not returned.

@mkaehlershs Have you increased the maximum expansion size in DaoConfig? 1000 is still the default value for that setting, it just wasn't being respected for this use case until https://github.com/hapifhir/hapi-fhir/pull/3901

I'm using hapi as docker image. Is it possible to specify this value in the docker run command?

Unfortunately I'm not sure about that - The docker image is community maintained. I'd recommend asking on the mailing list or zulip, but it could well be that this setting isn't exposed that way. If need be, a PR against hapi-fhirjpaserver-starter to add it would certainly be accepted.


⚠ ClamAV has degraded performance

In bd3741a, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 195 ms

Resolved: ClamAV performance has improved in 728e98b.


No test/exception for DB failure on construct

Nice library (although wish you would also include a manual include/no autoload include.php, had to do that myself and it's painful because the dir structure sprawls a bit, I don't like autoloaders....).
When instantiating a PHP-Auth, there doesn't seem to be a way to immediately test or catch whether there was an issue with the database / setup.
Testing whether the setup was ok is pretty critical for an authentication/security mechanism. If there was an error connecting to the DB or reading any data, I want to die() immediately rather than risk some unexpected insecure code flow.
For example, the following doesn't throw any exception. I tried using isLoggedIn() to force a throw, but nothing happens:
$db = new \Delight\Db\PdoDsn('mysql:dbname=SOME;host='INVALID', 'DATABASE', 'CONFIG');
$auth = new \Delight\Auth\Auth($db, SITE_HTTPS_ENFORCED, FALSE, NULL, "php_auth_");
$auth->isLoggedIn(); // should fail, but doesn't throw?

However later if I call
$auth->login("deliberately", "junkdata");
I get a Delight\Auth\DatabaseError thrown.
This seems wrong workflow to me. I understand why it happens due to PHP-DB, but in my opinion this isn't right. Regardless of lazy load in PHP-DB (which I don't use anywhere else in my code), PHP-Auth should actively check for valid DB connection on instantiation. If PHP-Auth doesn't throw when I instantiate it with all the data necessary to set up, the logical assumption is everything is working.
Ability to immediately dump out on critical error of PHP-Auth failure to access DB is essential. It creates the following scenario, for example when allowing a password reset after form submission:
$db = new \Delight\Db\PdoDsn('mysql:dbname=SOME;host='INVALID', 'DATABASE', 'CONFIG');
$auth = new \Delight\Auth\Auth($db, SITE_HTTPS_ENFORCED, FALSE, NULL, "php_auth_");
$auth->forgotPassword("irrelevant - db config is bad", function ($selector, $token)
{
// blah
});

The exception thrown is InvalidEmailException, when actually it should be DatabaseError and handled completely differently.
I'd be happy with a ->Connect method, to force immediate DB connection. There's no penalty here as you're only ever instantiating PHP-Auth when you need it for something...

Also in an unrelated suggestion, can you set foreign key constraints on the SQL please? Makes things clearer and more consistent, plus extending the user data into another table is also clearer.
One additional suggestion ref the "add extra user fields". Could you consider adding one additional column that acts as a key to another table, which is programatically retrievable from the API? I have a scenario where I have a table of all potential users, and the PHPAuth table of "registered" users. The primary key id for my table will never match the PHPAuth table, so my only current option is to hack around your API or have a separate join table.
It's useful in cases where you may have a table of customers of a service, and you want to provide a web portal for the subset of those customers who register online.
Thanks

Forget the suggestion in my second post. I've written an extend to PHPAuth that allows an unlimited number of extra user data columns in the users table, and handles requests for that extra data transparently within PHPAuth without hard coding column names.
I'll share that, plus admin and management enhancements for a proper user manager system, plus an internal access control extension (makes the role feature easily usable), in a few days.

FYI I wrote this report originally before I went poking around in your code, so my thoughts here have been superseded by my other posts (which you've closed.....)

Correct. Because isLoggedIn doesn't use the database. See above. Why should it check the database if it doesn't need the database?
because we want and do have lazy loading here

Because that's insecure. You shouldn't defer checking the right of user to take an action, it should be checked at point-in-time-of-request. isLoggedIn doesn't actually check whether the user has the right to be logged in, it just checks whether there's a session var set. I've mentioned this in some other posts that you've closed, and this is exactly why I wrote isLoggedInHard() in my extend.
Because you rely on the session for IDAM, and processRememberDirective() relies on isLoggedIn(), the user state is not authoritative in code.
User logs in and uses the system. Administrator then decides that the user should be deleted/disabled/role changed/whatever. Administrator makes the change (deletes the user in the DB), yet the user can still happily use the system because the code is only checking whether the session vars are set, not whether the user account/roles/rights etc actually exist in the DB at a given point in time. This is why I moved the "authority" for user state back to the DB in my extend. isLoggedIn() should only be used for control of views.
Now if your isLoggedIn was authoritative (like my isLoggedInHard), then it would check the DB to actually confirm login, and DatabaseError would be thrown.

FYI I wrote this report originally before I went poking around in your code, so my thoughts here have been superseded by my other posts (which you've closed.....)

No problem. The reasons for closing other posts were outlined in those posts.

Because that's insecure.

It's not. Please stop making such claims without evidence.

You shouldn't defer checking the right of user to take an action, it should be checked at point-in-time-of-request.

It is.

isLoggedIn doesn't actually check whether the user has the right to be logged in

It checks whether the user has successfully logged in before and has a valid session. That's also what it says it does.

it just checks whether there's a session var set.

Yes, because that's how you generally do it.

User logs in and uses the system. Administrator then decides that the user should be deleted/disabled/role changed/whatever. Administrator makes the change (deletes the user in the DB), yet the user can still happily use the system because the code is only checking whether the session vars are set, not whether the user account/roles/rights etc actually exist in the DB at a given point in time.

Now it becomes clear what you really want, which seems to be something like https://github.com/delight-im/PHP-Auth/issues/52. That certainly makes sense and is a valid point.
But duplicating part of the session management in your database and performing a database request every time you want to check if a user is logged in is definitely not the way to go.
How you can revoke sessions is completely unrelated to this library and the library allows you to control that without touching the library's code. In PHP, the two configuration values session.save_handler and session.save_path determine how and where session data is saved exactly. That may be a file-based solution, some fast database (e.g. Redis), etc.
If that's really what you want, the issue linked above suggests a way how we might incorporate that into this library. In the meantime, feel free to track and destroy sessions manually.

It is.

How and where?

Yes, because that's how you generally do it.

We'll have to disagree again. Existence of a session var that was created at some point in the past when a login was valid doesn't authoritatively confirm whether that session (login) should be valid now.
Unless yet again I've missed something.

Sorry, I don't think I can add anything new to this discussion, as I've explained everything related to how this library works and why this is an acceptable way to do it.
As I said, this is exactly what sessions are for. You have sessions so that you don't have to check the database on every single request. If you did, why would you need sessions? Proper invalidation of sessions is another topic, and I pointed you to the PHP mechanisms that you need for that.
The referenced issue for remote logouts and invalidation of other sessions for the user seems to be what you want. So that's tracked there. Lazy loading for the database will be kept.


Audit page

Describe the solution you'd like
Audit page with all actions in account. Who and when added/deleted app, added user, build, etc.
Additional context
We are can't find multiple apps in our organisation account, looks like someone deleted them. It would be nice to have page where we can find info about actions like that.
Screenshot from TeamCity with same functionality:

Hi @anivaros - Thanks for reaching out. That could be confusing when something like an app completely disappears. An audit screen could help pin down what happened. I also wonder whether tightening the permissions to be able to create/delete apps in your organization or establishing a clearer process around it could help. I found a related issue discussing audit, which I'll close and reference this into for more information as use cases, options, and priority is considered.
Duplicate of #1485