[GPII-3681]: Validate flowmanager TLS certificate with ssl-cert-check

This PR adds CronJob to flowmanager chart that runs ssl-cert-check that validates flowmanager TLS cert and uses prometheus-to-sd helper to send cert metrics (days left before expiration and cert condition) to Stackdriver.
Cron will run twice a day, because max metric absence duration in Stackdriver conditions is 24 hours, so there is a risk of false positives if it runs only once in 24 hours.
Deployment should be non-disruptive and does not require any special treatment, but must be done after version-updater commits.

Thanks, @natarajaya, this definitely looks like an improvement to the current situation 👍!
I've started reviewing the code in the ssl-cert-check. How do you propose to review that, as the code has been committed directly to master without a PR?
Re. this PR - I have a high-level question to start with - have you considered deploying this as a generic utility that can handle the monitoring of multiple hosts? I.e. outside of the gpii-flowmanager chart and possibly outside of gpii namespace. (Seems like the ssl-cert-check utility script can easily handle multiple domains in one go).
If it's going to be deployed in the gpii namespace, corresponding rules to route required egress traffic via Istio egress gateway will have to be created. The easiest way is to add desired hosts to the istio-gke-helper chart - https://github.com/gpii-ops/gpii-infra/blob/2cd1f7b10f49316248de8222b9aeead55d64da5f/shared/charts/istio-gke-helper/values.yaml#L22-L24.
A disadvantage is that this will allow the destination for all services, I'm not sure that's desirable in case of flowmanager's external IP. An improvement would be to add Istio's auth-policy (https://istio.io/docs/concepts/security/#authorization-policy), or alternative to deploy the utility outside of gpii namespace.

this definitely looks like an improvement to the current situation

@stepanstipl Indeed, but all of this would've been unnecessary in case Stackdriver team added "Fail if cert entered renewal window" option to SSL validation feature of its uptime checks...

How do you propose to review that, as the code has been committed directly to master without a PR?

Here you go: https://github.com/gpii-ops/ssl-cert-check/pull/1

have you considered deploying this as a generic utility that can handle the monitoring of multiple hosts

Yes, I was thinking about it, but was not sure if it worth the effort atm. Considering the situation with egress traffic (though I feel like allowing egress to flowmanager public endpoint for entire gpii namespace is okay), I changed my mind. Please checkout latest changes.

Seems like the ssl-cert-check utility script can easily handle multiple domains in one go

It can't. But we can create cron per domain.
Thanks for the notes on how to configure egress – but I guess it is not needed anymore, since it is a separate chart deployed in kube-system namespace, right?

Ok, it turns out that script can handle validation of multiple domains from input file, so this is fixed now.

@amatas @stepanstipl Sorry for going back and forth with this, please review latest changes:

Istio configs removed, since we installing to kube-system.
prometheus-to-sd removed, and ssl-cert-check is running as Stackdriver client.

LGTM, nothing to add to @stepanstipl review

I would consider merging the alert policies into one with 2 conditions

@stepanstipl But it is already a single alert policy with 2 conditions.

The organization of alerts and naming has been discussed more in #496 PR, but mostly the reversed naming of conditions that does not make sense.

Yeah, it is a bigger topic that we discussed before, let's leave it aside for now and follow existing naming convention.

@stepanstipl But it is already a single alert policy with 2 conditions.

@natarajaya what am I missing?
alert policy 1 "Flowmanager TLS cert is valid" - https://github.com/natarajaya/gpii-infra/blob/6525fbb1e0fe4f1998be80c1561aa5318d49ad7d/gcp/modules/gcp-stackdriver-monitoring/alert_flowmanager_ssl_cert_check.tf#L1
alert policy 2 "Flowmanager TLS cert metric is present" - https://github.com/natarajaya/gpii-infra/blob/6525fbb1e0fe4f1998be80c1561aa5318d49ad7d/gcp/modules/gcp-stackdriver-monitoring/alert_flowmanager_ssl_cert_check.tf#L34
Seems like two alert policies, each with one condition.

@stepanstipl Yeah, I had the change locally and somehow though that it was committed into the remote branch as well, I included it into https://github.com/gpii-ops/gpii-infra/pull/558.


[RFC] Renaming of styleProps in components

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Background 🖼
Unstyled components have "slots" - components that can be overridden by the developer when creating a styled version of the component. Components in these slots must be aware of the internal state of the host component. Currently this is achieved with the help of the styleProps prop. It is passed to every slot component. It contains the host component's props merged with its internal state (so, for example, in case of a SwitchUnstyled, styleProps.checked will reflect the real state of the Switch, not its checked prop.
Demo showing the use of styleProps in an unstyled component: https://codesandbox.io/s/styleprops-usage-forked-9mqmn?file=/src/Demo.tsx
import * as React from "react";
import { SwitchUnstyled, SwitchState } from "@material-ui/unstyled";

interface RootProps {
  styleProps: SwitchState;
  children: React.ReactNode;
}

function CustomSwitchRoot(props: RootProps) {
  const { styleProps, children, ...other } = props;
  const style = {
    backgroundColor: "red"
  };

  // The styleProps object is injected to CustomSwitchRoot by SwitchUnstyled.
  // It can be used to customize the slot component based on SwitchUnstyled's
  // state.
  if (styleProps.checked) {
    style.backgroundColor = "green";
  }

  return (

      {children}

  );
}

export default function Demo() {
  return <SwitchUnstyled component={CustomSwitchRoot} />;
}

Summary 💡
In order to reduce confusion, I propose to rename the styleProps to hostState or componentState.
Another option, suggested by @eps1lon in https://github.com/mui-org/material-ui/issues/25925#issuecomment-829059202 is to remove the styleProps entirely and just spread its contents onto the slot components directly.
Motivation 🔦
The discussion started in https://github.com/mui-org/material-ui/pull/26688/files/ee37264909d547c0cf35a7a5e64f87a89e190428#r659221608.
I find the styleProps name not adequate to what they are. First, these are not just props - it's both the host props and its internal state merged together. Secondly, even though we presume these values will be used almost exclusively for styling the slot components, in my opinion we should name things according to what they are, not what what we think they will be used for.
My main motivation is my own confusion after seeing these for the first time. Before digging deeper I was under impression these was a subset of props responsible for styling.

👍  for hostState over styleProps.
I don't think that the scope of the problem is specific to unstyled, it's the same problem for the rest of the codebase. So I would encourage we rename everything.

We could even make MD consistent with Unstyled and have componentsProps.* in place of *Props. This would be a big change and I suppose we could think about it in the v6 timeframe. As for unstyled, we need to agree on a solution soon, so that new components are created according to the pattern.

+1 for hostState

Another option, suggested in #25925 (comment) is to remove the styleProps entirely and just spread its contents onto the slot components directly.

This would complicate which props should be forwarded to the dom, so I would be against this.

We could even make MD consistent with Unstyled and have componentsProps.* in place of *Props

@michaldudak Agree, it's the direction we took for v6.

First, these are not just props - it's both the host props and its internal state merged together.

Props are something you pass to a component. Nothing more is implied by the term. So they are props.
hostState
State would actually be the wrong term here because it's a value you pass in the component not a value that is controlled by the component itself. host is also already used in React (the DOM is the host) so this would also be ambigious.

Props are something you pass to a component. Nothing more is implied by the term. So they are props.

From the point of view of the receiving (slot) component, yes - the whole object is a prop. But we never append the props suffix to any other props, do we?

State would actually be the wrong term here because it's a value you pass in the component not a value that is controlled by the component itself. host is also already used in React (the DOM is the host) so this would also be ambigious.

My idea was that this is the state of the component that hosts these slots. I'm happy to consider other suggestions if you have a better name in mind.

this is the state of the component that hosts these slots

@michaldudak This makes a lot of sense to me.

I like how hostState is developers-focused. We are putting the name in the shoes of how/who the prop is going to be used, not how/where it's created.
I also think that this terminology is broader than React, it's in the scope of Material-UI, this gives us a bit of flexibility in the naming.

The options for next steps are:

Rename all usages across the whole codebase (core + unstyled). This will be a breaking change only in relation to previous v5 releases.
Rename usages in the unstyled package only. This will not lead to a breaking change in core, but will create inconsistency between packages
Do not rename at all before v5 goes live.

I'm for option 1, but I'd like to hear your opinions as well @mui-org/core

For me I still like the word with suffix props. hostState sounds like it will be used in internal logic. Anyway, I don't think naming is the biggest part as long as the team knows what it is and it does not deviate much (for the community). The biggest issue here is the breaking changes as we already learned that we should not introduce it unless it is necessary because it will give as more work and more issue to handle.
I'd like to use impact-afford matrix.
Impact for me it is low because it just naming change mostly for internal use which does not produce any feature, bug fix or unlock anything.
Afford since it is a breaking change, afford is a bit high by default. We will need to think about how to deprecate, if people are using it. codemod? docs?
Impact is low and Afford is medium, so I don't think it is worth at this moment.

hostState sounds like it will be used in internal logic not styling

IMO we as library authors should not care what these properties are used for. The name should reflect what this is, not what someone may use it for.

naming change mostly for internal use

That's not quite right. This will be used by anyone implementing a styled component based on our unstyled one. Plus, anyone wanting to customize a core component with a custom slot.

Afford since it is a breaking change, afford is a bit high by default.

It's not a breaking change in relation to v4, as this version did not have styleProps at all.

@michaldudak I support every point that you have made. We will need to settle this before the stable release.

I also think that this terminology is broader than React, it's in the scope of Material-UI, this gives us a bit of flexibility in the naming.

Material-UI is a React library. Why do you think the scope is broader?

That's not quite right. This will be used by anyone implementing a styled component based on our unstyled one. Plus, anyone wanting to customize a core component with a custom slot.

How are people accessing styleProps right now?

How are people accessing styleProps right now?

It's a prop passed into slots' components (and I don't intend to change that, it's just about naming). It's definitely not internal.

@michaldudak Could you provide a code demo illustration? So far it doesn't seem that we have any. Jun suggesting that the is internal would suggest that what the use case of prop the prop is not obvious.

Sure. Just updated the description.

To summarize what we talked about in todays meeting:

styleProps is just a convenience helper. These should all be normal props but to avoid forwarding too many (i.e. props not that would create warnings if they appear on host components) we put them in a dedicated prop.
ownerProps was another proposed name though we also sympathized with not naming it at all by e.g. naming it $

So right now customization would look like
function SomeCustomSlot({ ownerProps, ...other }) {
	const icon = ownerProps.checked ? checkedIcon : uncheckedIcon;
  // other goes here
  return
{icon}

}

What if we flip this around:
function SomeCustomSlot({ checked, hostProps }) {
	const icon = styleProps.checked ? checkedIcon : uncheckedIcon;
  // other goes here
  return
{icon}

}

That way we can give a proper name that tells the developer where it should go and flatten the other props as we'd like to.
This only leaves us with having to list these props internally in shouldForwardProp which may be worth exploring.

This looks great from an application developer's perspective. I'm wondering how to deal with shouldForwardProp in this case, though. If props like checked, disabled are not forwarded by default, we'll essentially make styled unusable. If they are forwarded, applications will end up having lots of checked and disabled divs and spans. Developers would have to control prop forwarding on case-by-case basis which may be too cumbersome.

naming it $

@eps1lon Would it be easy enough to teach about it? Developers might not be able to search for it in Google/Algolia/the codebase. Maybe this can work.

ownerProps was another proposed name

+1 for using "owner" over "host". It avoids any potential confusion with the terminology React uses: host element =>
 element.
I personally find "state" over "props" clearer because this prop holds the state of the owner, it feels broader than the props the owner receives.
Regarding @mnajdova's point of using "style" over "state" and "props". In https://github.com/mui-org/material-ui-x/issues/2138 and in TablePagination.ActionComponent, I think that we have examples where this prop can have broader use cases than CSS styling.
I would personally vote for ownerState.

What if we flip this around:

@eps1lon Interesting! I guess that if we use such an approach, we would need to update https://next.material-ui.com/guides/composition/ and apply the approach to all the codebase, e.g. for the component prop.
Would it be a major breaking change?
The current styleProps pattern has a couple of interesting properties:

Usage of <XX component="div"> works directly thanks to:

https://github.com/mui-org/material-ui/blob/75f27074b89381d25a1fab85fc2098af58e89cb0/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.js#L738-L740

Usage of <XX component={styled('div')({})}> works directly thanks to:

https://github.com/mui-org/material-ui/blob/75f27074b89381d25a1fab85fc2098af58e89cb0/packages/material-ui-system/src/createStyled.js#L56-L58

Off-topic. The proposal of Sebastian makes me think of a possible solution for another problem. If you look at the DatePicker or DataGrid, there are so many props that we gave up on the idea to spread ...other on the root. But what about all the attribute that these component might need? e.g. the aria- or data-props. Maybe we could add a public hostProps prop to solve this cc @mui-org/x.

I personally find "state" over "props" clearer because this prop holds the state of the owner, it feels broader than the props the owner receives.

It doesn't though. It's a mixed bag.

We've got few options on the table. Let's vote and decide:

👀 styleProps
🎉 ownerState
🚀 ownerProps
❤ $
👍 owner

As for the last one - it may feel awkward at first, as it could suggest it's a reference to the owner component, but IMO expressions like owner.disabled, owner.onClick look quite well and are not ambiguous.
You may vote for all options that you find acceptable.

ownerState it is, then.

Just a note, when we do the change, there are some use-cases where some additional props needs to be passed to some slots that are not necessarily ownerState, for example passing markActive to the Mark component in the Slider - https://github.com/mui-org/material-ui/blob/next/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.js#L691
This is one use-cases I can think of immediately (MarkLabel also accepts the same prop). I propse we pass these props directly and add them to the shouldForwardProp option.


Console error on plugin integration

Even though the plugin works fine, the implementation throws this error in the console:
Kiwi.PluginManager: Plugin 'Text' appears to be invalid. No property with that name exists on the Kiwi.Plugins object or the Plugin is not registered. Check that the js file containing the plugin has been included. This plugin will be ignored #plugin

The file is included like this:
var gameOptions =  {
  plugins: [ "Text" ]
}

var game = new Kiwi.Game('game', 'Game with multiline textboxes', null, gameOptions)

If the plugin is renamed to (e.g.) "TextExtended" and
Kiwi.Plugins.TextExtended.minimumKiwiVersion = "1.3.0";
Kiwi.PluginManager.register(Kiwi.Plugins.TextExtended);

is added, the plugin is registered, but the console spits out a strange warning again:
Kiwi.PluginManager: 'TextExtended' is missing the minimumKiwiVersion property. It is unknown whether 'TextExtended' will work with this version of Kiwi #plugin

...even though it was explicitly added...

I'm sure I've got a correct template sitting around somewhere. If we release another version of Text before we fold it into the core library, we'll be sure to modify that.
Tagging this as a bug, because it shouldn't do that.


wrote new post rmd file and ran rmd2md, but not appeared on the web

Hi Barry,
I followed your instructions and composed a .rmd file in the "_rmd" dir. Then I ran rmd2md.r to compile the file. The compiled file was generated in the _posts dir. But it didn't show on the web page after I pushed to my github. I also tried to modify the hello world .md file, but that didn't help either. Any advise please!
Many thanks,
BW,
Jianliang

Hi,
I think you must have figured out the problem since the post is now displaying on the website:
https://jianlianggao.github.io/KubeNow-on-Azure/
But if you are still having issues, please say! :-)

