Update index.md

I added  a tip to reach out to other coders!

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

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

You ignored a list of requirements including "My pull request has a descriptive title (not a vague title like Update index.md)". Descriptive titles and good explanations of changes are necessary for a well maintained codebase. Free Code Camp is choosing to relax some of its requirements to help people reach their Hacktoberfest goals, but this PR would normally be rejected. In the future, please help repository maintainers by providing useful titles and do not ignore contributing guidelines or requirements.

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

Hey @username
It seems that similar changes have already been accepted earlier for this article you're editing, sorry about that. 😓
If you feel you have more to add, please feel free to open up a new PR.
Thanks again! 😊

If you have any questions, feel free to reach out through Gitter or by commenting below. 💬


Add CI scripts

Fixes #915
This adds a ci script to each project and then invokes this script as part of our CI runs.
The ci script incorporates all tasks to verify the validity of the project such as generate, test, build, type-check, lint, and test:e2e.
Since each project contains somewhat different scripts, the ci script for each project incorporates whichever of the above is defined by the project.

@timostamm running a checkdiff is a bit more complicated since we have a monorepo using multiple package managers. The yarn projects are all failing because they are not caching the .yarn/cache directory and therefore keep installing Linux binaries for buf and esbuild, which then fails the checkdiff check. We can't make use of setup-node's cache because it only allows one package manager to be specified.
We could maybe break up our current ci.yaml into ci-npm.yaml, ci-yarn.yaml, etc. so that we can cache these independently.

