Feature Request: Logo and Name

Hello,
I found your software through https://garmin.watchfacebuilder.com/. Transferring the design to the smartwatch worked well.
I still have two feature requests.

it would be handy if you can change the name so that it shows in the Garmin Connect.

to set a logo, which is displayed in the Garmin Connect. If you have several similar designs without a picture the selection is confusing.

Thanks for the suggestions.
To change the name, you can do it in the builder, (click localization button under global section, and update the AppName string value)
Garmin connect IQ app pulls the watch face's image from their server, not read the prg file and use the launch icon inside it. Because of that your sideloaded prgs will always show empty square icon in Garmin connect IQ app.

Your screenshot shows better description than mine.  Mine looks like this, all squares. :-(


Feature request to support NTLM and Kerberos authentication

What happened?
No support to crawl websites which have NTLM or Kerberos authentication.
What should have happened?
Should have an option for selecting various Authentication mechanism like NTLM etc, as there is no way to authenticate and then use the crawler module to crawl for NTLM and Kerberos based websites.

As a workaround, you can use CNTLM, a local http proxy for NTLM authentification and use the proxy properties.


Unable to use more than one apps with QueryClientProvider on page

Describe the bug
In my scenario I need to host more than one react application on one page.
Each of app uses react-query v3, app wrapped with QueryClientProvider (I can reproduce it with CRA apps with just your "overview" sample code (https://codesandbox.io/s/github/tannerlinsley/react-query/tree/master/examples/simple)).
When I open page with these apps, only one of them running fine, and others fails with error:
No QueryClient set, use QueryClientProvider to set one
Maybe it's because of using window.ReactQueryClientContext for context storage of app, what makes impossible to use many react-query context on one page with many apps (https://github.com/tannerlinsley/react-query/blob/master/src/react/QueryClientProvider.tsx#L9).
If I use just one app with many QueryClientProviders it's works ok.
If you can suggest any workarounds for this issue, I will appreciate it. Thank you.
To Reproduce
Steps to reproduce the behavior:

Build 2 apps with example from here: https://codesandbox.io/s/github/tannerlinsley/react-query/tree/master/examples/simple
Host these 2 apps with one html page (I just build two CRA apps and then add div and scripts from one app index.html to another).
Serve this overall html (I did just serve -s build).
See error. First app crashes, but second runs fine.

Expected behavior
Every separate apps runs without react-query related errors and with react-query functionality.
Additional context
I tried to add some timeout for render of second app, and it's works but only for the first serve of html. Than, after page reload errors returns.
setTimeout(() => {
  ReactDOM.render(
    <React.StrictMode>
      <App />
    </React.StrictMode>,
    document.getElementById("app2")
  );
}, 1000);

I have the same issue, we have a rails app that we are slowly moving over to react and this has been a problem since we upgraded to v3.  Love the library, let us know what we can do to help!

I think simpliest solution will be adding optional property to QueryClientProvider and using it for placing context to window.
So for such edge cases one can use unique window property for each application.
There is quick and dirty concept. I think it's far from ideal and maybe @tannerlinsley will suggest something better, but for the idea:
import React from 'react'

import { QueryClient } from '../core'

const defaultClientContextName = "ReactQueryClientContext";

const QueryClientContext = (() => {
  const context = React.createContext<QueryClient | undefined>(undefined)
  if (typeof window !== 'undefined') {
    // @ts-ignore
    window[contextName ?? defaultClientContextName]  = context
  }
  return context
})()

function getQueryClientContext(contextName?: string) {
  return typeof window !== 'undefined'
    ? // @ts-ignore
      (window[contextName ?? defaultClientContextName] as React.Context<
        QueryClient | undefined
      >) ?? QueryClientContext
    : QueryClientContext
}

export const useQueryClient = (contextName?: string) => {
  const queryClient = React.useContext(getQueryClientContext(contextName))

  if (!queryClient) {
    throw new Error('No QueryClient set, use QueryClientProvider to set one')
  }

  return queryClient
}

export interface QueryClientProviderProps {
  client: QueryClient
  contextName?: string
}

export const QueryClientProvider: React.FC<QueryClientProviderProps> = ({
  client,
  contextName,
  children,
}) => {
  React.useEffect(() => {
    client.mount()
    return () => {
      client.unmount()
    }
  }, [client])

  const Context = getQueryClientContext(contextName)

  return <Context.Provider value={client}>{children}</Context.Provider>
}

Why do we have to attach the queryClient to the window at all @tannerlinsley @boschni ? And why is useQueryClient using that window.ReactQueryClientContext to look it up? Should this not just be:
- const queryClient = React.useContext(getQueryClientContext())
+ const queryClient = React.useContext(QueryClientContext)

Tracked it down to: https://github.com/tannerlinsley/react-query/pull/1360/commits/e8a22e914101fb35b48f6b335ba73644417583dd .
Looks like this was added to support multiple react query versions in one app but I don't know the specifics.

I'm looking into the issue right now. This was originally necessary for React Query's context to survive beyond different bundle boundaries, otherwise, the React.context reference would be created once for each bundle involved. If React context could work by matching up context by unique ID and not equality === 🤦♂, this wouldn't be an issue.
I'll report back in a bit.

So far, I haven't been able to reproduce this in the way you described.
Here is a codesandbox of my reproduction attempt: https://codesandbox.io/s/nice-water-y5ojm?file=/src/index.js
And this is its deployment to vercel in production: https://csb-y5ojm-o3y0wov6c.vercel.app/
The deployment seems to be working as expected with no issues, however I did notice the following error:
No QueryClient set, use QueryClientProvider to set one
When in development mode and when hot reloading to a new state in the app.

It's my birthday today, so I'm going to put a pin in this one and check back tomorrow. If anyone can nail down the reproduction any better, let me know!

There is reproduction (release bundles deployed to netlify): https://react-query-issue-demo.netlify.app/
Key difference that there is two separate bundled apps, placed to one html pages.
As you can see, there is only App2 rendered, and there is errors in console.
If you want, I can push the repos with source code, but it's basically CRA with typescript bootstrapped code with App.tsx changed to your demo. App1 rendered to div with "app1" id, and app2 rendered to div with "app2".
Our scenario: separated react apps, hosted at asp.net web application.
There is another scenario - SharePoint Framework web parts for using with SharePoint Online.
SharePoint and Microsoft Teams is huge and growing enterprise platform with large developers community. I think I am a biggest fan and advocate of react-query in Russian SharePoint developers community, and if I can help somehow to bring ability of using v3 of react-query in that scenarios, I will be happy to do that.

I see. I’ll have to dig into this tomorrow.

Thank you. Happy birthday!

Happy Birthday, also amazing library.
Having the same issue. We have a micro front ends build with a handful of React apps and are also getting this exact issue.

Happy Birthday! This is an amazing library. Thank you so much.
We have a micro frontends build with multiple react apps in a single DOM. We are also getting this exact issue.
I hope you have an amazing Birthday.

If React context could work by matching up context by unique ID and not equality === 🤦♂, this wouldn't be an issue.

you may be able to leverage displayName in the context.
const MyContext = React.createContext(/* some value */);
MyContext.displayName = 'MyDisplayName';

https://reactjs.org/docs/context.html#contextdisplayname

That would help the display name in the devtools, but not the larger issue unfortunately.
Tanner Linsley
On Feb 10, 2021, 4:52 PM -0700, Adam Lusted<EMAIL_ADDRESS>wrote:

If React context could work by matching up context by unique ID and not equality === 🤦♂, this wouldn't be an issue.
you may be able to leverage displayName in the context.
const MyContext = React.createContext(/* some value */);

MyContext.displayName = 'MyDisplayName';
https://reactjs.org/docs/context.html#contextdisplayname
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi, not adding much to the discussion, except for +1'ing the issue. We are also in a similar situation. We are evaluating RQ and are pretty impressed with it, but this use-case is kind of a show-stopper for us to continue. Hopefully, the fine guys behind RQ will come up with a solution soon 👍

@tannerlinsley we are also in the process of using multiple microfrontends on the same page, each one using / wanting their own QueryClientProvider, son I’m sure we’ll see the issue as well quite soon.
I haven’t fully understood the need for attaching to the window yet, but if we need that, I think the optional context name suggested by @NZainchkovskiy  would work. It could alternatively also maybe be a name/id field on the QueryClient itself.

Again, React contexts are not matched by display name or any string matching. They are matched with a reference equality comparison.
So let’s say you have a react query dep bundled in one app and another react query dep bundled in another. These two different bundles will not resolve the same React Query module instance when loaded in same browser instance (unless you’re using module federation, which is still very early and uncommon) and thus, you will have 2 separate context instances running simultaneously. The only ways to share and use React contexts across module boundaries are:

Move the context instance to a module that is shared between both packages at runtime, like a peer dependency within the same app bundled, or
Move the context to a shared federated module, or
Allow the first executed context module create a shared context instance in a shared location (like window), and have all other bundles resolve from that shared location.

Maybe I missed something, but in our scenario we don't need to share react-query context between apps. It's completely separated apps. Just need to have them running on the same html page. Now, because of using window property, it's impossible. Just to clarify the issue.

The third point is working. But now each provider creates a new instance of the React context and overwrites in window.ReactQueryClientContext. If use a previously created context from window.ReactQueryClientContext the queries work in many applications on a single page.

I did not know that sharing contexts between bundled apps on the same page is a thing. Judging from the responses here, I would think that this should be an opt-in feature, and the default should just be whatever context does. At least we need a way to have multiple microfrontends work with independent contexts on the same page.

About shared location — aside mentioned opt-in, I think there's some concurrent issue. As I mentioned before, settimeout resolves issue for the first run. I suspect that second instance check for shared instance before it's been created and create a new one. Maybe some lock will help.

I've got a potential fix here: #1805, but could use some extra validation/testing outside of our unit tests (which are all single-module context 🤷♂ 😂 )

I've got a potential fix here: #1805, but could use some extra validation/testing outside of our unit tests (which are all single-module context 🤷♂ 😂 )

Thank you so much!
I tested it and now it's works like a charm!

Hi! Thanks for the quick fix. I tried the changes and it works great!
However, I noticed following warning the Dev Console. (Also ensured I had latest React/ React DOM).
Warning: Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.
Something to be worried about?

I’ve never seen that before TBH. Is your app working correctly?

The app seems to working as expected. I haven't seen that before either. Here's what i did.

Was previously on RQ 3.5.16
Tried to add same app bundle on couple of different locations on same page.
One of the apps crashed for reasons originally in this issue
Upgraded to RQ to latest, 3.9.7
Now, both app load OK, but I get this warning every time I interact with individual apps.

Please note: This warning does not occur if I have single RQ app on page.
Hi @NZainchkovskiy, can you please confirm if you noticed this warning in your test with the latest fix? Thanks.

Are you perhaps using React dom inside of another element that is being rendered with React dom?
https://github.com/reduxjs/react-redux/issues/355#issuecomment-607988421

Thanks for the suggestion. I am pretty sure that's not the case. But i will dig deeper and try to come back with a codesandbox example. Thanks for the help.

Hi again, so, in spirit of trying crude approaches, I commented out all of the code within getQueryClientContext() except for the defaultContext return statement and the warning went away. Maybe it is somehow related to sharing context across multiple react query apps. The warning does mention, QueryClientProvider in the stack trace.
I understand this is crude and perhaps don't want to do in the library.
I am open to investigating more, appreciate any pointers/ suggestions/ leads.  Kind of hitting the wall :(. Thanks!

From what I've seen, this can happen when you use the same context instance across multiple react apps on a single page, but the functionality of the apps is unchanged. I'll do some more digging, but every other github issue on this I've found doesn't really resolve in anything other than "just disregard the warning as long as everything is working" 🤷♂

Hi @tannerlinsley, so, I managed to have the issue consistently show up.
I created a bare bone Django app that hosts couple of react (query) apps within django template. Wasn't super sure where/ how I could host the app, so, I added the source code in git at https://github.com/vago/react-query-issue. Also, present in the repo is a demo - react_query_demo.mov that shows it in action. Hope this helps.
Also, out of curiosity, once your BroadcastChannel related experiment goes thru', would there be a need for sharing context across React apps?

Hi again, did you get a chance to look at the issue? Sorry for nagging, but I am looking forward to get this solved and continue with React Query. This has sort of paused our continuation.
If it were just 1 time warning on load, it would still be ok to ignore, but the warning shows up every time we interact with the app - polluting dev console and decreasing developer confidence.
Since React does not seem to support sharing of contexts across apps, would it be feasible to provide a configuration/ setting where we don't use shared contexts? Or some other way.. Looking for solutions/ workarounds to get going.
Thanks again for your help!

Using RQ 3.12.0, and still have this problem. I'm running Rails app with multiple React instances in different places, and this (No QueryClient set, use QueryClientProvider to set one) happens even if there is only one react component on the page.

I am having the same issue, I needed to patch the lib with patch-package to keep using it.
diff --git a/node_modules/react-query/es/react/QueryClientProvider.js b/node_modules/react-query/es/react/QueryClientProvider.js
index 931fc28..6880fe8 100644
--- a/node_modules/react-query/es/react/QueryClientProvider.js
+++ b/node_modules/react-query/es/react/QueryClientProvider.js
@@ -8,7 +8,7 @@ var defaultContext = /*#__PURE__*/React.createContext(undefined); // We share th

 function getQueryClientContext() {
   // @ts-ignore (for global)
-  if (typeof window !== 'undefined') {
+  if (false) {
     if (!window.ReactQueryClientContext) {
       window.ReactQueryClientContext = defaultContext;
     }

We "turned off" context sharing, it solved the problem, but I don't think it was the best solution.

With all the issues being reported here, what would you think about turning context sharing off per default and making it opt-in via a prop passed to the QueryClient upon creation @tannerlinsley ?

I would be okay with that. Or just document how to do it in your own.
Tanner Linsley
On Mar 3, 2021, 4:44 PM -0500, Dominik Dorfmeister<EMAIL_ADDRESS>wrote:

With all the issues being reported here, what would you think about turning context sharing off per default and making it opt-in via a prop passed to the QueryClient upon creation @tannerlinsley ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Moved from react-rails to react_on_rails, still happening. So, that's definitely wasn't an issue :(

what would you think about turning context sharing off per default and making it opt-in via a prop passed to the QueryClient upon creation

I took a quick look, but not really sure how to achieve this. if we pass a flag or a custom context name to the query client constructor or to the QueryClientProvider as a prop, we can set this up on the window, but every time we call useQueryClient, we'd need to know the name before we get the queryClient. But we don't have the name yet because we don't have gotten the client yet. A bit of a chicken-egg problem.
For my understanding: What happens if I mount the same microfrontend twice on the same page? Will they share the same QueryClient and QueryCache? From what I can tell, we are "just" sharing the same instance of context, but I'm having a hard time grasping what that means or what that does exactly...

I think I have a solution involving another context 😅 , have a look here: https://github.com/tannerlinsley/react-query/pull/1912
can someone try this out maybe on their app?


Debug Honeybadger notify for annotation export

Added a debug notification to Honeybadger to provide more information on the project 2886's classification CSV export error.
Review checklist

[ ] First, the most important one: is this PR small enough that you can actually review it? Feel free to just reject a branch if the changes are hard to review due to the length of the diff.
[ ] If there are any migrations, will they the previous version of the app work correctly after they've been run (e.g. the don't remove columns still known about by ActiveRecord).
[ ] If anything changed with regards to the public API, are those changes also documented in the apiary.apib file?
[ ] Are all the changes covered by tests? Think about any possible edge cases that might be left untested.

LGTM pending the hound errors and a travis run.

Pretty sure that hound error is outdated and Travis is still MIA. I don't see a "re-run all the checks, for real this time, geeze github come on" button


[FR] Add basic support for GraphQL

Description
Currently when trying to get data via GraphQL you only have access to whatever the AssetInterface has. Meaning you can't return anything useful for this plugin.
Would be great to add even the most basic of support when possible 🙏
Other information

Embedded Assets version: 2.2.1
Craft CMS version: 3.4.10

Hi @mediabeastnz,
Sure we can look into adding GraphQL support for Embedded Assets.

@pvldigital Any update on this one?

Hi @sunscreem,
I've been swamped with doing projects so I haven't been able to look at our plugins at all. This means I haven't made any meaningful changes for GraphQL. Thankfully @ttempleton is back and currently maintaining our plugins. I'll let him know about his feature request and will decide how we go from there.

@pvldigital @ttempleton We’re reaching a point where we really need to get this working for an upcoming launch. Happy to PR, but being this plugin isn’t a field per se I wasn’t sure what the GQL solution would be. What were you thinking for this?

I've been thinking about whether we could add an embeddedAsset query similar to the existing asset/assets queries, which would essentially be internally querying for Craft assets using the same arguments, and then converting them to embedded asset data.  I'm not sure how well that would work, but it's the most potentially viable idea that I've thought of at this point.  I definitely welcome any other suggestions for how it could work, though.

Thanks for your thoughts, @ttempleton.
I think there’s a few options here...
Option 1: Add a query
Like you suggest, we could add something to query assets.
The one key issue with approach is that we’d have to send a second GQL request as (currently) Craft has no way of using another query response (à la Apollo Link’s @export direction).
{
  entry(id: 123) {
    ... on xyz_xyz_Entry {
      myAssetField {
        id # 456
      }
    }
  }
}

{
  embeddedAssets(id: [456]) {
    html
  }
}

Option 2: Piggyback an existing query
I’ve not done anything like this, but SEOmatic has a method that ‘piggybacks’ an existing element query. This feels very clean to me on the surface.
{
  entry(id: 123) {
    ... on xyz_xyz_Entry {
      myAssetField {
        embeddedAsset {
          html
        }
      }
    }
  }
}

Related issue discussing this: nystudio107/craft-seomatic#483
Option 3: Introduce a directive
This idea’s a bit more left field, perhaps. A @contents, or similarly named, directive could be used to return the contents of the stored JSON. This could be useful outside of the scope of the plugin’s use case, which could be a positive or a negative, depending on how you look at it.
{
  entry(id: 123) {
    ... on xyz_xyz_Entry {
      myAssetField {
        url @contents(cacheDuration: 86400)
      }
    }
  }
}

Thanks @joshuabaker -- the piggybacking option is excellent, I've had success implementing it today which is now in the feature/graphql-support branch.  Will do further testing and make any improvements required over the next couple of days, but as long as no serious issues come up, this will be released at the end of the week.

Embedded Assets 2.4.0 has just been released with GraphQL support.


MPW6 designs added

Signed-off-by: vijayank88<EMAIL_ADDRESS>Following MPW6 design added to CI:
SonarOnChip8
yonga-can-controller

@vvbandeira
Its a just counter module taking too long runtime. counter_alperen and counter_eeuet
Problem with set ::env(PL_BASIC_PLACEMENT) 1
Now its been removed. My local run completed quickly. Let see in CI, how it goes.


website: Add post for v23.1 release

@Harshil2107, @ivanaamit, and @BobbyRBruce  Please go through this carefully. I literally just used chatGPT to write it and haven't done anything else, yet. This will need some heavy editing, I think.


plugins/cmp-git: move to by-name

m

Oops, went too fast on the CLI!

error: path '/nix/store/XXX-source/plugins/by-name/cmp-git/settings-options' does not exist

Also: conflict

@mergify queue


Batch package installs can just be "winget install x; winget install y" for now.

May need to run it in PowerShell unless CMD supports using semicolons to split/join commands. The last semicolon will have to be trimmed before being passed to CMD as well.

CMD uses "&&" to separate multiple commands, so maybe remove the last instance of " && ", including the spaces.

Should probably have an option to specify whether installation should continue on error. Maybe this could be a checkbox saying, "Continue applying changes when an error occurs"
This would be differentiated with using " & " for continuing on error and " && " for stopping on error.
The checkbox can be placed into another window, maybe Tools>Options... on an Apply changes tab. This tab would have a link label on the Apply changes window that opens it, maybe labeled "More options..." as there's already an option to do interactive installations.

Had a bit of an issue with text here, even though this is off-topic:

It's implemented now, just have to close this issue.


shufflenet_weights

Hello everyone.
Your work looks really interesting so i downloaded everything to try i out. Unfortunetaly there are no pretrained weights for  your shufflenet. Will you publish them at any time?
Regards!
edit: at the moment i only have a jetson tx2 avaible , so train it by my self would be a little tricky because of some lacking ressources, right?

Yes we will publish the Shufflenet pretrained weights and the model trained on cityscapes by end of June. We are finalizing some experiments then we will publish all.
Thanks for your patience


_update_zsh_update:1: permission denied

Whenever I open up my terminal I get prompted to update, and then I get this error (Both Y/N answers) _update_zsh_update:1: permission denied: /Users/webdev1/.zsh-update
[Oh My Zsh] Would you like to check for updates? [Y/n]:
Updating Oh My Zsh
From https://github.com/robbyrussell/oh-my-zsh
 * branch            master     -> FETCH_HEAD
Current branch master is up to date.
         __                                     __
  ____  / /_     ____ ___  __  __   ____  _____/ /_
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/
                        /____/
Hooray! Oh My Zsh has been updated and/or is at the current version.
To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh
Get your Oh My Zsh swag at:  http://shop.planetargon.com/
_update_zsh_update:1: permission denied: /Users/webdev1/.zsh-update
 tommaso@TR ~

sudo？
吴

在 2016年1月4日，17:03，Tommaso Ricci<EMAIL_ADDRESS>写道：
Whenever I open up my terminal I get prompted to update, and then I get this error (Both Y/N answers) _update_zsh_update:1: permission denied: /Users/webdev1/.zsh-update
[Oh My Zsh] Would you like to check for updates? [Y/n]:
Updating Oh My Zsh
From https://github.com/robbyrussell/oh-my-zsh

branch            master     -> FETCH_HEAD
Current branch master is up to date.
__                                     __
____  / /_     ____ ___  __  __   ____  / /
/ __ / __ \   / __ ` / / / /  /  / / / __
/ // / / / /  / / / / / / // /    / /(_  ) / / /
_// //  // // //_, /    //// //
/____/
Hooray! Oh My Zsh has been updated and/or is at the current version.
To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh
Get your Oh My Zsh swag at:  http://shop.planetargon.com/
_update_zsh_update:1: permission denied: /Users/webdev1/.zsh-update
tommaso@TR ~
—
Reply to this email directly or view it on GitHub https://github.com/robbyrussell/oh-my-zsh/issues/4744.

@wuhongbing commented on 4 gen 2016, 10:05 CET:

sudo？
吴
[…](#)
 在 2016年1月4日，17:03，Tommaso Ricci<EMAIL_ADDRESS>写道：
Whenever I open up my terminal I get prompted to update, and then I get this error (Both Y/N answers) _update_zsh_update:1: permission denied: /Users/webdev1/.zsh-update
[Oh My Zsh] Would you like to check for updates? [Y/n]:
Updating Oh My Zsh
From https://github.com/robbyrussell/oh-my-zsh

branch            master     -> FETCH_HEAD
Current branch master is up to date.
__                                     __
____  / /_     ____ ___  __  __   ____  / /
/ __ / __ \   / __ ` / / / /  /  / / / __
/ // / / / /  / / / / / / // /    / /(_  ) / / /
_// //  // // //_, /    //// //
/____/
Hooray! Oh My Zsh has been updated and/or is at the current version.
To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh
Get your Oh My Zsh swag at:  http://shop.planetargon.com/
_update_zsh_update:1: permission denied: /Users/webdev1/.zsh-update
tommaso@TR ~
—
Reply to this email directly or view it on GitHub <#4744>.

Sudo what? I didn't run any command :laughing:

sudo rm ~/.zsh-update
—
Marc
El 4/1/2016 10:12, "Tommaso Ricci"<EMAIL_ADDRESS>escribió:

@wuhongbing https://github.com/wuhongbing commented on 4 gen 2016,
10:05 CET
https://github.com/robbyrussell/oh-my-zsh/issues/4744#issuecomment-168616378
:
sudo？ 吴
…
在 2016年1月4日，17:03，Tommaso Ricci<EMAIL_ADDRESS>写道： Whenever I
open up my terminal I get prompted to update, and then I get this error
(Both Y/N answers) _update_zsh_update:1: permission denied:
/Users/webdev1/.zsh-update [Oh My Zsh] Would you like to check for updates?
[Y/n]: Updating Oh My Zsh From
https://github.com/robbyrussell/oh-my-zsh

branch master -> FETCH_HEAD Current branch master is up to date. __ __
____ / /_ ____ ___ __ __ ____ / / / __ / __ \ / __ ` / / / / / /
/ / __ \ / // / / / / / / / / / / // / / /(_ ) / / / _// //
// // //_, / //// // /____/ Hooray! Oh My Zsh has been
updated and/or is at the current version. To keep up on the latest news and
updates, follow us on twitter:
https://twitter.com/ohmyzsh Get your Oh My
Zsh swag at: http://shop.planetargon.com/
_update_zsh_update:1: permission denied: /Users/webdev1/.zsh-update
tommaso@TR ~ — Reply to this email directly or view it on GitHub <#4744
https://github.com/robbyrussell/oh-my-zsh/issues/4744>.

Sudo what? I didn't run any command [image: :laughing:]
—
Reply to this email directly or view it on GitHub
https://github.com/robbyrussell/oh-my-zsh/issues/4744#issuecomment-168617494
.

@mcornella When I got that error I tried a ls -ahf and no such file was listed at all

@Zorgatone commented on 4 gen 2016, 13:30 CET:

@mcornella When I got that error I tried a ls -ahf and no such file was listed at all

Nevermind.. The file was there. I just was trying to execute it sudo ~/.zsh-update and I was getting "Invalid command .zsh-update". Fixed with ~/.zs-update thanks @mcornella

:+1:


Custom uv_stream_t implementations

libuv should add a stream interface to allow developers to add their own uv_stream_t types, in order to build pluggable steams directly on top of the friendly libuv interface.  This way, if someone wants to create a TLS stream for example, they can do so and consume that stream exactly the way they would consume a TCP stream for example.  This would greatly help the libuv ecosystem, solve the TLS gap, yet not fill that gap by relying directly on a particular TLS implementation.
Apologies if this is a dupe.

I've also been looking into using libuv in some new and interesting ways, and am staring at all the special case handling in stream.c and other places.  It looks like the stream type inheritance is implemented data-wise, but not code-wise.  I think some well-placed function pointers could really make the streams extensible.  Maintainers, would you like to chime in on something like this?  I bet it could be done incrementally, but ultimately we would be talking about some fundamental refactoring here.

What things would you need? Do you have any concrete proposal in mind? At a quick glance I see 2 types of possible extensions:

extending an existing stream: TLS on top of TCP, for example
new streams: a file i/o stream, for example

The first type is already possible, but the second not so much, is this what you have in mind?

I'm more interested in something like the second one.  I'm actually investigating this for a work project.  We need a platform abstraction layer we could use in embedded and desktop environments.  This would include Windows, Linux, QNX, and potentially RTOSes like SYS-BIOS and others.  Part of this would include streams that represent inter-processor communications for multi-core devices (e.g. from the main ARM to a DSP or auxiliary core).  On the more experimental side, we are also looking to try out async audio, and if the streams were extensible enough, we would use it.  Also, in a few cases, it could make sense to have an in-process memory stream.
At any rate, most of these streams wouldn't make much sense to code directly into libuv.  However, loading them as shared libraries would work very nicely.  We're prepared to do a good amount of work here with libuv as the basis of our platform abstraction layer, but I'm looking to work with you to see how much of this could be given back to benefit libuv.
I've been looking at this the last few days and have the beginnings of a proposal.  Please let me know your thoughts:

Add ability in libuv to load stream modules from shared libraries.
Each custom stream type would need to somehow append to the UV_HANDLE_TYPE_MAP
Add function pointers to the uv_stream_t structure to do the work of uv__stream_open, uv_udp_open, etc.  This could also help break up some of the stream-dependent code that exists in stream.c.  This may be able to be done incrementally.

I am willing to whip up a prototype for this to see what it would look like.
There's only one thing I'm still not sure of.  For certain stream types, the fd and flag parameters may not apply.  I wonder if that could be fully encapsulated in the separate functions for each stream or if there are pitfalls I'm not aware of.

Both of those use cases.
You say the first is possible, but that's not really true.  For example
with TLS on top of TCP, I would expect to be able to use uv_write to write
plaintext data to a uv_tls_t stream type, and under the hood the data is
encrypted and written to the TCP stream.
To achieve that, we would need deeper integration into libuv.  The idea
here is to create new stream types (whether they ride on top of existing
types or not) and use the standard read/write stream APIs directly.  In
other words, no wrappers.
On Friday, March 20, 2015, Saúl Ibarra Corretgé<EMAIL_ADDRESS>wrote:

What things would you need? Do you have any concrete proposal in mind? At
a quick glance I see 2 types of possible extensions:

extending an existing stream: TLS on top of TCP, for example
new streams: a file i/o stream, for example

The first type is already possible, but the second not so much, is this
what you have in mind?
—
Reply to this email directly or view it on GitHub
https://github.com/libuv/libuv/issues/275#issuecomment-84167563.

--
Sent from Gmail Mobile

Tend to have the same feeling as @jnicholls.
Though we can write wrappers like uv_tls_write, which is done at libuv-tls . Having uv_write to handle a pluggable handle will be great.
Last time when I tried, It asserted somewhere on the type of stream,
Currently, in case of OpenSSL, Intergrating it with libuv is easy with BIO pair.
But other SSL engine which does not have BIO like facility will not be easy.
If we have a pluggable stream type, which module writer to take care of uv_read_start and uv_write
might help.

I've been looking at this the last few days and have the beginnings of a proposal. Please let me know your thoughts:

Add ability in libuv to load stream modules from shared libraries.
Each custom stream type would need to somehow append to the UV_HANDLE_TYPE_MAP
Add function pointers to the uv_stream_t structure to do the work of uv__stream_open, uv_udp_open, etc. This could also help break up some of the stream-dependent code that exists in stream.c. This may be able to be done incrementally.

At a first glance that sounds like a lot of internal changes. Here is a counter proposal:

Add a new "custom" stream type, which takes a few function pointers to fo the reading and writing.
Make uv_read_start and uv_write dispatch to the right place based on the stream type.
Profit?

This is at a back-of-a-napkin-design-level. If you want to pursue this you'll need to write a LEP (https://github.com/libuv/leps) and be ready to provide an implementation with tests.

I think that proposal is fine and the appropriate step to take that doesn't affect current streams.  If it's implemented correctly, it would be the basis for migrating existing streams over to it.  Having that in place is half the work.

saghuls approach sounds easier to implement, is anyone up for writing a lep?

@saghul , I like your proposal, it would definitely be less intrusive that my original proposal.  I also agree with @jnicholls , that this could the the basis for a larger internal refactoring if so desired later on.  I'm all for incremental steps.
I'm willing to start the process here and write a LEP, although I've never done this and probably don't know what I'm in for.  However, I've been wanting to get more involved in open-source--looks like this could be a good opportunity.

@coderkevin great! You can check the example LEP and the ones sent as pull-requests.

@coderkevin, If you need a hand. Please let me know. Would be happy to dirty my hand with this.

Thanks @deleisha.  I'll get started and let you know when I have something to review.

I have submitted a PR for the Custom UV Streams LEP.  It's the first draft, so please look it over and let me know what is missing or wrong.  Thanks!
https://github.com/libuv/leps/pull/7

Hello, I was hoping to bump this a bit, as I've written and updated the LEP for it a few times here:
https://github.com/coderkevin/leps/blob/custom_uv_streams/XXX-custom-uv-streams.md
Also, I've been working a bit with the implementation I mention in the LEP.  So far, I've got a custom stream implemented in a test using a socketpair where one socket is the custom stream and the other is external to libuv.  I feel this is a fairly accurate model for a socket-type stream integration.  Please feel free to look over what I've done in the fork here:
https://github.com/coderkevin/libuv/tree/custom-streams
So far, I haven't really gotten any feedback on the LEP or the fork, and I'd like to get this feedback earlier rather than later.  That's the whole point of the LEP process, right?  So I'd appreciate any feedback that folks have time to provide.  Thanks!

@coderkevin I'll take a look at this early next week, thanks for working on it!

Sorry for being late. @coderkevin, is the custom-stream branch still still available?

Yes, but this is the current branch I'm looking at right now.  I've been trying a couple of different approaches for non-epollable streams, but I could probably use some guidance in this area.
https://github.com/coderkevin/libuv/tree/custom-streams-non-epoll
For the epollable streams, it was fairly easy to get working in tests with a socketpair, but I'm sure I'm missing something.  Also, I didn't bother to implement any listen/accept functionality, but here's the finished proof-of-concept branch for epollable streams:
https://github.com/coderkevin/libuv/tree/custom-streams-orig
Thanks for taking a look!  Any feedback is appreciated.  I'm no advanced C expert, so I probably have missed some things.

Thanks @coderkevin, I am also not a extensive C programmer.
A quick glance shows that We are having a concrete uv_custom_t. Will having a macro like
#define UV_HTTP_FIELDS                  \
     //data are defined here

/* takes two argument so as to get away from upper casing in macros
#define UV_CUSTOM_TYPE(type, TYPE)    \
   struct uv_##type##_s {             \
             //DATA macros here       \
             UV_##TYPE##_FIELDS       \
   }
typedef UV_CUSTOM_TYPE(http, HTTP) uv_http_t;

improve extensibility.
But not sure if this is doable without much aggression to  libuv. May be larger libuv community can
give better approach.

I was also thinking about this.  However, I have been thinking if it would be better to ditch the void* context to use the existing libuv pattern of extending structs with extra type fields.  The existing concrete uv_custom_t would be the base struct that would be extended, just like uv_stream_s extends uv_handle_s.  So an example custom stream of "myowncustom" type would look as follows:
typedef struct uv_myowncustom_s uv_myowncustom_t;

#define UV_MYOWNCUSTOM_FIELDS
  int first_data_member;                           \
  unsigned long second_data_member;                \
  char* third_data_member;                         \

struct uv_myowncustom_s {
  UV_HANDLE_FIELDS
  UV_STREAM_FIELDS
  UV_CUSTOM_FIELDS
  UV_CUSTOM_PRIVATE_FIELDS
  UV_MYOWNCUSTOM_FIELDS
};

Then you can implement your own functions to init, open, etc, that call uv_custom_init or uv_custom_open.  And you can provide function pointers in the UV_CUSTOM_FIELDS for things that are called internally within libuv.
So, internally, libuv knows what a custom stream is and handles it accordingly, but outside of libuv, nothing ever touches a uv_custom_t handle except for the custom stream implementation itself.  When using your own stream implementation, you'd be using your own datatype that you created.

Yep, I did tried exploring a little bit more on extensiblity so that We can write a TLS stream and http/https. But unfortunately will not work as UV_STREAM_FILEDS private fileds are not accessible
from outside of libuv( there is #undef at uv.h). So this seems to imply that if we follow this route and a user want to write its extension, user have to write within libuv. Again, TLS and http might not be in scope of libuv.
@saghul Any thought will be apperciated.

That's a tough one.  In a general sense, I don't know that it would make sense to give access to uv internals via the custom stream base class, and I don't know that we'd want to expose any more of the stream internals either, as it makes being cross-platform even more difficult.
For something like TLS, maybe it would make more sense to have it reimplement what it would have used from the internals.  There would be duplicate code, but I don't see any cleaner way--especially when the code might span across repos.
Also, with the advent of custom streams, one could implement one TLS stream for Linux, another one for Windows, and another one for OSX, and them just map them with a macro.  That might allow for more clean, optimized implementations of these streams.
Furthermore, maybe the custom TLS stream could be based on a more general-purpose custom stream and extend it from there.

With the current state of libuv extensibility is quite difficult. It seems to me that libuv is more or less designed for developing other functionality on top it.
We will prefer code reuse from libuv. But this will not be possible until libuv opens up some of its internal function.
Also we understand TLS and other higher level protocol will be out of scope of libuv.
But usability can be improved a lot by opening up.

I can agree with that as a good overall end goal.  I just wonder on the best way to get there incrementally.  In the time I've spent in the code so far, there are a ton of assumptions that libuv is in control directly...the read/write fd code, for example makes a lot of these assumptions.  Not only that, but the internals are different based on each platform.
In the spirit of backward compatibility, I wonder if it might be best to copy a lot of this code and separate it out into smaller chunks that can be integrated easier with other code.  During this time, there will be duplicate code; however, if the owners of libuv desire, the original internal implementations could be phased out after the separated-out code has proven itself.

Any plan or thought on this @saghul and @bnoordhuis.

Sorry folks, been quite swamped lately. I hope to look at this next week.

I'm personally not really on board with taking libuv in that direction.  It probably means a lot of internal implementation details become de facto public API.  It's a maintenance drag and increases the friction of future changes.
Also, composition > inheritance.  A TLS stream is a bad example IMO because TCP and TLS live at different levels in the stack.

@bnoordhuis, how would you recommend implementing a TLS stream in this scenario then?  It would either have to have some platform-specific info about the underlying TCP stream, or it would have to implement a TCP stream itself, right?

I'm not seeing why you couldn't implement a TLS stream by simply composing a normal libuv TCP stream and a (custom) TLS state structure, and wrap the recv/send logic using said state according to the TLS spec (roughly: encrypt user bytes in send, decrypt user bytes in recv). No need to know any implementation details about the underlying TCP stream as long as it can connect to something, send and receive bytes, ... same with HTTP, or really any protocol above TCP.
Or am I missing something?

What @TomCrypto said.  Taking OpenSSL as an example, your TCP handle reads data into a BIO that in turn is fed into OpenSSL's state machine.  Likewise for output; OpenSSL will tell you when there is data to write.  io.js and node.js both take that approach and it works fine for them.

We undestand that having TLS and https is out of scope of libuv as it is a IO abstraction layer. The current approach seems to be writing wrappers on top of it. The current approach forces to write wrapper functions like uv_tls_accept and uv_tls_write which is the approach taken in libuv-tls
The intent of this, if I undestood correctly from @jnicholls original description, is to provide a handle to developers to extend it so that we can use uv_accept and uv_write for TLS and http etc. One benifit We can see is that instead of going by memory BIO/BIO pair approach, we can directly use the socket for SSL. That way we can reduce a lot of hacking on little known SSL engine like PolarSSL.
and Yes @bnoordhuis correctly pointed out correctly, This need to open up  some internal functions
as API increasing the maintenance friction for libuv maintainer OR we have to do it in our code modifyng the libuv code, which again add maintenance effort. So the request
Will it be worthful to openup some internal API?
I guess yes, as this will add lot of flexibility and hence improves libuv usability.
A use case under trial now is implementing [redfish] (http://www.dmtf.org/standards/redfish) which will be run on a BMC(service processor). As BMCs are very resource constrained, we would like to use PolarSSL. The WIP is at [deleisha/sagol] (https://github.com/deleisha/sagol) but I am not happy yet :)
Correct me if I miss something.

Ok, after reading the pending messages, re-reading the LEP and checking out some of @coderkevin's code, here are my thoughts:
As I initially said, I see 2 types of integration, once which kind-of replaces stream operations with custom ones, and one which tried to layer itself on top of an existing stream. A "file stream" and a "TLS stream" are respective examples of each.
Now, my idea of replacing some functions can work quite nicely for both at a first glance, but the devil is probably in the details. In a nutshell, a uv_stream_t would have some vtable of operations. The stream functions that (potentially) need replacing are:

uv_listen
uv_shutdown
uv_accept
uv_read_start
uv_read_stop
uv_try_write
uv_write / uv_write2
uv_is_{readable|writable}
uv_stream_set_blocking

We'd need a story for each.
Many of them would not apply for a file stream, for example, so should they be used, ENOTSUP would result.
For a TLS stream, however, those functions would do the TLS dance and then call the same function for the underlying stream, a TCP stream, for example.
The difference between these 2 approaches is that one handles i/o in a completely separate way and the other one uses an existing stream to do the i/o. I don't think considering other options is The Right Thing To Do, I did stop @coderkevin's shm example, but I don't think that's a widely enough required example to go overboard with the API, since it would require exposing significant parts of the internal API, as @bnoordhuis pointed out.
@coderkevin you also have a socketpair example, but that can be easily done today by passing each end to a pipe stream with uv_pipe_open.
The idea of adding a protocol such as HTTP at this level is totally out of the quetion, as far as I'm concerned.
Now, I'm not saying having a variant of this is a bad idea, but I see more drawbacks than I see upsides here, at the moment. One thing I'd like to try is to get some uv-tls implementation land in uv-extras, which would be this collection of community contributed reusable modules, and see how that plays out. Yes, we'll need uv_tls_write and uv_tls_read_start, but decomposing uv_stream_t is not justified enough at the moment, IMHO.
So, I move for closing this, rejecting the LEP (though a variant might reappear inthe future, who knows!) and those interested in the TLS part can work in getting uv-tls in shape, so we try this "blessed components outside of libuv" thing.
We all know more than we did when this discussion started, so thanks everyone for contributing!

@saghul thank you for your comments.
I've kicked this around with sample code in a few ways and had basically come up with the same conclusion as @saghul, that a "vtable" of function pointers in the struct would be needed in order to replace the normal calls for accept(), listen(), write(), etc.  This does seem like a fairly serious architectural change, so I would understand some trepidation to include it.
For my needs, I will see if it's possible to utilize a pipe.  The streams I want to read/write are basically byte buffers, so it might work well enough.  I can keep people posted if they're interested.

Closing as discussed, thanks everyone.

So, what's the plan for file streams then? Just keep files as they are for now?

There are currently no plans for that. Now, if we'd eventually add them, they would probably be builtin, not as an addon.


add openfst.cmake file

When compiling locally, openfst is missing.so add this file to the sherpa-onnx/cmake folder

Thank you for your first-time contribution!


Pull all playlists instead of just the first page

The max limit per page of playlists is 50. We need to pull all playlists.
API reference for offset: https://developer.spotify.com/web-api/get-list-users-playlists/
Logic is in getPlaylists() method of spotify-service.js.
Going to need some kind of Promise API fancy footwork to continually pull and update offset.
Call to get user playlists returns a total, we can simply divide the limit by the offset to know how many times to pull. There's also a next property; we can check for that being null to know when we're done.
I think I prefer using offset / limit to get the number of times to pull.

We should also consider switching to /me/get-playlists instead of /{user-id}/get-playlists

I had that thought too. But that would also entail switching to using the REST API directly, rather than through the spotify-web-api-node package.

Created #10 in reference to @macacollins comment

https://github.com/kaaes/spotify-web-api-android/issues/105

limit be kept at 50. multiple callbacks would be needed, maybe we can set the offset to be an increment of 50 or 100? Need to play around a bit


Docker no longer works with the latest update

When updating to the latest version of puppeteer-real-browser the dockerfile no longer works.
I found this out when installing the package in my own project and building my own docker image. It seems to be an issue with puppeteer and the version of chrome it requires to run.
Steps to reproduce:

Run npm install to update the package-lock.json
Build dockerfile
Run dockerfile

Logs:
Launching the browser...
Error: Could not find Chrome (ver. 127.0.6533.72). This can occur if either

you did not perform an installation before running the script (e.g. npx puppeteer browsers install chrome) or
your cache path is incorrectly configured (which is: /root/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.

The library has been updated. This issue should be resolved. Please test with the latest version 1.3.0. I'm closing this issue for now. If the problem persists, please send me a message through this issue and I'll reactivate it.


SASS-10550 - Foreign Property - Expenses section: Create BE endpoint to accept FE data

@StuartJamesProctor The person working on the FrontEnd ticket will need to modify the consolidated expense model to match the backend


Disable SSL verification for CloudFetch links

Fixes databricks/databricks-sql-python#413
Follow up on databricks/databricks-sql-python#405
Even though this is not a proper fix and it should be implemented as an option configured by user, this will allow us to unblock the upcoming release. The proper fix will be implemented as a follow up

@jackyhu-db (cc @rth) Please check out my second take on this - https://github.com/databricks/databricks-sql-python/pull/414/commits/0cd439b6ff0770841b84f47a6a76ec3283fcd988 We already have flag _tls_no_verify that disables SSL cert validation (but still - does not disable SSL itself) for Thrift requests. That flag defaults to False and user should explicitly set it when needed. I decided to extend it for CloudFetch downloader as well. Please let me know what do you think. @rth it would be great if you can actually try this fix. Thanks!


How can I start with qiskit

What should we add?
I want to dive into quantum computing world

You can start with https://learning.quantum-computing.ibm.com/

Thank you so much!


Fixed-layout font-size affected by Android device settings

I'm not sure this is directly related to Readium CSS, but I'm opening this discussion as it might be relevant.
An implementer submitted a bug report on the Kotlin toolkit where changing the font size in the Android system setting impacted the layout of an FXL EPUB, e.g.

I could reproduce this issue with BellaOriginal.epub as well, even though it uses absolute px font units.
Do you know of anything that could be done to prevent this, maybe by injecting some CSS? It could make sense to have a dedicated Readium CSS stylesheet for FXL if that's the case, as I expect the problem occurs on other platforms as well.

I found a workaround using a native Kotlin setting: https://github.com/readium/kotlin-toolkit/pull/277


Improved cache command output in APC case

Q
A

Is bugfix?
no

New feature?
no

Breaks BC?
no

Tests pass?
yes

Fixed issues
#13224

Is it possible to run console command in webapp process?

Yes.

So this PR will make it impossible to flush APC cache by wrapping console command in webapp controller. I suggest flush cache anyway and only display notice, that it will not affect different processes, so it is impossible co flush webapp cache from console.

Yes, I think flush should still be called but it should note that the APC you wanted to flash may be in a different process.


Add ocdJonas's file

I  have created a branch, created a file and made a commit, and opened a pull request. Now it´s time to marge all.

Let´s finally merge this


added callback when all posts have loaded

THank you very much for your contribution. In couple of days i check and validate the code and accept your pull request if everything is fine.


cc1.exe memory issue on SimpleITK/ideas to overcome

Hello,
my script uses SimpleElastix which is basically ITK and Elastix codes using Swig for python usage. It seems that nuitka faults when it gets to this package with a memory allocation error only on when compiling as a standalone.  Here is the command line I'm using to start compiling, I was hoping pefile might reduce the size enough but so far it hasn't, I have 16 gbs of ram. I believe the issue is that this package is one large pyd already ~500mbs as just _SimpleITK.pyd so I believe it is trying to include the whole package. My memory seems to fill and then the computer shuts down, even when I only import SimpleITK and have no other code in script. When I run without standalone everything runs fine. I am using the development version of nuitka as available yesterday, July 12th.
python -m nuitka --mingw64 MRANALYSIS_Pictures.py --plugin-enable=multiprocessing --plugin-enable=tk-inter --plugin-enable=numpy --plugin-enable=qt-plugins --show-progress --show-scons --plugin-enable=pylint-warnings --standalone --windows-dependency-tool=pefile
Is there potentially a way to compile not through ram like a temp folder or an exclude folder that packages but doesn't recompile certain packages. Otherwise, is there a way to spend more time analyzing SimpleITK to only pull relevant code being used from the package or a way to create a standalone zip that extracts everything needed, including packages you asked to exclude in compile, to a folder on someone else's computer etc.

Not filling out the issue template makes this lack important information.


[Core] Map matchers to Nitrite matchers

Concept anemic = new Concept();
anemic.has("red blood cells count", new Lower than(threshold));
anemic.has("hematocrit level", new LowerThan(threshold));

int clauses = partial(patient).is(anemic);
boolean result = clauses == 2;

I am pretty sure that this can be made turning a Concept into a group of matchers.


make sure to connect after peering add

For reference.
Problem being addressed in this issue on Substrate: Implement Bitswap protocol using notifications protocol.


Update package index with latest published versions

Update package index with latest published versions

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: azure-sdk sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@CamSoper this is the automation PR about adding the package index that we talked about.


i reduced unnecessary functions and simplified the logic.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.serkanxk seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Add random image after seller creates order

A new way to scam sellers is, having a telegram username similar to @lnp2pbot and send a lightning invoice to the seller, some sellers paid and they just lose the money because those are invoices from the scammer.
As this way to scam only not experienced users, we need a way of make those users to be aware of irregular behavior, so after read an idea from @Catrya of sending random numbers to sellers after the order creation I came with the idea of seding random images instead, this is easier to remember, and it is much more striking.
So the main idea is after a seller creates an order we should send the same message we are sending now and add a random image with small paragraph explaining something like "you will see this same image at the time of pay the invoice", so we should add that same image in the center of the QR code to be pay after a buyer take the order.

Hi
Can I be assigned this issue?
Thank you.

Hi, @ndungudedan I already assigned it to you.
I'll give you a bit more context: the images should not be too detailed and should feature bright colors that stand out. This is because some users have automatic image downloads disabled in Telegram. Even if they don't download the image, they can still prevent scams. When they see the blurred image, they can compare the colors with those in the center of the QR code, making it easy to identify whether they match or not.
If you need any further clarification, just let me know.

I think for images we show something something simple and easily identifiable even if it is blurry, for example
blue bird
yellow plane
red lion
pink house
and go on...

Hi @Catrya
Just to confirm I understand the task, here are some quick clarifications I need.
Scenario 1:
When you create a sell order, you get the message below. I am going to add the image to this response with the following explanatory text:  "You will see this same image at the time of paying the invoice." Afterwards, when the order is matched, they will receive an invoice with a similar image.
📝 Your offer has been published in the [@p2pbot_dedan](https://t.me/p2pbot_dedan) channel

You have to wait until another user picks your order, it will be available for 23 hours in the channel

You can cancel this order before another user picks it up by executing the command 👇

Scenario 2:
When accepting an order from the channel, you receive the message below. Similarly, I will add the image to this response and inform the user to expect the same image when paying the invoice.
🤖 Press Continue to take the offer, if you press Cancel, you will be released from the order and it will be republished. You have 10 minutes before this order expires. 👇
Also thinking of adding a reminder on this response Please pay this invoice of 5,117 sats for $ 5 to start the operation.which accompanies the invoice. Something like: "Please confirm the image on the QR is similar to the previous image."

Hi @ndungudedan you understood correctly. Good job! Go ahead. If you have any other questions just ask


[Hexagon] Add support for v75

Add support for executing v75 (Snapdragon 8 gen 3). This PR just adds the support, but to build and execute for v75, the Hexagon SDK used should be 5.4+.

@tvm-bot rerun

cc @tqchen @abhikran-quic @jverma-quic


Dates in models should always be utc and translated to local in UI

I noticed that DatePickers in RequestContainer are not doing this...
https://github.com/ucdavis/Harvest/blob/ed4d798b62568cb2fe2c15dc3ae647e4b57ed3d4/Harvest.Web/ClientApp/src/Requests/RequestContainer.tsx#L104-L128
Not sure if it is a problem anywhere else.

Kindly disregard. Just realized that Date by default is properly offset (GMT-7) and verified in both browser and c# debuggers that proper values are being passed around.


FunctionCallingAgentWorker is unable to load llama 3.1 via HuggingFaceLLM

Whenever I load a llama 3.1 via HuggingFaceLLM in the FunctionCallingAgentWorker it shows model does not support function calling api.
Is the multi agent concierge workload only executed via OpenAI API calls?

i test it over AzureOpenAI, it works fine.
some llama-index features are only supported with open-ai model so the code may need some of those features.

It should work with any LlM that extends the FunctionCallingLLM class, or has llm.metadata.is_function_calling_model as True


SineExtraction::init() doesn't reset mBuf

The contents of mBuf should have a consistent size, but if it isn't reset when init() is called this can not be the case (leading to possible crashes or undefined behaviour).
When this object was updated the reset was commented out, but it is needed, so I would propose that:
https://github.com/flucoma/flucoma-core/blob/2681d58fd4642c67a4135a28b7e19b0a5f9d5972/include/algorithms/public/SineExtraction.hpp#L57
Should be:
  mBuf = makeEmptyQueue(alloc);
Doing so solves an eigen_assert I get with debug builds. @weefuzzy ?

Yes. Or just call clear()? Horses for courses.

oh sorry - on mBuf - I don't mind either way but it asserts without something and is liable to crash, so it would be good to fix. @weefuzzy happy to PR whichever you'd prefer.

Cool, thanks. Very slight aesthetic preference to calling clear().

Turns out that clear() is not a thing for a queue.

Well then, that makes our choice.

Fixed in 7247a3614b60d8e363f670482ef2aa50d7f61b1c


Fix golint issues in maya/types/v1/metrics.go

File: maya/types/v1/metrics.go
Line 52: warning: exported type VolStatus should have comment or be unexported (golint)
Line 58: warning: exported type Resource should have comment or be unexported (golint)
Line 65: warning: exported type Annotation should have comment or be unexported (golint)
Line 72: warning: exported type StatsJSON should have comment or be unexported (golint)

Resources:
-> Contributors guide: https://github.com/openebs/openebs/blob/master/CONTRIBUTING.md
Complexity: Easy

I would like to fix this one

@karthikramesh18  go ahead. Let me know if you need any help.

i competed this one.


S3 Cache for Docker Builds Broken

Hey @crohr 👋🏼
I think S3 cache for docker builds might be broken, am seeing this error with the following config:
#6 ERROR: operation error S3: GetObject, https response error StatusCode: 403,... api error AccessDenied: Access Denied

Config:
cache-from: type=s3,blobs_prefix=cache/,manifests_prefix=cache/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
cache-to: type=s3,blobs_prefix=cache/,manifests_prefix=cache/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max

Not seeing anything in particular in Cloudtrail either and the IAM role looks good to me, wonder if the instances are not assuming role correctly?

Works for me! Are you maybe setting aws credentials in another action / environment? This could conflict with the default RunsOn environment variables.
If not, could you share your workflow file maybe?


Exception if the media player is already in use

Hello,
if I try to start the following service twice, an exception occurs which indicates that the second call can not be processed:
Service:
service: tts.google_translate_say
data:
entity_id: media_player.kue_media_homepod_friday
message: This is a long text.
Exception:
Logger: custom_components.apple_airplayer.device_manager
Source: custom_components/apple_airplayer/device_manager.py:127
Integration: Apple AirPlayer (documentation, issues)
First occurred: 06:52:35 (1 occurrences)
Last logged: 06:52:35
Exception raised in async_stream_file, already streaming to device
It is possible to avoid this situation? Can I use a service or state attributes of the media player to know if the media player entity is already in action so that I can wait for the second service call to the media player? Another idea is that the service call can be queued in backgroud, maybe with another additional option.

Is a problem of pyatv.


tour: Any one can tell me why Exercise: Readers of Go Tour cannot work with []byte?

Context: https://tour.golang.org/methods/22
Any one can tell me why Exercise: Readers of Go Tour canot work?
byte[0] =  ,can work but []byte cannot work,
package main
import
(
"golang.org/x/tour/reader"
)
type MyReader struct{
//Reader rd;
}
func (MyReader) Read(r []byte) (int, error) {
r =[]byte{'A','A'} // this cannot work
//r[0]='A'  //<----this can work!
//r[1]='A'
return 2,nil
}
// TODO: Add a Read([]byte) (int, error) method to MyReader.
func main() {
reader.Validate(MyReader{})
}

r =[]byte{'A','A'} this line replaces r with a local variable, so you're changing the original one and the caller cannot see the change.


Test fixes

@michael-berlin It turns out #1531 will need more work, so I'm separating these to unblock #1534.

LGTM


RC3, Swipe-to-go-back glitches when swiping back to a modal

First of all, in RC3, swipe-to-go-back feels sooo much better than before. Even on an iphone 5, it feels almost native. The only missing graphical feature would be the shadow underneath the page being scrolled away, but I guess there is a good reason for it not being there.
However, there is an issue with it.
Short description of the problem:
When you open a modal and push a page from the modal, when swiping back to the modal, the whole thing glitches out, the page both bages turn semi-transparent etc. Swiping between non-modals works great!
Steps to reproduce:

Open/present a modal
From that modal, push() another page
Try to swipe back to the modal

Which Ionic Version? 1.x or 2.x
Ionic 2 RC3
We are so close to having proper swipe-back now, I've badly wanted to enable it for our app, but it's been broken for a long time. Now there's light in the tunnel ;)

Swipe to go back should be completely disabled when a modal is open. Can you provide some source code?

Were you not able to reproduce it yourself?
Also, it turns out the that the glitchi animation is not swipe-related but even if you programatically navigate back to the modal, the animation glitches out.


fixed bug

in case ำ and า
What does this changes
Brief summary of the changes
What was wrong
Description of what was the root cause of the issue.
How this fixes it
Description of how the changes fix the issue.
Fixes #...
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.

[ ] Passed code styles and structures
[ ] Passed code linting checks and unit test

Thank you!


Fix: dSTS Token dummy aud claim value for requests with scope input by using v2.0 endpoint

Fix: dSTS Token dummy aud claim value for requests with scope input by using v2.0 endpoint

PS C:\Users\kapjain\code\jkapil\microsoft-authentication-library-for-js> npm run beachball:change

beachball:change
beachball change --branch origin/dev

Checking for changes against "origin/dev"
fetching latest from remotes "origin/dev"
Found changes in the following packages:
@azure/msal-common
fetching latest from remotes "origin/dev"
Please describe the changes for: @azure/msal-common
√ Change type »  Patch      - bug fixes; no API changes.
√ Describe changes (type or choose one) » Fix: dSTS Token dummy aud claim value for requests with scope input by using v2.0 endpoint
git committed these change files:  -<EMAIL_ADDRESS>

@hectormmg I had to create this new PR to ensure beachball changes are generated.

Codecov Report

Merging #5922 (31032e5) into dev (81d34b4) will decrease coverage by 1.81%.
The diff coverage is 86.14%.

Flag
Coverage Δ

msal-angular
96.73% <96.65%> (+0.22%)
:arrow_up:

msal-browser
?

msal-common
84.46% <ø> (-0.08%)
:arrow_down:

msal-core
?

msal-node
79.93% <ø> (-3.47%)
:arrow_down:

msal-node-extensions
73.45% <74.88%> (-2.19%)
:arrow_down:

msal-react
94.24% <ø> (-0.45%)
:arrow_down:

node-token-validation
85.71% <ø> (-3.18%)
:arrow_down:

Impacted Files
Coverage Δ

lib/msal-common/src/account/AuthToken.ts
100.00% <ø> (ø)

lib/msal-common/src/account/CcsCredential.ts
100.00% <ø> (ø)

lib/msal-common/src/account/ClientInfo.ts
100.00% <ø> (ø)

lib/msal-common/src/authority/Authority.ts
91.46% <ø> (+3.56%)
:arrow_up:

lib/msal-common/src/authority/AuthorityFactory.ts
100.00% <ø> (+11.11%)
:arrow_up:

lib/msal-common/src/authority/AuthorityMetadata.ts
100.00% <ø> (ø)

lib/msal-common/src/authority/AuthorityType.ts
100.00% <ø> (ø)

...c/authority/CloudInstanceDiscoveryErrorResponse.ts
100.00% <ø> (ø)

.../msal-common/src/authority/OpenIdConfigResponse.ts
100.00% <ø> (ø)

lib/msal-common/src/authority/ProtocolMode.ts
100.00% <ø> (ø)

... and 25 more

... and 199 files with indirect coverage changes


[Feature] Include index in List Transition

Guess I am here again 😅, I was creating a complex form with array, When using the list transition I find out that it does not include index which is necessary to differentiate between forms items, I request you to add include index in the list transition just like how the map does
array.map(item, index) => (
<div>
<input name={`item.${index}.value}`}
                      ^= (index is necessary to differentiate)
</div>

))

ListTransition does not provide index because it has no semantics (the index used by its internal map is not the same as the index of the state array because it contains the element being retired).
You can use key:
<>
  {transition((item, { key }) => (
    <input name={key} />
  )}
<>

If you don't pass keyExtractor, the key is a self-incrementing number with no semantics. You can use keyExtractor to make the key of each item semantic.

Hi @A1X5H04 , I'm going to close this issue. Do you have any questions?

No, thanks for your reply


Exceptions on Android which look to occur from the HTTP component

From @maknz on August 16, 2015 23:23
I really have no idea on this one. I can't seem to figure out where it's coming from or what code is causing this. Anyone seen this before or know the likely culprit?
W/System.err( 8208): java.io.IOException: BufferedInputStream is closed
W/System.err( 8208): 	at java.io.BufferedInputStream.streamClosed(BufferedInputStream.java:125)
W/System.err( 8208): 	at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
W/System.err( 8208): 	at com.tns.Async$Http$RequestResult.readResponseStream(Async.java:168)
W/System.err( 8208): 	at com.tns.Async$Http$HttpRequestTask.doInBackground(Async.java:295)
W/System.err( 8208): 	at com.tns.Async$Http$HttpRequestTask.doInBackground(Async.java:245)
W/System.err( 8208): 	at android.os.AsyncTask$2.call(AsyncTask.java:292)
W/System.err( 8208): 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err( 8208): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
W/System.err( 8208): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
W/System.err( 8208): 	at java.lang.Thread.run(Thread.java:818)

Copied from original issue: NativeScript/NativeScript#598

Fixed with d99f16913210cb6fb233e8fa5482a05dbf750739

(Re-open this, improperly closed)
This is most probably the same as #195. @maknz Could you please try the suggestion there?

We haven't seen this exception crop up in a while. I'll add that header in (because that'd be normal, anyway), and I'll post back if we see it crop up again.

We've seen this come back unfortunately :(. I'm seeing it when the server responds with a 500 error in this instance, but I've seen it before with 401s and things -- the only thing I can correlate is a problem with HTTP errors.

This seems like a different error, a simple null-pointer exception. Will take a look.

Indeed, they seem unrelated, but they either both occur or neither do. We don't get the exception from the mobile app screen in the console, and we don't get the exception from the console in the app screen.

It turned to be a specific in the HttpUrlConnection implementation. See this SOF answer for more information. I've fixed this in the master and the fix will be available for the 1.5 release. Thanks for your input on this - it guided me into the right direction :)

I'm so glad to hear this! Thanks!
On Fri, Oct 30, 2015 at 5:39 AM, Georgi Atanasov<EMAIL_ADDRESS>wrote:

It turned to be a specific in the HttpUrlConnection implementation. See this SOF answer for more information. I've fixed this in the master and the fix will be available for the 1.5 release. Thanks for your input on this - it guided me into the right direction :)
Reply to this email directly or view it on GitHub:
https://github.com/NativeScript/android-runtime/issues/194#issuecomment-152241554

Fixed with b12ae55c02e627381f81ea1e98c5bcda764ab6bd & 337fc7878741b0edfcf32459a0b2d1c9a771cbb4


i18n(ko-KR): update apostrophecms.mdx

Description (required)

update apostrophecms.mdx
#8480

Related issues & labels (optional)

Closes #
Suggested label:

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale
File
Note

ko
guides/cms/apostrophecms.mdx
Localization changed, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.


Feedback from #552

This is a follow-up PR to #552. I had forgotten to push these few commits before clicking "Merge"... 😨

The first commit fixes a few log that should have been logs.Log.
The second is about the tests: it moves the Go objects to inline YAML manifests for the RBAC and Secrets objects with the aim of making the tests a little more readable as well as making the task of comparing the inline YAML with the Helm chart easier.
The third commit deduplicates the loadRESTConfig func (suggested in Richard's comment).
Fourth commit fixes the CI on the master branch. CI is failing with "/bin/sh: git: not found". The issue is that git is missing when the GitHub Action "ssh-agent" runs. Example of failure: https://github.com/jetstack/jetstack-secure/actions/runs/10509465707/job/29115732869

the t.Cleanup(envtest.Stop()) suggestion

I will investigate this now: t.Cleanup(envtest.Stop) is already called (https://github.com/jetstack/jetstack-secure/pull/552#discussion_r1727094279), but it seems like it doesn't work as expected since you have noticed there are leftover forked processes hanging around after the end of the test.

I will investigate this now: t.Cleanup(envtest.Stop) is already called (#552 (comment)), but it seems like it doesn't work as expected since you have noticed there are leftover forked processes hanging around after the end of the test.

Apologies. I didn't see the envtest.Stop code and I jumped to a conclusion.
I think the problem orphan processes happened when I was fixing the loading  of the envtest CRDs.
The following patch might solve  it:
diff --git a/pkg/client/client_venconn_test.go b/pkg/client/client_venconn_test.go
index 7e7790a..7177b4a 100644
--- a/pkg/client/client_venconn_test.go
+++ b/pkg/client/client_venconn_test.go
@@ -336,16 +336,15 @@ func fakeTPP(t testing.TB) (*httptest.Server, *x509.Certificate) {
 func startEnvtest(t testing.TB) (_ *envtest.Environment, _ *rest.Config, kclient ctrlruntime.WithWatch) {
        envtest := &envtest.Environment{
                ErrorIfCRDPathMissing: true,
-               CRDDirectoryPaths:     []string{"../../deploy/charts/venafi-kubernetes-agent/crd_bases/jetstack.io_venaficonnections.yaml"},
+               CRDDirectoryPaths:     []string{"../../deploy/charts/venafi-kubernetes-agent/crd_bases/jetstack.io_venaficonnections.yamlX"},
        }
        restconf, err := envtest.Start()
-       require.NoError(t, err)
-
        t.Cleanup(func() {
                t.Log("Waiting for envtest to exit")
                err = envtest.Stop()
                require.NoError(t, err)
        })
+       require.NoError(t, err)

        sch := runtime.NewScheme()
        _ = v1alpha1.AddToScheme(sch)

You are correct, the leftover processes were caused by the test exiting before t.Cleanup was called due to envtest.Start failing. I will create a PR with your patch.


Double click on titlebar to minimize window

Summary of the new feature/enhancement
On Mac you can double-click on the titlebar to minimize the window.
Great to cleanup the screen

Standard Windows behavior is:
Double-click a blank portion of the title bar, and the window leaps to fill the entire desktop. Double-click it again, and the window retreats to its original size.
PT does that and should keep doing it since its a Windoze.

In addition to the above, ctrl + m minimizes the currently active application, should work for most applications unless the button has a specific use 🤷♂

@androidSwDev099 I know it's standard behavior but first this "standard" was created when we had 15" screens. It made sense to have a quick way to bring a window to full screen. These days we have 32" or whatever screens...
second - on Mac this behavior is configurable. Could be the same on Windows
third - I don't mean that PT should behave differently, I mean PT should enable this feature for the entire OS

Also if the window as the "_" minimize icon in the upper-right corner, that can be used. I frequently maximize single application windows and imagine many others do too.

In addition to the above, ctrl + m minimizes the currently active application and windows + m minimizes all applications, should work for most applications unless these shortcuts have a specific use 🤷♂

CTRL-M doesn't minimize the currently active window on my Windows 10 PC.
Windows key + down arrow can be used to minimize the active window.  It toggle between maximized window -> un-maximized window -> minimized window.
Alt-Space followed by "n" key works on a PC not running PT to minimize the currently active window.  Not sure why PT devs decided to hijack alt-space combination for PT Run.

@androidswdev99, you can override the keystroke for PT Run.

@MikeMitterer  i don't know if this is going to be possible, fyi

@igotinfected, ctrl-m is not a shortcut that will minimize the active window.  WinKey+Down is.

Standard Windows behavior is: Double-click a blank portion of the title bar, and the window leaps to fill the entire desktop. Double-click it again, and the window retreats to its original size.
PT does that and should keep doing it since its a Windoze app.

 Most of the features found in PowerToys are built into other operating systems, and you don't see PowerToys preventing them from being a part of the app.


Corresponds to group by, having by parsing

Although it is supported, it is a problem because it fails in the case of uppercase tokens

Supports uppercase tokens #176


bug(forge fmt): files sometimes get formatted to entirely empty or partially

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (2442e7a 2024-08-28T00:20:11.390296375Z)
What command(s) is the bug in?
forge fmt
Operating System
Linux
Describe the bug
Sometimes running forge fmt on a large codebase entirely empties the file content of a file, often unrelated to the file a user has performed changes to. It also sometimes removes a leading / in front of // SPDX-License-Identifier: .
It is not consistent. Sometimes one file is emptied, sometimes it is many files, sometimes it doesn't happen. Appears to be some kind of race condition.
This appears to be behavior introduced relatively recently.
To reproduce
Optional: comment out solc = "0.8.18" in foundry.toml in foundry/testdata
Run forge fmt inside of the foundry/testdata directory multiple times in relatively rapid succession.
Examples
When running forge fmt multiple times (no user edits were made):
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   default/cheats/GetFoundryVersion.t.sol
	modified:   default/cheats/MockCall.t.sol
	modified:   default/cheats/SignP256.t.sol

Example of it removing a single /:
diff --git a/testdata/default/cheats/MockCall.t.sol b/testdata/default/cheats/MockCall.t.sol
index df7ee89c73..8a6c050089 100644
--- a/testdata/default/cheats/MockCall.t.sol
+++ b/testdata/default/cheats/MockCall.t.sol
@@ -1,4 +1,5 @@
-// SPDX-License-Identifier: MIT OR Apache-2.0
+
+/ SPDX-License-Identifier: MIT OR Apache-2.0
 pragma solidity 0.8.18;

 import "ds-test/test.sol";

Example of it emptying a file:
diff --git a/testdata/default/cheats/SignP256.t.sol b/testdata/default/cheats/SignP256.t.sol
index f1b62fe78d..8b13789179 100644
--- a/testdata/default/cheats/SignP256.t.sol
+++ b/testdata/default/cheats/SignP256.t.sol
@@ -1,18 +1 @@
-// SPDX-License-Identifier: MIT OR Apache-2.0
-pragma solidity 0.8.18;

-import "ds-test/test.sol";
-import "cheats/Vm.sol";
-
-contract SignTest is DSTest {
-    Vm constant vm = Vm(HEVM_ADDRESS);
-
-    function testSignP256() public {
-        bytes32 pk = hex"A8568B74282DCC66FF70F10B4CE5CC7B391282F5381BBB4F4D8DD96974B16E6B";
-        bytes32 digest = hex"54705ba3baafdbdfba8c5f9a70f7a89bee98d906b53e31074da7baecdc0da9ad";
-
-        (bytes32 r, bytes32 s) = vm.signP256(uint256(pk), digest);
-        assertEq(r, hex"7C11C3641B19E7822DB644CBF76ED0420A013928C2FD3E36D8EF983B103BDFE1");
-        assertEq(s, hex"317D89879868D484810D4E508A96109F8C87617B7BE9337411348D7B786F945F");
-    }
-}

cc @klkvr / @grandizzy

I don't think it's something new (managed to reproduce with 5902a6fa87600cf0cbe44e689c97479c16fd474e before latest fmt changes) but more related to https://github.com/foundry-rs/foundry/issues/6033 which should not attempt to rewrite files if not changed (or at least lock it to avoid race conditions)


Added React-MD example

It is an example of using React-MD with Next.js, which I mentioned in #917.

wow

after testing it and I get 2 errors
fist happens on page load and is about different render on server and client

and second one is thrown when I click links in sidebar menu

@frol can you have a look at the above.

@alexedev Both of the issues arise from React-MD drawerType. Using drawerType instead of separate mobileDrawerType/tabletDrawerType/desktopDrawerType solves the focus error. Using non-MINI drawer types solves the warning. I will report this to React-MD. There seems to be nothing wrong with the example itself.
Thanks for catching those!

@frol Thank you for fast reaction, you helped me a lot.

I have fixed the focus error in PR #961.
The warning can be worked around by using another drawerType, but since it is not that important, I choose to keep it as it is and just wait while it is resolved in the React-MD upstream: https://github.com/mlaursen/react-md/issues/236


posterior.log_prob() raises "WARNING:root:Only 0% posterior samples are within the prior support."

Hi!
I ran SNPE over ten rounds and got a posterior estimate. It is possible to sample from said posterior. I would like to get an approximate maximum posterior estimate and thought I could look at the output of log.prob. First question: Is there a straight forward way to find a maximum posterior estimate?
Second question. I tried:
posterior = torch.load('Posterior_samples/10_rounds_posterior.pt')
samples = torch.load('Posterior_samples/samples_5000_round_10_of_10.pt')
one_sample = samples[0,:]
x_0 = np.load('Posterior_samples/MCMC_res20_x0.npy')
log_probability = posterior.log_prob(one_sample, x=x_0)

as described in the "Getting started" section.
But this raised following error:
WARNING:root:Only 0% posterior samples are within the
                    prior support. It may take a long time to collect the remaining
                    10000 samples. Consider interrupting (Ctrl-C)
                    and switching to `sample_with_mcmc=True`.
Traceback (most recent call last):
  File "c:/Users/Kay/SBI/Sample_from_posterior.py", line 27, in <module>
    log_probability = posterior.log_prob(one_sample, x=x_0)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\sbi\inference\posterior.py", line 282, in log_prob
    return log_prob_fn(theta, x, norm_posterior=norm_posterior_snpe)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\sbi\inference\posterior.py", line 313, in _log_prob_snpe
    if norm_posterior
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\torch\autograd\grad_mode.py", line 15, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\sbi\inference\posterior.py", line 389, in leakage_correction
    self._leakage_density_correction_factor = acceptance_at(self.default_x)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\sbi\inference\posterior.py", line 376, in acceptance_at
    self.net, self._prior, x, num_rejection_samples, show_progress_bars
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\torch\autograd\grad_mode.py", line 15, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\sbi\utils\sbiutils.py", line 144, in sample_posterior_within_prior
    candidates = posterior_nn.sample(num_remaining, context=x)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\distributions\base.py", line 65, in sample
    return self._sample(num_samples, context)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\flows\base.py", line 54, in _sample
    samples, _ = self._transform.inverse(noise, context=embedded_context)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\base.py", line 60, in inverse
    return self._cascade(inputs, funcs, context)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\base.py", line 50, in _cascade
    outputs, logabsdet = func(outputs, context)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\base.py", line 60, in inverse
    return self._cascade(inputs, funcs, context)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\base.py", line 50, in _cascade
    outputs, logabsdet = func(outputs, context)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\base.py", line 60, in inverse
    return self._cascade(inputs, funcs, context)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\base.py", line 50, in _cascade
    outputs, logabsdet = func(outputs, context)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\coupling.py", line 120, in inverse
    inputs=transform_split, transform_params=transform_params
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\coupling.py", line 197, in _coupling_transform_inverse
    return self._coupling_transform(inputs, transform_params, inverse=True)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\coupling.py", line 211, in _coupling_transform
    outputs, logabsdet = self._piecewise_cdf(inputs, transform_params, inverse)
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\coupling.py", line 501, in _piecewise_cdf
    **spline_kwargs
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\splines\rational_quadratic.py", line 57, in unconstrained_rational_quadratic_spline
    min_derivative=min_derivative,
  File "C:\Users\Kay\Anaconda3\envs\SBI\lib\site-packages\nflows\transforms\splines\rational_quadratic.py", line 134, in rational_quadratic_spline
    assert (discriminant >= 0).all()
AssertionError

I had this error before when trying to run SNPE, but then used:
sample_with_mcmc=True,
    mcmc_parameters={'init_strategy': 'sir'}

which worked.
sbi version: 0.11.1 (but I also tried updating to 0.11.2)
Could you help me with that?
Best,
Kay

Hi Kay,
Obtaining a MAP estimate
Unfortunately, there is not yet functionality within SNPE that does this automatically, but I made an issue here. In the predesessor of sbi called delfi, we had used cma for this.
Your code would look something like this:
import cma

def obtain_map(posterior_):
    init = samples[0,:]  # use some posterior sample as initialization
    es = cma.CMAEvolutionStrategy(
        init,
        0.001,
        {'scaling_of_variables':(prior_upper_bound-prior_lower_bound)})
    es.optimize(lambda theta: -1. * posterior_.log_prob(theta), x=x_o, norm_posterior=False)
    es.result_pretty()
    return es.best.theta

map_estimate = obtain_map(posterior)

I did not test this yet, so probably you will have to adjust it a bit.
Fixing your warning
To fix the warning, use
log_probability = posterior.log_prob(one_sample, x=x_0, norm_posterior=False)

Not that, with this, your log-probability will only be correct up to a normalizing constant. A normalizing constant will not influence the MAP estimate, so you should be fine.
A bit more explanation about the warning
This issue is related to your previous issue. When calling log_prob() for the first time, SNPE tries to obtain a normalizing constant. This normalizing constant can be estimated from samples. Importantly, these samples have to be drawn with rejection sampling, not with mcmc. And this is the exact problem: Rejection sampling will have very strong "leakage", which is why you get the warning. In other words, what may take a long time is the estimation of the normalizing constant for log_prob().
Feedback
Let me know if all this worked. Also let me know about your experience with cma, so we can incorporate into sbi if performance is good :)

Thanks for your answer! I will try out cma and let you know when it works out!

Hey, your proposed fix:
log_probability = posterior.log_prob(one_sample, x=x_0, norm_posterior=False)
unfortunately leads to:
TypeError: log_prob() got an unexpected keyword argument 'norm_posterior'
Posterior is:
Posterior conditional density p(θ|x) (multi-round). Evaluates and samples by default at x=[[0.0,....]
This neural posterior was obtained with a SNPE-class method using a flow.

Also, on a side note, my x0 is pretty high dimensional, so print(posterior) doesn't look nice. Don't know how common this is.

Ah, sorry, you are on 0.11.1. The argument is called norm_posterior_snpe then. From 0.11.2 onwards, it's norm_posterior

awesome, cheers!


Task 3 - API - add search models by ontology terms other than GO

Task requirement from Noctua Landing Page Project
This will be a three steps task:

[ ] include ontologies such as Uberon, CL in blazegraph
[ ] make sure one can perform a closure search (eg retrieve models also containing the more specific/children terms of the specified term)
[ ] Provide the API route for NLP UI

Also linked to https://github.com/geneontology/minerva/issues/230

@lpalbou out of curiosity, what is the NLP UI ?  Is the API route for this expected to be any different from the API used to drive the search?
if you have time, a list test cases and expected results are always handy.

@lpalbou the search as it stands has a parameter ?goterm that should probably have been named something more generic like ?term .  That searches over all ontology terms used to provide an rdf:type used in the models, including anatomy etc.
I've just done some successful tests with an extension to this that does query expansion down the subclass tree.

When I commit this, do you want this generic ontology parameter renamed to e.g. "term"
Do you want query expansion to be optional or always on?
Do we need query expansion to run down the "part of" children as well as the subclasses ?  If yes, this needs further specification.  e.g. we might not want to expand down from biological processes to molecular function parts etc.

For testing this week.  Will deploy this with the parameter goterm changed to term , with closure search always on and only looking at subclass descendants, not part of.

@goodb sorry for the delay.
NLP stands for Noctua Landing Page, based on the Noctua Search of @tmushayahama . So it is the same project / search that we have been discussing.
A prototype is available on dev: http://noctua-dev.berkeleybop.org/workbench/noctua-landing-page and ping me on Gitter to setup a demo and give you more contexts.

?goterm that should probably have been named something more generic like ?term
When I commit this, do you want this generic ontology parameter renamed to e.g. "term"

Yes please. @tmushayahama you will have to adjust your queries.

Do you want query expansion to be optional or always on?

Optional at the moment. It could become permanent if we were to highlight/explain the matched results in the response.

on and only looking at subclass descendants, not part of.

Sounds good at the moment. @vanaukenk any preference ?
Thanks Ben

@lpalbou ahh..  in my previous worlds NLP stands for something a bit different.  I thought maybe you were talking about one of the tools the worm base developers have for pre-processing text. Thanks for clarifying.   I made query expansion optional and updated docs.  I am working in this branch now in case anyone was keen to test anything before it gets PRd into dev. https://github.com/geneontology/minerva/tree/bugfixes-on-blazegraph-conversion.

RE: https://github.com/geneontology/minerva/issues/230#issuecomment-606984333
The most recent PR (not yet available on dev) makes expansion optional.  By default it is off.  Adding the &expand parameter will return results from all subclasses of the submitted term.  If you want to search by root terms I will need to do some optimization.
Let me know about priority on that optimization.

^ @tmushayahama

referring to https://github.com/geneontology/minerva/issues/230#issuecomment-606984333
@goodb root term was only an example, but It is giving "Query Timeout Exception" on other most higher up terms as well, I also tried with
"catalytic activity"
http://barista-dev.berkeleybop.org/search?offset=0&limit=50&term=GO:0003824&count
or "biological regulation"
http://barista-dev.berkeleybop.org/search?offset=0&limit=50&term=GO:0065007
and same time out exception. I don't know where the threshold is.
I was extra: I tried these big terms below, term = "localization" works

For later, it will be nice to send it as an error message for all exceptions. For now it is 200ok
tagging @vanaukenk @lpalbou

Referring to https://github.com/geneontology/minerva/issues/230#issuecomment-606984333.
Let's discuss it with @vanaukenk . I would not concern with aspect terms (MF/BP/CC) but one would want to be able to search over catalytic_activity indeed.
@tmushayahama ben has increased the timeout in its commit. It could be sufficient for now but we'll have to see where this comes from. @goodb is it in the SPARQL query ? Or in some subsequent queries you do further annotate the results before sending them back to tremayne ?
Thanks

@lpalbou its in the sparql query over the model collection.  Kind of surprised it was such a problem.  Will need to look at it to see what's up.

Thanks @goodb @lpalbou for the quick response. @vanaukenk @lpalbou should I make search  by exact term default and subtype can be turned on? Or subtype is always on?


Feature Request: JIRA Ticket as first item of first line

I'm 100% sure that I can accomplish this same thing by using the "-c" context switch.
What I want is a system environment variable into which I can set the JIRA Ticket number (or Github issue or whatever ticketting system) and have it always appear as the first item on the first line.
What I think I'm seeing in that location now is the directory name of the repository in all uppercase followed by "-123". but that is not consistent.
If I can setup an envar like export TICKET=xyzzy-123 then every commit I make will have my ticket number on it.  When I pick up a new ticker I will change the value of $TICKET.

What shell are you using? I think you could accomplish this pretty easily with an alias that wraps aicommit -c 'include $TICKET in commit subject'


Delete SlackbotHandler

After contacting slack I have confirmed that this is a deprecated API.
So we can get rid of this handler and have less maintenance cost now on v2 of monolog.

should also be marked as deprecated in 1.x

@stof you are correct.. done here https://github.com/Seldaek/monolog/pull/1257.. have a look if you wish :)

Marking this as WIP because the deprecation must be merged first and then we must merge this to avoid any conflicts.

Let me merge 1.x into master and then you can rebase this cleanly.. Patience ;)

Ok merge done

Let me merge 1.x into master and then you can rebase this cleanly.. Patience ;)

Sorry for that :) 👍

Thanks


initialization hangs on iOS devices

Seems like there's an issue that causes worker pouch to get stuck on iOS devices (iPad and iPhone).
I'm not sure exactly what causes this but I was able to reproduce it in the following stackblitz.
https://stackblitz.com/edit/angular-worker-pouch-ios
Basically enabling worker-pouch.
When I tested my device for isSupportedBrowser I got true.
Would love to help test any fix you have in mind.

isSupportedBrowser is returning true for Edge as well although it doesn't work there.
Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134


System.IO.FileLoadException ERROR

Hello,
Found a closed case without any further answers from user.
I have exact same issue:
Hello,
I am 100% sure that I am using the 3.4 version.

Thank you

Thanks for reporting, I've reopened https://github.com/EtienneLamoureux/TQVaultAE/issues/287