Hi Barry,
Many thanks, yes, I did. The issue was caused by the previously existing index.md file.
Best wishes,
Jianliang


How to access the AuthToken object if I have a token?

I need some custom behaviour that will require me to access the AuthToken object itself rather than just the token string. How do I do that if all I have is that string? I can't figure out this part from the documentation or the code.

@saad440 You would need to override the AuthTokenManager to return the whole object and not just the string. This is untested but you can do something like
class CustomAuthTokenManager(models.Manager):
    def create(self, user, expires=knox_settings.TOKEN_TTL):
        token = crypto.create_token_string()
        salt = crypto.create_salt_string()
        digest = crypto.hash_token(token, salt)

        if expires is not None:
            expires = timezone.now() + expires

        return super(AuthTokenManager, self).create(
            token_key=token[:CONSTANTS.TOKEN_KEY_LENGTH], digest=digest,
            salt=salt, user=user, expires=expires)

class CustomAuthToken(AuthToken):

    objects = CustomAuthTokenManager()


RZL-Trainer Version for San Andreas?

Hi. I am playing this game for months with the older version of CLEO. And I updated it today. Now RZL Trainer does not work. Help ME! I have some severe mods too. Like SAXVCXLC

Proof

Rename trainer file extension to .cs4

worked

I did get the error message. And i renamed it.


Updating Plugin Docs

@hishamhm 's branch plugin-yml needs to be merged before this branch.
For these plugins:
ip-restriction
bot-detection
request-termination
request-size-limiting
correlation-id

@UkiahSmith The plugin-yml branch has been merged in 0.13.x. Will you please rebase your branch on it? Also, could we include both #633 and all subsequent PRs about plugins updates in the same PR (maybe this one) to avoid spreading over and complicating the review? Thanks!

@thibaultcha Changes from #633 are now in this branch/PR, as well as rebased off of 0.13.x branch.

@UkiahSmith I just pushed a commit to improve the verbiage around the changes. Our intent is now to to present Service as the 1st class citizen (alongside Route, on the second step of the pedestal) in Kong. All of the verbiage and examples should always refer to Services first, and be based on Services and/or Routes (when it makes sense, some other plugins might be for Routes only).
Additionally, when referring to APIs we should now point out that they are a deprecated entity (maybe not every time we refer to it, but at least once per document).
So I made those two changes which will squash in yours.
One thing that isn't done yet and that I noticed while going through the changes is that the examples were not updated:

hmac-auth has a complete example showing how to configure an API and proxy requests through it with the hmac-auth plugin. Those examples need to be updated to be built around a Service/Route couple
jwt also has such examples
maybe others, I stopped looking after a while
some plugins have a simple "example call over the 8000 port", and those have :8000/{api path} in their URL. They also need to be updated (I made one such update as "guidance" but there are others).

Will you be able to address the above leftover items?

I made another round of reviewing, squashed the commits, and merged into the 0.13.x branch. Thank you, @UkiahSmith!

Thanks @UkiahSmith @hishamhm !


feat: add getSerializer and expose it on driver's dbInfo when used

Resolves #398
Resolves #446

Didn't add dist files to the PR to ease merging :)

Looks good to me. I'll merge this in and wait for #452 then try to get 1.3 out :smile:

@tomufatt, when do you believe you will be able to release 1.3? It seems that with 1.2.9 I have problems with webpack and its uglify plugin (the size of the project is not reduced as when I change the 'dist' to 'src' on package.json). Did you experience this also?

Looking to do it soon, I think possibly tonight. Sorry for the lateness on this!

Also:
If 'dist' is to remain, wouldn't it be more appropriate to use the '.min' file instead?:
  "webpack": "dist/localforage.min.js",
(we now have   "webpack": "dist/localforage.js",)

