FileSystem Picker all the time starts from the root of the file repository

FileSystem Picker all the time starts from the root of the file repository
The rootDirectory parameter limits navigation, it would be nice to have two variables. One pointed to the storage root, and the other to the place, relative to the root, where the file selection dialog should be provided.
In one variable it will be possible to store the storage root, and in another variable, it will be possible to transfer the last location from which the file was loaded.
The problem is that if the nesting, relative to the root of the file storage, is large, then you have to perform many transitions to the desired location.
You don't need to change the API much, you can just add another variable for example:
  Directory? stateDirectory;
  static Future<String?> open({
    ...
    required Directory rootDirectory,
    stateDirectory,
    ...
  }) ...
 {
   if (stateDirectory == null)
     stateDirectory = rootDirectory;
 }

@piratkin You should not think of the rootDirectory parameter as the root of the entire filesystem on the device, but as the folder that will appear in the FileSystemPicker. If you want to show, for example, the /Documents folder, then you can pass it to the rootDirectory parameter, and not the root of entire filesystem /.
To show the last selected folder, you can save it in your application and pass it to the rootDirectory parameter.

If you use the last directory used by the user as rootDirectory, then it will hide all parent subdirectories. As a result, the user will only be able to move up the catalog tree.

@piratkin You should not think of the rootDirectory parameter as the root of the entire filesystem on the device, but as the folder that will appear in the FileSystemPicker. If you want to show, for example, the /Documents folder, then you can pass it to the rootDirectory parameter, and not the root of entire filesystem /.
To show the last selected folder, you can save it in your application and pass it to the rootDirectory parameter.

how does one pass in the platform specific Documents folder? rootDirectory: Directory("/Documents"), does not work.

@piratkin Please try the beta version 3.0, will it solve your problem?


Power meter reverse proxy

Hi,
I'm currently using Powerwall-Dashboard on Docker behind a Traefik reverse proxy. Configuration is here.
My configuration works fine everywhere in all my other services. The only problem I've been having is with the Power Meter when I enabled HTTPS. The frame shows:

Secure Connection Failed
An error occurred during a connection to grafana.my_host.home.arpa:8675. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG

Note I'm not using HTTPS for Grafana. I've got Traefik running in front of all that as a reverse proxy so that my server can use a single port 443 for all services.
When I disabled HTTPS on Traefik the power meter worked.
Any ideas how I might fix this?

Hi @dngray - Yes the iFrame creates some fun challenges with https.  Have you tried a different browser?  Chrome, Safari, etc, may give a different error but from a quick search, that error is unique to Firefox.
Also, take a look at this discussion: https://github.com/jasonacox/Powerwall-Dashboard/discussions/215 This is for lightttpd instead of Traefik reverse proxy but might be helpful.

Sure I tried in Chromium and just got

grafana.my_host.home.arpa sent an invalid response.

I will check out those other threads.

Solution here: https://github.com/jasonacox/Powerwall-Dashboard/discussions/215#discussioncomment-7540307


BadgerDoc can execute pipelines by retrieving tasks and revisions from finished jobs

BadgerDoc should allow users to send file revisions back to the pipeline engine to enhance ML models following manual checks or annotations. After an annotation is committed, each file has revisions. We should be able to send the latest revision to the pipeline with the file. However, you don't need to select a file for revision; selecting finished jobs will automatically retrieve tasks, files, and revisions.
Back-end

We need to add or verify existing functionality to get a list of the latest revisions by task or by file.
User validation must be added - users can create new jobs with finished jobs only.
When a new job is created, the back-end must check if a list of files, datasets or jobs is being passed.
Add a new field previous_jobs to the job table. This field must be JSONB and contains the IDs of the passed jobs, however, all other fields (tasks, files) should be filled as they are now.
BadgerDoc must send an event to Pipelines similar to the example below:

{
    "files_data": [
        {
            "revision": "00afbbcd-9628-479b-89cb-25aa893f46f4",
            "bucket": "local",
            "input": {
                "job_id": 47
            },
            "input_path": "files/344/344.pdf",
            "output_path": null,
            "pages": [
                8,
                9
            ],
            "file_id": 344,
            "s3_signed_url": "http://badgerdoc-minio:9000/local/files/344/344.pdf?AWSAccessKeyId=minioadmin&Signature=TfJOWzctdD8UcPkg3EsQBvpU8go%3D&Expires=1715783449"
        },
       {
            "revision": "cd13076f-9c10-4afc-bc8d-dbeca34ee857",
            "bucket": "local",
            "input": {
                "job_id": 46
            },
            "input_path": "files/344/344.pdf",
            "output_path": null,
            "pages": [
                8,
                9
            ],
            "file_id": 344,
            "s3_signed_url": "http://badgerdoc-minio:9000/local/files/344/344.pdf?AWSAccessKeyId=minioadmin&Signature=TfJOWzctdD8UcPkg3EsQBvpU8go%3D&Expires=1715783449"
        }
    ],
    "job_id": 48,
    "tenant": "local"
}

The revision field is filled in by the latest task revision.
Users can start both the Extraction and Extraction and Annotation jobs. However, for now, we won't implement different behavior for the Annotation part. In the future, we will use the passed revision as the base for the annotation.
Front-end
In the dataset selection screen, we need to add a tab to select jobs instead of files. Users can select files or jobs - we shouldn't allow both to be selected for one job.
All other scenarios remain the same. However, when creating a job, the form must send revisions instead of files.

Tested and accepted


Can i get karate reports in xml? or how to use html with azure pipeline

Hello
I'm new to karate and i wanted to see if i can get the reports in xml format. or if i can change the location of the index.html report from {directory}/target/gatling to somewhere else in the root directory so it is easier for me to use it in azure pipeline using html publish plugin.

no you may have to write your own. please ask these kinds of questions on stack overflow, see this example: https://stackoverflow.com/a/66773839/143475


java.lang.NullPointerException: Registry Object not present: snifferplus:stone_pine_leaves

crash-2023-07-05_17.12.51-client.txt

Please provide the full log, not just the crash report. This occurs when another mod breaks during startup and is not caused by Sniffer+. To point you to which mod it is, I'll need a full log


REMOVE: generic eception catching

Basically all Spring Data JDBC repositories could throw DataAccessException or IllegalArgumentException which both extending RuntimeException.
Further the RestTemplate only throws RestClientExceptions.
There was no need to catch generic exceptions and suppress PMD even more. Sometimes it has a right to live his restricting life.
# :free: PMD !

And PMD apparently doesn't like being freed?

F##k it. RuntimeExceptions are still generic exceptions. I have to dig deeper and catch IllegalArgument and DataAccess by itself...

That's sad.
Just
⛓  PMD
again

Finally done. Now all possible Exceptions should get catched correctly.
# :free: PMD


How to use a custom AAC byte[] (stream) as a source for input inside a CustomAudioDevice

I am using the following library to connect a Logitech C270 camera to an Android 8.0 Smart TV.
AndroidUSBCamera
I have managed to capture the image and stream it to the second peer. However, I am having a trouble with the audio from the webcam. I have the AAC stream as a byte[]. I want using the CustomAudioDevice example to use it as an input so it would be streamed the other video chat peer.
My question, how to do that? Thank you very much.

The custom audio device takes unencoded samples, if you have AAC samples, it won't work with the Custom Audio Device since those samples are already encoded.
You would need to fetch samples in raw PCM format.
I'm going to close the ticket since this is not an issue, but please continue the discussion in here if needed


no widget seen on android app

I am trying to make this example
https://briefcase.readthedocs.io/en/latest/tutorial/tutorial-0.html
everything is fine but when I opened the app on my phone there is nothing to see, only an header which writes my app name but the button doesn't seems

@onrkrt this is the expected behaviour, quoting directly from What should happen section present at the bottom of the tutorial:

When the application runs, you should see a window with a title of “Hello World” appear. The window won’t contain any content - but it will be a native application, with a native icon in your task bar (or wherever icons appear on your platform).

@ArchKudo Ah - thanks for clarifying that... I really should know what is in our tutorials, shouldn't I :-)


F 407 save verified status of project in donation

related to #407

@aminlatifi  I have set f_380_organization_token_integration as source branch of this PR, because I needed to add test case for saveDonation for this implementation and we had test cases in that branch


[Coverity CID: 183032] Error handling issues in /tests/net/websocket/src/main.c

Static code scan issues seen in File: /tests/net/websocket/src/main.c
Category: Error handling issues
Function: test_v4_init
Component: Tests
CID: 183032
Please fix or provide comments to square it off in coverity in the link: https://scan9.coverity.com/reports.htm#v32951/p12996

No actual issue here, the function cannot fail in this case.


expand_message domain separation

The current hash_to_scalar construction does not allow for the calling operation to define the DST that will go into the underlying expand_message used. Some operations that need additional domain separation append the DST to the message.
The problem is that we cannot prove indistinguishably that way. For example consider the following, lets assume that in a protocol we call hash_to_scalar in the input msg ||  I2OSP(length(DST2), 1) || DST2 and get b_1, b_2, ... where,
b_0 = H(Z_pad || msg ||  I2OSP(length(DST2), 1) || DST2 || I2OSP(len_in_bytes, 2) || I2OSP(0, 1) || DST_prime)
b_1 = H(b_0 || ...)
b_2 = ....

Then, in some other place, the protocol returns h2 = H(Z_pad || msg || I2OSP(length(DST2), 1) || DST2). In that case, after observing h2 I could do a length-extension attack on H, calculate b_0 and then b_1, b_2 etc. This is not really a practical issue (it becomes less practical -but not impossible- if we also consider padding), but it does stop us from proving security. It also becomes a larger issue if people use a different expand_message (if they just use sha512 with a counter for example).
Proposed Solutions
Solution A
The currently proposed solution, discussed in the WG call, would be to define an additional optional argument to hash_to_scalar like dstInfo and append that to the DST already defined. i.e., inside hash_to_scalar calculate,
4. dst_prime = DST || dstInfo || I2OSP(length(dstInfo), 1)
5. expand_message(msg, dst_prime, len_in_bytes)