They do suggest it if you want to use the zero-installs feature, but in reading more about it, they have a caveat about Github Actions listed there. Plus, it seems to apply to PnP only, so our Unplugged package would be out of luck (unless we committed node_modules, which we don't want to do).
I'm just going to add this to .gitignore for both projects since it's probably more trouble than it's worth for our current requirements.

@timostamm should be good now finally.

I went with yarn v3.63 since yarn set version berry updates to that version. The use of corepack handles removing the extraneous release files in .yarn/releases.
I also added a version to Remix (pnpm).

@smaye81, did corepack work out?

It seemed to. I switched our ci.yaml to use the same approach connect-query is using and removed it from the manage.mjs scripts and all the CI tests are passing. 🤷

@timostamm updated. Also added the same instructions to the remix project.


Translating emails to MIME email workflow

Need to create emails from Article model.
Idea is similar to the compose_mail function.
The template from Article is rendered. A custom context contains the "content" of the email, which must be processed using bleach first. I'm pretty sure I have example code "somewhere" in the Jonge Democraten projects that demonstrates use of bleach for this kind of thing. Also added to the context is a {} emailimages dictionary, which will be filled by all mime attachments for the email. See subscription email for example of how this works via custom tag.

This works fine, need to do more reviewing though.


Dependent fetching on list of urls

First of all, thanks 👍  for this awesome library. Heard about it on zeit's twiiter page this week and i wanted to try my hands on it.
This issue is related to #71 . In my case, i'll like to get info of each pokemon for each pokemon's url from the api, instead of displaying info based on a clicked pokemon.
I'm using the pokemon api as an example. demo is ➡  codesandbox

Hi @waptik !
React doesn't allow people to use dynamic number of Hooks inside a component. But you can move each pokemon into their own component and fetch via SWR inside. I forked your demo: https://codesandbox.io/s/happy-bhaskara-vgsf7

Thanks it works. I forgot that breaking things into components makes life easier.


RegisterCommands only includes in my array

Hi,
I use registerCommandsIn like this:
const modules = ["ban.js", "clear.js"]

.registerCommandsIn({
    dirname: path.join(__dirname, 'commands'),
    filter: (u) => modules.includes(u),
})

I need to charge only commands include in my array modules, but only first commands work...
Do u have an another solutions for me ?
Thanks 👌

Resolved with inhibitor


bug: CoreContainer fixed props was not given properly

Describe the bug
In CoreContainer props fixed validvalues and default was not given.

closing this issue since no further report


fix: Fix a typo in polish translation

Found a small typo in Polish translation and fixed it.

Thanks! 👏


add serial number low entropy check

This seems like a lower bound check, and probably what we can realistically test in isolation. @titanous any thoughts on this one?

I don't think there are any feasible tests that could be introduced at this level.

Is checking length incorrect?

It can be a warning. But you can have certificates containining 64 bits of entropy that do not contain 8 bytes due to leading zeros.
See: https://groups.google.com/d/topic/mozilla.dev.security.policy/YequotPYLdc/discussion

We could alternatively check if there are 64 bits instead of 8 bytes? But if you don't think this is a real test, we could just nix it.

We could alternatively check if there are 64 bits instead of 8 bytes? But if you don't think this is a real test, we could just nix it.

8 bytes == 64 bits. The problem is when I have a random number and the top eight bits are zero, then I will have a 7 byte serial number. I think this should definitely go in as a warning.

Yeah. Okay, I'll update this to a warning.

We still have some of the certificates with eight leading bits of 0 in the field (https://crt.sh/?id=313099468&opt=zlint) and this warning is an annoyance to our automatic error warning system. What makes me wonder is, that if I query directly the crt.sh database with postgresql I receive the correct serial number with leading zeros:  Maybe there is a trick that could be copied here this issue?

@kumarde Did you have a chance to look into this issue?

I'm not sure what's being asked here. It's probably best to also start a new issue rather than tack this onto something that was closed more than a year ago.


Allow async onPageLoad callback

If you were to provide an async function for the onPageLoad callback, SSR would not work; no html would be returned with the response. This meant that we couldn't use API's like Apollo's getDataFromTree.
This PR allows you to provide an async function for the onPageLoad callback, which enables something like
FastRender.onPageLoad(async sink => {
    // ... Apollo set up (for example)
    await getDataFromTree(<App />);
    sink.renderIntoElementById('app', renderToString(<App />))
    sink.appendToBody(`
        <script>
            window.__APOLLO_STATE__=${JSON.stringify(client.cache.extract())};
        </script>
  `);
})

Thanks! Merged and released as 3.0.3.
Can I ask why you are using FastRender with Apollo? It won't be able to hydrate Apollo's data. You might as well use server-render's onPageLoad instead.

I am moving some things over to Apollo from Meteor's pubsub for things that don't need to be reactive. For the time being, the reactive stuff will stick with pubsub. I am also still using Meteor's account system, which fast render will help with.
Any specific reason why apollo data hydration won't work? I have been able to get the Apollo cache SSRd to the client with in window.__APOLLO_STATE__, and if that's there, you should be able to do
const client = new ApolloClient({
    link: createHttpLink({ uri: "/graphql" }),
    cache: new InMemoryCache().restore(window.__APOLLO_STATE__),
  });

I thought I had this working, but I can double check tonight.

Ah, I see now. Yes, that will work since you are handling the payload manually. I meant that FastRender won't do any Apollo-related hydration automatically.

I think I was doing something incorrectly anyways that I only now noticed because of your previous comment. When I get some time tonight, I'll make sure that what I said before was true!
Having Apollo with the DDP pubsub feels nice so far. Your changes made it much much easier. One thing I still need to look into is populating Apollo's context with the currently signed in user, which I should be able to do because FastRender adds the token to the cookie.

If it all works out, maybe I can add something to the README about it.


GDG Cloud DialogFlow / Terraform / Conversational AI+ML

https://www.meetup.com/gdgcloud/events/267108568/
Video 1

videos-son-a7III-ninja-v-4k-30fps/NINJAV_S001_S001_T001-sm.mov 0:00-40:00

Video 2

videos-son-a7III-ninja-v-4k-30fps/NINJAV_S001_S001_T001-sm.mov 0:40-0:56

Video 3

videos-son-a7III-ninja-v-4k-30fps/NINJAV_S001_S001_T001-sm.mov 0:56-1:27

b-roll
Use any video or photos
Intros
I should probably do an intro for each video

Eddies intros
video 1

GDG Cloud event at Google Campus London
Pradeep - Terraform Modules for GCP Infrastructure
Terraform is Infrastructure as Code to provision and manage any cloud, infrastructure, or service

Declarative configuration files
Create reproducible infrastructure

Although this talk focuses on GCP, these practices can still be applied to AWS and Azure
He starts at the beginning with "What is Terraform and Terraform Modules", then moves on to the demo
Dont forget to give the video a thumbs up
Subscribe if you want to learn more about the latest technologies, web development, open source, tech events and hackathons
Also hit that bell button if you want to get notified when the get video is out

video 2

GDG Cloud event at Google Campus London
Dheeraj - Voice enabled real time data analysis of stackoverflow using Dialogflow, Cloud function and BigQuery
What is Dialogflow, natural language understanding platform, it really lowers the barrier to entry, to analyze multiple types of input from text to audio without any coding
Dont forget to give the video a thumbs up
Subscribe if you want to learn more about the latest technologies, web development, open source, tech events and hackathons
Also hit that bell button if you want to get notified when the get video is out

video 3

GDG Cloud event at Google Campus London
Olga Lugai and Yoyu Li - Understanding Texts and Images in Cloud-enabled AI Chatbots
What is Dialogflow, natural language understanding platform, it really lowers the barrier to entry, to analyze multiple types of input from text to audio without any coding
They will analyse images too, I will leave this as a surprise, watch the video and let me know what you think
Dont forget to give the video a thumbs up
Subscribe if you want to learn more about the latest technologies, web development, open source, tech events and hackathons
Also hit that bell button if you want to get notified when the get video is out


Make zkp.ts generic

https://github.com/zkemail/zk-email-verify/blob/e709ae8ee1019f28e1d2374e677887070fcd9ada/packages/helpers/src/zkp.ts#L8
Make this an argument, not a hardcoded twitter verifier url.

Hi @Divide-By-0, can i make this an env variable? Or do u want it to be parameter arguments for the incoming functions?

Hi @Divide-By-0, can i make this an env variable? Or do u want it to be parameter arguments for the incoming functions?

Both seems good! So we make it param args and when we run main server, we set it from the env.

Hi @Divide-By-0, I am getting this error when running zkp.test.ts:
Error: Error downloading http://localhost:3000/email.zkeyb.gz after 3 retries
May i know if i need to start a dev server? Is there docs for that?

This is fixed in #163


Documentation, features, and unit tests for Ensemble

Added RDF and Ensemble documentation
Change Ensemble features: remove types and conjugates initialization parameters, type-checking for N parameter, allow setting values of non-conjugate parameters
Implement unit tests for RDF and Ensemble in test_ensemble

To chime in on the conjugates discussion, I forget why exactly I thought it was useful to let the user specify which of the two variables is the conjugate in the constructor (probably it was something like being able to set both P and V in the constructor simultaneously), but I don't think we really need this because
ens = Ensemble(P=0.0, V=10.0)

can be replaced by
ens = Ensemble(V=10.0)
ens.P = 0.0

and this pattern is likely uncommon anyway. Definitely the current behavior is that it is assumed to be correct, regardless of what the user does.
I would support removing the conjugates argument from the constructor, and setting the list of conjugates from the parameters that are specified (including the error checking if both are set simultaneously that is already there). I think this makes the specification of the ensemble pretty clear:
nvt = Ensemble(types=('A',) T=1.0, V=10.0, N={'A': 1})
npt = Ensemble(types=('A',) T=1.0, P=0.0, N={'A':2})

Once you have made this change, it would also be good to modify the setters so that all the properties can be modified (regardless of whether they are conjugate or not).
Last, I also want to ask whether we should require the user to specify an explicit type list, or if we should deduce it from N / mu (whichever is specified). It feels like duplication to make them set it both times, and we are now requiring that one of these be set.

I would like to propose that we change the V argument from being a true volume (i.e., a float) to a new class that defines a "volume" in the sense of a region of space. This can be used to setup different types of simulation boxes. Currently, we need to assume the box is a cube, but for certain design targets it might be important to choose a good box shape.
I would make an abstract base class Volume (or a Region), which defines the interface for computing its total volume:
class Volume:
    @property
    @abc.abstractmethod
    def volume(self):
        """Volume of the region."""

Then we should implement the three common boxes that are used in LAMMPS / HOOMD:
class Parallelepiped(Volume):
    """General triclinic box."""
    def __init__(self, a, b, c):
        self.a = np.asarray(a)
        self.b = np.asarray(b)
        self.c = np.asarray(c)
        self.matrix = np.column_stack((self.a,self.b,self.c))
        # check that self.matrix.shape == (3,3), or something went wrong

    @property
    def volume(self):
        """float: Volume computed using scalar triple product."""
        return np.linalg.norm(np.dot(np.cross(self.a,self.b),self.c))

class Cuboid(Parallelepiped):
    """Orthorhombic box."""
    def __init__(self, Lx, Ly, Lz):
        super().__init__([Lx,0,0],[0,Ly,0],[0,0,Lz])

class Cube(Cuboid):
    """Cubic box."""
    def __init__(self, L):
        super().__init__(L,L,L)

Usage would be like
>>> V = Cuboid(1,2,3)
>>> print(V.volume)
6.0

Simulation engines can then check if they support simulation of ensemble against the list of volumes they work with:
if not isinstance(ens.V, Parallelepiped):
    raise TypeError('HOOMD only simulates parallelpiped (triclinic) boxes')

For convenience for users of LAMMPS & HOOMD, could we add one more type of Volume called Triclinic? A triclinic box is defined by 6 parameters: Lx, Ly, Lz, xy, xz, and yz. Lx, Ly, and Lz are the lengths of an orthorhombic box, and then xy, xz, and yz are "tilt factors" of that box. In LAMMPS, they are literally the amount (distance) that you skew the vectors. In HOOMD, they are fractional amounts relative to other lengths, but they basically do the same thing.
Here's one way you might implement it:
class Triclinic(Parallelpiped):
    LAMMPS = 1
    HOOMD = 2

    def __init__(self, Lx, Ly, Lz, xy, xz, yz, convention=Triclinic.LAMMPS):
        if convention is Triclinic.LAMMPS:
            a = (Lx,0,0)
            b = (xy,Ly,0)
            c = (xz,yz,Lz)
        elif convention is Triclinic.HOOMD:
            a = (Lx,0,0)
            b = (xy*Ly,Ly,0)
            c = (xz*Lz,yz*Lz,Lz)
        else:
             raise ValueError('Triclinic convention must be Triclinic.LAMMPS or Triclinic.HOOMD')
        super().__init__(a,b,c)

You could also make an Enum for the conventions, up to you what you think looks best for documenting. For further reading, here are the pages that describe what a triclinic box is:
https://lammps.sandia.gov/doc/Howto_triclinic.html
https://hoomd-blue.readthedocs.io/en/stable/box.html


Branch 137581645

@tensorflow-jenkins test this please

@tensorflow-jenkins test this please

@tensorflow-jenkins test this please

@tensorflow-jenkins test this please


Disallowing "\n" in python filter

Dear competition organizers,
Is there a reason you are disallowing "\n" in the python filter?
For example the following does not work:
def f(chat_history: list[str], model_output: str, secret: str) -> str:
return "\n"

Hi, thanks a lot for pointing this out. This is not intended and I am currently looking into a fix.

This should be fixed now. Feel free to reopen if it does not work


Adding cluster-messages to dependencies and out of optionalPeerDependencies

If you this package without cluster-messages installed it cases node to throw an error as it requires it to run. Because of this, I've moved cluster-messages into the dependencies.
I may be just be fixing the symptom and it could be that cluster-messages should be optional.

Coverage remained the same at 97.121% when pulling ac5b3cd8a568995565ef3bc3a5912f67cf98b86d on bug/adding-cluster-messages-dep into a7f272d6cb050cbb1d78f9c8043d0a9cf4744536 on master.

There is an argument to be made that cluster-message should be optional.
BUT I'm happy with this PR because:

previous version bump should've been a major one. I broke semver and this PR unbreaks my doing, which is nice
cluster-messages is basically just 200LOC so I don't really mind if it's dead weight, all things considered

If we really want to make it proper optional (which it should have been if it wasn't for my mistake) we can update again.


misleading info on logging in ConfigureServices()

There's a whole section on how to add ILogger to Startup.cs ConfigureServices, but that's not possible with the recommended go-forward approach in Program.cs of using IHostBuilder. Maybe address that here in the docs? I lost some time going down that dead-end.

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

ID: 7184a308-a254-9350-a5cd-5bced1f369ae
Version Independent ID: 726e3bf1-f367-d733-8933-bccc04da0e16
Content: Logging in ASP.NET Core
Content Source: aspnetcore/fundamentals/logging/index.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @tdykstra
Microsoft Alias: tdykstra

Hello @WellspringCS ... We're just a little bit early for it. The Generic Host doesn't make its full debut until 3.0 and thus isn't recommended at this time by engineering for production apps. WRT docs for preview scenarios: Due to engineering churn right up to the RC, we can usually only document the current release. The updates will be covered by an issue that will be opened later by the topic author.


Remove reference to client.verify.server from tests and other bits

Option originally removed in 9f15e7750030d298078ab43d62534d331c15d63c

I also went a bit overboard and removed proxy.config.ssl.server.cipher_suite where it looked like it was copy pasta (and tests still pass). I can pull that change out separately if preferred


Do i need to retrain when I edit the rigid nodes?

Thanks for you excellent work and sorry for my dumb questions!
I would like to know under what conditions editing a scene would require retraining. I’ve found that if I need to delete a rigid node, retraining is necessary, but if I’m only controlling the camera trajectory, then I only need to rerender. However, if I need to rotate a vehicle, would that require retraining? What if rigid nodes are being replaced with each other? Similarly, if I need to change instances_quats and instances_trans to control the trajectory of the rigid nodes, would retraining be required

sorry for my stupid problem! it's not necessary! just edit the scene in do_evaluation(In my opinion,not 100% correct!

@zzz5y can editing be done without retraining, if yes then how?


refactor: Use AndroidX Photo Picker for selecting media

Thanks for submitting a PR! Please read these instructions carefully:

[X] Explain the motivation for making this change.
[ ] Provide a test plan demonstrating that the code is solid.
[X] Match the code formatting of the rest of the codebase.
[X] Target the main branch, NOT a "stable" branch.

Motivation (required)
What existing problem does the pull request solve?
For a more privacy preserving experience for users, we’re introducing the Photo and Video Permissions policy to reduce the number of apps permitted to request broad photo/video permissions (READ_MEDIA_IMAGES and READ_MEDIA_VIDEO). Apps may only access photos and videos for purposes directly related to app functionality. Apps that have a one-time or infrequent need to access these files are requested to use a system picker, such as the Android photo picker. (effective August 31, 2024)
Reference: https://support.google.com/googleplay/android-developer/answer/13986130
Converted the launchImageLibrary Android function to use the native AndroidX Photo Picker: https://developer.android.com/training/data-storage/shared/photopicker
Test Plan (required)
Tested out on multiple devices, both with the example app, and on my own project.

Tried selecting single image
Tried selecting multiple images
Tried selecting single video
Tried selecting multiple videos
Tried selecting single video/image
Tried selecting multiple videos/images

Devices used:

Make
Android version

Samsung SM-A520F
Android 8

Samsung SM-A750F
Android 10

Pixel 3
Android 11

Samsung Galaxy Tab A8
Android 13

Relevant issue: #2146

Thanks for submitting @hubatruck. We can confirm that the update works well for our use case, and means all permission checks can be removed once targeting SDK 34. We haven't tested this update when targeting versions prior 34 though.

@hubatruck Am I doing something wrong? I have errors:
react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerModuleImpl.java:28: error: cannot find symbol
import androidx.activity.result.PickVisualMediaRequest;

react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerModuleImpl.java:30: error: cannot find symbol
import androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia;

react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerModuleImpl.java:31: error: cannot find symbol
import androidx.activity.result.contract.ActivityResultContracts.PickMultipleVisualMedia;

react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerModuleImpl.java:126: error: package PickVisualMedia does not exist
				PickVisualMedia.VisualMediaType mediaType;

I have target SDK 34 and I added to app/build.gradle
implementation("androidx.activity:activity:1.9.0")
implementation("androidx.activity:activity-compose:1.9.0")
implementation("androidx.activity:activity-ktx:1.9.0")

@hubatruck Am I doing something wrong? I have errors:
react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerModuleImpl.java:28: error: cannot find symbol
import androidx.activity.result.PickVisualMediaRequest;

react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerModuleImpl.java:30: error: cannot find symbol
import androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia;

react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerModuleImpl.java:31: error: cannot find symbol
import androidx.activity.result.contract.ActivityResultContracts.PickMultipleVisualMedia;

react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerModuleImpl.java:126: error: package PickVisualMedia does not exist
				PickVisualMedia.VisualMediaType mediaType;

I have target SDK 34 and I added to app/build.gradle
implementation("androidx.activity:activity:1.9.0")
implementation("androidx.activity:activity-compose:1.9.0")
implementation("androidx.activity:activity-ktx:1.9.0")

Hi @Darex1991
Could you please give a bit more information about your issue?
I have ran the project with the example application which also uses Kotlin, and it was not throwing me this kind of error. So it seems like react-native has androidx.activity dependency already included, and no need for additional action. Running ./gradle app:dependencies inside the example/android folder also confirmed this.
For easier debugging, the best would be a minimal project that reproduces the issue you mentioned.

@Darex1991 try adding these to react-native-image-picker's android/build.gradle:
implementation "androidx.core:core:1.3.1"
implementation "androidx.activity:activity:1.6.0"
implementation "androidx.fragment:fragment:1.5.7"

@hubatruck First of all, thank you for this fix! It's been a lifesaver.
I'm having an issue on Android 11/12 where the ACTION_OPEN_DOCUMENT is fired and the user is asked to give the app permission to access the media files once an image is selected. Do you know if this violates Google's new photo and video policy?

@janithl this helped me! Thanks.
Do you know if I still need to check READ_EXTERNAL_STORAGE permission?
For now, on Androids < 13, I check [PERMISSIONS.IOS.PHOTO_LIBRARY, PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE]

@Darex1991 I'm glad I could help. I'm not 100% sure about the usage of READ_EXTERNAL_STORAGE for older versions of Android either,  but I've been looking at expo packages and they seem to use it with a android:maxSdkVersion="32" in their manifests.

@Darex1991 I hope this post from the Android Developers blog is helpful: https://medium.com/androiddevelopers/permissionless-is-the-future-of-storage-on-android-3fbceeb3d70a

@janithl I only noticed adding implementation "androidx.activity:activity:1.6.0" increasing my build twice 36MB -> 72MB

@janithl I only noticed adding implementation "androidx.activity:activity:1.6.0" increasing my build twice 36MB -> 72MB

Are you using AAB or APK distribution?

@Johan-dutoit is there any chance that this PR can get reviewed and merged before October 31'st? 🤞 Otherwise, we will no longer be able to publish updates to our app (as we don't really have good reasons for having the READ_MEDIA_IMAGES permissions in our app) 😞

@Johan-dutoit @marcshilling (I know its been a long time since you contributed to this lib) I'm sure you have a lot of other important stuff but the change in this PR is becoming more and more critical. If it is not merged and released before end of October it will block people from releasing updates to their apps in Google Play Store and will force people to look for other similar libs (not that I've been able to find good alternatives), write their own lib or try out the risky pursuit of applying this PR as a patch or fork.

@jenskuhrjorgensen I can get this merged and a new version released but I don't have capacity to review/test this at the moment. Can you confirm/approve this PR is good as-is? Is this a breaking change that warrants a new major version?

@marcshilling thanks a lot for your quick reply 🤗
I will try to find time to review and test it asap!
In the meantime:
@Darex1991 @hubatruck @janithl are your discussions in this PR resolved? You were talking about having to add some dependencies to app/build.gradle in order for it to work. I'm not really sure I understood if you came to conclusion. Are those dependencies something that is required for this PR to work and if so should it be added to the lib or README?
@janithl you also wrote:

I'm having an issue on Android 11/12 where the ACTION_OPEN_DOCUMENT is fired and the user is asked to give the app permission to access the media files once an image is selected. Do you know if this violates Google's new photo and video policy?

Did you come to a conclusion on this? Is it an issue?
Thanks all for testing and discussing on this - it all helps in getting it merged and released <3

@jenskuhrjorgensen we added a check for PickVisualMedia.isPhotoPickerAvailable() to see if the photo picker was actually available and fallback to using the document picker new Intent(Intent.ACTION_GET_CONTENT, null) in case it wasn't. We also had to add the READ_EXTERNAL_STORAGE permission for SDK versions less than 32.
Not 100% sure if it will run afoul of Google's policies, but that was the only way we found to make it work on older versions  of Android where the new photo picker wasn't available.

I have forked this and tested on android Api level 34, 30, 29. Works fine.
I should note that I am still using READ_EXTERNAL_STORAGE for versions <= 32

Same as @SMPinCode, but still double size of my apk.
@spacesuitdiver APK

Hmm, well I just realized I don't have any permissions on this repo anymore 😞. If someone can bring me back into the fold, I'll get this merged and a new version released. Until then though I can't help.

@janithl and others: Were you actually able to get the new photo picker to work on Android < 30? I've tried to install androidx.activity:activity:1.7.+ due to this but it still doesn't show the new photo picker on my API 29 emulator.
@marcshilling that's a bummer :( But thanks for your good intentions! <3

@jenskuhrjorgensen I was not getting new photo picker on Android < 30. My mistake i have not mentioned it. I was focused of getting rid of READ_MEDIA_IMAGES. Also I am still using READ_EXTERNAL_STORAGE which covers for APIs <= 32.

@jenskuhrjorgensen no, I wasn't able to get the new photo picker on the older versions of Android. The document picker was shown instead:

@marcshilling thanks a lot for your quick reply 🤗
I will try to find time to review and test it asap!
In the meantime: @Darex1991 @hubatruck @janithl are your discussions in this PR resolved? You were talking about having to add some dependencies to app/build.gradle in order for it to work. I'm not really sure I understood if you came to conclusion. Are those dependencies something that is required for this PR to work and if so should it be added to the lib or README?
@janithl you also wrote:

I'm having an issue on Android 11/12 where the ACTION_OPEN_DOCUMENT is fired and the user is asked to give the app permission to access the media files once an image is selected. Do you know if this violates Google's new photo and video policy?

Did you come to a conclusion on this? Is it an issue?
Thanks all for testing and discussing on this - it all helps in getting it merged and released <3

From my part, the backwards compatibility of the Photo Picker is still a big question. On my API <30 devices & emulators, the documents picker was showing up with the example app. I don't understand what else would be needed for it to work on older APIs.

@SMPinCode @janithl I haven't been able to reproduce any issues without the READ_EXTERNAL_STORAGE permission. I even tried to completely remove WRITE_EXTERNAL_STORAGE from the manifest file (both on this branch but also on master of this repo) and I was still able to "Select Image" in the example app. Can you please elaborate on the issues you are facing when not setting this permission and on what devices you are experiencing this?
During testing I also removed WRITE_EXTERNAL_STORAGE as it will imply the READ_EXTERNAL_STORAGE permission https://stackoverflow.com/a/15270626/3749432. This breaks the "Take image" functionality, but not the "Select Image" - at least not in a way that I have been able to find yet...

@jenskuhrjorgensen I have tried removing WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE on my app, but there are other libraries which are using these permissions and merged or packaged AndroidManifests gets these permissions in. I have not tried the example app yet. I will see if i have time tomorrow

@SMPinCode I believe you can explicitly remove permissions with
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>

@jenskuhrjorgensen I can get this merged and a new version released but I don't have capacity to review/test this at the moment. Can you confirm/approve this PR is good as-is? Is this a breaking change that warrants a new major version?

And I don't believe this is a breaking change. The API didn't change, no dependencies changed, and if you are running Android < 30, you will just fallback to the old document picker. Newer OS'es will get the new photo picker. If you are running Android < 30 and you would like the new backported photo picker you have to add a few additional lines. This will be described in the README.

@SMPinCode I believe you can explicitly remove permissions with
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>

@jenskuhrjorgensen
I have tried on emulator API_29_GoogleAPis_Android_10 on my app by explicitly removing permissions:
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove"/>
I have also did not get backported android photo picker (because emulator?).
So camera upload works and the documents picker shows up:

       // https://developer.android.com/training/data-storage/shared/photopicker
        if (isSingleSelect) {
            libraryIntent = new PickVisualMedia().createIntent(this.reactContext.getApplicationContext(), mediaRequest);
        } else {
            PickMultipleVisualMedia pickMultipleVisualMedia = selectionLimit > 1
                    ? new PickMultipleVisualMedia(selectionLimit)
                    : new PickMultipleVisualMedia();
            libraryIntent = pickMultipleVisualMedia.createIntent(this.reactContext.getApplicationContext(), mediaRequest);
        }

    the selectionLimit > 1 will always be true if !isSingleSelect, so there is no point in conditional.

       // https://developer.android.com/training/data-storage/shared/photopicker
        if (isSingleSelect) {
            libraryIntent = new PickVisualMedia().createIntent(this.reactContext.getApplicationContext(), mediaRequest);
        } else {
            PickMultipleVisualMedia pickMultipleVisualMedia = selectionLimit > 1
                    ? new PickMultipleVisualMedia(selectionLimit)
                    : new PickMultipleVisualMedia();
            libraryIntent = pickMultipleVisualMedia.createIntent(this.reactContext.getApplicationContext(), mediaRequest);
        }

the selectionLimit > 1 will always be true if !isSingleSelect, so there is no point in conditional.

@chr4ss12 I think boolean isSingleSelect = selectionLimit == 1; and selectionLimit > 1 means that new PickMultipleVisualMedia() will be used if selectionLimit == 0 (or actually just < 1) which is described in the README to be used for unlimited selection. So I think the check makes sense.

ignore what i said, was too early in the morning, but i am about to test the whole PR in production to see if there are any problems!

i have not heard much feedback from users since releasing to production, thats always good sign.
one feedback from an user:
""In this screenshot, you should see an additional "Browse..." option if you've enabled it properly in Android Media Picker code. Since you decided to switch to the media picker before it was ready to be used, you must manually enable this option. Otherwise, we as users are forced to scroll through however many photos are on our device in reverse date order or copy the desired photo to the very few albums media picker can actually see""
does anyone know what option he is referring to?

@chr4ss12 can you share the screenshot too? What version of androidx.activity:activity did you use?

the screenshot:

I did not use the latest activity, but the one before. I will try to update to latest

@chr4ss12 I tried to spin up the photo picker in a vanilla native Android app as per the official documentation and this is what the photo picker looks like:

However, if I change the test app a bit to use registerForActivityResult(ActivityResultContracts.GetContent()) instead of registerForActivityResult(PickMultipleVisualMedia()) as per this StackOverflow post I can get the picker to show up a "browse" button in the "..." menu:

And when I press "browse" I end up here and it looks like I can pick whatever file(s) I want here:

If I go into the Gmail app on my personal device (Pixel 8, Android 14) and try to attach an image, the picker looks exactly like the one your user complained about ("..." menu with a "Cloud media app" button), so I'm not sure there is anything wrong with this implementation. Also, I'm not sure what your user means by "Since you decided to switch to the media picker before it was ready to be used", since I cannot see anything about the photo picker being experimental or in pilot.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

@Johan-dutoit hi, this is not included in the release notes, just fyi

https://github.com/react-native-image-picker/react-native-image-picker/releases/tag/v7.1.4

Thanks @efstathiosntonas , semantic release didn't like the "refactor" for some reason.


chore/add-multi-entrypoint bundling support

Reference: #11
Adds a separate bundle for each src/icons/**.tsx file for better tree shaking and support for direct
imports:
import ArrowCircleLeftOutline from "heroicons-react/icons/ArrowCircleLeftOutline"

Tested this build with direct imports in a project and went from 203kb dependency to 9.71kb :)

Closing since package is now deprecated with official heroicons v1 release.
https://www.npmjs.com/package/heroicons


Type Error

I'm running data-diff on Linux os, specifically via Google Colab.
Here's my command which is constructed following the example on in your Example Command and Output section:
python -m data_diff "snowflake://$USER_1:$PASSWORD_1@$SNOWFLAKE_ACCOUNT/$DATAWAREHOUSE?database=$DATABASE&schema=$SCHEMA1" "same_table" "snowflake://$USER_2:$PASSWORD_2@$SNOWFLAKE_ACCOUNT/$DATAWAREHOUSE?database=$DATABASE&schema=$SCHEMA2" "same_table"
Here's the error message. Please help, I'm trying to setup a Workflow on GitAction, but I run into problem at this very first step.
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/__main__.py", line 159, in <module>
    main()
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/__main__.py", line 132, in main
    diff_iter = differ.diff_tables(table1, table2)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/diff_tables.py", line 208, in diff_tables
    end_key = max(maxs) + 1
TypeError: can only concatenate str (not "int") to str

The latest master has also been released as 0.0.5

Hi Erezsh,
I upgraded to 0.0.5, and the above command gave the following error message:
ValueError: Must provide warehouse. Expected format: 'snowflake://<user>:<pass>@<account>/<database>/<schema>?warehouse=<warehouse>'
I modify the command according to the expected format, and received this error:
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/__main__.py", line 164, in <module>
    main()
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/__main__.py", line 137, in main
    diff_iter = differ.diff_tables(table1, table2)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/diff_tables.py", line 238, in diff_tables
    key_ranges = self._threaded_call("query_key_range", [table1, table2])
  File "/usr/local/lib/python3.7/dist-packages/data_diff/diff_tables.py", line 319, in _threaded_call
    return list(self._thread_map(methodcaller(func), iter))
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 598, in result_iterator
    yield fs.pop().result()
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 435, in result
    return self.__get_result()
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/diff_tables.py", line 167, in query_key_range
    min_key, max_key = self.database.query(select, tuple)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/database.py", line 88, in query
    res = self._query(sql_code)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/database.py", line 364, in _query
    return _query_conn(self._conn, sql_code)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/database.py", line 65, in _query_conn
    c.execute(sql_code)
  File "/usr/local/lib/python3.7/dist-packages/snowflake/connector/cursor.py", line 799, in execute
    Error.errorhandler_wrapper(self.connection, self, error_class, errvalue)
  File "/usr/local/lib/python3.7/dist-packages/snowflake/connector/errors.py", line 277, in errorhandler_wrapper
    error_value,
  File "/usr/local/lib/python3.7/dist-packages/snowflake/connector/errors.py", line 328, in hand_to_other_handler
    cursor.errorhandler(connection, cursor, error_class, error_value)
  File "/usr/local/lib/python3.7/dist-packages/snowflake/connector/errors.py", line 214, in default_errorhandler
    cursor=cursor,
snowflake.connector.errors.ProgrammingError: 002003 (42S02): SQL compilation error:
Object '"stg_facebook_adsets"' does not exist or not authorized.

I can guarantee that stg_facebook_adsets exists in both schemas I'm reading from.

This error usually happens when the schema is incorrect. Make sure to provide the schema in uppercase, if it's uppercase in the database.

@tranhoangnguyen03 did it work when you upper-cased the schema?

I upper-cased and got the following error:
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/__main__.py", line 164, in <module>
    main()
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/__main__.py", line 137, in main
    diff_iter = differ.diff_tables(table1, table2)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/diff_tables.py", line 238, in diff_tables
    key_ranges = self._threaded_call("query_key_range", [table1, table2])
  File "/usr/local/lib/python3.7/dist-packages/data_diff/diff_tables.py", line 319, in _threaded_call
    return list(self._thread_map(methodcaller(func), iter))
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 598, in result_iterator
    yield fs.pop().result()
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 435, in result
    return self.__get_result()
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/diff_tables.py", line 167, in query_key_range
    min_key, max_key = self.database.query(select, tuple)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/database.py", line 88, in query
    res = self._query(sql_code)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/database.py", line 364, in _query
    return _query_conn(self._conn, sql_code)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/database.py", line 65, in _query_conn
    c.execute(sql_code)
  File "/usr/local/lib/python3.7/dist-packages/snowflake/connector/cursor.py", line 799, in execute
    Error.errorhandler_wrapper(self.connection, self, error_class, errvalue)
  File "/usr/local/lib/python3.7/dist-packages/snowflake/connector/errors.py", line 277, in errorhandler_wrapper
    error_value,
  File "/usr/local/lib/python3.7/dist-packages/snowflake/connector/errors.py", line 328, in hand_to_other_handler
    cursor.errorhandler(connection, cursor, error_class, error_value)
  File "/usr/local/lib/python3.7/dist-packages/snowflake/connector/errors.py", line 214, in default_errorhandler
    cursor=cursor,
snowflake.connector.errors.ProgrammingError: 000904 (42000): SQL compilation error: error line 1 at position 11
invalid identifier '"id"'

It looks like the "id" column is also upper case. Added -k ID might help.

with -k ID:
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/__main__.py", line 164, in <module>
    main()
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/__main__.py", line 137, in main
    diff_iter = differ.diff_tables(table1, table2)
  File "/usr/local/lib/python3.7/dist-packages/data_diff/diff_tables.py", line 242, in diff_tables
    min_key = min(map(int, mins))
ValueError: invalid literal for int() with base 10: '000007fa4ea55f4d0c799d5ea4b714ca'

Yes, we currently don't support hex ids. Sorry! It's on our TODO list, hopefully we'll get to it soon.

Yep—closing as it's now a dup of https://github.com/datafold/data-diff/issues/59 — thanks for bearing with us!


Can a right-click on the regular add bookmark flag optionally be used to trigger the bookmark menu instead of adding a new button?

Done


Cannot resolve scoped service 'Visus.LdapAuthentication.ILdapSearchService' from root provider.

Mentioned in appsetting.json,
"LdapConfiguration": {
"Server": "serverdetail",
"SearchBase": "DC=abc,DC=com",
"Schema": "Active Directory",
"IsRecursiveGroupMembership": true,
"Port": 636,
"IsSsl": true,
"IsNoCertificateCheck": true,
"User": "sadfsdf",
"Password": "asdfsadfsadf"
}
In startup
var options = new LdapOptions();
this.Configuration.GetSection("LdapConfiguration").Bind(options);
services.AddLdapSearchService(options);
what am i missing that ILdapSearchService is not getting resolved

I am not sure how to diagnose this without the code where it is used. One thing I can imagine that this is a follow-p error. Can you try to add services.AddLdapConnectionService(options); as well?

I am working on Ldap search, so this is the only code change that i have to do right. I have posted all the code change i have done for integration

Yes, in principle this should suffice to register the service. However, the error you get should only be raised when you try to inject the service into a controller, not when registering the search service. If it does fail at this point, the only reason I see would be another dependency missing. I just had a look in the code and the only thing required here is the logger. Do you have the logging extensions (https://www.nuget.org/packages/Microsoft.Extensions.Logging/) installed?

Closing this due to inactivity.


fix(src/resolve): use injector's strictDi value in calls to .annotate

This PR passes through $injector.strictDi to $injector.annotate calls. At present, if a resolve function is unannotated and $injector.strictDi is true, an error is not thrown in contrast to the expected behavior for angular injectables.

The tests pass locally but fail on Travis. I'll investigate.

Fixed it. :)
@nateabele, mind taking a look?


Codegen Flexibility/Improvements

Currently, the codegen feature doesn't provide much flexibility with how the structs are generated. For instance, you can't specify that a struct should derive a specific attribute, like Debug, Clone, or some other custom attribute.
As a more robust solution, I wanted to experiment with using a build feature/crate to generate the rust structs from pkl modules as part of the build. This would be similar to how prost-build handles codegen for gRPC. The idea is to run the codegen during build and output it to the target directory, then include the generated file using a macro.
Example use would be something along these lines
helloworld.pkl:
Hello {
  message = "World"
}

build.rs:
fn main() -> std::io::Result<()> {
    pkl_rs::build::configure()
      .derive("helloworld.Hello", "Clone") // add `Clone` to the `Hello` object in the `helloworld` module
      .derive(".", "Debug") // derive `Debug` for all structures
      .generate(&["./helloworld.pkl"], &["./"])?;
    Ok(())
}

main.rs:
pub mod hello_world {
    pkl_rs::include_pkl!("helloworld");
}

let hello: hello_world::Hello = pkl_rs::from_config("./helloworld.pkl")?;

Pros

Avoid having to rewrite all the structures
Keeps rust structures in sync with the pkl module

Cons

Hurts colocation
Additional complexity

Just as I get a feel for your repo I'm writing some test cases and documentation. I would like to know where you are at on parsing additional primitive/non-primitive types for the codegen so that we don't duplicate work :melting_face:
Also in terms of contribution workflow, I'm currently working on my own fork and will send a PR from there. Anything specific you want from that?

@Sir-NoChill Originally I was using serde_json to deserialize the PklMod members, so any datatypes that couldn't be represented as json got thrown under this todo.
Since it's not relying on json compatibility now though, I think we could represent some of these types using the type system, like Duration.


Add Finnish language support

During development work with CTAssetsPickerController, we noticed that currently this controller doesn't support Finnish language. So we decided to contribute this project, and created new language support for Finnish. We carefully translated these words into Finnish by our Finnish developer, and we hope that this will be helpful for many Finnish speaking developers.

@binattori Thanks for contribution!


Track gas deltas

Added option to track gas deltas between test runs. It would be useful for the gas optimization process.

@0xVolosnikov Thanks so much for this, apologies for the delay reviewing...am taking a look now.

This is published in 2.2.0.
Small note in case you're using your fork locally and are going to switch back to using this one - I renamed checkGasDeltas to trackGasDeltas (sorry) in #233.
Thanks again :)


Support Kotlin 2.0.20

Expected Behavior

Kotlin 2.0.20 is not allowed to run with detekt. it comes with a bunch of improvements that we'd like to make use of. https://blog.jetbrains.com/kotlin/2024/08/kotlin-2-0-20-released/
Is there any workaround, or must we hold off our entire project to upgrade to 2.0.20 while we wait for detekt to update?
Current Behavior

Context

Kotlin 2.0.20 is not allowed to run with detekt

What do you mean exactly? Even though detekt is currently using 2.0.10, you should be able to analyse your code.

Also just an FYI but there's a regression in 2.0.20 so we are waiting for 2.0.21 before updating. Follow #7580 to see when it's merged and becomes available in a snapshot version.

Kotlin 2.0.20 is not allowed to run with detekt.

That's not true. Detekt works with kotlin 2.0.20. What problem do you have? Which is the error message?

Execution failed for task ':&&&&&:detekt'.
> detekt was compiled with Kotlin 2.0.10 but is currently running with 2.0.20.
  This is not supported. See https://detekt.dev/docs/gettingstarted/gradle#dependencies for more information.

And did you use the provided link which provides more information about this?

Absolutely. It mentioned something about spring and This can happen when build scripts use things like this which override all dependency configurations .
The doc does not make sense to me , since in this situation I’m setting the project level kotlin version. The solutions provided suggest overriding the Kotlin version for all configurations, that is not expected. Rather I’d expect a solution that allows me to run only detekt in supported kotlin version maybe?

Can you please provide a build scan?

Rather I’d expect a solution that allows me to run only detekt in supported kotlin version maybe?

This is possible as long as nothing in your Gradle config is overriding the Kotlin version in the Gradle dependency configuration that's created & used by detekt. Spring's dependency plugin overrides it, but there are other causes. This isn't a detekt problem, it's a build config problem (a build scan would confirm this).

I’m setting the project level kotlin version

Using what method?

And if you cannot provide a build scan please provide a reproducer or a suggestion/PR on how to improve our documentation.

im applying kotlin plugin to the project's buildscript in a normal way via classpath and apply plugin (kotlin-android / kotlin depending on android or jvm library).
// top level build.gradle
buildscript {
  // ..

  dependencies {
    classpath deps.gradlePlugins.detekt
 }
}

in a convention plugin, that modules apply simply:
plugins {
  id `'kotlin-android`
}

This is possible as long as nothing in your Gradle config is overriding the Kotlin version in the Gradle dependency configuration that's created & used by detekt

this is an example of our detekt plugin convention script:

buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }

    dependencies {
        classpath deps.gradlePlugins.detekt
    }
}

apply plugin: 'io.gitlab.arturbosch.detekt'

dependencies {
    detektPlugins deps.detektFormatting
}

detekt {
    toolVersion = deps.versions.detekt.get()

    config = files(configFile('quality/detekt/detekt-config.yml'))
    baseline = file('detekt-baseline.xml')
}

// based on https://detekt.github.io/detekt/gradle.html#reports
tasks.named("detekt").configure {
    reports {
        xml {
            enabled = true
            destination = file("build/reports/detekt/detekt.xml")
        }
        html {
            enabled = true
            destination = file("build/reports/detekt/detekt.html")
        }
        txt.enabled = false
    }
}

tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach {
    source("src/main/kotlin", "src/debug/kotlin", "src/main/java", "src/debug/java")
}

tasks.withType(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask).configureEach {
    source("src/main/kotlin", "src/debug/kotlin", "src/main/java", "src/debug/java")
}

as you can see, we're not doing anything magical. we're just applying kotlin plugins in each of our modules with the project level kotlin version, applied via classpath version from a TOML definition.
My original question was, is it possible to workaround thiso r override the kotlin version used only for detekt to run with a supported version of kotlin, while maintaining newer kotlin versions. The example in the documentation makes it seem like we should only tie our project kotlin version to one that detekt supports:
configurations.all {
    resolutionStrategy.eachDependency {
        if (requested.group == "org.jetbrains.kotlin") {
            useVersion(io.gitlab.arturbosch.detekt.getSupportedKotlinVersion())
        }
    }
}

and then this :

If Kotlin dependencies are being aligned like this then exclude the detekt dependency configuration with something like >
configurations.matching { it.name != "detekt" }.all.

We aren't applying the kotlin version this way.

We use the following plugins:
plugins {
    val kotlinVersion = "2.0.20"
    kotlin("jvm") version kotlinVersion
    kotlin("plugin.spring") version kotlinVersion
    id("io.gitlab.arturbosch.detekt") version "1.23.7"
    // ...
}

Unfortunately, we face the same issue, and it's unclear (even after reading the provided documentation) how we can resolve it. As far as I am aware, this is a Gradle plugin problem, but to be honest, since that's the only way we actually use detekt, to us, it's one and the same.

Just quoting 3flex comments:

Can you please provide a build scan?

And if you cannot provide a build scan please provide a reproducer or a suggestion/PR on how to improve our documentation.

The problem is that the spring plugin is changing the detekt dependencies (they have an issue open about this: https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/369, you can leave a thumbs up there). What you should do is undo those changes. Maybe this issue helps #6198.

@BraisGabin thank you for redirecting me to #6198, this workaround finally worked: https://github.com/detekt/detekt/issues/6198#issuecomment-2265183695
My problem was specifically caused by spring plugin management. The provided documentation tries to be generic but I actually needed this point solution.

We've updated Kotlin to 2.0.21 in #7580.
This will be available in the next release. You can use snapshots in the meantime.

thank you. any word on when a stable (non-snapshot) version with support for 2.0.21 will get released? or will we skip right to 2.1.0

thank you. any word on when a stable (non-snapshot) version with support for 2.0.21 will get released?

Nope I think we should release a version with Kotlin 2.0.21 as it will make it easier for folks to update to that version


Pet Parenting

Moved all pets into parent groups with the lowest rarity being the parent.
The way I named commits is a bit bad, I skipped rounds 3 and 7 and round 5 is actually foraging but the actual changes should be good.

I am not sure if people want this, you may want to ask people's opinions. If I were you I would put all the pets at the end instead of in alphabetical order.

How about you make a poll in the discord?


adding in missing kinds to olm config

Signed-off-by: Adam D. Cornett<EMAIL_ADDRESS>Issue #, if available:
N/A
Description of changes:
Adding in the missing kinds to the olm config file. This ensures that when the bundle is created via the release process that operator-sdk does not throw any warnings. This then allows the PR to the community repos to be raised without any issues since the community repos run operator-sdk validate bundle which may reject warnings.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/lgtm


github pages

Hi! If you create gh-pages branch I'll make a pull request with a demo, so it will be available at https://andreasgal.github.com/pdf.js

The bot's automatically updating gh-pages upon every merge to master now.

\o/


feat: change date format

This PR changes the date format in Tasks

:tada: This PR is included in version 1.4.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Javascript "devicemotion" should be added to the site.

Javascript "devicemotion" should be added to the site.

This issue was imported from Google Moderator
Moderator votes: +6
Issue added by Ralph on 2014-07-27
To vote this issue up or down, simply include +1 or -1 in your comment.

Covered by http://caniuse.com/#feat=deviceorientation


Rails 4 - translations.js doesn't update

I tried using the asset pipeline instructions but that didn't work.
A previous developer used the gem and generated the translations.js file somehow but then completely removed the i18n-js gem and configuration options except removing the translations.js file. So now I have the translations.js file in the repo here: public/javascripts/translations.js with the following configuration options.
When I run
rake i18n:js:export
it runs, but nothing happens. Please help me get my translations.js file to update
config/i18n-js.yml
translations:
- file: "app/assets/javascripts/application/i18n/translations.js"
  only: '*.js*'

config/initializers/assets.rb
Rails.application.config.assets.precompile += %w( forem.css forem.js i18n.js )
Gemfile
source 'https://rubygems.org'
ruby '2.1.2'
gem 'rails', '4.1.4'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails', '~> 3.1.1'
gem 'turbolinks', '~> 2.2.2'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc
gem 'spring',        group: :development
gem 'sass-rails', '~> 4.0.3'
gem 'bootstrap-sass', '~> <IP_ADDRESS>'
gem 'autoprefixer-rails'
gem 'devise', '~> 3.2.4'
gem 'cancancan', '~> 1.9.2'

gem 'pg', '~> 0.17.1'
gem "select2-rails", '~> 3.5.7'
gem 'language_list', '~> 1.0.0'
gem 'country_select', github: 'stefanpenner/country_select'
gem "friendly_id", "~> 5.0.4"
gem 'i18n', '~> 0.6.11' # had to include this to get friendly_id generator to work - also works in conjunction with the globalize gem and globalize-accessors gem
gem 'globalize', '~> 4.0.2' # let's you use multiple locales for one model without making a ton of columns
gem 'globalize-accessors', '~> 0.1.5' #Easily access (read and write) globalize translated fields without fiddling with locale
gem 'batch_translations' #needed this to get globalize_fields_for to work

gem "i18n-js", ">= 3.0.0.rc8" #get internationalization to work with javascript in rails

gem 'momentjs-rails', '>= 2.8.1'
gem 'bootstrap3-datetimepicker-rails', '~> 3.1.2'

gem 'fog', github: 'fog/fog'
gem 'carrierwave'

gem "figaro" #application.yml handling

gem 'bootstrap-wysihtml5-rails', :github => "bleakwood/bootstrap-wysihtml5-rails"

gem 'negative_captcha'

# these two have to be together
#gem 'forem', :github => "radar/forem", :branch => "rails4"
gem 'forem', :git => 'git://github.com/radar/forem.git', :ref => '8b4999af3c702603414f6ba9efc1848a0cdb6dbe'

gem 'kaminari', '~> 0.16.1'
gem 'forem-redcarpet', '~> 1.0.2'

# these two have to go together
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary', :github => "zakird/wkhtmltopdf_binary_gem"

gem 'highcharts-rails', '~> 4.0.1'

# audit trail
gem "audited-activerecord", "~> 4.0" #https://github.com/collectiveidea/audited

# making a curl call
gem 'httparty', '~> 0.13.1'

# try this without the gem
# put this into application.js
# //= require sweet-alert-confirm
#gem 'sweet-alert-confirm', '~> 0.0.3'

# our js framework of choice
gem 'knockoutjs-rails', '~> 3.2.0'

gem 'whenever', '~> 0.9.4'

group :development do
  gem 'better_errors'
  gem 'binding_of_caller', :platforms=>[:mri_21]
  gem 'quiet_assets'
  gem 'rails_layout'
  gem 'meta_request'
  gem 'pry', '~> 0.10.1'
end
group :development, :test do
  gem 'factory_girl_rails'
  gem 'rspec-rails'
end
group :test do
  gem 'capybara'
  gem 'database_cleaner'
  gem 'faker'
  gem 'launchy'
  gem 'selenium-webdriver'
end

app/views/layouts/_js_locales_info.html.erb
<%= javascript_include_tag "i18n" %>
<%= javascript_include_tag "translations" %>
<%= javascript_tag do %>
    I18n.defaultLocale = "<%= I18n.default_locale %>";
    I18n.locale = "<%= I18n.locale %>";
    I18n.fallbacks = true;
<% end %>

application.html.erb
<!-- after all the other js stuff-->
<%= render 'layouts/js_locales_info' %>

application.rb
#for the i18n-js gem
    config.middleware.use I18n::JS::Middleware

Inside en.yml
  js:
    posts:
      select2:
        placeholder: 'Please, select tags'
        no-matches: 'No tags found'

Try changing
only: '*.js*'
to
only: '*.js.*'
If that doesn't work, try '*', to see if it's the gem's problem or the regular expression problem

@pavankat in #306 I learned to run rake tmp:cache:clear, which finally helped me reload the translations. I also tried rake assets:clobber and rm public/javascripts/translations.js but that was in vain.
I have now set our ci-build up to clear cache before it precompiles assets.

thanks @jesperronn

Was there ever a solution to this found? I'm using this library in a Rails 4 app, but my changes in my .yml files don't see to get picked up in production. When I make the changes to the files, I see the new translations available in translations.js on my development server. However, when I push to heroku, git push heroku master, the translations do not get updated.


Editorial: Add installation instructions to README.md

Not certain if we want to add a yarn install notification relative to https://github.com/tmpvar/jsdom/pull/1999 but at least need an install section.

cc @TimothyGu

The line is currently missing the package name.
Regardless, I doubt the need for this as it is just the standard installation procedure. Anyone with enough experience to find this package useful will presumably also be familiar with how to install it. Not including this also avoids suggesting which package manager to use, or whether to install as a dependency or devDependency.

@Zirro understood. Just uncanny as this would officially be the first package without even a light installation section. Below is how React handles multiple installation procedures in less than a paragraph.
Nonetheless, we will still need the following commit introduced based on your recommendations https://github.com/tmpvar/jsdom/pull/2046/commits/131d28def36798afb9a8d3b431020305f423e670

Those mentions refer to packages in the npm Registry, which Yarn publishes to as well. The tool-specificity is only a problem in the context of the CLI.
That said, a sentence like the one used by React looks okay to me if someone else agrees that it is worth adding.

I think @Zirro's got it right, and the readme is fine as-is. Let's close this.


Archer C7 with OpenWRT

Hello,
Just bought a brand new Archer C7 and installed OpenWrt. Although wifi should be quite powerful it doesn't go higher then 30-40Mbs. I must admit i'm not very good with networking and left the default config.
Also the network (wi-fi&cable) is very unstable. Dropping every 2 minutes or so and is not recording any issues, alerts or errors.
Any advise will be greatly appreciated.

Your error doesn't seem to have anything to do with the Luci user interface, which is the subject of this bug tracker. You might initiate a discussion at the Openwrt forum.

Ok. Thanks


feat: set up a hub testnet

What is the feature you would like to implement?
Configure a single hub that operates on the test network and publish it so that developers can run test hubs against it. A service should be configured to continually broadcast messages from some fids against this hub at arbitrary intervals.
Why is this feature important?
Provides a testing ground for developers to write and publish messages without having to rely on mainnet hubs.
Will the protocol spec need to be updated??
No
How should this feature be built? (optional)
TBD

Are there existing plans for isolated/local hubs, too?
Still ramping up on hubble / contributions here, but I would find it useful to run my own internal staging hub in addition to a public testnet being available.

Boot up anvil node
Deploy registry contracts
Boot up isolated hub pointed at local rpc endpoint
Publish seed data to anvil
Publish seed deltas to local hub (steps 4/5 w/ public anvil keypairs)

We would just need to allow configuring the contract address, which should be an easy addition. @adityapk00 wdyt?

@varunsrin @adityapk00 happy to put up a diff if this is something that would be considered.
I think it makes sense to generalize makeWithGoerli into a factory that optionally accepts address overrides.
Another option would be to allow abi overrides. This would future-proof things a bit more and allow folks to test out new id/name registry changes more easily (although this shouldn't change much).
https://github.com/farcasterxyz/hubble/blob/cf8624d3409b6a10f27e9e0bc2620a4e3d8c6689/apps/hubble/src/hubble.ts#L158-L164
https://github.com/farcasterxyz/hubble/blob/cf8624d3409b6a10f27e9e0bc2620a4e3d8c6689/apps/hubble/src/eth/ethEventsProvider.ts#L89-L108

Yes, that makes sense. Making the makeWithGoerli into a factory that can make out of any network is probably the right way to go.
FWIW, the cli.ts already accepts   .option('-f, --fir-address <address>', 'The address of the FIR contract'), which allows overriding the contract, but we should generalize this into accepeting all the contract addresses needed.

Sounds good. I'll get a diff out this evening or tomorrow morning.

@payton yes, would be very supportive of a PR. we would need to accept the fnr address over the command line and make sure that makeWithGoerli instantiates correctly when set up.

@payton yes, would be very supportive of a PR. we would need to accept the fnr address over the command line and make sure that makeWithGoerli instantiates correctly when set up.

@adityapk00 @varunsrin adding it here https://github.com/farcasterxyz/hubble/pull/623

@sds and @adityapk00 some open questions:

Should this testnet be run against a testnet version of the contracts?
How many hub instances should warpcast run to guarantee no data loss in case of failure?

from @adityapk00

I was thinking we’ll use the existing Goerli contracts, but with network=2 in the Hubs.

This way, people will be able to test against their actual FIDs, without needing to send new transactions to create new FIDs on a ethereum testnet

@adityapk00 i wonder if its good to create some friction here and actually have a separate set of contracts that people should be using for the test network. there are a couple of reasons for this:

it reduces the probability of accidentally generating mainnet messages from your fid.
it creates a testing ground for the contracts, which we need long term anyway.

We could deploy new contracts, but it will mean people will have to spend (testnet) gas to create FIDs to test. Will we need to build a UI for this?
From a code perspective, it is no different, so I'm not opposed to doing new contracts.

On further reflection, I think we should launch the first version of testnet with existing contracts. Its probably too much friction to ask developers to re-register fids in such a short timeframe. After this is done and mainnet is out we can "reclaunch" testnet with a separate set of contracts.


Can't run E2E tests locally

I'm following the instructions in the README to run the e2e tests locally.
Looks like the app is failing to boot, it loops around this line: https://github.com/CDCgov/prime-simplereport/blob/2d3562827eaa7a52f5f60f511dec39d01aa1ba80/frontend/e2e/nightwatch-entrypoint.bash#L13

Looking into this now!

Looking into this now!

Reopening - running locally only works on Linux, not Mac OS, due to this issue:
https://github.com/docker/for-mac/issues/1031
I will be looking into a solution for this.


Alignment of GatewayRepository, MessageRepository and AuxiliaryChainRepository

PR covers below:

Creation of Gateway, Message and AuxiliaryChain models.

Alignment/Refactoring of GatewayRepository, MessageRepository and AuxiliaryChainRepository as per StakeRequestRepository and ContractEntityRepository.

Updated tests

Fixes #99

Available for review 🍏

Available for review again 🚀


fix final field initialized in the constructor set twice for issue #1873

What this PR does / why we need it?
fix final field initialized in the constructor set twice for issue #1873
Summary of your change
Please indicate you've done the following:

[ ] Made sure tests are passing and test coverage is added if needed.
[ ] Made sure commit message follow the rule of Conventional Commits specification.
[ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

Codecov Report
Patch coverage: 100.00% and project coverage change: -1.68% :warning:

Comparison is base (de09ea2) 73.26% compared to head (c1a5195) 71.58%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1875      +/-   ##
============================================
- Coverage     73.26%   71.58%   -1.68%
+ Complexity    21523    20810     -713
============================================
  Files           646      634      -12
  Lines         87391    86645     -746
  Branches      19072    18869     -203
============================================
- Hits          64023    62028    -1995
- Misses        15455    16666    +1211
- Partials       7913     7951      +38

Files Changed
Coverage Δ

...on2/reader/FieldReaderCollectionFieldReadOnly.java
81.48% <100.00%> (+0.71%)
:arrow_up:

... and 83 files with indirect coverage changes

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


Stop monkey-patching Rack::Builder

IMHO monkey-patching Rack::Builder is a bad idea as it might alter the behaviour of many rack-based frameworks which could lead to unexpected bugs. Please fix me if I am wrong here, I think the solution is a ExceptionReporter middleware at the end of the middleware stacks and exceptions from higher middlewares will bubble down the stack.
I am happy to offer a PR if this proves useful for this project.

@joneslee85 we already have a issue for this, https://github.com/rollbar/rollbar-gem/issues/157.
Our main problem is that we don't want to break the actual reporting the customers could have. So we thought to add this in a next more important release. Of course you can open a PR for this and we'll evaluate it!
I close this one since we already had one.
Thanks!


[Autocomplete] onChange undefined intermittently when options updated

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Autocomplete sometimes returns undefined as the value in onChange when selecting options from a list that updates (the option is present in both previous and current list).
Expected Behavior 🤔

Autocomplete should select the selected item.
Steps to Reproduce 🕹

Here's a codesandbox.io reproduction: https://codesandbox.io/s/autocomplete-and-async-suggestions-rrp70
Steps:

Select 1 from the drop down (an item gets added to the options every second):

Keep selecting 1:

Eventually, onChange will select undefined:

Context 🔦

I have a list of IoT devices and a autocomplete to select the IoT device by id say. As new IoT devices come online the list is updated asynchronously and device ids are added so there's no well-defined loading phase.
Your Environment 🌎

Tech
Version

Material-UI
v4.6.1 (lab 4.0.0-alpha.32)

React
16.12.0

Browser
Chrome

TypeScript
No

Similar behaviour occurs when using the "multiple", "filterSelectedOptions", "disableCloseOnSelect" props together, and selecting multiple options without moving the mouse after selection.
codesandbox: https://codesandbox.io/s/material-demo-f5sfu

@jellyedwards @Dror88 The proposed fix in #18456 solves this problem.
 It seems that the following would work better:
diff --git a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js
index 12ca84907..fe7d5ac03 100644
--- a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js
+++ b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js
@@ -371,7 +371,7 @@ export default function useAutocomplete(props) {

   React.useEffect(() => {
     changeHighlightedIndex('reset', 'next');
-  }, [filteredOptions.length]); // eslint-disable-line react-hooks/exhaustive-deps
+  }, [inputValue]); // eslint-disable-line react-hooks/exhaustive-deps

   const handleOpen = event => {
     if (open) {

Do you confirm? Do you want to explore a pull request :)? Thanks

Hey @oliviertassinari it looks like both of your fixes will sort it. I'll try to do a PR & add a test or two.

Sorry forgot to say thanks! @oliviertassinari


DialogServiceConnector does not set provided synthesized speech format

Package Name: azure.cognitiveservices.speech.dialog
Package Version: 1.40.0
Operating System: Ubuntu 22.04.3 LTS
Python Version: Python 3.10.12

I am working on a direct line speech bot integration with an IVR system that only supports ULAW audio streams.  I am able to set the incoming stream format for the speech-to-text input like so:
# setup the audio stream
stream_format = speechsdk.audio.AudioStreamFormat(
    channels=1,
    bits_per_sample=8,
    samples_per_second=8000,
    wave_stream_format=speechsdk.audio.AudioStreamWaveFormat.MULAW)
stream = speechsdk.audio.PushAudioInputStream(stream_format=stream_format)
audio_config = speechsdk.audio.AudioConfig(stream=stream)

# setup bot config
bot_config = speechsdk.dialog.BotFrameworkConfig(subscription=SUBSCRIPTION_KEY, region=REGION)
dialog_service = speechsdk.dialog.DialogServiceConnector(bot_config, audio_config)

There does not seem to be a method to set the Synthesized Speech Output like there is with SpeechSynthesizer.  However, there is a set_property() method that does nothing:
bot_config.set_property(speechsdk.PropertyId.SpeechServiceConnection_SynthOutputFormat, "Raw8Khz8BitMonoMULaw")

Synthesized speech is still 16Khz PCM WAV.
To Reproduce
Steps to reproduce the behavior:
bot_config.set_property(speechsdk.PropertyId.SpeechServiceConnection_SynthOutputFormat, "Raw8Khz8BitMonoMULaw")

Expected behavior
Expect the audio data from the activity_received event to be in the specified format.
Screenshots
n/a
Additional context
n/a

@mja8122 the speech SDK does not reside in this repo. Please move your issue to this repo: https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues where the maintainers of the library will be able to help. Thanks!

Moving to correct repo


Nested uib-dropdown

I am using uib-dropdown in a repeatable nested list however when I toggle any of the dropdowns all of the dropdowns within that certain tree structure are shown / hidden?
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.7
Bootstrap: 2.2.0

provide plunker pls


Sorting by multiple columns

Feature request
Is your feature request related to a problem? Please describe.

post_id
title
created_at
updated_at

1
Post 1
2021-06-21 10:00:00.000000
<null>

2
Post 2
2021-06-22 10:00:00.000000
2021-06-25 09:00:00.000000

3
Post 3
2021-06-23 10:00:00.000000
2021-06-24 17:00:00.000000

4
Post 4
2021-06-24 10:00:00.000000
2021-06-25 08:00:00.000000

5
Post 5
2021-06-25 10:00:00.000000
<null>

I'd like to sort the records in the above table by both updated_at and created_at.
Below is the expected result.

post_id
title
created_at
updated_at

2
Post 2
2021-06-22 10:00:00.000000
2021-06-25 09:00:00.000000

4
Post 4
2021-06-24 10:00:00.000000
2021-06-25 08:00:00.000000

3
Post 3
2021-06-23 10:00:00.000000
2021-06-24 17:00:00.000000

5
Post 5
2021-06-25 10:00:00.000000
<null>

1
Post 1
2021-06-21 10:00:00.000000
<null>

The records are sorted by updated_at in descending order with nulls at the end, and records with nulls in updated_at are sorted by created_at in descending order.
With SQL (the dialect of postgres), I can achieve this by writing the ORDER BY clause like below:
ORDER BY updated_at DESC NULLS LAST, created_at DESC

It doesn't seem the package has support for this, but having looked at the source code, I found that it was not impossible although it wasn't very easy.
order('created_at')

This is converted to:
ORDER BY ("created_at".desc.nullslast)

So what I'd like to do is possible if I write the sorting conditions as follows:
order('updated_at".desc.nullslast, "created_at', ascending: false)

This is too hacky to use with peace of mind. We need a better way.
Describe the solution you'd like
The solution may be to allow multiple settings to be passed to order() or to add a new method specialised for it.
For setting multiple options, some methods of this package use a string parameter, like or('status.eq.OFFLINE,username.eq.supabot'), but it's not very elegant nor safe.
It might be better to have a class like Order and pass the list of its objects.
e.g.
class Order {
  const Order(
    this.column, {
    this.ascending = false,
    this.nullsFirst = false,
    this.foreignTable,
  });

  final String column;
  final bool ascending;
  final bool nullsFirst;
  final String? foreignTable;
}

...

await client
    .from('posts')
    .select('*')
    // I don't come up with a nice method name...
    .order2([Order('updated_at'), Order('created_at')])
    .execute();

Describe alternatives you've considered
I also tried using multiple order()s like order('updated_at).order('created_at') but with no success. Should it actually work for my usage? It didn't give any error.
If using it in such a way has no effects currently, it may be better to make it work for this in that it is more intuitive for users.
I'm not familiar with this sort of query builders because I usually write raw SQL queries in backend servers, so other people with more knowledge are likely to have better ideas.
Additional context
I wondered if I should file this issue here, or in either repository of supabase/supabase or supabase/postgrest. Does a change in the API for a specific language require that it is applied to the APIs for other languages?

Hi @kaboc !
Thanks for opening this issue! This feature has recently been added to postgrest-js on this PR.
If you have the time, it would be great if you could add this feature, but no pressure though. If you don't have the band width, I can work on it over the weekend!

Hi @dshukertjr . I'll give it a try anyway and let you know if I have some difficulty.

@kaboc Amazing!


Smart SEO for discontinued packages

[ ] Don't include them in the sitemap
[ ] Consider excluding them robots.txt

cc @isoos @jakobr-google WDYT?

Sitemap is easy (#1013 out for review).
robots.txt is a bit tricky. If other pages link to it, it may still show up in search results. Instead, I'd rather use the noindex meta header

noindex SGTM – we want robots.txt to be fast.


Fix diff

The commits in this PR fix the diff command, which failed to account for files in dirs which were added.
In addition, the output was changed slightly, see restic diff --help for details.

Codecov Report

Merging #1471 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #1471      +/-   ##
==========================================
- Coverage   51.66%   51.64%   -0.03%
==========================================
  Files         138      138
  Lines       11077    11082       +5
==========================================
  Hits         5723     5723
- Misses       4482     4487       +5
  Partials      872      872

Impacted Files
Coverage Δ

cmd/restic/cmd_diff.go
2.15% <0%> (-0.06%)
:arrow_down:

Continue to review full report at Codecov.

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


Add support for persistence in nginx-static

It is a complex change, since using Deployment with single PVC requires RWO, and having multiple replicas with StatefulSet would cause different data stored across all of them...
Still this is an optional setting, looks safe.


PHP Google Drive API

Hello. I am php developer and want to upload files using api
I saw https://developers.google.com/drive/api/v3/quickstart/php
it works well. then i did https://developers.google.com/drive/api/v3/manage-uploads
include 'quickstart.php';
$fileMetadata = new Google_Service_Drive_DriveFile(array(
'name' => 'photo.jpg'));
$content = file_get_contents('files/photo.jpg');
$file = $driveService->files->create($fileMetadata, array(
'data' => $content,
'mimeType' => 'image/jpeg',
'uploadType' => 'multipart',
'fields' => 'id'));
printf("File ID: %s\n", $file->id);
and ran
I got error.
files (1v_fkI4BUZDZts_ZNp4LgDZcr6oNEfPNm)
Getting started (0B5fJx4717Z0yc3RhcnRlcl9maWxl)
PHP Notice:  Undefined variable: driveService in C:\xampp\htdocs\linkedexchanger.com\php\google\upload.php on line 6
Notice: Undefined variable: driveService in C:\xampp\htdocs\linkedexchanger.com\php\google\upload.php on line 6
PHP Notice:  Trying to get property 'files' of non-object in C:\xampp\htdocs\linkedexchanger.com\php\google\upload.php on line 6
Notice: Trying to get property 'files' of non-object in C:\xampp\htdocs\linkedexchanger.com\php\google\upload.php on line 6
PHP Fatal error:  Uncaught Error: Call to a member function create() on null in C:\xampp\htdocs\linkedexchanger.com\php\google\upload.php:6
Stack trace:
#0 {main}
thrown in C:\xampp\htdocs\linkedexchanger.com\php\google\upload.php on line 6
Fatal error: Uncaught Error: Call to a member function create() on null in C:\xampp\htdocs\linkedexchanger.com\php\google\upload.php:6
Stack trace:
#0 {main}
thrown in C:\xampp\htdocs\linkedexchanger.com\php\google\upload.php on line 6
PS C:\xampp\htdocs\linkedexchanger.com\php\google>
Please help, thanks

The service is called $service in the quickstart but $driveService in the other sample. We would ideally have those in sync, but it's easily corrected in your code.


Provide ability to reset password if forgotten

Pull Request Information
Relates to Github Issue: #59
What is the PR Type: feature

Describe the added/fixed behaviour:

Have set up a SMTP server that will send E-mail to the user that has submitted a valid request for a password reset.
Ability to reset password once user access a unique link via their E-mail inbox.

Set up the following 3 APIs to achieve the feature above.

POST user/resetTokenCheck
POST user/resetPassword
POST user/forgotPassword

Added 2 more columns in user database/model, "ResetToken (String)" and "CanReset (Bool)"

ResetToken is a base 64 string time based token that gets generated when user has forgotten their password. It gets sets to empty once it's used or it will expire after 1 hour (from when the E-mail is sent)
CanReset is to check if the user is in a state that can change password. Is implemented to prevent people changing query string to reset other accounts' password.

Checklist

[x] Pull request has suitable title, adequately described and associated with a github issue
[x] Branch name follows correct convention (e.g. feature/[id]-some-feature)
[x] Branch builds and executes with no errors
[ ] Test cases has been generated for the feature and test cases pass
[x] Updated relevant wiki/documentation

Additional Information
Please either sign up with a legit email address or change one of the test users' email in DevelopmentDatabaseSetup to test the full functionality of this. Because the reset password page does require a unique URL.
This PR mainly provides the backend of the feature. Frontend was developed by @gargi-bansal and have been merged into master in PR #122 and #149

Final Reminders
Please remember to squash the commits

A wiki page on how to use the SMTP server has been created:
https://github.com/SE701ProjectGroup4/Flatmate-Management-System/wiki/SMTP-Server-Account-and-Usage


auto_register=True does not work within cogs

Slash commands arent registered with discord when using auto_register=True.
Code to reproduce, running within a cog:
    def __init__(self, bot):
        self.bot = bot

        if not hasattr(bot, "slash"):
            bot.slash = SlashCommand(bot, auto_register=True, override_type=True)

        self.bot.slash.get_cog_commands(self)

    def cog_unload(self):
        self.bot.slash.remove_cog_commands(self)

    @cog_ext.cog_slash(name="Ping2")
    async def ping2(self, ctx: SlashContext):
        await ctx.send(content=f"Pong!")

With the above code, I would expect the command to register and be available to users, however, it is not.
Checking registered commands with:
    @commands.command()
    async def get_slash(self, ctx):
        print(self.bot.slash.auto_register)
        print("Showing Commands Registered:")
        for i in await discord_slash.utils.manage_commands.get_all_commands(id, token, ctx.guild.id):
            print(i)

Shows no registered commands.
Setting the command with:
    @commands.command()
    async def put_cmd(self, ctx):
        print("Setting Commands:")
        await discord_slash.utils.manage_commands.add_slash_command(id, token, ctx.guild.id, "Ping2", "Test")

successfully makes the command available to users and is visible when checking with the get_slash function above.

You should try adding a description to your decorator as you've done in the direct manage_commands.add_slash_command() call.
-> @cog_ext.cog_slash(name="Ping2", description="Test")

You should try adding a description to your decorator as you've done in the direct manage_commands.add_slash_command() call.
-> @cog_ext.cog_slash(name="Ping2", description="Test")

I have added a description with no change. Code is as follows:
    def __init__(self, bot):
        self.bot = bot

        if not hasattr(bot, "slash"):
            bot.slash = SlashCommand(
                bot,
                auto_register=True,
                override_type=True,
                auto_delete=True,
            )

        self.bot.slash.get_cog_commands(self)

    def cog_unload(self):
        self.bot.slash.remove_cog_commands(self)

    @cog_ext.cog_slash(name="test_cmd", description="Test", guild_ids=[640522864214278155])
    async def _test_cmd(self, ctx: SlashContext):
        await ctx.send(content="I have not implemented this")

In this case, the command shows up successfully but only after a bot restart but not a cog reload.
Adding an additional command to the cog:
    @cog_ext.cog_slash(name="testing", description="Testing", guild_ids=[640522864214278155])
    async def testing_cmd(self, ctx: SlashContext):
        await ctx.send(content="I have not implemented this")

and reloading the cog the first command is present but the new command is not.
It seems that auto_register only runs register_all_commands on initialization and not on cog loads and unloads. Perhaps running whenever a cog is loaded/unloaded would be better behavior?
To work around this issue I have altered my init and unload functions like so:
    def __init__(self, bot):
        self.bot = bot

        if not hasattr(bot, "slash"):
            bot.slash = SlashCommand(
                bot,
                override_type=True,
            )

        self.bot.slash.get_cog_commands(self)
        self.bot.loop.create_task(self.bot.slash.register_all_commands()) #<-- Added to update commands on load

    def cog_unload(self):
        self.bot.slash.remove_cog_commands(self)
        self.bot.loop.create_task(self.bot.slash.delete_unused_commands()) #<-- Added to remove commands on unload

With this alteration commands now show up on cog load, and disappear on cog unload as expected.

I have added a description with no change. Code is as follows:
    def __init__(self, bot):
        self.bot = bot

        if not hasattr(bot, "slash"):
            bot.slash = SlashCommand(
                bot,
                auto_register=True,
                override_type=True,
                auto_delete=True,
            )

        self.bot.slash.get_cog_commands(self)

    def cog_unload(self):
        self.bot.slash.remove_cog_commands(self)

    @cog_ext.cog_slash(name="test_cmd", description="Test", guild_ids=[640522864214278155])
    async def _test_cmd(self, ctx: SlashContext):
        await ctx.send(content="I have not implemented this")

In this case, the command shows up successfully but only after a bot restart but not a cog reload.
Adding an additional command to the cog:
    @cog_ext.cog_slash(name="testing", description="Testing", guild_ids=[640522864214278155])
    async def testing_cmd(self, ctx: SlashContext):
        await ctx.send(content="I have not implemented this")

and reloading the cog the first command is present but the new command is not.
It seems that auto_register only runs register_all_commands on initialization and not on cog loads and unloads. Perhaps running whenever a cog is loaded/unloaded would be better behavior?
To work around this issue I have altered my init and unload functions like so:
    def __init__(self, bot):
        self.bot = bot

        if not hasattr(bot, "slash"):
            bot.slash = SlashCommand(
                bot,
                override_type=True,
            )

        self.bot.slash.get_cog_commands(self)
        self.bot.loop.create_task(self.bot.slash.register_all_commands()) #<-- Added to update commands on load

    def cog_unload(self):
        self.bot.slash.remove_cog_commands(self)
        self.bot.loop.create_task(self.bot.slash.delete_unused_commands()) #<-- Added to remove commands on unload

With this alteration commands now show up on cog load, and disappear on cog unload as expected.

Just to clarify it seems like the issue here is that the commands are not registered when the cog is reloaded, not the entire bot reloaded.
I had a look at what auto_register actually does, and the problem is that the commands are only registered when the cog is first loaded.
The expected behaviour would be that it registered any new commands on cog reload.
We've managed at find a work around, calling self.bot.loop.create_task(self.bot.slash.register_all_commands()) in __init__ of the cog
But it would be good if the library registered them on reload itself (when auto_register is True
Note: there is the same issue with auto_delete

Just to clarify it seems like the issue here is that the commands are not registered when the cog is reloaded, not the entire bot reloaded.
I had a look at what auto_register actually does, and the problem is that the commands are only registered when the cog is first loaded.
The expected behaviour would be that it registered any new commands on cog reload.
We've managed at find a work around, calling self.bot.loop.create_task(self.bot.slash.register_all_commands()) in __init__ of the cog
But it would be good if the library registered them on reload itself (when auto_register is True
Note: there is the same issue with auto_delete

First of all, currently auto_register is originally called only once after on_ready is dispatched since this extension originally didn't support cogs properly, but it is now. I think there won't be any problems due to constant command register things, so supporting feature needed at this issue should have no problem.
I'll make sure automatic slash command register/delete on cog load/unload feature is added at maybe 1.0.9.

First of all, currently auto_register is originally called only once after on_ready is dispatched since this extension originally didn't support cogs properly, but it is now. I think there won't be any problems due to constant command register things, so supporting feature needed at this issue should have no problem.
I'll make sure automatic slash command register/delete on cog load/unload feature is added at maybe 1.0.9.

Implemented, will be included at next release.


Feature: Implemented Privacy Policy Webpage

Related Issue
Closes #170
Description
This pull request addresses the issue #170, which involves adding a separate Privacy Policy webpage to the "Top Secrets" website. The goal is to enhance the platform's compliance with legal regulations, bolster user trust, and fortify its credibility by prioritizing user privacy.
Screenshots

Original
Updated

Privacy Policy Webpage

Checklist

[x] My code adheres to the established style guidelines of the project.
[x] I have included comments in areas that may be difficult to understand.
[x] My changes have not introduced any new warnings.
[x] I have conducted a self-review of my code.

@Kritika30032002 Could you plz tell what is the issue with my PR title ?

email is collected during login

don't worry about pr title

don't worry about pr title
@Kritika30032002
Okay Mam!
Please review my contribution and merge it .

email is collected during login

update data collection according to this

email is collected during login

update data collection according to this

@Kritika30032002

Done!


use Expect100Continue=true for all ServiceStack requests

CC: @ZocDoc/coreinfrastructure
@kyle-fritz-zocdoc
This is the fix I was describing on Monday.
I list 7 issues below, and prioritize them as "blocking" and "non-blocking". Please review this prioritization.
Blocking concerns:

Does this change work, i.e. sets Expect100Continue, and decreases prod latency to be << 10 ms?
Does this change affect the other HttpRequests made in the Monolith?
Does this change hurt MSA->MSA request performance?

Non-blocking concerns:

Could the idle-timeout clear the value of servicePoint.Expect100Continue, before the request is actually sent out?
What is the actual mechanism that is slowing down these Monolith -> MSA requests?
Why is Expect100Continue 'false' in prod and 'true' everywhere else?
Does prod actually depend on a global 'Expect100Continue == false'

I weakened this PR to be safe to merge immediately.
Behavior now defaults to "old behavior". New behavior is enabled by passing a flag through ServiceClient