Yea, but what if you needed to do a debug on your build?
I guess that if you already have a build step for WebPack, it should be easy to add an Uglification step as well (in case you don't already have).
@tofumatt Your call, I literally have no problem with this.

Just to note, 1.2.10 shouldn't have any problems with webpack or browserify. I've written tests for that.

I prefer not pointing people to a minified version of the code; if you’re using webpack/etc. you likely have your own step for that in production, and this way on the off-chance you want to trace an error through the localforage codebase you can do so easily.
The minified version is really for people who want to download the library as a zip and use it. I’ve even given some thought to not including it at all, but that’s a separate discussion.

Ok, I understand, please have in mind my goal too: Use webpack's uglify to create the smallest possible (.min) output of my application (that uses localforage). I will have to test 1.3 for that and will let you know. It will be great if you can release 1.3 soon in order to try it with the 'uglify' in webpack.

More info on this:
I did what the README says (i.e. used the require('script!localforage'); way to require localforage, without changing the dist to src) and the size of my (uglified) webpack project is 155K, which is too large comparing to the 84K produced when I use import localforage from 'localforage'; and change the dist to src (which causes other artifacts though).
Please have that in mind for the webpack solution (localforage needs to be properly uglified like any other package, within our compiled bundle).
Looking forward to the release of 1.3. Thanks!


Request for Information on Data Theorem Finding

Description
This is bubbling back up https://github.com/firebase/firebase-ios-sdk/issues/5447
We have a finding in Firebase for App Embeds SQL Query with Dynamic Input References:
The issue linked above has a statement from Firebase saying
the %@ is only for hard coded strings (table names, column names) so that we can reuse the code internally. All user inputs are validated, sanitized and bound appropriately for each query. We have been through security audit of the source code before releasing.
We brought this issue up to our security team, but they have said the comment is not enough attestation. Is there any releasable details of said security audit that shows this attack vector is indeed secure, that I can bring back to my security team?
Reproducing the issue
No response
Firebase SDK Version
10.11
Xcode Version
4.2
Installation Method
CocoaPods
Firebase Product(s)
Crashlytics
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet

Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet

Replace this line with the contents of your Podfile.lock!

@paulb777 , yes the finding is actually in Analytics, my bad (I just put Crashlytics as that's our primary usage).
And I think if nothing has changed that's fine, I just want to know if there is a more detailed report to show that this is indeed not an issue and not jsut a GitHub comment - that's what our security department has asked for. Otherwise I have to file security exceptions - so just wondering if there is any releasble proof to show that the finding is indeed not an issue

Hello! This is Phillip from the Data Theorem side. If it helps, would you please be able to provide some kind of symbol name (or w/e) for the sanitisation mentioned in #5447? Then, I can validate on my end from the disassembled code and provide an 'official' assurance from Data Theorem that we've confirmed that the SDK behaviour is fine. Would this work for your security team @scottluxenberg?

Hello! This is Phillip from the Data Theorem side. If it helps, would you please be able to provide some kind of symbol name (or w/e) for the sanitisation mentioned in #5447? Then, I can validate on my end from the disassembled code and provide an 'official' assurance from Data Theorem that we've confirmed that the SDK behaviour is fine. Would this work for your security team @scottluxenberg?

Yeah, if you all validate that, an actual validation from Data Theorem would be enough to satisfy us

Any update on if this info is providable?


🤗 Add support for downloading Huggingface weights.

Now supports download weight from huggingface directly by calling model.from_pretrained(model_name) as demonstrated in hf_demo_2x.py.
model = Model(-1)
model.from_pretrained(args.model)

Hi @GuozhenZhang1999,
Would be great to merge the following 2 PRs:

https://huggingface.co/MCG-NJU/VFIMamba_S/discussions/1
https://huggingface.co/MCG-NJU/VFIMamba/discussions/1

This will enable https://github.com/huggingface/huggingface.js/pull/885 to be merged


update custom security policies

Description of changes:
This change updates custom security policies for the customer
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #2228 into main will decrease coverage by 0.05%.
The diff coverage is 93.75%.

@@            Coverage Diff             @@
##             main    #2228      +/-   ##
==========================================
- Coverage   83.57%   83.51%   -0.06%
==========================================
  Files         249      249
  Lines       16611    16614       +3
==========================================
- Hits        13883    13876       -7
- Misses       2728     2738      +10


Port DistanceMachine.cpp to use OpenMP

@abhinavrai44 could you rebase with the latest develop?

the comments regarding the arrays being used natively instead of SGVector has not been addressed by your fix.
one more thing:
please used index_t type for indecies like for example:
       int32_t idx_r_start = idx_a1;
       int32_t idx_start = idx_a1;
       int32_t idx_stop = idx_a2  + 1;

@vigsterkr Plz review

@vigsterkr Plz review the changes

@vigsterkr Done

yey great thnx!

Thanks


add intro

@vrp97 There are conflicts in merging the branch .Do loo into it and put up a new request.

Ok I'll check.
Or may i create a new branch  in place of  older one??
So everything will be updated.
On Mar 9, 2016 1:54 AM, "Arvind"<EMAIL_ADDRESS>wrote:

Closed #8 https://github.com/LearnOvate-Subscribers/Welcome/pull/8.
—
Reply to this email directly or view it on GitHub
https://github.com/LearnOvate-Subscribers/Welcome/pull/8#event-582300261
.


feature request:

Did you check existing requests?

[X] I have searched the existing issues

Describe the feature
Which configuration?
Filetype: .lua
Conform Version: Latest version
Expected behavior
Having an option out of the box, to switch between Prettier and Eslint to format files on saving, making it easiert to configure a autocommand which works for both tools.
Provide background
I am trying to format files like .tsx, .jsx, .js, .ts on save, and use the tool configured into the project (Eslint or Prettier).
What is the significance of this feature?
strongly desired
Additional details
No response

All the building blocks for this are already there. For example, this recipe to make a command that toggles format-on-save could easily be repurposed to change which formatters you're using for a particular filetype. The only tricky part would be figuring out when you want to use one tool vs the other, but once you figure that out it should be straightforward to either automatically choose the right one or set up a manual toggle.

All the building blocks for this are already there. For example, this recipe to make a command that toggles format-on-save could easily be repurposed to change which formatters you're using for a particular filetype. The only tricky part would be figuring out when you want to use one tool vs the other, but once you figure that out it should be straightforward to either automatically choose the right one or set up a manual toggle.

Thank you for the quick reply!


experiment: implement gc trigger in backend

suggested change to #4300 that avoids unintended duplicate gc calls from non-empty stack
The drawback is yet more code in the compile.ml but could be shrunk with some refactoring..

 This is much better than my original version.
I prepared a small refinement of this PR: https://github.com/dfinity/motoko/pull/4305.


Fixed #30812 -- Made ConditionalGetMiddleware set ETag only for responses with non-empty content.

Please fix the failure and add tests!

Thanks for help!

@Dart-net Thanks :+1: I added a small note to backward incompatible changes.


Support for more authentication variables in Swift

SWIFT_AUTH_VERSION 3 usually uses more parameters to authenticate

Hi Joel,
Can you tell me about how this works in terms of backwards compatibility and client versions? Are any fields in duplication/renamed from SWIFT_AUTH_VERSION  = 2 to 3? I'm eying tenant_name vs tenant_id, and stuff like that.
Secondly, will this produce a crash in any version in the oldest versions of the supported clients, because it cannot assign some fields?
Thanks for answering my questions.

Merged in https://github.com/wal-e/wal-e/commit/be922a50f4f8f93d5a9e0ab1c61521414700f4d8.


use of RegRawCallback

hello
Could I use method RegRawCallback ?  It now has been commented in #if 0(zero) region.
Thanks

you can use the VPlay::PutRawData for video decode, StartGetRawFrame will set the callback of the stream.

Hello & thanks for your attention
How I Can use VPlay::PutRawData or set callback for the stream with StartGetRawFrame ?
Where do I add these codes ?
Thanks

you need write new class to call the VPlay

Hi , How can I get decoded frame? I should use callback for get decoded frame? which one ?
Thanks a lot :)


Online tools and try sites

Hi Charlotte - this isn't an exhaustive list but hopefully useful. Let me know what you think (just hope I haven't messaged up the PR!)
Jim

Glad it’s ok. Will try and tidy up the formatting too
On Fri, 2 Nov 2018 at 18:33, Charlotte Fereday<EMAIL_ADDRESS>wrote:

@charlottebrf approved this pull request.
In README.md
https://github.com/charlottebrf/coder-newbie-advice/pull/46#discussion_r230429418
:

@@ -28,6 +28,7 @@ The current information I've collated includes:

Learn To Code Resources
Podcasts
Tests/Interviews/CV
+* Getting started without installing

Brilliant thanks for adding this! 💃
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/charlottebrf/coder-newbie-advice/pull/46#pullrequestreview-171172277,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXPYB0zFf_1-x9wLMVPTyhRsvuu8Uznks5urI_vgaJpZM4YL5z9
.


math/big: replace the division with multiplicative inverse

Division is much slower than multiplication, as we know. The algorithm for dividing 128 digits by 64 digits in math/bits.go/Div64, which has a certain impact on the efficiency of nats division, requires two divisions. And the method of using multiplication by 2/1 (128bits divide 64bits )multiplicative inverse and replacing division with it can increase the speed of divWVW algorithm by three times, and at the same time increase the speed of nats division.
I have submitted a code change using 2/1 type multiplicative inverse and the corresponding benchmark data in gerrit. If possible, using a 3/2(192bits divide 128bits) type multiplicative inverse and changing the structure of nats division code will get a more obvious improvement.

This issue doesn't need to be a proposal. It's just an optimization - go for it.
That said, it looks like your CL is adding API to math/bits (GetInvert and DivByInv). That change would require a proposal.
Is there any way to do your change without adding API?

This issue doesn't need to be a proposal. It's just an optimization - go for it.
That said, it looks like your CL is adding API to math/bits (GetInvert and DivByInv). That change would require a proposal.
Is there any way to do your change without adding API?

Yes there is. I added the API because I am not sure if I should completely replace the original division method. If we want to think of it as an optimization, we can use a more sophisticated method without adding an API. I will make the corresponding changes in my CL.

@randall77 Im sry that I don't know how to remove the proposal tag. I replaced the original division function, deleted the modification to the bits package and changed getInvert to internal interface so that there's no new API in bits package.

Note that this is also the same as issue #9246 math/big: avoid DIVQ  I'm not sure if the two issues should be merged or one closed.

I believe they are the same issue.
(Other than the claim that it can be made faster even for a single division, which is manifestly not true for the implementation as it currently stands, as it uses a division to compute the inverse.)

@randall77 Yes, I think so.  Should I close this issue?

No, probably easier just put a "Fixes #9246" line in your CL description (so both will be closed when this CL lands).

It's already merged, it just didn't have the Fixes #XXXXX line that makes the bot autoclose the issue.


How convert *.dcm to *.bmp

How can i convert images from *.dcm to *.bmp or another format?

There are lots of ways depending on your use case. If you want a programmatic solution, see #162. If you're just looking to batch process files, there are image converters out there that can do it for you. There are even some free online converters that will do it, but make sure you're not using them for actual patient .dcm files, as you never know what they're doing with the files you upload.


MY_ENV=abc vitest exposes import.meta.env.MY_ENV === "abc"

Describe the bug
We discussed this shouldn't happen, but it looks like it's happening on Vitest.
Actually I'm not sure if this is really a bug or a convenient feature.
// MY_ENV=abc vitest

import { test, expect } from 'vitest';

test('import.meta.env', () => {
  expect(import.meta.env.MY_ENV).toMatchInlineSnapshot(`"abc"`);
  expect(import.meta.env.HOME).toMatchInlineSnapshot(`"/home"`);
});

