[$500] Chat - Space below bold text increases after edit

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: <IP_ADDRESS>
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697477034366019
Action Performed:

Open the app
Open any report
Send bold text with # and send code block with 3 backtick in one line eg: # test Hii
Edit the message and modify text inside code block and save
Observe that now space between bold text and code block increases

Expected Result:
Describe what you think should've happened
Actual Result:
Space below bold text increases on edit even when we don't add more space during edit if the text below bold text is code block
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/93399543/c4cfb5b1-0d56-4e82-a620-6e2f43c2fd01

Android: mWeb Chrome

https://github.com/Expensify/App/assets/93399543/57463222-5feb-4cd0-a6f6-6754c2aa6a6e

iOS: Native

https://github.com/Expensify/App/assets/93399543/1347dd28-fb87-4095-841f-2084af2f22c8

iOS: mWeb Safari

https://github.com/Expensify/App/assets/93399543/16154a9b-8f45-444a-8a79-2c94dec725b0

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/93399543/7aca40a5-ce45-4c20-bcca-ed8cb2c0a84f
https://github.com/Expensify/App/assets/93399543/626461f6-5e6f-4dae-a99b-f2620846103c
https://github.com/Expensify/App/assets/93399543/d35b0ffb-37df-4081-8894-ddf4497f81e1

MacOS: Desktop

https://github.com/Expensify/App/assets/93399543/d50f794b-896a-43a6-b04c-d3a0a79bdea4

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01b06817cf280a1ec0
Upwork Job ID:<PHONE_NUMBER>027006976
Last Price Increase: 2023-10-16

Proposal
Please re-state the problem that we are trying to solve in this issue.
Unintended spaces are added after a user edits a markdown message.
What is the root cause of that problem?
There are 3 main call sites on the component side where this field gets updated:

in MessageComposer when the message is first submitted
UpdateDraft() - when editing the message on every key stroke in ReportActionItemMessageEdit.js#L264
PublishDraft() - when we finish editing the markdown message also in ReportActionItemMessageEdit.js#L317

If we disable #3 in this list everything works fine, except that #3 does a bunch of string processing for many different reasons.
This PublishDraft() function calls something called Report.editReportComment() which calls handleUserDeletedLinksInHtml().
This is where the issue occurs.
The HTML is not completely cleaned, there are is hidden spaces between the tags that later become line breaks when coverted to Markdown and then get passed over later into HTML on subsequent publishes.
It doesn't happen the first time you compose the message because that message is done with a different editor (#1 above).
What changes do you think we should make in order to solve the problem?
Modify the 1174 of Report.js with:.
const htmlForNewComment = parser.replace(newCommentText).replace(/>\s+</g, '><')
This will clean the spaces between the HTML tags.
An alternative fix might be to add a rule to the ExpensiMarker lib, that "cleans HTML" after parsing and conversion.
What alternative solutions did you explore? (Optional)
I explored all call sites on the components side where the text was parsed, saved or rendered.

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/tomoc

Proposal
Please re-state the problem that we are trying to solve in this issue.
Chat - Space below bold text increases after edit.
What is the root cause of that problem?
The root cause of this issue is that when adding a comment or saving draft comment below
# heading
```
code
```

we call ExpensiMark.replace method to first apply codeFence rule, then heading rule and last newline rule. After applying codeFence and heading rule, we get intermediate result

heading

code test

The line break after
 results in the unexpected space between heading and code block.
What changes do you think we should make in order to solve the problem?
When translating markdown text into HTML, the single line break between two block tags should be removed. Currently, we only support 3 block HTML tags, (blockquote|h1|pre).
We can add a new rule before the  newline rule to eliminate the unwanted line break between two block elements, like
            {
                name: 'removeNewlineBetweenTwoBlockElements',
                regex: /<\/(blockquote|h1|pre)>\r?\n<(blockquote|h1|pre)>/g,
                replacement: `</$1><$2>`,
            },

By having the new rule, we can fix the issue and pass all existing tests of Expensify-common lib.
What alternative solutions did you explore? (Optional)
N/A

Might have same root cause as #26490

@0xmiroslav They're related but their root cause is different. This issue occurs when adding a comment and the root cause is from the markdown-to-html process.

@0xmiroslav I think you're right, they are related.
The proposal https://github.com/Expensify/App/issues/26490#issuecomment-1758233329 will resolve the root issue.
The recording is based on the proposal.
https://github.com/Expensify/App/assets/30532000/e7ed2885-ebac-42ed-b0b7-beedb63d9783

Nice, okay, shall we close this? And I'll pay out the bug reporter: @dhanashree-sawant?

@twisterdotcom I guess not yet. This is not on production yet.
@0xmiroslav will return with his feedback for the best approach on Monday and then we can see.

@twisterdotcom While I think their root cause is different and they should be fixed individually. I think we can wait C+ team to evaluate it.
cc @abdulrahuman5196

Will review today.

Proposal
Please re-state the problem that we are trying to solve in this issue.
Space below bold text increases after edit.
What is the root cause of that problem?
{
    // We're removing
 because when
 and
 occur together, an extra line is added.
    name: 'replacepre',
    regex: /<\/pre>\s*
/gi,
    replacement: '
',
},
{
    // We're removing
 because when
 and
 occur together, an extra line is added.
    name: 'replacebr',
    regex: /

\s*/gi,
    replacement: '
',
},
{
    // We're removing
 because when
 and
 occur together, an extra line is added.
    name: 'replaceh1br',
    regex: /<\/h1>
/gi,
    replacement: '
',
},

The root cause is these 3 replace regex rules in ExpensiMark class of expensify-common repo.
replacebr rule replaces the linebreak with a space if the linkbreak exists before
 tag.
And it renders the linebreak after the space while rendering in the report page.
This doesn't cause problem if previous line is a normal text.
But if the previous line is
 tag, we see an extra linebreak because
 tag renders a linebreak after it too.
For example, like below.
# test\n```code``` =>
test
\n
code
 =>
test

code
 => TEST\n \nCODE

What changes do you think we should make in order to solve the problem?
{
    // We're removing
 because when
 and
 occur together, an extra line is added.
    name: 'replaceh1br',
    regex: /<\/h1>
/gi,
    replacement: '
',
},
{
    // We're removing
 because when
 and
 occur together, an extra line is added.
    name: 'replacepre',
    regex: /<\/pre>\s*
/gi,
    replacement: '
',
},
{
    // We're removing
 because when
 and
 occur together, an extra line is added.
    name: 'replacebr',
    regex: /

\s*/gi,
    replacement: '
',
},

To fix this issue, we need to prioritize replaceh1br rule before other two rules.
So replacebr rule won't add unnecessary space and we won't see an extra line too.
For example, like below.
# test\n```code``` =>
test
\n
code
 =>
test

code
 => TEST\nCODE

What alternative solutions did you explore? (Optional)
N/A

@eh2077

We can add a new rule before the newline rule to eliminate the unwanted line break between two block elements

Why should we do this? What if the user actually wanted to add a new line inbetween?

@eh2077

We can add a new rule before the newline rule to eliminate the unwanted line break between two block elements

Why should we do this? What if the user actually wanted to add a new line inbetween?

@abdulrahuman5196 Good point. There'll be two line breaks if we want to add a new line between two block elements. For example, the following input
# heading

```code```

will be translated into intermediate result,
heading
\n\n
code
, which will be skipped by the replacement rule I added. The new rule
            {
                name: 'removeNewlineBetweenTwoBlockElements',
                regex: /<\/(blockquote|h1|pre)>\r?\n<(blockquote|h1|pre)>/g,
                replacement: `</$1><$2>`,
            },

will only handle case with one line break between two block tags.

@abdulrahuman5196 Could you please let me know your opinion about my proposal too?
https://github.com/Expensify/App/issues/29704#issuecomment-1777484371

Will work on pending reviews today.

@abdulrahuman5196 Can you also review https://github.com/Expensify/App/issues/26490#issuecomment-1758233329 ? I think they are related and the proposal can resolve 29704 too

Sorry for the delay. Will review today

TAL

What does TAL mean?

Hi, Sorr,y TAL means Taking a look.
Will review again today, just back from weekend

@abdulrahuman5196 are you able to get somebody assigned here or can I reassign to a new C+? Will reassign on Monday if you're not around by then.

Not overdue, just waiting on @abdulrahuman5196

Sure @twisterdotcom . I will cover this over the weekend. If not do go ahead and re-assign on monday.

@abdulrahuman5196 Can you also review #26490 (comment) ? I think they are related and the proposal can resolve 29704 too

With this change, I am unable to reproduce the issue. The proposal is already approved as part of https://github.com/Expensify/App/issues/26490.
Can we put this issue on hold for https://github.com/Expensify/App/issues/26490? @twisterdotcom
https://github.com/Expensify/App/assets/46707890/c4ebe04e-2ab7-4e65-8b7a-b0732da0cfe7

Done

Let me check in my morning


[VS Code] Live Share extension failed to initialize, try to reload the VSCode window and try again.

Error:
Live Share extension failed to initialize, try to reload the VSCode window and try again.
livesharelogs.zip
Steps to Reproduce:

Install the live share extension.

Reload window as requested.

Try to create a sharing session.

Get prompted for missing linux packaged. Install them.

restart vscode as prompted at the end of the package install.

Get prompted for missing linux packages again.

Try to install the missing packages by hand as seen in the script: https://raw.githubusercontent.com/MicrosoftDocs/live-share/master/scripts/linux-prereqs.sh

Since step 7 did not help. Try to create a sharing session anyway.

