Security guide

@shentao I decided to leave out SSR (at least for now), since most people aren't using it and we already cover security concerns specific to SSR throughout the SSR docs rather than consolidated on a single page.

What about a short "tip" like this:

Building Server-Side Rendered Applications, requires additional care to make the application secure. Please visit the ssr.vuejs.org site to learn how to avoid common issues and vulnerabilities.

@shentao I just added a note at the end. What do you think?

Perfect! Couldn’t write it better myself. 👍

Thank you gentelemen!  We really appreciate this!

Looks great. There's one thing I would add: sometimes we receive vulnerability reports on how it's possible to do XSS in Vue templates - and we in general do not consider such cases actual vulnerabilities, because there are two possible cases for this to actual lead to a breach:

You are explicitly asking Vue to render user-provided, unsanitized content as Vue templates. This is inherently unsafe and it's impractical for Vue to protect you from that.

You are mounting Vue to an entire HTML page which happens to contain server-rendered & user-provided content. This is actually fundamentally the same with (1), but sometimes devs may do it without realizing it. This can lead to possible vulnerabilities where the attacker provides HTML which is safe as plain HTML but unsafe as a Vue template. The best practice is to never mount Vue on nodes that may contain server-rendered & user-provided content.

Hey @chrisvfritz! If you have time, could you please let me know where this one is at? I also wouldn't mind finishing it up for you if you're busy. Thanks!

Looking to kick start this again @chrisvfritz .


A lot of updates at once. Should be okay, though?

Unfortunately, I think some of the files (e.g. TOC and environment) have been changed elsewhere. Something will probably need to be done to ensure overlapping changes are retained in the way we intend, which looks to be what GitHub is insisting be done.

The build fail seems to still be falling back on the API Key.

cc: @mgrover1


Add slaves for .NET Core 1.0 and 1.1

Per https://bugzilla.redhat.com/show_bug.cgi?id=1451403, adding support for 1.x
CC @jerboaa @bparees @omajid
comments:

using openshift3 to be able to pull
doesn't build on my machine .... it doesn't find the dotnet package... strange

No package rh-dotnetcore10 available.
Error: Nothing to do

The build needs to be done (host) on a properly subscribed RHEL machine with the rhel-7-server-dotnet-rpms channel. I don't really know how to test this so I'm only inspecting by eye. Review follows.

The build needs to be done (host) on a properly subscribed RHEL machine with the rhel-7-server-dotnet-rpms channel. I don't really know how to test this so I'm only inspecting by eye. Review follows.

@jerboaa I'm using the same machine to build the s2i image and that works fine. So I guess it's not a subscription issue?

@bparees @jerboaa @omajid Thanks for reviewing. I've updated the PR. I still can't build this, will find you on irc to figure out why.

Looks good to me (modulo nss_wrapper).

@jerboaa figured out I needed yum-utils to be able to install the packages. I assume this is part of the base image.

@bparees I don't have any more changed in mind. How can we check if this works?

well for now you can build the image and attempt to use it as a slave in an openshift cluster...
with the 3.6 release in full swing i'm not going to have a chance to really revisit this until the week after next.

@bparees thank you for reviewing, I've updated the PR.

pretty sure this is going to explode when it tries to build/test the non-existent centos image, but let's [test] it.

@bparees I don't know what to change to make this work. Should the dotnet-slaves only be added in Makefile for rhel? Would that fix the build?

I'm needing this PR :)

closing since this is going to be delivered in its own repo.


Return parseQueryString

Return parseQueryString to file app/extensions/utils-extension/utils-extension.js.
This is used in other projects.

on other project


Composition constraint not satisfied?

Hello,
I like the Honegumi philosophy and decided to try and reproduce the results from the tutorial Multi Objective Optimization of Polymers for Strength and Biodegradability using the Google Colab link (mobo.ipynb) provided on the Honegumi website.
When running ax_client.get_trials_data_frame() after the 35 trials (Sobol and BoTorch) of the tutorial and inspecting this dataframe, I noticed that the composition constraint (sum of the x1-x5 feature values should equal 1.0) was not satisfied for the large majority of trials.
Can someone confirm that this is indeed the case?
Could there be an issue with the way the composition constraint is currently defined/coded?
Thanks for any feedback/help!

I'm digging a bit deeper in the code. Could it be that the ax_client.get_trials_data_frame() dataframe does not show the updated x5 (1.0 - (x1+x2+x3+x4))? In that case it looks like the sum does not add up to one in the dataframe but in fact the composition constraint is correctly applied.

I'm digging a bit deeper in the code. Could it be that the ax_client.get_trials_data_frame() dataframe does not show the updated x5 (1.0 - (x1+x2+x3+x4))? In that case it looks like the sum does not add up to one in the dataframe but in fact the composition constraint is correctly applied.

Thanks for catching! @AndrewFalkowski could you update the tutorial such that x5 is "hidden" from Ax's perspective? (I.e., shouldn't appear in the search space, gets calculated outside of Ax before passing the parameters into the obj. function)

Thanks for catching! @AndrewFalkowski could you update the tutorial such that x5 is "hidden" from Ax's perspective? (I.e., shouldn't appear in the search space, gets calculated outside of Ax before passing the parameters into the obj. function)

Great! I really like the tutorials with examples from the materials field, thanks a lot!