test('process.env', () => {
  expect(process.env.MY_ENV).toMatchInlineSnapshot(`"abc"`);
});

Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-j5abrx?file=test%2Frepro.test.ts
System Info
(stackblitz)

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vite: latest => 5.2.11
    vitest: latest => 1.6.0

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

It is fine to expose this as long as it's not loaded from a env file

Yeah, this seems alright and I think I misunderstood the issue of https://github.com/vitest-dev/vitest/issues/5624. I don't think OP is concerned with import.meta.env but it's about process.env and .env file. I'll follow up with the OP later.
FYI, here is an updated repro:
import { test, expect } from 'vitest';

test('import.meta.env', () => {
  expect(import.meta.env.MY_ENV).toMatchInlineSnapshot(`"abc"`);
  expect(import.meta.env.VITE_ENV).toMatchInlineSnapshot(`"yay"`);

  expect(import.meta.env.MY_DOT_ENV).toMatchInlineSnapshot(`undefined`);
  expect(import.meta.env.VITE_DOT_ENV).toMatchInlineSnapshot(`"yay"`);

  expect(import.meta.env.HOME).toMatchInlineSnapshot(`"/home"`);
});


Dirty seven game By this  bundle

Hello, I wrote a card game(UNO) with this bundle a few year ago but I can not finish that game(I dont have time), Now I Decide to Upload its source to github, I hope its source to be as a demo for this library and help other people to work with this bundle.
repository
thank you for your works & this good library.

Thanks for sharing @ghanbari !


add support for gpt-4-turbo model

User description
Updated to support the new models added to OpenAI.

Type
enhancement

Description

Added support for two new models: gpt-4-turbo-2024-04-09 and gpt-4-turbo, both with a token limit of 128K. This enhances the application's compatibility with the latest models from OpenAI.

Changes walkthrough
Relevant filesEnhancement

__init__.pyAdd Support for GPT-4 Turbo Models

pr_agent/algo/init.py
Added support for gpt-4-turbo-2024-04-09 model with a token limit of 128K.  Added support for gpt-4-turbo model with a token limit of 128K.

+2/-0

✨ PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

@riya-amemiya looks good.
If the new model (gpt-4-turbo-2024-04-09) will show superior results over the prev one, maybe in time we will consider making it the new default model.
We might consider also possible usage for the vision mode


bug bounty

Thank you for open sourcing this library.
Is there a bug bounty program for this library?
What would be a proper channel to communicate vulnerabilities?

Currently, we have not added it to scope for our bug bounty program at https://bugcrowd.com/binance, but are working on it.
For now, if you find any security issues, you can send us a report at<EMAIL_ADDRESS>


scan_and_begin_processing does not skip steps if validation fails

scan_and_begin_processing has no maybe_keep step, so the metadata gets read even if validation fails.  This has consequence downstream, where send_status_message sweeps up the whole session.log to send as an error message when one of its conditional tests fails.  (This behavior is also probably wrong, since session.log can be huge, even for simple failures).  At the least, add a branch to skip scanning of metadata.tsv if validation fails.

Resolved by https://github.com/hubmapconsortium/ingest-pipeline/pull/597


"Or" Logical Operator issue?

The "And" operator works as expected:
    let expr = ce.box(["And", ["Equal", "True", "False"], ["Equal", "True", "True"]])
    console.log(expr.evaluate().valueOf()) // false

    expr = ce.box(["And", ["Equal", "True", "True"], ["Equal", "True", "True"]])
    console.log(expr.evaluate().valueOf()) // true

However, the "Or" operator does not:
    let expr = ce.box(["Or", ["Equal", "True", "False"], ["Equal", "True", "True"]])
    console.log(expr.evaluate().valueOf()) // true

    expr = ce.box(["Or", ["Equal", "True", "True"], ["Equal", "True", "False"]])
    console.log(expr.evaluate().valueOf()) // true

    expr = ce.box(["Or", ["Equal", "True", "False"], ["Equal", "True", "False"]])
    console.log(expr.evaluate().valueOf()) // true

    expr = ce.box(["Or", ["Equal", "True", "True"], ["Equal", "True", "True"]])
    console.log(expr.evaluate().valueOf()) // true

I was browsing definitions and found this:

https://github.com/cortex-js/compute-engine/blob/main/src/compute-engine/latex-syntax/dictionary/definitions-logic.ts

probably not resolving situation above, but still wrong and it is operator or issue.

@svitrol please feel free to submit a PR. I'd be happy to review and merge it.

@arnog sorry for not fixing this earlier :D but was focused on logical operators and didn't notice

latexTrigger: '\operator{False}', -> prases as True
latexTrigger: '\mathsf{F}', -> parses as True

Good catch. Fixed.


Only store decent records

Apparently around 85% of "records" stored on the database have "0" as their value, so it would be best to only store records with a value > 0. This should save a lot of disk space.

Fixed in #137


Enhancements in Create/Edit/Details Agent popups

[x] In Create/Edit Agent popup and Agent Details popup, make the colored section similar to the same one in Create/Edit Target popup

[x] In Edit Agent popup, in the colored section, the text that appear at the bottom should say: Editing Agent.... The text will be "Creating Agent..." only when the popup is in create mode.

[ ] In Agent Details popup, in the colored section, the text that appear at the bottom should say: Agents Details.... This text will change accordingly, when the popup change to Edit mode.

Working partially as expected

Working as expected


Base Cat Movement

Basic movement for the player as a cat.

Run, higher jump, shorter, wall hang/jump.


Layout and donation dropdown

What:

Fixes the spacing on "fishes" section for mobile devices
Add copy update on chapters dropdown for union widget

Why:
Closes https://app.asana.com/0/1196225495304457/1196874789481260
Closes https://app.asana.com/0/1196225495304457/1196225495304495
Media:
https://www.loom.com/share/0c3f74b42bd641a2a9805da491c6eaea

LGTM 🚀

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


Safe API for calling lua functions from rust

This will require implementing a wrapper structure around the lua state. It should be possible to get an instance of the structure from the global state. Also add the call method, which takes as input a reference to the structure containing the arguments and returns a Result containing the result of the lua function or an error.
For example:
#[derive(ToLuaTable)]
struct User {
    username: String,
    email: String,
    id: u64,
    active: bool,
}

#[derive(FromLuaTable)]
struct CreateUserResult {
    ok: bool,
    id: u64,
}

...

let lua = Lua::global()
let result: CreateUserResult = lua.call("some_module.create_user", &user)?;
if result.ok {
    ...
}

-- some_module.lua
function create_user(username, email, id, active)
    ...
    return true, id
end

Implemented in v5.0.0


Getting post-deploy hook failed error message but no output of any kind

Unfortunately there's no errors or any indication of what's going on. The post hook is a simple bash script that can be run manually as the same user pm2 is connecting with.
Any tips on how to debug?

Care that hooks are run with non-interactive shell so env var that are inside ~/.bashrc or ~/.zshrc arent loaded

The only environment variable used is NODE_ENV which is set in deploy.config.js.

Are you sure that pm2/node are available with the default env (eg. You didn't hardcoded the path with nvm for example) ? Have you any specific ssh config (ssh subsystem limitation) ?

Yes the post-deploy hook was working at one point. We're not using nvm.
I did notice that the script has no interpreter shebang. Could that be it? I can try adding it and see what happens.

Nope, bleh.

Any updates on this issue? I'm getting similar useless errors when post-deploy attempts to run.

Well I was deploying to our webserver as the apache user. The default login shell was specified as /bin/csh in the /etc/passwd file. I changed it to /usr/bash and now things are working.
yay

@dsclassen I think in our case we were expecting the NODE_ENV set on the project to be available and it wasn't so we had to set it explicitly in the post-deploy hook.


Support new writable option from Corestore

Depends on https://github.com/holepunchto/corestore/pull/54

CI error unrelated (clearAll method), will see to fix it


jdk8 hotspot debug images for Windows are missing .pdb files

The newly added debug image support in the build scripts is missing jdk8 hotspot .pdb files.
I believe the issue is because the jdk8 jdk/make/Images.gmk when it creates the jre purges the .pdb files from it before they are made external...?

Fix contributed upstream: https://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/ce0fb3b3283a


Some antrea-agent Pods always log errors about "join cluster failed"

Describe the bug

When Antrea is newly deployed to a multi-node cluster, there would always be the following errors in some antrea-agent Pods:
E0206 04:40:59.164477       1 cluster.go:224] "Processing Node CREATE event error, join cluster failed" err=<
        1 error occurred:
                * Failed to join <IP_ADDRESS>:10351: dial tcp <IP_ADDRESS>:10351: connect: connection refused

 > member="<IP_ADDRESS>"

It's actually harmless and caused by some agents were not started yet when the agent tries to establish a cluster with others. It will recover eventually after all agents are up.
However, such errors could confuse users when they meet other issues and look into the logs. I have received a few issue reports with the questions asking what the error means.
We should avoid logging such errors when nothing wrong happens to avoid unnecessary attention and confusion.
To Reproduce

Deploy Antrea v1.15.0 to a multi-node cluster. Then check all antrea-agent Pods' logs, there is a great chance that at least one of the Pods having the errors.

I'll take this issue to work on @tnqn.

The error is logged at this line,
https://github.com/antrea-io/antrea/blob/18bf0d8963e9a08d7de79730b29637187a03c6fc/pkg/agent/memberlist/cluster.go#L224
and the err object is from the line,
https://github.com/antrea-io/antrea/blob/18bf0d8963e9a08d7de79730b29637187a03c6fc/pkg/agent/memberlist/cluster.go#L222
Where Join() method is from hashicorp memberlist package. How we can find that nothing goes wrong? so that we'll avoid logging. Or I need to remove that log statement? @tnqn

Where Join() method is from hashicorp memberlist package. How we can find that nothing goes wrong? so that we'll avoid logging. Or I need to remove that log statement? @tnqn

We join Nodes in two cases: 1) when a new Node is created; 2) when the periodical job RejoinNodes runs.
For 1), it could fail "expectedly" in two cases: when Antrea is deployed the first time, agents start at almost the same time, faster agent will fail to join slower agent; when a new Node is really created, its agent will be ready after a few seconds so trying to join it immediately will likely fail. I feel we should change it to INFO to indicate this attempt, result, and it will be retried.
For 2), We should keep its failure as Error.
Besides, it would be better to consilidate the multiple errors returned by Join into one line string to keep log lines unified.

