[BUG] print sometimes ignores \r escape sequence

Describe the bug
Rich doesn't appear to take notice of the \r escape sequence when it's included with a string as an argument to rich.print. If it's used in the end argument, it works as expected.
To Reproduce
from rich import print as rprint

# behaviour with rich
rprint("Hello world!", end="\r")
rprint("Hi there, world!")

rprint("Hello world!\r", end="")
rprint("Hi there, world!")

print()

# standard behaviour
print("Hello world!", end="\r")
print("Hi there, world!")

print("Hello world!\r", end="")
print("Hi there, world!")

Outputs:
❯ python .\test.py
Hi there, world!
Hello world!Hi there, world!

Hi there, world!
Hi there, world!

Platform
Running Windows 10, Powershell inside the new Windows Terminal and Rich 9.5.1

Carriage returns break a number of features of rich, such as word wrap and alignment. Which is why they are stripped out. Not stripping it out of end was an oversight, but I'm inclined to leave it as it is for users who are certain they know what they are doing.
Most of what you might user \r for can be done with the new Live class, so it's not a great loss.

Ah, that makes sense. In the situation I'm using it in, neither word wrap or alighnment are much of a concern, I'm just using Rich for the colours. The only plus I can see for \r compared to the Live class is that it's super simple for this use case.
Thanks for the prompt reply!


iOS - Workspace Invite - User is unable to scroll to the bottom of the page when keyboard is open

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

Action Performed:

Open e.cash and log in
Click on profile
Click on any existing workspace
Click on People
Click on Invite
Open the keyboard on any of the 2 text boxes
Scroll to the bottom of the page

Expected Result:
User should be able to scroll to the bottom of the page and have a visual of the whole text box.
Actual Result:
User is unable to scroll to the bottom of the page when the keyboard is opened
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platform:
Where is this issue occurring?
Web
iOS ✔
Android
Desktop App
Mobile Web
Version Number: 1.0.77-2
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/44479856/125441648-68150132-74c1-4dbb-aac6-968ca914ea97.MP4
Expensify/Expensify Issue URL:
View all open jobs on Upwork