Hi,
I'm still trying to wrap my head around the way that the composition constraint is currently applied in Honegumi/Ax. Using the example from above (where x5 = 1.0 - (x1+x2+x3+x4)), I understand that the updated x5 is submitted to the dummy objective function (called "measure_properties" in the Honegumi tutorial) in order to calculate the (dummy) response. However, it seems that the AxClient instance itself does not update x5 and so continues to work with x1-x5 values that do not satisfy the composition constraint of 1.0. Doesn't this affect the calculation of newly suggested trials using Bayesian optimization? Maybe this is clearly not an issue, and my question stems from my lack of knowledge about Bayesian optimization (I'm very new to it), but I just wanted to ask.
Thanks!

Hi @henkjanvanmanen, I just finished updating the tutorial (sorry for the delay). This should now be self-consistent. Could you have a look and let me know if this makes sense now?

Hi @sgbaird, thanks for the update of the mobo tutorial. Looking at the updated notebook, the ax_client instance now never sees/uses the x5 parameter, correct?
I ran the updated notebook both in Colab and in my local environment (both with the same AxClient random_seed of 12345). The output from Colab is shown below (output from running in my local environment is quite similar).

What I notice is that the location of the pareto front differs from the image shown on the Honegumi site. Lower biodegradability values are found by the Bayesian optimization method (max. biodegradability around 11) compared to before (max. about 16), what could be the explanation for this? And do you see this as well?

Since the search space changed, the optimization won't be identical. Also, it's a single search campaign, so there's stochasticity in the performance. If you want to dig in further, it would probably be best to do two things:

Create a massive set of parameter combinations (e.g., 10k-100k, I have an example - I'll try to dig it up) and use that to approximate the true Pareto front. Keep in mind the objective function was made up to keep things simple while still illustrating the concept.
Run repeat campaigns

This gets into the topic of robust benchmarking. Given that the objective function is made up, I'm not sure it's worth spending a lot of time on this specific task.

Large Sobol sampling via Ax example: https://github.com/sparks-baird/matsci-opt-benchmarks/blob/main/scripts%2Fcrabnet_hyperparameter%2Fcrabnet_hyperparameter_submitit.py#L75-L78


Uploads to Service Travis CI Fail With Status Code 400

Describe the bug
Uploads to Travis CI fail.
To Reproduce

Go to https://travis-ci.com/github/tagatac/bagoup/builds/235325025#L340
Click on the arrow next to line 296
Scroll down to line 340
See error Error uploading to Codecov when fetching PUT (inner): 400 Invalid request parameters

Expected behavior
The coverage report is uploaded and processed without issue.
Additional context
See for comparison a successful upload of the same report, disguised as a local CI provider by unsetting the environment variable CI: https://travis-ci.com/github/tagatac/bagoup/builds/235324541
Note in the failing example pr=NaN could be problematic.

pr=NaN is 100% to blame here, the server requires that to be either a number, or empty.
There should be code to convert all NaNs to '' prior to upload, let us investigate what failed with that process here.

The NaN is coming from https://github.com/codecov/uploader/blob/master/src/ci_providers/provider_travisci.ts#L33
Ah, no. we are converting 0 to ''. https://github.com/codecov/uploader/blob/master/src/helpers/web.ts#L114-L116
Will get a fix in as we are able. PRs welcome.


Re-running a flame sample displays an error in the console

Running a flame app throws an error on subsequent runs:
"Error: Assertion failed: file:///Users/brettmorgan/Documents/GitHub/dart-services/flutter-sdks/dev/packages/flutter/lib/src/rendering/mouse_tracker.dart:222:12 (event is PointerAddedEvent) == (lastEvent is PointerRemovedEvent) is not true"

errors.dart:251 Uncaught (in promise) Error: Assertion failed: file:///Users/brettmorgan/Documents/GitHub/dart-services/flutter-sdks/dev/packages/flutter/lib/src/foundation/stack_frame.dart:114:12
match != null
"Expected Error: Assertion failed: file:///Users/brettmorgan/Documents/GitHub/dart-services/flutter-sdks/dev/packages/flutter/lib/src/services/hardware_keyboard.dart:437:16 to match RegExp/^(.+) (\\d+):(\\d+)\\s+(.+)$/."
    at Object.throw_ [as throw] (errors.dart:251:49)
    at Object.assertFailed (errors.dart:29:3)
    at Function._parseWebDebugFrame (stack_frame.dart:114:17)
    at Function._parseWebFrame (stack_frame.dart:100:14)
    at MappedIterator.new.fromStackTraceLine (stack_frame.dart:202:14)
    at MappedIterator.new.moveNext (iterable.dart:391:20)
    at WhereTypeIterator.new.moveNext (iterable.dart:869:20)
    at JsIterator.next (operations.dart:748:20)
    at Function.of (core_patch.dart:533:14)
    at WhereTypeIterable.new.toList (iterable.dart:470:12)
    at Function.fromStackString (stack_frame.dart:89:37)
    at Function.fromStackTrace (stack_frame.dart:80:12)
    at assertions.FlutterErrorDetails.new.debugFillProperties (assertions.dart:709:57)
    at diagnostics.dart:2992:17
    at assertions._FlutterErrorDetailsNode.new.get builder (diagnostics.dart:2994:16)
    at assertions._FlutterErrorDetailsNode.new.get builder [as builder] (assertions.dart:1285:56)
    at assertions._FlutterErrorDetailsNode.new.getProperties (diagnostics.dart:3009:105)
    at diagnostics$.TextTreeRenderer.new.[_debugRender] (diagnostics.dart:1244:62)
    at diagnostics$.TextTreeRenderer.new.render (diagnostics.dart:1121:14)
    at dumpErrorToConsole (assertions.dart:1013:44)
    at Function.reportError (assertions.dart:1177:14)
    at binding.dart:379:24
    at Generator.throw (<anonymous>)
    at async_patch.dart:60:31
    at _RootZone.runBinary (zone.dart:1690:54)
    at _FutureListener.thenAwait.handleError (future_impl.dart:174:22)
    at handleError (future_impl.dart:778:46)
    at Function._propagateToListeners (future_impl.dart:799:13)
    at _Future.new.[_completeError] (future_impl.dart:609:5)
    at async._AsyncCallbackEntry.new.callback (future_impl.dart:665:7)
    at Object._microtaskLoop (schedule_microtask.dart:40:11)
    at _startMicrotaskLoop (schedule_microtask.dart:49:5)
    at async_patch.dart:166:15

This is probably because we aren't cleaning up the iframe correctly when package:flame is used.

The exception I see comes from Flutter parses stack frames:
Uncaught (in promise) Error: Assertion failed: file:///Users/brettmorgan/Documents/GitHub/dart-services/flutter-sdks/dev/packages/flutter/lib/src/foundation/stack_frame.dart:114:12
match != null
"Expected Error: Assertion failed: file:///Users/brettmorgan/Documents/GitHub/dart-services/flutter-sdks/dev/packages/flutter/lib/src/services/hardware_keyboard.dart:437:16 to match RegExp/^(.+) (\\d+):(\\d+)\\s+(.+)$/."

But this seems to be hiding the underlying issue, since the assert message isn't matching the regex defined in _parseWebDebugFrame:
  // Flutter SDK
  static StackFrame _parseWebDebugFrame(String line) {
    // This RegExp is only partially correct for flutter run/test differences.
    // https://github.com/flutter/flutter/issues/52685
    final bool hasPackage = line.startsWith('package');
    final RegExp parser = hasPackage
        ? RegExp(r'^(package.+) (\d+):(\d+)\s+(.+)$')
        : RegExp(r'^(.+) (\d+):(\d+)\s+(.+)$');
    Match? match = parser.firstMatch(line);
    assert(match != null, 'Expected $line to match $parser.');
    match = match!;

This is the underlying assert that gets triggered:
  // Flutter SDK
    assert(() {
      const String common = 'If this occurs in real application, please report this '
        'bug to Flutter. If this occurs in unit tests, please ensure that '
        "simulated events follow Flutter's event model as documented in "
        '`HardwareKeyboard`. This was the event: ';
      if (event is KeyDownEvent) {
        assert(!_pressedKeys.containsKey(event.physicalKey),
          'A ${event.runtimeType} is dispatched, but the state shows that the physical '
          'key is already pressed. $common$event');
      } else if (event is KeyRepeatEvent || event is KeyUpEvent) {
        assert(_pressedKeys.containsKey(event.physicalKey),
          'A ${event.runtimeType} is dispatched, but the state shows that the physical '
          'key is not pressed. $common$event');
        assert(_pressedKeys[event.physicalKey] == event.logicalKey,
          'A ${event.runtimeType} is dispatched, but the state shows that the physical '
          'key is pressed on a different logical key. $common$event '
          'and the recorded logical key ${_pressedKeys[event.physicalKey]}');
      } else {
        assert(false, 'Unexpected key event class ${event.runtimeType}');
      }
      return true;
    }());

A similar problem is happening with pointer events:
Uncaught Error: Assertion failed: file:///Users/brettmorgan/Documents/GitHub/dart-services/flutter-sdks/dev/packages/flutter/lib/src/rendering/mouse_tracker.dart:222:12
(event is PointerAddedEvent) == (lastEvent is PointerRemovedEvent)
is not true
    at Object.throw_ [as throw] (errors.dart:251:49)

  // Whether an observed event might update a device.
  static bool _shouldMarkStateDirty(_MouseState? state, PointerEvent event) {
    if (state == null)
      return true;
    assert(event != null);
    final PointerEvent lastEvent = state.latestEvent;
    assert(event.device == lastEvent.device);
    // An Added can only follow a Removed, and a Removed can only be followed
    // by an Added.
    assert((event is PointerAddedEvent) == (lastEvent is PointerRemovedEvent));


Test fails due to stack traces

Hi, tests are failing again since go 1.11.
Maybe @gabrielf could come up again with a solution for this? :P
Thanks a lot.
$ go version
go version go1.11.5 linux/amd64

$ go test -vet=off -v -p 4 github.com/go-errors/errors
=== RUN   TestStackFormat
--- FAIL: TestStackFormat (0.00s)
    error_test.go:33: Stack trace does not contain source line: 'a: b(5)'
    error_test.go:34: /build/golang-github-go-errors-errors-1.0.1/obj-x86_64-linux-gnu/src/github.com/go-errors/errors/error_test.go:21 (0x4f5f35)
        	TestStackFormat.func1: e, expected := Errorf("hi"), callers()
        /usr/lib/go-1.11/src/runtime/asm_amd64.s:522 (0x455b3b)
        	call32: CALLFN(·call32, 32)
        /usr/lib/go-1.11/src/runtime/panic.go:513 (0x429df9)
        	gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
        /build/golang-github-go-errors-errors-1.0.1/obj-x86_64-linux-gnu/src/github.com/go-errors/errors/error_test.go:245 (0x4f38ff)
        	TestStackFormat: panic('a')
        /usr/lib/go-1.11/src/testing/testing.go:827 (0x4b573f)
        	tRunner: fn(t)
        /usr/lib/go-1.11/src/runtime/asm_amd64.s:1333 (0x4576d1)
        	goexit: BYTE	$0x90	// NOP

Originally reported in Debian [1] by Adrian Bunk.

Hi, is there any update on this? Maybe even a "Won't Fix"?

Hey Rock! We’re using an internal copy of this right now — would love a pull request if you feel up for it,
Conrad
On Tue, Apr 23 2019 at 9:49 AM, Bhavesh Kakadiya <<EMAIL_ADDRESS>> wrote:

Hi, is there any update on this? Maybe even a "Won't Fix"?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (
https://github.com/go-errors/errors/issues/21#issuecomment-485884978 ) , or
mute the thread (
https://github.com/notifications/unsubscribe-auth/AAAXAQE4FLGZR2GPODWQ4NTPR44Y3ANCNFSM4GTLQ3UA
).

Hi @ConradIrwin, I would love a PR on this too :P.
In all honesty, I've tried and failed. I clearly lack the knowledge here. If this is going to be a "won't-fix" I'll have to propose ignoring this particular test on the Debian package, which is something I'm currently reluctant to do.
Thanks for answering anyway.

For some reasons, this test seems to pass with Go 1.12, but continues to fail with Go 1.11.
Tested with go1.12.7 and go1.11.12.

For some reasons, this test seems to pass with Go 1.12, but continues to fail with Go 1.11.

Great news. Thanks for the fix in Debian.

For some reasons, this test seems to pass with Go 1.12, but continues to fail with Go 1.11.

Great news. Thanks for the fix in Debian.

You're very welcome.  I needed the fix myself anyway.  :-)
The stack trace test seems very flaky; or, rather, Go sometimes generate unpredictable stack trace?  I am seeing different stack trace outputs with gccgo-8 and gccgo-9, for example, on amd64 vs mipsel.

gccgo-8 on amd64: FAIL.
gccgo-9 on amd64: PASS.  Yay!
gccgo-8 on amd64: TestStackFormat passes, but TestNew fails:

--- FAIL: TestNew (0.00s)
	error_test.go:81: Stack didn't match
	error_test.go:82: First entry PC diff to large (36)
		Actual stack trace:
		/home/foka/golang-github-go-errors-errors-1.0.1/error_test.go:78 (0x5559d307)
			__home_foka_golang_github_go_errors_errors_1_0_1.TestNew
		../../../src/libgo/go/testing/testing.go:777 (0x77924fbb)
			testing.tRunner
		../../../src/libgo/go/runtime/proc.go:1167 (0x778a2293)
			runtime.kickoff

		Expected stack trace:
		/home/foka/golang-github-go-errors-errors-1.0.1/error_test.go:78 (0x5559d32b)
			__home_foka_golang_github_go_errors_errors_1_0_1.TestNew
		../../../src/libgo/go/testing/testing.go:777 (0x77924fbb)
			testing.tRunner
		../../../src/libgo/go/runtime/proc.go:1167 (0x778a2293)
			runtime.kickoff

gccgo-9 on mipsel:

# _/home/foka/golang-github-go-errors-errors-1.0.1 [_/home/foka/golang-github-go-errors-errors-1.0.1.test]
go1: internal compiler error: in mangled_name, at go/gofrontend/names.cc:559
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
FAIL	_/home/foka/golang-github-go-errors-errors-1.0.1 [build failed]

Oh well...

The stack trace test seems very flaky; or, rather, Go sometimes generate unpredictable stack trace? I am seeing different stack trace outputs with gccgo-8 and gccgo-9, for example, on amd64 vs mipsel.

Traces look the same but for that number at the end (the program counter?):
/home/foka/golang-github-go-errors-errors-1.0.1/error_test.go:78 (0x5559d307)
/home/foka/golang-github-go-errors-errors-1.0.1/error_test.go:78 (0x5559d32b)
So maybe the stack comparison should be relaxed to allow such mismatch? I'm honestly too lost here.

So maybe the stack comparison should be relaxed to allow such mismatch? I'm honestly too lost here.

Sorry, I might have overemphasized and missed the main point.  Although the test is indeed a bit flaky, or rather, Go's stack trace does not seem to produce identical output, I wouldn't worry too much as long as, for instance, it builds fine on Debian buildd machine and passes the automated tests:

https://tracker.debian.org/pkg/golang-github-go-errors-errors
https://buildd.debian.org/status/package.php?p=golang-github-go-errors-errors
https://ci.debian.net/packages/g/golang-github-go-errors-errors/

where both the buildd and the automated tests runs only on amd64 with the standard Go compiler (gc) and never with MIPS or gccgo.  Furthermore, this particular test really doesn't affect the usability of this Go library, so all is fine now IMHO.  :-)


Helm Chart extraConfig's comments generating invalid ConfigMap

Is there an existing issue for this?

[X] I have searched the existing issues

Version
v1.16.0-rc.1 or higher
What happened?
The extraConfig field description comments are incorrectly indented. When the option is used the generated ConfigMap gets invalid, causing the installation to fail.
How it happened?

Install cilium with helm install cilium cilium/cilium --version 1.15.3 --set extraConfig.enable-direct-routing="false"

Error: UPGRADE FAILED: cannot patch "cilium-config" with kind ConfigMap:  "" is invalid: patch: Invalid value: ... : json: cannot unmarshal bool into Go struct field ConfigMap.data of type string

The generated ConfigMap, that causes the error, will be:
#### Source: cilium/templates/cilium-configmap.yaml
...
# Extra config allows adding arbitrary properties to the cilium config.
# By putting it at the end of the ConfigMap, it's also possible to override existing properties.

  enable-direct-routing: false

Kernel Version
6.6.32-1-lts
Kubernetes Version
Client Version: v1.30.2
Server Version: v1.28.5
Regression
No response
Sysdump
No response
Relevant log output
No response
Anything else?
No response
Cilium Users Document

[X] Are you a user of Cilium? Please add yourself to the Users doc

Code of Conduct

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

The reason why it fails is because the false is being considered a boolean and not a string. You need to as such:
helm install cilium cilium/cilium --version 1.15.3 --set-string extraConfig.enable-direct-routing="false"

The reason why it fails is because the false is being considered a boolean and not a string. You need to as such:
helm install cilium cilium/cilium --version 1.15.3 --set-string extraConfig.enable-direct-routing="false"

Hey @aanm, I replied in the PR but will also do it here. I tried with the quotes and the problem continued. When I removed extraConfigs, it resolved. I believe the problem is really the unindented comments.

The reason why it fails is because the false is being considered a boolean and not a string. You need to as such:
helm install cilium cilium/cilium --version 1.15.3 --set-string extraConfig.enable-direct-routing="false"

Hey @aanm, I replied in the PR but will also do it here. I tried with the quotes and the problem continued. When I removed extraConfigs, it resolved. I believe the problem is really the unindented comments.

Make sure you use --set-string instead of --set as pointed out before.

The reason why it fails is because the false is being considered a boolean and not a string. You need to as such:
helm install cilium cilium/cilium --version 1.15.3 --set-string extraConfig.enable-direct-routing="false"

Hey @aanm, I replied in the PR but will also do it here. I tried with the quotes and the problem continued. When I removed extraConfigs, it resolved. I believe the problem is really the unindented comments.

Make sure you use --set-string instead of --set as pointed out before.

Thanks for emphasizing --set-string, I had only tested with --set.
Actually, the quotes are passed forward only with --set-string, and it worked using it.
Thank you for your help and insistence.
Despite working, the generated ConfigMap had non-standard identation. Do you think it is worth making this change (renaming the MR)?
# Extra config allows adding arbitrary properties to the cilium config.
# By putting it at the end of the ConfigMap, it's also possible to override existing properties.

 enable-direct-routing: "false"

I provided some feedback about the comment indentation in the linked PR. Let's follow up there.
Given that this issue as originally reported is resolved by using --set-string, I'll close this out as completed.


Picture & thumbnails support

Hi,
I have recently started using Gutenberg and I like it very much (especially compared to other more famous static site generators that have ridiculously complex configuration).
One thing I've been misssing is the ability to create picture/photo galleries in a blogpost. And so I went ahead an added the implementation using the Piston/image library. You can have a look at the work in progress at my pictures branch. (It's just one or two evenings of hacking and so stuff like proper docs and tests is still missing unfortunatelly, but the implementation itself is present and seems to work well so far for me.)
Feel free to let me know whether you think it is worth finalizing / if you'd consider integrating this in future.
A disadvantage of generating thumbnails is that it's time-consuming, and with Gutenber re-generating the site each time from scratch, this can become noticeable. Generating thumbs for some 30 photos takes some 10 seconds on my machine (each photo being about 6MB in size).
In default configuration there is no thumb generation, the feature is entirely opt-in.

I have recently started using Gutenberg and I like it very much (especially compared to other more famous static site generators that have ridiculously complex configuration).

Glad you like that!
I believe there's value in having Gutenberg handle image resizing but I'm not sure i would go with an approach of just doing it for all pictures. In my mind it would be more of a Tera filter like image_url | img_resize(width=400, height=300) and the filter would look for an already resized image at that path (for example a pic called "cat.png" in the filter above could be named "cat_400x300.png") and if not found perform the resizing. That should allow the thumbnail resizing to only happen once but it can happen anywhere in your site.
The downside being that adding a picture in a .md file would now require using a shotcode but I believe if you want thumbnailing, you will also probably want some kind of special CSS and use shortcode anyway.
What do you think?

@Keats Yes, I'm going to have to use shortcodes anyway.
Regarding template function, the thing is I'm not just inserting individual images, but whole galleries, ie. 10 to tens of pictures. In my current solution using Pelican with a gallery plugin, the plugin feeds a list of pictures to the template, which uses PhotoSwipe to create a clickable gallery. So the problem is actually twofold:

Collect a list of pictures for a page and pass it to the template in the context
Create thumbnails for these pictures

In my implementation, this is done by matching page assets against a configurable regex, I guess you could configure the regex to only match files with a specific pattern...
OTOH I suppose I could also go with a simpler approach...

Presumably I could also create a Tera filter to get multiple images and their thumbnails? I'll look into that...

Is the pelican blog on github/gitlab so I can see how it's setup?

@Keats Not right now unfortunatelly. It's a work in progress, I'm trying to replace my antiquated and stale personal blog. But I'll try to upload it somewhere for you...

Hey, I am also interested in this feature. I am in the process of migrating my blog from Hugo (I really started to dislike golangs templating language) and so far this is the only missing feature I have noticed.
It is worth considering how they implemented it, which is similar to what you suggested with the filter approach but also support cropping and fitting into a fixed size (so the image is not large than the given width/height but preserve the aspect ratio).
They also render the images to a resources folder designed to be committed to version control to save on future processing (but can also be added to ignore files if the user chooses not to do this). Given how rarely images this change and how expensive they are to generate you might want to consider doing something similar.

I really started to dislike golangs templating language
Tell me about it!

I like saving the resized pictures in a committed folder but I don't really want to have tons of folders at the root level. Also need to think how it interacts with co-located resized pictures.
I think the filter approach is the best imo but I would conservatively and just have the resize options to start with. I feel like if you care about your images, you will do the the cropping yourself. I've implemented something extremely similar to the smartcrop library they are using recently and I would say it only works for a limited number of images.

@mdaffin @Keats
In my implementation the aspect ratio is also preserved, of course.
I am in the process of converting my implementation to use filters instead. I was a bit busy last couple of days is it didn't go as quickly as I would've liked.
Also, I found out filter actually cannot be used to accomplish this, because in Tera filters cannot be a closure, they can be context-less functions only and they don't have access to the needed information (such as content dir path and public dir path). I am currently using Tera global functions instead as they can be closures.

Another usecase example: I'm generating a gallery for Gutenberg themes based on some repos and those repos has one big screenshot.png. I'd like to be able to generate thumbnails without repo owners having to do it themselves: Gutenberg would do it automatically.

@Keats Great example! I have update my implementation such that configuration is no longer involved. I now have a global function named img_scale that receives either a single image or a list of multiple one (you can pass the page.assets variable to it too) and which generates the thumbnails with a filename similar to what you suggested.
I'm trying to add a usage example to the documentation, however, right now I have run into a problem: It seems Tera global functions are not available in shortcodes. I'll poke around and see if I can do somathing...

So, it turns out the shortcode generation happens much earlier in the process and has no access to all the metadata plus the output directory isn't created at that point... This is much more difficult :-)

So, it turns out the shortcode generation happens much  earlier in the process and has no access to all the metadata plus the  output directory isn't created at that point... This is much more  difficult :-)

Ah I didn't think of that :(
The shortcode generation is going to be rewritten soon but the problem is still going to persist. Something that might work is to work create the output dir at the beginning, put all resized pictures in a public/gutenberg_pictures and have the resize filter return a URL to that path.

@Keats The output is not so much of the problem, the input is - with shortcodes basically you'd have to manually enumerate all images with full path...

The shortcode generation is going to be rewritten soon
Really? One thing that occured to me is that is would be sweet to be able to use arbitrary Tera in the page markdown that would be evaluated with the same context as page template. But that would be pretty hard to implement...

Really? One thing that occured to me is that is would be sweet to be able to use arbitrary Tera in the page markdown that would be evaluated with the same context as page template. But that would be pretty hard to implement...

It could be possible but I'm not sure it's necessarily something wanted. Discussion for shortcodes is at https://github.com/Keats/gutenberg/issues/165

@Keats I've uploaded an example for you. Here's the rendered html
http://kral.hk/tmp-pelican/blog/en/nixie-clock-with-esp8266-and-ds3231/
Here's the two pelican plugins that process pictures and render the html:
https://gist.github.com/vojtechkral/feee49fed758d178b6a045449a511517
The code is pretty horrible unfortunatelly.

FYI I'm going to have a look at adding support for that in the next version in the form of a global function so what you currently have in your branch I believe.
We can deal with the shortcode issue later on.
How I envision it: resize_image(path: string, width?: int, height?: int, fit?: bool, fill?: bool) -> String and a static/_resized_images folder (names open to bikeshedding).
The parameters ending up being used for the operations in https://gohugo.io/content-management/image-processing/#image-processing-methods Resize, Fit and Fill but in one method. From the path and the arguments, a unique filename will be created (something like${path-hash}-4${filename}-${width-"x"-"height}-${method}?).
The global function will first check in the _resized_images folder for a file with that name and return the public url for that file if there is one. If not, it will do the resizing and put the image in that folder with the right name and return the public url. Gutenberg will automatically detect the new image and copy it to the public directory.
Keeping it into the static folder ensures it's saved in vcs.
I would make the fn take only one path though and in your case the gallery will be just multiple calls to it in a forloop.
What do you think?

names open to bikeshedding

About that... :-) ... maybe the fit / fill stuff could be made one param named op or such with a string (enum-like) value of "fit", "fill" et al.

The global function will first check in the _resized_images folder for a file with that name and return the public url for that file if there is one. If not, it will do the resizing and put the image in that folder with the right name and return the public url.

Sounds good, I've already written a function named file_stale or something like that in utils::fs that tells whether a target file exists and needs updating or not...

Gutenberg will automatically detect the new image and copy it to the public directory.

That's ok, but it would be nice if Gutenberg copied the static files preserving the ctime/mtime metadata. The way it is done now the copied static files get an updated ctime/mtime and my guess is that with people uploading their public dir to a server via FTP or someting similar, this would make browsers re-download the static files even if they haven't changed.

I would make the fn take only one path though and in your case the gallery will be just multiple calls to it in a forloop.

That's fine as long as those page.assets context data are available...

What do you think?

Sounds good to me! I'll update the implementation in my branch to these specs. The only part I'm not sure how to go about is the path hashing.  :-)

Or if you wanted to implement it yourself instead let me know...

About that... :-) ... maybe the fit / fill stuff could be made one param named op or such with a string (enum-like) value of "fit", "fill" et al.

Could work, I have no strong feelings one way or the other. The op param is probably better actually.

The way it is done now the copied static files get an updated ctime/mtime and my guess is that with people uploading their public dir to a server via FTP or someting similar, this would make browsers re-download the static files even if they haven't changed.

Do browsers even check that? They would need to download the image to get the metadata

That's fine as long as those page.assets context data are available

Yep we can make everything we need accessible later on.

 :-)