This looks to be a fun issue. I am applying to Antrea for the current LFx internship and I'd be taking a stab at it once I set up antrea in a cluster to replicate the problem.

Hey there, I would like to give it a try. Are you still working on it @roopeshsn ?

Hey there, I would like to give it a try. Are you still working on it @roopeshsn ?

Yes, I am working on it.

Where Join() method is from hashicorp memberlist package. How we can find that nothing goes wrong? so that we'll avoid logging. Or I need to remove that log statement? @tnqn

We join Nodes in two cases: 1) when a new Node is created; 2) when the periodical job RejoinNodes runs.
For 1), it could fail "expectedly" in two cases: when Antrea is deployed the first time, agents start at almost the same time, faster agent will fail to join slower agent; when a new Node is really created, its agent will be ready after a few seconds so trying to join it immediately will likely fail. I feel we should change it to INFO to indicate this attempt, result, and it will be retried. For 2), We should keep its failure as Error.
Besides, it would be better to consilidate the multiple errors returned by Join into one line string to keep log lines unified.

Hi! Let me know if this message make sense:
I0224 15:05:39.957935       1 cluster.go:230] "Processing Node CREATE event error, join cluster failed" error="Failed to join <IP_ADDRESS>:10351: dial tcp <IP_ADDRESS>:10351: connect: connection refused" member="<IP_ADDRESS>"
I0224 15:05:39.960605       1 cluster.go:230] "Processing Node CREATE event error, join cluster failed" error="Failed to join <IP_ADDRESS>:10351: dial tcp <IP_ADDRESS>:10351: connect: connection refused" member="<IP_ADDRESS>"

Let me know if this message make sense:

Yes, it would be better to append "will retry later" in the message.


Event for overriding the metadata.

Required for pages which use request=false (in rooomy)

There is already:

staticDataUpdated  event which is fired just before the meta data is populated with the data passed from this event.

Oh great, closing this


[Feature Request]: Feedback Addition with emoji review section

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
Feedback Addition with emoji review section
Use Case
Feedback Addition with emoji review section
Benefits
Feedback Addition with emoji review section
Add ScreenShots

Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

Create a page for it and add its link in the footer. Also, add a backend API to store it simply in the backend.


check balance for some specific btc address

How can I interact with electrum servers? As example I want to check balance for some specific btc address, can you bring example how can I do it by using python? I understand that I need to send "blockchain.scripthash.get_balance" command to server, but how can i do it?

There is a minimal example using the aiorpcx library here in said lib's repo:
https://github.com/kyuupichan/aiorpcX/blob/e55950fed903b63e82b87c7b6ca93ab50e18ce08/examples/client_rs.py
For concrete usage of protocol methods, see interface.py in electrum:
https://github.com/spesmilo/electrum/blob/6a34d93ce2388feeae320ab1c614bc48ad2d4b31/electrum/interface.py


Advisor data collection runbook fails when no recommendations are available for a given subscription

If that happens, the Az Advisor Recommendations Generate API endpoint should be called.

Resolved with version 1.9


Readiness endpoint timed out error

Summary
From a standard helmc install workflow-dev install, the builder's readiness check never succeeds
If You Are Reporting a Bug
Upon startup, the builder outputs the following logs:
ENG000656:example-go aaronschlesinger$ kd logs -f deis-builder-wd5b9
2016/05/23 19:38:20 Starting health check server on port 8092
2016/05/23 19:38:20 Starting deleted app cleaner
2016/05/23 19:38:20 Starting SSH server on <IP_ADDRESS>:2223
Listening on <IP_ADDRESS>:2223
Accepting new connections.
Checking closer.
---> ---> ---> 2016/05/23 19:39:00 Readinesscheck endpoint timed out after 2s
2016/05/23 19:39:10 Readinesscheck endpoint timed out after 2s
2016/05/23 19:39:20 Readinesscheck endpoint timed out after 2s
...repeated...

Replication Steps
Please provide a detailed list of steps to reproduce it.

Create a Deis Cluster from the deis/workflow-dev chart
Get the name of the builder pod kd get pod | grep deis-builder
View the logs of the builder pod kd logs -f <builder-pod-name>

You should see the aforementioned errors in the builder logs.
 I removed my previous one and started a new, identical, cluster, and I no longer have any problems. This fact combined with @smothiki's successful testing, leads me to close this issue. @kmala if you have any objections, can you please re-open?

Getting same error logs after a fresh install with off cluster object storage and postgres (v2.1.0)

The issue was that my off cluster database was not reachable, a better error message would have helped but got rid of the error now.


Update Readme file

What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[x] Other, please describe:

Description
I changed the text from move to here to move here
Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:

[x] It's submitted to the dev branch.
[ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[x] All tests are passing: https://github.com/vuejs/vue-test-utils/blob/dev/.github/CONTRIBUTING.md#development-setup
[x] New/updated tests are included

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

Hi! Thank you for taking the time.
#1792 will actually remove the warning, and I already fixed the typo, so I think we're good :)
Closing this up. Thanks!!


chore: upgrade go-sdk to v1.3.0. enforce otel hook to be valid Hook at compile time

This PR

upgrade go-sdk to v1.3.0
enforce otel hook to be valid Hook at compile time

Related Issues

Fixes #116
Notes

Follow-up Tasks

How to test

Does this require v1.3 to work? If so, can you make sure to include that in the readme?

Does this require v1.3 to work? If so, can you make sure to include that in the readme?

Good shout, done.


ariaTSsetup incomplete extraction of data

I have a track of GUNW products downloaded using the python script provided by ASF vertex search webpage. The bounding box or the area of interest was defined by dragging a rectangle on the ASF page.
I went on and used ariaTSsetup.py to extract the data from the standard products. ariaTSsetup.py was run on Jupyter:
!time ariaTSsetup.py -f 'products/*.nc' -b '26.140 33.494 33.558 37.596' -d Download --mask Download --multilooking 10
The output is quite normal without issue. Although there seem to be some duplicates from ASF.

Time-series Preparation Function:
Shapefile ./user_bbox.json created for input user bounds.
Multi-core version
Multi-core version failed, will try single for loop
4 out of 2445 GUNW products rejected for not meeting user's bbox spatial criteria
Group GUNW products into spatiotemporally continuous interferograms.
221 out of 2441 products rejected since they are duplicates
All (456) interferograms are spatially continuous.
Thread count specified for gdal multiprocessing = 2
Download/cropping DEM
Downloaded 3 arc-sec SRTM DEM here: ./DEM/SRTM_3arcsec.dem
***Downloading water mask... ***

Extracting unwrapped phase, coherence, and connected components for each interferogram pair
Generating: unwrappedPhase - [==================================================] 20200711_20200629    0s /     0s
Generating: coherence - [==================================================] 20200711_20200629 2559s /    52s

Extracting single incidence angle, look angle and azimuth angle files valid over common interferometric grid
Generating: incidenceAngle - [==================================================] 20141023_20141011
Generating: lookAngle - [==================================================] 20141023_20141011
Generating: azimuthAngle - [==================================================] 20141023_20141011WARNING: azimuthAngle layer for IFG 20141023_20141011 has R² of 0.5895 and standard error of 0.4935°, automated correction applied
Creating directory: ./stack
Number of coherence discovered:  456
[==================================================] 20200711_20190705    4s /     0s
cohStack : stack generated
Directory ./stack already exists.
Number of connectedComponents discovered:  456
[==================================================] 20200711_20190705    5s /     0s
connCompStack : stack generated
Directory ./stack already exists.
Number of unwrapped interferograms discovered:  456
[==================================================] 20200711_20200629    5s /     0s
unwrapStack : stack generated
real	72m13.473s
user	58m40.817s
sys	8m50.021s

However, the result is very odd. I end up having all the extracted datasets highly incomplete. Including the unwrapped phase, downloaded DEM, and water mask file. This happens for all the dates and files.
Water mask:

Unwrapped phase

DEM

They seem to be giving me only the overlapping region of the most northern GUNW products.
I have the other track also with this issue, despite that the extracted data are in the middle portion. Like this:

It worked fine before for the same region. I'd got some normal results when I ran ariaTSsetup.py for about half the amount of standard products a few months ago. Although that time I download the dataset using ariaDownload.py without giving a bounding box when downloading and extracting. Neither did I multilook the data. The unwrappedPhase.png should be like this:

I am wondering whether this is due to my bounding box or multi looking. I am trying to do the ariaTSsetup again without multilooking and see what I will get.
ariaTSsetup.py -f 'products/*.nc' -b '26.140 33.494 33.558 37.596' -d Download --mask Download

@liuykai I would suggest leveraging the minimum overlap (-mo) option to filter out shorter scenes that bias the common intersection cutline. Refer to issue ticket #161 for a detailed discussion regarding this option, and issues you may encounter without it.
Please let me know if this helps.

In addition feel free to look at this branch here as guidance wrt -mo. https://github.com/aria-tools/ARIA-tools-docs/blob/aria_sds/JupyterDocs/ariaEnd2End/ariaEnd2End.ipynb

closing this as the provided guidance should resolve this.

I see, @sssangha . Thanks. I looked at post #161 and found it useful.
So because in my study area, there are some small productions (some single scene size products). We can tell from the lat_extent plot that these small products (in my case, mostly in the northernmost region) are driving the intersection criteria. So eventually, the only intersection is there.

As long as we increase the minimum overlapping area, we can avoid that.
I am currently using an estimated minimum area by measuring the polygons overlapping area in QGIS. I used the .json files from the autogenerated productBoundingBox directory and user_bbox.json

Now, this is working fine.

@dbekaert , thanks for the link to the branch. I haven't tried the computation method from ariaEnd2End.ipynb.
Because we will have the productBoundingBox directory and the user_bbox.json once a user runs ariaTSsetup.py with a specified bbox (-b option). It would be good to simply use these json files, then calculate and apply the best minimum overlapping area on the fly. This way, we don't need to first query the DAAC API for historic data and retrieve a CSV file with meta-data. Or perhaps I misunderstood it here.

@liuykai that is the correct observation if you have already extracted the products, likely no need to do it.  Feel free to add the other variant, would be instructive. In the end what you do is loop over all the shapefile, load them with shapely and take the union over and over to get the ground track determined. But it would imply downloading or running virtually the extract step without doing any processing.
The daac API directly gives back all meta data in json so is relative fast < min, could be done likely directly with respect products too, but for now we pointed to the SLCS; have not tried to point it to the GUNW products

I see. Now that makes sense to me. Thanks for clarifying it.


Errors building docker

Errors building docker unrelated to old https://github.com/roboticslab-uc3m/pytrigno/issues/1

[x] osrf/ros:humble-base not found: manifest unknown: manifest unknown
[x] requirements.txt not found

osrf/ros:humble-base not found: manifest unknown: manifest unknown
[x]  requirements.txt not found

But now:
  File "/home/dev_ws/ros2-pytrigno/install/ros2_pytrigno/lib/python3.10/site-packages/ros2_pytrigno/delsys_publisher.py", line 7, in <module>
    from roboasset_msgs.msg import DelsysIMU
ModuleNotFoundError: No module named 'roboasset_msgs'


ng-change / ng-keyup / $scope.$watch while building Korean characters not working

I'm building a Korean vocabulary trainer and I want to compare user input as people type.
In Korean and some other Asian languages, you build letters with multiple keyup events. In Chrome and after Angular version 1.2.1 (works fine in 1.2.1), $scope.$watch, ng-change and ng-keyup can only access typed characters once they have been fully composed and the composition of a next letter has started (or a space bar has been entered).
Here's some example code with the following, undesired result:
Input: ㄱ
Console:
ng-keyup : undefined

Input: 가
Console:
ng-keyup : undefined

Input: 감 (character is now fully composed)
Console:
ng-keyup : undefined

Input: 감ㅅ (starting the next character, same behaviour with space bar)
Console:
ng-change : 감
ng-watch: 감 undefined
ng-keyup : 감

If you change the Angular version of the Fiddle under External Resources to https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.min.js, the console will log each typed character and not only once the character has been fully composed and the next character has started.

@pkozlowski-opensource Thanks a lot Pawel. I created at custom directive as suggested: http://stackoverflow.com/questions/27663149/angularjs-trigger-ng-change-ng-keyup-or-scope-watch-while-composing-korean-c/27735677#27735677. Please let me know if there's a better to do it. Thanks...

@pkozlowski-opensource Thanks a lot Pawel. I created at custom directive as suggested: http://stackoverflow.com/questions/27663149/angularjs-trigger-ng-change-ng-keyup-or-scope-watch-while-composing-korean-c/27735677#27735677. Please let me know if there's a better to do it. Thanks...


Orientation

Not an issue, I just don't know how to leave a comment.  I wanted to start out by saying thank you, thank you, thank you.  I just have one question.  It works perfectly, but only if the AssetTracker is in a flat position.  Is that just the nature of the Accelerometer or is this an initialization issue and something that can be easily done.
Regards,
Bill Freeman

You're welcome! It's probably because of this line of code in LIS3DH.cpp
int1_cfg = INT1_CFG_YHIE_YUPE | INT1_CFG_XHIE_XUPE;
I couldn't get it to reliably cancel out the force of gravity, so I just turned off the Z axis. If you have it in any other orientation, of course gravity is now applying force in X and Y directions.
The chip should be able to cancel it out, but I couldn't get it to work. Thought I didn't spend that much time trying.

This is a problem for me too! I've tried setting adding the Z axis in int1_cfg: indeed, it seems as written, the gravity isn't being cancelled properly.

OK, so with some fiddling:
writeRegister8(REG_CTRL_REG2, CTRL_REG2_HPM1 | CTRL_REG2_HPM0 | CTRL_REG2_HPIS1);
& adding the Z axis to int1_cfg
Seems to give desired results, though i couldn't tell you why (the documentation needs work!)

That seems logical. I figured you'd either need to enable the high pass filter or set a reference level. The high pass filter is preferable because if you have to set a reference level you also need to figure out when it's not currently moving because you should only set the reference when stationary. I'd definitely go with the high-pass filter if it works!

@rickkas7 noticed Z axis hasn't been added to your new code. Is it now safe to do so? Haven't had a chance to go through
Merry X-mas and thanks for your work on the new libraries.

There's Z-axis and correct support for gravity compensation in the LIS3DH code I put in:
https://github.com/rickkas7/AssetTrackerRK
I should merge the code back into this, but I have not done so yet. It should just drop right in.

Oh right! I still see "int1_cfg = LIS3DH::INT1_CFG_YHIE_YUPE | LIS3DH::INT1_CFG_XHIE_XUPE;"  (No Z axis?) in the LIS3DH.cpp from the RK codebase?
Am i looking in the wrong place?

I'm pretty sure it was an oversight not adding it to line 27. I think it should be:
int1_cfg = LIS3DH::INT1_CFG_ZHIE_ZUPE | LIS3DH::INT1_CFG_YHIE_YUPE | LIS3DH::INT1_CFG_XHIE_XUPE;

I gave it a quick test with the wake on move test and it works properly for me.

That makes sense to me!
You also set int1_cfg at line 50 - but i gather that is for an entirely separate purpose.
I will retest everything with the modified line 27 and report back.


Can't open the install.md and getting_started.md.

Can't open the install.md and getting_started.md.

We will fix this asap


Cronjob not running

Tried to run db-sync-tool as cronjob but it doesnt run at all!
here's the crontab task >
19 10 * * * /usr/bin/python3 /usr/local/bin/db_sync_tool --yes --config-file /var/www/html/mconfig.json

Hej there,
have you tried to run the command by your own to see the result?
/usr/bin/python3 /usr/local/bin/db_sync_tool --yes --config-file /var/www/html/mconfig.json

Otherwise you can define a cronjob log file to see the result of the db-sync-tool:
19 10 * * * /usr/bin/python3 /usr/local/bin/db_sync_tool --yes --config-file /var/www/html/mconfig.json > /var/www/html/logs/db-sync-tool.log 2>&1

Which version of the db-sync-tool do you use?

Hey there. Thanks for your reply
Yes I tried
/usr/bin/python3 /usr/local/bin/db_sync_tool --yes --config-file /var/www/html/mconfig.json
and it runs just fine.
I tried to log it but there is no log file being created and there is also nothing in the syslog which is weird.
I have other cron tasks running just fine.

Updated it to the latest version (2.9.0) and it works! thank you so much and sorry for bothering you.


fix changelog changes and features for 0.2.0

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

It is possible to configure CI to automatically update the change log on every PR. Do you want me to do that?

It is possible to configure CI to automatically update the change log on every PR. Do you want me to do that?

@barshaul @shachlanAmazon what do you think?

IMO @Yury-Fridlyand has more important things to focus on right now. let's not sidetrack him.


Add Species and Owners Tables Update Animals Table - Add new queries

In this PR I fulfilled the following tasks:

[x] Create a table named owners with the following columns:
id: integer (set it as autoincremented PRIMARY KEY)
full_name: string
age: integer
[x] Create a table named species with the following columns:
id: integer (set it as autoincremented PRIMARY KEY)
name: string
[x] Modify animals table:
Make sure that id is set as autoincremented PRIMARY KEY
Remove column species
Add column species_id which is a foreign key referencing species table
Add column owner_id which is a foreign key referencing the owners table
[x] Insert the following data into the owners table:
Sam Smith 34 years old.
Jennifer Orwell 19 years old.
Bob 45 years old.
Melody Pond 77 years old.
Dean Winchester 14 years old.
Jodie Whittaker 38 years old.
[x] Insert the following data into the species table:
Pokemon
Digimon
[x] Modify your inserted animals so it includes the species_id value:
If the name ends in "mon" it will be Digimon
All other animals are Pokemon
[x] Modify your inserted animals to include owner information (owner_id):
Sam Smith owns Agumon.
Jennifer Orwell owns Gabumon and Pikachu.
Bob owns Devimon and Plantmon.
Melody Pond owns Charmander, Squirtle, and Blossom.
Dean Winchester owns Angemon and Boarmon.
[x] Write queries (using JOIN) to answer the following questions:
What animals belong to Melody Pond?

List of all animals that are pokemon (their type is Pokemon).

List all owners and their animals, remember to include those that don't own any animal.

How many animals are there per species?

List all Digimon owned by Jennifer Orwell.

List all animals owned by Dean Winchester that haven't tried to escape.

Who owns the most animals?

The observation has been fixed.
Thanks


Fix bug in NetworkPolicy implementation with OpenFlow

Use a unique format to generate the key of a conjunctive match flows
in the global case for both IP and IPNet. This could ensure the conjunctive
match flow context in Antrea agent is the same as the flow entry realized
on the OVS.

/test-all

/test-all

/test-all

/test-all

/test-all

It failed on "NetworkPolicy between server and client should enforce egress policy allowing traffic to a server in a different namespace based on PodSelector and NamespaceSelector", is it related to this PR?

/test-all

/test-all

/test-all

It looks the failure is not introduced by this fix. I have re-run all tests multiple times, and run the failed case more times, the error can't be reproduced.

In commit message:

Use a unique format to generate the key of a conjunctive match flows
in the global case
match flows -> match flow
global case -> global cache

/test-all


Fix openDeviceById() and leaveListeningMode()

This PR introduces the following changes:

Move device filtering logic to the USB backend implementation. This allows for better encapsulation of backend-specific differences, such as caching of the device objects in node-usb, and the need to request a permission to open a device in WebUSB.
Fix the problem where calling openDeviceById() may close an unrelated device instance.
Do not wait for the device to exit listening mode in leaveListeningMode(). A device without network credentials re-enters the listening mode and causes leaveListeningMode() to fail with a timeout error.
Add platformId property to device objects.
Integration tests can now be enabled via an environment variable.

Steps to test:
RUN_OPTIONAL_TEST=1 npm test

[ch28466]


fix InlineImageViewer example extension

and separate the filename and close button.

@kidwm Could you move the in line styles to a style sheet? We could then go ahead and merge this change.

@nethip I've done it.

@kidwm Thanks! I would do a quick round of testing and merge this.

@nethip @kidwm What is the status of this?

LGTM, ideally the filename could be near the X to match other QuickEdit.
But at least now it works again.
@kidwm thank you.


Haramard product between two different spatial-sized matrices in Hierarchical Audio-Visual Cross Attention

Hello, first of all I really appreciate you provide the world with such a great project.
I am reading your paper line by line and hit upon with the question seeing the following part of it:

.
To my knowledge, the masks M are obtained from the face image I and therefore have the same spatial size with it while o, the output of cross attention between the latent representations and audio features, has the same spatial size with the latent.
The spatial sizes won't be matched according to my understanding. Is this what you mean by ,,different scaled latent representations'' (red-colored phrase)? If yes, how's the hadamard product between two different spatial sizes implemented?
I'm looking forward to hearing from you about this question. Thanks for the great project!
Cheers,
Justin

Also seemingly your notation for the regionally masked attention output about poses is changing from b_t^s to a_t^s without any specificatation.

Thanks for your attention! First, we resize three masks to different scale to match the latent shape. Then we apply hadamard product. And for the notation mistake, I apologize for that. Thanks!

Thanks for your kind and quick response :)