Triggered auto assignment to @luacmartins (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

I am already fixing it and PR is in progress.

@parasharrajat can you link the PR for reference?

Unassigning myself and assigning @parasharrajat as a fix is in progress.


Bug report: add webpart with properties not working

Description
Hi Team,
i am trying to add webpart on modern page with pre-configured properties, but not working.
i have used below lines from https://pnp.github.io/
m365 --% spo page clientsidewebpart add --webUrl https://contoso.sharepoint.com/sites/a-team --pageName page.aspx --standardWebPart BingMap --webPartProperties "{""Title"":""Foo location""}"``
m365 spo page clientsidewebpart add --webUrl https://contoso.sharepoint.com/sites/a-team --pageName page.aspx --standardWebPart Image --webPartData '{ "dataVersion": "1.8", "serverProcessedContent": {"htmlStrings":{},"searchablePlainTexts":{"captionText":""},"imageSources":{"imageSource":"/sites/team-a/SiteAssets/work-life-balance.png"},"links":{}}, "properties": {"imageSourceType":2,"altText":"a group of people on a beach","overlayText":"Work life balance","fileName":"48146-OFF12_Justice_01.png","siteId":"27664b85-067d-4be9-a7d7-89b2e804d09f","webId":"a7664b85-067d-4be9-a7d7-89b2e804d09f","listId":"37664b85-067d-4be9-a7d7-89b2e804d09f","uniqueId":"67664b85-067d-4be9-a7d7-89b2e804d09f","imgWidth":650,"imgHeight":433,"fixAspectRatio":false,"isOverlayTextEnabled":true}}'
using these lines not able to add standard webpart on the page.
Steps to reproduce
$webPartPropsJson = '{"id":"c70391ea-0b10-4ee9-b2b4-006d3fcad0cd","instanceId":"0683c254-92c4-4a96-adad-dd9fab9a61e0","title":"Quick links","description":"Show a collection of links to content such as documents, images, videos, and more in a variety of layouts with options for icons, images, and audience targeting.","audiences":[],"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{"items[0].title":"Google"},"imageSources":{},"links":{"baseUrl":"https://ajayguptavf.sharepoint.com/sites/mdrndev-comm","items[0].sourceItem.url":"https://google.com"},"componentDependencies":{"layoutComponentId":"706e33c8-af37-4e7b-9d22-6e5694d92a6f"}}}'
Write-Host $webPartPropsJson
# Make sure to add the backticks, double the JSON double-quotes and escape double quotes in properties'values
$webPartPropsJson = '`"{0}"`' -f $webPartPropsJson.Replace('\','\\').Replace('"', '""')

m365  spo page clientsidewebpart add --webUrl $siteUrl --pageName $pageName --standardWebPart QuickLinks --webPartData $webPartPropsJson --debug

Expected results
page created with webpart added in it.
Actual results
Error: Specified webPartData is not a valid JSON string. Input: {"id":"c70391ea-0b10-4ee9-b2b4-006d3fcad0cd","instanceId":"0683c254-92c4-4a96-adad-dd9fab9a61e0","title":"Quick links","description":"Show a collection of links to content such as documents, images, videos, and more in a variety of layouts with options for icons, images, and audience targeting.","audiences":[],"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{"items[0].title":"Google"},"imageSources":{},"links":{"baseUrl":"https://ajayguptavf.sharepoint.com/sites/mdrndev-comm","items[0].sourceItem.url":"https://google.com"},"componentDependencies":{"layoutComponentId":"706e33c8-af37-4e7b-9d22-6e5694d92a6f"}}}. Error: SyntaxError: Unexpected token ` in JSON at position 0
Diagnostics
No response
CLI for Microsoft 365 version
v4.3.0
nodejs version
v12.16.1
Operating system (environment)
Windows
Shell
PowerShell
cli doctor
No response
Additional Info
No response

Thank you for reporting the issue @ag0059985 and we'll look into it asap. Sorry for the trouble.

Which version of PowerShell are you using @ag0059985?

Tested in PowerShell 7x on macOS, the script seems to work when you drop outer backticks from webPartData:
$webPartPropsJson = '"{0}"' -f $webPartPropsJson.Replace('\','\\').Replace('"', '""')

Powershell version is 5.1

@waldekmastykarz i am trying it in windows 10.

Hello @ag0059985  - I had tried recreating the issue in Windows 10 with PowerShell Version 5.1.18362. If you modify your script based on @waldekmastykarz 's suggestion by removing the outer backticks, it is working as expected.

Please let us know if you are still facing the issue.

@arjunumenon will post an update once I have tested in windows.
Anyway thanks for quick responses @waldekmastykarz  @arjunumenon

Hey @ag0059985, do you have any more information for us?

Closing due to lack of response


stat/distuv: use math.Expm1 when calculating Exponential.CDF to improve accuracy for small x

Please take a look.
This changes the way the CDF is calculated for exponential distribution from
1 - math.Exp(-e.Rate * x)

to
- math.Expm1(-e.Rate * x)

giving higher accuracy for very small x.

Changed the PR description.

For the record, PR titles and commits follow the Go convention. So, given that this is a single commit PR, here both would be "stat/distuv: improve accuracy of Exponential.CDF for small values" or something similar (the code change says what happens, the commit message tells the intention - you could append " by using math.Expm1" if you really want, but I don't think it's necessary since it's in the diff).


[PE-D][Tester C] Relative directory of jar and json not emphasised

In the UG, the relative directory of jar and json file is not emphasised when explaining how to use it on another computer.

Inexperienced user might put both under the same directory and wonder why they lost their data.

Labels: severity.Low type.DocumentationBug
original: narwhalsilent/ped#11

duplicate with #200


Fixed urls to use archive.org as  blog removed

Issue:
URLs in the readme refer to the now defunct You Had Me at Helo blog. The links just redirect to the default Exchange community blog as opposed to the specific blog post
Reason:
Updating links so that an archived copy of the original blog post is viewable so the users can read about the scripts purpose
Fix:
Updated links to go to archive.org's copy of the original blog post.
Validation:
Links in readme.md work.

Not going to include the archive.org location. Just put in the correct location to the blogs
#66


Adding more multiline string support

The recipe parser now properly handles multiline strings when | and > (plus +/-) variants are used. Previously the parser only supported the | character.
The bulk of this PR includes additional unit testing.
See commits for additional details.

@wolfv The last commit has that sorting we talked about earlier today, if you were curious ^


test: Remove completion tests

The tests are intended to spot check that shell completions are registered correctly.  That is a low change, low risk area.  For shell integration, we're relying on clap_completes tests. For our own candidates, we should test the candidate generation directly, rather than end-to-end.
This reverts parts of commit e7ca9bec80ab5c010c1a84690816da7b64008257, reversing changes made to bd5f32bb1c7ca273b5d86815bf0ae4adba59ddd8.
Fixes #14545

@bors r+

:pushpin: Commit 023f4c66ca855c2c3083b8dbd15a4c60f0851c2e has been approved by weihanglo
It is now in the queue for this repository.

:hourglass: Testing commit 023f4c66ca855c2c3083b8dbd15a4c60f0851c2e with merge 8fc3ff4fd7f82eec9141835d7a0267b3d888cc84...

:sunny: Test successful - checks-actions
Approved by: weihanglo
Pushing 8fc3ff4fd7f82eec9141835d7a0267b3d888cc84 to master...


Error: Undefined function: dateTime when using live preview

Seems to be related to #18 as I experience the exact same thing except here I'm using dateTime instead.

This will be fixed once we release the next version of groq-js: https://github.com/sanity-io/groq-js/issues/41

And then we need this one: https://github.com/sanity-io/groq-store/pull/3

And once this is merged and released it should start finally working: https://github.com/sanity-io/next-sanity/pull/26

This should work in version 0.3.0.


aws-dynamodbstreams-lambda-elasticsearch-kibana module: Dedicated Master Node flag cannot be set to false

Description of the bug: This construct will not accept an override to set the dedicated_master_enabled = False. When explicitly overridden, the cdk synth command generates a template that still includes the following values
"ElasticsearchClusterConfig": {
"DedicatedMasterCount": 3,
"DedicatedMasterEnabled": false,
Reproduction Steps
Here is a code sample
from aws_cdk import Stack
from aws_cdk import aws_dynamodb as dynamo
from aws_cdk import aws_elasticsearch as es
from aws_cdk import aws_lambda as lmb
from aws_solutions_constructs.aws_dynamodbstreams_lambda_elasticsearch_kibana import (
    DynamoDBStreamsToLambdaToElasticSearchAndKibana as _dynLmbEs,
)
from constructs import Construct

class ConstructBugStack(Stack):
    def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
        super().__init__(scope, construct_id, **kwargs)

        # The code that defines your stack goes here

        dynamodb_streams = _dynLmbEs(
            self,
            "test",
            domain_name=f"test-abc123",
            es_domain_props=es.CfnDomainProps(
                elasticsearch_version="OpenSearch_1.2",
                elasticsearch_cluster_config=es.CfnDomain.ElasticsearchClusterConfigProperty(
                    dedicated_master_enabled=False,
                    # dedicated_master_count=3,
                    # dedicated_master_type="t3.small.elasticsearch",
                    instance_count=1,
                    instance_type="t3.small.elasticsearch",
                    zone_awareness_config=es.CfnDomain.ZoneAwarenessConfigProperty(
                        availability_zone_count=1
                    ),
                ),
            ),
            cognito_domain_name=f"test-{self.node.addr}",
            lambda_function_props=lmb.FunctionProps(
                description="Test Lambda",
                code=lmb.Code.from_asset("./lambda"),
                handler="lambda.lambda_handler",
                runtime=lmb.Runtime.PYTHON_3_9,  # type: ignore
                architecture=lmb.Architecture.ARM_64,  # type: ignore
            ),
        )

"ElasticsearchClusterConfig": {
     "DedicatedMasterCount": 3,
     "DedicatedMasterEnabled": false,
     "InstanceCount": 1,
     "InstanceType": "t3.small.elasticsearch",
     "ZoneAwarenessConfig": {
      "AvailabilityZoneCount": 1
     },

Error Log
ConstructBugStack: creating CloudFormation changeset...
9:46:13 PM | CREATE_FAILED        | AWS::Elasticsearch::Domain               | testLambdaToElasti...archDomain67456CD4
DedicatedMasterEnabled must be set to True to specify the DedicatedMasterCount and DedicatedMasterType options. (Service: AWSElasticsearch; Status Code: 400; Error Code: ValidationException; Requ
est ID: 808cacad-6ebb-41ec-96c0-3fba20b1ebc7; Proxy: null)

 ❌  ConstructBugStack failed: Error: The stack named ConstructBugStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: DedicatedMasterEnabled must be set to True to specify the DedicatedMasterCount and DedicatedMasterType options. (Service: AWSElasticsearch; Status Code: 400; Error Code: ValidationException; Request ID: 808cacad-6ebb-41ec-96c0-3fba20b1ebc7; Proxy: null)
    at prepareAndExecuteChangeSet (/home/ec2-user/.nvm/versions/node/v16.13.1/lib/node_modules/aws-cdk/lib/api/deploy-stack.ts:385:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at CdkToolkit.deploy (/home/ec2-user/.nvm/versions/node/v16.13.1/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:209:24)
    at initCommandLine (/home/ec2-user/.nvm/versions/node/v16.13.1/lib/node_modules/aws-cdk/lib/cli.ts:341:12)

The stack named ConstructBugStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: DedicatedMasterEnabled must be set to True to specify the DedicatedMasterCount and DedicatedMasterType options. (Service: AWSElasticsearch; Status Code: 400; Error Code: ValidationException; Request ID: 808cacad-6ebb-41ec-96c0-3fba20b1ebc7; Proxy: null)

Environment

CDK CLI Version      :2.31.0 (build b67950d)
CDK Framework Version: 2.3.1
AWS Solutions Constructs Version     :10.1.43
OS                   : MacOS
Language             : Python 3.10

Other

This is :bug: Bug Report

Thanks for the input. We're currently in the final stages of updating this construct to deploy in a VPC (non-VPC deployments will still work). In the process we found that we currently create the cluster config in all scenarios. This doesn't fit the Constructs model of using client inputs whenever possible, so in this release if a client submits a cluster configuration it will get passed on verbatim to the Elasticsearch domain. This will give the clients much more flexibility, but will also add responsibility to send a complete cluster config if they choose exploit this flexibility.
I believe this update will address your concern, we hope to push it late this week or early next week.


Added import of theano.shared in translate.py

The current code does not run unless this import is added.
This is also done in nematus https://github.com/rsennrich/nematus/blob/master/nematus/translate.py#L21

Thanks @ofirpress , merging!


nixos/fontconfig-penultimate: disable by default

It currently lacks an emoji font-family which means it has to be
disabled for them to function 0.  Additionally it's fallen out of
necessity to ship custom font rendering settings (as far as I'm aware
of).

Motivation for this change
cc @ttuegel, I'd very much appreciate your stance on this.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Cc @volth as resident font guru.

Cc @volth as resident font guru.

I prefer to disable antialiasing the hard way, with freetype patches, to get Win95-like fonts.
So the patches which improve antialiasing is out of my scope.
I have heard that the modern freetype adopted many of those *ultimate patches so I am not sure if they are still helpful

I have been running with penultimate disabled for last week or so and did not encounter any issues. The current default is much worse for me as it lacks support for both emoji and math font classes.
I though we no longer patch freetype, as the main contention (ClearType hinting) was incorporated into upstream freetype when patents expired.
fontconfig-penultimate.nix offers exactly the same customization options as fontconfig.nix, so the only benefit that it could offer is assigning some font families to family classes. But lot of them have been added to upstream fontconfig in the meanwhile as well, in addition to a lot of new fonts that are not in penultimate (especially emoji). With this in mind, I am doubtful it is of any use at all.
If someone still wants it they can always enable it. But since vanilla fontconfig is perfectly usable, as evidenced by other distros running vanilla fontconfig, I say there is no place for penultimate to be enabled by default.

It seems we came to a good agreement during nixos office-hours, I'm going to merge as is.


vitest/ui coverage page have invalid iframe url when running on preview mode (pre-generated report)

Describe the bug
UI converage page works well in "test development mode", but fails to load on generated report (after running vite preview --outDir html).
Root cause: https://github.com/vitest-dev/vitest/blob/main/packages/ui/client/composables/navigation.ts#L22

Another minor issue:
CI=true vitest --ui should not open browser
Reproduction
import { defineConfig } from "vitest/config";
export default defineConfig({
  test: {
    coverage: {
      enabled: true,
      reporter: ['html'],
      reportsDirectory: 'html/coverage',
      provider: 'istanbul',
      all: true,
    },
    reporters: ['html'],
  },
});

# package.json
{
  "scripts": {
    "test": "vitest",
    "preview": "vite preview"
  }
}

CI=true bun run test --ui
bun run preview --outDir html

Also it would be nice to have iframe url somehow obtained from coverage.reportsDirectory, for example if coverage.reportsDirectory is located under <rootDir>/html (vitest html reporter root dir), then relative url is calculated.
System Info
System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
    Memory: 5.32 GB / 7.63 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
  npmPackages:
    @vitest/browser: ^0.34.4 => 0.34.4
    @vitest/coverage-istanbul: ^0.34.4 => 0.34.4
    @vitest/ui: ^0.34.4 => 0.34.4
    vite: ^4.4.5 => 4.4.9
    vitest: ^0.34.4 => 0.34.4

Used Package Manager
bun
Validations

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

I'm having the same problem as you.
When executing vitest --ui, the port of vitest ui  !=  the port of iframe, after I corrected the iframe port in F12, it can be displayed, but I don't know how to fix it in setting.

// vite.config.ts

test: {
  include: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
  environment: 'jsdom',
  globals: true,
  alias: {
    '@': fileURLToPath(new URL('./src', import.meta.url)),
  },
  coverage: {
    provider: 'istanbul',
    enabled: true,
    reportOnFailure: true,
    perFile: true,
  },
},

// package.json

"scripts": {
  "test:unit-ui": "vitest --ui",
  "test:unit": "vitest",
  "test:unit-report": "vitest run --coverage"
},

I think I found a solution, setting test.api, It look like the port is occupied.
// vite.config.ts

test: {
  include: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
  environment: 'jsdom',
  globals: true,
  api: 51205,
  alias: {
    '@': fileURLToPath(new URL('./src', import.meta.url)),
  },
  coverage: {
    provider: 'istanbul',
    enabled: true,
    reportOnFailure: true,
    perFile: true,
  },
},


[AutoPR machinelearningservices/resource-manager] add computeType OnPrem

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/7079

(message created by the CI based on PR content)


Freezing a BatchNormalization layer by setting trainable = false does not work. Weights are still being updated.

The issue seems to be that that the updates that are created on applying the BatchNorm layer are added to the train function even when they act on non-trainable weights.
gist to code:
https://gist.github.com/afourast/0d7545174c1b8fb7b0f82d7efbf31743
Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or join the Keras Slack channel and ask there instead of filing a GitHub issue.
Thank you!

[x] Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps

[x] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.

[ ] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps

[x] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

https://github.com/fchollet/keras/issues/7051#issuecomment-309851005

BN layer has alpha,beta,varience and mean layers, the alpha and beta layers' param can change the
trainable attribute,but the varience and mean param can not set untrainable. Although you set the BN layer trainable = False ,it will not work

Locking BN is a technique used in segmentation so I think this is an option we need to add if it does not currently exist

Is there any workaround available for this issue? It turns into hell when you're trying to use single shared model body (pre-trained model with trainable=False) inside multiple models which are trained on different datasets

If you are willing to give up on the Keras training routines (fit, fit_batch, fit_generator etc), you can define a custom training function in the way that Keras does for them (https://github.com/fchollet/keras/blob/d3db58c8bf1ef9d078b3cf5d828d22346df6469b/keras/engine/training.py#L948), where you won't include the BN statistics updates. For example:
https://gist.github.com/afourast/018722309ac2a272ce4985190ec52742
In my models there are no other updates added to the 'updates' list besides the BN statistics, but you should check that with your models. Also I have only tested this with a tf backend. You will  have to define a similar function for testing.
I've personally found that using a custom training function convenient since you can also do things like use tf queues and add tensorboard summaries.
Hope that helps

Thanks, but it seems too tricky for my case.
I've found another way to workaround that: you can set layer._per_input_updates = {} on your batch norm layers which should be fixed during training.

I'm running into the same issue, is there a technical reason it can't be fixed?

U can find:BatchNormalization layer was combined by four small layers:alpha layer,beta layer,and two other weight-layers,your Trainable=False order just keep two other weight-layers unchanged

Right, and can the alpha and beta layers be frozen, and if so how?

Training never uses anything other than current batch for training, but it updates the running averages for inference. If training is resumed, I think running average is reset to zero.

Thank you for the explanation, I've misread that in the paper. Then it makes sense that I get worse results with stateful=False during retraining.

From the code of Keras 2.1.3, what I see is training=False rather than trainable=False
https://github.com/keras-team/keras/blob/2.1.3/keras/layers/normalization.py#L175

Does you model contain a Upsampling2D layer AND did you specify interpolation?
# Example
x = UpSampling2D(2, interpolation="bilinear")(x)

It seems the setting 'interpolation' is NOT saved with the model. Therefore, when loading the model, UpSampling2D layers get the default 'nearest' interpolation when loading. Because the model was trained with 'bilinear' interpolation it will not perform as well when given 'nearest' interpolation after loading.
In tensorflow 1.14.0 this seems to be the case. It seems fixed in tensorflow 1.15.0.
WORKAROUND 1

Create the model with the original code
Now load the save weights from either the .h5 of .hdf5 file using model.load_weights(...)

WORKAROUND 2

In the model JSON file, add "interpolation": "bilinear" to the config of UpSampling2D layers.
Now load, this works, even in tensorflow 1.14.0

WORKAROUND 3

After loading the model, look in model.layers and for each UpSampling2D layer, change the interpolation

I also noticed that the .h5 file is smaller (8MB) than the .hdf5 file (25MB) but the contents seems similar, probably compression. I proved this by getting original model performance after loading either. Also comparing the loaded weights and precision (float32) was equal.
Lastly, took me 4 hours to find. I found this issue by having the good and bad model simultaneously loaded in a Jupyter notebook. Then, I let both models predict a single sample and compared the output after each layer until a difference occurred. In my case after layer 35 which was the first Upsampling2D layer.
layer_no = 34
inf_good = Model(inputs=model_good.input, outputs=[model_good.layers[layer_no].output])
inf_bad = Model(inputs=model_bad.input, outputs=[model_bad.layers[layer_no].output])

pred_sample = 2
plt.imshow(np.squeeze(X[pred_sample]))

p_good = inf_good.predict(X[pred_sample:pred_sample+1])
p_bad = inf_bad.predict(X[pred_sample:pred_sample+1])

(p_good == p_bad).all()

Hope this helps


Add gccgo target to Makefile

This adds gccgo as a target in the Makefile.
Signed-off-by: Christopher Jones<EMAIL_ADDRESS>

ping @tianon @jfrazelle

thanks duglin, I knew I was forgetting something!

Seems sane, I suppose. :+1:
LGTM

LGTM


To add number keys functionality in calculator so that keyboard can also be used for inputs.

Greetings,
I would like to add number keys functionality to the calculator.

Let me review your work.


Fix starting up without config

Description
Contributions
So apparently I should avoid messing with the shell scripts :sweat_smile:
#202 accidentally allowed for running odin start before odin configure which means that a fully fresh server install or updating from a pre-config.json era would result in a panic from missing config.json (I honestly forgot odin configure was a thing). This change just extracts out the only bit of auto_update.sh that I really cared about and uses that within the startup script instead of calling the whole startup script.
Would it be possible to avoid odin configure entirely? From what I can tell config.json is only used within odin for start, so can we just read the env vars within start instead?
Checklist

[x] I added one or multiple labels which best describes this PR.
[x] I have tested the changes locally.
[ ] This PR has a reviewer on it.
[x] I have validated my changes in a docker container and on Ubuntu. (Only needed for Odin or Docker Changes)

Pinging @mbround18 for when you get a time to review since this will hit any new people trying out the current image

This does not seem to con odin configure ?

We moved to odin configure because we didn't want to deal with environment variable parsing. Tossing it into a json file allowed them to be sanitized without us having to sanitize them.

So the issue was that auto_update getting called from withing start_valheim will end up calling odin start from within auto_update before an odin configure gets called (since that happens after auto_update within start_valheim)
If you delete config.json and do docker start with UPDATE_ON_STSRTUP active you'll see odin panic
And can't we ignore env var escaping since it doesn't have to be done when daemonizing within odin. The only time it would be needed if if we were doing things like setting up and env for cron or other generating bash scripts

That was the other issue we are avoiding and should consider. odin configure avoids having to pass in any server configuration arguments to each of the cron jobs where we would have to escape character.
Instead of running the auto_update.sh my suggestion would be we just run odin install and if the save directory exists, run the odin backup command before we run odin install.

Ah, that makes sense.
And that seems fine too, I was just trying to respect the AUTO_BACKUP_ON_UPDATE flag. Feel free to make any changes and merge once you're happy with it. I'm about to go to sleep

I am on the side of a mountain hiking atm in a spot with limited service XP I'll have to make changes once I get home.
In the mean time sleep well! As a temp work around I suggest beans run odin configure inside the container and restart


Recieving the error "DiscordAPIError: Cannot send an empty message" when sending embed.

The fix is so simple yet it took me so long to find, inside the sendEmbed function change await channel.send(embed) to await channel.send({embed}), that's all you need to do, add a {} I have no idea why this is but it seems to only work once I add this.

Nvm pull request would be more appropriate for this stuff.


Allow root registry creation with prefix AND label(s)

As the title says, is it okay to add a constructor (with_prefix_and_labels; please suggest a better name eventually) that allows the creation of a base/root registry with a prefix and some default labels? Or maybe a way to allow the mutation of the labels of a registry.
I have a bunch of counters coming from from processes running on different hosts and I'd like to have them labeled with about 2-3 base/identification labels to be able to query them in my dashboards properly. Due to some restrictions I am not able to inject these labels directly via kubernetes on Prometheus scrape. At the same time, I see no reason TO NOT allow the creation of a registry with default labels.
This is a question related a bit to the previously posted issue (https://github.com/prometheus/client_rust/issues/144) for which I submitted a pull request (https://github.com/prometheus/client_rust/pull/145).

No objections to adding Registry::with_prefix_and_labels. Contribution welcome.

I believe this can be closed now?

You are right. Thanks!


cannot open a room

reported by @fri:matrix.org
https://github.com/matrix-org/riot-android-rageshakes/issues/1426

11-01 14:49:31.540Z 2 E/RoomActivity: ## onResume() : the user is not anymore a member of the room.
11-01 14:49:31.579Z 2 E/MXMemoryStore: ## getSummaries() : a summary exists for the roomId !XhkZGPcMgBgWzacGfn:matrix.org but the user is not anymore a member
Server issue
The user will need to clear his application cache.


Need to set an offset while there is a fixed header on the page

Thanks for the nice extension. Adding an offset option to start the scroll triggering from that offset position would be a great addition. Currently, it works with window as the viewport; if we could add an offset to move down the scroll target position, it could be implemented easily with a fixed header.
Thanks

Hello @showhan! Sorry for the late reply. This ticket somehow escaped my attention.
Could you please elaborate on it? I'm not sure I understood your request. What use case are we talking about?

Sorry @vursen, for the delay! I actually forgot the actual issue of what it was exactly for; hence I need to explore it again to find it out. By the way, I will close the topic, and if I need it again, I can open it further with more details.
Thanks for your message!


View Controller not conforming to protocol, even though all methods are implemented

As the readme suggests, I made my view controller conform to ImageScannerControllerDelegate and added all 4 protocol methods to my code:
extension DocumentUploaderViewController: ImageScannerControllerDelegate {
    func imageScannerController(_ scanner: ImageScannerController, didFinishScanningWithResults results: ImageScannerResults) {
        scanner.dismiss(animated: true)
    }

    func imageScannerController(_ scanner: ImageScannerController, didFinishScanningWithPage1Results page1Results: ImageScannerResults, andPage2Results page2Results: ImageScannerResults) {
        scanner.dismiss(animated: true)
    }

    func imageScannerControllerDidCancel(_ scanner: ImageScannerController) {
        scanner.dismiss(animated: true)
    }

    func imageScannerController(_ scanner: ImageScannerController, didFailWithError error: Error) {
        scanner.dismiss(animated: true)
    }
}

Now, Xcode (10.2.1) complains that I'm still missing some protocol stubs:

Type 'DocumentUploaderViewController' does not conform to protocol 'ImageScannerControllerDelegate'
Do you want to add protocol stubs?

When I press Fix, Xcode adds the didFailWithError method:
func imageScannerController(_ scanner: ImageScannerController, didFailWithError error: Error) {
}

...and then complains that I have added an invalid redeclaration of the method (because it was already there!):

Invalid redeclaration of 'imageScannerController(_:didFailWithError:)'

I have already tried:

build
clean derived data
clean & build
quit Xcode, clean, build
reboot my Mac (10.14.3), open Xcode, clean, build

None of these tries helped.
Any ideas?

I ran your code, and it worked just fine, maybe the code inside your pod got changed somehow ?
Try running the demo app and let me know.
Also, try removing and installing the pod again.

Thanks for the quick response. The demo project builds fine. 🤔
I already ran pod update and pod install, removed the pod and added it back, idk what's wrong.

I'm afraid this issue has to do with your project and not the with the framework.
I'll gladly help you out with the implementation, if you don't mind sharing your source code. Drop me an email it you're interested.

Appreciate it, but can't share, unfortunately. Thanks anyway!

@iMhdi just to let you know, I found the issue: I have an Error model in my project so I had to change the method declaration to didFailWithError error: Swift.Error. Now it works :)


Nested issues

[ ] For loop with ifs doen't seem to work
[ ] Nested loops keep giving issues, need a better test scenario

For loop with ifs doesn't seem to work:
the each has not been resolved yet by the time we reach the conditional
the each is resolved in the DivResolver
and its because we resolve [$each, not $each
but this brings up a whole lot of problems:
How do you know the 'each' is supposed to be a string, so it should have quotes around its replacement?
how do you make it compare via equals in code vs === in JS?

Picked up in https://github.com/medusa-ui/medusa/commit/3aa18988dcfbf07de66ac3abf20f3d204de10f98

Picked up in https://github.com/medusa-ui/medusa/commit/3aa18988dcfbf07de66ac3abf20f3d204de10f98


Update SigmaBinary-core.netkan

oh sorry about that
:)
see, I shouldn't try to do these things :D
better leave it to the pros ;)

I always appreciate a mod author's efforts =)


    docs: explain dep handling in dev and build

New updates on head repo.
https://github.com/vitejs/vite/commit/b81e1a289f20a4ba2396f11939646407a67bbf0e

対応します


Hardware requirements - engine deployment

Before starting training, MMT checks the hardware and let's me know whether the components are sufficient. In the readme there is a rule of thumb on hardware requirements for training data size.
Is there also a similar measure for deploying an engine?  I was wondering,  if I've trained a large engine on  a powerful server,  whether I could run that engine on a smaller scale server? What engine size requires what cpu/ram performance?

Hi @mehmedes
usually you should use more or less the same hardware for training and translating, but you can save:

Disk space: during the training lot of temp files are generated that aren't needed anymore so you could use less disk space for translation.
CPUs: having more CPUs give the system a higher throughput, but if you need to contain the costs you can choose a machine with less cores.


Pyarrow.lib.ArrowInvalid

hi, I tried to deploy clip end follow the instruction of clip-retrieval/docs/laion5B_back.md
and encountered the following error, it seems to be related to pyarrow, is there any way to bypass this error? thanks！
the error :
IO_FLAG_ONDISK_SAME_DIR: updating ondisk filename from /media/nvme/prepared_index/merged_index.ivfdata to laion5B-index/image.index/merged_index.ivfdata

Traceback (most recent call last):
  File "/home/ma-user/anaconda3/envs/clip/bin/clip-retrieval", line 8, in <module>
    sys.exit(main())
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/clip_retrieval/cli.py", line 16, in main
    fire.Fire(
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/fire/core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/clip_retrieval/clip_back.py", line 968, in clip_back
    clip_resources = load_clip_indices(
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/clip_retrieval/clip_back.py", line 941, in load_clip_indices
    clip_resources[name] = load_clip_index(clip_options)
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/clip_retrieval/clip_back.py", line 895, in load_clip_index
    metadata_provider, ivf_old_to_new_mapping = load_metadata_provider(
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/clip_retrieval/clip_back.py", line 622, in load_metadata_provider
    metadata_provider = ArrowMetadataProvider(mmap_folder)
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/clip_retrieval/clip_back.py", line 601, in __init__
    [pa.ipc.RecordBatchFileReader(pa.memory_map(arrow_file, "r")).read_all() for arrow_file in arrow_files]
  File "/home/ma-user/anaconda3/envs/clip/lib/python3.9/site-packages/clip_retrieval/clip_back.py", line 601, in <listcomp>
    [pa.ipc.RecordBatchFileReader(pa.memory_map(arrow_file, "r")).read_all() for arrow_file in arrow_files]
  File "pyarrow/ipc.pxi", line 805, in pyarrow.lib._RecordBatchFileReader.read_all
  File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
  File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: flatbuffer size<PHONE_NUMBER> invalid. File offset:<PHONE_NUMBER>60, metadata length: 224

Thank you, I redownloaded one of the index files and it works fine now!


[RFR] CancelButton on Toolbar

It looks like this needs re-basing against latest code in next branch, and the two commits squashed into a single commit

Thanks for your contribution, but for usability reasons, I don't want to add a Cancel button.


Where do I edit Hugo to fix the wrong output path on Windows?

Poor front end dev here, so please be gentle :).
I'm loving Hugo so far, it seems to be just the right tool that I need for my static sites.
However, I'm pretty tired of having to write -s ...path all the time when using the Git terminal, so I was wondering if some of you guys could show me where can I edit the file that has been mentioned (changing a function name) as a hotfix.
The only thing that I have on my PC is a Hugo binary.

Hi @ivanjuras, welcome to Hugo!
You might be interested in Dan Hersam's (@jaden) excellent Hugo course on Udemy.  See this thread here:  http://discuss.gohugo.io/t/hugo-course-i-created-on-udemy/620 for the link to the course.
Get it while it is free!  (until January 31)  :-)
As you can see in the videos, we hardly ever use the -s option.  Rather, we place the hugo executable (or hugo.exe if you are on Windows) in a PATH, and we cd into the directory of your new Hugo site, and run hugo from there.  I think watching Dan's video tutorial will really help you get a sense of the workflow.

Hey @anthonyfok thanks for the fast reply and a free link, I'm sure it will help a lot.
The issue I'm having however doesn't have anything to do with my config (since I did place the hugo.exe in a PATH) because everything works just fine IF I place -s at the end of my commands.
Otherwise, whenever Hugo watches the folder, it doesn't output the site in the same folder, but rather in the directory of the binary file (which, in my case, is C:\Hugo).
As a result, I get the error "config not found.." . Not a biggie though, I just have to add the .-s flag at the end (something like hugo server -ws . ) and everything works normally.

This is the error that I'm getting (pay attention to the directory that I'm currently in):
Ivan@IVAN-LAPTOP ~/Desktop/test2
$ hugo
ERROR: 2015/01/29 Config not found... using only defaults, stuff may not work
ERROR: 2015/01/29 Unable to find Static Directory:  in C:\hugo\static/
CRITICAL: 2015/01/29 No source directory found, expecting to find it at C:\hugo\content
Ivan@IVAN-LAPTOP ~/Desktop/test2
$

Hi @ivanjuras,
Are you running hugo as hugo?  Or did you type out the full path, as in C:\Hugo\hugo.exe?  The actual reason that it is so important to put hugo.exe in a PATH is that there is a bug in Hugo v0.12 and older versions where if you run hugo like this: C:\Hugo\hugo.exe, Hugo would somehow think that your website source files reside in C:\Hugo\, and tries to look for the config.toml there, etc.
Type where hugo (inside Windows CMD.exe) or which hugo (inside a bash shell, if that is what you meant by Git terminal).  If neither command shows you where hugo.exe resides, then your hugo.exe is not on your PATH.  The PATH is not just a path; PATH is a special environment variable that tells Windows where to find your executable programs.
Please view the excellent troubleshooting video at http://gohugo.io/troubleshooting/overview/ where In that video, Dan Hersam explains this problem in details, and shows you how to solve it.  In particular, in your case, you will need to manually add C:\Hugo to your PATH, e.g. by running
set PATH=%PATH%;C:\Hugo

inside the Windows Command Shell (cmd.exe), and then where hugo should show you the full path.
Or, if you are running from within Git BASH (https://msysgit.github.io/), you are in the bash shell, where you would use export PATH=$PATH:the_path_to_your_hugo (sorry, I don't know how msys references Windows paths inside bash...)
http://stackoverflow.com/questions/9546324/adding-directory-to-path-environment-variable-in-windows
(The issue has been fixed in November 2014 for the upcoming v0.13 release.)

Ivan@IVAN-LAPTOP ~/Desktop
$ where hugo
c:\hugo\hugo.exe

Hi @ivanjuras,
Thanks for posting the exact errors you are seeing:

Ivan@IVAN-LAPTOP ~/Desktop/test2
$ hugo
ERROR: 2015/01/29 Config not found... using only defaults, stuff may not work
ERROR: 2015/01/29 Unable to find Static Directory: in C:\hugo\static/
CRITICAL: 2015/01/29 No source directory found, expecting to find it at C:\hugo\content

My guess is that this special bash shell you are running converts the `hugo` you entered into a full path, i.e. `C:\hugo\hugo.exe`, before passing it onto Windows CMD to run it.  That... hmm... I don't know the solution, unfortunately, except by upgrading to v0.13-DEV, or...

I don't know if it would work, but try this: Copy `hugo.exe` into your ~/Desktop/test2, and run it as `./hugo.exe` and see if it works or not.

For my curiosity sake, which "Git Terminal" are you using?

Perhaps the best solution at the moment is to open a Windows CMD Shell instead and run `hugo` from there.  Maybe that's why Dan Hersam in his video uses the Git BASH terminal only for `git` commands, whereas he runs `hugo` solely from the Windows CMD shell.

For reference: The underlying bug was reported in Issue #604 and fixed in Pull Request #663 by @tatsushid.

Hey, thanks, can you just tell me where do I pull that branch? Since i only have a binary file on my system.

By the way, im using Bash for Windows that comes with git

Hey, thanks, can you just tell me where do I pull that branch? Since i only have a binary file on my system.

Please follow the instruction at http://gohugo.io/overview/installing/ .  In particular, you will need to have the latest Go and Mercurial installed too.  (Bazaar seems to be no longer needed, but you may install it too if you like.)
The latest source code is in the master branch, so the go get -v github.com/spf13/hugo command as documented will fetch you the latest v0.13-DEV code.
Enjoy!

@anthonyfok You're correct. For the course I was running 0.12 and I ran into this issue. I also just checked and v0.13-DEV is working as expected. In short, @ivanjuras should be able to run Hugo inside the git bash shell with the latest dev version.

More questions? http://discuss.gohugo.io/


Dev

Coverage remained the same at 100.0% when pulling 56de93033cb6de84f7646ab0e828b44e2c8cd4f7 on dev into b4572b1859f3eef6b44f3b38d82d421e3c7ce65c on master.

Coverage remained the same at 100.0% when pulling 56de93033cb6de84f7646ab0e828b44e2c8cd4f7 on dev into b4572b1859f3eef6b44f3b38d82d421e3c7ce65c on master.


fzn-ortools: syntax error on empty list in search annotation

What version of OR-Tools and what language are you using?
Version: 9.6
Language: MiniZinc
Linux Ubuntu 22.04
What did you do?
An empty list in a search annotation can easily occur as the result of a list comprehension that depends on instance data.
$ cat /tmp/latest.mzn
solve :: int_search([], first_fail, outdomain_median, complete) satisfy;
$ minizinc --solver ortools /tmp/latest.mzn
E0429 15:54:13.057930  958943 parser_util.cc:37] Error: syntax error, unexpected ']', expecting IVALUE or SVALUE or IDENTIFIER or '[' in line no. 1
E0429 15:54:13.057996  958943 parser_util.cc:37] Error: syntax error, unexpected end of file in line no. 2
F0429 15:54:13.058008  958943 fz.cc:132] Check failed: ParseFlatzincFile(input, &model)
*** Check failure stack trace: ***
=====ERROR=====

Thanks Mats.


optimize toArray via change length to 0 directly - Avoid calling list.toArray(new X[list.size()])

Based on "Arrays of Wisdom of the Ancients" and  similar issues submitted in other projects like this one "Avoid calling list.toArray(new X[list.size()]) for performance", I would recommend jsoup also reuse this optimization since it's a library used so widely.

Thanks! Merged

Thanks man! Actually this is my first attempt to contribute to open source projects seriously. I appreciate that you use your weekend time to maintain this project. 👏

Great! Well, welcome to the OS world and I'm glad you chose Jsoup as a way to get into it.


Moment.js loses timezone information.

When a Moment object is used for ng-model instead of a Date object, the timezone information set on the moment is lost.
The code is using a moment's underlying Date object which doesn't contain any timezone information.
If supporting moment.js, I think it is important to retain timezone information or at least call out in the documentation that timezone information will be lost.
http://plnkr.co/edit/BqBS59XvZlH5KMbulTgQ?p=preview

Thanks for the bug report, this indeed seems to be a problem. Actually, there are 2 problems:

formatting the timepicker. We currently rely on formatting options from jquery-timepicker, which expects a Date object
returning a proper moment-with-timezone object when the user selects a time in the timepicker.

I think that for now we won't support moment.js with timezone information (unless someone writes a pull request: we're up for that). Ideally I'd like jquery-timepicker to support moment.js (with timezones), so that  this codebase only serves as a thin wrapper between the timepicker and Angular


Add timeouts to the s3 requests

Turns out the upstream saltstack s3 utils were not using timeouts for requests.request. This might be the source of the hard to reproduce hangs in hubble. In any case, a timeout is a good thing to define.
However, since we don't want to wait for the new version of salt containing this fix, I had to pull in the s3.py utils file. https://github.com/hubblestack/hubble/commit/8498b1588757bb6ecb0c57438fb9e380df8e99c2 shows the changes that I made from the upstream version.

Any reason why we should make the timeouts user configurable?

I can't see a reason. If it's taking more than 5 minutes there are probably worse problems.

The logging requested by @fossam is already present: https://github.com/hubblestack/hubble/blob/11c92a9faa4c9b57f68009295583ea2e2c5431a9/hubblestack/daemon.py#L139
This is ready for approval, I think.


Make :username optional configuration argument

When developing locally on Postgres and SQLite, it's common to rely on the default username and have no password, which happens when we create the database with createdb mydatabase on Postgres (on SQLite it's the norm). So, it would be convenient not to have to pass the username. It seems that the database URL generator is already handling the scenario of :username being nil.
This was extracted from https://github.com/rosenfeld/sequel_tools/pull/5.

I have no idea why it was required before. Merged, thanks.


[DO NOT MERGE] Propose refined sample format

New format based on recent discussions on sample best practices.
Format examples:

Basic - in this PR
File I/O - in this PR
LRO - googleapis/nodejs-speech#311

Notable changes

Each sample is now in its own file (lends itself well to auto-generated samples).
Added Node.js v8+ features such as spread, array destructuring, and async/await.

Adding async/await necessitated adding a wrapper function inside the sample.

The most important variables (i.e. those that can't be hardcoded and must be set by the user) are commented out at the top of the sample.
The less important variables (request options with valid default values) are inlined into the request object.
Stripped out the yargs CLI wrapper in lieu of a simple ...process.argv.slice(2) which gets passed to the main so the sample can still be invoked from the command-line.

Auto-generated samples could add back in Yargs if they want

Structure of samples

Outside region tag:

Copyright header
'use strict';

Inside region tag (everything in here is what the user sees on cloud.google.com):

(If applicable) Setup variables, e.g. if given filepath, read in the file's bytes into a variable to be added to the request object.
Import statements
Instantiate client library
async function usefulFunctionNameHere():

Construct request
1.  Includes inline comments about what the options are for
Make API call
Print interesting stuff to console, then return the response.
Handle error (print error then re-throw)

Call the usefulFunctionNameHere function, passing in the variables in 2i.

Outside region tag:

Call the wrapping main function, passing in ...process.argv.slice(2)

Notes

If proposed format is acceptable, this would serve as a template for updating all Node.js samples.
Why did I pick the two samples that I picked? One is a very basic sample, only the projectId can't be hard-coded. The second is a more complicated sample that requires a filepath (which subsequently requires the file's bytes be read into memory)

If we use this for how Node samples should look like, we need to replace ava with mocha and semistandard with prettier and eslint.

@jmdobry This has been sitting for a while. Looks like you're working on other things. Would it help if I take this over?

I updated the PR with the latest guidance from the sample working group as well as your repo's testing conventions.

It looks like the samples tests are failing :(

Note: The failing test is not related to this PR.

Canonical samples have been documented elsewhere. Thanks for review!


MH-13073 Don't split series metadata fields by ,

Series metadata fields where multiple values can be chosen were still being split by comma. This PR fixes that.

@KatrinIhler Just wondering: As the "don't separate by comma"-patches all went into r/5.x, shouldn't this go into 5.x, too?

@staubesv They did? PR #357 went into develop...

@staubesv did they? E.g. DublinCoreMetadataUtil.java seems to be the old behavior.

Oh, you were faster @KatrinIhler 😄

@KatrinIhler Oh, sorry. Let's keep develop as target then...


Bug fix - Connection failed

Closes: https://github.com/dhan-oss/DhanHQ-js/issues/13

Fixed:
https://github.com/user-attachments/assets/c3b2e15b-d079-419e-b4e7-eabae049b6e6


Add custom cop generator to the manual

Recently I created a custom cop generator.
https://github.com/pocke/custom_cops_generator
It generates a boilerplate of custom cop extension gem.
I think it is helpful for creators for a custom cop.
And I'd like to move the repository to under the rubocop-hq organization. What do you think, @rubocop-hq/rubocop-core ?
If it is ok, I'll move the repository and update this pull request to refer the moved repository.
Thanks!

I think that's a great project and we should definitely move it over to the org. Nicely done! Probably naming it rubocop-extension-generator might be more descriptive.

Yeah, I also think the repository can be moved to the rubocop-hq org because RuboCop's third party repository layout is generic. And I think automation is beneficial.

Thanks for your feedback! I'll move it, after renaming the repository. I also had a concern about the naming, but I had no idea when I created the gem.
Thank you!

I transferred the repository to https://github.com/rubocop-hq/rubocop-extension-generator, and updated this pull request.

JRuby matrix is failing. Can you rebase with latest master?

Sure! I've rebased it. Thanks.

Thanks!


[improve][pip] PIP-312: Use StateStoreProvider to manage state in Pulsar Functions endpoints

PIP: #21438

Motivation

Modifications

Verifying this change

[x] Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as (please describe tests).

org.apache.pulsar.tests.integration.functions.PulsarStateTest

And this pr enhanced the tests, cover the putstate and state cleanup cases
Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

[ ] Dependencies (add or upgrade a dependency)
[ ] The public API
[ ] The schema
[ ] The default values of configurations
[ ] The threading model
[ ] The binary protocol
[ ] The REST endpoints
[ ] The admin CLI options
[ ] The metrics
[ ] Anything that affects deployment

Documentation

[ ] doc
[ ] doc-required
[x] doc-not-needed
[ ] doc-complete

Matching PR in forked repository
PR in forked repository: https://github.com/jiangpengcheng/pulsar/pull/17

/pulsarbot rerun-failure-checks


🔷 [Epic] Dev Onboarding v0.1.0

Description
The first iteration in enhancing developer onboarding for near.org & BOS development. In this phase we will update the online IDE layout that will be required for subsequent versions of dev onboarding. Once the layout is complete we will resolve issues with the existing onboarding flow by replacing it with a temporary walkthrough via video or carousel slides.
Additionally, we should ensure that developers are able to easily find resources they need on near.org and understand the basic functionality of near.org & the IDE.

Goal

Developers new to near.org understand how to use it and where to find resources they need.
A new foundation is created that future onboarding iterations will be built on

Resources

IDE Design

### Related Issues
- [ ]  https://github.com/near/near-discovery/issues/689
- [ ] https://github.com/near/near-discovery/issues/765
- [ ] Deprecate current onboarding flow
- [ ] Create walkthrough tour (video or carousel)

@heycorwin @thisisjoshford I think we should separate the Interactive Documentation effort away from the effort to Rebuild the IDE. My hypothesis is that the former is a more effective way to improve the onboarding experience, and the IDE rebuild is something that we should not do - Rather we should ideate on another way to bridge near.org to a smooth development experience.

So adding interactive documentation into the existing IDE is your proposal, correct @charleslavon ?

Related: https://github.com/near/near-discovery/issues/765#issuecomment-1808416578

@heycorwin @thisisjoshford Hot take coming in - we should not do this. Let's partner with Justu, and plan how our onboarding flows should lead to partner tools like DevHub, VSCode, and/or Justsu, instead of spending who knows how long to rebuild this IDE

@heycorwin @thisisjoshford I think we should separate the Interactive Documentation effort away from the effort to Rebuild the IDE. My hypothesis is that the former is a more effective way to improve the onboarding experience, and the IDE rebuild is something that we should not do - Rather we should ideate on another way to bridge near.org to a smooth development experience.

I'm 100% in support of collaborating with community members like Jutsu and incorporating them into the onboarding experience. I agree that interactive documentation is a more effective way to improve the onboarding experience and the IDE redesign's main purpose was to support that.
If we decide to not update the layout of our IDE I see two options here:

Update interactive documentation designs to integrate into our existing IDE layout.
Partner with Jutsu and assist in creating interactive documentation with their platform.


Borsh

It is throwing errors for now. Trying to find the reason.
The difference between JSON and borsh serialization is 1 line of code + schema. It will be great to have this logic in NearContract in the future.

Interesting, it behaves as if it was not finding the exports of borsh... could it be because of how the borsh.js was compiled/created?

I made an attempt to  fix rollup configuration to use borsh, now import serialize/deserialize from borsh works. Now it fails for a different issue: borsh uses Buffer, but that's a nodejs API that quickjs doesn't have

Could we implement a Buffer object as a wrapper of uint8array and import it globally?

@gagdiez Cool! A good step towards success! Let me further explore on your approach

I'm able to make it compile too, by using https://github.com/feross/buffer, update cli.js to config rollup, use more gas since compiled contracts become bigger.
And mutate the status-message/node_modules/borsh/lib/index.js, add this import:
var Buffer = __importDefault(require('buffer/')).Buffer

The borsh test now fail of this error:
Smart contract panicked: cannot read property \'alloc\' of undefined\\n    at BinaryWriter (build/status-message-borsh.js:6816)\\n    at serialize (build/status-message-borsh.js:7118)\\n    at serialize (build/status-message-borsh.js:7246)\\n    at NewClass (build/status-message-borsh.js:42)\\n    at init (build/status-message-borsh.js:7263)\\n

Looking at build/status-message-borsh.js, it seems correctly included https://github.com/feross/buffer, but it still doesn't work, because feross/buffer doing this check:
	    if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {
	      Buffer = window.Buffer;
	    } else {
	      Buffer = buffer.Buffer;
	    }

And in quickjs environment window is undefined. Even if we fixed this check,  borsh-js would still fail, because feross/buffer doesn't have Buffer.prototype.alloc function. Therefore, what we need is a quickjs buffer implementation, we can start from feross/buffer, only standard ES2020 features can be used and implement at least what borsh used.

test-template is working locally, strange that it doesn't work on CI 🤔

It is failing on my machine as well.
Borsh example tests work (we need to add it to CI after merging master).
Setup should be the same in all the examples. We can achieve this by merging the master to this branch since it has only one test project now. I have tried to do it, but it led to several other problems.

It is failing on my machine as well.

Perhaps due to commonjs increase template.js size (it depends on lodash). But I still didn't figure out why it passes on my machine, even with a clean build.

Borsh example tests work (we need to add it to CI after merging master).

Good to hear. Yes.

Setup should be the same in all the examples. We can achieve this by merging the master to this branch since it has only one test project now. I have tried to do it, but it led to several other problems.

Got it. Is the problem only related to template and status-message-borsh?

Status summary: we made borsh work by a series of hacks in this PR. But enabling commonjs modules enlarge the contract size significantly. We plan to ship borsh also in esm format to resolve

Closed as completed by #361


Parse output citations & save

Parse output citations into nicely formatted text document and save as ACKNOWLEDGMENTS.md

Minimally achieved by or before https://github.com/DanNBullock/citeas-on-requirements/commit/2e6949e17d0ac5431ff6a4cbe1255f76d11eab4e
(still has a formatting issue that needs to be addressed)


Could not initialize 'dev': The specified bucket does not exist

Which Specific Feature is your question related to?
automatic deployment I guess.
I followed this tutorial for the Nth time from scratch:
https://docs.amplify.aws/start/getting-started/setup/q/integration/vue
This worked and produced a vue app I can run locally.
This tutoria ends in hosting and deploy:
https://docs.amplify.aws/start/getting-started/hosting/q/integration/vue#add-hosting-to-your-app
All this worked fine.
Then I wanted the application to my Bitbucket repo, so I went to the Amplify Console and
clicked 'Reconnect Repository'. I was not able to complete that step because it immediately
wanted to connect to Github and there was no option to connec to Bitbucket.
So went with a Amplify Get Started Backed tutorial/wizard) which allowed me to create to connect to the Bitbcuket repo.
Tested everything and I was able to push changes to Bitbucket and the build pipeline worked and everything
was deployed just fine.
I then connected that to my hosted zone romuxis.com and everything worked.
At this point I noticed that the Getting Started wizard had created a second app with the same name in Amplify, instead of fixing my app that I created with Amplify CLI.
So I deleted the first app.
And reconnected the second app to the hosted zone domain.
This worked.
I then pushed trivial change to the Bitbucket which change works locally.
And this fails at build stage, log below.
Reading through related issues I guess that there something that creates and deletes the 'dev' related bucket during the process I described above.
But I have no clue how to fix this.
The repo is here:
https://bitbucket.org/nyholkupm/romuxis/src/master/
2021-05-04T12:29:27.480Z [INFO]: Git SSH Key acquired
2021-05-04T12:29:27.556Z [INFO]: # Cloning repository: git@bitbucket.org:nyholkupm/romuxis.git
2021-05-04T12:29:27.566Z [INFO]: Agent pid 136
2021-05-04T12:29:27.591Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
2021-05-04T12:29:27.789Z [INFO]: Cloning into 'romuxis'...
2021-05-04T12:29:28.236Z [INFO]: Warning: Permanently added the RSA host key for IP address '<IP_ADDRESS>' to the list of known hosts.
2021-05-04T12:29:31.058Z [INFO]: # Switching to commit: 0f620847d0aa8b9033c3e0ddb8381aca56c8b365
2021-05-04T12:29:31.148Z [INFO]: Agent pid 149
2021-05-04T12:29:31.151Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
2021-05-04T12:29:31.158Z [INFO]: Note: switching to '0f620847d0aa8b9033c3e0ddb8381aca56c8b365'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
2021-05-04T12:29:31.158Z [INFO]: HEAD is now at 0f62084 No More Nice Guy
2021-05-04T12:29:31.163Z [INFO]: Successfully cleaned up Git credentials
2021-05-04T12:29:31.164Z [INFO]: # Checking for Git submodules at: /codebuild/output/src403665039/src/romuxis/.gitmodules
2021-05-04T12:29:31.187Z [INFO]: # Retrieving cache...
2021-05-04T12:29:34.199Z [INFO]: # Extracting cache...
2021-05-04T12:29:37.892Z [INFO]: # Extraction completed
2021-05-04T12:29:38.012Z [INFO]: # Retrieving environment cache...
2021-05-04T12:29:38.091Z [INFO]: # Retrieved environment cache
2021-05-04T12:29:38.092Z [INFO]: # Ensuring NPM package '@aws-amplify/cli' is version: 'latest'
2021-05-04T12:29:43.144Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 4.29.4 to 4.50.2...
2021-05-04T12:30:40.030Z [INFO]: # Done patching NPM package '@aws-amplify/cli'
2021-05-04T12:30:45.593Z [INFO]: ## Starting Backend Build
# Starting phase: build
# Executing command: amplifyPush --simple
2021-05-04T12:30:47.949Z [INFO]: Note: It is recommended to run this command from the root of your app directory
2021-05-04T12:30:55.559Z [WARNING]: - Initializing your environment: dev
2021-05-04T12:30:55.612Z [INFO]: Could not initialize 'dev': The specified bucket does not exist
2021-05-04T12:30:55.632Z [ERROR]: !!! Build failed
2021-05-04T12:30:55.632Z [ERROR]: !!! Non-Zero Exit Code detected
2021-05-04T12:30:55.632Z [INFO]: # Starting environment caching...
2021-05-04T12:30:55.632Z [INFO]: # Uploading environment cache artifact...
2021-05-04T12:30:55.694Z [INFO]: # Environment caching completed
Terminating logging...

Ping!

Hello, please let us know if you are still running into this issue.


New version: SoftDeluxe.FreeDownloadManager version <IP_ADDRESS>39

Pull request has been created with komac v2.1.0 :rocket:
Microsoft Reviewers: Open in CodeFlow

@wingetbot run


(Question) Check for connection

Hi.
I'm in the situation I've started a connection; then I turn off X-Plane and turn it back on.
The program still thinks it is connected but in fact it is not, and I don't see any method to check it and try reconnecting.
Thanks in advance!

Thank you for your feedback.
Indeed the connector is not checking for the connection status.
I'll add it in the next version.


Postpone dtype deprecation

Please describe your wishes and possible alternatives to achieve the desired result.
As v0.8 has been recommending to use dtype in the constructor (FutureWarning: X.dtype being converted to np.float32 from int64. In the next version of anndata (0.9) conversion will not be automatic. Pass dtype explicitly to avoid this warning. Pass AnnData(X, dtype=X.dtype, ...) to get the future behavour.), it might make the process a bit more gentle if the breaking changes associated with constructor arguments deprecation (https://github.com/scverse/anndata/pull/1126) can be postponed to a later release.

I would be up for this. I think having at least 2 feature releases/ or a year between deprecating a breaking change and making it is reasonable. It's only been 6 months since 0.9.
I will leave this open for a little more feedback, but am leaning towards postponing at the moment.


Failed building JavaScript bundle - iOS

Description
I am attempting to run an app from a react native tutorial which worked fine in the past, but now is failing to load in my Expo app.
Expected Behavior
I did npm start in my terminal application, and following, I launched Expo and attempted to load the app in the Expo environment.  I expected to see the demo text from the app as I have on previous occasions.
Observed Behavior
The Expo app on my iOS device displayed SyntaxError: Unterminated JSX contents (12:9).  The error displayed in my terminal is "Failed building JavaScript bundle"
Environment
Please run these commands in the project folder and fill in their results:

npm ls react-native-scripts<EMAIL_ADDRESS>/Users/safespace53078/Sites/React Native/tipcalc
└──<EMAIL_ADDRESS>npm ls react-native<EMAIL_ADDRESS>/Users/safespace53078/Sites/React Native/tipcalc
└──<EMAIL_ADDRESS>npm ls expo<EMAIL_ADDRESS>/Users/safespace53078/Sites/React Native/tipcalc
└─┬<EMAIL_ADDRESS>└── UNMET PEER DEPENDENCY<EMAIL_ADDRESS>
npm ERR! peer dep missing<EMAIL_ADDRESS>required by<EMAIL_ADDRESS>npm ERR! peer dep missing<EMAIL_ADDRESS>required by<EMAIL_ADDRESS>
node -v: v6.11.2
npm -v: 3.10.10
yarn --version: yarn: command not found
watchman version: watchman: command not found

Also specify:

Operating system: Mac OS 10.12
Phone/emulator/simulator & version: iPhone 7 iOS 10.2

Reproducible Demo
from within the folder with the react native app:
npm start
Launch Expo on iPhone
access appropriate application within Expo

The Expo app on my iOS device displayed SyntaxError: Unterminated JSX contents (12:9). The error displayed in my terminal is "Failed building JavaScript bundle"

Seems to imply that you have some syntax mistakes in your code somewhere, maybe you forgot to close some jsx?


Upgrade to VS2017

Here is the patch that was used when making https://www.nuget.org/packages/uno-base-vc141-static-x64/

Since this PR is part of https://github.com/fuse-open/uno/pull/62 (closed), I'll merge it now.


Question: porting Ruby language (and publishing it on GitHub)

I would like to port PythonDataScienceHandbook to Ruby programming language (at the first in Japanese for the text).
At the moment the Ruby datascience environment is immature and can not be a complete port, but I would like to borrow the dataset and the text outline.
Is this attempt contrary to your PythonDataScienceHandbook license terms?

Any translation or derived work would have to go through OReilly. Let me know if you'd like me to get you in touch with the right person.

Thank you for your reply.
I know the OReilly (Japanese) person for this.
I will send an e-mail to the person.

FYI, I received an E-mail from O'Reilly Japan that this attempt is unacceptable.


Add dim-merge-commits feature

This would solve the "noise" concern mentioned in #2768
It would have to use a combined GraphQL query to determine which commits on the current page are merge commits, and then just apply opacity: 0.6 on their whole line. Or something like that.
"Combined GraphQL query" example: https://github.com/sindresorhus/refined-github/pull/2795/files#diff-04c19a6c246911e079b45f999eab501cR14-R22
Test URL
https://github.com/babel/babel/commits/master?after=ddd40bf5c7ad8565fc990f26142f85613958a329+104
Originally posted by @fregante in https://github.com/sindresorhus/refined-github/issues/2768#issuecomment-590036267

So bringing back https://github.com/sindresorhus/refined-github/issues/1988? Sounds good!

@sindresorhus we only dropped it, since github removed the class to be able to check that it was there.

@sindresorhus exactly! Except now it requires an API request for every isCommitList page load

@fregante wouldn't it be the same as add-tags-to-comits
I started looking into the code and then I realized your going to want to save each summit to storage.
Just curious are we not already that we can use it for both things?

That feature is too complex and I don’t want a copy of it. If anything we should drop/simplify the caching from it.

@fregante do you have any idea how we can figure out if its a merge commit. I tried all ways I cant figure out a normal way.

I think only merge commits have 2 parent commits

@fregante Im working on it


Provide helpful errors on JSON.parse exception

The normal exception that JSON.parse throws is not very helpful. So if we tried to open an invalid package.json, you won't know which file caused the exception and why the parse failed.
This commit extends the exception message with the file name that we tried to load and clues to the location of the error in the JSON (using the same module that npm uses, called json-parse-helpfulerror). The performance should pretty much be the same, since it first tries to use JSON.parse and only if it throws, it analyzes the cause.

I can recommend using https://github.com/Raynos/safe-json-parse as it was written for this exact use case; think it will lead to cleaner code.

safe-json-parse prevents parse from throwing. That's not what this PR does.
The point of this PR is to make parse errors more meaningful, which is important for closest-package consumers (e.g. npm-check-updates).
But thanks for the tip :)


Error when importing CJS plugin into vite.config.js when project is ESM.

Describe the bug
Note: This is similar to https://github.com/vitejs/vite/issues/3024, but that issue is about imports within application code, not imports within Vite's config file. I believe this issue to be different, as it is being governed by the transforms being done in loadConfigFromFile.

When importing a cjs plugin (E.g. vite-plugin-checker) with a default export into a esm project ("type": "module")'s vite.config.js file, the import instead looks as if I did import * as checker from ... rather than import checker from .... See logs below, and debugger screenshot:

As an attempted workaround, using import * as checker and then consuming the plugin as checker.default does not work either.
Reproduction
package.json
{
  "name": "vite-cjs-default-bug",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "vite build --mode prod"
  },
  "dependencies": {
    "vue": "2.6.12"
  },
  "devDependencies": {
    "typescript": "4.4.4",
    "vite": "2.6.14",
    "vite-plugin-checker": "0.3.4",
    "vite-plugin-vue2": "1.9.0",
    "vue-template-compiler": "2.6.12"
  }
}

vite.config.js
import { defineConfig } from "vite";
import { createVuePlugin } from "vite-plugin-vue2";
import checker from "vite-plugin-checker";

export default defineConfig(async ({ command, mode }) => {
  return {
    plugins: [
      createVuePlugin(),
      checker({ typescript: true }),
    ],
  };
});

System Info
System:
    OS: Windows 10 10.0.19043
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
    Memory: 12.62 GB / 31.94 GB
  Binaries:
    Node: 14.18.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 95.0.4638.69
    Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.53)
    Internet Explorer: 11.0.19041.1202
  npmPackages:
    vite: 2.6.14 => 2.6.14

Used Package Manager
npm
Logs
PS C:\src\vite-no-import-cjs-default> npx vite build --debug
  vite:config native esm config loaded in 268.36ms URL {
  href: 'file:///C:/src/vite-no-import-cjs-default/vite.config.js',
  origin: 'null',
  protocol: 'file:',
  username: '',
  password: '',
  host: '',
  hostname: '',
  port: '',
  pathname: '/C:/src/vite-no-import-cjs-default/vite.config.js',
  search: '',
  searchParams: URLSearchParams {},
  hash: ''
} +0ms
failed to load config from C:\src\vite-no-import-cjs-default\vite.config.js
error during build:
TypeError: checker is not a function
    at file:///C:/src/vite-no-import-cjs-default/vite.config.js?t=1637015450618:9:7
    at loadConfigFromFile (C:\src\vite-no-import-cjs-default\node_modules\vite\dist\node\chunks\dep-e0fe87f8.js:68644:15)
    at async resolveConfig (C:\src\vite-no-import-cjs-default\node_modules\vite\dist\node\chunks\dep-e0fe87f8.js:68188:28)
    at async doBuild (C:\src\vite-no-import-cjs-default\node_modules\vite\dist\node\chunks\dep-e0fe87f8.js:42986:20)
    at async build (C:\src\vite-no-import-cjs-default\node_modules\vite\dist\node\chunks\dep-e0fe87f8.js:42974:16)
    at async CAC.<anonymous> (C:\src\vite-no-import-cjs-default\node_modules\vite\dist\node\cli.js:737:9)

Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Tried upgrading to node v16.13.0, but the problem persisted.

This is often an issue with how the plugin is bundled. They're exporting the Vite plugin in default with a __esModule hint that are recognized by bundlers to emulate default import. However node's resolution doesn't do this hence the awkward syntax. I'd recommend opening an issue in the plugin repo instead unless Vite decides to always bundle the config file, like #5779.

At now,there are some ways that maybe resolve this problem!
first:
import pkg from "vite-plugin-checker";
const checker = (pkg as any).default || pkg;

second:
Change the plugin,use default export as module.exports
//entry of vite-plugin-checker
module.exports = function checker(){
...
}
//not use as this
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = function checker(){
...
}

Third:
Change the plugin to esm! Set its package.json type = "module"
//entry of vite-plugin-checker
export default function checker(){
...
}

At last you can also change the current project as commonjs----remove  type = "module".
That's all,I hope vite can fix it,because rollup doesn't have this problem.That means if a plugin can be used in rollup,it can't be used in vite as usual.

As an attempted workaround, using import * as checker and then consuming the plugin as checker.default does not work either.

Per @cx690 first solution, import checker from "vite-plugin-checker" and checker.default({ typescript: true }) works.

Unfortunately, these workarounds require abandoning type safety when using a vite.config.ts. This is especially problematic for plugins with lots of options where its very valuable to have intellisense to discover its options.

Closing as this is an issue in userland. We should fix the plugin instead so it's compatible with node's spec.


Infinite loop when called on a Sequelize object

In https://github.com/visionmedia/superagent/commit/2e5d6fdbe026c1934c0a0fbe2ec933a13b60af1a the Superagent library changed from using JSON.stringify to using fast-safe-stringify for it's default object serializer when sending JSON data.
We use Sequelize for our ORM. Sequelize uses their own custom object structure, which supports a .toJSON call.
When Superagent was using JSON.stringify, that called the .toJSON method on our Sequelize objects, properly converting them to JSON. However, with the change to fast-safe-stringify, .toJSON is no longer called, even if it exists.
I'm not sure how to provide a copy of the object in question since getting its JSON representation is unlikely to be helpful, since all the Sequelize specifics are stripped from that.
Is there a reason this library does not call .toJSON if it exists?

Note: the infinite loop we are experiencing does not result in a stack overflow or other sort of error. Rather, it seems the algorithm is just stuck, spinning forever (our server's CPU usage went from <1% to 100% basically immediately, though memory was seemingly not impacted).

  const fixture = {
    x: {
      name: 'a',
      toJSON() {
        return {name: 'b'}
      }
    }
  }
  console.log(fss(fixture))

will output: {"x":{"name":"b"}}
so it looks like toJSON is called in the main case, perhaps you've hit an edge case?
Can you please provide a reproducible case?

It's proving very difficult for me to replicate the error outside of our environment since we cannot easily port over the Sequelize instance object. I'll keep working on it and try to get you a working example soon. Thanks for the response.

@MatthewHerbst could you inspect the output with util.inspect()? It might be possible to see something there that would help debugging this.
It sounds like the toJSON return value is circular and that does not work with this implementation. The toJSON value would be replaced with '[Circular]' before passing it to JSON.stringify and then set back to the original value. That way it would not be called. It should work properly with https://github.com/BridgeAR/safe-stable-stringify.

I also met similar error. It's not infinite loop, but just very long computation (it could be minutes). We were using regular version of fast-safe-stringify, not stable version, so it had no code to call toJSON.
That long computation was caused by huge buffers, that could be inside Sequelize instance (could be several connections with read/write buffers).
For instance, it was millions of decirc calls.

ok that's a very interesting case. decirc doesn't even need to traverse buffer objects (at least not the indices). @markablov are you able provide a test for this? if so I'll prioritize this

@davidmarkclements sure.
Code to reproduce:
'use strict';

const Sequelize = require('sequelize');
const stringify = require('fast-safe-stringify');

const db = new Sequelize(
  'sequelize_test',
  'postgres',
  '1',
  {
    host: 'localhost',
    dialect: 'postgres',
    logging: false,
    operatorsAliases: false
  }
);

const users = db.define('users', {
  id: {
    type: Sequelize.INTEGER,
    autoIncrement: true,
    primaryKey: true
  }
}, { tableName: 'users', timestamps: false });

async function test() {
  const user = await users.findOne({ where: { id: 14 } });
  stringify(user);
}

test()
  .catch(err => console.log('ERROR', err))
  .then(() => console.log('DONE!'))
  .then(() => db.close());

I also have added logging for traverse:
function decirc (val, k, stack, parent) {
  console.log(' '.repeat(stack.length) + '> ' + k);

Sample log is attached.
traversedProps.txt
buffer props are real Buffer objects:
user._modelOptions.sequelize.connectionManager.pool._availableObjects._list.head.data.obj.connection.writer.buffer instanceof Buffer === true

Fwiw I just got hit by this using pino, which uses fast-safe-stringify as a fallback for anytime JSON.stringify fails (i.e. on circular data structures).
Normally everything is fine, but on sufficiently large/complex data structures (which JSON.stringify immediately detected as circular), fast-safe-stringify pegged the CPU and seemed locked up (a Chrome cpu profile shows decirc recursively calling itself basically forever).
I tried a few times to divine what "sufficiently large/complex" meant, but wasn't able to reproduce it outside of the production case (which does reproduce 100% of the time).

This would be a large breaking change, but I generally wonder if an "actually safe" approach would be to stop at any value that was not: a) a primitive, b) an object literal (per is-plain-object) or c) has a toJSON method.
Granted, the built-in JSON.stringify behavior does not stop on "this is an object with a custom prototype that does not implement toJSON", but perhaps that is what the "safe" in this project's fast-safe-stringify could denote, i.e. less you're not going to get 100% the same behavior as JSON.stringify, but that's the point, this behavior is safer.

Isn't that what we do already? The main meaning of "safe" is circular refs are handled

I mean "safe" can mean whatever we/you want it to mean :-).
I understand that currently "safe" means handles "circular refs", but I'm musing "safe" could also mean "do not stringify non-class/non-toJSON/non-primitive values" (i.e. things like class ConnectionPool or class OrmInternalImplementationDetail that don't generally expect to be put on-the-wire).
Primarily/selfishly I'm proposing this because I think it would very likely avoid the degenerate "stringify thousands of things in something that really looks like an infinite loop" behavior that Mark and I somehow triggered.
And granted, it's a large behavior change, mostly useful for this pino/logging case of "the application programmer put something in a log statement that they didn't mean to super-recursively put everything 'on the wire' to stdout", so probably needs to be addressed upstream in pino.