Probably fine, it's just that relying on just the filename will give duplicates in some cases (for example in Gutenberg docs there are a few assets called screenshot.png). We probably don't even need the full md5 of the path, the first ~6 chars or so should be enough.

Or if you wanted to implement it yourself instead let me know...

Go for it!

Do browsers even check that? They would need to download the image to get the metadata

Not browsers, web servers. Typically they're configured such that with static files they compute the ETag based on the file's ctime/mtime metadata, and so it becomes part of the regular browser cache invalidation process. Browser sends the If-Modified-Since header (if memory serves me well) and server checks the file ctime/mtime and responds with either 304 (just headers) or 200 + full file data.

Probably fine, it's just that relying on just the filename will give duplicates in some cases (for example in Gutenberg docs there are a few assets called screenshot.png). We probably don't even need the full md5 of the path, the first ~6 chars or so should be enough.

Got it...

It might also be nice to provide a function that will let you get srcset strings, similar to Gatsby. I have some pictures on my site that are automatically fitted to the screen, but on cell phones loading the full image (In some cases 4K) is excessive. I think this might, for example, provide an array of the image URIs which you can iterate over and add to  tags.

TIL people would pay $600 for a workshop on a static site engine: https://workshop.me/2018-04-gatsby
It looks like it would be worth it to take some of these ideas into the gutenberg image support yes