Pagerduty

Readme file with images

This looks good. A few grammar comments, but I'm going to merge and make some corrections.


Optimize browser bundle for faster loading

I solved #92

Looks good! Could you rebase to the main branch again? Lint CI failed and I just fixed it in the main branch

Also, could you help me to confirm how much size it has decreased, before and after using terser?

Thank you. Got it!
File size before the changes: 3.2MB
File size after the changes: 2.0MB

Yes, I got it!

@Ryoko619 Can you also remove examples/browser/dist and rebase this branch onto the main branch? Feel free to let me know if there is anything I can help too. Thank you :)

I'm sorry for the repetition. Is it done?

@Ryoko619  Sorry, I didn't notice that we should add terser in rlnjs/rollup.config.mjs instead of rlnjs/examples/browser/rollup.config.mjs. So we have two things left that should be done:

Use terser in rlnjs/rollup.config.mjs
Rebase this branch onto the main branch, since there are conflicts between this branch and the main branch

To rebase, we can do something like this
# Under rlnjs project root
git fetch origin
git checkout feat/minimize_rlnjs_bundle
git rebase main
# Solve the conflicts
...
git push

Can I fix it based on your contribution? Sorry for the inconvenience

I apologize for any inconvenience caused. I rebased onto the main branch, but I couldn't resolve the issue. What should I do next?

Hey @Ryoko619 , no worries at all! It's just examples/browser/* are removed so your changes are not working now. Could you try the steps below? I think it may be easier to make new commits on top of the latest main branch instead of rebasing.

Update the main branch in your local environment

git checkout main
git pull origin main

Check out a new branch

git checkout -b feat/minimize_rlnjs_bundle_new

Make your changes

Install terser and add terser in rlnjs/rollup.config.mjs.

Commit and push your new branch to your remote repo as feat/minimize_rlnjs_bundle

You may need to do it with git push -f. Let me know if you encounter any issue :)

Thank you very much once again.
I think I have successfully pushed 'feat/minimize_rlnjs_bundle_new' to the remote branch, but can you confirm if it was done correctly?

Ah and can you try this?
git push -f origin feat/minimize_rlnjs_bundle_new:feat/minimize_rlnjs_bundle

Sorry, another conflict has occurred.

@Ryoko619 No worries! I've rebased your branch onto the main branch. Check out this branch. Can you clone that branch ryoko619-minimize_bundle and push to your feat/minimize_rlnjs_bundle#92 again? and this PR should be rebased.
# Fetch all branch from RLNjs repo
git fetch origin
git checkout ryoko619-minimize_bundle-rebased
# Assume `mine` is your remote repo
git push -f mine ryoko619-minimize_bundle-rebased:feat/minimize_rlnjs_bundle#92

@Ryoko619 Great work! Thanks a lot for your contribution 🙏


when i run GLAS dataset,something has happended,how could i solve it?

python3 train.py --train_dataset ./data/train --val_dataset ./data/val --direc ./output --batch_size 1 --epoch 400 --save_freq 10 --modelname "kiunet" --learning_rate 0.0001
Let's use 2 GPUs!
Total_params: 291243
/home/sc1/miniconda3/lib/python3.7/site-packages/torch/nn/functional.py:2479: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [927,0,0] Assertion t >= 0 && t < n_classes failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [415,0,0] Assertion t >= 0 && t < n_classes failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [799,0,0] Assertion t >= 0 && t < n_classes failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [287,0,0] Assertion t >= 0 && t < n_classes failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [671,0,0] Assertion t >= 0 && t < n_classes failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [159,0,0] Assertion t >= 0 && t < n_classes failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [543,0,0] Assertion t >= 0 && t < n_classes failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [31,0,0] Assertion t >= 0 && t < n_classes failed.
Traceback (most recent call last):
File "train.py", line 230, in
loss.backward()
File "/home/sc1/miniconda3/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/sc1/miniconda3/lib/python3.7/site-packages/torch/autograd/init.py", line 93, in backward
allow_unreachable=True)  # allow_unreachable flag
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED

Hi @wcoool , "Assertion t >= 0 && t < n_classes failed" - this happens because the ground truth segmentation maps contain other pixels than 0 or 1 ( in case of binary segmentation ). So, when you use GLAS dataset, before calculating loss, you can include a couple of lines of code where you make all the pixels above 127 in the ground truth as 1 and the rest as 0. This should solve the error.
y_batch[y_batch>=127] = 1 y_batch[y_batch<127] = 0
You can also do this alternatively by running a separate code to make all the ground truth segmentation labels 0 or 1 separately initially and using the new folder of labels as the train and test path.

I  am very glad that you could help me solve the problem. In the paper ,you said that you set 85 images for training and 80 images for testing in GLAS dataset.  However, It has validation data in this code, Could  you tell my that the numbers of training images, validation images and test images  which you set in GLAS dataset.

As the number of images is very less, only train and test datasets were used for the experiments. You can just give the test dataset directory in val_dataset variable.

when i use  GLAS dataset. the output of the prediction  the array of  the image is o ,how to solve it?

Can you please check if you have processed the data according to the Notes ( meaning background is 0 and gland segmentation is 1) because I just retrained it and seems to work for me.


Update devDependencies

Coverage remained the same at 90.0% when pulling 694701d6a1ab993c51bdc4e0e1ef564f105c3fed on dependencies into 397320886ff0c28b6f0e8a4412cad7dfebccb9b2 on master.


Exiting Error in CLEARCHAT

Actual behaviour:
exiting the process
Expected behaviour:
not dying ;)
Error log:
TypeError: str.replace is not a function
    at Object.module.exports.get.isBoolean.isFinite.isInteger.isJustinfan.isNull.isRegex.isString.isURL.password.promiseDelay.replaceAll (/node_modules/tmi.js/lib/utils.js:42:20)
    at client.handleMessage (/node_modules/tmi.js/lib/client.js:592:40)
    at /tmi.js/lib/client.js:912:36
    at Array.forEach (native)
    at client._onMessage (node_modules/tmi.js/lib/client.js:911:11)
    at WebSocket.onMessage (/node_modules/ws/lib/WebSocket.js:418:14)
    at emitTwo (events.js:100:13)
    at WebSocket.emit (events.js:185:7)
    at Receiver.ontext (/node_modules/ws/lib/WebSocket.js:816:10)
    at /node_modules/ws/lib/Receiver.js:477:18

Server configuration

Operating system: ubuntu 14.04
Node version (if applicable): 5.11.1
NPM version (if applicable): 3.8.6
tmi.js version: 1.1.1

Hey @itsatony, do you happen to know what was the ban that triggered this error ?

no, sorry. it happened multiple times within about 1 hour, but the client had joined more than 300 channels. i can try and log the message. i wrapped it in a try catch so it should be easy... will get back to you on it

Okay because I think it has something to do with the ban reason that somehow ends up being null and it ends up throwing an error because there is nothing to replace

Closing this issue as it never happened again so we can't really fix it.. if anyone happens to have this error, please report the ban reason that caused this, thanks!


Private registry lookup failing for repo-hosted .npmrc

Raised by @dherges in https://github.com/singapore/renovate/pull/309/files#r136535783

From @dherges :
@rarkins This line does not work w/ a private npm registry when the .npmrc is read from target repository.  Example:
npmrc = { registry: 'https://my.corporate.local/npm-private/' }
regUrl = https://registry.npmjs.org/
pkgUrl = https://registry.npmjs.org/sort-object

It looks like registry-url does not read that second paramter
The private npm registry does work, when I put the .npmrc file to the renovate deployment folder, i.e.:
|- node_modules
   |- .bin/renovate
|- .npmrc

From @dherges:
When read from that second .npmrc, the url is constructed right:
regUrl https://my.corporate.local/npm-private/
pkgUrl https://my.corporate.local/npm-private/sort-object
{ registry: 'https://my.corporate.local/npm-private/' }

It works when there are no private packages references. When renovate tries to read npm packages that are only available on the private registry, it errors.

I summarize again:
Code in question: https://github.com/singapore/renovate/blob/master/lib/api/npm.js#L30-L34
const regUrl = registryUrl(scope, { npmrc });

regUrl does not work w/ a private npm registry when the .npmrc is read from target repository.
DEBUG: Found .npmrc file in repository (repository=my-project-name)

Example
npmrc = { registry: 'https://my.corporate.local/npm-private/' }
regUrl = https://registry.npmjs.org/
pkgUrl = https://registry.npmjs.org/sort-object

It looks like registry-url does not read that second paramter
"Counter Example"
The private npm registry does work, when the .npmrc file to the renovate deployment folder, i.e.:
|- node_modules
   |- .bin/renovate
|- .npmrc

Here, registry-url picks up the private npm registry url from the .npmrc file.

So the the use specific use case that's not working is:

Custom registry is being used for all packages (https://my.corporate.local/npm-private/)
.npmrc is checked into relevant repos, it contains: { registry: 'https://my.corporate.local/npm-private/' }
Renovate is incorrectly querying https://registry.npmjs.org instead of https://my.corporate.local/npm-private/

This use case can be made to work if the same .npmrc is added to the machine that Renovate is running from.
My initial root cause:

registry-url completely ignores the second parameter we're passing, so that part is clearly incorrect on our part
registry-url is basically just requiring npm to leverage its "npmrc hunting" and that's why when the npmrc is on the Renovate server it works

Solutions:

Stop passing npmrc to registry url as it won't do anything with it anyway
We need to do one of these two options:

Write the .npmrc to disk in a location where npm will find it when it's required (basically the current working dir or higher up)
Parse the npmrc ourselves for registry/scope. But then probably the authentication part will fail anyway

Here is the other - related - library we are using: https://github.com/rexxars/registry-auth-token. It seems to support npmrc as a parameter in its usage examples:
// Use the npm config that is passed in
console.log(getRegistryUrl('http://registry.foobar.eu/', {
  npmrc: {
    'registry': 'http://registry.foobar.eu/',
    '//registry.foobar.eu/:_authToken': 'qar'
  }
}))

I wonder if we can use that library for both purposes (obtaining URL as well as obtaining token). I'm also aware/concerned about someone having multiple .npmrc files for different package.json files in their repo and how to handle that. I may need to defer that to later if it's too hard to solve now.

@dherges I'm guessing for your specific use case that you don't use/need authentication for your local npm registry? i.e. as soon as the registry URL is correct, it would work?
I'd also like to consider/test the case of a private registry that requires authentication, e.g. npmrc includes a token too.

Yes. We DO NOT need authentication when reading from the npm registry, as renovate does.
We do need authentication when publishing to the npm registry, which renovate does not do.
Configuring the private registry on the deployment machine (where renovate is run from) is not a viable solutions, since we're running proxies of the npm registry for different (physical) locations and some teams put a .npmrc file in their repository. So renovate will pick up a different registry url than the humans do and we will likely have lots of lockfile changes. Imho, the user .npmrc from target repository should override the renovate .npmrc from deployment machine.

Yes I agree - repository npmrc should override Renovate server npmrc. BTW it's also possible to configure npmrc as a strong in renovate config too, but that's probably not applicable to your situation, nor does it fix the bug either. Please check out the PR fix when you get time.

Hmpf, the onboarding now works! However, for the merge requests it now fails when creating the commit:
DEBUG: Writing repo .npmrc (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: Writing package.json to /tmp/tmp-18512AtbY7bEtT1Zy (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: Writing .npmrc to /tmp/tmp-18512AtbY7bEtT1Zy (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: Removing any previous lock files (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: Writing any updated package files (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: Writing package.json (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: Generating yarn.lock for . (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: Generating new yarn.lock file (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: Spawning yarn install to create /tmp/tmp-18512AtbY7bEtT1Zy/yarn.lock (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: yarn stdout:
        (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
DEBUG: yarn stderr:
       error An unexpected error occurred: "https://registry.yarnpkg.com/@internal%2finternal: Not found".
        (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
 WARN: yarn install error (repository=184, dependencies=typescript, branch=renovate/typescript-2.x)
       "err": {
         "errno": -2,
         "code": "ENOENT",
         "syscall": "open",
         "path": "/tmp/tmp-18512AtbY7bEtT1Zy/yarn.lock"
       },
       "stdout": "",
       "stderr": "error An unexpected error occurred: \"https://registry.yarnpkg.com/@internal%2finternal: Not found\".\n"

Guess the resulting .npmrc (which is possibly a merged one) needs to be copied to the tmp folders.
But that looks good!
$ cat /tmp/tmp-18378Gqm4ZkeyTYye/.npmrc
registry=https://my.corporate.local/npm-private/

Also, running yarn install manually in that tmp folder succeeds.
Maybe, yarn does not pick up the .npmrc file when launcched like this?!?
https://github.com/singapore/renovate/blob/ea9ace2a76a1843473c92dbc8330b9c96cd27f26/lib/workers/branch/yarn.js#L16-L31

Fastest thing to try would be to copy the yarn binary to that tmpDir and execute it from there instead of the original path to see if it picks up the npmrc then. It may be looking only in its own path and up

I'm away from my computer for a few hours at least so can't test that right now. Should need only one fs line to copy yarn plus change the spawnSync options to remove extra path, in case you can try yourself.

Pretty much solves it:
$ pwd
/tmp/tmp-18378Gqm4ZkeyTYye
$ cp /srv/renovate/renovate-u/node_modules/renovate/bin/yarn-0.27.5.js
$ ./yarn-0.27.5.js
yarn install v0.27.5
info No lockfile found.
[1/4] Resolving packages...
warning<EMAIL_ADDRESS>Check out CommitLint which provides the same functionality with a more user-focused experience.
warning gulp > vinyl-fs > glob-stream ><EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning browser-sync > browser-sync-ui > weinre ><EMAIL_ADDRESS>express 2.x series is deprecated
warning browser-sync > browser-sync-ui > weinre > express ><EMAIL_ADDRESS>connect 1.x series is deprecated
warning istanbul-combine > istanbul > fileset ><EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule ><EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob ><EMAIL_ADDRESS>graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to<EMAIL_ADDRESS>as soon as possible. Use 'npm ls graceful-fs' to
find it in the tree.
[2/4] Fetching packages...
warning<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 102.56s.

I'll take a look! Don't worry and hurry! We Europeans start weekend in ~1 hour!

FYI, I tested with yarn v1.0.1 and same problem occurs

I'm testing using a kind of "opposite" approach to what you're doing. I add a valid (npm) package to package.json and then set .npmrc to point to an invalid registry. Therefore I want it to try the invalid registry and fail.
Set registry to google.com:
$ cat /tmp/test2/.npmrc
registry=https://google.com

Write a short js script that requires the repository's yarn helper js:
const yarn = require('/Users/rhys/github/renovate/dist/workers/branch/yarn');

const logger = {
  debug: console.log,
  warn: console.log
};

const lockFile = yarn.generateLockFile('/tmp/test2', logger);
console.log(lockFile);

.. and it fails, as I expect. i.e. in this case yarn is honouring the registry setting yet somehow when run through Renovate it is not?

It must be because of the child process?!? That's my current thinking...
Can you re-produce by starting yarn in a subshell? Somehow like $(cd /tmp/dir && yarn) maybe?!?!

@dherges but isn't my last example using the same child process? It requires the yarn helper file directly from the repo so I expected it to behave the same, yet it seemed to honour the registry= setting in the .npmrc. My best guess now is they Renovate is somehow setting some env variable that is altering yarn's behaviour. But I have doubts on that guess too. Ideally we could have a way to reproduce this simpler than having to run Renovate against real repos.

@dherges I've made some changes to how yarn is called, can you try with the latest version? Now using yarn directly out of node_modules plus passing empty env.

With the 9.61.11 version renovate creates merge request.
Repo-hosted .npmrc file is being recognized!

Awesome! Closing this issue then


Proposal: add func for float in @math pkg with postfix f

Unfortunately unless we bring back Num trait in X and make it generic, it's not possible to overload the function with different argument and same name.

IMO adding f to every Float function looks good enough, like:

lnf
logf
sinf
cosf
...

Originally posted by @tonyfettes in https://github.com/moonbitlang/core/issues/1050#issuecomment-2398611224
@bobzhang

we are planning to allow some overriding so that ln ( self : Float | Double) could both work

we are planning to allow some overriding so that ln ( self : Float | Double) could both work

I have two worries about this solution:

I know we can use self as Float/Double, and then how to infer type if let x = self and use the funcitons of self?
There is a problem that the algorithm of sin/cos/tan.... is based on the IEEE754 and double's bit. If we implement same algorithm for float, then this algorithm will be error. I think sin(self: Float) -> self.to_double().sin().to_float() is even a good solution.


Box Overflow (in Add New Comment) - Wagtail Storybook

Issue Summary

The size of the text field to add new comment is overflown

Proposed solution

In /wagtail/client/src/components/CommentApp/components/Comment/index.tsx
Edit in css for text field required

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

The UI/UX for the Storybook website is not looking appropriate

hello, i just want to confirm that i have to create a fork make change and upload it here. this is my first contribution so i just want to confirm it.

@mansi0829  can you assign this issue to me , so I work on this.

@sohankamble we don't assign issues outside of the core team.
See https://github.com/wagtail/wagtail/issues/10070 for a deep dive into your first contribution.
Or alternatively, as this bug is unconfirmed, please see if you can reproduce it and add a screenshot.
It looks like this is a bug in the storybook site so it may not be a huge problem, please check if this problem can exist in the actual Wagtail admin also.
If it's a problem in Storybook only, we may not need it fixed.

So I looked at the index.tsx and saw the snippet of code that has the text "Enter your comments". This part of the code has a react component called TextArea which is comprised of many elements including . This element is also found under main.scss for the CommentApp directory. As I checked back and forth between main.scss and .comment under style.scss, there must be some bug that changes the positioning of textarea as it should be centered within the white box, or at least no left/right padding.
A solution I found to this bug was making the padding 0 for the box. I also made the padding for the textarea to be 10px for top and bottom, 0px for the left and right. Here's what it looks like:

Here's the changed code in main.scss with comments:

Let me know if this is fine and I look forward to Pull Requesting this code!

@allenvtran I do not think this is an issue outside of the storybook code, it's possible that some other override is making this work in the page editor that is not applied in storybook.
See screenshot below, this looks 100% ok in the actual editor.

I am inclined to close this issue as it's not really critical to Wagtail core, but if you find a way to make this look the same in the editor and the Storybook, please suggest that approach. Changing the global box styles for one edge case in the pattern library (storybook) is not going to be an appropriate solution sorry.

@lb- Where do I find that page in Storybook? Is it under the Commenting Section?

@allenvtran not sure without having my editor open, just search in the code for the Storybook page's title 'someone else without avatar'. That should be unique enough to get you close.
Alternatively - look for the file that is a stories.jsx file that makes sense, there are less than 20 of them.

I can't seem to locate stories.jsx, but I do understand my mistake of changing all the comment boxes to have a zero margin.

I did a 3s search for the words 'Someone else' and the two files came up instantly.

client/src/components/CommentApp/components/Comment/index.stories.tsx
client/src/components/CommentApp/components/CommentReply/index.stories.tsx

@allenvtran sorry I cannot help with these kinds of questions going forward. You will need to do your own digging to find out where files are in the future. Please reach out in #new-contributors for finding files if you get really stuck.
I know it can be confusing to work through new code but this is not flagged as a good first issue and is not something that we even know is worth fixing. You are free to do your own digging and propose a solution but we wont be able to help you further for 'getting started' type questions on this issue.

Can you please assign this issue to me.

@gasman So can you please tell me in which issue I can contribute

@SyedImtiyaz-1 This is covered by the guide @lb- linked to: #10070

Thanks