This is a bit weird because we are prepending the length everywhere else in the spec. However, if we do the same here and calculate dst_prime = DST || I2SOP(length(dstIfo), 1) || dstInfo then for example the pairs DST1 = [4, 2], dstInfo1 = [2] and DST2 = [4], dstInfo2 = [1, 2] will give the same dst_prime.
Similarly, we can't just concatenate the 2 (i.e., dst_prime = DST || dstInfo) because then for example the pairs DST1 = [1, 2], dstInfo1 = [3] and DST2 = [1], dstInfo2 = [2, 3] will again give the same dst_prime
Solution B
Don't define the DST in hash_to_scalar but require it as an input. So whatever operation calls hash_to_scalar will also need to specify a DST value to pass it. This is probably the most efficient approach when it comes to a straight line implementation, but IMO the "ugliest" looking when it comes to the spec.

Also, @andrewwhitehead pointed out that the only place that this method of domain separation (i.e., appending the dst to the msg) is currently used, is in MapMessageToScalarAsHash. That said, it will be a useful thing to resolve in general (see for example PR #186).
Also for completeness, another solution (that I'm not a huge fan of) is the following:
Solution C
Append the length of both the DST and the dstInfo to create dst_prime, i.e., inside hash_to_scalar do,
4. dst_prime = I2OSP(length(DST), 1) || DST  || I2OSP(length(dstInfo), 1) || dstInfo
5. expand_message(msg, dst_prime, len_in_bytes)

This is more consistent with the rest of the spec but it is a bit wasteful since, if dstInfo is not supplied, we will be prepending the DST with its length twice (once outside and once inside expand_message).

I think a third option is just to add an optional dst parameter to hash_to_scalar, defaulting to (something like) BBS_ || ciphersuite_id || HASH_TO_SCALAR. Then MapMessageToScalarAsHash is just hash_to_scalar with a DST like BBS_ || ciphersuite_id || MESSAGE, and KeyGen could use another DST (with key_info added). Existing uses of hash_to_scalar wouldn't need to be updated.

That may be the best solution. I'm not 100% clear as to how a calling operation like MapMessageToScalarAsHash will define the dst for hash_to_scalar?? Will hash_to_scalar be a parameter for that operation and define the dst there?? i.e., something like,
result = MapMessageToScalarAsHash(msg)

Parameters:

- hash_to_scalar, the hash_to_scalar operation defined in (#hash-to-scalar) with the dst parameter set
                  to "BBS_ || ciphersuite_id || MESSAGE"

Maybe an easiest option will be to define the dst in hash_to_scalar as an optional input that defaults to BBS_ || ciphersuite_id || HASH_TO_SCALAR rather than an optional parameter that does the same?? Or is this more error prone??

^ Yes, I meant input, not parameter.

Cool! Yea this maybe the best thing to do. I think it is a little more prone to error but that is why we have test vectors. Will give it a shot!

Discussed on WG call on 15th August, issue is ready for PR with consensus to move forward with the approach described by @andrewwhitehead


Timezone issue

Describe the bug
International users are having difficulty booking passes on mobile. Users are from the UK, Ireland and the US, attempting to book passes from android using Chrome, and iPhone using Safari.

To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Not a bug - this works as designed and it simply sold out quickly.
Notes summary:
People say they can't get a pass - bc it sold out in 15 seconds
The first 500 people hit the page, selected it, took 7 mins to type their stuff,
6 passes expired - did not complete booking; returned to the pool. The first pass became available at 7 mins 10 seconds. Within 5 seconds, someone held that pass, within 10 seconds, the next people got it.
Cam dug into all the data, pulled all the passes, got it sorted out, and now we have a script so we can see how long it took to book on a particular day but haven't modified it to look into the past - just the future.


Add table support

Add support for Wasm tables. Fixes #20.
The first 2 commits are refactors:

Move ToValType to convert as we'll need it not only for Funcs.

Move refs from Store to StoreData so it's accessible for both Store and Caller. This is we have a way of GC marking the extern refs we store in the Table.
Storing on the (Ruby) Table itself won't work because the user can drop their reference to Table, but we must still keep marking whatever they stored in the Table otherwise we could segfault or have data corruption.

The other commits implement tables.

@saulecabrera let me know if you find this hard to review, I can split up the first 2 commits in a separate PR.


Fix NotNullException getting field types

Fixed an exception getting in the way of FindUsages.  However, it doesn't seem to fix any other issues (that I've noticed).  It just stops the errors showing up in IDEA's error log.
I was trying to fix #136 when I tripped over this.
@sganapavarapu1 can you please review?

Approved


Why support a help command and command-line option?

The current client supports a command-line option for help (-h / --help) and a top-level help command. Are both really needed?
Version: v1.0.0-dev.28

I am not sure if I understand your point correctly. But IMHO I think that we need --help at all levels: at a top-level (edgex-cli --help) and at all specific command levels

Both are supported by default by the CLI library (Cobra) and are autogenerated.


Look up request/limits for cpu/mem from kubevirt CR for supporting containers

What this PR does / why we need it:
If a namespace contains a LimitRange that contains a request to limit ratio, the supporting containers in KubeVirt will fail to start. Especially if the request to limit ratio is low (like 1 or 2). This prevents for instance hotplugging a volume from working because the attachment pod is rejected by the k8s api. Same goes for container disks (both the init container, and regular container) as well as virtio-fs, and any special side cars defined. The default values have a very high request to limit ratio (usually 10+) and will fail.
This PR adds a new API field in the config section of the KubeVirt CR called SupportContainerResources that allows one to define cpu/mem request and limits on a per type of container basis. For example part of the KubeVirt CR config you can specify request/limits like this:
  supportContainerResources:
  - type: hotplug-attachment
    resources:
      request:
        cpu: 50m
        mem: 40M
      limit:
        cpu: 100m
        mem: 80M
  - type: container-disk
      limit:
        cpu: 120m
        mem: 60M

This will give a 2 to 1 ratio for both CPU and memory for the hotplug attachment pod container. And use the default request for the container disk and use the specified values for the limits.
The follow types are defined in this PR:

hotplug-attachment
container-disk (this will set both the init container and regular container values)
virtio-fs
sidecar

The PR also works if a dedicatedCpu or guaranteed QoS are requested for the appropriate containers. It will take the values of the limit and set them to the request, so req will have the same value as the limit (if defined in the CR, or the current default values if not).
If these resources are NOT defined in the CR, then from a user perspective nothing will change (besides a bug fix for dedicated CPU and guaranteed QoS, where the wrong value was picked) because the current default values will be applied.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #9302
Special notes for your reviewer:
Release note:

Ability to specify cpu/mem request limit for supporting containers (hotplug/container disk/virtiofs/side car)

/cc @xpivarc @vladikr @mhenriks

/retest

Thanks @awels !
From the functionality point of view, it looks good to me.
/approve

@vladikr
I wonder how users should figure out these values. Could we simply do guaranteed containers all the time?
Also in some cases, the "static" configuration might not be enough. For now, this is the case only for virtiofs where the memory is a direct correlation to how many files you want to be able to handle.

@vladikr I wonder how users should figure out these values. Could we simply do guaranteed containers all the time?

Users don't need to. It's the cluster admin that set these values or not. In general, kubevirt already provides a default , KubeVirt CR is optional.
This pr merely provides a way to adjust the default values KubeVirt sets - by the admin, on the cluster level...
From my pov, it is risky to specify limits when it's not needed/required.

Also in some cases, the "static" configuration might not be enough. For now, this is the case only for virtiofs where the memory is a direct correlation to how many files you want to be able to handle.

Right, but we don't have a way to profile vitriofs. ( also it's behind a feature gate).  We should have a sane default setting and a way for the admin to tweak it.

Right, but we don't have a way to profile vitriofs. ( also it's behind a feature gate). We should have a sane default setting and a way for the admin to tweak it.
Which is what this PR provides.

@xpivarc If you don't modify the KubeVirt CR, this PR will have no effect on your cluster at all. Like Vladik said this gives the admin the ability to tweak some of these values at the cluster level. Any missing values in the CR will get filled by the defaults we currently have. So if you don't change your CR, there will no difference (well besides the bug fix with dedicated CPU/QoS, picking the lower end value instead of the higher one).

Users don't need to.

Sorry, in this case, I had cluster admin in mind.

In general, kubevirt already provides a default , KubeVirt CR is optional.

Right and I argue that for at least containerDisk and hotplug we can do accurate default. Which is powerful with the case mentioned below.

From my pov, it is risky to specify limits when it's not needed/required.

@vladikr
But we always provide them afaik. So why don't we just use requests == limits?

Users don't need to.

Sorry, in this case, I had cluster admin in mind.

In general, kubevirt already provides a default , KubeVirt CR is optional.

Right and I argue that for at least containerDisk and hotplug we can do accurate default. Which is powerful with the case mentioned below.

We can, but on the other hand, we saw OOMs multiple times happening on these containers.
What risks do you see with having an override?

From my pov, it is risky to specify limits when it's not needed/required.

@vladikr But we always provide them afaik. So why don't we just use requests == limits?

Just because it increases the risk for OOM, I would avoid it, unless it is explicitly needed.

Well as we have found the KubeVirt defaults simply don't work for all cases, a recent example is the request to limit ratio on limit ranges. We can debate if they shouldn't do that at all, but the fact is, our defaults don't work for all cases, so giving some flexibility to the admin to change them is a good thing to have.

/hold cancel
I addressed the API issues

We can, but on the other hand, we saw OOMs multiple times happening on these containers.
What risks do you see with having an override?

@vladikr  But we do have limits today. Doing requests = limits would not change anything, in other words, it would not increase the chance of OOM. We could argue it might actually help as Kubelet will account for the memory "more correctly" and we might avoid memory pressure(?).

Well as we have found the KubeVirt defaults simply don't work for all cases, a recent example is the request to limit ratio on limit ranges. We can debate if they shouldn't do that at all, but the fact is, our defaults don't work for all cases, so giving some flexibility to the admin to change them is a good thing to have.

Let me make it clear I don't want to block this but I am trying to clear the mist.
The use case we mainly want to solve with this would be solved by the requests = limits scenario. This is still relevant at least for a subset of these containers even with my proposed change.

Fair enough.

/retest-required

@awels Stupid question maybe, but what do you think about not setting requests/limits at all unless they are explicitly specified in the KubeVirt CR?

I believe that will mess with quotas if not set. I would have to go find the details on why we decided to always explicitly set something.

Just to ping some people here, what is stopping this PR from getting a /lgtm? Everything is addressed AFAIK.

/retest-required

/lgtm
/retest-required

/test pull-kubevirt-e2e-k8s-1.25-sig-performance

/hold
sig-performance seems to fail consistently now.

