MB-8476 Wire up the Customer save button for uploading amended orders

Description
GIVEN a customer has received updated orders
WHEN uploading updated documentation for their new orders
THEN the customer has a save button to click after uploading
AND THEN receives a success message or an error message.
A note that the functionality to upload amended orders is still being worked on in #6908. Thus, in order to test this, you'll have to use the devseed data we set up (see setup).
For the backend, we added a new endpoint similar to the other ones that change the move's status. We also updated the move router service to account for the new statuses that the move can be in when it's being moved to a different status. We have DB saving at the handler level because it seems this service object doesn't have it and other handlers in this file also seem to handle their own saving.
For the frontend, the save button now hooks up to the new endpoint. Tests are added to ensure that the save and cancel work as expected.
Reviewer Notes
Please confirm that the move_router_tests have been written accurately.
The frontend does not currently handle the uploading of documents
Setup

Run server, customer client, and office client (you'll have to say yes to this one using a different port than the default).
make server_run

make client_run

make office_client_run

Log in as a service member<EMAIL_ADDRESS>(milmove))

On the home page, click on "Upload documents"

Click Save. There should be two documents uploaded already, and you won't be able to upload more as that's a WIP in another PR (#6908).

Log in as a TOO. You should see the move as one that needs approval again.

Code Review Verification Steps

[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change

Messages

:book:
:link: MB-8476

  Generated by :no_entry_sign: dangerJS against a8fc44ba650ae89ea29e7d4748e5552849ee942f

When I tried to upload an amended order with the<EMAIL_ADDRESS>account, the list does not update and when I click Save I am getting orders.uploadAmendedOrders failed: Error: Required parameter ordersId is not provided

Thanks for testing it out. I actually just updated the description for the PR because uploading amended orders isn't functional yet. Our pr is more for once you do have them, you can click submit and it gets routed correctly.
As for the error on save, it's working for me, I wonder if it gets into a weird state when you try uploading orders and then saving.

I suspect that there might be an issue with the way the devseed data is set up because the table should be showing just the file name and not the full path. I don't know if that has to do with this PR or is a pre-existing issue with test fixtures. I'm pretty sure this only affects the test data and not the actual functionality though, so not super worried about it.

looks like the uploads table is getting filled inconsistently:

also the table breaking for long filenames is 100% my fault. I'll file a bug for it.


Only path parameters to be in upperCamelCase

When mount-name is a path parameter it will be in upperCamelCase
in schemas the "-" shall remain, this applies to requestBodies and responses

e.g. see (wrong) naming in response:

naming in related schema:

Another example found by Jan:
/v1/provide-list-of-device-interfaces has the "mount-name" in the requestBody:

However, when "mount-name" is used in the requestBody an issue is shown:

It works only with "mountName":

Closed with #751


Improve Help Text in Sidebar

As it stands, the Help Sidebar is static and creates more confusion.
Additionally, the progress bar is unclear.
How many Badges am I making? You're defining the Badge, not issuing any
How do I send Badges? You can do that after you create an Org and Badge class
Can I revoke Badges?
What is Account Bound?
Can I add Delegates later?
Can I edit these descriptions or are they permanent?

The new version of the HelpSidebar has been designed and is part of v5. The design has been caught up to v8 (supporting the current contract). The button will magically squoosh into the action header, and the vertical line will appear when it is open. Claiming back the screen's real estate for the users that do not need help.


Upgrade to Scala 2.12.11

Supersedes https://github.com/lihaoyi/Ammonite/pull/1041.

@lihaoyi It seems there are gpg-related errors on the CI during publishing:
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
1 targets failed
publishSonatype ammonite.ops.InteractiveShelloutException
    ammonite.ops.Shellout$.executeInteractive(Shellout.scala:56)
    ammonite.ops.Shellout$.$anonfun$$percent$1(Shellout.scala:14)
    ammonite.ops.Shellout$.$anonfun$$percent$1$adapted(Shellout.scala:14)
    ammonite.ops.Command.applyDynamic(Shellout.scala:118)
    ammonite.$file.build.$anonfun$publishSonatype$4(build.sc:690)
    scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)

Did anything change around gpg or its settings recently?

@alexarchambault I think I rotated my GPG key some time ago (lost the original in an unfortunate rm -rf accident), I can try putting the new one into travis CI

This must have been months ago though, did it start failing recently?

This one was fine on the 2020/01/14. This one on the 2020/03/24 isn't.
It seems no master build went up to the release jobs between those.

@alexarchambault I tried updated the SONATYPE_PGP_KEY_CONTENTS with the output of gpg --armor --export-secret-keys on my local machine; could you kick off another build and see if it works?

I think SONATYPE_PGP_PASSWORD should be unchanged, and as far as I can tell SONATYPE_PGP_PUB_KEY_CONTENTS isn't used anywhere

@lihaoyi Seems it's still failing.
You may want to try with the GPG / Travis settings instructions of @olafurpg's sbt-ci-release, up to the creation of the SONATYPE_USERNAME / SONATYPE_PASSWORD, PGP_PASSPHRASE / PGP_SECRET settings on Travis CI. These are independent of sbt, and plenty of people have been following them fine. I used to publish with mill in this repository based on that. Running these commands from Travis CI to publish with mill worked for me.


ERR: Add a missing common reason string

There was no string present for ERR_R_PASSED_INVALID_ARGUMENT

This addition is incomplete and meanwhile superseded by the improved #17056.

This addition is incomplete and meanwhile superseded by the improved #17056.

Before closing, I want to double check the state of 1.1.1, which this PR targets as well

This pull request is ready to merge

Pushed to 1.1.1 - thanks @levitte


Update outdated dependencies

the project's moved on a bit since this was done. it needs looking at again i think. i'll close this for now.

Fair enough, you can delete the branch too if you like


df_to_anndata logical XOR to OR, issue #422

Description of changes
Changed logical XOR to OR, so the binary columns are not excluded when assigning numerical columns.
Are there any other edge cases? I can't think of anything else right now.

One of the tests is failing. Can we also cover what @Imipenem discovered with a super small test?


refactor hack scripts for common usage in extensions

What this PR does / why we need it:
Refactor hack scripts for usage in extensions via vendoring.

local image vector override
common helper
build-ld flags

Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
See usage in extensions here.
Release note:

Can you also add a release note for developers?


Fixing hit area for card menu

Addressing an issue where the hovered state of the card menu trigger was not accurately reflecting the click target visually.
Recording:


github-community-guidelines.md

Yusuf010191

Why:

What's being changed:

Check off the following:

[x] All of the tests are passing.
[x] I have reviewed my changes in staging.
[x] For content changes, I have reviewed the localization checklist
[x] For content changes, I have reviewed the Content style guide for GitHub Docs.

@Yusuf010191


Tolerations not applied to pods

K8s version: 1.17
spark-operator: v1beta2-1.2.0-3.0.0
example adding a Toleration and NodeSelector:
apiVersion: "sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:
  name: spark-pi-example
  namespace: spark-jobs
spec:
  type: Scala
  mode: cluster
  image: "gcr.io/spark-operator/spark:v3.0.0"
  imagePullPolicy: Always
  mainClass: org.apache.spark.examples.SparkPi
  mainApplicationFile: "local:///opt/spark/examples/jars/spark-examples_2.12-3.0.0.jar"
  sparkVersion: "3.0.0"
  restartPolicy:
    type: Never
  volumes:
    - name: "test-volume"
      hostPath:
        path: "/tmp"
        type: Directory
  tolerations:
  - key: node-restriction.kubernetes.io/workloads
    operator: "Equal"
    value: "spark"
    effect: "NoSchedule"
  nodeSelector:
    node.kubernetes.io/instancegroup: spark
  driver:
    cores: 1
    coreLimit: "1200m"
    memory: "512m"
    labels:
      version: 3.0.0
    serviceAccount: sparkoperator-spark
    volumeMounts:
      - name: "test-volume"
        mountPath: "/tmp"
  executor:
    cores: 1
    instances: 1
    memory: "512m"
    labels:
      version: 3.0.0
    volumeMounts:
      - name: "test-volume"
        mountPath: "/tmp"

NodeSelector works, but the pod is not provisioned with tolerations requested in spec.
Only the default tolerations show up.

Ah, sorry. I was confused by docs.
https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/de0bdf1275e77b6d053d408c045c427aa94a42ab/docs/user-guide.md#using-tolerations seems to be up to date.
while there is some documentation under API that reads:
(Optional)

Tolerations specifies the tolerations listed in “.spec.tolerations” to be applied to the pod.

hi @sepulworld could you share an example related to this? Thanks in advance.


General improvements, bug fixes and compact

changed modid to entity-pickup
fixed logger having a hyphen
added a config
merged villager and piglin pickup
fixed issue with mixin package and compiling
fixed issue with description being example
fixed issue with being able to put piglins in spawners with piglin pickup
added a message to say you cant put spawn eggs in spawners
added a sound when you try to put a spawn egg into a spawner
fixed grammer mistakes

oh this github version is old, the mod is mostly restructured and i dont know how to push it to git, it doesnt work :(


The favicon.ico in the templates is needlessly big

The favicon.ico file currently used in all of our project templates is pretty big by favicon standards at 31.2 KB. In fact, yslow recommends a size less than 1 KB, however a quick look at some big properties shows sizes bigger than that but still much smaller than our default:

Site
Icon size

google.com
5.3 KB

microsoft.com
17.2 KB

stackoverflow.com
5.5 KB

our template
31.2 KB

Cracking open the Google favicon.ico reveals they have only two sizes embedded: 32x32@32-bit and 16x16@32-bit. Our default has two more sizes beyond that: 48x48 and 64x64.
Reducing ours to match Google's (seems like a reasonable default) drops the size to match theirs (as expected) at 5.3 KB so we should likely just do that.
The smaller, optimized ICO file is in this ZIP: favicon.zip

An extra optimization would be to change the semi transparent pixels and make them either fully opaque or fully transparent. And together with a reduction of the number of colors would allow the use of a color pallete instead. If this file is optimized using that technique the size can be reduced to 3.5 KB. So you might want to consider to use this file instead: new-favicon.zip. With this technique there is a small loss in quality but I am really unable to see the difference here.

The attention to detail in reducing the size of the favicon is appreciated.
Personally I think it would be even better to consider dropping the default favicon.ico. It's meant to be able to be used to identify a site or complement a site's branding, and there are already millions of sites with this favicon in it with nothing more in common than their platform technology. Embedding, say, a theme with Bootstrap and CSS gets you going towards building something and you can use it as a starting point and customize it with your branding; all you can do with a favicon is to replace it in its entirety.

@JesperTreetop removing it results in 404s as browsers will attempt to request it regardless. I very much dislike seeing our default templates result in errors being displayed in the browser dev consoles.

That's a fair point. Doesn't that happen for apple-touch-icon.png and its ilk too?


New-FlashArrayCapacityReport does not run due to error on 152:3

PS C:\Users\dstamen> New-FlashArrayCapacityReport -EndPoint $pureendpoint -Credential $purecred -VolumeFilter 'ds3' -OutFilePath .\ -HTMLFileName Test.html
Cannot convert value ":1" to type "System.Decimal". Error: "Input string was not in a correct format."
At C:\Program Files\WindowsPowerShell\Modules\PureStoragePowerShellToolkit\1903.7\PureStoragePowerShellToolkit.psm1:152 char:3

    $sysTotalDRR = [system.Math]::Round($FlashArraySpaceMetrics.t ...

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : InvalidArgument: (:) [], RuntimeException
FullyQualifiedErrorId : InvalidCastFromStringToDecima

i was able to modify that line to be a standard variable and it proceeded, so something in the getting of the DDR is failing. this occured in PS5,6,7 on windows 10 and windows server.

Updated in <IP_ADDRESS>.


Update dufour-peyton-intersection & reproject-geojson version

I am trying to use georaster-layer-for-leaflet with a geojson GeometryCollection object to mask a georaster layer.
The dependency below when used with 0.2.1 works with an override.
"dufour-peyton-intersection": "^0.1.1",
Or ~ could be for minor version check < 0.X.X
"reproject-geojson": "^0.3.0", isn't converting the data from WGS84 to epsg3857
Added to pluggable.js inside reproject-geojson
else if (data.type === "GeometryCollection") {
return {
...data,
geometries: data.geometries.map(geometries => reprojectGeoJSONPluggable(geometries, { densify, reproject }))
};
}

I just published a new version of geomask that includes these updated dependencies.  I still need to update georaster-layer-for-leaflet though


Date faceting

Here are the changes in our app to get date faceting working.  Basic idea:

Replace the built-in range faceting components with our modified copies
Add new min and max value to the date slider to use in lieu of min and max from returned facet values

See also: https://github.com/isamplesorg/solr-faceted-search-react/pull/6 for the solr client changes that are required for this to work.
Not included: global calls for min and max years returned from a solr instance (currently these are hardcoded).  Will likely do in a follow-up PR unless it ends up being easy and I'll just push to this one.

Going to merge this one now while I continue on with the further work to figure out the best way to populate the min/max values for the slider.


Form for user to add education

The form has been completed and the API is properly posting the user's input into the database.


Need ability to customize ecs_execution_role with additional permissions

The task execution role may need additional customization to allow plans with additional security needs.
I achieved this (though I'm not sure this is the best approach) by doing:
In my main.tf calling terraform-aws-ecs-alb-service-task:
data "aws_iam_policy_document" "ecs_allow_ssm_access" {
  statement {
    sid       = "2"
    effect    = "Allow"
    resources = ["arn:aws:ssm:${var.aws_region}:${var.aws_account_id}:parameter/${var.stage}*"]
    actions   = [
      "ssm:List*",
      "ssm:Get*",
      "ssm:Describe*"
    ]
  }
}

module "ecs_alb_service_task" {
  ....
  custom_policy_document    = "${data.aws_iam_policy_document.ecs_allow_ssm_access.json}"`
}

And in main.tf inside this module:
data "aws_iam_policy_document" "ecs_execution_role" {
  source_json = "${var.custom_policy_document}"

  statement {
    sid       = "vLMpjauEwiCGsAJ9tJKsbSgn"
    effect    = "Allow"
    resources = ["*"]

    actions = [
      "ecr:GetAuthorizationToken",
      "ecr:BatchCheckLayerAvailability",
      "ecr:GetDownloadUrlForLayer",
      "ecr:BatchGetImage",
      "logs:CreateLogStream",
      "logs:PutLogEvents",
    ]
  }
}

@mike-zipit thanks for reporting!
IMO, we should solve this by adding an output for the IAM role. Then you can use iam_role_policy_attachment to attach as many policies as you want.
https://www.terraform.io/docs/providers/aws/r/iam_role_policy_attachment.html
@aknysh any input?

@osterman @aknysh I think this issue should be closed because outputs for IAM Role have been added https://github.com/cloudposse/terraform-aws-ecs-alb-service-task#outputs (probably a long ago)

yes thanks @k911
closing the issue


API Gateway Private Endpoints do not include 'x-forwarded-proto' leading to incorrect wsgi.url_scheme

When using an API Gateway configured with a private endpoint (https://aws.amazon.com/blogs/compute/introducing-amazon-api-gateway-private-endpoints/) and in lambda proxy integration, the event object does not contain a header with 'x-forwarded-proto', even though calling the api over the private endpoint can only be done via HTTPS (I guess you could consider this an oversight by AWS, it is an undocumented quirk). This leads to serverless-wsgi defaulting to the incorrect protocol (http) for setting wsgi.url_scheme in serverless_wsgi.py. The detection logic for setting this value should perhaps be updated to not solely depend on the presence of 'x-forwarded-proto', or perhaps default to https instead of http in the absence of the header as API gateway doesn't support http only connections directly.

I just checked and API Gateway doesn't listen on port 80, and the FAQ states that API Gateway doesn't support unencrypted endpoints.
One way to do this would be to check for the requestContext.apiId field and if present, set the wsgi.url_scheme to https if it has not already been done. I'm not sure whether this would open up a security hole however, so it might be safer to enable this behavior via an environment variable or configuration override.

A very simple workaround for this is to modify the lambda handler function to set event['headers']['X-Forwarded-Proto'] = 'https' and/or event['multiValueHeaders']['X-Forwarded-Proto'] = 'https' immediately before calling serverless_wsgi.handle_request.


Attach line & file info to anyhow::Error and anyhow::Context

First off, thank you for this wonderful library!
Context
It's often difficult to find where in your code an error occurred.  Rust's backtraces help with this, but are often so verbose that it's still difficult.
Proposal
It would be great if you could simply glance at the error output to get file and line information.  This could be implemented using #[track_caller] and can be optionally turned on using a feature flag.
I'm not sure what format you'll want, but I'm imagining something like this:
Error: Failed to parse file: hello.txt @ main.rs:7:10

Caused by:
    0: Unable to convert this string into a float: '1.5a' @ main.rs:19:24
    1: invalid float literal @ main.rs:25:32

Stack backtrace:
...

I'm willing to make a PR if you like this feature!

@vultix I would be very interested in this feature!

I would like to see this as a debug feature.  Off by default for release builds.

I came here looking for this, so this feature would be very welcome!

For the time being I created this macro for my use:
#[cfg(feature = "file_lines")]
macro_rules! line_leader {
    () => {
        format!("{}:{}", file!(), line!());
    };
}

#[cfg(feature = "file_lines")]
macro_rules! f_context {
    ($msg:literal $(,)?) => {
        format!("{} {}", line_leader!(), $msg);
    };
    ($fmt:expr, $($arg:tt)*) => (
        format!("{} {}", line_leader!(), format!($fmt, $($arg)*));
    )
}
#[cfg(not(feature = "file_lines"))]
macro_rules! f_context {
    ($msg:literal $(,)?) => {
        $msg
    };
    ($fmt:expr, $($arg:tt)*) => (
        format!($fmt, $($arg)*);
    )
}

I use it like this:
            can_error(&arg)
                .context(f_context!("Did error with {:?}", &arg));

@dtolnay is the https://github.com/dtolnay/anyhow/tree/location branch still planned to be released? Right now we're trying to extract location via the backtraces and as my colleague kindly put it, it's "gnarly".

I would like to see this as a debug feature. Off by default for release builds.

i dont agree with this, i think it can be a useful feature for release builds for debugging bugs, i'd rather have this as a separate feature

For me a separate feature would also be a good solution. I'd like to track the location, especially also in release builds because it increases the possibility to understand what happened.

As someone coming from C++ where I implemented almost exactly the same thing as Result + anyhow, this gets my vote. In my library I came to depend on it so much it was the immediate first thought for me when I found anyhow. I just implemented my own macro for my library, but I liked the formatting in drbartling's answer so I continued it a bit:
#[cfg(feature = "file_lines")]
macro_rules! file_line_leader {
    () => {
        format!("{}:{}", file!(), line!());
    };
}

#[cfg(feature = "file_lines")]
macro_rules! atry {
    ($x:expr) => {
        anyhow::Result::from($x).context(file_line_leader!())?
    };
    ($x:expr, $msg:literal $(,)?) => {
        anyhow::Result::from($x).context(format!("{}: {}", file_line_leader!(), $msg))?
    };
    ($x:expr, $fmt:expr, $($arg:tt)*) => {
        anyhow::Result::from($x).context(format!("{}: {}", file_line_leader!(), format!($fmt, $($arg)*)))?
    };
}
#[cfg(not(feature = "file_lines"))]
macro_rules! atry {
    ($x:expr) => {
        anyhow::Result::from($x)?
    };
    ($x:expr, $msg:literal $(,)?) => {
        anyhow::Result::from($x).context($msg)?
    };
    ($x:expr, $fmt:expr, $($arg:tt)*) => {
        anyhow::Result::from($x).context(format!($fmt, $($arg)*))?
    };
}

So it can be used like this:
let username = atry!(read_username_from_file(), "Couldn't get from file {}", filename);

The question is though, should the macro include the ? or not? Usually after checking for error, you want the value so I think for majority of the cases, you'd want the ? anyway, but if you want to return the value, then you have to rewrap the result. And adding two different macros would be just silly. Well, except in my C++ one  I had another macro that allows for changing the error kind, but I'll leave this as such for now.

Any update for this track_caller feature?

Any update for this track_caller(ocation) feature?

Having the same issue where it's very hard to know where the error is originating, there are similar methods called with the same error, and adding manual context to each is not a great option.


Go 2: Make life easier

Suppose I have a variable:
Example 1:

var x *int
x = &5 // This fails.

Example 2:

var t *time.Time
t = &time.Now() // this fails

The recommended way is:

var x *int

var dummy int = 5
x = &dummy // This works

Or

var t *time.Time

var dummy time.Time = time.Now()
t = &dummy // This works

This is annoying. Having to create dummy variables just to do this.
There is also an "apparent" inconsistency (despite following similar semantics to above):
type A struct {}

var x *A

x = &A{} // This is allowed

I see this dummy variable style absolutely everywhere in goland. It looks disgusting. It's still less revolting that the temporary slice (which is what I use everywhere)

Dup of #9097 (and more directly of #19966, which was closed in favor of #9097). Closing as a dup.

I've created https://github.com/rocketlaunchr/igo to demo how it can be used.


[stable/prometheus-snmp-exporter] Don't run config through toYaml

What this PR does / why we need it:
Currently the chart tries to change the config key to YAML. This has the side-effect of changing integer keys to strings.  These keys are used a lot when representing SNMP enums, and snmp-exporter fails to start when they are not integers.
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[X] DCO signed
[X] Chart Version bumped
[X] Variables are documented in the README.md
[X] title of the PR contains starts with chart name e.g. [stable/chart]

/ok-to-test

/lgtm

/lgtm


using MULTINEST for posterior sampling erro

Hello all, I made an error when using multilinest for posterior sampling
bayes.set_sampler("multinest")
model.test.spectrum.main.shape.mu.prior = Uniform_prior(lower_bound=1, upper_bound=100)
_ = plot_likelihood_function(bayes)
bayes.sampler.setup(n_live_points=400, resume=False)
res = bayes.sample()

error warning:
14:09:42 ERROR     multinest is not a valid sampler please choose from                     [bayesian_analysis.py](file:///home/jian/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/bayesian/bayesian_analysis.py):[223](file:///home/jian/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/bayesian/bayesian_analysis.py#223)
                  emcee,dynesty_nested,dynesty_dynamic
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_15827/3686659251.py in <module>
----> 1 bayes.set_sampler("multinest")
      2
      3
      4 model.test.spectrum.main.shape.mu.prior = Uniform_prior(lower_bound=1, upper_bound=100)
      5

~/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/bayesian/bayesian_analysis.py in set_sampler(self, sampler_name, **kwargs)
    223                 f"{sampler_name} is not a valid sampler please choose from {','.join(list(_available_samplers.keys()))}")
    224
--> 225             raise RuntimeError()
    226
    227         self._sampler = _available_samplers[sampler_name](

RuntimeError:

OS:
System: Linux DESKTOP-10UCA6U <IP_ADDRESS>-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Conda ENV
python v3.12 , threeml v 2.3.2 multilinest v3.10,

It would appear you do not have multinest installed

@grburgess Yep sir. At first, I used conda list multinest to show that it was not installed. Later, I used `conda install - c conda-forge multinest. The version is 3.10. After that, the code will still report an error.

Hello all,Does the current 3ML version not integrate the multilinest library?

I think you need to install the pymultinest package as well. Haven't used
it in a while though.
On Mon, Sep 5, 2022, 14:36 Jisans @.***> wrote:

Hello all,Does the current 3ML version not integrate the multilinest
library?
—
Reply to this email directly, view it on GitHub
https://github.com/threeML/threeML/issues/573#issuecomment-1236954861,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB3PSBQZRENBZUDWG6OXURDV4XSOLANCNFSM6AAAAAAQEGFYEI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

3ml depends on several optional upstream packages. If they are not installed or have errors, then the services that use them will throw an error. You should consult the installation instructions for those packages and try to use them independent of 3ml if you encounter problems.

@grburgess I  know what you said, sir, but I'm a 3ML beginner. I learned my running errors according to the tutorial. I also tried to solve them, but they all failed, so I took the liberty to bother you. I'm sorry!

What is the error you see after having installed multinest and pymultinest
and all their dependencies?
On Mon, Sep 5, 2022, 15:51 Jisans @.***> wrote:

@grburgess https://github.com/grburgess I know what you said, sir, but
I'm a 3ML beginner. I learned my running errors according to the tutorial.
I also tried to solve them, but they all failed, so I took the liberty to
bother you. I'm sorry!
—
Reply to this email directly, view it on GitHub
https://github.com/threeML/threeML/issues/573#issuecomment-1237068284,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB3PSBVPCNBHHHXUKRQAUDDV4X3HPANCNFSM6AAAAAAQEGFYEI
.
You are receiving this because you were mentioned.Message ID:
@.***>

@grburgess I  know what you said, sir, but I'm a 3ML beginner. I learned my running errors according to the tutorial. I also tried to solve them, but they all failed, so I took the liberty to bother you. I'm sorry!

I'm a beginner as well, @Jisans . There's a way you could possibly avoid the fuss with Multinest. Johannes (if I recall correct) developed UltraNest as a superior code to overcome issues with the likes of Multinest and Polychord. Only in very high dimensions (> 100 free parameters) does the MLFriends algorithm fail in UltraNest, but one can deselect that to remain safe. Could you possibly use Ultranest instead? I'm unaware if you specifically require Multinest for your work. It returns no error for me. Just a suggestion.

This issue is currently about solving the install of multinest.

@henrikef Sorry for taking so long to return. The warning is as follows:
from threeML import *
from threeML.bayesian.tutorial_material import *

22:12:12 WARNING   The naima package is not available. Models that depend on it will not be         functions.py:51
                  available
         WARNING   The GSL library or the pygsl wrapper cannot be loaded. Models that depend on it  functions.py:72
                  will not be available.
22:12:13 WARNING   The ebltable package is not available. Models that depend on it will not be     absorption.py:37
                  available
22:12:13 INFO      Starting 3ML!                                                                     __init__.py:31
         WARNING   ROOT minimizer not available                                                minimization.py:1345
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

ERROR:   Could not load MultiNest library "libmultinest.so"
ERROR:   You have to build it first,
ERROR:   and point the LD_LIBRARY_PATH environment variable to it!
ERROR:   manual: http://johannesbuchner.github.com/PyMultiNest/install.html

ERROR:   Could not load MultiNest library: libmultinest.so
ERROR:   You have to build MultiNest,
ERROR:   and point the LD_LIBRARY_PATH environment variable to it!
ERROR:   manual: http://johannesbuchner.github.com/PyMultiNest/install.html

problem: libmultinest.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/pymultinest/run.py", line 16, in _load_library
    return cdll.LoadLibrary(libname)
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/ctypes/__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libmultinest.so: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3552, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_610465/3889831270.py", line 1, in <module>
    from threeML import *
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/__init__.py", line 59, in <module>
    from .io.serialization import *
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/io/serialization.py", line 4, in <module>
    from threeML.classicMLE.joint_likelihood import JointLikelihood
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/classicMLE/joint_likelihood.py", line 26, in <module>
    from threeML.minimizer import minimization
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/minimizer/minimization.py", line 1353, in <module>
    from threeML.minimizer.multinest_minimizer import MultinestMinimizer
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/minimizer/multinest_minimizer.py", line 6, in <module>
    import pymultinest
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/pymultinest/__init__.py", line 19, in <module>
    from .run import run
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/pymultinest/run.py", line 52, in <module>
    lib = _load_library('libmultinest')
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/pymultinest/run.py", line 50, in _load_library
    sys.exit(1)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py", line 1101, in get_records
    return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py", line 248, in wrapped
    return f(*args, **kwargs)
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py", line 281, in _fixed_getinnerframes
    records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
  File "/home/Jisans/miniconda3/envs/threeML/lib/python3.7/inspect.py", line 1502, in getinnerframes
    frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
AttributeError: 'tuple' object has no attribute 'tb_frame'
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
~/miniconda3/envs/threeML/lib/python3.7/site-packages/pymultinest/run.py in _load_library(libname)
     15                         libname = find_library(libname)
---> 16                 return cdll.LoadLibrary(libname)
     17         except OSError as e:

~/miniconda3/envs/threeML/lib/python3.7/ctypes/__init__.py in LoadLibrary(self, name)
    441     def LoadLibrary(self, name):
--> 442         return self._dlltype(name)
    443

~/miniconda3/envs/threeML/lib/python3.7/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
    363         if handle is None:
--> 364             self._handle = _dlopen(self._name, mode)
    365         else:

OSError: libmultinest.so: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

SystemExit                                Traceback (most recent call last)
    [... skipping hidden 1 frame]

/tmp/ipykernel_610465/3889831270.py in <module>
----> 1 from threeML import *
      2 from threeML.bayesian.tutorial_material import *

~/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/__init__.py in <module>
     58 # Finally import the serialization machinery
---> 59 from .io.serialization import *
     60 # Now import the optimizers first (to avoid conflicting libraries problems)

~/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/io/serialization.py in <module>
      3 standard_library.install_aliases()
----> 4 from threeML.classicMLE.joint_likelihood import JointLikelihood
      5 from threeML.bayesian.bayesian_analysis import BayesianAnalysis

~/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/classicMLE/joint_likelihood.py in <module>
     25 from threeML.io.table import Table
---> 26 from threeML.minimizer import minimization
     27 from threeML.parallel.parallel_client import ParallelClient

~/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/minimizer/minimization.py in <module>
   1352
-> 1353     from threeML.minimizer.multinest_minimizer import MultinestMinimizer
   1354

~/miniconda3/envs/threeML/lib/python3.7/site-packages/threeML/minimizer/multinest_minimizer.py in <module>
      5
----> 6 import pymultinest
      7 from astromodels.functions.priors import Uniform_prior, Log_uniform_prior

~/miniconda3/envs/threeML/lib/python3.7/site-packages/pymultinest/__init__.py in <module>
     18 try:
---> 19         from .run import run
     20         from .solve import solve, Solver

~/miniconda3/envs/threeML/lib/python3.7/site-packages/pymultinest/run.py in <module>
     51
---> 52 lib = _load_library('libmultinest')
     53

~/miniconda3/envs/threeML/lib/python3.7/site-packages/pymultinest/run.py in _load_library(libname)
     49                 print('problem:', e)
---> 50                 sys.exit(1)
     51

SystemExit: 1

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
    [... skipping hidden 1 frame]

~/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
   2090                            'the full traceback.\n']
   2091                     stb.extend(self.InteractiveTB.get_exception_only(etype,
-> 2092                                                                      value))
   2093                 else:
   2094                     try:

~/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py in get_exception_only(self, etype, value)
    752         value : exception value
    753         """
--> 754         return ListTB.structured_traceback(self, etype, value)
    755
    756     def show_exception_only(self, etype, evalue):

~/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py in structured_traceback(self, etype, evalue, etb, tb_offset, context)
    631                     chained_exceptions_tb_offset, context)
    632                 + chained_exception_message
--> 633                 + out_list)
    634
    635         return out_list

~/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py in structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1366             self.tb = tb
   1367         return FormattedTB.structured_traceback(
-> 1368             self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1369
   1370

~/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py in structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1266             # Verbose modes need a full traceback
   1267             return VerboseTB.structured_traceback(
-> 1268                 self, etype, value, tb, tb_offset, number_of_lines_of_context
   1269             )
   1270         elif mode == 'Minimal':

~/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py in structured_traceback(self, etype, evalue, etb, tb_offset, number_of_lines_of_context)
   1123
   1124         formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
-> 1125                                                                tb_offset)
   1126
   1127         colors = self.Colors  # just a shorthand + quicker name lookup

~/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py in format_exception_as_a_whole(self, etype, evalue, etb, number_of_lines_of_context, tb_offset)
   1080
   1081
-> 1082         last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records)
   1083
   1084         frames = self.format_records(records, last_unique, recursion_repeat)

~/miniconda3/envs/threeML/lib/python3.7/site-packages/IPython/core/ultratb.py in find_recursion(etype, value, records)
    380     # first frame (from in to out) that looks different.
    381     if not is_recursion_error(etype, value, records):
--> 382         return len(records), 0
    383
    384     # Select filename, lineno, func_name to track frames with

TypeError: object of type 'NoneType' has no len()

In an ipython session, try and import pymultinest. If this is successful, then it should work in 3ml. You need to make sure the multinest library is in your library path of not.

Ok. It seems you do not have the multinest library installed. You will need to follow the instructions to install it.

But I will try to solve it. Thank you for your help!

We do not support WSL which indeed could be the problem. I would suggest using a Linux flavor.

It's strange that I use 3ML on WSL, astromodels is not bad,

Well, the current issue seems to be with multinest and/or pymultinest, two separate packages. We cannot help with installing external packages.
Additionally, I don't believe any of us are using WSL or have access to a machine to run it, so any support we can provide related to that will be limited.
I'm going to close this issue now. Please only re-open if you still see errors in threeML after you verify that both multinest and pymultinest are working, and you are sure that the error comes from threeML, not one of the external packages.
Good luck!


Is there a way to rename uploaded file using FileUploadEditor

Hi;
I need a requirement to rename when a file is uploaded. In my xxForm there is a property name filename that user types and then I want the uploaded files to be renamed with this property. I am not going to save original. I am using FileUploadEditor.
Secondly I want to add feature to force user to only upload PDF files not other files. I wonder if such thing is possible and can I write custom editor on top of it?
Thank you

It is not possible to rename the file when uploading. See this issue  #1141

@marcobisio Yes it's possible, just you need to create your own editor with base of existing. You need to required some changes. And cheers!

@marcobisio
Any samples would really help. Thank you

The easiest way to do this is to create a field in your Row class. When declaring the file format, put the file name inside a pipe | |  so that FileUploadEditor will recognize it as a variable and pick the content you will type in the text field.
Example
 [DisplayName("MI Number"), Column("MINumber"), Size(500), NotNull, QuickSearch(SearchType.Contains), Unique]
        public String MiNumber
        {
            get { return Fields.MiNumber[this]; }
            set { Fields.MiNumber[this] = value; }
        }

        [DisplayName("Mi File"), Column("MIFile"), Size(1000), FileUploadEditor(FilenameFormat = "020 Level plans and MIs/MI Register/Final/|LevelUgLevelName|/|MiNumber|")]
        public String MiFile
        {
            get { return Fields.MiFile[this]; }
            set { Fields.MiFile[this] = value; }
        }

In the code snippet, MiNumber contains the name I want the file to have. So in the FileUploadEditor, MiNumber is the last value in pipe | | . This will ensure that whatever I write inside MiNumber textfield becomes the file name.
Hope this helps @ms4hafiz


Page is not working for ObservableScrollView

Hi I want to add multiple items inside ObservableScrollView. But even i am calling MaterialViewPagerHelper.registerScrollView(getActivity(), mScrollView, null); inside fragment onCreateView.But it is not working.
Thanks
Amlan.

did you add the
sorry for the delay


❓ Question: Files will be kept indefinitely as long as they are downloaded at least once every month?

🙋♂ Question
Does this web app support retaining the files if it's downloaded at least once every month?
Only delete the file if it hasn't been downloaded for more than a month.
Some free file hosting have that feature.

At the moment the share gets deleted when the user deletes the share manually or the expiration date is due. If you think this isn't enough feel free to create a feature request :)


[Feature request / discussion] Custom crash handler and watchdogs

I'm using esp-open-rtos in my robotics project ESPway where it has already proven to work great.
I would like to be able to add a custom crash handler.
On a second thought, a handler like that probably can't catch the situation where the execution is stuck in some code path and eventually causes the HW watchdog timer to reset after a couple of seconds. What I actually need would probably be a watchdog-like timer which would trigger some ISR where I could stop the motors.
What do you think about these ideas? Does esp-open-rtos already have some mechanism that could be used to implement the latter functionality?

A simple take on this is in PR https://github.com/SuperHouse/esp-open-rtos/pull/440

Closed by https://github.com/SuperHouse/esp-open-rtos/pull/440.


Evaluate crawling capability of websites, portals and apps

The idea is to crawl these sites to identify whether they are optimized for SEO. We will use the crawler recently added to this repo.
Main:

https://synapse.org
https://sagebionetworks.org/

Portals:

https://agora.adknowledgeportal.org
https://adknowledgeportal.synapse.org/
https://nf.synapse.org/
https://csbc-pson.synapse.org/
https://www.cri-iatlas.org/

Shiny apps:

https://isb-cgc.shinyapps.io/iatlas

Configuration
const generator = SitemapGenerator(siteUrl, {
  filepath: sitemapFilepath,
  maxDepth: 2,
  maxEntriesPerFile: 50000,
  stripQuerystring: false
});

https://sagebionetworks.org
$ node tools/generate-sitemap.js http://www.sagebionetworks.org sitemap-sagebionetworks.xml

About the crawler not saving sitemap file
The two sites for which the crawler failed to save sitemap.xml have in common that their subdomain includes a dash ("-"). Is that the reason? Note that dash in the domain does not lead to this issue as the iAtlas website is crawled fine.

Results

Site
Pages found
SSR enabled
Technology
Contact

https://synapse.org
1

https://sagebionetworks.org
29

https://agora.adknowledgeportal.org
1

https://adknowledgeportal.synapse.org
1

https://nf.synapse.org
1

https://csbc-pson.synapse.org
1

https://www.cri-iatlas.org
6

https://isb-cgc.shinyapps.io/iatlas
1

https://challenge-registry.org
3
✅
Angular Universal
@tschaffter


changes to support neo4j 5.10.0

@paltusplintus Please review!
@KWLgsk @Vidhisri56 FYI.
This PR is for this PBI.
The changes have been made as per neo4j 5.10.0 with backward compatibility.
NOTE: The test cases for rdf_support are not working currently as it requires n10 plugin support which is not there currently so unable to test it.

@paltusplintus I have made the changes as per comments.

There will be few more changes in Neointerface, got some issue while testing tab2neo. Moving this to draft for now.

@paltusplintus Please review!


Statuses in model should be name and description, not code and meaning

Make them conform with everything else!

Added Status "Categories", as we informally already have that structure.


Media Picker Does Not Support Cloud Storage

Put and get images based on Laravel / Voyager configurations

@syclone while not using cloud upload fails because Storage should be used without $realpath, also it would be good if you could apply same fix to the crop method.
Another nitpick you can use $image->encoded to get image content as string.
You can check
https://github.com/MrCrayon/voyager/commit/1a55e5653bfb3d09ce99ef812070bb35fe616d11

Closing in favor of #4565 that is based on this one but has been updated.


Tab is empty when using headless server

I have Automatic1111 running on a remote server in the building, accessible on the local network. That UI loads as expected. I can start main.py in ComfyUI with --listen [address] and then open the ComfyUI remotely as expected. I have added the path and necessary switch --listen [address] to the settings for the plugin and reloaded with successful console:
Launching ComfyUI with arguments: --listen [address] --port 8188
Total VRAM reported here
xformers version: 0.0.20
Set vram state to: NORMAL_VRAM
Device: cuda:0 GPU here
Using xformers cross attention
Starting server
To see the GUI go to: http://<IP_ADDRESS>:8188
and in this state I can see both the Automatic UI, and the ComfyUI on their relevant remote ports.
Clicking on the tab does not load the interface in either firefox or Edge.

We added comfyui flag forwarding from a1111. I think the issue is that you are passing the url and port flags directly to comfyui.
If you want to pass flags to comfyui, you can pass --comfyui-[flag] to your a1111 args, where [flag] is a comfyui flag.
For example, you would use --comfyui-port 8818 as an argument to your a1111 launch script in order to start comfyui on that port.

Thanks, this feels closer. I can set the port with comfy-port but obviously --listen is just a flag here. In comfyui I can pass the IP address in too which is required for my setup.
python ./main.py --listen 192.168.n.n

To pass the url to comfyui, you also need to pass the url in the forwarded -listen flag, which is --comfyui-listen [url], where [url] is your url.
You don't need to start comfyui manually, the extension is supposed to start it on its own through the webui.

here's a list of the current forwarded comfyui flags at the time of writing, if you need other flags:
--comfyui-port
--comfyui-listen
--comfyui-dont-upcast-attention
--comfyui-use-split-cross-attention
--comfyui-use-pytorch-cross-attention
--comfyui-disable-xformers
--comfyui-highvram
--comfyui-normalvram
--comfyui-lowvram
--comfyui-novram
--comfyui-cpu

I thought I understood that, but --comfyui-listen {ip address] errors as and unrecongnized argument. Thanks though I'll keep trying

parser.add_argument("--comfyui-listen", action='store_true', default=None)

Yeah the option is listed as a flag, but it should accept str. Needs to be fixed

I did see that. Glad I am reporting an actual bug tbh! Thanks

@John-WL if you're busy I can take this one, it should take 5 minutes.

yes you can do it

This took a little bit more tinkering that I thought. @jjohare does it make sense for your use case to specify a different address for the webui server and the address used by the extension? If you know one thing or two about networking, I'd like to know if you think it makes sense to be able to specify 2 different addresses (1 for the ComfyUI server, and 1 for the webui client to refer to the ComfyUI server). I added an option for the address used by the client that falls back on the server URL, but maybe this is unnecessary.

I don't think so, they're both on the same system for ME, but they could hypothetically be separated out onto two machines. I feel that would imply parallelisation which seems like it's a more complex proposition. So long as images came back to the UX from both nodes through the UX it might be a nice provision though.

IIIUC there are 4 addresses here at play:

2 for the webui: the address used to refer to the webui from within the webui, and the address used to refer to the webui from your web client
2 for ComfyUI: the address used to refer to ComfyUI from within ComfyUI, and the address used to refer to ComfyUI from your web client

IIUC, these could all be different. Is that the case for your setup, or there exist a way to refer to each of the webui and ComfyUI using a single url?
For example, in the case of passing --listen <IP_ADDRESS> to comfyui, it seems that I need to use <IP_ADDRESS> to refer to it from a web client for it to load (<IP_ADDRESS>:8188 doesn't work). My question was, are there other cases like this that would not be trivial? If so, we probably need a separate config value for the url used by the web client.

In a cloud cluster context yes there could be 4, agreed  I am using this in an intranet context so this collapses to either 1 or 2. I normally use1 as I can reference localhost for webui and comfy using the same intranet "local network" IP. One is therefore fine for my issue but does not generalise to the possible 4 that a cloudy cluster implies for your plugin.

Thanks, I'll take your suggestion.
By default if --listen <IP_ADDRESS> is passed to comfyui, we will fallback to <IP_ADDRESS>. The behavior can be overridden by setting the client url explicitly through the command line or through the extension settings.

I have tested this in a cloud system with the following command style (adapt for your needs):
Start-Process -NoNewWindow -FilePath 'ssh' -ArgumentList '-L 7860:localhost:7860 -L 8188:localhost:8188 login@$IP
It works great now: Also need to add --listen and the local IP into the comfyui extensive boxes as discussed above.

Thanks for testing, glad it works now.

Also need to add --listen and the local IP into the comfyui extensive boxes as discussed above.

Is that unexpected? What would you expect to see if that is the case?

Apologies, that is expected, I didn't even try it without. I left this note for people to follow later. Everything works.


onShow is fired before the content is actually displayed.

I came across an issue
while trying to focus(using element.focus()) on the dropdown content when the onShow prop is fired.
The problem is that the dropdown content is still invisble when the onShow is fired.
I've taken a look at the code and noticed that currently the prop onShow is fired before the setState({ active: true }) is applied(in DropDown.js => show(){ ... }).
I added a pull request (#37) regarding that matter, I'd be happy if you could take a look :-).

https://github.com/Fauntleroy/react-simple-dropdown/pull/37


Selected launch configuration inconsistency

VS Code 1.20.1
While trying to reproduce https://github.com/Microsoft/vscode/issues/45046 I was running into this inconsistency:

Note that a currently selected (and valid) launch config exists but the gear shows an error and F5 asks for creating a launch config (which should only happen if no launch,json exists).
After selecting node.js I got this:

And after dismissing VS Code opens the User settings:

This bug could actually explain https://github.com/Microsoft/vscode/issues/45046.

I am not able to reproduce this in Insiders (1.21.0)

I made some refactoring around this at the start of this milestone.
This work is captured here https://github.com/Microsoft/vscode/issues/42630
Since you can no longer reproduce I will close


Update watch CodeExample + TS Code

Title says it all

Added CodeExamples
Added TS code and Types button

awesome! thanks @pmaier983 👍


Installing SLDExporter

Hello,
Do you have a short document to explain how to use your code under ArcMap ?
All the best,
S.

Hi syilmaztur and sylsta,
can I use this Tool in ArcMap 10.6 by transforming ESRI-style symbols to Geoserver?
@sylsta: Do you know how to install this plugin?
Best regards,
Matthias

Hi syilmaztur and sylsta,
can I use this Tool in ArcMap 10.6 by transforming ESRI-style symbols to Geoserver?
@sylsta: Do you know how to install this plugin?
Best regards,
Matthias


[suggest] Language select

i suggest to select language at the link address
like
https://www.d3planner.com/ko/776143228
https://www.d3planner.com/en/776143228
First-time visitors will be more comfortable the D3planner.
(Non-English speaking visitors think it is a complex website on their first visit)
thank you :)

I'm not a fan of localized links, especially not by default, because people often post links in other languages without realizing it and get others confused.
I could make it more clear that the language can be changed, perhaps by using the same popup that suggests picking a theme.


[Lineage] Refactor references to use lineage_version

Tested locally on a couple of samples
Replace the logic of "date between started_at and ended_at" to be "alignment_config.lineage_version between version_start and version_end" in the lineage calls
taxon_search_list is meant to be called manually / should be updated later. Or we can add column defaults to version_start/version_end as well.

It would be great if you could add some performance benchmarks, so we can evaluate and be aware of the improvement!

@cdebourcy
Benchmarks results

Ran some speed tests locally.
Benchmark: Load report_info for all the samples in the range
Results: Overall about 20-30% speedup with this switch

Samples 900-950 (lots of skipped ones here)
OLD: 13.2179527 sec
NEW: 7.9781604 sec
Samples 600-650
OLD: 76.796431 sec
NEW: 62.6806688 sec
Samples 500-550
OLD: 48.5035036 sec
NEW: 34.7451729 sec

Mixed up the orders of the tests to avoid caching issues
Comparison code: https://github.com/chanzuckerberg/idseq-web/compare/jsheu/lineage-bench

start_time = Time.now
(500..550).each do |i|
  puts "LOADING: " + i.to_s
  SamplesController.new.report_info(i)
end
end_time = Time.now
duration = end_time - start_time
puts "DONE"
puts "Time elapsed: #{duration}"


Has anyone got Netflix working yet?

How do you mean?
You can control the playback etc, of Netflix with pychromecast through the regular MediaCast Controller but thats when you have started the Netflix app on chromecast manually. Netflix closed their open source library in 2014 I don't think and I have seen any solutions since then...
I might be wrong though.
Anyone else know of anything?

Is there anywhere I can find an example of how to do this with the Media Controller, e.g playing a certain movie?

So does Google Home use proprietary APIs, that Netflix have only made available to Google?
On Apr 1 2019, at 8:12 pm, Nojahhh<EMAIL_ADDRESS>wrote:

Sorry, I might have been unclear. Media Controller will only help you play, or pause, or seek and so on while you have a movie loaded, but you can't for instance search or browse Netflix.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (https://link.getmailspring.com/link/F1BD1B77-2E4F-47D0-A569-584A304AFEE9@getmailspring.com/0?redirect=https%3A%2F%2Fgithub.com%2Fballoob%2Fpychromecast%2Fissues%2F285%23issuecomment-478707811&recipient=cmVwbHkrMDBjN2JkMTFkODk0ODAzNjRiNmM0Mzg5MWYxN2Y3YzY1MDgwZDJhOTE5MjUzM2U5OTJjZjAwMDAwMDAxMThiYTI0OWE5MmExNjljZTE5Nzg1Y2RhQHJlcGx5LmdpdGh1Yi5jb20%3D), or mute the thread (https://link.getmailspring.com/link/F1BD1B77-2E4F-47D0-A569-584A304AFEE9@getmailspring.com/1?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMe9EdciBCwj3pZcr8EaI9Tt8aSTQpLyks5vcloagaJpZM4cT66Y&recipient=cmVwbHkrMDBjN2JkMTFkODk0ODAzNjRiNmM0Mzg5MWYxN2Y3YzY1MDgwZDJhOTE5MjUzM2U5OTJjZjAwMDAwMDAxMThiYTI0OWE5MmExNjljZTE5Nzg1Y2RhQHJlcGx5LmdpdGh1Yi5jb20%3D).

So does Google Home use proprietary APIs, that Netflix have only made available to Google?
…
On Apr 1 2019, at 8:12 pm, Nojahhh @.> wrote: Sorry, I might have been unclear. Media Controller will only help you play, or pause, or seek and so on while you have a movie loaded, but you can't for instance search or browse Netflix. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub @./0?redirect=https%3A%2F%2Fgithub.com%2Fballoob%2Fpychromecast%2Fissues%2F285%23issuecomment-478707811&recipient=cmVwbHkrMDBjN2JkMTFkODk0ODAzNjRiNmM0Mzg5MWYxN2Y3YzY1MDgwZDJhOTE5MjUzM2U5OTJjZjAwMDAwMDAxMThiYTI0OWE5MmExNjljZTE5Nzg1Y2RhQHJlcGx5LmdpdGh1Yi5jb20%3D), or mute the thread @.***/1?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMe9EdciBCwj3pZcr8EaI9Tt8aSTQpLyks5vcloagaJpZM4cT66Y&recipient=cmVwbHkrMDBjN2JkMTFkODk0ODAzNjRiNmM0Mzg5MWYxN2Y3YzY1MDgwZDJhOTE5MjUzM2U5OTJjZjAwMDAwMDAxMThiYTI0OWE5MmExNjljZTE5Nzg1Y2RhQHJlcGx5LmdpdGh1Yi5jb20%3D).

Yes, unfortunately.


Making Tasks posts invisible

This makes tasks posts invisible on the forum.

is this still relevant? has been sitting here for some time

Yes. I've held on it because I expected that we might solve this problem differently when reconsidering prototype tasks, but it looks like the problem will remain.


Table redundantly stores 3 lengths and capacities for each column

Tables store a length and capacity for a BlobVec and two tick Vecs for every column in it. All of them are updated in unison when spawning/moving/despawning entities.
In an ideal world, a table should only store one length and one capacity that applies to all allocations underneath it. This would make Table::allocate O(1) in the best case instead of O(columns).
Note that addressing this likely will require a lot more unsafe, as this will require lifting a lot of the unsafe parts of BlobVec into Table.

As I see it, there are two options: (please correct me if I'm wrong, I'm writing this without much experience in the storage system)
Option 1

Split BlobVec into RawBlobVec and BlobVec (like Vec's implementation)
Use RawBlobVec and RawVec in Column
Use a single length value for all columns in Table
This will reduce 3*columns - 1 usizes from each Table (8[4]*(3*columns-1) bytes), not too shabby.

Option 2
Similar to option 1, but instead of RawVecs, Column will just store (small abstractions over) raw pointers.
Capacity and length will be stored at the Table level.
This will reduce 6*columns - 2 usizes from each Table (8[4]*(6*columns-2) bytes), twice as much as option 1.

Option 2 would be strongly preferred, though some other paths might need to be retained to keep support ComponentSparseSet, intact.
Bikeshedding here, but a RawBlobVec is just a Blob.
One thing to note is that the capacity of BlobVec is set to usize::MAX for ZSTs, which may not play well with this setup.
bevy_ptr has the concept of a ThinSlicePtr<'a, T> which is a NonNull that becomes a slice in debug builds. We may want to use a ThinVec<T> of the same nature to handle the component ticks in Column.


Add Github Docker repo publisher

Added gh Docker repo publish. Build from Dockerfile.
Should look like this.
You can pull them as described there and add own custom stuff.
When you push either to master or tag anything with v-prefixed tag, it will build and publish new Docker image. An image with latest tag will be replaced by new master source, v-something will be a build from v-prefixed source.
Sha-tagged images can be used as well but I don't think they are useful, so I won't be using them.

Is this recommended to use this image from master for production? I currently push to http://docker.io/ registry, I can consider pulling from git right?


Fix multi-alarm overlapping bug

This PR fixes a subtle bug in the userspace virtual alarm library. If alarms are created and expire pretty close to each other, the within_range check can incorrectly return the relative relationship between the two, place the earlier alarm after the later alarm, which is incorrect, and can end up totally starving the earlier alarm if the later alarm is repeating.
This bug was introduced when trying to correctly account for potentially overflowing alarms, and the "obvious" fix (just compare absolute expiration values) doesn't work.
This PR adds two tests, one that demonstrates the starved alarm issue and one that exercises the overflow issue, and fixes the bug in such a way that both pass. In particular, the fix is simply to explicitly check if alarms overflow when insert them to the virtual alarm queue and use that for the comparison between alarms.
Test 1: Multi-Alarm Simple
This is a simple test for multiple alarms that only sets exactly two repeating alarms that should overlap frequently (one is twice the other's frequency). It sets two repeating alarms, at 500ms and 1s respectively, each prints the alarm index (1 or 2), current tick and alarm expiration to the console. When successful, both alarms should fire and alarm 1 should fire twice as often as alarm 2.
Today (on the NRF52840 at least, though I don't expect other chips to be different), this test fails. It should output (the first column in each line is the timer index):
1 6316032 6314240
2 10512384 10510592
1 10512384 10511104
1 14722560 14720768
2 18903552 18901760
1 18919680 18917632
1 23116544 23114752
2 27294720 27292928
...

but, due to a bug in the alarm library, actually outputs:
1 7254784 7252992
2 11451136 11449344
2 19842304 19840512
2 28233472 28231680
2 36624640 36622848
2 45015808 45014016
2 53406976 53405184
...

(note timer 1 never appears after the first instance)
Test 2: Multi-Alarm Overflow
This is a for multiple alarms where one overflows the clock (UINT32_MAX ticks), resulting in a low absolute value expiration, while the other is "normal" (1 second). When successful, both alarms should fire, the second after about 1 second, and the first after the clock overflows (around 7 minutes on 32kHz clocks).
When the logic for inserting clocks doesn't account correctly for overflows, the second alarm fires after the first one, both after the clock overflows.

Good catch, and the test seems fine to me.
However, this does raise a more general issue to me, and one that relates to our releases, automated tests, and the timer subsystem in particular: how to assert whether the test ran correctly, or not.
In particular, for timer tests we often just produce some raw, unprocessed output. When it comes to running these tests as part of a release (esp. with our release cadence), we then need to re-learn what it means for these tests to pass or fail. Similarly, with automated tests, esp. with non-deterministic output, it can be hard to encode a check function that determines the test result.
We may want to take this opportunity to figure out what we can add to the user space tests and/or a test framework to make this easier.

FWIW, @charles37 is working on an automated test for this, to be integrated into Treadmill.

A significant update that adds another test (for clock overflow) and (I believe) fixes the underlying issue. See new PR description.

I will look over this tomorrow. Thanks for the nudge.

@ppannuto @tyler-potyondy @brghena all comments addressed


V2.30.1 hotfix & feature

prevent issue "cannot inherit abstract function" on outdated PHP v5.0.0 - v5.3.8 & v7.0.0 - v7.1.x
minor description improvement
add config to allow Customize WooCommerce Order Status upon Payment Paid

Also address & closes https://github.com/veritrans/SNAP-Woocommerce/pull/52


(Ruby) Svix::ApiError Error in the HTTP2 framing layer

Bug Report
Version
0.85.1 (Ruby)
Platform
Debian 5.10.136-1~deb10u3 (2022-09-06)(5.10.0-0.deb10.17-amd64)
Description
After updating Svix to 0.85.1 from 0.82.1 we sometimes see an error being reported when SVIX_CLIENT.message.create is called.
Svix::ApiError
Error in the HTTP2 framing layer
HTTP status code: 0

Whoops, interesting. And it doesn't happen with 0.82.1 at all? Even if you downgrade back now?
I wonder if we also updated a dependency that made it fail.

@tasn we will downgrade and let you know if the issue persists or not.

Thanks! Let me know and we'll start investigating. The reason why we need this verification is that it only happens sometimes which means it'll be hard to reproduce.
Btw, please only downgrade Svix (and whatever dependencies it'll autodowngrade), so that we can make sure it's just the Svix version change that caused it.

@tasn Sorry for the delay. I have downgraded only Svix but the change hasn't been deployed yet. I will keep you updated.

@tasn unfortunately the downgrade didn't fix it. It must have been some of the other changes that also went in the same release.
Thanks for the support!

With pleasure. Let me know if there's anything we can do to help!

@tasn we are wondering if it is because we create a static client rather than one client per request. Do you recommend creating a new client for each request, or is it able to handle multiple requests simultaneously?

Let me reopen this then.
Some people do a client per request, some a long-lived, it varies. I don't know how many do either in Ruby. Are you able to reproduce it with reusing a client but not when creating one per request?

@tasn thanks. I will let you know once we have deployed the change and confirmed if the issue improves or not

Thanks!

OK, thanks, and weird! What version of Ruby are you using? Not the svix lib, actual Ruby.

@tasn my apologies - the change hadn't been deployed yet. It's now deployed and we are currently monitoring.
We are using Ruby 3.2

@tasn we are wondering if it is because we create a static client rather than one client per request. Do you recommend creating a new client for each request, or is it able to handle multiple requests simultaneously?

My solution for a rails app was to monkeypatch Svix::Client in an initializer so that every call to Svix::Client creates a new request.
# config/initializers/svix.rb
# This is monkey patching the Svix gem to allow us to set the API key without passing it in as an argument
# Since they don't have a way to add it in a configure block.
# This allows us to do `Svix::Client.method` in the app
# instead of `Svix::Client.new(ENV["SVIX_AUTH_TOKEN"]).method`
module Svix::Client::MonkeyPatch
  delegate_missing_to :new_client

  def new_client
    @new_client ||= new(ENV["SVIX_AUTH_TOKEN"])
  end
end

Svix::Client.extend Svix::Client::MonkeyPatch

Just an update from my side: creating a new Svix client for each request didn't help us, we're still getting the HTTP2 error occasionally.

I believe we already have retries in the library, though maybe only on 5xx and not on general networking issues? This is the code that does it: https://github.com/svix/svix-webhooks/blob/main/ruby/templates/api_client_typhoeus_partial.mustache#L12
I'd love it if you could contribute a fix for it!

@tasn we updated to use the fix above on October the 11th. Since then we have had no more occurrences of these errors.  Thank you! :tada:

Yay! :)
Sorry for missing your response!


Go instrumentation tool: More README edits

This is a PR that changes the naming of the tool from a branded product to a tool. It also removes the steps for generating instrumentation because those are now going to be over in the main docs site.

@rhetoric101 I made some suggestions. I removed unnecessary instances of the tools name, and otherwise referred to it as Go easy instrumentation.

I will merge this once https://github.com/newrelic/docs-website/pull/18386 is live


Add arch variable to simsensor and simtc infs

Add arch variable to inf files to use specific architecture when building driver solution.

you need to update the Models section names too.  i.e. you need to collapse these into a single section that uses $ARCH$ 👍

Hi @mvillalpando06 . I would like to ask for an entry added to https://github.com/microsoft/Windows-driver-samples/blob/develop/.github/CODEOWNERS as part of this PR.  Contact @NeoAdonis or I offline for further details.


Updated German translation

After derping with the branch I still have two things to change:
A mobile phone in Germany is called a Handy and I think latest could be better translated with newest rather than current.

I would keep "Telefon (mobil)", the term "Handy" is more casual. And on contacts.google.com the type is also called "mobil".
The other change is ok, but threre is an extra , at the end of the line.

Removed the Handy translation and the duplicated comma.


[Bug] Right-Click not working in Windowed DevTools

Before Reporting

[X] I found no existing issues matching my bug
[X] My issue is not caused by a plugin or theme

Describe the Bug
Whenever the DevTools window is used as an unpinned window, it doesn't accept right-click actions.
This makes some copy-actions and sources-related things entirely unusable.
Expected Behavior
Right-Click works as expected, and opens the context menu for the clicked region
Steps To Reproduce

Open DevTools
Put into external window mode (top-right dotted button -> select the left-most dock-side icon)
DevTools doesn't accept right-click.

Operating System
Windows
Discord Version
Stable
BetterDiscord Version
v1.10.1
Anything else?
No response

Works fine on my end, try restarting Discord or your computer.

i had this in the past on multiple reinstalls, both on windows 11 and on Arch Linux.
Also may be worth to note, this does not happen for example on Vencord, there it works totally fine. IDK if BD uses a different version of DevTools, or what's going on at all.

Neither BD or Vencord affect or really touch DevTools aside from adding React DevTools when requested by the user in settings. BD cannot directly affect DevTools like what is being suggested here. The DevTools are just part of the Chromium build and not supplied by the client mods. This is not something I can really fix.

I see. I thought about maybe trying out the "Inject local Devtools" to see if that may fix it, but how does one get such a local devtools install, that just smt you can install?

This is an Electron issue. It is currently affecting stable, but the next electron bump should resolve it https://github.com/electron/electron/issues/38790

I see. I thought about maybe trying out the "Inject local Devtools" to see if that may fix it, but how does one get such a local devtools install, that just smt you can install?

I'm not sure what exactly you mean by this, I'm not familiar with that option

bottom one here. I personally couldn't find a way to "locally install it", all i know is the devtools that are included in all kinds of apps or browsers (discord, steam, chrome, etc)

This is an Electron issue. It is currently affecting stable, but the next electron bump should resolve it electron/electron#38790

Interesting... in this case, Is this by any chance already fixed in the canary/ptb versions of discord?

Yepyep. Was fixed in Electron 29, and PTB/Canary have already been bumped to 30. Shouldn't be long before stable gets updated too

awesome, thanks!

Neither BD or Vencord affect or really touch DevTools aside from adding React DevTools when requested by the user in settings. BD cannot directly affect DevTools like what is being suggested here. The DevTools are just part of the Chromium build and not supplied by the client mods. This is not something I can really fix.

wrong actually, Vencord does fix this issue by disabling the Chromium feature that causes it: https://github.com/Vendicated/Vencord/blob/2f4e346e26d53b88998682672ba6d10a3460c06e/src/main/patcher.ts#L134-L146

wrong actually, Vencord does fix this issue by disabling the Chromium feature that causes it

I mean... that sounds more like a workaround than a root cause fix, but sure.


Farmland is replaced by water via Minestom.

From a 1.16.4 region file.
r.0.0.mca.zip

Was a problem with Minestom.

Was a problem with Minestom.


re: Use string to Icon in MudIcon component

Bug type
Component, Other
Component name
No response
What happened?
Trying to incorporate what was proposed in Question #1124. I am using Server not WASM, if that makes a difference.
However, when I follow the code, I get two errors referencing:

Icons.Material.Filled.GetType()
Icons.Material.Filled

Number 1 gives the error, "Error (active) CS0120	An object reference is required for the non-static field, method, or property 'object.GetType()'".
Number 2 states, "Error (active) CS0119	'Icons.Material.Filled' is a type, which is not valid in the given context".
Expected behavior
Following this example:
<MudIcon Icon="@GetIconInfo(SelectedIcon1)" />
<MudIcon Icon="@GetIconInfo(SelectedIcon2)" />
<MudIcon Icon="@GetIconInfo(SelectedIcon3)" />

@code {
    private string SelectedIcon1 = "AccessTime";
    private string SelectedIcon2 = "AddCircle";
    private string SelectedIcon3 = "AddAlarm";
    private string GetIconInfo(string iconName)
    {
          var info = Icons.Material.Filled.GetType().GetProperty(iconName);
          if (info != null)
          {
              return info.GetValue(Icons.Material.Filled) as string;
          }

          return null;
    }
}

This should let me get the SVG data for an icon
Reproduction link
https://try.mudblazor.com/snippet/GkcFYRYWvydmsjpj
Reproduction steps
On a new component.razor
<MudCard Elevation="4" Style="max-width:350px;">
    <MudCardHeader Style="background:#666; color:white;">
        <CardHeaderContent>
            <MudText Typo="Typo.h5">@cardTitle</MudText>
        </CardHeaderContent>
    </MudCardHeader>
    <MudCardMedia Image="@GetImageUrl()" Height="150" />
    <MudCardContent>
        <MudText Typo="Typo.body2">@GetImageDescription()</MudText>
    </MudCardContent>
    <MudCardActions>
        <MudIconButton Style="@IconDisplay(icon01)" Icon="@IconType(icon01)" />
    </MudCardActions>
</MudCard>

@code {
    [Parameter]
    public string cardTitle { get; set; } = "Title";

    [Parameter]
    public string cardImage { get; set; } = "CardImage.png";

    [Parameter]
    public string cardDescription { get; set; } = "Max length: 41";

    [Parameter]
    public string icon01 { get; set; } = "Storage";

    private string GetImageUrl()
    {
        string strUrl = "/Images/" + cardImage;
        return strUrl;
    }

    private string GetImageDescription()
    {
        string description = cardDescription;
        if (cardDescription.Length > 41)
        {
            cardDescription.Substring(0, 40);
        }
        return description;
    }

    private string IconDisplay(string icon)
    {
        if (icon != string.Empty)
            return "display:block";
        else
            return "display:none";
    }

    private string IconType(string iconName)
    {
        var info = Icons.Material.Filled.GetType().GetProperty(iconName);

        if (info != null)
        {
            return info.GetValue(Icons.Material.Filled) as string;
        }
        return null;
    }
}

Relevant log output
No response
Version (bug)
6.0.10
Version (working)
No response
What browsers are you seeing the problem on?
Firefox, Chrome, Microsoft Edge
On what operating system are you experiencing the issue?
Windows
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I haven't tested this for 6.0.10 but looking at the Icons class I would expect it to work.
As for the try.mudblazor link it is using version 6.0.15 which is different.
The following works for me
private string GetIconInfo(string iconName)
{
    var info = typeof(Icons.Material.Filled).GetField(iconName);
    if (info != null)
    {
        return info.GetRawConstantValue() as string;
    }

    return null;
}

Yes. This works. Thanks!


Schema ?

Hi,
Since the screen and entities are maps or vector of maps or records, do you consider using Prismatic/schema or something similar ? It would at least provide a good and always up-to-date documentation, and could also be used for testing.

Hi Guys, Im quite new to clj and would like to get involved in open source projects, applying schema could be quite a nice way to enter into it. I wouldn't mind having a go at this if it helps out. Whats the best way to get started in contributing changes?

@PeggsDev I think at this point it would be better to use clojure.spec than Schema, since it will be built into the next release of Clojure. You are very welcome to work on that if you're interested. I will absolutely accept PRs for adding specs.

cool, i will try to make some time at the weekend and give it a start, cheers for the prompt reply


hashicorp/yandex does not have a provider named

Hello! Thanks for module yandex compute
Try install and get error
Initializing modules...
Downloading registry.terraform.io/glavk/compute/yandex 0.1.2 for compute...
- compute in .terraform/modules/compute

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/yandex...
- Finding yandex-cloud/yandex versions matching ">= 0.47.0"...
- Installing yandex-cloud/yandex v0.73.0...
- Installed yandex-cloud/yandex v0.73.0 (self-signed, key ID E40F590B50BB8E40)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/yandex: provider registry registry.terraform.io does not have a provider named
│ registry.terraform.io/hashicorp/yandex
│
│ Did you intend to use yandex-cloud/yandex? If so, you must specify that source address in each module which requires that provider. To see which modules are currently depending on
│ hashicorp/yandex, run the following command:
│     terraform providers
╵

Hello!
Thank you for your issue!
You need to have code in your code:
terraform {
  required_version = ">= 0.13"

  required_providers {
    yandex = {
      source  = "yandex-cloud/yandex"
      version = ">= 0.47.0"
    }

  }
}

Please see file versions.tf in examples folder.


Refine the usecases

@RByers
closes #9
Before moving it in to W3C just wanted to address the last issue that I can at the moment here.

LGTM


Tray does not display icons

sway 1.7, waybar 0.9.15
Amazingly all works fine except that the bar takes too long to start. Things like telegram-desktop and nextcloud start much earlier. When waybar starts, it displays an empty tray. I don't know if it's because it starts after the applications that need the tray of something else. It could be that there are multiple problems:

tray taking ages to start
icons not displaying.

wonder if this is known and if there's a workaround for it, like possibly waiting for waybar to start before starting the other programs that need the tray.

I'm on 0.9.16 (latest) and there were multiple issues with the version you currently use (https://github.com/Alexays/Waybar/issues/1792) even this tray-issue is not mentioned in the release-info specifically - I would highly suggest to upgrade. As far as reported (logs could be helpful too) I can't reproduce the issue with the latest release even if I stop all waybar processes (having telegram-desktop, slack, ferdium and even gammastep which has it tray issues) running and relaunch waybar all tray-icons show up again as I would expect it. (even there are some warnings in the output that they are already registered)


Easy Issue (C) #1414 Update sum.c

Fixed issue #1414 by implementing a sum function without using the "+" operator, as requested.
Pull Request Type
What kind of change does this PR introduce?
[X] Solved an issue/task
What is the current behavior?
There was a requirement to implement a sum function without using the "+" operator.
What is the new behavior?
The sum function has been implemented using bitwise operations to avoid the use of the "+" operator.
Other information
No additional information.

Merged

This is an automated message from Fork, Commit, Merge [BOT].

Thank you for your contribution! Your pull request has been merged. The files have been reset for the next contributor.
What's next?
If you're looking for more ways to contribute, I invite you to check out our forkcommitmerge.io website repository. The repository contain real issues that you can help to resolve or create some of your own if you see any bugs or want to add new features to the site, etc. You can also check out the Influences section in the README to find more projects similar to this one.
Also please leave a star to this project if you feel it helped you, i would really appreciate it.
I look forward to seeing your contributions!


Add tox for the plugin

Currently, the only tox configuration is for the test app. There should also be a top-level tox.ini for the plugin itself so that the plugin code is formatted/linted/tested.

Closed by #20


[Validators] Validators details

Acceptance criteria

[ ] I can see the validator's profile
[ ] I can see the Information section of this validator
[ ] I can click on this validator's address and switch to its wallet portfolio page

Test flow
Check bigdipper
Design

Remarks

Let's make the value of validator since & Max commission rate & Last Commission change use black-font because it's unclickable but dark-green indicates clickable

Annual profit: "inflation / staking ratio * (1-commssion rate)" this is provided by Kin, but please consult Rick before you get started

@mitchellchou are the annual profit (in first panel) and expected return (in your stake panel) actually referring to the same value? If not, what is the difference between them?

@ivanng-oursky I think no.
Annual profit is the profit this validator would make; Expected Returns is when you stake in this validator how much can possibly return
Please consult Rick on how annual profit is calculated.

@mitchellchou so annual profit is what would be gained by the node operator? don't think that info is useful to most users? (and the label would be misleading - as user i would expect "Annual Profit" to mean what I would earn if i stake with that validator)

The expected returns should come from current dao.like.co

The annual profit should come from ping.hub

And based on this article,  annual profit is what would be gained by the node operator

@chihimng I guess it might be a useful info because staking also allows validator to vote on my behalf, so I want to know how rich it is?

i guess "Operator Annual Profit" would be better in this case?

I think you are right, let's don't show the annual profit field for now. Thank Thank
as its name is not intuitive, and people usually tell if a validator is earning reasonable money by commission rate already. (I also asked Kenji and he thought it was the staking rewards)

Let's drop "Desmos" for now. Only need to display info that we can query from likecoin chain (moniker I think?)
Rename the Annual profit to APY and shows the expected return when I stake to this validator
Remove the "Expected Returns" field from your stakes section (only remove for validator details page)

https://mainnet.likedao-dev.pandawork.com/validators/likevaloper1knfp5qgzgr29k00nhjp2qzxlezrlalhyh77e4c

wrong self stake
wrong max commission / max daily commission

compare to

https://stake.like.co/validators/likevaloper1knfp5qgzgr29k00nhjp2qzxlezrlalhyh77e4c
https://bigdipper.live/likecoin/validators/likevaloper1knfp5qgzgr29k00nhjp2qzxlezrlalhyh77e4c


Add fallback parser

We could consider just call lftp monitor directly to handle pages like https://sources.buildroot.net/br-cargo-home/registry/src/index.crates.io-6f17d22bba15001f/libmimalloc-sys-0.1.33/c_src/mimalloc/docs/:

Which might be required but absolutely not a file listing.

f31130782732b2f9d481034a0c198d993e975ed7 (requires index.html or index.htm existing)


suggestion: making Write blocking instead of returning a channel

Thank you for such a great library!
The current Write returns a channel
func Write(t Format, buf []byte) <-chan struct{}

but an example in the comments doesn't use this channel. Is this intended? So I was a little confused whether the channel should be used or not.
In order to avoid confusion, wouldn't it better to change Write blocking and let users decide whether they wait for returning or not? They could use their own channels if they wanted to use Write as non-blocking. This suggestion would simplify the API and consistent with Read, which is already blocking.
What do you think? Thanks,

I remember why I decided to do the api in this way. The main reason is for Linux users, they always have to use the blocking version. https://github.com/golang-design/clipboard/blob/b50badc062a526673961e1465a673e3f3dfc1464/clipboard_linux.go#L107-L126 because only in this way the content will be served in a goroutine and wait until the reader reads it. Otherwise, If the linux users don't block on the channel, they will not be able to read what was written before.
Also, if a user ignores the channel, it won't leak anything and as long as the channel is GCed the internal goroutines will be closed.
This is also sometimes confusing from the user perspective
see also https://github.com/golang-design/clipboard/issues/15, https://github.com/golang-design/clipboard/issues/35
Maybe we could better revise the document of Write?

I'm afraid I don't understand.

The main reason is for Linux users, they always have to use the blocking version.

So, always blocking at Write is better...?

Hm. Not really.
For linux x11 users, they have to block on this channel to make sure other readers can read from this write:
ch := clipboard.Write(clipboard.FmtText, []byte("x"))
go func() { <-ch }
clipboard.Read(clipboard.FmtText) // x

Otherwise
clipboard.Write(clipboard.FmtText, []byte("x"))
clipboard.Read(clipboard.FmtText) // "" empty

On darwin:
ch := clipboard.Write(clipboard.FmtText, []byte("x"))
go func() { <-ch }
clipboard.Read(clipboard.FmtText) // x

do not differ from
clipboard.Write(clipboard.FmtText, []byte("x"))
clipboard.Read(clipboard.FmtText) // x

ch := clipboard.Write(clipboard.FmtText, []byte("x"))
go func() { <-ch }
clipboard.Read(clipboard.FmtText) // x

Hmm? This sounds indeterministic and Read can be called before <-ch, right?
My suggestion is to change the function like this:
func Write(t Format, buf []byte) {
	lock.Lock()
	defer lock.Unlock()

	changed, err := write(t, buf)
	if err != nil {
		if debug {
			fmt.Fprintf(os.Stderr, "write to clipboard err: %v\n", err)
		}
		return
	}
        <-changed
}

How will this suggestion change the behavior of darwin/windows? On darwin/windows, a write can be observed as long as the Write returns, and users might not be interested in blocking until the content is changed.

Either way this change will be breaking and thankfully we haven't in 1.x release yet :)

How will this suggestion change the behavior of darwin/windows? On darwin/windows, a write can be observed as long as the Write returns, and users might not be interested in blocking until the content is changed.

This sounds purely a performance issue. So, we can make closing the channel changed earilier in clipboard_windows.go and clipboard_darwin.go. I am not sure the time difference, but I assume this is microseconds order.

My current whole idea is the above new Write implementation.

This sounds purely a performance issue.

I think there is still a misunderstanding about the usage here.
ch := clipboard.Write(clipboard.FmtText, []byte("x"))
<-ch // block forever if there is no other write changes the "x" to other content.

I am not sure I can understand the impact now.. I think the best approach is to sketch the PR and see what will happen.
Before doing that, as I mentioned before, the reason was due to the X11's clipboard system, and commented before here https://github.com/golang-design/clipboard/issues/15#issuecomment-959519399.
Also a read to this might be helpful https://www.uninformativ.de/blog/postings/2017-04-02/0/POSTING-en.html "Program 3: Owning a selection"

I don't understand either..
ch := clipboard.Write(clipboard.FmtText, []byte("x"))
go func() { <-ch }
clipboard.Read(clipboard.FmtText) // x

I think this is indeterministic but do you agree?

<-ch // block forever if there is no other write changes the "x" to other content.

Is this the same even for Linux?

I think this is indeterministic but do you agree?

No. It is deterministic, we can always expect this code the read to return "x"
But this we can't:
clipboard.Write(clipboard.FmtText, []byte("x"))
clipboard.Read(clipboard.FmtText)

On Linux, I could get an expected result without reading a channel..
parallels@parallels-Parallels-Virtual-Platform /media/psf/Home/test/clipboard
$ go version
go version go1.21.0 linux/amd64
parallels@parallels-Parallels-Virtual-Platform /media/psf/Home/test/clipboard
$ cat main.go
package main

import (
        "golang.design/x/clipboard"
)

func main() {
        clipboard.Write(clipboard.FmtText, []byte("x"))
        println(string(clipboard.Read(clipboard.FmtText)))
}
parallels@parallels-Parallels-Virtual-Platform /media/psf/Home/test/clipboard
$ go run main.go
x

I could get an expected result without reading a channel..

This is probably by luck. Also, you can try to read again after the program is existed. The "x" will disappear

OK I'll read the current implementation carefully later. I still think there is room to improve the current API.
Thank you for elaborating!

PR always welcome.

Is my understanding correct?

No. (2) ensures that the internal goroutine in the Write's implementation holds the ownership of the written content, and the returning ch won't be garbage collected and then lose ownership of "x".
This is not the most important case, we are likely to want to write "x" to the clipboard, and read and paste it out from another application, e.g. paste it to the URL address bar of a browser. If the application that writes the "x" exited, and lost ownership of the content, on Linux, the "x" will not be pastable in the browser anymore.

No. (2) ensures that the internal goroutine in the Write's implementation holds the ownership of the written content, and the returning ch won't be garbage collected and then lose ownership of "x".

OK so the lifetime of ch matters rather than this is closed or not, right? Then, would this work?
ch := clipboard.Write(clipboard.FmtText, []byte("x"))
clipboard.Read(clipboard.FmtText)
runtime.KeepAlive(ch)

It can work, but only if the application is still alive.
This is not the most critical case, we are likely to want application A to write "x" to the clipboard, and read and paste it out from another application B, e.g. paste it to the URL address bar of a browser. If the application A does a write "x", but A exits immediately after that write, on Linux, the "x" will disappear and cannot be observed from B anymore.

It can work, but only if the application is still alive.

ch := clipboard.Write(clipboard.FmtText, []byte("x")) // (1)
go func() { <-ch }() // (2)
clipboard.Read(clipboard.FmtText) // (3)

Isn't this in the same situation? i.e. (2) might not be called before the application exits.

This is not the most important case, we are likely to want to write "x" to the clipboard, and read and paste it out from another application, e.g. paste it to the URL address bar of a browser. If the application that writes the "x" exited, and lost ownership of the content, on Linux, the "x" will not be pastable in the browser anymore.

I don't understand the ownership means here. Write creates an internal goroutine, which refers the done channel. This should not be GCed as long as the goroutine lives even if the returned done channel is not referred by the caller. So, I still don't understand the difference between
clipboard.Write(clipboard.FmtText, []byte("x"))
clipboard.Read(clipboard.FmtText)

and
ch := clipboard.Write(clipboard.FmtText, []byte("x"))
clipboard.Read(clipboard.FmtText)
runtime.KeepAlive(ch)

. Actually I have not seen the former case failed yet.
For other applications, the channel might have to be closed in order to sync the state, but the lifetime of it should not matter. If it matters, this is beyond my understanding of Go... I'm sorry if my questions bother you.

Let's take one step back: What is the goal of the discussion right now? Understanding the platform specific behavior or shaping a new design of the API?
For the first one I suggest to read a link that I sent in previous comments which explains what does ownership mean in X11's design; For the second I would suggest to sketch a PR, adapting the existing examples, a few possible users of the package, and understand the overall impact.
This thread grows significantly more than expected and I am pretty much like to address them via a video call and chat about it rather than typing a lot.. Will you available for a Google meet call?

Let's take one step back: What is the goal of the discussion right now? Understanding the platform specific behavior or shaping a new design of the API?

Understanding the platform specific behavior for now.

For the first one I suggest to read a link that I sent in previous comments which explains what does ownership mean in X11's design; For the second I would suggest to sketch a PR, adapting the existing examples, a few possible users of the package, and understand the overall impact.

My question is whether the caller's reference to a channel affects the behavior (and you said yes, but I don't think so). This doesn't related to X11's design. This is purely a Go question.

This thread grows significantly more than expected and I am pretty much like to address them via a video call and chat about it rather than typing a lot.. Will you available for a Google meet call?

I would like to focus on my current Go question for now. I don't think we need a video call to resolve this question... After that, we might need a video call to design an API, but I cannot go futher until my question is resolved.

OK, you are correct, then?

So wasn't https://github.com/golang-design/clipboard/issues/52#issuecomment-1681742055 correct? (This is just confirming)

Confirming. Then?

So, my understanding is
clipboard.Write(clipboard.FmtText, []byte("x"))
println(string(clipboard.Read(clipboard.FmtText))) // x

always works on Linux, without holding the channel.

Then?

Let me take tiime to polish my idea. I might send a PR later.
I just wanted to confirm what you meant the ownership meant (and apprently there is no ownership notion there). I'm sorry if I bothered you, but I think understanding this point is critical.

Thanks. Looking forward.


Alt-l broken

On Atom 0.201.0, it seems that alt-l doesn't work: pressing alt-l brings up a text entry box with an hour-glass symbol below it. Typing text into the box doesn't bring up symbols.

Still happens. Can this be merged ASAP?

@klorenz Can this be closed?


Flux configuration should allow for non-ssh auth for git

Last week, we encountered a scenario where we were unable to use SSH keys to authenticate with git.  HTTPS has become a more common way to access git (e.g<EMAIL_ADDRESS>and it's possible that there are customers who would prefer to authenticate this way.
ask: Bedrock tooling supports HTTPS, in addition to SSH, for git authentication

Hi @pjlittle, are you referring to taking advantage of this Flux configuration?

Yes - I believe I found similar documentation on GitHub.  Being able to specify/pipe a git url via HTTPS and use a token to authenticate would be great. Every now and again we find that some customers have policies that require them to use HTTPS. Would be great to have the option to configure Flux that way, via Bedrock.