@davidmarkclements sure.
Code to reproduce:
'use strict';

const Sequelize = require('sequelize');
const stringify = require('fast-safe-stringify');

const db = new Sequelize(
  'sequelize_test',
  'postgres',
  '1',
  {
    host: 'localhost',
    dialect: 'postgres',
    logging: false,
    operatorsAliases: false
  }
);

const users = db.define('users', {
  id: {
    type: Sequelize.INTEGER,
    autoIncrement: true,
    primaryKey: true
  }
}, { tableName: 'users', timestamps: false });

async function test() {
  const user = await users.findOne({ where: { id: 1 } });
  stringify(user);
}

test()
  .catch(err => console.log('ERROR', err))
  .then(() => console.log('DONE!'))
  .then(() => db.close());

I also have added logging for traverse:
function decirc (val, k, stack, parent) {
  console.log(' '.repeat(stack.length) + '> ' + k);

Sample log is attached.
traversedProps.txt
buffer props are real Buffer objects:
user._modelOptions.sequelize.connectionManager.pool._availableObjects._list.head.data.obj.connection.writer.buffer instanceof Buffer === true

I've tried to reproduce but you have data in a table that you haven't provided, and since the object being serialized is based on the data returned from seqeulize, how can I reproduce without that data?
I'm eager to solve this, if any one can provide a reproducible case I'll look into it. Preferably, the reproducible case should not involve databases, or third-party deps if possible.

@davidmarkclements yeah understood on needing an easy repro. Fwiw I'm setting breakpoints locally and wondering if its not really a bug, but the algorithm being something like N^2 or something.
Right now my arr array (the top-level global) has ~1400 elements in it, and the stack has ~203 elements in it.
I don't have a ton of stack frames on the stack, maybe few hundred:

And it's not recursing truly infinitely b/c that would eventually blow the stack. It seems to be chugging away, just very inefficiently. Will keep poking at it.

Okay, I need to move on for now, but here is where I got in debugging:

I set a conditional breakpoint for when the stack hits 100 length. A few highlights from the image:

The 6th stack entry, Array(407) is the 407 domain objects I'm saving to the database
The 7th stack entry, StageDefinition is one of our domain objects
The 8th stack entry is StageDefinition's collection pointing to N UnitDefinition domain objects
The 9th stack entry is the array of those 7 UnitDefinition objects
...repeat this pattern fro the UnitDefinition having N ActivityDefinitions having N TaskDefinitions having N TaskDefinitionPredecessor dependencies.

 Obviously they become individuals rows in the database, but while in memory our ORM basically graph-izes all the references (intelligently/lazily/no+N+1-ily) so we can easily do things like critical path calculation, which is essentially walking a graph.)