So the lane was failing due to not enough cpu available to start all the VMIs in the test. Changed the limit on container disks cpu from 100m to 10m

/test pull-kubevirt-unit-test

/lgtm


Match expression

Fixes #48.
Current todo list:

[x] Add match expression in concrete (and syntax?).
[ ] Correctly handle Match in various visitors (Renamer, ExprTycker, etc.).
[ ] Unify the logic for pattern matching in function definition and that with match expression.
Main difference here is that we can simultaneously match multiple arguments in function definition, but only allowing one scrutinee in the match expression. Maybe just elaborate matching multiple arguments into matching a tuple.
[ ] Add test cases.

Syntax is already there. Just patch the producer. However, I recommend you to wait until we migrate the frontend.

:fire:

ping

Type checking for match is implemented by reusing the elabClausesClassified.
However, currently not even the simplest case would pass, due to some weird patterns being generated in the match clauses.
I need to reinvestigate all the visitors used after AyaGKProducer for this matter.

Type checking for match is implemented by reusing the elabClausesClassified.
However, currently not even the simplest case would pass, due to some weird patterns being generated in the match clauses.
I need to reinvestigate all the visitors used after AyaGKProducer for this matter.

When do you have time? We can debug it together.

I've looked into this issue yesterday, and one problem is that ExprTraversal does not visit patterns.
This makes the pattern preprocessing logic applies to function declaration with pattern matching statements, but not to match expressions in function body.
The fix wouldn't be hard, but more likely there are other issues hiding around.

I've looked into this issue yesterday, and one problem is that ExprTraversal does not visit patterns.
This makes the pattern preprocessing logic applies to function declaration with pattern matching statements, but not to match expressions in function body.
The fix wouldn't be hard, but more likely there are other issues hiding around.

I think there is a subinterface of ExprTraversal that visits patterns. You should just copy and paste it.

@wsx-ucb from now on, you no longer need to regenerate the lexer. Only the parser. Yay!

We should have a meeting and discuss these changes.


New "whitelist" option and Xiaomi Smart Repellent support

Tested. Me and at least two users requesting a whitelist and repellent support.

Thank you!


Not So Much An Issue...But more of a Question

I want to plug an external usb sound card
Is it possible to pass Through the sound over the usb in Chromium OS for the RPi 4b ?

If your USB device is recognisable in mainline Linux, it should likely work on Chromium OS. Give it a try to find out.


ROR reader not relying on file system for jobs system

Automatically download the latest ROR data dump file
Stream it to the next reader/transformer without relying on the file system.