Tried this on the latest opensuse tumbleweed
$ cat /etc/*release*
NAME="openSUSE Tumbleweed"
# VERSION="20181015"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20181015"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20181015"

Version Data

extensionName
VSLS

extensionVersion
0.3.834

protocolVersion
2.2

applicationName
VSCode

applicationVersion
1.28.2

platformName
Linux

platformVersion
4.18.13-1-default

Could you attach your logs from VS Code -- Command Palette, "Live Share: Export logs"??>

I thought I did, by drag and drop. Weird.
Will do tomorrow.

logs: livesharelogs.zip

There is this error in the logs:
[2018-10-22 13:19:56.287 Client.Agent I] Agent terminated with exit code: null and signal SIGABRT: FailFast:
Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.

Looks like a dotnet setup issue
https://github.com/dotnet/core-setup/issues/4413
There is a workaround recommended there. Please let us know if applying it fixes the issue.

@Chuxel FYI - a dotnet issue on openSUSE Tumbleweed that affects Live Share.

I followed the steps in this comment [1] and dotnet sdk 2.1.401 runs fine in my setup.
And after creating the symlinks as described in [2] the live share extension worked.
[1] https://github.com/dotnet/core-setup/issues/4413#issuecomment-417504497
[2] https://github.com/dotnet/core-setup/issues/4413#issuecomment-417505779

This issue should be resolved, so I'm going to close it. Please re-open if you continue to experience this problem. Thanks!


Never allow sanitized strings to start with underscore

The sanitization may replace the first character with underscore.
Append key prefix after sanitization is completed to make
sure the end result is not starting with an underscore.

Great find @jcd2 :)


LLM Prompt Recovery using gemma

Deep Learning Simplified Repository (Proposing new issue)
:red_circle: Project Title : LLM Prompt Recovery using gemma
:red_circle: Aim :  Find the prompt used to transform given text using gemma
:red_circle: Dataset :https://www.kaggle.com/competitions/llm-prompt-recovery/data
:red_circle: Approach : Try to use 3-4 algorithms to implement the models and compare all the algorithms to find out the best fitted algorithm for the model by checking the accuracy scores. Also do not forget to do a exploratory data analysis before creating any model.

📍 Follow the Guidelines to Contribute in the Project :

You need to create a separate folder named as the Project Title.
Inside that folder, there will be four main components.

Images - To store the required images.
Dataset - To store the dataset or, information/source about the dataset.
Model - To store the machine learning model you've created using the dataset.
requirements.txt - This file will contain the required packages/libraries to run the project in other machines.

Inside the Model folder, the README.md file must be filled up properly, with proper visualizations and conclusions.

:red_circle::yellow_circle: Points to Note :

The issues will be assigned on a first come first serve basis, 1 Issue == 1 PR.
"Issue Title" and "PR Title should be the same. Include issue number along with it.
Follow Contributing Guidelines & Code of Conduct before start Contributing.

:white_check_mark: To be Mentioned while taking the issue :

Full name :  Aditya D
GitHub Profile Link :  https://github.com/adi271001
Email ID<EMAIL_ADDRESS>Participant ID (if applicable): NA
Approach for this Project : data preprocessing and cleaning , configuring , using gemma to make a model fine tune using lora model and testing uding part of dataet
What is your participant role? (Mention the Open Source program) GSSOC

Happy Contributing 🚀
All the best. Enjoy your open source journey ahead. 😎

Apart from gemma what are the models you are planning for this problem statement as you need to implement 3 models for this problem statement.

Mistral and phi

Hi @adi271001 make sure you implement Gemma, Mistral and Phi for this project.
Assigned to you.


Add Unit Tests for PlanToBasePose() and example code

Should SBPL be a required or optional dependency for HERBpy?
The example code uses PlanToBasePose() - how should I make a Unit Test for this if? If SBPL is a required dependency then it is easier.

Mike wrote:
I agree with this entirely. However, I think these tests should be on SBPLPlanner and live in prpy. We should add or_sbpl as a <test_depend> like we did for the other planners that we test in prpy

I suggest adding it as a <test_depend>. This is what we did for the other planners that are optional dependencies.


[WIP] Fix inadequate shift of nChainId

Still needs unit testing of the forked signing and verification.

Closing MVF prototype developments subsequent to release of Bitcoin Cash clients.


Skeleton Default story is not visible

The Default story is not showing: https://preview.gravity-ui.com/uikit/?path=/story/components-skeleton--default

I can fix it


Fixing base policies to work with new observations

Cause of original issue: my_obs["own_home_distance"], my_obs["own_home_bearing"], my_obs["opponent_home_distance"], my_obs["opponent_home_bearing"] are static and refer to the agent's relative home distance/bearing where the flag is (sometimes), but do not change when the flag is picked up. These variables were being used to track distance/bearing of flag.
Went through base policies and checked to see where these variables were being used to get the position/bearing of the flag and replaced them with the actual position/ bearing of the flag (now saved as self.my_flag_distance, self.my_flag_bearing, self.opp_flag_distance, and self.opp_flag_bearing in base.py
Small visualization change: team home region no longer disappears when flag is picked up

Looks great to me! Thanks again for catching this and pushing a fix.
As far as I can tell, my_flag_loc is only used if the opponent doesn't have the flag, and otherwise the bearing is used directly. It's great to have that variable available in both cases though for consistency. I like that it's in rectangular coordinates in the agent frame -- very convenient.

Yeah the more important item was getting the proper flag distance/bearing if it was picked up (instead of referencing the agent home position) which the base_attack.py and base_defend.py use. If you're happy with it I can squash and merge.

Yep, feel free to merge whenever you’re ready!


Web Application Proxy/Publishing: outdated links

Description:
As reported in issue ticket #4000 (Broken link), the link text "Configure a site to use Integrated Windows authentication" does not work as a link to any other page or section on this page, because it uses the outdated format assetId:/// which is no longer supported.
The complete link looks like this: assetId:///b0788958-627f-450f-877c-209b1bd0db52
There are also 4 outdated technet links which I suggest replacing with the current redirected docs.microsoft.com links, even if they are no longer regularly maintained (and flagged as such).
Thanks to @joshtransient for reporting the broken link so I could discover and amend some of the other issues on this page.
Changes proposed:

Replace the assetId link with a working MS Docs page link
Replace 4 technet links with their permanent redirect links
Add a missing comma (for readability) in one of the sentences
Add MarkDown Syntax Highlighting for the PowerShell cmdlets
Whitespace changes:

"Trim Trailing Space" (remove all blanks at end-of-line)
Add MarkDown indent marker compatibility spacing for "Applies to:"
Add MarkDown indent marker compatibility spacing to a Note blob
Normalize bullet point list marker spacing to only 1 space

Remember to use "Hide whitespace changes" or Rich diff view to see the effective changes and skip (most of) the whitespace changes.
Ticket closure or reference:
Closes #4000

Feel free to submit requests for changes for anything you think can improve this page further. Thank you in advance.

#sign-off

Regarding line 117:
This requires the following  to be installed Web Application Proxy Hotfix or the https://support.microsoft.com/kb/3000850.
Should the second link text (identical to the link itself) be replaced by "KB3000850" to be more consistent with how we label links in general?

@illfated  Re: line 117
I didn't see the duplication. I would actually suggest changing the entire paragraph to: "This requires you to install the November 2014 update rollup for Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2 (KB3000850."

Thank you very much for the update. That makes soc much more sense. Well done.

@illfated  Are we good to merge now?

I think so, just give me 5 minutes to do a quick review to be as sure as I can be at the moment.

Very well, good to go now. Sinking more time into polishing this document would take more feedback from users who are already invested in weeding out all the quircks in this document anyway, so we may as well wait for feedback regarding undiscovered details in future issue tickets.
#sign-off

Sounds good, thanks!

(ref. Hyperlink #3660)


Bind something to Ctrl/Cmd-S?

Not sure how common this is with the student audience but I continually hit Ctrl-S and am offered the ability to save the HTML file which won't end well if anyone hopes to reopen it.
We could show a one-time notification explaining that you can download a hex file to save your content? Anything that let me keep typing afterwards without mandatory interaction with a dialog would be good.

Closing based on lack of other interest.


refactor: update lint, add lint docs, update git hooks

This PR is an extension to this previous PR of updating ktlint to the latest version. That PR only fixed 1 branch (in-app) but all branches in the project are effected so this PR is to be merged into develop to fix all branches.
Changes done in PR

Fix lint errors after ktlint has been updated
Add docs around linting with ktlint. I wrote these docs with my preferences on how linting is done in a project. The content of the docs is up for discussion. As our team scales, I felt having documentation is important for us to be on the same page.
Updated git hooks. I have been using this new git hooks method in other projects and really like it. The best part is that on every git commit, ktlint formatter will automatically be executed and will run git add on all formatted files. No more having to make a git commit, run formatter, then run another commit.

Complete each step to get your pull request merged in. Learn more about the workflow this project uses.

[ ] Assign members of your team to review the pull request.
[ ] Wait for pull request status checks to complete. If there are problems, fix them until you see that all status checks are passing.
[ ] Wait until the pull request has been reviewed and approved by a teammate
[ ] After pull request is approved, and you determine it's ready add the label "Ready to merge" to the pull request and it will automatically be merged.

Pull request title looks good 👍. If this pull request gets merged, it will not cause a new release of the software.
Example: If this project's latest release version is 1.0.0. If this pull request gets merged in, the next release of this project will be 1.0.0.
To merge this pull request, add the label Ready to merge to this pull request and I'll merge it for you.

There are going to be super conflicting as the Ktlint changes are also done here 😢
https://github.com/customerio/customerio-android/pull/112

There are going to be super conflicting as the Ktlint changes are also done here 😢
https://github.com/customerio/customerio-android/pull/112

I thought of that, too. I am not sure what to expect in regards to conflicts that will appear in the in-app branch as that's the only branch that https://github.com/customerio/customerio-android/pull/112 is in right now.
But luckily, it might be as easy as performing a git revert on the in-app branch to remove the https://github.com/customerio/customerio-android/pull/112 commit, and then merging in develop branch into in-app branch after this PR gets merged.

When we are not linting the enums and have to manually disable 3 classes and will have to disable possibly more, I don't see the point of not disabling it globally.

Because we use enum classes a lot in this project for JSON values, I agree that disabling it globally wouldn't be harmful. I just checked and currently there are 5 enums in the project with 3 of those enums used for JSON values (meaning we need to have the cases be lowercase). So, we do use lowercase enums the majority of the time.

Because we use enum classes a lot in this project for JSON values, I agree that disabling it globally wouldn't be harmful. I just checked and currently there are 5 enums in the project with 3 of those enums used for JSON values (meaning we need to have the cases be lowercase). So, we do use lowercase enums the majority of the time.

We both agree, that the usage of enums with the lower case is more, and since BE accepts it, the usage will increase as well. with time, also that this rule wouldn't be harmful, so should we disable it globally instead of creating enum classes, then failing lint and disabling it for those closes every time. Might not make much time but would be annoying to keep track of.

@Shahroz16, @mrehan27 this PR changes our git hooks behavior. This PR proposes that we switch to a new tool that I have found to be really enjoyable lefthook. The biggest benefit is that the tool really easily allows us to run the kotlin code formatter and git add formatted changes before each git commit. The previous git hooks setup that we were using required that you make another commit after each commit to be able to add the kotlin formatted changes.
If this PR gets merged with this new tool in it, you will need to run these commands to get git hooks installed:
rm -rf .git/hooks
mkdir .git/hooks
brew install lefthook
lefthook install

I updated the docs in this repo with these instructions for new developers to use 👍.

This task can be worked on after this PR gets merged https://github.com/customerio/issues/issues/7601

:tada: This PR is included in version 2.1.0-alpha.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 2.1.0-beta.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

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


i18n: Tag "Oops! Something went wrong." for translation.

This string appears in src/chat/FetchError.js.

Oops! (heh 😛)
LGTM; please merge at will.


Refactor DoFnOp.FutureCollectorImpl to a top level class in SamzaRunner

Making FutureCollectorImpl a top level class for the following reasons

FutureCollectorImpl has no dependency on DoFnOp.
Enables us to use FutureCollectorImpl in other FnOps.
Good practice to not use inner classes.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Good practice to not use inner classes

Too general a statement. I don't think inner classes are anti-pattern. I see the motivation here is multi-fold but wouldn't treat/callout this as a motivation as this gives out incorrect signal on usage of inner class.


fix doc: xc.ensembles.change_significance deprecated

Generic Issue
Replace xc.ensembles.change_significance in doc because it is  deprecated.

closed in #142


Game speed should not be based on CPU speed

For MVP, I set the game speed based on timeout between ticks in CONSTANTS.tsx
export const TICK_MS = {
  PAUSED: 250,
  SLOW: 100,
  NORMAL: 40,
  FAST: 1,
};

But this will lead to an inconsistent experience across devices. Ideally these times would represent time per frame, and the timeout would be set based on how long the previous frame took to calculate+render.
For reference, on an M1 Macbook Pro, each render on Facilities page took 16ms, and simulation steps took between 1-18ms depending on if it was generating a new month — and would presumably be much slower on a slower device.
Example calculation: 100ms frame timing on slow - 17ms to render and calculate = timer set for 83ms

From a quick search, I believe this is a good link which goes over the problem and solutions.
https://gafferongames.com/post/fix_your_timestep/
Got any others you know of or like on this topic?

That approach sounds good to me! I was just thinking of reducing the timeout between frames, but it's a good idea to also simulate between frames on slow machines. And we know that our simulation logic is about 10x faster than our render logic, so simulating multiple frames between renders will help slower machines catch up.
This would make our logic something like:
export const TICK_MS = { // updated to account for real simulate/render time
  // PAUSED: 250, - now, the tick function may run every 250ms, but no game frames should happen
  SLOW: 180,
  NORMAL: 60,
  FAST: 20,
};

let currentTime = performance.now();

tick: () => {
  let newTime = performance.now();
  let delta = newTime - currentTime;
  currentTime = newTime;

  while (delta > TICK_MS[state.speed]) {
    simulateFrame();
    delta -= TICK_MS[state.speed];
  }

  return state;
}


Latin n (characters) result to an error

My metadata contains a latin n, when viewed in vscode, it appears as a question mark. Also, when bundle exec jekyll s was run, the site do not generate and results to an error. How can we present latin or accented characters? Thanks!

@pvperez1 sounds like a file character encoding issue. The question mark character is displayed when a character isn't encoded correctly (or is being interpreted in the wrong encoding), so the editor doesn't know what character to display. The corrupted characters shouldn't break anything, however, a CSV created by Excel often can (the encoding “UTF-8 with BOM” will cause errors in Ruby).
Can you point me to the repository with the issue?
Basic notes:
The metadata CSV needs to be in UTF-8 (without BOM). There are some tips on: https://collectionbuilder.github.io/cb-docs/docs/metadata/uploading/
UTF-8 can encode any characters--so if formatted correctly, you can display any kind of accents, etc.
Sometimes you can fix the CSV by re-encoding on VS Code and choosing UTF-8 (click the encoding such as "UTF-8" at the bottom of the editor window, displayed in the blue bar at the bottom right).
However, sometimes the characters are fully corrupted in the CSV (because it is interpreting it in the wrong encoding to start with)--so you might need to go back to the source spreadsheet and export it again, or figure out what the encoding really is.
If you create metadata in Excel--don't try to save the CSV from Excel, it doesn't work! Import the xlsx file into Sheets or OpenRefine or LibreOffice, then create the CSV from one of those tools instead.

Yeah, @pvperez1 Excel won't properly parse the UTF-8 csv (if you have any special characters in it, they will be corrupted) and can't properly export a csv--you can create metadata directly in Excel, using the xlsx file format then export using something else--but going back and forth with CSV + Excel doesn't work.
If you want a desktop app for editing spreadsheets, I would use LibreOffice (its free and open). There is also some plugins for VS Code for editing spreadsheets--but I am not familiar with them, so can't suggest anything! I do a lot of csv editing just directly in Code, not so hard once you get used to looking at it. I use the Rainbow CSV extension to make visualizing the columns easier.


[IPO-203] Update oc_chef_wm to send actions to the Data Collector

Update oc_chef_wm to send actions to the Data Collector if it's enabled. This also slightly modifies oc_chef_action to export a function for message construction as the Data Collector uses the same schema.

http://wilson.ci.chef.co/job/chef-server-12-trigger-ad_hoc/190/downstreambuildview/

I decided to yank having specific config for logging and just put errors in debug logs. During design of 203 we decided that we wanted this to be a fire and forget style of updating. I think that with the combination of the status endpoint for data collector health, stats_hero metrics for all the updates, and optional debug logging of failed requests, we should be okay.

👍 This is looking reasonable to me.


Update deprecated links in server-files.md

Summary
Update deprecated links in server-files.md
Ticket Link

NA

Hello @Rutam21,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@cwarnermm Please review and add the necessary labels for Docathon.

Thank you for this PR! The existing links are working correctly so this change won't be merged.


Custom Imagery layer and kh.google.com 3D buildings layer

Activating an imagery layer on a globe causes 3D buildings "kh.google.com" layer to be disabled.
Displays instead the older version of 3D buildings.

Hello,
I'm running fusion/server (centos 7) version 5.2.4-0.alpha.201809061452, EC <IP_ADDRESS>93 (32-bit) with windows 7.
Reproduction steps :

Building imagery resource
Building imagery project
Building new Earth (3D) database including my imagery project only
Publishing my database to my Enterprise Server
Opening EC <IP_ADDRESS>93 (32-bit) on win 7
Connecting to Google Earth server http://kh.google.com:80/
Activating 3D Buildings layer
Connecting to my globe
Activating imagery layer on my globe

Thx

Connecting my GEC to more than 1 globe is working fine.
When my globe contains only vector layers, 3D buildings display properly.
A globe with Image layers seem to cause this problem.
Screenshot 1 (kh.google.com + vector globe)
https://owncloud.sdmis.fr/index.php/s/bdcpzIapVoUjnV7
Screenshot 2 (kh.google.com + imagery globe)
https://owncloud.sdmis.fr/index.php/s/yk2Wo5xndmvuQOg

I've followed your reproduction steps with client 7.3.2 on Linux and I'm not able to replicate the issue. It's possible that it's Windows specific. I'll give that a try as well but it will take a little more work to set up.


no network access after reboot when iptables=false

docker info:
Server Version: 1.12.3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 15
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null bridge host overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-47-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 488.5 MiB
Name: image-base
ID: 2473:FGJQ:MEEC:CEWY:BSLR:SYB5:EXMO:WJBE:7MMM:DIZH:NJQF:L5NA
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Insecure Registries:
 <IP_ADDRESS>/8

I'm trying to run docker with iptables=false (the only configuration I have in daemon.json).
I stop docker daemon and added the daemon configuration, the started the docker daemon.
running the following command worked:
docker run -it --rm python ping www.google.com
( so I confirmed I had internet connection).
I took a snaphsot of my iptables (iptables-save) and rebooted the system.
Then I ran it again
docker run -it --rm pyton ping www.google.com
I failed to get outside network.

The only way to fix that (while keeping the iptables=false one) was to:

remove the iptables=false configuration
restart the daemon
add the configuration back
restart the daemon yet again.

I bet this is not an expected behavior.
When I set the iptables to false I want docker to not open the ports of my containers to the outside network (I want the ports to be available to the host as localhost and also to private network (eth1) - rules which I define manually on ufw.

When setting --iptables=false you're telling the docker daemon to not touch your IPTables configuration, because you want to manually manage IPTables rules.
As far as I can see, this is working as designed, but /cc @aboch @mavenugo

Actually, looks like this is a duplicate of https://github.com/docker/docker/issues/28241, which confirms that this is the correct behavior.
I'll close this issue, but feel free to comment after I closed


Aadiltajani sort compare

Pull Request Template
What have you Changed(must)
Added file for comparison of different sorting algorithm based on their time complexity and shows the time according to the number of elements
Issue no.(must) - #589
Pr will be closed and marked as spam. If issue number not found or issue was assigned to someone else.
Marking as spam can block your account from HacktoberFest.
Self Check(Tick After Making pull Request)

[x] This issue was assigned to me if not it will marked as spam.
[x] My file is in proper folder.
[x] I am following clean code and Documentation.
[x] I have added title and what program will do first in the file.

README - How to Contribute

Pr will be closed and marked as spam. If issue number not found or issue was assigned to someone else.
Marking as spam can block your account from HacktoberFest.

What happened? I have issue number 589 assigned to me. I have completed
checklist and added a clean well written program.
Regards,
Aadil Tajani
On Tue, 20 Oct, 2020, 11:20 am Divyanshu Bargali<EMAIL_ADDRESS>wrote:

Pr will be closed and marked as spam. If issue number not found or issue
was assigned to someone else.
Marking as spam can block your account from HacktoberFest.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/div-bargali/Data-Structures-and-Algorithms/pull/589#issuecomment-712608542,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOWOZUS66UW7IUMWI7GI6I3SLUQJFANCNFSM4SXSJLXQ
.


Fix model cache configuration

Signed-off-by: John Mazanec<EMAIL_ADDRESS>Description
The model cache is used to store models in the heap during indexing. We set a capacity for this cache to control memory consumption.
This PR cleans up the cache's configuration. First, it converts the max size limit setting to a ByteSizeValue setting. This is customary for memory related settings. Second, it adds a 30 minute expiry time on the cache. So, if an item is not accessed for 30 minutes, it will be removed from the cache. This setting is an internal implementation detail, so I do not expose it as a user facing setting.
Check List

[X] New functionality includes testing.

[X] All tests pass

[X] New functionality has been documented.

[X] New functionality has javadoc added

[X] Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #143 (5dd43a6) into feature/faiss-support (ef63ca8) will decrease coverage by 0.11%.
The diff coverage is 73.68%.

@@                     Coverage Diff                     @@
##             feature/faiss-support     #143      +/-   ##
===========================================================
- Coverage                    82.53%   82.42%   -0.12%
- Complexity                     796      798       +2
===========================================================
  Files                          117      117
  Lines                         3567     3573       +6
  Branches                       337      338       +1
===========================================================
+ Hits                          2944     2945       +1
- Misses                         470      474       +4
- Partials                       153      154       +1

Impacted Files
Coverage Δ

...ain/java/org/opensearch/knn/index/KNNSettings.java
76.11% <50.00%> (-3.27%)
:arrow_down:

...n/java/org/opensearch/knn/common/KNNConstants.java
90.00% <100.00%> (+1.11%)
:arrow_up:

...in/java/org/opensearch/knn/indices/ModelCache.java
94.59% <100.00%> (+0.30%)
:arrow_up:

Continue to review full report at Codecov.

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


[BUG]:Playwright-testing-Automation:Not able to click UI radio buttons in latest angular version webpages.

Describe the bug
I tried to automate my front end application. I tried it with record option. When I tried to click on the radio buttons the page start moving up and down. After so many analysis I found that older angular version didn't have this issue. My web page is using latest angular version and this is applicable for all the radio buttons. Is there any solutions for this??

@AshikSajjad Your issue seems to be for https://github.com/microsoft/playwright , I suggest filing this issue upstream.


Deribit getUserSettlementsByInstrument does not support pagination

DeribitTradeServiceRaw#getUserSettlementsByInstrument does not support pagination parameters, even though the underlying REST API does (see continuation in https://docs.deribit.com/#private-get_settlement_history_by_instrument)

Hi, feel free to submit a PR request improving this


fixed $.ajax deferred syntax

This PR addresses #229 by using the correct function names for jquery deferred object handlers: https://api.jquery.com/category/deferred-object/

Thanks for the PR!


"Your clock is behind"

I received this message when trying to access the site. Why is this relevant? Does any of the backup code rely on the correct time and date?

It is a standard message from Chrome(or any other browser) that you are using. Nothing to do with codewars website.

See https://support.google.com/chrome/answer/6098869?hl=en#clock


[Load Balancer] Adding VMs via CLI does not work

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

Currently it is not possible to add VMs to the backends of Load Balancers using their VM/NIC IDs, but by an IP address. Whereas on the Console it is possible to do exactly this. Adding VMs by their IP fails to add them to the load balancer.
To Reproduce

Create a LB via az cli, adding VMs via their IPs.
Expected behavior

VMs be found by their IP, or allow the ability to specifiy VM NICs to allow adding of VMs this way.
Environment summary

Install via https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest,
az --version
azure-cli                         2.12.0

core                              2.12.0
telemetry                          1.0.6

Python location '/opt/az/bin/python3'
Extensions directory '/home/jujumanage/.azure/cliextensions'

Python (Linux) 3.6.10 (default, Sep 22 2020, 05:20:19)
[GCC 7.5.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

Attempting to workaround this via Azure Templates, also does not work.

add to S176

As a workaround for this, it is possible to add NICs via Azure Templates - but not on the Load Balancer itself. NICs on the VMs need to be updated, not Load Balancer -> NICs. Example below:
{
    "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
    "contentVersion": "<IP_ADDRESS>",
    "parameters": {},
    "resources": [
        {
            "type": "Microsoft.Resources/deployments",
            "apiVersion": "2017-05-10",
            "name": "NicUpdate-d3484bae-c61a-4d83-861b-e0b66de3057c-20200923232302",
            "dependsOn": [],
            "properties": {
                "mode": "Incremental",
                "parameters": {},
                "template": {
                    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
                    "contentVersion": "<IP_ADDRESS>",
                    "parameters": {},
                    "variables": {},
                    "resources": [
                        {
                            "apiVersion": "2019-07-01",
                            "type": "Microsoft.Network/networkInterfaces",
                            "name": "VM-NAME",
                            "location": "westeurope",
                            "properties": {
                                "provisioningState": "Succeeded",
                                "resourceGuid": "GUID",
                                "ipConfigurations": [
                                    {
                                        "name": "NAME",
                                        "id": "VM-NIC-ID",
                                        "etag": "W/\"38cd5aec-c283-4cb9-b354-2d7302658620\"",
                                        "type": "Microsoft.Network/networkInterfaces/ipConfigurations",
                                        "properties": {
                                            "provisioningState": "Succeeded",
                                            "privateIPAddress": "<IP_ADDRESS>",
                                            "privateIPAllocationMethod": "Dynamic",
                                            "subnet": {
                                                "id": "SUBNET-ID"
                                            },
                                            "primary": true,
                                            "privateIPAddressVersion": "IPv4",
                                            "loadBalancerBackendAddressPools": [
                                                {
                                                    "id": "LB-IP"
                                                }
                                            ]
                                        }
                                    }
                                ],
                                "dnsSettings": {
                                    "dnsServers": [],
                                    "appliedDnsServers": [],
                                    "internalDomainNameSuffix": "trvc5pqghwmevmbhlokmihngod.ax.internal.cloudapp.net"
                                },
                                "macAddress": **"MAC"**,
                                "enableAcceleratedNetworking": false,
                                "enableIPForwarding": false,
                                "networkSecurityGroup": {
                                    "id": "NSG-ID"
                                },
                                "primary": true,
                                "virtualMachine": {
                                    "id": "VM-ID"
                                },
                                "hostedWorkloads": [],
                                "tapConfigurations": []
                            },
                            "tags": {
                                "TAG": "VALUE"
                            }
                        }
                    ],
                    "outputs": {}
                }
            },
            "resourceGroup": "RESOURCE-GROUP"
        },
       .. Repeat above for addtional VMs
    ]
}

@VariableDeclared Do you want a feature that supports to add a VM into the backend of a Load Balancer via the NIC of the VM?

Hey @haroldrandom well currently the CLI makes it appear that you can add VMs by their IPs but if you do this, the result is nothing. The VMs do not get added and the CLI returns no error

Hey @haroldrandom well currently the CLI makes it appear that you can add VMs by their IPs but if you do this, the result is nothing. The VMs do not get added and the CLI returns no error

Could you post the error message with sensitive info ridacted?

As far as I understand, it's feature request that is suppose to add backend via VM name/ID and NIC id.


Overlay not showing when changing GPIO

I'm having an issue with the overlay not showing when setting the GPIO to a pin that doesn't equal to one of the other buttons.
Examples:

If I set the HOTKEY to be the same as the SELECT button (5), everything works fine.

If I set the HOTKEY to a dedicated pin, in my case (13), I get a key error and the overlay doesn't show up.
In this specific case, I can still change the volume and activate/deactivate bluetooth and wifi, so I know that the pin is right.

Here's the error:
May 15 00:07:54 retropie-gameboy-spw rc.local[295]: Traceback (most recent call last):
May 15 00:07:54 retropie-gameboy-spw rc.local[295]:   File "monitor_evdev.py", line 210, in handle_button
May 15 00:07:54 retropie-gameboy-spw rc.local[295]: KeyError: 13

and here's my keys.cfg
[GENERAL]
SHUTDOWN_DETECT = -1

[KEYS]
LEFT = 23
RIGHT = 0
DOWN = 1
UP = 22
BUTTON_A = 16
BUTTON_B = 6
BUTTON_X = 17
BUTTON_Y = 26
BUTTON_L1 = 27
BUTTON_R1 = 20
SELECT = 5
START = 12
HOTKEY = 13

[JOYSTICK]
ON_BY_DEFAULT=False
DISABLED=True
DEADZONE=300
VCC=1600

[BATTERY]
ENABLED=True
FULL_BATT_VOLTAGE=373
BATT_LOW_VOLTAGE=340
BATT_SHUTDOWN_VOLT=328

I spoke with someone else with my same build that said is working fine for him.
Could it be a bug that got recently introduced?

It should be fine, there was a fix done a month ago to address this. I will do some more testing tonight and get to you though.

So I've managed to create one scenario where this might happen and I'll get a bug fix done. Is the issue still occurring for you?

Yes, still happening on my end. A bug fix would be great! Thanks so much!

This has finally been fixed in the new version as it's had a rewrite to optimise and add a few features in:
https://www.bluuplabs.com/oneforall-v2/
Once a few people have real world tested it I will be compiling and adding the binary to this repository. Currently the update is only on my source repository


Fix inconsistent CanvasModulate color in 2D HDR

Linearize CanvasModulate color if HDR 2D is on.
Fix #92796

@Calinou
Thank you for the feedback!
I have fixed the issue by adding a check to see if 2D HDR is enabled in project settings. I also took out the linearization in compatibility mode because it seems to work just fine without it.

Thanks! And congrats for your first merged Godot contribution :tada:


Reproduce PySM 2 templates for Dust

I am trying to reproduce the processing of the Commander Dust map into the PySM templates for Dust, as described in the PySM 2 paper: https://arxiv.org/pdf/1608.02841.pdf
Something looks wrong, in particular the BB spectrum I get is too flat.
Any hints?
You can comment directly line-by-line on the notebook here: https://app.reviewnb.com/healpy/pysm/pull/66/files/
Or just view a read-only version of the notebook here: https://nbviewer.jupyter.org/github/healpy/pysm/blob/37eb60355979b49a90405dab8624c830fbb64bd7/docs/template_preprocessing/reproduce_pysm2_dust.ipynb
@NicolettaK @bthorne93 @brandonshensley @jodunkley

I tried to compute the spectrum with namaster instead of PolSpice, using all default options, just passing the mask with no apodization:
f_2 = nmt.NmtField(total_mask, m_planck[1:])
binning = nmt.NmtBin.from_nside_linear(nside, 1)
cl_22 = nmt.compute_full_master(f_2, f_2, binning)

but I pretty much get the same results:

the BB spectrum is very flat, the gamma fit is -0.0018

thanks @bthorne93 for suggesting to denoise the spectra,
I made a rough estimate of the white noise level in EE and BB and now the agreement with the PySM 2 paper is reasonable.
I'm merging this into the documentation of PySM 3 for future reference.
Plot from the PySM 2 paper

Plot from my implementation

thanks @bthorne93 for suggesting to denoise the spectra,
I made a rough estimate of the white noise level in EE and BB and now the agreement with the PySM 2 paper is reasonable.
I'm merging this into the documentation of PySM 3 for future reference.
Plot from the PySM 2 paper

Plot from my implementation

https://pysm3.readthedocs.io/en/latest/template_preprocessing/reproduce_pysm2_dust_pol.html

https://pysm3.readthedocs.io/en/latest/template_preprocessing/reproduce_pysm2_dust_pol.html


Choose vue 3 UI framework

Goal
List vue 3 ui component frameworks.
Context
We may want to switch away from ant-design-vue. For this we should list and evaluate existing CSS frameworks. The comparison in the end should be similar to this one ORM comparison we did: https://github.com/sidestream-tech/shift-book/issues/49#issuecomment-1152344039
Tasks

[ ] list  shortcomings of ant-design vue
[ ] List answerable and understandable requirements in a first comment

answerable means: you should be able to give clear yes / no / number answers in a short form
understandable means: people with a base of web-development can read and understand them in a couple of words
see #1 for some requirements already gathered

[ ] discuss requirements with @BracketJohn
[ ] Then create a table overview of exisitng frameworks that support vue3

[ ] rate them in the requirements you listed above

Hi! Sidebase looks great. Awesome!
I don't know the scope of Sidebase and also this issue, if it's related to a CSS framework or UI framework.
Just I suggest considering also those UI frameworks :

https://www.naiveui.com
https://oruga.io

Definitely related to UI - I've clarified this in the issue title.

Hi! Sidebase looks great. Awesome!

Thanks @ManUtopiK, we appreaciate the feedback, feel free to give more and to recommend sidebase to others ❤

Hi @ManUtopiK thanks for the suggestions 🤗!

https://www.naiveui.com

I am pretty impressed by this framework. While the design patterns do remind me a bit of AntDesign, it has a few components that are very unique. I think it does make sense to include it in our discussion! We might also be able to offer multiple versions of sidebase, each with a separate framework, allowing developers to choose their favourite.

https://oruga.io

What I really like about this framework is its ability to be modified with the help of TailwindCSS. While this is theoretically possible with most frameworks, I enjoy how they feature it on their documentation site, leading me to believe that their components are written in such a way that there is minor collision with Tailwind styles (which we do have in other frameworks).

Brief update: I think the general direction here is rather to build a small CLI where the users can select certain options they want to se5trup the project with.
One question could then be: What CSS UI framework do you want to use? A, B or C?

Been following this issue/project for a few weeks now - this is fantastic, and also a project extremely close to my interest!
As far as a component library goes, I've adopted PrimeVue personally because of the options and research I did seeing plenty others using it as well; I am currently in the process of trying to integrate it with Tailwind. This is after requiring to migrate a Vue 2 project using BootstrapVue (which is not very active atm) to Nuxt 3.
But a CLI would be very good option since it gives customisation to other users and instead of specialising in providing compatibility for only one library, it optimises for multiple. I believe a setup wizard similar create-nuxt-app would not return for Nuxt 3 which rather uses nuxi, so this can be a great way to setup projects. Happy to contribute where I can!

Awesome! I agree that a CLI would be great at this point. From crunching through the nuxt/framework repo it looks like @atinux et al. don't have a large focus on this at the moment, so I think it's fair to start.
We have #13 for the cli, @zoey-kaiser is starting on a PoC of it at the moment (:

Hey!
Do you like tailwindcss ? Or even better : unocss ?
Do you know about vueuse ?
There is now a UI framework that use both of this excellent libraries !
It's very new, but looks awesome https://anu-vue.netlify.app

Thanks for the suggestions!
Let's collect ideas here: https://github.com/sidestream-tech/sidebase/issues/13#issuecomment-1260530416

for now we've settled on naive ui, checkout #80 to follow implementation progress.


support for append, prepend, and block

if you had layout.jade like this:
//- build:js public/js/scripts.min.js
block scripts
  script(src='./js/myscript1.js')
  script(src='./js/myscript2.js')
//- endbuild

that would normally get compiled to:
block scripts
  script(src='/public/js/scripts.123456.min.js')

which is ok, but if your home.jade like this:
extends layout

append scripts
  script(src='/js/myscript3.js')

block content
  p Homepage

it does not consider append or prepend, and therefore does not render properly.
it would be nice if upon running gulp-jade-usemin it would rewrite homepage.jade such that it would look like:
extends layout

block scripts
  script(src='/public/js/scripts.78901234.min.js')

block content
  p Homepage

so basically it would consider the nesting of append and prepend and rewrite the block by overriding it using block and generating a new build file

I don't think this is working properly, can you double-check?  Whenever I render it results in weird formatting and completely replaces append or prepend with a block that doesn't have the right asset it seems.

https://github.com/gdi2290/gulp-jade-usemin/blob/master/index.js#L21
cc/ @niftylettuce


Op11 interpolate(mode='bilinear', align_corners=False)  is slow and high cpu cost (when use gpu)

hi ,  now I find , pytorch interpolate(mode='bilinear', align_corners=False)  must use op10, if use op11, the speed and cpu
cost is very high.   but op10 interpolate(mode='bilinear', align_corners=False)  has warning when change to onnx model , it says, the accuracy is not good
so , I guess, direcml has not implent gpu op11 resize?

This may be an ONNX Runtime issue or model conversion issue, as DirectML doesn't use the CPU for resampling. Resize-10 and Resize-11 are registered in ONNX Runtime's DML Execution Provider  which calls DML_OPERATOR_RESAMPLE1 in DmlOperatorResize.cpp. Can you share more of the model? If the model is proprietary, can you share the subset of the Resize node snippet to see all the attributes? (e.g. dump the model to text using this tool - ConvertOnnxModel.exe yourModel.onnx output.txt) Maybe there are some attributes that DML doesn't support (like cubic interpolation), and thus falls back to CPU. TY.

// DML's nearest neighbor mode uses half pixels rounded down.
std::string nearestMode = attributes.GetOptionalAttribute<std::string>(AttrName::NearestMode, "round_prefer_floor");
if (nearestMode != "round_prefer_floor")
{
    return;
}

DML only support “round_prefer_floor”， that is ok for tensorflow to onnx,  but pytorch for onnx in op11, it use  floor while not "round_prefer_floor",  so it back to CPU.

can DML implment  op11 resize for "floor"?

@liyuming1978 Coincidental that you mention it, as we have a local change enabling 'floor' (bug 32221069), but it needs to be pushed to master (I'll check a teammate about scheduling...).

thx！ so much！！！


How to obtain event via an mapping key?

Related to TransactionReceipt.events, which returns list instead of a dictionary.
I was not able to obtain the event with its mapping key, is it possible in different approach?
The way I am able to obtain the event value only by the index of the list =>
tx.events[0]['data'][<index>]['value']

for i in range(0, len(tx.events[0]['data'])):
      print(tx.events[0]['data'][i])

output:
{'name': 'clusterAddress', 'type': 'address', 'value': '0xe0cb57839ad45c3497fafb9b148ff9b11a21f33c', 'decoded': True}
{'name': 'jobKey', 'type': 'string', 'value': 'QmWmyoMoctfbAaiEs2G46gpeUmhqFRDW6KWo64y5r581Vd', 'decoded': True}
{'name': 'index', 'type': 'uint256', 'value': 0, 'decoded': True}

Related to #52 - I thought about this but I haven't dealt with it yet.  I will mark it as a priority.  Closing this issue for now as a duplicate.


Missing information that duplicate keys from the same source is invalid

The documentation is missing the information that duplicate keys from the same provider are not allowed.
This will succeed:
var configFile1 = Path.Combine(Environment.CurrentDirectory, "appsettings1.json");
File.WriteAllText(configFile1, "{\"setting\":\"value\"}");
var configFile2 = Path.Combine(Environment.CurrentDirectory, "appsettings2.json");
File.WriteAllText(configFile2, "{\"SETTING\":\"VALUE\"}");
var config = new ConfigurationBuilder()
    .AddJsonFile(configFile1)
    .AddJsonFile(configFile2)
    .Build();

And this:
var section = config.GetSection("setting");
Console.WriteLine($@"Key: {section.Key}
Path: {section.Path}
Value: {section. Value}");

will output this:
Key: setting
Path: setting
Value: VALUE

But this:
var configFile = Path.Combine(Environment.CurrentDirectory, "appsettings.json");
File.WriteAllText(configFile, "{\"setting\":\"value\", \"SETTING\":\"VALUE\"}");
var config = new ConfigurationBuilder()
    .AddJsonFile(configFile)
    .Build();

will throw:
An item with the same key has already been added. Key: SETTING

   at Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(ExceptionDispatchInfo info)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()
   at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   ...

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

ID: 0eb4d762-3910-2c57-8741-3306c15537b6
Version Independent ID: ba2254a0-ea8e-9b28-e94b-edd0fc58c043
Content: Configuration in ASP.NET Core
Content Source: aspnetcore/fundamentals/configuration/index.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

https://github.com/dotnet/docs/issues/30709

Why would you want to use duplicate keys?  Why should that be documented?

In Configuration keys and values we state:
Configuration keys:
Are case-insensitive. For example, ConnectionString and connectionstring are treated as equivalent keys.


ERROR: ZIP does not support timestamps before 1980

I installed Magic Wormhole to send some files from my MBP15 by running brew install magic-wormhole. When I run wormhole send <folder> I get the following error:
wormhole send Code                          ✔  10028  11:25:08
Building zipfile..
Traceback (most recent call last):
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/twisted/internet/defer.py", line 1475, in gotResult
    _inlineCallbacks(r, g, status)
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
--- <exception caught here> ---
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/wormhole/cli/cli.py", line 122, in _dispatch_command
    yield maybeDeferred(command)
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/wormhole/cli/cmd_send.py", line 93, in go
    yield d
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/wormhole/cli/cmd_send.py", line 107, in _go
    offer, self._fd_to_send = self._build_offer()
  File "/usr/local/Cellar/magic-wormhole/0.12.0_1/libexec/lib/python3.9/site-packages/wormhole/cli/cmd_send.py", line 365, in _build_offer
    zf.write(localfilename, archivename)
  File<EMAIL_ADDRESS>line 1727, in write
    zinfo = ZipInfo.from_file(filename, arcname,
  File<EMAIL_ADDRESS>line 517, in from_file
    zinfo = cls(arcname, date_time)
  File<EMAIL_ADDRESS>line 361, in __init__
    raise ValueError('ZIP does not support timestamps before 1980')
builtins.ValueError: ZIP does not support timestamps before 1980
ERROR: ZIP does not support timestamps before 1980

This has been fixed with https://github.com/python/cpython/pull/8270 in Python 3.8 and above by passing strict_timestamps=False

Hm, according to https://docs.python.org/3/library/zipfile.html#zipfile-objects , that setting causes older timestamps to be truncated: any files older than 1980 will arrive on the new machine with a timestamp of january 1st 1980.
@theronic which would be better, having the transfer fail, or having the timestamps get silently changed?
I'm happy to take a patch that adds strict_timestamps=false to cmd_send.py (https://github.com/magic-wormhole/magic-wormhole/blob/d517a10282d5e56f300db462b1a6eec517202af7/src/wormhole/cli/cmd_send.py#L351), assuming of course that it doesn't break compatibility with any older versions of Python, if you think timestamp truncation is the best option.

Hm, according to https://docs.python.org/3/library/zipfile.html#zipfile-objects , that setting causes older timestamps to be truncated: any files older than 1980 will arrive on the new machine with a timestamp of january 1st 1980.
@theronic which would be better, having the transfer fail, or having the timestamps get silently changed?
I'm happy to take a patch that adds strict_timestamps=false to cmd_send.py (https://github.com/magic-wormhole/magic-wormhole/blob/d517a10282d5e56f300db462b1a6eec517202af7/src/wormhole/cli/cmd_send.py#L351), assuming of course that it doesn't break compatibility with any older versions of Python, if you think timestamp truncation is the best option.


How to edit datagrid's datasource item without save button?

As seen in image, we don't want  to see Save  ikon on the right above of the grid.
For this grid editing attributes like this
[editing]="{mode: 'batch' ,editEnabled:true , insertEnabled:false, removeEnabled:false}

Hi,
Please refer to the dxDataGrid "Editing in code" guide.
You can also find the "Cell Editing and Editing API" technical demo useful.
If you need assistance that is not related to the devextreme-angular integration directly, you can also ask any question in our Support Center.


We should have a token validation check

Could you be more descriptive about what you mean by this please?

I think a method for now would be enough. Something simple like, a function that goes to user-info and checks if there are valid user properties coming back as well as if the return was a 401 unauthorized (token expired) or 200 (still good)

yeah, I meant more, is there a form our token takes that would imply
validity, or some kind of expiration to check or something- I don't really
know much of what goes into the construction of the tokens to say whether
they're bullshit or not. Same with user info though- something like "make
sure it has a first, last, and email address" would be enough? Or what do
we require on that front when setting up?
On Mon, Aug 22, 2016 at 12:12 PM, Smbat Yeranyan<EMAIL_ADDRESS>wrote:

I think a method for now would be enough. Something simple like, a
function that goes to user-info and checks if there are valid user
properties coming back as well as if the return was a 401 unauthorized
(token expired) or 200 (still good)
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/relayr/browser-sdk/issues/61#issuecomment-241369963,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFZEf73Nf4jJEoiK_RTBaN7ToS9ynEdEks5qiXYOgaJpZM4JoZ-4
.

--
Katie McGinley
Developer Evangelist and Mechanical Engineer
relayr GmbH • Bergmannstraße 102 • 10961 Berlin
Managing Directors: Josef Brunner and Harald Zapp
Commercial Register Number: 149071B
Tax ID: 37/490/31349, VAT ID: DE288362290
*Sign Up: *dev.relayr.io

just to double check: smbat, we decided to handle the unauthorized server response with the same way we handled everything else, just by rejecting the xhr object, correct? Or in the end did you want a specific set of actions for that?
I also explicitly log out the user if the getUserInfo after authorizing returns garbage, so the next time you interact with the server you have to log in again, rather than the exact second you're "caught" having junk, is that ok?

this is solved, right? @SmbatYeranyan


Feature/multiple serverless

Hi there, thank you for submitting, happy to merge but would you mind resolving the merge conflicts?

Also getting an error with shelljs install

@mj1618 Hey, thanks for your attention. I've resolved conflicts, fixed tests and added small docs for this feature,

Amazing thank you Artem! I will review and merge shortly.


[keyring-controller] Remove reliance upon the PreferencesController

The KeyringController currently depends upon four methods from the PreferencesController being passed in as constructor arguments. These methods are called to synchronize state, and to update preferences in response to certain keyring actions.
Essentially those operations don't belong in the KeyringController. It's not responsible for the PreferencesController state, the PreferencesController is. Conventionally a controller manages its own state, and that's it. The conventional approach here would be to update the PreferencesController to listen for relevant keyring related events, and react to them as appropriate internally. This keeps responsibilities clearly delineated between each controller. Event-based syncing is also safer than active syncing, in that we don't have to be concerned about forgetting to sync when we need to.

@Gudahtt What is the goal of this ticket? Is it just to remove the constructor options, or is it also to ensure that other controllers are listening to keyring changes?
It looks like AccountsController has code to listen to keyring state and update accounts already (which was added here: https://github.com/MetaMask/core/pull/1839), however, PreferencesController does not. I know that we are transitioning from PreferencesController to AccountsController, but how far do we think we're into that? Can we fully rely on AccountsController here or should we also have PreferencesController listen for the keyring changes since some clients may not be fully using AccountsController yet?

Is it just to remove the constructor options, or is it also to ensure that other controllers are listening to keyring changes?

It's just the former, to remove the options. Ensuring other controllers are listening to keyring changes is covered by linked tickets already.


feat: add docs for searching tokens by metadata

Description

Adds documentation for new metadata query parameter on GET /tokens

Testing required outside of automated testing?

[X] Not Applicable

Screenshots (if appropriate):

Rollback / Rollforward Procedure

[X] Roll Forward
[ ] Roll Back

Reviewer Checklist

[ ] Description of Change
[ ] Description of outside testing if applicable.
[ ] Description of Roll Forward / Backward Procedure
[ ] Documentation updated for Change

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


[Question] How to Retrieve LNBits Server-Side Fees and Understand Handling of LN Network Fees from Funding Sources (my Case LND)

Hello LNBits Team,
I am currently working on a web application that utilizes LNBits as its payment backbone for managing Bitcoin Lightning transactions. LNBits is essential for my application's payment infrastructure, and understanding its fee structures is crucial for accurate integration and providing a transparent user experience.
I have the following questions regarding LNBits:

Retrieving Server-Side Fees:

How can I programmatically retrieve the server-side fees configured in LNBits?
I have examined the /api/v1/payments endpoint, which returns a fee field in each payment object. However, I am unsure if this fee represents the server-side fee set within LNBits or if it refers to something else. Could you please clarify what the fee field in the payments API represents and guide me on how to accurately retrieve the server-side fee?

API Response Example:
[
  {
    "checking_id": "string",
    "pending": true,
    "amount": 0,
    "fee": 0,
    "memo": "string",
    "time": 0,
    "bolt11": "string",
    "preimage": "string",
    "payment_hash": "string",
    "expiry": 0,
    "extra": {},
    "wallet_id": "string",
    "webhook": "string",
    "webhook_status": 0
  }
]

In the above response, there is a fee field, but I am unsure if it refers to the server-side fee or something else.

Handling of LN Network Fees from Funding Sources:

How does LNBits handle LN network fees associated with attached funding sources?
When funding a wallet or processing transactions, how are the LN network fees calculated and deducted? Is this process managed automatically by LNBits, or do I need to implement additional logic in my application to account for these fees?

Any guidance, documentation, or examples you can provide on these topics would be greatly appreciated. This would help me offer a transparent payment experience to users.
Thank you for your time and assistance.
Cheers,
Dr. Shift ⚡

I have made some progress on the first part of my question. I found out that the /api/v1/payments endpoint provides the network fee in the "fee" field of the response. This fee represents the Lightning Network's fee a processed transaction.
However, I am still looking for the location or parameter where the "LNBits service fee" is stored. The fee set by the LNBits admin for outgoing transactions. I need to identify how to retrieve this specific fee programmatically.

You can fetch the settings of the server as admin and find the fee info there:
GET http://localhost:5000/admin/api/v1/settings?usr=d5ccb5ed11c6427e887890bbd050e95d

{
   ...
    "lnbits_reserve_fee_min": 2000,
    "lnbits_reserve_fee_percent": 1.0,
    "lnbits_service_fee": 0.0,
    "lnbits_service_fee_ignore_internal": true,
    "lnbits_service_fee_max": 0,
    "lnbits_service_fee_wallet": null,
   ...
}

Thanks🙏🏼 that's it.


Examples need updates?

This example:
https://openlayers.org/en/latest/doc/tutorials/raster-reprojection.html
seems to need an update, since the linked website's address changed to
https://www.planet.com/markets/federal/
Unfortunately I couldn't get https://demo.planet.com/geoserver/wms to work, so I cannot provide a PR. Don't know what to do, hope you will come up with a solution... :-)
Thank you!

It is the same as the WMS basemap used in https://openlayers.org/en/latest/examples/reprojection.html

@mike-000 Thank you, mike, or your response! I updated my "question" while you answered... Can you have a quick look again, please? Thank you!

Actually, the "multiple display" problem is addressed in that very article. Sorry for bothering!

In the example the code only sets the bng layer extent when the view is using a global projection (in this case EPSG:3857 and EPSG:4326) where the transform would be valid.  Transforming between projections which do not cover the same area is likely to cause errors.


Custom scrollbar

Current scrollbar is default and also, it does not align with the theme of the website. I want to customize it. #GSSOC'23

Which website?
please mention the url too


slayers: possible panic in the SerializeTo with receiver of type Raw

Hi :)
In the following excerpt, it seems to me that there is the implicit assumption that len(s.Raw) is at least MetaLen. Is this always true? if not, then it is possible that a panic occurs in the slicing operation (s.Raw[:MetaLen]).
https://github.com/scionproto/scion/blob/e4b728b87a7860d8901502efc77978fd97347d50/go/lib/slayers/path/scion/raw.go#L52-L56
If this is indeed a problem, then the simplest solution seems to be to remove the slicing operation because s.PathMeta.SerializeTo already performs a bounds check before writing to the buffer passed as argument.

Hi @jcp19
There is an implicit assumption here. The only place that raw is set, here:
https://github.com/scionproto/scion/blob/e4b728b87a7860d8901502efc77978fd97347d50/go/lib/slayers/path/scion/raw.go#L39
This means that s.Raw is non-nil, it is guaranteed to be of at least MetaLen length.
However, to protect against future changes, I think we should just drop the slicing as you suggested.
Care to create a PR?

Yes, I will take care of this issue and the other occurrences of s.Raw[:MetaLen].

Since we haven't heard from jcp19, attempting to refactor as suggested.


Windows support

Cog currently only works on Mac and Linux. We should support Windows as well.
User data

https://canary.discord.com/channels/775512803439280149/882336879343706122/963166127213674556

See also

#363
https://www.docker.com/blog/wsl-2-gpu-support-for-docker-desktop-on-nvidia-gpus/

(This is edited by @andreasjansson and @bfirsh. Consider it a wiki!

Would love to see cog work on Windows, either in wsl2 or otherwise. I've tried "all" of the ways to make AI art on Windows:

Python/win32 w/native libraries and binaries w/Conda , not containerized, CLI only. Works great, plenty of support available from Nvidia, Pytorch. Miniconda was my preferred distro. Was able to run several of the non-pixray projects (e.g. dall-e, vqgan, bigsleep) out there with zero to few modifications, but some required some futzing with pip & conda deps. I gave up on a couple of projects for various reasons, usually as they were very unpythonic and the design choices led to a huge mess to try and make them run on Windows. Disco-diffusion was a fail so far, I want to keep trying at that one.
Same as 1 but using VSCode & Jupyter for the notebook experience. This path was 100% new to me so I had a lot of catch up learning to do and did not get as far as I did with # 1, but had some successes.
Same as 1 but with a nice web UI from this project https://github.com/tnwei/vqgan-clip-app/. Worked great until I hit VRAM limits, which for some reason were a bit lower at similar quality levels as compared to some others. I might come back to this one and put in some safeguards to keep it from crashing.
Same as 1 w/o Conda. This was a pain, saw no point in continuing.
Python/Linux in WSL2 w/Conda, not containerized. I got 1 or 2 projects working as-is, which was neat as I'd not done much with WSL before. But given that I had already made a lot of progress in 1, the added initial setup steps and slight awkwardness dealing with the filesystem wrapper or vscode integration -- while surprisingly solid given that we're talking about Linux on Windows -- I learned what I need to and moved on.

At some point during the above fun, I came across pixray and wanted to see what I could do, especially as you'd wrapped multiple generators in one project, and I was hoping the container-based approach meant quick and easy setup, that being the point. Then I saw cog was going to make it even easier!
Oh well, I did not get very far with projects 6 (pixray/cog) or 7 (pixray/docker). Gave up on these, but would love to come back to it!
If anyone is interested in my notes on the above, you can find them here:
https://halr9000.notion.site/Project-BYOGPU-Running-locally-on-Windows-441c7e1435cb44a39551367a1e5c0934
and here
https://halr9000.notion.site/WIP-How-to-Create-AI-Art-Locally-on-Windows-38fd2638d1db4502a10a365567607c6d

This is super helpful information, thanks @halr9000. Do you need to run this locally, or would it be helpful if there was some way of running Cog models in the cloud somewhere?
E.g. we could have a way to make it easy to run on a GPU machine on Google Cloud, or something. That way you wouldn't have to deal with all this, but it would mean you'd have to pay for GPU time on Google Cloud.

Some data from @nicholascelestin on how to run it in WSL: https://canary.discord.com/channels/775512803439280149/852636181492793344/989652053397733376

WSL2 is awesome

Some work on this: https://github.com/replicate/cog/pull/681


🐞 : FAQ  section's question auto close issue

:red_circle: Title : FAQ section's question auto close issue
:red_circle: Bug :
:red_circle: Changes :  Question should auto close after clicking another question
Screenshots 📷

✅ Details to Include When Taking the Issue:
Name : Akash Das
Participant Role: GSSOC, Hacktoberfest :

Happy Contributing! 🚀
Wishing you all the best on your open source journey. Enjoy! 😎

Please assign me this issue .


Feature request: remote compute server (proving k2pow)

Request to allow offloading of k2pow to a separate server.
This problem was partially solved by the 1:N post-service feature, however it still relies upon compute being executed where storage exists or relying on suboptimal network share performance.
The idea of this feature is to allow separation of concerns between a low power storage server such as an Intel N100 and a high power compute node, such as a gaming computer or dedicated ex-enterprise server.
This would provide security to the network, but lower electricity costs for smeshers.
As background information, this feature was added to h9-miner earlier in the year.
I would like to see the feature introduced for official software to reduce incentive to move to h9-miner and help support "free range" netspace.

I’d suggest considering whether the k2pow service should manage and maintain its own work queue.

Yes, it totally makes sense to queue requests for calculating the k2pow as this is a heavily CPU-hungry task. I updated the requirements.

I'd probably vote, though, for "no queue" at all and some sensible error back.
Why?
Then, it's easier to set some "auto scaling" feature before the service itself (just based on requests), the requirement of keeping the state locally just in case is valid.

Hi there :wave:
@poszu I'm trying to figure out exactly which code needs to be pulled out to a separate service. Am I correct with the understanding that the PoW implementation in src/pow is the one that needs to be encapsulated with a service?

The k2pow might take a considerable time to finish. The post-service should not keep a long-running GRPC connection to the k2pow-service but it should prompt for a result in some short intervals.

Does this mean that we should assign a GUID for every job that is queued up to calculation? we should then probably also support create/get/delete operations for every job, correct?

The k2pow-service should optimally use CPU resources by using many cores and not running PoW in parallel.

Would it be possible to have a bit more specifics here? I'm not sure I fully understand this in practice. RandomX doesn't really give the ability to configure anything around the CPU AFAIU. How would you envision this optimal resource usage?

About scaling.

If we mark worker as busy (not accepting new requests while doing already all allowed k2pow) then simple http2 LB will suffice. To make sure that "there is enough of usage".
Then sure some central place to query results from in big setups will be needed (Redis like), but in simple setups the original will be good enough as we can generate gid with worker prefix :)

And then we gain two things:
You can use existing tooling easy in clustered setups, as all you need to do in k8s for example is some horizontal scaler.
If we however do the queueing on the worker side then we need to implement all signaling for full queue, etc. Imo unnecessary complication.
So to summ up
I think best overall is:

client side retry logic with retry& timeout (short intervals, a lot retries, small jitter)
worker accepts only one client, accepts it, generates gid, returns gid, starts computing, finishes with result, and is ready to serve result for given GID and at the same time accept new computation request. So there will be only one computation and many "results" served at the same time.
workers should generate gid with some sensible prefix so one can do LB that could direct the requests for a particular gid based on the prefix.

Would it be possible to have a bit more specifics here? I'm not sure I fully understand this in practice. RandomX doesn't really give the ability to configure anything around the CPU AFAIU. How would you envision this optimal resource usage?

We allow up to X CPU threads for randomX computation. It's called workers in this codebase, one worker is one CPU thread.
@poszu checked and on some CPUs it makes no sense to use more than Y cores as then it's even "not faster anymore" because of CPU architecture. Plus afaik it was also per numa group.

So to summ up I think best overall is:

client side retry logic with retry& timeout (short intervals, a lot retries, small jitter)
worker accepts only one client, accepts it, generates gid, returns gid, starts computing, finishes with result, and is ready to serve result for given GID and at the same time accept new computation request. So there will be only one computation and many "results" served at the same time.
workers should generate gid with some sensible prefix so one can do LB that could direct the requests for a particular gid based on the prefix.

Right, so my understanding here that the solution is already opinionated about how it will be used with a load-balancer. I'm just trying to make sure because it just sounds like it's not gonna be self-contained. I.e., if you want to use the k2pow in an external service configuration which will have more than one instance/worker, then you'll have to build an external service with a specific load balancer configuration and maybe other levels of tooling that would get the results and store them on redis. I guess that the expectation is that the users would build that tooling? Or are we going to offer a complete solution?

I think for now we can assume that it's good enough to have one instance that knows all.
I queue makes it simple we can try (we can always make queue with size 1) and reply "queue full"
But in general running more than one k2pow (randomX) per CPU (not thread, not cores) will not make it faster likely even slower.
Even with the queue we don't need to delete I guess.
The other possibility would be to make some MQ logic or take some off the shelf like nats and do proper fanin-fanout. But sounds like overkill in the first iteration:)

@poszu I'm trying to figure out exactly which code needs to be pulled out to a separate service. Am I correct with the understanding that the PoW implementation in src/pow is the one that needs to be encapsulated with a service?

Yes, probably into a separate crate to avoid pulling in GRPC- and CLI-related dependencies into the library. Similiarily as the certifier and post services are done.

The k2pow might take a considerable time to finish. The post-service should not keep a long-running GRPC connection to the k2pow-service but it should prompt for a result in some short intervals.

Does this mean that we should assign a GUID for every job that is queued up to calculation? we should then probably also support create/get/delete operations for every job, correct?

No need for a GUID. The set of input parameters (nonce_group, challenge, difficulty, miner_id) can be used to identify the proving request. I think a simple API to start proving and returning IN PROGRESS|FINISHED(u64)|FAILED(message) would suffice.

Also, Re: grpc:

could the new service just live as a cargo workspace?

Yes, a separate crate (look above for why).

could the grpc contracts live in this codebase? or do we need to go through the api repo?

I think it keep the proto files in the api repo  similarly to the post-service (https://github.com/spacemeshos/api/blob/master/post/v1/service.proto) .

The k2pow-service should optimally use CPU resources by using many cores and not running PoW in parallel.

Would it be possible to have a bit more specifics here? I'm not sure I fully understand this in practice. RandomX doesn't really give the ability to configure anything around the CPU AFAIU. How would you envision this optimal resource usage?

The K2pow prover uses rayon to parallelize computing RandomX hashes for multiple nonces in parallel. This is a CPU-heavy task and there is no point in using more threads than CPU cores (or configurable value). I think that the best approach would be to run 1 PoW using all cores at a time (and decide whether to queue the other incoming requests or reject them with "try again later" (UNAVAILABLE status perhaps?  See: https://grpc.io/docs/guides/status-codes).

@pigmej after consulting with @poszu about this a little, there are the following questions:

an idea here is that we could have the k2pow workers as clients, not servers:

the post service is then the work server
users can spin up as many k2pow clients as they wish, they just need to provide the post-service url so that the k2pow client connects to it
it can then pull work from the server, and report back the results when done
it's pretty much a zero-setup for the workers as they just need the binary and the connection string to the server
it makes later design changes such as job-queue or no job-queue to be easier to navigate - as it is all done on the post-service side (it can manage it's own queue and hand-out jobs to as many servers that connect to it, on-demand)
it will however, make things more complicated if the post-service is run locally (at home, for example) and the worker needs to connect from the outside

we could, alternatively, have the workers be "servers" that can each handle 1 job at the time

the user could then either add more "servers" with an API call to post service as they are brought up
they can then be removed via a symmetric api call to remove the workers as they are taken down after computation is done
or start the post service with the "servers" as cli flag array of addresses (less favorable)
this retains the possibility to manage a job-queue on the post-service side

the k2pow worker/service mode could be created as a new post service subcommand, reducing the number of binaries that users need to use/maintain (I would personally prefer a separate binary)
I wonder if having the contracts between the client-servers necessary to put in api and whether we need to use grpc at all here. Having it in HTTP would make things easier. It isn't clear whether and when cross-platform interop will be needed for this specific functionality, if ever.


encoder: improve api to make it more generic

See commits.

Still messing around with this, marking as draft


Closed Orders Disappearing

There is an issue where closed orders are disappearing from view from https://bitcoinvsaltcoins.com/trader.
Have had this experience twice - both times it happens when the closed order has resulted in a negative PnL.
Overall PnL as displayed on page is still correct, however, because of the disappearing closed orders, if you were to manually add together all PnL's, it would appear as incorrect.

do you have an example of those disappearing trades?

Now for some reason it is showing up again, but is was this trade. It was absent since it closed until now.
2 hours ago | BVA_LONG_ONLY | MTLBTC | -4.200% | 0.00007775 | 0.00007464 | LONG

Next it happens, please make sure it's not in the list. The trades are
ordered by closing time.
On Wed, Apr 7, 2021 at 3:25 PM Erich Strange @.***>
wrote:

Now for some reason it is showing up again, but is was this trade. It was
absent since it closed until now.
2 hours ago | BVA_LONG_ONLY | MTLBTC | -4.200% | 0.00007775 | 0.00007464 |
LONG
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jsappme/node-binance-trader/issues/105#issuecomment-815275390,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADGRD5JITVARCTGW5WDST3LTHTEWFANCNFSM42RN5AMA
.

Can we move this issue to https://github.com/jsappme/BitcoinVsAltcoins/? @jsappme you can do this via the "Transfer issue" element on the right hand side (on desktop).


issues with custom fields and weird values i can't change.

trying to figure out how to modify this field but it's $value is strange...
{{- if .meta.fields.customfield_10004 }}   sprint:     - value: {{ $value := index .fields.customfield_10004 0 }}{{$value}}{{end}}
in the go-jira edit <ISSUE-ID> editor i'm seeing this fields.sprint["value"]: string?
fields:   blocker: # Values: them, us,     - value: us   sprint:     - value: com.atlassian.greenhopper.service.sprint.Sprint@676abdb3[id=162,rapidViewId=56,state=ACTIVE,name=us 69,goal=,startDate=2019-04-29T23:27:58.470Z,endDate=2019-05-13T23:27:00.000Z,completeDate=<null>,sequence=162]
any idea how i can manipulate the individual values in that value, like editing the value of id or state ?

would love to be able to update any of the internal fields
com.atlassian.greenhopper.service.sprint.Sprint@676abdb3[
id=162
rapidViewId=56
state=ACTIVE
name=us 69
goal=
startDate=2019-04-29T23:27:58.470Z
endDate=2019-05-13T23:27:00.000Z
completeDate=
sequence=162
]

The sprint handling seems really crappy in jira (or maybe in this specific setup?). When a jira issue with a sprint is viewed it returns the map from above. When a sprint is set it needs to be the sprint id only.
So I changed my view template to
{{if .fields.customfield_10008 -}}
sprints: {{ range .fields.customfield_10008 }}
  - {{ . }} {{end}}
{{end -}}

and the edit template to
{{- if .fields.customfield_10008}}
  customfield_10008: {{ .fields.customfield_10008 | printf "%s" | regReplace ".*id=([0-9]+).*" "$1" }} #sprint id{{else}}
  customfield_10008: #sprint id{{end}}

For me it was customfield_10220 and to be able to see the sprint names only, I needed:
{{if .fields.customfield_10220 -}}
sprints: {{ range .fields.customfield_10220 }}
  - {{ . | printf "%s" | regReplace ".*name=(.+),startDate.*" "$1" }} {{end}}
{{end -}}


ratings

Hi,
congratulations for this work. I have a small issue with the ratings: "Best in class" and "Bad" seem to express a judgment on value, while the two others are about maturity. For example some domain could be seen as mature (i.e. well tooled, nothing to do more) but "bad" because Haskell is simply no good at that (e.g. embedded).
Another suggestion: swap "Application Domains" and "Programming Needs" sections, because the reading becomes quickly depressing: already "Immature" at the third bullet...

I'm definitely keeping Application Domains at the top because it's more relevant to most people reading the document.  People will forgive deficiencies if you're honest and open about them.  It also highlights where the community has room for improvement and has galvanized people to contribute in those areas (such as Data Science, which is a really active area recently)
Generally, maturity tends to correlate with suitability for a domain.  For example, if Haskell isn't well suited for a domain, that means less people hacking on tooling or libraries for that domain and therefore less mature.


props 'y' in Image component works the opposite way on Android and iOS

On iOS devices, image will go up but on Android, image will go down when I use a larger y.

I guess it's related to this: https://github.com/react-native-community/react-native-svg/pull/763
@mike-marcacci Could you check this out?

@JungHsuan what version are you seeing this on?

So, upgrade to the latest version (or any after that pr got merged) to fix it. Please make sure to test in the latest version before opening an issue.


delivery optimization windows update MPLS traffic gets chocked

we have our Two site which connected through the MPLS connection
both site have two different WSUS Server for update client take update for their respective server
now issue is client taking update peer to peer which is called (delivery optimization windows update), client PC taking update different site client PC due to this our MPLS traffic gets chocked due to this user having problem HO connectivity too much slow

@officedocsbot assign @mypil

@biren1234 - Thank you for submitting feedback.
I think the best way forward is if you can open a service ticket so this can get resolved ASAP. Based on outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for Windows 10 products:  https://support.microsoft.com/en-us/hub/4338813/windows-help?os=windows-10
If you don't mind please keep us posted here on the resolution and I really want to get this information you are discovering back into the docs.

@officedocsbot close


Update hybrid-azuread-join-plan.md

Added tip on doing SSO to on-prem from Azure AD Joined devices.
It is important that readers know this is possible. I would go as far as to say that it is the preferred way, but that would be up to MSFT FTE to add that statement.

@mardahl : Thanks for your contribution! The author(s) have been notified to review your proposed change.

I saw that. But I think it is about guiding the audience whereever they enter the site.
I often hear customers complain tht there is too much to read, and it is hard tonfind the right info etc.
Tbh. I personally think it's alright as is, but we have to meet all levels of readers.
The SSO from aad joined devices is a hot topic these days, so let's do all we can to get users away from hybrid. :)

@ktoliver : Thanks for your contribution! The author(s) have been notified to review your proposed change.


[BUG] images don't render properly in Github when viewing markdown files

Describe the bug
browse any docs page on github and notice that the image links are broken
Expected behavior
would be better if images rendered properly on docs.nearprotocol.com as well as github
:pencil: Location
https://github.com/nearprotocol/docs/blob/757e3e0effd0aad85445385085358d6bfd400099/docs/local-setup/local-dev-testnet.md

spoke w @vgrichina and agreed to add absolute URLs to images in docs to solve
quick find and replace for assets/ with https://docs.nearprotocol.com/docs/assets should do it

seems like we can close this, especially now that there's an [Edit] button on every page in the docs site itself based on https://github.com/nearprotocol/docs/commit/5f9d7b68255e69e14b6acadbdb644e2caecf5a3e#diff-e325cd5cbe56ac91a36c6cab5c1ece42


Nomen nudum appears as valid and invalid at the same time (in Summary box)

When I enter a nomen nudum, the summary box lists that species as valid and invalid at the same time. (Right screen, below)

I would not expect to see this contradictory statement displayed.

Thanks @hhopkins77 for adding this ticket.