As I continue looking down the stack entries, everything "looks right", decirc is just continually finding "oh I haven't seen that yet" references...although they are really all part of that original Array(407), each one just hasn't been marked/added to the stack proper yet (i.e. as an explicit element that we know about-but-have-not-visited yet) because we're not 'done' with each one).
I.e. even though the 6th stack entry of Array(407) has all of the instances as implicitly "already seen but not processed", we process the 1st one (...and find 406 others), then do the 2nd one (...and find 405 others), then do the 3rd one (...and find 403 others), where each of these "...and find XXX others" is not actually linear, but itself recursing through "seen but not yet processed" values.
So, could we somehow pre-tell decirc "yes we know about all 407 of these, we are getting to them, but don't recurse into them if you find them again".
...i.e. here:
    if (Array.isArray(val)) {
      for (i = 0; i < val.length; i++) {
        // put all the vals in stack first, before recursing
        decirc(val[i], i, stack, val)
      }
    } else {

Put every element in val directly on the stack before calling decirc because otherwise the current "pre-recursion before we put val[i] in the stack" is going to not realize we already know about the other N values in val.
Basically some differentiation of nodes between "has seen and not yet visited/processed" (not currently in the code AFAIU) and "has finished visiting/actually processed" (an entry in stack AFAIU).
I am not an algorithms expert, but I vaguely recall seeing this distinction in graph traversal algorithms last time I was studying for interviews. :-P :-)
Perhaps the code is already doing this and I'm just missing it. Not sure.
Also fwiw I tried to re-create our graph with just a bunch of in-memory nodes with like 2-levels of 100 "parents" and 5 children-per-parent and failed. I think the input really does need to be pathologically circular, which is hard to create by hand (the graph I'm using is an actual one from production, hence the inherent size/complexity). I can try to synthesize also pathological input here & there/as I get time.
(Also, just to be clear, we never wanted fast-safe-stringify to actually output a sane value for this data structure/graph, it just happened to leak into a logger.error({ err: ... }, ...) without really meaning to, and then tada our CPU is pegged and the app is dead. We've since implemented toJSON on our entities and EntityManager to stop this from happening, but I followed up here as an extra/future precaution + FYI.)
...ah yeah, so this is really ugly, but just doing:
      if (stack[i] === val || (Array.isArray(stack[i]) && stack[i].includes(val))) {

Stopped the pathological behavior. I have no idea is the resulting behavior is correct (i.e. I didn't expect the output and it could be doing 'wrong things'), just that it stops the "not technically infinite but just a lot of it recursion" into the things-seen-but-not-yet-processed.
Hopefully that is helpful...

@mcollina Is this solved by the fixes in 2.1.0 and 2.1.1?

I don't know and I don't have time to test. I think so.


Behavior should be the same when ?api-version is missing, as when it is incorrect.

Setup:
I have an InfoController that looks like this:
using System;
using System.Security.Cryptography;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Api.ContractsV1;

namespace Api.Controllers {
    [ApiVersion("1.0")]
    [Route("/info")]
    public class InfoController {
        public InfoController(){}

        [HttpGet()]
        public InfoContract Index() {
            return new InfoContract{
                Hostname = Environment.MachineName,
            };
        }
    }
}

Here's observed queries, through nginx:
<IP_ADDRESS> - - [25/Nov/2016:21:08:16 +0000] "GET /info HTTP/1.1" 404 0 "-" "curl/7.51.0"
<IP_ADDRESS> - - [25/Nov/2016:21:09:04 +0000] "GET /info?api-version=1.0 HTTP/1.1" 200 31 "-" "curl/7.51.0"
<IP_ADDRESS> - - [25/Nov/2016:21:09:07 +0000] "GET /info?api-version=2.0 HTTP/1.1" 400 192 "-" "curl/7.51.0"

The behavior for missing api-version query parameter should be the same as if a bad version is specified. I expected the first to result in a 400 as well, rather than  404.

Once you opt into API versioning, all API routes are explicitly versioned.  This means a client cannot request a resource without explicitly providing an API version. This is why you receive a 404 when no version is specified. Unless you have existing services that didn't require versioning, I always recommend that explicit versioning be specified by clients. That provides the most reliable behavior for clients (IMHO).
In order to make your scenario work, you need to allow matching a default API version when a client doesn't specify anything.  This is achieved in the setup with:
service.AddApiVersioning( options => options.AssumeDefaultVersionWhenUnspecified = true );

The choice of the default version can also be configured and is up to you. The default configured value is 1.0. There are several topics in the wiki that can guide you through some of these more advanced behaviors.  I hope that helps.

I understand that. I want the api-version to be required. But returning a 404 when it's absent is inconsistent, and per my last reading of the doc, not in alignment with the MS Rest API Guidelines.

Well, the doc I read was fairly different and had a lot more verbiage about specific versioning behavior. Not sure if the internal one is significantly different or if it's evolved that much since I read it last.
Anyway, when I'd implemented something like this internally, we failed requests missing the header/query-param as 400s as well. I prefer that behavior. It seems more semantically consistent and less confusing to callers.

Ah ... I see.  You may be right.  Getting the behavior right for could match and could never match is tricky. In retrospect, I believe this should be 400 since it's possible to match the route, but no route is matched. The cause in this case is that the client didn't provide a version. Basically, it should be the same behavior as specifying 2.0, which is also possible, but is unmatched because there's no such implemented version.
I'll investigate further and promote this to bug after I've triaged it.

Confirmed. This is a bug. It's a little surprising that I missed such an obvious case, but so is the way of software. I'm tracking the issue with a detailed explanation in #62. I should have the fix published soon.  Thanks for reporting this.


Google Axis Registry Italic Axis should be precision 0

Today in the italic.textproto#L7 we have a precision of -1 which allows 11 values, 0.0 through 0.5 to 1.0.
https://github.com/googlefonts/axisregistry/blob/636d70a3783eba649a3f5a181a1fa77afc4b2aab/Lib/axisregistry/data/italic.textproto#L7
However, we have avoided any TTFs with an ital axis in fvar, and package families with 2 TTFs, roman and italic, as if they have an ital axis that is binary 0..1.
I don't know how the current GF Catalog Front End App is coded, but the Type Tester appears to have only a switch control for the italic "axis" which is really toggling between the 2 TTFs.
Therefore we should probably tighten up the axis definition to be clear that we prefer a slnt axis instead of ital when there are intermediate steps between the Roman and Slanted+Cursive styles.

https://twitter.com/_justinpenner/status/1563201894042189824?t=73EIztJfuF6LZXggNtHSnQ&s=19 is a tutorial on how to make continuous range italic axes

Done in #82


add: website analytics: swetrix.com

Added swetrix.com to the website analytics category - an opensource selfhostable privacy respecting analytics platform.

@Blaumaus, thanks for your PR!
Merging

@Blaumaus
Apologies, I reverted this PR, because Swetrix does not me the criteria yet - we add only repos with 100+ stars
I will open as issue for Swetrix, so I remember to add it than repo reaches 100 stars


Waypoint: Finding a Remainder in JavaScript -

In the results area, the variable C shows up as a string (c = '19') instead of an integer.

The only variable in Waypoint: Finding a Remainder is JavaScript is remainder. Are you sure that's the challenge you are seeing this issue on?

Sorry, it's the Assignment with Plus Equals Waypoint. The Assignment with Minus Equals has the same issue.

Can confirm there is an issue in the display function for these challenges.

I can confirm too.


Add automatic CI builder

This means we no longer have to run prepare-release manually, it will be performed by CI automatically if changes are made to source files

LGTM.