FYI, I just removed the commit with the message datastreams: use ROR HTTP reader for funders which modifies invenio_vocabularies/contrib/funders/datastreams.py as follows:
 DATASTREAM_CONFIG = {
     "readers": [
+        {"type": "ror-http"},
         {
             "type": "zip",
             "args": {

Once inveniosoftware/invenio-app-rdm#2674 is merged, we could add back this commit if we want the downloading of the ZIP file to be the default behavior.


Asana Google Auth login popup dissappears to quickly.  [master]

Hi. I am trying to login with asana, which uses google auth. I get a popup but it quickly goes away. Any ideas why that happens?
Thanks.

My bad... Not kwm related hah


feat: update to 1.16.0

Update to 1.16.0

:tada: This PR is included in version 1.16.0 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Wrong parsing when month is overflown and there is MMM in one of the formats

HI.
Getting really strange parse result, when passing formats and there is a month overflow in input string and one of the formats is with MMM.
Example (http://jsfiddle.net/igoryan/yyx0j6os/4/):
moment('01/15/80 3:34', ['DD/MM/YY h:mm']) works correctly
but
moment('01/15/80 3:34', ['DD/MM/YY h:mm', 'DD-MMM-YY hh:mm']) will result in "Thu Jan 01 2015 03:34:00 GMT-0600"  instead of invalid value.
Looks like in first case the isValid() is 'false', because _pf.overflow = 1, and then second format is accepted, even though 'MMM' and '/80' are not matched.

Use strict mode for this (pass true as a third parameter).
moment('01/15/80 3:34', ['DD/MM/YY h:mm', 'DD-MMM-YY hh:mm'], true)

Thanks.
Not really an option for me to use "strict" mode though, i would have to pass like 200 formats.
"Non strict" works just fine in all other cases and forgives using different separators, for instance.
Should it not be checking the input for 3 characters and not use MMM masks if there are none?

On second thought, I'm going to re-open this - as I can see how the promise of being able to scan for more than one possible format is broken here.
Your workaround sounds reasonable, though consider the string detected by MMM may not always be three digits long in all locales.

@igoryan-k works correctly? What about the month being 15, which is greater than 12. Moment doesn't  support overflows (results in invalid moments), like Date does. Maybe adding a flag to allow them makes sense, but for now they are not.
Use a base time and then m.add(14, 'months') instead of this.

@ichernev my intention was not to make it to parse a wrong value (like month being 15), but return an invalid value instead. This situation is what we getting when users typing in a wrong month in US culture, for instance. It chooses 'MMM' formats and parses it as some 'valid' value. I still don't see how is this a right behavior.

Put a date picker. People can't read instructions or use the keyboard. Also you can check the parsing flags and ignore the result of you don't like it. In your case there will be unused tokens/input.


Performance issues in your project (by P3)

Hello! I've found a performance issue in your project: batch() should be called before map(), which could make your program more efficient. Here is the tensorflow document to support it.
Detailed description is listed below:

/train_nets.py: dataset.batch(args.train_batch_size)(here) should be called before dataset.map(parse_function)(here).
/utils/data_process.py: dataset.batch(32)(here) should be called before dataset.map(parse_function)(here).

Besides, you need to check the function called in map()(e.g., parse_function called in dataset.map(parse_function)) whether to be affected or not to make the changed code work properly. For example, if parse_function needs data with shape (x, y, z) as its input before fix, it would require data with shape (batch_size, x, y, z).
Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.

Hello, I'm looking forward to your reply~


Rebalancing while KafkaMessageListenerContainer is paused prevent it from being paused again after the rebalance

Kafka spring version : 2.1.5.RELEASSE
Kafka client version : 1.0.0
If a rebalance occurs while a KafkaMessageListenerContainer is paused, consumption of records will resume and it will not be possible to pause the container again.
This is because the private variable "consumerPaused" is not reinitialised during a rebalance. It while be stuck on "true" even though the consumer is not paused anymore. From this moment on, it will not be possible to pause the container again and records will be fetched/consumed on each poll. To pause the container again you have to resume it, let it poll once, then you can pause it again.
This can be reproduce with a KafkaMessageListenerContainer configured as follows :
ContainerProperties containerProperties = new ContainerProperties("topic-test");
containerProperties.setGroupId("group-test");
containerProperties.setAckMode(AbstractMessageListenerContainer.AckMode.MANUAL_IMMEDIATE);
containerProperties.setMessageListener(new TestListener());
containerProperties.setErrorHandler(new TestErrorHandler());
KafkaMessageListenerContainer<K, V> messageListenerContainer = new KafkaMessageListenerContainer<>(consumerFactory, containerProperties);

public class TestListener implements AcknowledgingMessageListener<String, String> {

    private static final Logger log = LoggerFactory.getLogger(TestListener.class);

    @Override
    public void onMessage(ConsumerRecord<String, String> record, Acknowledgment ack) {
        log.info("Consuming " + record.partition() + ":" + record.offset());

        throw new IllegalStateException("Test");
    }
}

public class TestErrorHandler implements ContainerAwareErrorHandler {

    private static final Logger log = LoggerFactory.getLogger(TestErrorHandler.class);

    @Override
    public void handle(Exception thrownException, List<ConsumerRecord<?, ?>> records, Consumer<?, ?> consumer, MessageListenerContainer container) {

        seekToCurrent(records, consumer);

        container.pause();

        log.info("Consumer paused in Error handler");
    }

    private void seekToCurrent(List<ConsumerRecord<?, ?>> records, Consumer<?, ?> consumer) {
        Map<TopicPartition, Long> offsets = new LinkedHashMap<>();
        records.forEach(r -> offsets.computeIfAbsent(new TopicPartition(r.topic(), r.partition()), k -> r.offset()));
        offsets.forEach(consumer::seek);
    }
}

At start up it should output something like this :
 partitions assigned: [topic-test-9, topic-test-7, topic-test-8, topic-test-5, topic-test-6, topic-test-3, topic-test-4, topic-test-1, topic-test-2, topic-test-0]
 Consuming 7:1
 Consumer paused in Error handler

If you then start another instance, it will try to join the group. This will cause a rebalance. This should output something like this :
partitions revoked: [topic-test-9, topic-test-7, topic-test-8, topic-test-5, topic-test-6, topic-test-3, topic-test-4, topic-test-1, topic-test-2, topic-test-0]
partitions assigned: [topic-test-9, topic-test-7, topic-test-8, topic-test-5, topic-test-6]
Consuming 7:1
Consumer paused in Error handler
Consuming 7:1
Consumer paused in Error handler
Consuming 7:1
Consumer paused in Error handler
...

As you can see, it is now impossible to pause the container. This is because the variable consumerPaused in KafkaMessageListenerContainer.java is still true even though the consumer as been "reset" during the rebalance.
Not sure if the is the right way to fix it but it could be fixed by calling resume() during onPartitionsRevoked in the ConsumerRebalanceListener.

Can't we have a configuration option like resumeAfterRebalance to give a choice for users to stay paused even after rebalance?

Actually, the consumer thread will automatically re-pause before the first poll after the rebalance, so users can use a rebalance listener to resume() the container so it won't automatically re-pause.

Hi Gary,
Just wanted to double check that this definitely fixes the issue - before using spring-kafka we faced a similar issue in that when we had a consumer in paused state, which we checked before each poll then after a rebalance there was exactly one set of records returned before the pause was honoured again.
The problem we had was that just prior to calling poll on the consumer, we would, if we detected we should be paused, call consumer.pause(consumer.assignment()). However prior to the first poll after a rebalance, the assignment() call returns no partitions, and so none were paused. The assignment of partitions actually happens synchronously during the first poll. After a rebalance, the synchronous steps that occur in consumer.poll are - update assigned partitions, invoke onPartitionsAssigned on any rebalanceListeners, then retrieve records for any non-paused partitions.
This means that the only way to avoid accidentally consuming records after a rebalance is to pause the assigned partitions on the consumer IN the rebalanceListener so it takes effect before the first records are fetched..
I think in this solution you are setting the (spring) pause flag in the rebalanceListener when partitions are assigned but not pausing the consumer itself. This will occur in the first poll, and the first set of records would be fetched before the second poll when the flag is noticed and the consumer partitions are paused.
I could be wrong here. I'm glad to see the issue has been raised as I just noticed the problem in our application, having just switched to spring-kafka. I'll check if we are using the version with this fix in, and if not, update and try to reproduce.
Thanks, Chris

@christopher-gilbert The consumer is re-paused in the listener, we don't just set the flag...
https://github.com/spring-projects/spring-kafka/blob/9342e191f9f9b2fe3727ad310ae74f605ba454a5/spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java#L1754-L1759
I looked at the consumer code while I was working on this and, if the current poll (that invokes the listener) has already retrieved records for any of these partitions, it discards them because the consumer is paused.

Sorry - the original fix for this just reset the flag; doing the pause in the listener was a follow-up.
https://github.com/spring-projects/spring-kafka/issues/1111

Thanks Gary, I'll upgrade to the latest to pull in this fix. I should have checked the latest source code to see that it had been covered.
Cheers, Chris

To be honest this seems like one of the oddest parts of Kafka client code, the need to pause specific partitions, I can't imagine any case where you wouldn't want a consumer group to pause on an entire topic,  suggesting that the group co-ordinator should just figure out whether its members should be getting records or not.


Add steps to get CRN sites & download some example data

Updated the pipeline to include steps to pull down Climate Response Network sites and corresponding data. To use this pipeline and get data to play with, change the dates in 0_config.yml to the time period you would like and run the following:
library(scipiper)
scmake("1_fetch/out/gw_crn_data.rds")
crn_data <- readRDS("1_fetch/out/gw_crn_data.rds")

This adds CRN sites to fetch, but nothing else. The remaining process, visualize, and animate steps are the same.

hmmm I am getting this issue

hmmm I am getting this issue

Can you verify that gw_crn_sites is not empty? gw_crn_sites <- scmake("gw_crn_sites")

Can you verify that gw_crn_sites is not empty? gw_crn_sites <- scmake("gw_crn_sites")

It is empty

It is empty

is gw_crn_sites_sf also empty?

is gw_crn_sites_sf also empty?

No

No

But gw_crn_sites is null

But gw_crn_sites is null

Works with changing
extract_crn_sites <- function(gwcrn_sf) {
  # The site ids are read in as factors in st_read
  gwcrn_sf %>% pull(SITEID) %>% levels()
}

to
extract_crn_sites <- function(gwcrn_sf) {
  # The site ids are read in as factors in st_read
  gwcrn_sf %>% pull(SITEID) %>% unique()
}

Works with changing
extract_crn_sites <- function(gwcrn_sf) {
  # The site ids are read in as factors in st_read
  gwcrn_sf %>% pull(SITEID) %>% levels()
}

to
extract_crn_sites <- function(gwcrn_sf) {
  # The site ids are read in as factors in st_read
  gwcrn_sf %>% pull(SITEID) %>% unique()
}

Huh, wonder if there is a change in from R versions (I am using a pretty old version)

Huh, wonder if there is a change in from R versions (I am using a pretty old version)

for me levels() only works with factors and not character

for me levels() only works with factors and not character

Huh, maybe that is the issue then. That column is a factor for me. I might have an old sf?

Huh, maybe that is the issue then. That column is a factor for me. I might have an old sf?

I think the default in R 4.0 is that strings are strings and no more stringsAsFactors

I think the default in R 4.0 is that strings are strings and no more stringsAsFactors

... I am still on 3.6 😳 guess I should update soon!

... I am still on 3.6 😳 guess I should update soon!


Make derived buffers recyclable / Add missing overrides to ByteBuf impls

Related: #4333 #4421
Motivation:
slice(), duplicate() and readSlice() currently create a non-recyclable
derived buffer instance. Under heavy load, an application that creates a
lot of derived buffers can put the garbage collector under pressure.
Modifications:

Deprecate the old derived buffer implementations
Add the new recyclable derived buffer implementations, which has its
own reference count value

When a derived buffer is created, its internal reference count is 0.
When retain() is called on a derived buffer, the internal reference
count becomes a positive value and the original buffer's retain() is
called.
When release() is called on a derived buffer, the internal reference
count is decreased first, and then the original buffer's release()
is called when the internal reference count is 0.

Add ByteBufUtil.duplicate/slice() so that a user can easily implement
ByteBuf.duplicate/slice()
Add missing overrides in some ByteBuf impls
Fix incorrect range checks in SlicedByteBuf
Miscellaneous:

Merge Duplicated/SlicedAbstractByteBuf.unwrap0() into unwrap() using
covariant return type

Result:

Derived buffers are now recycled when retained and released, although
they are not recycled if a user called release() against the original
buffer.
buf.slice().retain().release(); // recycled
buf.slice().retain(); buf.release(); // not recycled

Correct range checks in SlicedByteBuf

@ninja-, @merlimat, @normanmaurer PTAL. Please let me know if there's any regression. It changes how reference counting works for derived buffers.
I think we can remove the methods that ends with Retained before cherry-picking.

Talked to @trustin, please hold back with review this needs some changes.

Will open a clean PR after rebasing.

@trustin - don't forget to delete this branch when its no longer needed.

Fixed by https://github.com/netty/netty/pull/5144


Added code to NavigationView API in action sample

Added interactive code snippet for the last sample on the NavigationView page.
Description

Used ControlExample.Xaml control to show code sample. The only options check box not wired correctly in the sample is "Autosuggestbox visible" because I couldn't figure out a good property to bind to.
Also updated the namespace title from muxcontrols to muxc.
Motivation and Context

#42
How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

The only options check box not wired correctly in the sample is "Autosuggestbox visible" because I couldn't figure out a good property to bind to.

The ItemsRepeater xaml and cs pages show how to create a ControlExampleSubstitution that doesn't use binding (and instead uses Key and Value).

The only options check box not wired correctly in the sample is "Autosuggestbox visible" because I couldn't figure out a good property to bind to.

The ItemsRepeater xaml and cs pages show how to create a ControlExampleSubstitution that doesn't use binding (and instead uses Key and Value).

Thank you, that was a helpful pointer. Who knew you can set the Value property in code behind ;D


embind11 does not build with most optimizations -01,-02,-03

building embind11 with optimizations gives a runtime error on the JavaScript side complaining about sig being undefined for some javascript funciton.
The related function is en embind::val related function

this is only valid for an old version of embind where a lot of embind::val was used. But I would like to keep this issue open

this seems to be semi-fixed. Once I removed -fexception and replace it with fwasm-exception it compiles again with -O3 but asyncify is not working with -fwasm-exception

closing this since we do not rely on embind any more (even though the issue is still the same with other builds)


Weird behavior when body reaches x coordinate of over ~800

Hi!
I tried using matter-js for a little spaceship game i made for fun, but my spaceship seems to hit an invisible wall at around x=800.
I have isolated the problem in a codepen here: http://codepen.io/anon/pen/VYzWRa
As you can see my horizontal gravity moves the body to the right but it stops at some arbitrary point. Also, if you try to drag the body with the mouse at this point you can see that it is being effected by a force of some sort.

This is because the engine does not update bodies that go outside the world bounds.
For now, try this for infinite bounds:
engine.world.bounds = {
  min: {
    x: -Infinity,
    y: -Infinity
  },
  max: {
    x: Infinity,
    y: Infinity
  }
}

Going forward, maybe I should remove this limitation or maybe make it opt-in.

Thanks that fixed the issue.
Yes, I think you should remove this limitation or at least default it to infinite. I think most users would not expect there to be such a restriction. I didn't at least.
Ok keep up the good work, and gogo speculative contacts :grinning:

+1
had no idea why a certain part of the scene made the bodies get "stuck" until I found this.


LibWasm: Clean up module sections API

Remove for_each_section_of_type in favor of making the module's sections defined as distinct fields. This means it is no longer possible to have two of the same section (which is invalid in WebAssembly, for anything other than custom sections). We previously didn't account for this behavior because the Wasm testsuite only checks that we don't have duplicate start sections (which we handled in the validator phase).
This also makes Module a little bit easier to work with, since we no longer need to wrap everything in for_each_section_of_type.

Hmm.. I'm not sure. You don't ever need information distinguishing empty sections and non-existent ones in the Wasm spec. I think this helps clean up a lot of code, such as:
CodeSection const* code_section { nullptr };
module.for_each_section_of_type<CodeSection>([&](auto& section) { code_section = &section; });
module.for_each_section_of_type<FunctionSection>([&](FunctionSection const& section) {
    if ((!code_section && !section.types().is_empty()) || (code_section && code_section->functions().size() != section.types().size())) {
        result = Errors::invalid("FunctionSection"sv);
        return;
    }
    m_context.functions.ensure_capacity(section.types().size() + m_context.functions.size());
    for (auto& index : section.types()) {
        if (m_context.types.size() > index.value()) {
            m_context.functions.append(m_context.types[index.value()]);
        } else {
            result = Errors::invalid("TypeIndex"sv);
            break;
        }
    }
});

Becomes:
if (module.code_section().functions().size() != module.function_section().types().size())
    return Errors::invalid("FunctionSection"sv);

m_context.functions.ensure_capacity(module.function_section().types().size() + m_context.functions.size());
for (auto& index : module.function_section().types())
    if (m_context.types.size() > index.value())
        m_context.functions.append(m_context.types[index.value()]);
    else
        return Errors::invalid("TypeIndex"sv);

without any need to dance around the Optional. I think the information that we lose ultimately helps make everything else more simple, since we no longer need to handle states that are different but functionally equivalent in the spec (like having a non-existent section vs. one that exists but is empty).
Also, module sections are supposed to be ordered anyway (ignoring custom sections), which I'll make a PR for at some point.

Alright, I don't like the slightly YOLO state, but I suppose it does model things correctly, so let's do it.


Attempting to connect a github account is failing with a 400 error

The 400 error points to this page  https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/ .
This call to get the user info is using a deprecated authentication method (passing access_token param).  Updated to use the existing request method which uses the header based authentication.
I apologize, I don't have the required clientId/secret to test this fix, and not sure if it has to be deployed on something other than localhost to test it.  Hopefully this is a simple change to test.

Had some time to figure out the github credentials and set it up.  This didn't work and I found another pull request already pending which fixes this issue.


std::simd

Tracking issue for an initial implementation of stdsimd.

[ ] Initial implementation
[ ] Submodule in rust-lang/rust
[ ] Stabilize!

Could we move this issue to https://github.com/rust-lang/stdsimd/issues?

Ah this issue is a bit of a stub right now, and is living here so that anybody who finds their way to this repo can get an idea of what we’re currently working on.


TestUpdateClusterQueue brittle test

What would you like to be cleaned:
in queue.manager_test.go, we attempt to create inadmissible workloads, to verify that they are later active when updating a ClusterQueue. Observe that they are never inadmissible, by adding an assertion right after their creation
https://github.com/kubernetes-sigs/kueue/blob/d786072f994668c0240889d93c63f48a620ea6ad/pkg/queue/manager_test.go#L159-L165
// also, manager.DumpInadmissible() will be empty
activeWorkloads := manager.Dump()
wantActiveWorkloads := map[string]sets.String{}
if diff := cmp.Diff(wantActiveWorkloads, activeWorkloads); diff != "" {
  t.Errorf("Unexpected active workloads (-want +got):\n%s", diff)
}

Why is this needed:
Test still passes after deletion of this section:
https://github.com/kubernetes-sigs/kueue/blob/d786072f994668c0240889d93c63f48a620ea6ad/pkg/queue/manager_test.go#L167-L185

/assign


relayers-observer lambda function

A cron job that checks the relayers' balance every X minutes. An AWS secret was created with a private key and an unused address, which will receive funds from the coinbase and redistribute them to the relayers. Each time the Lambda runs, it checks if the relayers' balance has dropped below a certain threshold and, if necessary, transfers funds to the relayers to restore the required balance.

to fix your trouble check this solution click
maybe this will solve your problem.


fix: chained promises to guarantee deletion order

Previously, in the delete code sample, due to the async callbacks given
to runTransaction, it was possible for the last delete query to be
executed before the second last delete query. The deletion order is
important so now using runTransactionAsync with the promises chained
to guarantee the deletion order.
Fixes #1147, #1095

Closing in favor of #1156.


Lazy Loading Parameter

Clear and concise description of the problem
Currently Lazy Loading Parameter checkInView: true Enables to check is the Swiper in view before lazy loading images on initial slides
Suggested solution
Option to check how many pixels before in view before lazy loading images on initial slides.
Alternative
No response
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Would you like to open a PR for this feature?

[ ] I'm willing to open a PR

Swiper v9 doesn't lazy module anymore. If you have similar issues in Swiper 9, open a new issue with a CodeSandbox showing the issue.


Structure of df

Hi!
Please, could you add an example of how the input df should look? I don't understand columns ds and y.
Thanks :)

Hi!
I've added an example of the structure; ds is the date column of the time series and y the value at that date.
Please let me know if you have any problem. :)

Thanks a lot!


Fixed precondition check for overwriting in datapublisher

Coverage decreased (-0.05%) to 42.926% when pulling eef1cbb697d496ab403072f0f696a829bbc10312 on kadaan:FixDataPublisherOverwriteCheck into 2268f257685a5189eb68996f65151fff1d700a47 on linkedin:master.

@zliu41 Can you please review this?

Coverage decreased (-0.06%) to 44.033% when pulling 955a48333d655810a5e067792ddad54e84eb6064 on kadaan:FixDataPublisherOverwriteCheck into 4343bc433a92879f64e2e8296fc9e616522fcba0 on linkedin:master.

Coverage decreased (-0.04%) to 44.045% when pulling 955a48333d655810a5e067792ddad54e84eb6064 on kadaan:FixDataPublisherOverwriteCheck into 4343bc433a92879f64e2e8296fc9e616522fcba0 on linkedin:master.

LGTM

Thanks


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_043mw_5xzl/clone/recipe/meta.yaml:15: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_043mw_5xzl/clone/recipe/meta.yaml:20: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_043mw_5xzl/clone/recipe/meta.yaml:51: missing_imports_or_run_test_py: Python packages require imports or a python test file in tests.
ERROR: /tmp/abs_043mw_5xzl/clone/recipe/meta.yaml:57: missing_documentation: The recipe is missing a doc_url or doc_source_url
ERROR: /tmp/abs_043mw_5xzl/clone/recipe/meta.yaml:57: missing_license_family: The recipe is missing the about/license_family key.
WARNING: /tmp/abs_043mw_5xzl/clone/recipe/meta.yaml:57: missing_description: The recipe is missing a description
ERROR: /tmp/abs_043mw_5xzl/clone/recipe/meta.yaml:57: missing_dev_url: The recipe is missing a dev_url
Errors were found


Running deno task test doesn't run any tests

Seems like you explicitly need to provide it with a path for which tests to run.
Running without extra arguments should just run both e2e and unit tests.

Seems like it's no longer an issue.


Feature brick creates all the folders on the way to the selected folder

Just tried right-clicking on a folder and creating a feature brick. Here's what I've got:

Steps to reproduce

Install ML bricks
Right click on a folder
Select the feature brick and finish making it
Observe the result

wait, how do you "right click on feature and select the feature brick"? are you using any plugin?
Our mason bricks are supposed to make from the command line, assuming we are always in the root folder


Description of indicators

First, thanks so much for the awesome package.
Is there a place where we can see a description for each of the indicators being fetched?

Hi, i wanna know how is calculated CCI201 in:
def CCI20(cci20, cci201):
    """Compute Commodity Channel Index 20
    Args:
        cci20 (float): CCI20 value
        cci201 ([type]): CCI20[1] value
    Returns:
        string: "BUY", "SELL", or "NEUTRAL"
    """
    if (cci20 < -100 and cci20 > cci201):
        return Recommendation.buy
    elif (cci20 > 100 and cci20 < cci201):
        return Recommendation.sell
    else:
        return Recommendation.neutral


Add Splash Screen Library

This PR adds the androidx Splash Screen compat library, which can be used to show fancy animations when opening the app on API 31+ (Android 12+), and maintains the old behaviour on apis prior to that.
More spefically, I wanted to have different a splash screen when on dark mode, solving https://github.com/IacobIonut01/Gallery/issues/318.
I followed this official guide to migrate to this api: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate.
Tested and working on Pixel 8 (physical) and Pixel 3a (virtual)

Looks good to me


@conda-forge-admin,please add bot automerge

A suggestion, since the PRs generally merge cleanly

well that didn't happen.
@conda-forge-admin, please add bot automerge

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I added bot automerge in conda-forge/vsc-install-feedstock#36.


Wallet Account

[ ] 3.1. Social Account Login ( Custody )
[ ] 3.2. Multi Account
[ ] 3.3. Social Recovery
[ ] 3.4. DSMS ( Phone number )

Selendra have native social recovery


hanged unavailable file in deleteExpiredFileByTime

the first file of dataFileList is not available, after deleteExpiredFileByTime.

the first time shutdown() is called, if refCount > 0, the file will not be deleted and mark available = false.
the second time shutdown() is called, it will be deleted. but if the disk is not full the second time,  shutdown() is not called, and the file will be not available all the time.
see https://github.com/apache/rocketmq/blob/develop/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java#L1690

Merged


Anyway to change template?

Good morning/evening. Maybe that is because I am newbie in RoR and can't see all, but how to change standard template? Looked all folders and nothing. So, IMHO, it will be great if you put this info into docs or FAQ.

Hi!
Look at the source code of blogo and decide, which template you would like to change/override.
E.g. if you want to change this template: https://github.com/greyblake/blogo/blob/master/app/views/blogo/posts/show.html.erb
Create file in you application with the following path: app/views/blogo/posts/show.html.erb and put any content you want.
Views in your application have priority over views that come from engines, so rails will pick you template


JBEAP-12014 update spec jars to include proper licence info

retest this please

@ctomc if this passes CI and I don't come back to merge it, please ping me. I'm making one of my occasional dives into the WF full PR queue but I tend to not come back for a while and leave things hanging.

@ctomc Is the only diff in any of these releases the license info stuff? If so I'll merge it on my own. Otherwise, @stuartwdouglas @asoldano @darranl please approve.

@bstansberry This updates only have license info stuff changed, noting else was change at the time.

My only comment is this should really have a WFLY Jira not a JBEAP Jira.

@darranl it does have it now,
@stuartwdouglas rebased


rubyPackages: add standard

Description of changes
This adds the standard gem : https://rubygems.org/gems/standard/, as described in the manual: https://nixos.org/manual/nixpkgs/stable/#adding-a-gem-to-the-default-gemset.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

I just rebased this branch & retested compilation of all packages that depend on this change.
The new standard version requires pinning in the Gemfile cf. https://github.com/testdouble/standard/releases/tag/v<IP_ADDRESS>.

@ofborg eval

nixpkgs-review run on x86_64-linux 1

21 packages built:

rubocop
rubyPackages.lint_roller
rubyPackages.rubocop-performance
solargraph
rubyPackages.standard
rubyPackages.standard-custom
rubyPackages.standard-performance
rubyPackages_3_2.lint_roller
rubyPackages_3_2.rubocop
rubyPackages_3_2.rubocop-performance
rubyPackages_3_2.solargraph
rubyPackages_3_2.standard
rubyPackages_3_2.standard-custom
rubyPackages_3_2.standard-performance
rubyPackages_3_3.lint_roller
rubyPackages_3_3.rubocop
rubyPackages_3_3.rubocop-performance
rubyPackages_3_3.solargraph
rubyPackages_3_3.standard
rubyPackages_3_3.standard-custom
rubyPackages_3_3.standard-performance

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/4480


Dependencies do not follow --target?

Hi,
On windows, in a cmd configured with:
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86

I'm trying to build a 32bits DLL by calling:
cargo build --target i686-pc-windows-msvc

but many dependencies fail to build:
error: linking with `C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe` failed: exit code: 1112
  = note: msvcrt.lib(chkstk.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

and I can noticed in the lib path from the huge command line just before the error:
.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\

when I'm expecting i686-pc-windows-msvc instead.
Am I missing something or did I bumped into some cargo bug?
> cargo --version
cargo 1.29.0 (524a578d7 2018-08-05)

If I configured my console with:
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64

then dependencies build fine but my final DLL fails to link because of using 64bits linker.

not a bug: https://users.rust-lang.org/t/dependencies-does-not-follow-target/20563/2?u=geobomatic


[ibm-granite/granite-8b-code-instruct]: Empty reponses on ibm-granite

The model to consider.
https://huggingface.co/ibm-granite/granite-3b-code-instruct
https://huggingface.co/ibm-granite/granite-8b-code-instruct
The closest model vllm already supports.
https://huggingface.co/ibm-granite/granite-20b-code-instruct
https://huggingface.co/ibm-granite/granite-34b-code-instruct
What's your difficulty of supporting the model you want?
Chat completion produces empty responses when loading OpenAI API with ibm-granite 3b and 8b code-instruct models.
20b and 34b models produce expected responses.
 (If needed)
Any notes on this?

Problem is solved with PR 4636

I can add it! (If needed) Any notes on this? @DarkLight1337

Not really, just make sure that the chat template is provided by HuggingFace; otherwise you'll have to provide your own via --chat-template parameter.


Ideas for better cropping

This is really cool, I've built my own one. I didn't realize it needed an Inky display and bought a Waveshare one (same size). I have modifications which I'll tidy up to support their displays to commit later.
I've only generated a few images (around 5 or so), but so far the experience has seemed to generally be that the cropping doesn't leave great results. It might be because I'm trying to use my display in portrait mode rather than landscape, but I've often had images of single or few flowers generate and then half of it is cropped away.
Looking at the repository for OnnxStream, it isn't possible to change the image generation size, so it is stuck at 512x512 px. I was wondering if you had any other ideas for getting the images to fit the display better? I'm currently doing a generation with a tweaked prompt in the hopes it'll work (I've never done anything with SD before), but failing that I'm thinking about doing a post-processing run with OpenCV to extract the subject out, scale it to the right size, and spread the background to fill, as long as the background is simple.
If you're amenable to it, I also have a bunch of modifications to the generate_picture.py script; they're mostly changes exposing parts of the program as command line arguments, but I've also pulled the prompts out into a json file and provided the ability to specify which file to read prompts from, or to provide a prompt directly from the command line. If you think that'd be useful I can submit a PR for those changes as well as one for the Waveshare support.

hi,
OnnxStream now supports generating images of arbitrary resolutions for SDXL Turbo via the --res option, for example "--res 800x480". In portait mode, you should use "--res 480x800".
Compared to the 800x480 resolution, the application uses the same RAM as the standard 512x512 resolution (thanks to tiled decoding) and the result is pretty good!
Vito
PS: this is a lovely project, by the way, especially using an Inky display! I'll build one for myself!

That's cool, does the output size need to be a integer multiple of the tile size? I got that impression looking over your commit.

Since every pixel in the latent space represents 8×8 pixels in the pixel
space, the dimensions of the output image must be a multiple of 8.
Vito


Would it be possible to clarify what is the minimum version of Agda needed to run the plfa examples?

A colleague of mine is still using Ubuntu 16.04, and the version of Agda available from its official repositories (2.4.2) seems to be too old to run the examples from this book. For example, when I try to load Naturals.lagda it shows an Invalid name: _ error.
Does anyone happen to know what is the minimum version of Agda needed to go through this book? If so, perhaps it would be helpful to add this information to the README / Getting Started page.

It's hard to keep track of the minimum version that works. Instead, we put up badges (on the Getting Started page) to tell you versions of the compiler and libraries that we know will work. You can usually install such a version without too much hassle by loading and compiling sources, although that may take a while. (If someone is motivated to work out additional compiler/library combinations that work with the book, please tell us what they are via pull requests to the Getting Started page.)

Thanks. I have to confess that I totally did not notice the badges, due to "banner blindness".


azure deploy failure to install OSCP

BUG REPORT
When launching on azure security setting are configured incorrectly. Specifically azure.conf file.
Sample after running deployment via ansible ansibledeployocp
azure.conf
{
"tenantId": script enters APID  ..
"subscriptionId": script enters tenantId
"aadClientId":  script enters str(activationkey),
"aadTenantID": script enters appID
"resourceGroup": myresourceGroup
"location": ****
}

Do you mind to attach the ansible variables file you've used to the issue? (please remove passwords, etc.)

`---
The parameters detailed description can be found in https://access.redhat.com/documentation/en-us/reference_architectures/2017/html-single/deploying_red_hat_openshift_container_platform_3_on_microsoft_azure/#provision_the_emphasis_role_strong_openshift_container_platform_emphasis_environment
id_rsa.pub content
sshkeydata:
id_rsa content in base64 without \n characters
cat ~/.ssh/id_rsa | base64 | tr -d '\n'
sshprivatedata:
User that will be created to login via ssh and as OCP cluster-admin
adminusername: "tri"
Password in plain text
adminpassword:
This should be "usernamepassword" or "activationkey"
If "usernamepassword", then the username and password should be specified
If "activationkey", then the activation key and organization id should be specified
rhsmusernamepasswordoractivationkey: "activationkey"
or rhsmusernamepasswordoractivationkey: "activationkey"
The RHN username where the instances will be registered
rhnusername:
or rhnusername: "activationkey" if activation key method has been chosen
The RHN password where the instances will be registered in plain text
rhnpassword:
or rhnpassword: "organizationid" if activation key method has been chosen
The subscription pool id the instances will use
subscriptionpoolid:
The Azure resource name that will be created
resourcegroupname:
Active Directory ID needed to be able to create, move and delete persistent volumes
aadclientid: "
The Active Directory Password to match the AAD Client ID
aadclientsecret: "
Subdomain for applications in the OpenShift cluster (required by the load balancer, but nip.io will be used). It is just the subdomain, not the full FQDN.
wildcardzone: "triapps"
Optional (default values are set in playbooks/roles/azure-deploy/default/main.yaml)
The ARM template that will be deployed
templatelink: "https://raw.githubusercontent.com/openshift/openshift-ansible-contrib/master/reference-architecture/azure-ansible/azuredeploy.json"
From 3 to 30 nodes
numberofnodes: 3
image: "rhel"
mastervmsize: "Standard_DS2_v2"
infranodesize: "Standard_DS2_v2"
nodevmsize: "Standard_DS2_v2"
Azure location:
location: "canadacentral"
OpenShift SDN:
openshiftsdn: "redhat/openshift-ovs-multitenant"
Deploy metrics
metrics: false
Deploy agregated logging
logging: false
Deploy agregated logging for ops
opslogging: false
`

var.txt

Looks like subscriptionID and tenantID are missing from parameters.
When commandToExecute runs, the init script on the vm is expecting arguments in a specific order. The missing parameters, and the missing arguments in commandToExecute mess up the order. Resulting in a failed deployment .. ?


Dts generation

Could you define your process of creating and merging the PR, please? It is a lot safer approach than my currently used "brute force" where I work on local clone of the repo and then use git push origin master.
Are you compliant with https://github.com/aurelia-ui-toolkits/aurelia-kendoui-plugin/wiki/Development-Protocol#submitting-a-pull-request?


Align the function and object method related grammar with the spec

Purpose

This PR aligns how the grammar of the implementation defines functions and object methods with how it is defined in the latest spec. This is done as a precursor to #20686, to ensure the implementation grammar and the spec doesn't keep deviating.

Fixes #20784
Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Closing this in favour of #20910


Where to add native dependencies?

Hi,
first of all this is super useful and easy to work with.
I just have a question: Where can I add my native dependencies (for android)?
If I add it to tools/assets/App_Resources/Android/app.gradle, it will be used for all plugins in this workspace, or not?
I'd like to add it to just one plugin.

@hrueger Hi - great question (forgive the bot for auto closing this - we need to turn that off 😆 ) - You will do that as usual in the package for the particular plugin. For example you can reference our own internal suite of plugins here:
https://github.com/NativeScript/plugins/tree/master/packages/fingerprint-auth/platforms/android
That package has a platforms folder as usual containing the native code needed for the package.

Yes, that works. Thank you!


DevAddr problem on Rx

In my test setup, I have couple of nodes sending payload to the server. There is no problem with joining, however one of the nodes's DevAddr seems to be read incorrectly:
INFO[2753] gateway: sending udp packet to gateway        addr=x.x.x.x54847 type=PushACK
INFO[2754] gateway: received udp packet from gateway     addr=y.y.y.y:56394 type=PushData
INFO[2754] gateway: rxpk packet received                 addr=y.y.y.y:56394 data=QEFBMxwAAAACzhgt2HnzjwnH0GAuqqhyCOC0g1QR2mCVyR5Lfo6AhQ== mac=0080000000009zzz
INFO[2754] backend/mqttpubsub: publishing packet         topic=gateway/0080000000009bbb/rx
INFO[2754] gateway: sending udp packet to gateway        addr=y.y.y.y:56394 type=PushACK
INFO[2754] gateway/mqttpubsub: rx packet received
ERRO[2754] processing rx packet error: get node-session for DevAddr 1c334141 error: redigo: nil returned  data_base64=QEFBMxwAAAACzhgt2HnzjwnH0GAuqqhyCOC0g1QR2mCVyR5Lfo6AhQ==
Under Session/ABP in the server I can see different DevAddr associated with that node (630e8d31) and the packet counter obviously doesn't increment

This problem occurs with nodes sending payload to multiple servers, I will further investigate and follow up if necessary, closing for now.

Hi @VirTERM
Can you elaborate a little bit ? I have the same issue (error message at least), but I don't understand what you mean by "sending payload to multiple servers". Are you talking about the configuration of the gateway or of the gateway-bridge ?


Close issue ticket automatically if "support/feature request" label found

Description
The issue is automatically closed if labeled as Feature request or Support request:

appropriate comment is added
the ticket is closed

The issue is re-open if Feature request or Support request label is removed:

appropriate message about the mistake is added
the ticket is re-open

How can this be tested?
Add, remove "feature request" and "support request" labels. Check if  comments are added and the issue is closed or re-open (consider forked repo).
Checklist
- [ ] Unit tests have been updated/added

[x] PR is labeled accordingly with a single label
[x] I have read and understood the contribution guidelines

Codecov Report

Merging #2283 (fc3774c) into main (ebbd893) will increase coverage by 0.31%.
Report is 46 commits behind head on main.
The diff coverage is 79.49%.

:exclamation: Current head fc3774c differs from pull request most recent head a8175b3. Consider uploading reports for the commit a8175b3 to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@            Coverage Diff             @@
##             main    #2283      +/-   ##
==========================================
+ Coverage   64.36%   64.67%   +0.31%
==========================================
  Files         242      248       +6
  Lines       15326    15605     +279
==========================================
+ Hits         9865    10093     +228
- Misses       4732     4773      +41
- Partials      729      739      +10

Files
Coverage Δ

cmd/support_archive/troubleshoot.go
91.30% <ø> (ø)

pkg/clients/dynatrace/activegate_auth_token.go
77.96% <100.00%> (-0.37%)
:arrow_down:

...kg/clients/dynatrace/activegate_connection_info.go
83.78% <100.00%> (-0.43%)
:arrow_down:

pkg/clients/dynatrace/client.go
90.00% <ø> (-0.55%)
:arrow_down:

pkg/clients/dynatrace/dynatrace_client.go
68.71% <100.00%> (ø)

pkg/clients/dynatrace/image.go
78.82% <100.00%> (ø)

pkg/clients/dynatrace/kubernetes_settings.go
70.00% <100.00%> (ø)

pkg/clients/dynatrace/oneagent_connection_info.go
86.00% <100.00%> (ø)

pkg/clients/dynatrace/send_event.go
77.77% <100.00%> (ø)

pkg/clients/dynatrace/token.go
70.45% <100.00%> (ø)

... and 48 more


ILVerify does not complain when a class does not implement method from an interface

I have used Cecil to create a class that implements an interface, but not its method.
The decompiled code for it is:
interface I
{
  void M();
}

class C : I { }

Code used to generate it:
using System;
using Mono.Cecil;

static class Program
{
    static void Main()
    {
        var assemblyName = "MyAssembly";
        var assembly = AssemblyDefinition.CreateAssembly(
            new AssemblyNameDefinition(assemblyName, new Version(1, 0)), assemblyName,
            ModuleKind.Dll);
        var module = assembly.MainModule;

        var i = new TypeDefinition(null, "I",
            TypeAttributes.Interface | TypeAttributes.Abstract);

        var method = new MethodDefinition("M",
            MethodAttributes.Public | MethodAttributes.Abstract | MethodAttributes.Virtual,
            module.TypeSystem.Void);

        i.Methods.Add(method);

        module.Types.Add(i);

        var type = new TypeDefinition(null, "C", TypeAttributes.Class,
            module.TypeSystem.Object);

        type.Interfaces.Add(new InterfaceImplementation(i));

        module.Types.Add(type);

        assembly.Write(assemblyName + ".dll");
    }
}

When I verify it using PEVerify, I get the expected error:
>peverify MyAssembly.dll

Microsoft (R) .NET Framework PE Verifier.  Version  4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

[MD]: Error: Class implements interface but not method (class:0x02000003; interface:0x02000002; method:0x06000001). [token:0x09000001]
1 Error(s) Verifying MyAssembly.dll

But when I use ILVerify instead, I get no errors:
>ILVerify.exe -r "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll" MyAssembly.dll
All Classes and Methods in C:\code\app\bin\Debug\netcoreapp2.1\MyAssembly.dll Verified.

It's possible this happens because ILVerify is not completed yet, but I thought reporting this would still be useful.

@jkotas is this https://github.com/dotnet/corert/tree/master/src/ILVerify#tests up to date?
I tried to run tests like:
msbuild /t:rebuildandtest /v:m

from corert\src\ILVerify but i get ILVerification.Tests has no tests to run
Same with Vs test explorer

I see the same problem. It seems to be caused by mismatched xunit version. We may need to upgrade to latest xunit to fix it (corefx was upgraded some time ago).

@jkotas thank's for tests fix.
Now  msbuild /t:rebuildandtest /v:m from F:\git\corert\src\ILVerification\tests works well, it doesn't work with Test Explorer, however in Vs i can debug with
dotnet.exe xunit.console.dll ILVerification.Tests.dll  -xml testResults.xml -notrait category=nontests -notrait category=nonwindowstests  -notrait category=OuterLoop -notrait category=failing


How to move a map under a centered marker

I'm submitting a ...  (check one with "x")
[ X ] question
[ ] any problem or bug report
[ ] feature request
How can I center a marker in the middle of the screen and move the map under it ?

But If I use it that way, I won't be able to customize the marker and even won't be able to write inside that marker (for example base64 icon, etc...)


Basic Docker image implementation

This change adds a Dockerfile, an example docker-compose.yml, and some documentation to the readme on how to run Sitrec with Docker. My intention here is to have a way to easily run Sitrec locally with a single command without needing to set up a local PHP environment or figure out the right directory structure / config to use.
By default, you can run docker compose up in the directory after cloning the repo, and you'll have a Sitrec instance running on http://localhost:6425/
The proxy / cache functionality works out of the box, but of course the shortener / rehost functionality isn't supported as it relies on having the Metabunk server available to hook into.
I also added a bit of code on the PHP side to allow configuring the cache path (so that I can expose Sitrec on the root of the dockerised server instead of on a path), and I also added a call to ob_start(); in proxy.php as I was seeing issues sending the location header after using echo during testing.
As a future improvement, I might look in to adding a VSCode devcontainer setup to make local development easier, though I think I might need to make some changes to the frontend build process for this.

To get this working on my Mac I did:
brew install docker
brew install docker-compose
mkdir -p ~/.docker/cli-plugins
ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
Then install the desktop app. (I'm not sure if all the command line stuff was needed)

If I recall correctly, the homebrew / CLI steps aren't necessary if you're installing the desktop app on Mac as it installs the CLI tools for you - I think the desktop app tends to be the recommended approach for Mac users.
Windows users would need to follow some special WSL2 steps, and I guess most Linux users will probably know how to get Docker set up already (and if not the Docker site has installation instructions).
Something I didn't call out in the Readme was rebuilding the docker container after making changes, I figured most people looking for instructions would just want to run the latest version they checked out. But to rebuild and restart the container after a code change, you can just run docker compose up -d --build (The  -d flag will run it in the background so you don't need to keep a terminal open).

Yeah, I just did the CLI stuff, as I figured I'd be building from the CLI. Then it didn't work and Google told me to install the app, and that magically fixed everything.


Simplify setting PATH, MANPATH, and INFOPATH

Feature
During the installation, at the end ask users if they'd like to update their PATH, MANPATH, and INFOPATH now that Linuxbrew is installed. If they accept, modify their .bash_profile or .profile, and also modify their .zshenvc. While they may not be using zsh, if they ever do decide to use zsh (e.g. maybe they're planning on running brew install zsh right after the installation of brew finishes), it would be nice for brew to not break and require manual intervention.
Motivation
Homebrew on macOS Just Works™ after you run the one-liner involving curl. IMO, #612 should require that Linuxbrew can be used the same way as Homebrew (just run a one-liner). That way eventually, people can all go to brew.sh and there can be a single sh -c "$(curl ... || wget ...)" that will work on Linux distros and macOS.
Relevancy
99% of Homebrew users install Homebrew because it makes things easy[1]. Thus, making it easier to set up PATH, MANPATH, and INFOPATH is a good thing and very relevant to Homebrew users.
Current Situation
The install guide has 3 blocks of code in it. While the second block says "Follow the Next steps  instructions ..." I'd argue that many people (especially those of us willing to sh -c "$(curl ...) will skip over those words and just try to copy each code block and paste it into a terminal emulator.
After running the sh -c "$(curl ... a user will see commands they can run to alter PATH but also MANPATH and INFOPATH. But the second code block on the website doesn't mention changing MANPATH or INFOPATH. In addition, what the user sees isn't necessarily correct (e.g. .profile isn't loaded by zsh).
Alternatives
Maybe change the second code block in the directions for installation. Have it say something like brew setenv, which could do all of the things I'm suggesting to be done at install time.
But seriously, brew should be installable the same way on Linux distros as it is on macOS, and it should be a simple one-liner.
Footnotes
[1]: 86% of statistics are made up. But hey, the main reason people install Homebrew is because they want to use brew install and not have to worry about how to install a particular package. That sounds like they want simplicity to me.

I like the idea of a brew setenv command.
Executed as brew setenv it could modify the users config files. That won't however fix the PATH in the user's current active shell. It could be used like this to modify the PATH of their current shell.
eval "$(brew setenv)"

If we changed the current installation instructions from…
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

to…
eval "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

we could fix the user's current PATH when they install Linuxbrew.
The brew setenv script should be idempotent. If it's run twice, the second invocation has no effect.
Should the install script ask interactively if the user wishes to run brew setenv?
The name of the command should I think reflect that it's effect is permanent and writes files to disk. Perhaps brew configure-shell or brew write-environment?

As an implementation detail, I think it'd be helpful to have a shell script at $HOMBREW_PREFIX/etc/environment that modifies PATH. Then ~/.profile and friends of different shells can simply source that one file.

I agree with all of these ideas. I'm assuming $HOMBREW_PREFIX/etc/environment would also modify MANPATH and INFOPATH, right?
Having a command (btw, good ideas for the command name!) that can be run post-install as well as during the install (interactively) sounds great.

The brew setenv script should be idempotent. If it's run twice, the second invocation has no effect.

This one may be a lil tough. Two naive solutions come to mind: check if $HOMBREW_PREFIX is found on the same line as PATH, MANPATH, and INFOPATH in .profile and friends, or spawn new shells and check their paths (e.g. check sh -c "echo $PATH; echo $MANPATH; echo $INFOPATH" but also do the same for other shells installed)
The second solution sounds like a bad idea. But with the first option, one needs to be careful. For example, $HOMEBREW_PREFIX coming after a comment sign shouldn't count. And the presence of PATH= or export PATH= without being followed by $PATH should also be treated as a problem. Same for MANPATH and INFOPATH.
But then what if I did this:
# Pretend these are some (terrible) dotfiles I use on Linux distros and macOS
LINUX_BINS="/bin:$HOMBREW_PREFIX"
MACOS_BINS="/macosbin:$HOMBREW_PREFIX"
if [ "$(uname)" == "Darwin" ]; then
  export PATH=$MACOS_BINS
else
  export PATH=$LINUX_BINS
fi
# Now PATH is set correctly, but it doesn't appear to be, because all we see is PATH being set to something that doesn't contain $HOMEBREW_PREFIX

Disregard my comment about idempotency, I missed your second comment.

I'm assuming $HOMBREW_PREFIX/etc/environment would also modify MANPATH and INFOPATH, right?

Yes.

Sorry, I'm a little bit confused now. I thought the plan was to simply write to profile
source $HOMBREW_PREFIX/etc/environment

Instead of modifying environment variables directly in each file? Of course, the above line assumes that $HOMEBREW_PREFIX is substituted with it's actual value.

Yes, sorry. I got confused. I did in fact mean…
source ~/.linuxbrew/etc/environment # Added by brew configure-shell

then running brew configure-shell a second time can exit early if it detects this exact line somewhere in the file.

Having a single file that would set everything related to Homebrew sounds like a good idea.
All the HOMEBREW_VERBOSE, HOMEBREW_DEVELOPER, etc settings could be set in that file.
I'm just not sure about the name... I'd suggest something more "actionable", like brew configure or brew setup. And this command would interactively ask the user if they would like to set "standard" settings (and list a few as an example), or do the "detailed" setup and choose them interactively (and give corresponding explanations along the way).

@jamescostian have you started working on this already? 🙄

Ah, by assigning it to myself, I just meant that I'll be discussing the issue (and of course any other maintainers that'd like to comment). You're welcome to take a go at the implementation if you like, James. I'd prefer to keep it simple for now, the "standard" configuration that Maxim describes above. I like brew configure-shell for the name.

Sorry @sjackman I misunderstood. I started implementing it in #829 and I'd appreciate it if you or someone else could give me feedback on that implementation. I have a lot of questions, and it's my first time writing Ruby so I'm sure there are parts of the code that could be improved.

I just realized I totally misread the first comment by @maxim-belkin and thought it was only asking for the detailed interface and didn't really understand the standard one - whoops! I'll fix that tomorrow.

The problem with names like configure-shell or configure-environment is that that "script" will not be configuring shell. It will be configuring the behavior of brew (command) in whatever-shell-is-being-used-by-the-user. Configuring shell is like messing around with .inputrc, setting shell-specific env. vars (PAGER, IFS), enabling some features with set -o ...
Not to mention brew irb and brew sh, both of which are "shells". With a simpler name (like setup or configure) it's clear that you're trying to do something with the way Homebrew/Linuxbrew is operating - you're configuring them, not "some shell".

I'm now realizing that this is getting a bit larger than it should be. The original reason behind this issue was to maintain compatibility with Homebrew for macOS.
Homebrew for macOS does not have an etc/environment file that is sourced and that allows users to set environment variables like HOMEBREW_DEVELOPER, so adding that functionality here would only increase the divide between macOS and Linux, and make #612 harder to merge
Max mentioned having brew read this config, and now I'm realizing that may be a better way to solve problems like setting HOMEBREW_DEVELOPER by default for some users. One could add a YAML or JSON file to macOS and Linux brew that file could contain user-editable "default" values for all of those configuration settings (e.g. a user can make it so that by "default" HOMEBREW_DEVELOPER is turned on for their machine, and all they would have to do is edit a config file that brew would load when it starts up).
That way it's easier to return to making this command do what it was intended to do: make Linuxbrew and macOS Homebrew work the same to users. In other words, have this command be only about writing PATH, MANPATH, and INFOPATH to an environment file that other files source.
Thoughts?

I’d say it’s an issue for anyone who has installed somewhere other than /usr/local. I haven’t done a nonstandard install on macOS but I imagine that this script would be used in that situation too.

Max mentioned having brew read this config, and now I'm realizing that may be a better way to solve problems like setting HOMEBREW_DEVELOPER by default for some users. One could add a YAML or JSON file to macOS and Linux brew that file could contain user-editable "default" values for all of those configuration settings (e.g. a user can make it so that by "default" HOMEBREW_DEVELOPER is turned on for their machine, and all they would have to do is edit a config file that brew would load when it starts up).

Indeed, such a file might be a better solution for HOMEBREW_  variables that control the behavior of brew. So, your PR #829 should focus on env-related changes that are outside the scope of Homebrew/Linuxbrew - PATH, MANPATH, etc. In the end, Homebrew/Linuxbrew will simply add a line to .profile (and its analogues) sourcing this file.
Looking a bit further: formulae that suggest making changes to env. could modify this file.

@jonchang I haven't done a nonstandard install on macOS either, but the docs strongly suggest against it:

we recommend installing to /usr/local. Pick another prefix at your peril!

That makes me think that this change can safely be made in Linuxbrew, and later be merged into macOS Homebrew in #612 at some point (i.e., this isn't urgent nor is it a big enough change that it would cause a huge delay in the merge).
Would you agree?

Yes, this script would be useful in non-/usr/local installs of Homebrew. At work I don't have sudo access, and I have Homebrew installed in ~/.homebrew.
We can merge the functionality into Linuxbrew first though.


Faster reduction and conversion

We have talked about improving the performance of reduction in the kernel from time to time, so it's probably a good idea to start writing down issues and ideas we have. I even heard we may have someone who wants to work on this this year!
For starters, let us define the problem more precisely: conversion, or definitional equality, checking is a core operation of the kernel, and it relies on reduction of terms in the form of weak head normal form reduction. When the involved terms may also contain metavariables, we instead talk about unification, which has its own performance issues such that optimizing it may be better left to a separate issue. Currently, the Lean elaborator written in Lean will always use a unification algorithm, while the kernel written in C++ uses a separate conversion checking implementation that is more or less the same algorithm without support for metavariables.
In current Lean code, conversion checking is rarely a bottleneck: at the time of writing, about 2.8% of building mathlib4 is spent in any part of the kernel; how much time is spent on unifying mvar-free terms in the elaborator is however unknown. What the current performance of conversion mostly prevents us from is to explore new applications where we have big conversion problems that never went through unification, such as in proof by reflection. Indeed, @amahboubi pointed me to the paper "Formalized Class Group Computations and Integral Points on Mordell Elliptic Curves" by @Vierkantor et al. where they state about the design of a tactic

In addition to computing a normal form, the tactic also assembles a proof that the input expression is equal to its normal form. Constructing a proof term tends to be faster in Lean 3 than proof by reflection, since the interpreter for metaprograms is usually more efficient than kernel reduction

The use of proof by reflection is also well-established in the Coq world (Grégoire & Leroy: A Compiled Implementation of Strong Reduction):

A typical example is the use of computations on binary decision diagrams to prove results on boolean formulas [23]. Another example is Appel and Haken’s famous proof of the 4-color theorem [2], which involves checking colorability of a finite, but large, number of well-chosen planar graphs: rather than developing a proof of 4-colorability for every such graph, a proved decision procedure is invoked on all of them.

Prior Work
Probably the system with the most existing work on speeding up conversion is Coq, with as many as three different reduction engines in the kernel triggered by annotations in the core term:

The default is a symbolic interpreter roughly similar to Lean's, though one performance killer in the form of locally-nameless term substitution is avoided by use of explicit substitution and de-Bruijn indices. @ppedrot mentioned to me that he implemented a nifty data structure to represent the involved stack, which I assume is https://github.com/coq/coq/pull/6506.
vm_compute uses an "optimized call-by-value evaluation bytecode-based virtual machine" as in (untyped) normalization by evaluation.
native_compute improves upon the former by compiling to native code. The paper emphasizes that is done using the vanilla OCaml compiler, not a custom abstract machine as before, without introducing additional overhead by (ab)using OCaml's existing runtime tagging. As our object layout is very similar and we have full control over the runtime, this should be possible for us as well.

Fast reduction tactics: vm_compute and native_compute describes how one should decide between the latter two options given their different startup vs. runtime performance.
The unifier can switch to kernel reduction when encountering closed terms (though this is not always faster).
@AndrasKovacs' normalization-bench tests native_compute-like reduction across various runtimes. smalltt documents and implements many ideas on fast conversion (and elaboration!) along with extensive cross-system benchmarks:

Importantly, we can make do with a single evaluator for all purposes, with fairly good performance. In contrast, Agda, Coq and Lean all have multiple evaluators, and in all cases only the slowest evaluators can be used without restrictions during elaboration. As we'll see in benchmarks, smalltt is robustly faster than all "slow" evaluators, and can be faster or slower than the Coq bytecode VM depending on workloads.

Finally, we do have the special functions reduceBool and reduceNat in Lean 4 that use interpreted and/or native code depending on precompilation, but these are limited to the respective types and to closed terms.

As for ideas, there is a picture that has burned itself into my mind regarding interpretation vs. native computation overhead:

This is from a figure from "Copy-and-patch compilation: a fast compilation algorithm for high-level languages and bytecode" by Xu and Kjolstad, which I learned about on Mastodon via @julesjacobs. It is not clear how practical the described approach is to implement given that it doesn't seem to have been replicated so far outside of one citing paper, but I don't see why it should not be applicable to this topic as well with hopefully similar results.


Add Selection Background Color as a setting to Profiles and ColorSchemes

Summary of the Pull Request
This introduces a setting to both Profiles and ColorSchemes called selectionBackground that allows you to change the selection background color to what's specified. If selectionBackground isn't set in either the profile or color scheme, it'll default to what it was before - white.

PR Checklist

[x] Closes #3326
[x] CLA signed. If not, go over here and sign the CLA
[x] Tests added/passed
[x] Requires documentation to be updated

Validation Steps Performed

Added selectionBackground to existing profile and colorscheme tests.
Verified that the color does change to what I expect it to be when I add "selectionBackground" to either/both a profile and a color scheme.

Is there already a SelectionForeground colour?

@mdtauk Nope! There is not currently a setting for SelectionForeground.

@zadjii-msft  Thanks for the suggestions! Putting the setting in IControlSettings and letting TermControl update the color in DxEngine really cut down on the amount of files I needed to touch.

Thanks for the quick turnaround!


Add /data/pgsql/* to .gitignore

The /data/pgsql/* directory is not in the .gitignore. which causes git to see it as a change and wants to push/commit the change.

This is alredy there: https://github.com/cytopia/devilbox/blob/master/.gitignore#L21 or am I missing something?

No, that's written with a Q /data/pqsql/* !== /data/pgsql/*
So either the Q is a typo and should be a G, or /data/pgsql/* needs to be added :)

Nice catch. That went under the radar for a long time.

Additionally I'd suggest to try out the upcoming branch, which will move all data (except www) to named volumes instead of directory mounts: https://github.com/cytopia/devilbox/pull/383


Set exec permission to cli

It seems exec permission of CLI command were lost when filename renamed.
I set exec permission to CLI command.

Thanks for noticing and sending a patch!


Added setCurrency method

Hi, thanks for this PR! I've been super-busy lately so open source stuff has been on a back-burner. Sorry for the delay. Good work! 🎉


Remove extra space in json tags

@stefanprodan same change, I forced push to re-run the flanky test.