If I understand correctly, you could just make a few resize_image calls to fill in the srcset, right?
Btw @Keats I have the implementation pretty much done, right now I'm just procrastinating a bit on the more boring tasks like tests and documentation. Some implementation details:

I've decided to use XXHash, as it seems to be a good tradeoff for our needs.
I'm folding all the params into the hash, ie. the source path as well as all the other options to make the filename more uniform.
Hash collisions are accounted for, should there be any.
For efficiency, the resize_image function merely stores the requested operation + params into a map. The actual image processing takes place all at once towards the end of the site build process. This allows  removing orphan thumbnails and, more importantly, image processing in parallel.

I've been pretty happy with the performance so far, even hundreds of fairly large images were typically processed in very reasonable time. I'll gather some numbers...

It might be good to add some kind of an unobtrusive progress reporting (only activated when the processing takes a long time) so that the user knows the application isn't stuck...


Correct requirements and update docs

Mention ansible-core>=2.15 in meta/runtime.yml
Mention ansible-core>=2.15 in runtime requirements to avoid accidents during testing
Avoid mentioning 'ansible' community bundle in test_requirements.txt
Correct docs badges
Remove ansible-rulebook requirement from readme, being a test dependency
Mention code block types in readme
Added minimal versions for test requirements (performance and supportability)

Since support for changelogs is going to be added, do you think it would make sense to document this change ad a breaking_change?


Documentation: MediaWiki Explicit Admin username

Problem
Thank you greatly @Mic92 @eclairevoyant
For fixing the recent "spaces" bug in MediaWiki #298902 . I would like to note that the default MediaWiki administrator username is implied, but has yet to be made explicit.
Proposal
Since there is no option to set the default administrator username, I propose to edit the documentation to make it Explicit that the default administrator username is "admin".
https://github.com/NixOS/nixpkgs/blob/526d051b128b82ae045a70e5ff1adf8e6dafa560/nixos/modules/services/web-apps/mediawiki.nix#L251
Changing from (ambiguous)
"for the admin user."
Changing to (unambiguous)
"for the initial user \"admin\"."

@Sepero, thanks for the suggestion.
How about: A file containing the initial password for the administrator account "admin".?
This matches more closely the NixOS Wiki article on the subject. Plus, it avoids using the initial word twice in the same sentence.
PS: I have a PR ready to submit if you agree with the suggestion.

Yes, that's fine. I'm actually the author of that wording on the NixOS Wiki. Anything to clear up the ambiguity is good.


Global data values updating with type change

Describe the bug
If I have a global initialized data with an assigned struct.  If I edit the struct and create a new pointer type (this can be either through the struct editor or by changing the type in the listing window) the value will be converted as it were a hex integer value (no xref/green text) and not a pointer.  If the struct is cleared and re-assigned, the location that was a hex integer is now a pointer (xref/blue text).
To Reproduce
Steps to reproduce the behavior:

create empty struct
assign struct to global data with initialized values (even initialized with 0's should show this I think)
edit the struct to create a pointer type
4-byte value will display as [a-f0-9]{1,8} for example in 32-bit

Expected behavior
Expect maybe DAT_[a-f0-9]{8} or similar if the location is untyped, or the type pointer/name if it is typed and an XREF to be generated.
Environment (please complete the following information):

OS: win10
Java Version: 11.0.10
Ghidra Version: 10.1.2
Ghidra Origin: official

Currently, modification of composites and associated components or they associated sub-datatypes do not attempt to update default references or instance settings for data previously created.  This is long standing known limitation.


Updates for chef-ingredient 0.18+

Changes include:

Moves to using the latest chef_ingredient resource which uses mixlib-install under the covers and retrieves artifacts from packages.chef.io. This removes all PackageCloud dependencies.
Deprecates the use of node['delivery_build']['repo_name'] and prefers the more aptly named node['delivery_build']['release-channel'].
Deletes a lot of legacy code that is no longer needed!

All code was validated with a kitchen verify on the following platforms:

Ubuntu 14.04
CentOS 7
Windows 2012R2

/cc @chef-cookbooks/engineering-services

Are there any updates we should make to delivery-cluster as a result of this change?

👍 pending @oferrigni's question.

@oferrigni delivery-cluster should be fine as similar changes were already applied to this product (the chef-ingredient upgrade):
https://delivery.chef.co/e/chef/#/organizations/delivery/projects/delivery-cluster/changes/29a68011-0695-4d2d-b3c5-09bd0d624968/status/acceptance


Ideas for the addition of custom MapBasic functions

It may be desired for these custom MapBasic functions to reside separate from the standard application (perhaps in a sub-folder, A_ScriptDir/Libraries/...)
Required information:

code = {...} block, indicating what code should be inserted into the .MB file.

Each of these statements should be surrounded in a special string to provide easy extraction with RegEx. For example:
{
Sub say(someArg as string)
    print someArg
End Sub
}

Declares will be automatically added into the header of the file and should not be included in the code block. All Declare blocks will be removed with RegexReplace(str,"Declare.*","") [unless anyone can offer a reason as to why this is a bad idea!]
Each sub/function should be kept separate. If one requires the existence of another a comment should be added 'Requires "Name of Function or Sub". - Why? Mainly for future features. It may be nice for users to select which functions they want to use from which libraries.
It may also be nice to add functionality for custom statements. Classes and COMObjects would also be a nice feature if possible to implement in MB.

Custom Statement Idea:
Set up a Regex replace to find statements and replace them with sub-routine calls:
{
{
statement: place\s+"(.*)"\s+(on|in)\s+"(.*)"
}
{
replace: call place(match1,"match2",match3)
}
}

Then define the sub-routine calls separately:
{
sub place(object as string, on_in as string, furniture as string)
    if object = "" then
        Note "An error occurred in statement place - Cannot place nothing"
    end if
    if on_in <> any("on","with") AND furniture <> "" then
        Note "An error occurred in statement place - Cannot place item"
    end if
    print object & " is now " & on_in & " " & furniture
end sub
}

This setup would convert something like this:
place "this" on "that"
Into this:
call place("this","on","that")
Which would call the base sub-routine function. In the end these are simply sub-routines, but they may be easier to understand in this context than as actual sub-routine.

It might also be useful to include other transpiler options. For instance:
CONTAINS{
Start: {"
End: "}
} WITH CONTAINS {
contained = replace(contained,"\r\n", """ & mbCrLf & """
contained = makeMultilineCommand(contained)
return contained
}


feat #33: First pass at --dryrun

The DbMigrator.RunSql is starting to get complex... gradually removing the dependencies on ambient state (captured variables and vars declared in higher scopes than required)

I'll get this rebased for you 👍


Make Xcode signing stable in device lab

Currently the Xcode certificates expire frequently, we have to manually renew it from time to time. It would be nice to make this stable. This article may help: https://support.apple.com/en-us/HT204836.

A dup of #17860 17860


free(): invalid next size (fast) error in c

I built the tree.c, when I run it I get:
   free(): invalid next size (fast)
   core dumped

error.

Hi! I appreciate the error report, but I'm only really using this repo as a learning experience so not really maintaining the code here.
For your problem specifically, it sounds like it might have to do with your architecture? If you really want to debug it, I would suggest pulling out lldb and seeing which free is causing the issue.
Best of luck!

I'm not a C programmer but replacing the line https://github.com/kddnewton/tree/blob/5c8a6caa36de67d0cfb6235e8dd0b92582affa71/tree.c#L39
with
current = malloc(sizeof(struct entry));
make it work in gcc


Modifying of Unity 5.6.5 assets

I've issues with modifying assets of the game based on Unity 5.6.5. Already found that using AssetsReplacer with no changes at all crashes game.
I've done 2 tests. First, AssetsFileWriter without any AssetsReplacer doesn't change anything. Second, adding AssetsReplacerFromMemory with changedBytes (baseField.WriteToByteArray()) without doing any modifications completely changes whole file and makes game crash.
I'm using AssetsTools.NET v2.0.11.

What asset type? Monobehaviour?

Mesh. I've wanted to replace one mesh using another from the same asset as a test. Doing it manually via UABE works fine.
replace.zip

Can you set monoScriptIndex in the AssetsReplacerFromMemory constructor to 0xffff instead of 0?

Yes, now it's working. Till fix, I'll be using 0 or 0xffff depending on which value won't crash the game. Thanks!

It's not something that needs a "fix". When you set this value, you directly set a value in the assets file which tells Unity to look for a monoscript which doesn't exist.
From the readme:

The constructor for AssetsReplacers take a monoScriptIndex parameter. If you won't be touching MonoBehaviour assets, leave this as 0xffff like in this example (no script id) as a shortcut. If you are editing MonoBehaviours, use AssetHelper.GetScriptIndex() to get the correct script index. More information about this in the MonoBehaviour reading/writing section.

True, my bad. Somehow on newer versions of Unity 0 was fine. More convenient would be to add another constructor with that param to be last and the default set to 0xffff like in AssetsRemover. Thanks!


Newlines in JAVA_OPTS breaks application plugin shell script in Gradle 3.2

When using environment variables with newlines, for instance JAVA_OPTS, then the eval command in the generated application script fails.
Expected Behavior
I would expect Java application to start when executing the script.
Current Behavior
The application script fails at eval with:
build/install/myapp/application/bin/myapp: eval: line 2: -Xms400m: not found
build/install/myapp/application/bin/myapp: eval: line 3: -Xmx400m: not found
build/install/myapp/application/bin/myapp: eval: line 4: -classpath: not found
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
[...]

Fails with exit code 1
Context

Steps to Reproduce (for bugs)
$ ./gradlew installDist
$ export JAVA_OPTS="
        -Xms400m
        -Xmx400m
   "
$ ./build/install/myapp/application/bin/myapp

Your Environment
$ java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

$ ./gradlew -v

------------------------------------------------------------
Gradle 3.2
------------------------------------------------------------

Build time:   2016-11-14 12:32:59 UTC
Revision:     5d11ba7bc3d79aa2fbe7c30a022766f4532bbe0f

Groovy:       2.4.7
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_92 (Oracle Corporation 25.92-b14)
OS:           Linux 3.16.0-4-amd64 amd64

Worked correctly in Gradle 3.1

Should be fixed by #865 - could you try out the workaround (editing the wrapper script by hand) there?

Tried to apply the patch from https://github.com/gradle/gradle/commit/a171b72b0973ace7b1f9c17551654c0de1ca49e2, but it still fails with the same result.
It's not the APP_ARGS that fails in my case.
It looks to be the eval line below the patch:
eval set -- "$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$MYAPP_OPTS" -classpath "\"$CLASSPATH\"" myapp.Main "$APP_ARGS"

@hovenko Thank you for the well-written issue.
@jjohannes Can you please confirm this is still an issue or let me know if you need my team to address it?

Yes it is an issue with JVM options defined in one of the environment variables - "$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$MYAPP_OPTS" - using newlines.
Defining the arguments without newlines. E.g.:
export JAVA_OPTS="-Xms400m  -Xmx400m"

or
export JAVA_OPTS="'-Xms400m'  '-Xmx400m'"

would work.
I am looking into this now.

The fix is on master: https://github.com/gradle/gradle/commit/b0fb42928c9d95a389962e2252e8efb0fe0b9fde

@hovenko can you check if the following change (removing quotes in the line you pointed out above) fixes your issue.
eval set -- "$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$MYAPP_OPTS" -classpath "\"$CLASSPATH\"" myapp.Main "$APP_ARGS"

replace with
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $MYAPP_OPTS -classpath "\"$CLASSPATH\"" myapp.Main "$APP_ARGS"

@jjohannes Thanks, works perfectly! :)


"Open in New Windows" menu

Issue: When I use the "Open in New Windows" menu, the customized right-click menu disappears after closing the new window opened, and the position where the right-click menu opens is not at the mouse position. What's the reason?How can I avoid this problem?
ScottPlot Version: ScottPlot.WinForms 5.0.46

Hi @jacckl, thanks for reporting this! I believe this has been fixed by #4529 and will be in version 5.0.47 I will publish later today.
If that doesn't fix the problem let me know and we can open this issue back up and take a closer look together 👍


Dark/light images mode

Added ability to change images for dark/light mode
Added zoom images gallery

This could be merged now or we wait for the outstanding items on the ticket to be resolved

@oable the blur in the image may be something you can fix if this is due to throttling size WDYT?

I pulled info out of ticket as the ticket could have been orphaned while I was working on it!!


Unsound Uninitialized Memory

https://github.com/SamuelFischerCode/vec-array/blob/ec034c8836f2f1de7fcbcff9c4669f39a967f905/src/vec.rs#L23
You can't set a generic T to uninitialzed even if you don't read those values, because of types lile bool or references which have illegal values (bool must be 0 or 1, references must not be null)
To correctly handle this, this, you should use [MaybeUninit<T>; CAP] instead.

@RustyYato Hi I saw this issue and also tried to figure out how to fix it.

You can't set a generic T to uninitialized

Actually, the unsound implementation lies in this line, right?
However, I still don't understand how [MaybeUninit<T>; CAP] could help us fix invalid type on bool or references. Would you mind explain more about this?

Actually, the unsound implementation lies in this line, right?

Yes, that's the line that will cause UB. Try running it under miri. With something like VecArray<bool, 1>.

However, I still don't understand how [MaybeUninit<T>; CAP] could help us fix invalid type on bool or references. Would you mind explain more about this?

Sure! Let's take a specific example to make the explanation easier. VecArray<bool, 1> which currently contains a [bool; 1]. When you set the array to uninitialized you are creating an invalid state for that bool (because bool must be either 0 or 1, and uninitialized memory is neither of those). This is very bad because it gives LLVM (the compiler backend that Rust currently uses) free license to miscompile your code. The reason is, LLVM was guaranteed that bools must be 0 or 1. However, you have produced (through unsafe) a bool that doesn't fit the requirements.
So how does MaybeUninit<T> make this better? The memory representation of MaybeUninit<T> has no requirements. It can be initialized to any value or left uninitialized altogether.  For example, MaybeUninit<bool> can have the value 0, 1, 2, 3, or uninit, etc. For now, treat MaybeUninit as special in this regard, the rules around what other types are allowed to be uninitialized is in fluxp[^1]. So altogether, by using [MaybeUninit<T>; CAPACITY]  it's safe to write uninitialized memory to the array.
A few more notes, MaybeUninit<T> has the same layout as T, so it's safe to cast *const|mut T to *const|mut MaybeUninit<T>. However, this safety doesn't compose with other types. For example, it's not safe to cast *const|mut Option<T> to *const|mut Option<MaybeUninit<T>> because of niches. For example, Option<bool> is 1 byte, but Option<MaybeUninit<bool>> is 2 bytes.
For you, this means that all you would need to do is change the type of arr to [MaybeUninit<T>; CAPACITY]  and the functions VecArray::as_ptr and VecArray::as_mut_ptr to be correct.
[^1]:  See https://github.com/rust-lang/unsafe-code-guidelines for work on specifying the Rust memory model.

Hi @RustyYato, thanks for the response with so much details.
pub struct VecArray<T, const CAP: usize> {
       arr: [T; CAP],
       ...
}
.....
let mut va: VecArray<T, 1> = VecArray::new();

Based on the definition of invalid type in rustonomicon, are there any types that can be valid with uninitialized state (in addition to MaybeUninit)? I think not only bool, but also signed/unsigned integer or other types can't work here, is it correct?

Iirc, integers are unspecified right now, so best treat them like it is UB to have uninit integers. But that may be relaxed in the future.

Hi @RustyYato, I found that some library authors claimed that it is safe if they immediately write value to the uninitialized memory just like following:
// safe function
fn() {
  let mut x: [T, N] = unsafe { MaybeUninit::uninit().assume_init() };
  // Write value into T immediately...
}

From my understanding, it should still be UB at the line of assume_init() no matter what happen following. How do you think about it?


Use better "owner" for vscode diagnostic entries

When the Rust Analyzer Visual Studio Code extension drops output into the vscode diagnostic set, it sets an owner; this can be seen by copying the raw diagnostic and pasting this as text, e.g.
[{
	"resource": "... tracing_error.rs",
	"owner": "rust",
	"severity": 8,
	"message": "error: type annotations needed for `{integer}`\nlabel: consider giving `yaks` a type",
	"startLineNumber": 2,
	"startColumn": 9,
	"endLineNumber": 2,
	"endColumn": 13
},{
	"resource": "... /tracing_error.rs",
	"owner": "rustc",
	"code": {
		"value": "E0283",
		"target": {
			"$mid": 1,
			"external": "https://doc.rust-lang.org/error-index.html#E0283",
			"path": "/error-index.html",
			"scheme": "https",
			"authority": "doc.rust-lang.org",
			"fragment": "E0283"
		}
	},

...

That "owner" is (hopefully) a unique identifier which keys onto a responsible component. BUT apparently it's helpful to be human-readable, too, because the above output shows a problem:
	"owner": "rust",
	"owner": "rustc",

where "rust" apparently originates from https://marketplace.visualstudio.com/items?itemName=panicbit.cargo&ssr=false#overview
For the sake of diagnosability and discoverability, I'd suggest that Rust Analyzer switch to a different owner name, i.e. from "rustc" to, perhaps, "rust-analyzer.rustc" (or even "matklad.rust-analyzer.rustc", effectively namespacing ownership?
This then would result in
	"owner": "rust",
	"owner": "rust-analyzer.rustc",

making the issue stand out better and also declare responsibility much better.

I believe the owner is shown to the user not just in the raw diagnostic, but also in the rendered version. rust-analyzer.rustc is on the verbose side.

After checking, vscode indeed renders the owner also as part of the diagnostic, i.e. the "rustc" in

really is the content of "owner". But then I can happily report that we are already in (my much preferred) verbosity land with

I'd love to see only rustc as the value inside owner if there was a way to claim ownership for "rustc" or similar. But my recent trouble with an extension that simply emitted "rust" (and I did not "see" that) make me want more verbosity.

(FWIW, I have been burnt, so burnt once, twice shy, eh?. But any other future individual running into vscode mixups might appreciate the obvious in-your-face distinction)

TBH, I don't think some slight chance at easier debugging of extension misconfigurations is worth making these more complicated. People usually miss them anyway.


Migrate the project metadata to pyproject.toml

setuptools>=61 started supports storing the project metadata in pyproject.toml. It is the new standard to write the project metadata for Python packages.

Thanks! LGTM.


Weird bug with emotes in pms

The username kinda pops up twice in the pm, only one has the emote as a message.

Thanks for the report! Fixed in #118


Use signal based samplers for J9

After quite extensive tests (running full load on a mix of various benchmarks on 96 core bare metal instance) for a few days it seems that the signal based samplers (perf_events, itimer or the simple signal-based wallclock) for J9 are at least as stable as the Hotspot ones and therefore we should use them as the default.
In order to increase the confidence in the solution this PR is also including a primordial debug support for malloc (and possible other in future) shims such that we can easily spot forbidden operations in signal handlers.

@nsavoire Please, treat this as optional - if you have some spare time I would appreciate your feedback but it is no priority.

high level nit (sorry) - can you configure your IDE to put line endings at the ends of files please?

Moving back to draft.
The J9 ASGCT implementation tends to hang quite often.
I have identified the location of the endless loop and we are in discussion with the IBM J9 team to figure out the best approach.

Thanks, @nsavoire , very valuable feedback!
This PR is still very much in-progress work, mostly due to J9 going to endless loop from time to time when walking the stack from a signal handler. Until that is fixed in J9 this PR can not proceed.

this is blocked on changes being made in OpenJ9, but could we pull the malloc interception out into another PR so we can benefit from it earlier?


Support JSX

Hey @jordanbtucker,
In order to implement support for JavaScript React (jsx) language I'd need some testing from your side as I'm not familiar with that language and I can't validate if the snippets are compatible with it.
In visual studio code open user snippets (https://i.imgur.com/GvJU9z3.png), select jsx language and in the newly opened file paste snippets code from https://github.com/Zaczero/bootstrap-v4-snippets/blob/master/bootstrap-v4-snippets/snippets/snippets.json
Then just save the user snippets and test if everything works fine with jsx files 😃

@Zaczero First off, thank you for making these snippets, they are very helpful!
For JSX compatibility there are a few issues.

Self closing tags cannot be left open,  throws errors,  will not.
Instead of class="btn", className should be used so className="btn".
The for attribute should be converted to htmlFor.

I've just started using your snippets but those are the first issues I've noticed so far.

* osing tags cannot be left

Thanks for the details, I'll implement those changes and add the JSX support in the free time :-)


DescribeAsync getting curious results

I'm calling DescribeAsync for Account and get back the field named "Description" and its label "Account Description". However, when I am in Salesforce and look at the fields for Account (Customize->Account->Fields) the label for "Description" is "Description" (sans "Account" prefix). Same for Contact.  Curiously, when I DescribeAsync for Opportunity the "Description" field has a caption of only "Description".

Similarly, Contact Fax returns a label of "Business Fax" and Salesforce config shows the label is just "Fax".
I'm at a loss for the discrepancy.

Seems it is possible to change the label via Rename Tabs & Labels and that is not reflected in the metadata.
https://salesforce.stackexchange.com/questions/234565/sobjects-describe-label-displaying-a-different-label/234709


Error running NumberLocations function

Hi GeoLift team,
I'm having problem running the GeoLift Walkthrough, with the function NumberLocations:
`
library(GeoLift)
data(GeoLift_PreTest)
GeoTestData_PreTest <- GeoDataRead(data = GeoLift_PreTest,
date_id = "date",
location_id = "location",
Y_id = "Y",
format = "yyyy-mm-dd")
head(GeoTestData_PreTest)
GeoPlot(GeoTestData_PreTest,
Y_id = "Y",
time_id = "time",
location_id = "location")
resultsNum <- NumberLocations(data = GeoTestData_PreTest,
Y_id = "Y",
location_id = "location",
time_id = "time",
n_sim = 500,
treatment_periods = 15,
plot = TRUE,
power = 0.8,
alpha = 0.1,
fixed_effects = TRUE,
ProgressBar = TRUE)
`

Hi Gibran,
Thanks for trying GeoLift out and reaching out to us!
Could you provide us with additional information to replicate this issue? For example, the output from sessionInfo() would be very useful.

Hi Arturo,
Sure, below the output:

Hi again Gibran,
We just confirmed that this error is related to a very recent change in tidyr which just landed yesterday. While we perform a complete fix of this issue, I recommend using the previous version of this package (1.1.4). One way to accomplish this is by running:
packageurl <- "http://cran.us.r-project.org/src/contrib/Archive/tidyr/tidyr_1.1.4.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
Thanks a lot for raising the issue!

Nice!
It's working now, thank you so much.


Scale StatefulSet to zero doesn't work

Report
This is my ScaleObject YAML
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: arim
  namespace: enonic-review
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: StatefulSet
    name: arim
  pollingInterval: 10
  cooldownPeriod: 15
  minReplicaCount: 0
  maxReplicaCount: 1
  triggers:
    - type: prometheus
      metadata:
        serverAddress: http://prometheus.lens-metrics.svc.cluster.local
        metricName: container_network_receive_packets_total
        query: sum(rate(container_network_transmit_packets_total{namespace='enonic-review',pod_name=~"arim-.*"}[1m])) * 10
        threshold: '10'

Already tried with
  idleReplicaCount: 0
  minReplicaCount: 1
  maxReplicaCount: 1

and
  maxReplicaCount: 1

As you can see on HPA watch logs, it must be scaled to zero a few seconds after my HPA target goes to less than 10 (which is my Prometheus trigger threshold), but absolutely nothing happens.
keda-hpa-arim   StatefulSet/arim   7/10 (avg)           1         1         1          4m32s
keda-hpa-arim   StatefulSet/arim   50/10 (avg)          1         1         1          4m47s
keda-hpa-arim   StatefulSet/arim   103/10 (avg)         1         1         1          5m2s
keda-hpa-arim   StatefulSet/arim   115/10 (avg)         1         1         1          5m17s
keda-hpa-arim   StatefulSet/arim   79/10 (avg)          1         1         1          5m32s
keda-hpa-arim   StatefulSet/arim   26/10 (avg)          1         1         1          5m47s
keda-hpa-arim   StatefulSet/arim   6/10 (avg)           1         1         1          6m2s
keda-hpa-arim   StatefulSet/arim   5/10 (avg)           1         1         1          6m17s
keda-hpa-arim   StatefulSet/arim   6/10 (avg)           1         1         1          6m32s
keda-hpa-arim   StatefulSet/arim   5/10 (avg)           1         1         1          6m47s
keda-hpa-arim   StatefulSet/arim   6/10 (avg)           1         1         1          7m18s

Expected Behavior
Scale the StatefulSet down to zero when HPA target < 10 (Prometheus threshold)
Actual Behavior
It keeps with replicaCount == 1
Steps to Reproduce the Problem

Create a ScaledObject to scale to zero a Statefulset based on Prometheus trigger

Logs from KEDA operator
The operator logs keep repeating those following entries forever like nothing different happens
2021-08-19T22:37:48.168Z	INFO	controllers.ScaledObject	Reconciling ScaledObject	{"ScaledObject.Namespace": "enonic-review", "ScaledObject.Name": "arim"}
2021-08-19T22:37:48.168Z	DEBUG	controllers.ScaledObject	Parsed Group, Version, Kind, Resource	{"ScaledObject.Namespace": "enonic-review", "ScaledObject.Name": "arim", "GVK": "apps/v1.StatefulSet", "Resource": "statefulsets"}
2021-08-19T22:37:48.180Z	DEBUG	controllers.ScaledObject	ScaledObject is defined correctly and is ready for scaling	{"ScaledObject.Namespace": "enonic-review", "ScaledObject.Name": "arim"}
2021-08-19T22:37:48.191Z	DEBUG	controller	Successfully Reconciled	{"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "name": "arim", "namespace": "enonic-review"}
2021-08-19T22:37:51.810Z	DEBUG	scalehandler	Scaler for scaledObject is active	{"Metrics Name": "prometheus-http---prometheus-lens-metrics-svc-cluster-local-container_network_receive_packets_total"}
2021-08-19T22:38:01.831Z	DEBUG	scalehandler	Scaler for scaledObject is active	{"Metrics Name": "prometheus-http---prometheus-lens-metrics-svc-cluster-local-container_network_receive_packets_total"}

KEDA Version
2.4.0
Kubernetes Version
1.21
Platform
Amazon Web Services
Scaler Details
Prometheus
Anything else?
No response

moved to #2050


Arts 266

merged latest changes from feature branch.
Used @TestInstance(TestInstance.Lifecycle.PER_CLASS) as we are throwing an IOException and Junit complains.

in TrilaSite Tamir changed the fhirOrganisationId from camelcase to uppercase (and the getters/setters) and I missed his reverting his change for the constructor ..I originally added LLC so we had more data in the config file but the merge removed it as it used Tamirs

in TrilaSite Tamir changed the fhirOrganisationId from camelcase to uppercase (and the getters/setters) and I missed his reverting his change for the constructor ..I originally added LLC so we had more data in the config file but the merge removed it as it used Tamirs

tested locally and is ok to merge

tested locally and is ok to merge

added sonar suggestion of try with resources to close connection

added sonar suggestion of try with resources to close connection


electron-rebuild doesn't seem to do anything on windows :(

Hey Paul!
Trying to get node-ffi working with electron on windows. Super simple project.
Steps I took:
npm install ffi --save
npm install electron-rebuild

I then run ./node_modules/.bin/electron-rebuild
And.... nothing happens. Back to the shell. No output or anything and it's super fast.
When trying to run my electron app I get the 'module did not self-register' error.
Hoping you have some tips for me!
Thanks,
Matt

Closing this issue. Looks like I can get it to work if I force node version and electron version using -v and -n.

I think the bug is that electron-rebuild is incorrectly detecting sometimes that it's already built for some reason

can someone elaborate on the solution here. I cannot get electron-rebuild to do anything either. what does it mean to force node version and electron version? thanks.


Wrong url to assets in production

The generated url http://localhost:3000/app/components/menu_cmp/assets/home.jpg can't load image and when I remove app http://localhost:3000/components/menu_cmp/assets/home.jpg image is loaded correctly.

Yes, you should not include "app" in your path.

The problem is that in dev mode css should be
background-image: url(/app/components/root_menu/assets/Icons_Menu_New_OFF.svg);
In prod it is broken and should be
background-image: url(/components/root_menu/assets/Icons_Menu_New_OFF.svg);
instead. But at the same time that second url doesn't work in dev.

You can use relative path instead of absolute one:
background-image: url(./components/root_menu/assets/Icons_Menu_New_OFF.svg);

relative path ./components... doesn't work.

Hm, it works in local server 5555, but doesn't work from my nodejs server.


Support repr(C) alignment?

Is there any chance of bincode supporting structs that have #[repr(C)] to read binary struct with C memory alignment?

not really.  that information isn't available to bincode to use


[bug] LZW30-SN unable to change local protection via zwavejs2mqtt

Version
Checklist:

[x] I am not using HomeAssistant. Or: a developer has told me to come here.
[x] I have checked the troubleshooting section and my problem is not described there.
[x] I have read the changelog problem was not mentioned there.

Build/Run method

[ ] Docker
[ ] PKG
[ ] Snap package
[ ] Manually built (git clone - yarn install - yarn run build )

zwavejs2mqtt version: zwavejs2mqtt: 5.5.1
zwave-js: 8.2.1
Unable to change the local protection settings for LZW30-SN (all other Models of Inovelli seem to be fine). All values are showing up as unknown and are unable to be defined.

Expected behavior
This is a screenshot from a working from a LZW31-SN

Additional context
Turning on silly logging and outputting to file, broke my zwave network.   I will try to upload the logs once I get environment stable again.

Did you try to re-interview your device? Seems a problem with it's configuration load

Yes reinterview was done.   upgraded firmware, tested on clean machine with only a single device.   issue seems to be device specific.    Looks like the reinterview process is pulling back values of 0x08, 0x09, 0x0a instead 0x00, 0x01, and 0x02.
I have opened a case with inovelli as well.  (https://support.inovelli.com/portal/en/ticket/407409000033235320) and you can use LZW30-SN unable to change local protection via zwavejs2mqtt home-assistant/core#55305 for a further details on the issue.

Closing this issue, as it’s already reported at the driver and cannot be fixed on our end.
https://github.com/zwave-js/node-zwave-js/issues/3252


RFC 0023: Can we accept inline peer did without a signature?

DID Exchange request message attributes contain the following specification for DID Document:

The did_doc~attach (optional), contains the DIDDoc associated with the did, if required.

If the did is resolvable (either an inline peer:did or a publicly resolvable DID), the did_doc~attach attribute should not be included.
If the DID is a did:peer DID, the DIDDoc must be as outlined in RFC 0627 Static Peer DIDs.

Also, as I understood from the rest of the DID Exchange specification, when the did_doc~attach is present, it should contain a signature which we need to validate.
If the did is resolvable public DID. We can still trust that the sender (owner of that public DID) controls private keys because it's written to a ledger therefore we don't need to validate signatures. However, if the did is inline peer:did, there are no signatures present. Can we still accept such peer:did?

Signatures were never needed in the Requests, and were added by mistake by... me. Does this address your confusion?

This is still an issue, and is surfaced again by the move to did:peer:2.
In this case there's no diddoc to put the signed attachment on (same with public dids).
For the request I think it's fine to nit require a signature, as long as the didcomm message used to send the request is authenticated using one of the keys from the diddocument.
However the response signature it's required when you rotate the key used from the invitation in the response. We should have an alternative. I think signing the did from the invitation (as base 64) should suffice in this case.
Can we make a modification to the protocol to allow:

the request message not to be signed. For did:peer:1 dids it's still required to not break interop, but for all resolvable dids, the signed attachment SHOULD NOT be present
do not require the response message to be signed. For did:peer:1 dids it's still required to not break interop, and if the did from the invitation is rotated, it must also be signed by the invitation did. for all resolvable dids, the signed attachment SHOULD NOT be present. If a resolvable did is used, and the key/did from the invitation is rotated in the response, a new property should be added to the response (e.g. "invitation_did~attach") that contains the did from the invitation that is being rotated base64 encoded, and signs it with a key from the invitation did. This authenticated the did rotation from invitation to response (and is important to keep for multi-use invitations with public dids that rotate to peer dids)

Simpler solutions welcome, but this would be straightforward to implement i think, and somewhat non-breaking (as there's no implementations AFAIK not using did:peer:1 atm). Alternative solution is to still attach the resolved did document for resolvable did documents, but we can't enforce that the did documents should match in that case as different resolver implementations returns different structures. We could require for semantic equalness but that would require a complex implementation. So basically it would mean you can use any document in the signed attachment, as the did document would not be stored (as it's resolvable)

@TimoGlastra — can you join the Aries Working Group meeting on Wednesday so that we can go over this and discuss. A presentation of the before and after would be helpful.
FYI - @TelegramSam

@mirgee @Jsyro @dbluhm what do you think about the approach proposed by @TimoGlastra ? I think that now we are all working on the implementation for did:peer:2 in Aries VCX, ACA-Py and AFJ it is a very good moment to reach consensus on this and move forward with the implementations, so we can start running some tests in the AATH.

I could use a presentation (with pictures! :-) ) and a discussion about this to better understand the proposal and its impact.
AFAIK, only AFJ is using did:peer:1, and there is no plan for others to use it.  We want to go to did:peer:2/3, or to go to a new proposal from @dbluhm and @TelegramSam of did:peer:4 (see this issue to the peer-did-spec).
I’ve also put in a proposal to eliminate much of the asperational wording in the did:peer:spec — things like updates to the DIDDoc (key rotation), which are just not going to happen, IMHO.  See this PR.
The sooner we eliminate all but did:peer:4 (or did:peer:2/3), the better.

The signature was in theory to verify that the other party held the associated private key, and is therefore authorized to rotate to a new DID.
As long as the request message is sent encrypted to the key present in the invitation, the only way the message can be processed is by possessing the private key. The receipt of the provided DID in the request message and subsequent response message will ONLY arrive if the private key could be used to decrypt the request message. Therefore, the signature in the response message is unnecessary to gain confidence that the party has access to the private key associated with the public key in the invitation.
Notably, the RFC says nothing about signature requirements, and is only present in the examples. No signatures are required, with non loss of confidence.

@TimoGlastra the response is authcrypted which means that in order to send a valid response message, the sender must know both the private and public key, not just the public key and thread ID.

Let me expand a little bit for clarity and out loud thinking.
In order to send a response message, you need to know the requester's selected request message/threadid (same thing) and DID (key and endpoint). These are encrypted in the request message.
RFC 0008 specifies that Message IDs must be sufficiently unique, with a UUID recommended.
It is also not required to send a unique DID in the request message of the DID Exchange protocol.
Given the lack of MUST style requirements, the spec insufficiently guarantees sufficient randomness. In practice, I believe that UUIDs are used for thread IDs.
This means that after further discussion/thought, I think @TimoGlastra is right:

But there's definitely some security implications here over signing off on using another key in the response than was used in the invitation.

That leaves two options:
Option 1: Add a huge disclaimer to the DID Exchange Protocol (which should have been there since the beginning for non-peer DIDs) that highlights the necessity of UUIDs/sufficiently random for message IDs, and the danger of reusing a DID in the request message. This is likely enough, but is (as discussed above) not immune from poor execution.
Option 2: Add an optional attachment in the response message where the response method's DID is signed with the key used in the invitation. We specify in the Community Coordinated Update that this is required. This option results in no loss of cryptographic confidence.
Thoughts?

It seems we should use some mechanism of signing with DID from invitation. I'm not sure if we should rely on the security of thread ID and public key. To me, it adds a burden on implementers. They have to understand what's the problem, the attack vector,  and how to mitigate it. If I implement the did-exchange protocol, should I care how the security of thread IDs and public keys is preserved? It might not even be in my hands because I'm just adding one particular protocol to a library that takes care of threading and public key management.
Maybe, we can rely on DIDComm authcrypt. Require in specification that the response message must be sent via authcrypt, using the DID from the invitation. But that's, again, something outside of the protocol itself.

I realize this is slightly old news now, but I'm trying to understand the motivating reason behind the addition of the did_rotate~attach.
Am I correct in understanding that the issue here is that we cannot rely on the DIDComm authcrypt due to the response message being packed using the new keys presented within the response message itself? Therefore, if a malicious actor could intercept a request message, they could respond with a response message (packed with the new keys) and successfully steal that peer-to-peer relationship.
RFC 0023 states in regards to the response transmission:

The message should be packaged in the encrypted envelope format, using the keys from the request, and the new keys presented in the internal did doc.

If in theory, the RFC was adjusted to use authcrypt using the keys used in the invitation, how could a malicious actor send a response message without having access to the private keys? In this case I'd assume the signature in the response would just be duplicative assurance. But I am potentially missing something here, and would love to be enlightened to it.


Residual Block

Hi,
Maybe I am missing something, but I can't see the residual block in your model. Specifically, the block being stacked 18 times is this:
https://github.com/twtygqyy/pytorch-vdsr/blob/514b021044018baf909e79f48392783daa592888/vdsr.py#L5-L12
which has a Conv+Relu only. Is this intentional (why)?
Why am I asking this?
In the paper the authors write:
"We suggest a way to speed-up the training: residual-learning CNN and extremely high learning
rates". I am interested in part 1.

It seems that instead of several residual blocks like most models, this model has 1 residual connection from input to output.


vue-disqus 5.1.0 breaks Nuxt

Hi
After upgrading to 5.1.0, I got this error once I run dev

e.provide is not a function disqus

(Maybe this causes the error?) Since there's no changelog of this version, I didn't change how I init the plugin. This is how I init the plugin.
import Vue from 'vue';
import VueDisqus from 'vue-disqus';

Vue.use(VueDisqus, {
  shortname: 'MYDISQUSNAME',
});

The only solution is to downgrade back to 4.0.1, and the error disappears.
I hope this information useful. Thank you.
Environments:
Nuxt 2.15.7
Node 14.15.3

Did you solve?

@ktquez Solved by using version 4.0.1 since then. I think there's no hope of using 5.1 with Nuxt.

Awesome!
@CAT6e Soon yes, when Nuxt releases support for Vue 3.


Added the Xamarin.Forms Succinctly

What does this PR do?
Add Resource
For resources
Description
In Xamarin.Forms Succinctly by Alessandro Del Sole, you will learn how Xamarin.Forms allows developers to build apps for Android, iOS, and Windows from a single C# codebase through the use of containers, controls, navigation, data binding, native APIs, and more.
Why is this valuable (or not)
Nowadays, mobile apps are now playing a significant role. This book helps developers to learn and develop a cross platform app using Xamarin.Forms.
How do we know it's really free?
For book lists, is it a book?
Checklist:

[x] Not a duplicate
[x] Included author(s) if appropriate
[x] Lists are in alphabetical order
[x] Needed indications added (PDF, access notes, under construction)

Thanks, and welcome to free-programming-books!


Django compatibility issues

Current version throws the following error
lib\site-packages\paypal\express\urls.py", line 7, in <module>
     urlpatterns = patterns('',
 NameError: name 'patterns' is not defined

I'm using Django=1.10.7, django-oscar=1.4 and django-oscar-paypal=0.9.7.

@pisapapiros you need to take out the patterns() construct and substitute it with []. That is, you urlpatterns variable should be a list.

Can we please integrate this change into the repository?

I've addressed this and other issues in  #159.


groups? [Not working?]

Hello, I read the documentation, and I am not able to perform the following function:
groups? = string | string[] | { [string]: number }
There is no example on how to do this in the documentation...
I write this:
groups = { ["police"]: 3 }
My question is simple, is the function really implemented or will it be implemented yet?
Sorry for posting there, but i can't join discord...
Thank's.

i can't join discord
🙄

It is implemented, it's been tested with ox_core and esx, I couldn't give a rats arse about qbus, nor could I care about support for somebody who is blacklisted by Warden.

Thanks for reponse...
Warden banned me, because a friend of mine had me founder with him, leak server, but I never leaked any, I just made or edited existing scripts, nothing more...


Improve the exec fn to resolve unsupported conditionals

Fix #37

Do we want to add some tests for this new code? Would make the CR a bit easier :)

I added some unit testing for the tangram utility suite :)


Feature process polling

References

Fixes #2294
Requires https://github.com/DSpace/dspace/pull/9241

Description
Adds an autoRefreshUntilCompletion method to ProcessDataService that is intended to be used anywhere where we request the current status of a process repeatedly until it is done. Also replaces ad-hoc implementations of this concept around the code base with this method. This method also allows you to pass followLinks to it for performance reasons.
During the making of this PR an additional bug was discovered, the cached object retrieved using a followLinks currently aren't automatically marked as stale when you invalidate the cached object with whom you requested them.
Instructions for Reviewers
List of changes in this PR:

ProcessDataService obtains a new method autoRefreshUntilCompletion, which transforms a process ID into an Observable<RemoteData<Process>> for that process ID. A second optional parameter allows for the polling interval to be configured.
CollectionSourceControlsComponent was adjusted to use this method instead of its own implementation.
ProcessDetailComponent was adjusted to use this method instead of its own implementation.

This feature is probably most easily tested by verifying that CollectionSourceControlsComponent and ProcessDetailComponent still work as before.
Checklist

 My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
 My PR passes ESLint validation using yarn lint
 My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
 My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
 My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
 If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
 If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
 If my PR fixes an issue ticket, I've linked them together.

@tdonohue: Thnx for the review! I fixed the error, but I also found out that visiting a non-existing process pages (e.x. https://sandbox.dspace.org/processes/10000) throws a 504 Gateway Time-out error. I also fixed that issue, and I committed it in a separate commit. This way it should be fairly easy to cherry-pick it on dspace-7.x if you want that fix there too.

@KoenP : Please rebase this on main.  It's possible that the e2e test failures impacting this PR were just fixed by the merger of #2722 into main.

@KoenP and @alexandrevryghem :  I saw that the e2e tests failed again, so I thought I'd try them locally.  I  can reproduce the failure locally in this scenario:

Install the backend PR this depends on: https://github.com/DSpace/DSpace/pull/9241
Install this PR
Run yarn e2e.  This will eventually spin up Cypress to run the tests.  Try out these two which are failing frequently in GitHub:

browse-by-dateissued.cy.ts - This fails locally as well. It appears to be an issue with the Browse by Date Issued page loading very slowly.  It does eventually load, but it takes so long that the e2e test times out. (Because it's a race condition, I'm sometimes able to get this to succeed. But usually, it fails for me locally)
browse-by-title.cy.ts  - Same scenario. This appears to be a test timeout issue. The Browse by Title page loads very slowly.  (Same here, sometimes I'll get lucky and this will succeed. But most of the time it fails for me.)
This same issue does NOT occur for browse-by-author or browse-by-subject.  Those pages load more quickly. It seems to be specific to browse pages which immediately display Item objects.

I can verify this same behavior does NOT occur on main.  On main, both of these pages load very rapidly in yarn e2e and I never see these timeouts.  So, it appears to be specific to these PRs.  I'm not sure myself what the cause may be, and whether it's this frontend PR or the backend PR.

@KoenP and @alexandrevryghem : As noted in today's Dev Meeting to @artlowel , the issue I identified above may be in this PR (possibly in some of the changes to base-data.service)?
If I run this frontend PR with the main backend, I can still reproduce the odd slowness in some e2e tests via yarn e2e.   I cannot reproduce those issues when I run both main branches.
So, I believe the issue might be in some of the changes to src/app/core in this PR which may be causing side effects on the Browse by Issue Date / Title pages.  I could be wrong, but I wanted to report these findings to ensure this PR gets more analysis.

Backend PR is complete.  Re-tested this today, and it still works well.  Merging immediately.


Run Software should not allow Input Dataset = None

Current behavior
When I run a software without changing the Input Dataset, it uses the default "None".
The run seems to start, but after it is finished, I can not inspect the dataset.
Expected behavior
I would expect that I can not run the software on "Input Dataset = None".

I've added this. Your now shown an error message when inputDataset is None or if command is empty.

I've added this. Your now shown an error message when inputDataset is None or if command is empty.


Write tests after aiida-2.0 migration

Using the same approach as in AWB

Done as part of the aiida-2.0 PR.


server: make more things configurable

This PR just cleans up some of the hardcoding we had lying around inside ocid.
Signed-off-by: Aleksa Sarai<EMAIL_ADDRESS>

LGTM (still having CLA issue)

LGTM

CLA has been fixed (and this PR rebased). I'll merge this in a second after rebasing my other PRs.

Yeah, I forgot to merge it. Whoops. :smile_cat:


A bug in the train_jhmdb.m

train_jhmdb.m: line 140, 141
[~, ~, dups] = intersect(caches{j}.keys, keys{j}, 'rows');
assert(isempty(dups));
Above two lines always gives assertion error. Do you think these lines are necessary as the duplicated entries are already checked in the "get_negative_features" function at line 133.

They might not be necessary, as you point out, but it would be good to see why the assertion fails. Is dups non empty for you?

Because, in the first loop (as caches are initialized empty at line 111) dups is always empty.

Then I would recommend adding an if statement that would not make it crash in the case that the cache.keys is empty.


[Feature Request] Progress Ring Text?

It would be really nice if you had the option of adding text to the bottom of the ring with a text property(maybe even in the MetroProgressBar too):)

<StackPanel Orientation="Vertical>
    <ProgressRing />
    <TextBlock Text="Blahblah" />
</StackPanel>


Use Python classes

This started out as what was supposed to be a straightforward little script. It now has a ton of global variables and a recursive function and starts to feel a little messy.
Introducing a Plottr class would clean things up, I would think.

Implemented a PlottrContent class. Leaving the Scrivener code procedural (for now).


removed male-gendered language

hi, i'm a nonbinary engineer, and having gendered language at all, especially "Sir," in a readme like this is incredibly off-putting and reinforces the idea that most programmers are men. gendered language isn't necessary, even if you're just trying to be playful to the reader. this is just a suggestion. thank you!

circular https://twitter.com/swayandsea/status/653593341939027968

hehe, hope you know i was calling myself insufferable, not you! ;)

No, how could I know?
I thought you were referring to occurrences of gendered language in technical documentation.
Have a nice evening!

that, too, but mainly i was talking about myself. ;)


Server chops and changes

Don't have to actually merge this one - before I head to bed I just wanted to put up the changes I had pending.
This removes both the currently server broken mods and adds the override for the latest data criteria, meaning the server boots and is joinable outright. Updated releases for some of this stuff should be up soon anyway, but it's here if we need to be cutting edge with keeping everything operational to get started.
Also includes configs to re-enable durability and fix the culling issues with templates 2.

Removed the data criteria override and updated submission mods, also added pineapple mod now that that's released.

Tested! feel free to merge


nvim-jdtls support

Hi, I managed to make nvim-jdtls work with fidget with the following progress reporting function:
local function progress_report(_, result, ctx)
   local lsp = vim.lsp
   local info = {
      client_id = ctx.client_id,
   }

   local kind = "report"
   if result.complete then
      kind = "end"
   elseif result.workDone == 0 then
      kind = "begin"
   elseif result.workDone > 0 and result.workDone < result.totalWork then
      kind = "report"
   else
      kind = "end"
   end

   local percentage = 0
   if result.totalWork > 0 and result.workDone >= 0 then
      percentage = result.workDone / result.totalWork * 100
   end

   local msg = {
      token = result.id,
      value = {
         kind = kind,
         percentage = percentage,
         title = result.subTask,
         message = result.subTask,
      },
   }
   -- print(vim.inspect(result))

   lsp.handlers["$/progress"](nil, msg, info)
end

And then start jdtls with the following:
require("jdtls").start_or_attach({
   handlers = {
      ["language/progressReport"] = progress_report,
   },
})

It actually works pretty well. I haven't look into the code  of fidget yet, but probably we could integrate this into fidget to make it works out of box.
Thanks

Personally I find that it makes more sense to use result.task instead of result.subTask for msg.value.title. Regardless, I do see Completed [nil] fidgets for some reason..

I ran into this issue as well (nice plugin btw 👌) and I'm wondering if nvim-jdtls should handle this by mapping jdtls' specific "language/progressReport" event to "$/progress".
@mfussenegger, what do you think? This could be relevant for other plugins as well (e.g. lualine-lsp-progress).

Thanks for figuring that out @litao91 ! Another alternative is that I just use get_progress_messages() as Fidget's backend (rather than directly overwriting the progress handler), as suggested in #51.

I implemented $/progress in jdtls (see https://github.com/eclipse/eclipse.jdt.ls/pull/2030).

Depending on the jdtls maintainers' responses I think this issue could be closed.

wow @schrieveslaach that's awesome! I'll consider this particular issue closed once that PR lands

LSP[jdtls] received end message with no corresponding begin

@yil3 use the latest version of jdt.ls snapshot build

Closed by #143


small bug when plotting empty images

predlabel2 = predlabel*0
plot(predlabel2)
Error in if (window.img[1] == window.img[2]) window.img[1] <- min(x) :
missing value where TRUE/FALSE needed

Ah, yes, that makes sense. It probably depends on how R computes quantiles
of a totally uniform distribution.  We can correct this.
2015-03-18 16:50 GMT-04:00 dorianps<EMAIL_ADDRESS>
predlabel2 = predlabel*0
plot(predlabel2)
Error in if (window.img[1] == window.img[2]) window.img[1] <- min(x) :
missing value where TRUE/FALSE needed
—
Reply to this email directly or view it on GitHub
https://github.com/stnava/ANTsR/issues/31.

Since we are here, you may want to add something that checks if images is a label images, like
length(labels(as.factor(as.array(img))))<10
and keep the window 0 to max.
Some labels don't appear with automatic windowing. Problem is that the code above is kind of slow.

We should have better support for labeling anyway.  We currently assume the
overlay is basically continuous; if we deal with labels correctly, we
should have a specific list of colors, not a heatmap-type visualization.
2015-03-18 16:57 GMT-04:00 dorianps<EMAIL_ADDRESS>
Since we are here, you may want to add something that checks if images is
a label images, like
length(labels(as.factor(as.array(img))))<10
and keep the window 0 to max.
Some labels don't appear with automatic windowing. Problem is that the
code above is kind of slow.
—
Reply to this email directly or view it on GitHub
https://github.com/stnava/ANTsR/issues/31#issuecomment-83173337.

Yeap, need to make 0 value transparent on overlay.
Also, alpha setting still doesn't work (compiled yesterday at 4pm).

Fixed this issue.  As for the labels:  Setting the window.overlay to the max and min values of the labels and setting the colorbar to "rainbow" should work pretty well.


Only lock spacebar and default code when the player is lower level

In addition to locking down default code and disabling the space bar when the level options suggest we should, for the early levels, we should only do it when the player isn't higher level than we expect. If a level 15 player comes in to do dungeon level 3, of course we don't need to lock the default code. This is an easy check to do.
We need to look at me.level() and figure out what level a player would be when doing these levels in order. If the player is at least a few levels higher than expected, we shouldn't lock sample code / disable spaces, even if the level options suggest we should.

Also, don't lock either of these things if the player is in vim or Emacs mode.


'va_us_top_40/wav/Mirrors - Justin Timberlake.wav'

Traceback (most recent call last):
File "example.py", line 24, in
song = djv.recognize(FileRecognizer, "va_us_top_40/wav/Mirrors - Justin Timberlake.wav")
File "C:\Users\Rishabh\Desktop\audio\dejavu\dejavu_init_.py", line 168, in recognize
return r.recognize(*options, **kwoptions)
File "C:\Users\Rishabh\Desktop\audio\dejavu\dejavu\recognize.py", line 43, in recognize
return self.recognize_file(filename)
File "C:\Users\Rishabh\Desktop\audio\dejavu\dejavu\recognize.py", line 31, in recognize_file
frames, self.Fs, file_hash = decoder.read(filename, self.dejavu.limit)
File "C:\Users\Rishabh\Desktop\audio\dejavu\dejavu\decoder.py", line 58, in read
audiofile = AudioSegment.from_file(filename)
File "C:\Users\Rishabh\Desktop\audio\venv\lib\site-packages\pydub\audio_segment.py", line 610, in from_file
file = _fd_or_path_or_tempfile(file, 'rb', tempfile=False)
File "C:\Users\Rishabh\Desktop\audio\venv\lib\site-packages\pydub\utils.py", line 57, in _fd_or_path_or_tempfile
fd = open(fd, mode=mode)
FileNotFoundError: [Errno 2] No such file or directory: 'va_us_top_40/wav/Mirrors - Justin Timberlake.wav'

For obvious reasons, I didn't include copyrighted music in the repo


An issue with a comment from a deleted user

@wchargin-ghost002, show yourself.

Hello. :ghost:

Here is a screenshot of the thread at this point, prior to account deletion.
The user has GraphQL ID MDQ6VXNlcjQzMjIyMTkw and database ID 43222190.
The previous comment has GraphQL ID MDEyOklzc3VlQ29tbWVudDQyMDgxMTg3Mg== and database 420811872.

My time in this life draws to a close. :wave:

:skull: :ghost:
RIP