@EqualsAndHashCode should allow skipping the hashCode method

I am working on a project where we are required to have a coverage of at least 80%.
One problem we have is that we are using @EqualsAndHashCode because we need to have the equals method, but we don't use hashCode.
Because of this multiple times we don't reach the limit for the coverage.
In the Javadoc for the java.lang.Object#equals method we have this description:
"Note that it is generally necessary to override the {@code hashCode} method whenever this method is overridden"
This means hashCode is not really always necessary. On the other hand if we are using hashCode then we should have equals.

This means hashCode is not really always necessary.

Not really... when you override equals, but not hashCode,

you break the contract: Equal objects must have the same hash code.
one year later, someone uses your object as a key in a HashMap and nothing works

That's no good idea. The proper solution for your coverage problem is to configure the coverage tool to ignore Lombok-generated methods. Configure Lombok to add an annotation and use it.

Actually, ignoring the method is a cop out too, I think. That way you can
never be sure you have covered everything that needs covering.
Best way: Use http://jqno.nl/equalsverifier/ on it. And ToStringVerifier on
the tostring method. I've written a (really) small library for data / value
annotated objects that basically calls those things in sequence, dealing
with odd cases like jacoco fields and the like. Unit test for each
individual class is really really small - one line of actual code for
standard value objects - and you get good coverage for it in return.
On Fri, Jun 29, 2018 at 5:38 PM, Maaartinus<EMAIL_ADDRESS>wrote:

This means hashCode is not really always necessary.
Not really... when you override equals, but not hashCode,

you break the contract: Equal objects must have the same hash code.
one year later, someone uses your object as a key in a HashMap and
nothing works

That's no good idea. The proper solution for your coverage problem is to
configure the coverage tool to ignore Lombok-generated methods. Configure
Lombok to add an annotation
https://projectlombok.org/api/lombok/ConfigurationKeys.html#ADD_LOMBOK_GENERATED_ANNOTATIONS
and use it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1747#issuecomment-401391774,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKCRfJFOo-XjYFzhXOyozwmsp-zVYPBks5uBknYgaJpZM4U9KY8
.

--
"Don't only practice your art, but force your way into it's secrets, for it
and knowledge can raise men to the divine."
-- Ludwig von Beethoven

@Maaartinus, on the @EqualsAndHashCode annotation I could not find a onMethod attribute.

I have added the configuration "lombok.addLombokGeneratedAnnotation = true" to lombok.config, but adding the annotation<EMAIL_ADDRESS>did not help with Sonar. Also tried to add the //NOSONAR in the same line of the @EqualsAndHashCode annotation and it did not help.

Adding "lombok.addLombokGeneratedAnnotation = false" to "lombok.config" file, fixed the issue, but also pretty much disabled the check of which attributes where covered in the tests, so this workaround is not very good.
I think that in this case ideally the annotation @EqualsAndHashCode should have a onMethod attribute where I could specify that only those two methods would be annotated.

Don't try to fit a square peg in a round hole. Either don't cover generated
methods, or do. But be consistent about it.
And seriously - testing those methods is not hard. If you do and Lombok
ever breaks them you will immediately have test failures to warn you about
it. It does have benefits. Especially since equalsverifier teaches you a
lot about what this thing called 'equals' actually means..
Op vr 29 jun. 2018 19:56 schreef Constantino Cronemberger <
<EMAIL_ADDRESS>
Reopened #1747 https://github.com/rzwitserloot/lombok/issues/1747.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1747#event-1709200435, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKCRQEltfBA9NQ1ZGHqownjARCPV3wsks5uBmpQgaJpZM4U9KY8
.

In this case you should either support "onMethod" on all annotations instead of having it only on some of them.

For the record, I am not a member of the lombok team at all ;-)
On Mon, Jul 2, 2018 at 6:06 PM, Constantino Cronemberger <
<EMAIL_ADDRESS>wrote:

Don't try to fit a square peg in a round hole you too!
In this case you should either support "onMethod" on all annotations
instead of having it only on some of them.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1747#issuecomment-401854413,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKCRQcVpeY8zRtXP-uoBLPk_YAg-z5Uks5uCkT1gaJpZM4U9KY8
.

--
"Don't only practice your art, but force your way into it's secrets, for it
and knowledge can raise men to the divine."
-- Ludwig von Beethoven

I agree with @randakar and @Maaartinus that allowing this would be a bad idea. Allowing lombok users breaking the equals-hashcode contract (let it be on purpose or by accident) will contradict almost everything lombok aims for. If you need a special-purpose solution, then implement it.
If you don't want to write lengthy equals implementations, use EqualsBuilder from Apache Commons.

From the Javadoc: https://docs.oracle.com/javase/10/docs/api/java/lang/Object.html#hashCode()

It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

For JPA entities I would like to let equals be generated by lombok but hashCode just be "return 31". This way, I can guarantee that hashes never change when entities are persisted.
Details here (Chapter: Using a Generated Primary Key):
https://thoughts-on-java.org/ultimate-guide-to-implementing-equals-and-hashcode-with-hibernate

hashCode just be "return 31"

'cause 42 is too common, right? ;) But seriously, this would break a contract, too, namely that of all Hash* classes, as they're supposed to be O(1) and you'd make them O(n). IOW, you'd get a serious slowdown pretty everywhere.
Some people claim that equality of entities should be content based, i.e., include everything but the id. Other claim that nothing but the id (and the class) should be used. I followed the latter and added assert id != 0 to both equals and hashCode (which were trivial to write manually). This way, my IDs never change when it matters (as I test with assertion on).
I obviously can't use transient entities as hash keys, but that's an acceptable price.

If only 42 was a prime...
I agree that you decrease the performance of Hash* classes. That's why I would make this option opt-in. Currently I am not sure if it is save to use Lombok-generated equals and hashCode with JPA/Hibernate.
And I think you also cannot put transient entities into a *HashSet, which seem quite a restriction.
When you write your equals and hashCode yourself, there is obviously no issue to discuss here.

If only 42 was a prime...

It'd be enough when it wasn't even. As all used hash tables (I've ever seen) in Java use power of two sizes, all you need is co-primality to two, i.e., an odd number. Primality itself is irrelevant, 33 about as good as 31 and a bigger number would be somewhat better.

Currently I am not sure if it is save to use Lombok-generated equals and hashCode with JPA/Hibernate.

Nothing is save with mutable keys. Anyway, you have to choose whether you want to use the ID or the "business keys" in your equals (IMHO using both would be crazy).

And I think you also cannot put transient entities into a *HashSet, which seem quite a restriction.

When there are multiple transient entities, then I use a mapping like from itemNo to item, so there's no problem. There's pretty always a simple workaround. The persistent entities are more common.
Note that with a constant hashCode, you could use a HashSet only as efficiently as List, and that'd be a problem with hundreds or thousands of entities.

Did you test having a hand-written hashcode, annotated with @Tolerate, and @EqualsAndHashcode on the type?

@rspilker Does it work? Should it? Given https://github.com/rzwitserloot/lombok/pull/52#issuecomment-72106077, I'd say no.

While I agree with all of you on both the usefulness and the necessity of generating both equals and hashCode at the same time, and ensuring uniformity across all test cases, I have to agree with @ccronemberger too.
The lombok frameworks main purpose is to add syntax in a configurable way. This should be consistent in itself too, and features should be as general as possible (even if we don't see the usefulness, or would decide against using it). To be adaptable to different project requirements is the reason lombok has as many users as it does.

The purpose of Lombok is to kill boilerplate. Being adaptable is a side
effect ;)
On Wed, Dec 11, 2019, 06:47 TreffnonX<EMAIL_ADDRESS>wrote:

While I agree with all of you on both the usefulness and the necessity of
generating both equals and hashCode at the same time, and ensuring
uniformity across all test cases, I have to agree with @ccronemberger
https://github.com/ccronemberger too.
The lombok frameworks main purpose is to add syntax in a configurable way.
This should be consistent in itself too, and features should be as general
as possible (even if we don't see the usefulness, or would decide against
using it). To be adaptable to different project requirements is the reason
lombok has as many users as it does.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1747?email_source=notifications&email_token=AABIERJHUOJQHY47GIDQHJ3QYB5IVA5CNFSM4FHUUY6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGR6UBY#issuecomment-564390407,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABIERPPU6EC5ISW5EBYIZLQYB5IVANCNFSM4FHUUY6A
.

Lombok hash implementation runs quickly into hashmap collisions when working with key-value in memory caches like Ignite, Redis, Memcached. The solution is to use apache HashCodeBuilder. So you still want lombok to cover the equals, but let developer customize hash implementation with HashCodeBuilder.
So maybe you can find a middle ground like Extend @EqualsAndHashCode capabilities to allow using HashCodeBuilder (or other builders).

Or change lombok to use directly EqualsAndHashCode behind the scenes, anyway it's apache license.

@vicon-byte why exactly should the generated hashCode method produce collisions more often than one generated by a third party library?


[go] [generic] add pull request support without signing

Signed-off-by: Asra Ali<EMAIL_ADDRESS>
Should we display some github log warning?
This sort of makes the check IsPresubmitTest not necessary. Is that OK? I'm not sure if we want to continue gating on that, or maybe we want to add an explicit flag to users like "snapshot" that is required to allow pull_requests to generate the predicate (that way users don't accidentally generate unsigned provenance)

Updates #131

Updates #358

@asraa This is pretty old. Should we close it?

@asraa This is pretty old. Should we close it?

I think so. If we achieve this the better route to go is to refactor them to use the signing actions


Installation Issue

On a MacBook Pro M2 Max
Followed the install directions
I get this when running the pip command
Could not find a version that satisfies the requirement mlx (from diffusionkit) (from versions: none)

Hello! What is your Python version?

3.11 as specified in the setup directions

Mike Hjorleifsson
@.***
This e-mail and any files transmitted with it are confidential and are intended solely for the use of the
individual entity to whom they are addressed. This communication may contain material protected by the
attorney-client privilege. If you are not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use,
dissemination, forwarding, printing or copying this e-mail or any file or files transmitted with it is strictly prohibited.

On Jun 14, 2024, at 10:14 AM, Atila Orhon @.***> wrote:
Hello! What is your Python version?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Same issue for me on M1 Pro with Python 3.12.4

works fine on m3max Sonoma 14.5 (23F79)


Improve alert indexing and search

From @brancz

currently there are various maps to improve access to certain alerts, but very scattered across the code base and seemingly unrelated

Further, I remember discussion of using the TSDB inverted index to do this.

#GSOC-2018
I would like to take this issue up. Could someone elaborate a bit more on the problem at hand.

The problem is that Alertmanager currently holds the alerts ingested simply in a map, and when the frontend or anything using the API wants to filter something, then Alertmanager filters them naively in the HTTP handlers, whereas we should be able to index the alerts more precisely in order to not have to iterate over the entire set of alerts currently in memory.


Change section to '2nd line'

Previous section was 'data.gov.uk', which is applicable as these are data.gov.uk
requests, but I think the section is better suited to '2nd line'. When visiting
https://docs.publishing.service.gov.uk/manual.html, I'd expect to see this page
under 2nd line.
I hope we can add more 'Common 2nd line' type pages for things like alerts, tech
support, content changes etc.

I'm not keen on moving this out of the DGU section.  If a request comes in about data.gov.uk, I'd probably go to the data.gov.uk section first, rather than the 2nd line section (which appears to be stuff about being on 2nd line, e.g. holiday cover and on-call).


Fix Gui Builder reload issue (#945)

Solve bug #945
import pandas as pd
from datetime import datetime
import src.taipy.gui.builder as tgb
from src.taipy.gui import Gui

start_date = datetime(2023, 1, 1)
end_date = datetime(2023, 2, 1)
date_range = pd.date_range(start=start_date, end=end_date)

df = pd.DataFrame({'Date': date_range})
df["Index"] = df.index

text = 10

def on_edit(state, var_name, action, payload):
    print(var_name, action, payload)

with tgb.Page() as page:
    tgb.text("{text}")
    tgb.table(data="{df}", editable=True, filter=True, on_edit=on_edit)

# page = """
# <|{df}|table|on_edit=on_edit|editable=True|filter=True|>
# """

Gui(page=page).run()

🤔no bad outcome to expect, in terms of perfs? I guess not too much considering the objects at play.

I don't think it will affect perfs at all. It will rarely be executed anyway.


c# websocket Sdk - utf8json library has some bugs and issues

Hi we have just found out that the c# websocket sdk is referencing the https://github.com/neuecc/Utf8Json/issues library, upon checking the latest version of this library contains a lot of issues and bugs, did you guys make a forked version of this or do you just use the latest version from the original repo?

Hi @firephantomassasin,
We are using the latest public version and have 100% test coverage on our side in terms of handing the DTO structures, including allocation tests.
Please provide at least one example when it behaving incorrectly in this specific case and we could process that further.

Hi, you could check this one: https://github.com/neuecc/Utf8Json/issues/154

It needs to be a real problem with the SDK library, both of the issues are irrelevant here.
Please create a separate case when for each issue with the SDK library.


Adding and deleting results: Values and rationales APPEAR to not be showing up in change log

NOT A BUG -- this is a potential usability issue. (See first comment.)
Looks like the change log is not displaying values or rationales.

Add result: The actual value is not included in the change log's "New Entry" column.
Delete result with rationale: Previous value not included. Rationale not shown.
Edit result's actual value: Previous and new values not shown.
Add evidence to a result: Previous and new values not shown. Rationale not shown.
Delete evidence from a result: Previous and new values not shown. Rationale not shown.

Actually, this turned out to be a usability issue, not a bug: I was thrown by the empty cells in the Previous/New and Rationale rows and thought content was missing from the change log. The content is there, but you have to expand the rows to see them.
I wonder if we ought to have all the rows expanded by default. @hannalcamp What do you think?
Not a release blocker, in any case.

We could add a prompt of some kind, like “expand to see entries” or just an ellipses (…)

@axoplasm What about a "View details" link that communicates that there's stuff to see AND can be clicked to expand the row, just as if you'd clicked the caret?

I'm sure it's possible, I'm not sure it's easy

@axoplasm If it's hard, then I think ellipses are ok for now, and we can improve in the future.
(With "Expand to see entries", I think people might try to click on it, same as "View details".)


PCB Assembly: 1.1.9 Table 10 standoff inconsistencies

There are some inconsistencies in PCB Assembly document 1.1.9 regarding standoffs used.
RoboClaw standoff
In table 10, it lists part T11 as 4-40 x 1/2" threaded standoff. 20 of them are used, 4 per RoboClaw x 5 RoboClaws.
In the CSV under /parts_list/, T11 is listed as 2-56 x 1/2" threaded standoff quantity 20. The documents here does have 4-40 x 1/2" but it is called T5 and only quantity of 1 is specified.
Suggestion: Change document reference from T11 to T5. Change parts_list quantity for T5 from 1 to 20. See next item for more on T11.
Voltage regulator standoffs
In table 10, it lists part T8, 2-56 x 1/2" for voltage regulators.
Under /parts_list/ T8 is 2-56 x 3/8". T11 is the 2-56 x 1/2" standoff, see above issue.
Due to above issue, we have plenty of 2-56 x 1/2" to spare.
3/8" is slightly too short. 1/2" is slightly too long but it appears to make sufficient electrical connector to function.
Suggestion: Change document reference from T8 to T11.
Alternate suggestion: add new part for standoff 2-56 x 7/16" long.

Pull request #293 fixes the RoboClaw standoff discrepancy. Not touching the voltage regulator issue into correct size can be confirmed.


Is there a way to edit or write in a MS word document using winappdriver?

            Word.findElementByName("Page 1 content").findElement(By.tagName("Edit")).sendKeys("editing");

I am trying to write some text to a blank word document using winapp driver and I see following error

{
  "id": "42.2099282.4.2",
  "value": [
    "editing"
  ]
}
HTTP/1.1 500 Internal Error
Content-Length: 133
Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"An unknown error occurred in the remote end while processing the command."}}

Not going with edit at this time

Not going with edit at this time

So is that mean that , we cannot write in MS Word document using Winapp driver???


Add DISABLED as an allowed alarms state

This allows maas verification to pass even when alarms has been disabled,
which they have been recently.
Related: rcbops/u-suk-dev#1081
Connects: rcbops/u-suk-dev#1139

Running additional test job with full Maas on CIT Jenkins: https://rpc.jenkins.cit.rackspace.net/job/RPC_AIO/221/console

Build 221 linked above succeeded, ready for review.


feat(command): add command cr that creates a k8s job

This custom resource helps in running shell / terminal commands
from within a Kubernetes job. The output of these commands
are grabbed and set against this Command's status field.
Signed-off-by: AmitKumarDas<EMAIL_ADDRESS>

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


cmdport

https://github.com/aboe76/puppet-chrony/issues/28

I can see an issue (1) and have a recommendation (2) with these changes.

cmdport defaults to 323 but you have defaulted it to 257
as it defaults to 323 if not defined in chronyd.conf, make it undef in params.pp and use an if statement in the templates so it only gets written if defined

Merged it

Thanks for the hard work


[NOMERGE KBFS-3230] widget chat container

I don't want this merged until we have some chat content for the box, which will come in a separate PR.
Ready for feedback though.

PR feedback implemented, ready for another look.


Support asynchronous followRedirect filter (callback or Promise)

PR Checklist:

[x] I have run npm test locally and all tests are passing.
[x] I have added/updated tests for any new behavior.

PR Description
This can be needed for hostname to ip resolution, which can be used to disallow redirection to internal network addresses for protection against SSRF attacks. This PR also allows the followRedirect result to be a string, which overrides the redirect location. This can be used translate the target hostname to a ip (locking it).
// using a callback
followRedirect: function(response, callback) {
    callback(null, result);
}

// using a promise
followRedirect: function(response) {
    return new Promise(...);
}

After writing this I ended up just using paranoid-request for my use case – so take this PR with a grain of salt. That said, implementing this sort of behavior with normal request would be non-trivial / not possible without this PR or something similar (unless I'm missing something obvious).

Can you guys please merge this PR or add this functionality to the request module ?


Drop aee-operator dependency

should we archive openstack-ansibleee-operator?

custom-bundle.Dockerfile was dropped: https://github.com/openstack-k8s-operators/openstack-operator/pull/1012
and here is the renovate change: https://github.com/openstack-k8s-operators/openstack-k8s-operators-ci/pull/110

custom-bundle.Dockerfile was dropped: #1012 and here is the renovate change: openstack-k8s-operators/openstack-k8s-operators-ci#110

ok, stale file in my checkout :+1:
what about dependencies.yaml?

/test openstack-operator-build-deploy-kuttl


update node stable to 9.x

update node stable to 9.x in installation script.
This would fix #1208.

I suggest to set it to a LTS version, in that case 8.x


MINIFICPP-779: Change debian and apt repos to use libpython3-dev, wit…

…h knowledge that they'll be 3.5+. If a user does an update they will either need to install the older version or already have it installed to run the convenience binaries based on how libpython is linked
Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[ ] Has your PR been rebased against the latest commit within the target branch (typically master)?

[ ] Is your initial contribution a single, squashed commit?

For code changes:

[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file?
[ ] If applicable, have you updated the NOTICE file?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

reviewing


please add a license

Hi Simon, thanks for this interesting quiz tool.
Could you please add a license file/statement to your project. Thanks!

Thanks, I have added the MIT license

Great. Thank you!


Make camper addresses default to payer address

It would be nice so that they might not have to do so much data entry

Hmm, would it be acceptable to just do "Same as payee address" checkbox for address, and compute the diff on the backend?


Fix Riak Driver Structure

Applying defined suggestions in https://github.com/JNOSQL/diana-driver/pull/3
Thanks for a support @otaviojava.

thanks


Screen navigation is mixed up / confused.

Version
Tell us which versions you are using:

react-native-router-flux v3.38.0
react-native v0.38.0

Expected behaviour
Opening the good screen.
Actual behaviour
After using the application for a while the Navigation is broken. Maybe this is a specific issue for my app, and I can't even come up with a way the reproduce it.
The actual behaviour is: I am using the app for several minutes, preforming a smoke test and than somehow the navigation stops working properly. Beyond this moment the navigation never works how it should: sometimes it does not open the screen on tap event, sometimes it opens the previously clicked screen or a complete different one.
I actually researched this issue and the proper function is being called however it does not work.
Any ideas?

v3 is not supported, sorry.


⚠ Move Workspace.Status.{Cluster, URL} to Spec

Summary
In order to preserve the URL field, given that Status may be wiped under a number of conditions and most times URL cannot be easily or at all reconstructured, this changeset moves the field under Spec.
In addition, now the admission code also checks that any modification to the URL is performed by a system user.
Signed-off-by: Vince Prignano<EMAIL_ADDRESS>Related issue(s)
Fixes #

/assign @sttts

/lgtm cancel

Flake #2501


Directory content browse UI implementation

This is a first experiment version for new directory content browse UI. It used reactJS as frontend framework to do the UI rendering. The whole style is still following the old style of the directory content listing.
With this, we totally split the directory content fetching and the artifact fetching from UI as following:
The directory content  access: /browse/$packageType/$repoType/$repoName/$path
The artifact access: /api/content/$packageType/$repoType/$repoName/$path
Note that now there is no redirect yet for /api/content of the directory access, so it is still available through entry point for directory listing. Next step the redirect will be enabled for directory part of this entry point, which means all directory access through /api/content will be redirect to /browse

I suspect this might have a few lock files committed to it that you didn't intend.

I suspect this might have a few lock files committed to it that you didn't intend.

These two lock files are intended to be added to source control:
package-lock.json: https://github.com/npm/npm/blob/v5.0.0/doc/files/package-lock.json.md
yarn.lock: https://yarnpkg.com/lang/en/docs/yarn-lock/


Full analog support

Placeholder for completing the analog stick/trigger support.

[ ] Support multiples of the ADC chip for additional channels
[ ] Support mixing onboard ADC with external ADC for inputs
[ ] Support LS/RS as true analog stick
[ ] Support LT/RT as true analog triggers
[ ] Implement calibration and web interface calibrating mapped analog inputs
[ ] (Optional) Add automatic calibration option

We want to look into something before doing this - It is possible that dual analog is possible through a broken out embedded RP2040.
We would like to add an action item to this to expand the current analog offering to take advantage of broken out RP2040 chips to see if things can be handled as is.

We have a working PoC for dual analog support now via a broken out RP2040 chip that has access to all of the ADC pins.

Hi. I've just accidentally stumbled upon this project and wanted to chime in.
It is possible to use any RP2040 GPIO pin as ΣΔ ADC. To get an idea, check out this simulation I've put together.
As for the implementation, the simplest way would be to:

Configure the GPIO for output
Enable pull-down
Emit 1 (to quickly charge the capacitor)
Configure GPIO for input (to slowly drain the capacitor)
Read GPIO until it switches from 1 to 0, incrementing a counter
Counter value is a usable readout

You can experiment with the passives to get a feel for what would work best.
The ideal implementation would be a little more involved. I have used PIO to get best results. In a nutshell:

Configure the GPIO for input and use the "bus keep" mode by enabling both pull-up and pull-down. Now when you output something on the GPIO, you are actually controlling the pull-up/down and thus have about ~50kΩ series resistance. This is going to smoothly steer the capacitor voltage.
Enable PIO for the pin and write a (possibly single instruction) program that outputs negation of the pin back to itself. Since we are in the bus keep mode and there is a relatively large capacitor, we have just constructed a (rather gentle) oscillator.
Write another PIO program that continuously decrements one of the registers when the pin is high and the other when it is low using branch on pin value. To take measurements:

Inject instructions to reset the registers to 0.
Let it run for a while, possibly doing other stuff such as checking buttons and so on. Ideally it should run for 10 ms so that you get 100 Hz output, but it's really up to you.
Inject push X, push Y to get the counters to the FIFO and then read them from there. Subtract them from 0 to get positive numbers. Then subtract one from the other to get your readout.

You need to calibrate every stick before it gets usable. Depending on capacitor and joystick tolerances there will be differences between readouts of different axes, so you really need to calibrate all of them to get minimum, maximum and center points.
This mechanism is similar to how joysticks were read back in the Game port days.

We have now rolled out dual analog for RP2040 based devices that have access to all four ADC pins.

Hi, I've tried your latest update and I've had a problem with the analog ones not giving the maximum values and it would be because they are 60° resistors on the joystick. I have mapped it with windows and it works but I use it in a game or program it doesn't work at all there are sides that give me like 93% movement, one side gives me 70% and others 81%. these are my external joystick calibration ideas. Although it occurred to me to add capacitors as in the original boards.

and i have managed to add an adc on the standard raspberry pi pico board.

We are going to close this since we have dual analog now.  Once we have the expansion board ready we can look at doing trigger support.


NRE when deleting shared entity type

Hello!
1. Description
Getting NullReferenceException when trying to batch delete a SharedEntityType.
2. Exception
System.NullReferenceException: Object reference not set to an instance of an object.
   at Z.EntityFramework.Extensions.BatchDelete.Execute[T](IQueryable`1 query)
   at BatchDeleteExtensions.DeleteFromQuery[T](IQueryable`1 query, Action`1 batchDeleteBuilder)
   at Z.EntityFramework.Plus.BatchDeleteExtensions.Delete[T](IQueryable`1 query, Action`1 batchDeleteBuilder)
   at Z.EntityFramework.Plus.BatchDeleteExtensions.Delete[T](IQueryable`1 query)
   at ConsoleApp.Program.Main(String[] args) in C:\Users\chichkov\source\repos\ConsoleApp6\Program.cs:line 42

3. Fiddle or Project
Here is the sample project in .NET5. It uses latest release version of EFCore 5.0.4 and the latest version of EFPlus 5.1.25
using System;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Z.EntityFramework.Plus;

namespace ConsoleApp
{
	public class User
	{
		public int Id { get; set; }

		public string Name { get; set; }
	}

	class Context : DbContext
	{
		public DbSet<User> Users => Set<User>("User");

		protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
		{
			optionsBuilder.UseSqlServer("Data Source=(localdb)\\MsSqlLocalDb; Initial Catalog=STE_Test; Integrated Security = true");
			optionsBuilder.LogTo(Console.WriteLine);
		}

		protected override void OnModelCreating(ModelBuilder modelBuilder)
		{
			modelBuilder.SharedTypeEntity<User>("User");
		}
	}

	public static class Program
	{
		public static void Main(string[] args)
		{
			var context = new Context();
			context.Database.EnsureDeleted();
			context.Database.EnsureCreated();

			context.Users.Where(x => x.Name == "test")
                                // Here goes exception
				.Delete();
		}
	}
}

I can't figure out if it is a bug or I am doing something wrong. Any help will be appreciated.
Thanks in advance!

Hello @achikhv ,
The issue happens because the model doesn't return the EntityType for SharedEntityType.
So in short, this line cause the problem in our code:
dbContext.Model.FindEntityType(typeof(T));

A possible solution has already been found on our side. We are currently testing it.
I will give you an update soon.
Best Regards,
Jon

Hello @achikhv ,
The v5.1.26 has been released.
We will need to look deeper in our library to see if there is some more side impact with SharedEntityType but this scenario should now work correctly.
Let me know if everything also works on your side.

Hello @JonathanMagnan
I've just tried 5.1.26, and the bug is fixed. Everything is working as expected.
Thank you!

Awesome @achikhv !
We are glad to hear that the v5.1.26 fixed the issue!
Don't hesitate to contact us with any questions,
Jon


bump version to 1.0.1

bump version to 1.0.1
the update fixes a bug which displays less results than the retrieved ones from a remote source.

Where does 1.0.1 come from?
The latest upstream is 0.11.1
https://github.com/twitter/typeahead.js/blob/master/CHANGELOG.md

U can close this, and the PR since 1.0.1 is now outdated


ImagePolicy errors are not propagated as events to k8s

Describe the bug
I have an error in regex for Image Policy and this is the log:
{"level":"error","ts":"2021-03-01T12:31:33.411Z","logger":"controller-runtime.manager.controller.imagepolicy","msg":"Reconciler error","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImagePolicy","name":"myapp","namespace":"flux-system","error":"invalid regular expression pattern '^[a-fA-F0-9]+-(?<build_number>[0-9]*)': error parsing regexp: invalid or unsupported Perl syntax: (?<"}
flux get image policy shows "waiting to be reconciled"
The error is not visible as an event in k8s either.
ImageReposity error (at least docker auth failure) has this desired behaviour.
To Reproduce

Create an ImagePolicy that has the wrong regex syntax e.g. '^[a-fA-F0-9]+-(?<build_number>[0-9]*)'
Run flux reconcile image policy

Expected behavior

Message should show the same error
K8s event should show the same error

Additional context

Kubernetes version: 1.20.2
Git provider: bitbucket
Container registry provider: acr

Below please provide the output of the following commands:
flux version 0.9.0
► checking prerequisites
✔ kubectl 1.20.0 >=1.18.0-0
✔ Kubernetes 1.20.2 >=1.16.0-0
► checking controllers
✔ helm-controller: healthy
► ghcr.io/fluxcd/helm-controller:v0.8.0
✔ image-automation-controller: healthy
► ghcr.io/fluxcd/image-automation-controller:v0.6.1
✔ image-reflector-controller: healthy
► ghcr.io/fluxcd/image-reflector-controller:v0.7.0
✔ kustomize-controller: healthy
► ghcr.io/fluxcd/kustomize-controller:v0.9.1
✔ notification-controller: healthy
► ghcr.io/fluxcd/notification-controller:v0.9.0
✔ source-controller: healthy
► ghcr.io/fluxcd/source-controller:v0.9.0
✔ all checks passed

I think it's a reasonable expectation that it would appear in the status. I'll have to check what other controllers do for events; specifically, do they send an event when the spec is invalid (that might end up being a lot of events).

I hit the same issue.

Fixed in #140


S3 Object Storage for FOI-Help

Title of ticket: S3 Object Storage for FOI-Help
Description
Summarize issue
Dependencies
S3 credentials, which have already been provided.
DOD

[x] Setup in dev / test / prod
[x] Secrets are configured securely on OpenShift
[x] Files verified to exist on storage via S3 Browser
[x] Works for local dev and openshift builds

This is done and deployed.


a possibly new "jspm install" behavior

Context: monterey, running λ npm install && jspm install command, I get these questions
Would you like jspm to prefix the jspm package.json properties under jspm? [yes]:
Enter server baseURL (public folder path) [./]:
Enter jspm packages folder [.\jspm_packages]:
Enter config file path [.\config.js]:
Configuration file config.js doesn't exist, create it? [yes]:
Enter client baseURL (public folder URL) [/]:
Do you wish to use a transpiler? [yes]:
Which ES6 transpiler would you like to use, Babel, TypeScript or Traceur? [babel]:

I understand all questions,  it is safe to take all defaults (true?) but I did not have to do that until this new version of monterey that is approx 1 hour old. What's different?

https://github.com/monterey-framework/monterey/issues/49#issuecomment-230673060


allow multiple environment decorators

Allow multiple environment decorators on a step. This is helpful when a user wants to set some environment variables in code and others from the CLI using --with. When multiple environment decorators are supplied, the vars for each decorator are set in order. A message is logged in the case of conflicting values.
I've tested with the following example flow:
import os

from metaflow import (
     environment,
     step,
     FlowSpec,
)

class EnvFlow(FlowSpec):

    @environment(vars={"VAR1": "val1"})
    @environment(vars={"VAR2": "val1"})
    @environment(vars={"VAR3": "val1"})
    @step
    def start(self):
        print(f"VAR1 = {os.getenv('VAR1')}")
        print(f"VAR2 = {os.getenv('VAR2')}")
        print(f"VAR3 = {os.getenv('VAR3')}")
        self.next(self.end)

    @environment(vars={"VAR1": "val2", "VAR2": "val3"})
    @step
    def end(self):
        print(f"VAR1 = {os.getenv('VAR1')}")
        print(f"VAR2 = {os.getenv('VAR2')}")
        pass

if __name__ == "__main__":
    EnvFlow()

I've run --with environment:vars='{"VAR1":"val4", "VAR2":"val3"}' both locally and on Argo Workflows. Environment variables have the correct values in both cases, though in the case of Argo, the messages about the conflicting values are logged when argo-workflows create is run, rather than when the workflow is run.

@savingoyal -- could you comment on this one (you had some comments)


Add client token validation for emissions-mgmt's workspace endpoint

Workspace endpoint calls are from ecmps-ui and cannot be called directly from anywhere else. Listed endpoints require client token validation.

Method
API

$\textsf{\color{#8250df}{Emissions}}$

$\textsf{\color{#61affe}{GET}}$
emissions-mgmt/workspace/emissions/export

$\textsf{\color{#49cc90}{POST}}$
emissions-mgmt/workspace/emissions/import

$\textsf{\color{#61affe}{GET}}$
emissions-mgmt/workspace/emissions

$\textsf{\color{#8250df}{Emissions Views}}$

$\textsf{\color{#61affe}{GET}}$
emissions-mgmt/workspace/emissions/views

$\textsf{\color{#61affe}{GET}}$
emissions-mgmt/workspace/emissions/views/

Based on the client token discussion12/16, this ticket is considered invalid.


Preventing automatic_throttle configuration

Description
Hi @PanGan21, as discussed here with Thomas, I'm making the set_automatic_bootstrap_throttle function private. I did not completely removed the function because it is useful to disable automatic bootstrap in unit tests.

Notes & open questions

Change checklist

[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] A changelog entry has been made in the appropriate crates

Hi @stormshield-frb  thanks for the pr!
Would it be possible to fix the code so rustdoc, the clippy and the Test libp2p-kad pipelines pass?
I am not sure why cargo deny is failing, but if it is not issue of this pr we can skip it.

Yes of course :wink:  It should be good for the rustdoc and the libp2p-kad test.
As for the others :

The libp2p-kad now fails because it does not detect Changelog entry but it is in the original PR.
The clippy fail is not due to our PR, it occurs in identity/src/ed25519.rs:119:5 and identity/src/secp256k1.rs:170:5.
The cargo deny does not seems to be related to us either.
The one with the PR title will be changed at the end I think.

Mmm. The interrop test if failing. I don't know why. I'm trying to figure it out.

I think it was also failing in the previous pr so it is possible not an issue in this pr: https://github.com/PanGan21/rust-libp2p/actions/runs/7609558530/job/20722065177?pr=1
Let me know what you think

Yes indeed. Honestly, I have on idea why it is failing. Maybe this test does not run well on fork of fork ? Because on the PR in the official rust-libp2p repo, it does not fail although it had failed previously in this repo.

It looks like everything that could be fixed is fixed so let's merge it!
Thanks for the good work @stormshield-frb


driver exoscale: no default anti-affinity group

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "exoscale-affinity-group" git@github.com:exoscale/docker-machine.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.


SAK-29208 Ensure that everything is rendered before get page height.

Fixes an issue with previous merge PR 350.

Totally agree with you Adrian, I just increased the value while I'm thinking in a better strategy for this, maybe in a new jira. I'm wondering if asking for some DOM element or any other strategy could ensure that everything is rendered, is there any post render event in handlebars that we could use?


Why on earth do my priorly exported .json files no longer work?

Is it due to the new version/design or whatever? If so, then why on earth does it not support the prior exports??? This is super infuriating, as I've currently got a huge backup file, I can't use!

Alright, so it's super easy to fix, but this was still pretty stressful. I need a smoke.

Can you detail for other users how did you fix it?

Can you detail for other users how did you fix it?

Sure, you just gotta add '"groups": [],' (no single quotes) after the beginning bracket inside for example Notepad. Then the import will work.


pyodbc.connect abort on macOS with ODBC Driver 17 for SQL Server

Perhaps this issue may be bug on msodbcsql17 (not on pyodbc).
Maybe related issues

https://stackoverflow.com/questions/50361149/sql-server-pyodbc-driver-issue-libcabi-dylib-terminating-with-uncaught-excep
https://github.com/michiya/django-pyodbc-azure/issues/164

Environment

Python: 3.6.5
pyodbc: latest master (3d14d4) on GitHub, 4.0.23, 4.0.22
OS: macOS (Darwin MBP-14-003 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64)
DB: SQL Server 2017
driver: ODBC Driver 17 for SQL Server -- msodbcsql17

Issue
import pyodbc
pyodbc.connect(driver='{ODBC Driver 17 for SQL Server}', ...)

expected behavior

Successing without error. Or occuring usual database error.

observed behavior

Aborting with suddenly dies on C++ error. It cannot catching exception in python.

libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: collate_byname<char>::collate_byname failed to construct for C/en_US.UTF-8/C/C/C/C
Abort trap: 6

This error is not happened on following environments.

macOS with ODBC Driver 13 for SQL Server
Linux with ODBC Driver 17 for SQL Server

my mitigation
When resetting locale before connection, this error will not happen.
import pyodbc
import locale
locale.resetlocale()
pyodbc.connect(driver='{ODBC Driver 17 for SQL Server}', ...)

Or running python with environment variable LC_CTYPE=C, this error is suppressed.
But forcing locales like this mitigation breaks some backward compatibility.

This is not a pyODBC issue; do you have en_US.UTF-8 locale installed?

This will be fixed in next version of mysqlodbc17.
https://github.com/Microsoft/homebrew-mssql-release/issues/18#issuecomment-397420786


Display commenter's email address and the date/time of posting alongs…

…ide each comment.

Site is deployed at http://ryandraper-step-2020.appspot.com/.

@charu0291 I meant for this PR to just include the information with the plan of a future PR to clean up the comment formatting/appearance, but I can try to fix the alignment now.


Added badges and screenshot to README.md

After looking at this issue, I added some basic badges and a screenshot for the theme to README.md. The code used in the screenshot is the same one as in themes/pitch-black-color-theme.json
After merging, please change the screenshot url to the image in your repository, rather than the one I forked.
Thank you for creating this theme :)

Thank you! This is great, @TheZoraiz. This PR closes issue #11.


In OOM case try to force collect memory and retry the allocation

Could be triggered by specifying tight ulimit and some allocation workloads (e.g. doing bunch of realloc() in one thread and freeing in another).

Thanks! This was always the supposed behavior :-)  The generic routine looks cleaner now too with the separate mi_find_page function.


Can you specify rules for compiling the props of the component

<el-table :data="tableData" border></el-table>

Compiled into
.border {
border-width: 1px;
border-style: solid;
}

What I understand is that you used the border property of the component, did unocss accidentally generate the border style?

我的理解是你使用了组件的border属性，是unocss不小心生成了边框样式吗？

是的呢

Ok, as a workaround, you can add border to blocklist, if you need to use this property later, you can use b instead.
Playground


Relations validations doesn't work as expected

Imagine you have 2 documents
class User
      embeds_one :pet, validate: false
end

class Pet
    embedded_in :user
end

It should be OK if you want to save user with invalid pet (because of validate: false).
But it seems validate: false option doesn't work as expected, and you'll get validation error when you wan't to store user with invalid pet!
My Mongoid version is 4.0.2

I just fixed the issue for mongoid 4.0.2, check this repo https://github.com/EhsanYousefi/mongoid-relation-validation-fix.
All of the tests, are green.
I will make a pull request for mongoid 5 as soon as possible.


Please get this out of my feed.

Can you stop using notice-me?

This
... wondering why there isn't a report button on GitHub

??

Sorry ??

Thank you. Can you not use it anymore?

Sure


Open path ofsetting with DeltaCallback64 ignores callback for pathes with length == 1

In clipper.offset.cpp when offsetting an open Path with only one point the DeltaCallback64 is ignored and the hardcoded "fixed" radius (1)  is used instead.
I realize this is a cornercase and would need some weird workaround since we obviously don't have normals for the single point.
I'd argue that the callback should in this case still be called with a normal of 0 which should be noted in the documentation for DeltaCallback64 (as soon as it has documentation that is).

If you look at the sample apps here, you'll see several examples of variable offsetting where the (ignored) offsetting delta is 1.0. So if you're having problems I strongly suspect that you haven't properly assigned the callback.


[libpng] fix mips64 support

Add support for mips64.

What does your PR fix?
fix build failure for mips64.

Which triplets are supported/not supported? Have you updated the CI baseline?
linux, No

Does your PR follow the maintainer guide?
Basically.

Yes

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

Ping @Jamlys for response.

Thanks!


i18n(fr): Update reference/error-reference.mdx from #8967

Description (required)
Update reference/error-reference.mdx from #8967

Related issues & labels (optional)

Suggested label: i18n

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale
File
Note

fr
reference/error-reference.mdx
Localization changed, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

LGTM! Good catch for the previously missing ActionsWithoutServerOutputError! 👍🏽

Thanks, it looked weird with the number of lines, I compared and we missed that one ❗


HDDS-1114. Fix findbugs/checkstyle/accepteance errors in Ozone

Unfortunately as the previous two big commits (error handling HDDS-1068, checkstyle HDDS-1103) are committed in the same time a few new errors are introduced during the rebase.
This patch will fix the remaining 5 issues (+ a type in the acceptance test executor)
See: https://issues.apache.org/jira/browse/HDDS-1114

It turned out that the error message always should be filled for OMException. The status code itself is not enough, as external clients (eg. ozonefs) will check only the getMessage of the exception.


Provide HTTP sink and source

In todays scripting we often have to interact with HTTP APIs. Many APIs provide native Go SDKs, but there are lesser known APIs around without a proper SDK. We should provide a facility to provide similar HTTP capabilities to curl into the go scripting environment. Rolling a own HTTP client in go is not that hard, but it requires a lot of repetitive error checking. Today I wrote such a small script with github.com/bitfield/script and I missed build in HTTP capabilities alot.
I have seen https://github.com/bitfield/script/pull/3. This PR only implements a GET function. Interacting even with the simplest REST APIs requires us to use other methods like POST or PUT. Many APIs requires us to set custom headers.
Therefore I propose the following sources:
// HTTPClient is an interface to allow the user to plugin alternative HTTP clients into the source.
// The HTTPClient interface is a subset of the methods provided by the http.Client
// We use an own interface with a minimal surface to allow make it easy to implement own customized clients.
// Customized clients are required to implement features like oauth2 or TLS client certificate authentication.
type HTTPClient interface {
	Do(r *http.Request) (*http.Response, error)
}

// HTTP executes the given http request with the default HTTP client from the http package. The response of that request,
// is processed by `process`. If process is nil, the default process function copies the body from the request to the pipe.
func HTTP(req *http.Request, process func(*http.Response) (io.Reader, error)) *Pipe {
	return HTTPWithClient(http.DefaultClient, req, process)
}

// HTTP executes the given http request with the given HTTPClient. The response of that request,
// is processed by `process`. If process is nil, the default process function copies the body from the request to the pipe.
func HTTPWithClient(client HTTPClient, req *http.Request, process func(*http.Response) (io.Reader, error)) *Pipe {
}

And the following sink:
// HTTPRequest creates a new HTTP request with the body set to the content of the pipe.
func (p *Pipe) HTTPRequest(method string, url string) (*http.Request, error)

This allows us to simply post the content of files to remote URL like this:
func main() {
	req, err := script.Args().Concat().HTTPRequest(http.MethodPost, "https://httpbin.org/post")
	if err != nil {
		log.Fatal(err)
	}
	script.HTTP(req, nil).Stdout()
}

This is the equivalent of posting the contents of files via curl to a POST endpoint.
I explored this design in the PR #72.
I'm open for feedback.

Hey @hikhvar, thanks for the issue! This is a very interesting idea, and I'd definitely like to include some functionality like this.
However, one of the characteristics of good libraries (and, indeed, languages) is that they do a lot with a little. I'm not convinced, for example, that an HTTPRequest method which consists of a one-line call to http.NewRequest is really worth its inflationary effect on the API.
That doesn't mean it's a bad idea, just that I'd like us to try and tweak the design to be more powerful. If using script doesn't save you code, there's no point in using it. Could we come up with something which is more like (for example) using curl or wget in a shell script?

Hey @hikhvar, thanks for the issue! This is a very interesting idea, and I'd definitely like to include some functionality like this.
However, one of the characteristics of good libraries (and, indeed, languages) is that they do a lot with a little. I'm not convinced, for example, that an HTTPRequest method which consists of a one-line call to http.NewRequest is really worth its inflationary effect on the API.
That doesn't mean it's a bad idea, just that I'd like us to try and tweak the design to be more powerful. If using script doesn't save you code, there's no point in using it. Could we come up with something which is more like (for example) using curl or wget in a shell script?

I'm fine with removing the HTTPRequest. I think HTTP and HTTPWithClient are the replacements for wget and curl. The first uses sane defaults to get a resource. The later offers the use the full flexibility offered by the golang stdlib http package.
Maybe remove the process mapping function from HTTP?
Like:
// HTTP executes the given http request with the default HTTP client from the http package. The response body of the request is copied to the Pipe
func HTTP(req *http.Request) (io.Reader, error)) *Pipe {
	return HTTPWithClient(http.DefaultClient, req, nil)
}

I'm fine with removing the HTTPRequest. I think HTTP and HTTPWithClient are the replacements for wget and curl. The first uses sane defaults to get a resource. The later offers the use the full flexibility offered by the golang stdlib http package.
Maybe remove the process mapping function from HTTP?
Like:
// HTTP executes the given http request with the default HTTP client from the http package. The response body of the request is copied to the Pipe
func HTTP(req *http.Request) (io.Reader, error)) *Pipe {
	return HTTPWithClient(http.DefaultClient, req, nil)
}

A great way to explore and find the right design is to write example programs, I find. Could we construct a non-trivial example which uses HTTP requests in a pipeline in a realistic way? That will almost certainly tell us exactly what the API should look like.

A great way to explore and find the right design is to write example programs, I find. Could we construct a non-trivial example which uses HTTP requests in a pipeline in a realistic way? That will almost certainly tell us exactly what the API should look like.

I updated my DRAFT PR #72 with a rewrite of the HTTP API. I switched over to a fluent interface. The general idea is, that the HTTP(url string) function (the source) and method (the sink) on a Pipe creates a new HTTPPipe. This HTTPPipe can be configured with methods like WithMethod or WithBody. The HTTPPipe executes the HTTP request in a lazy fashion. The request is executed as soon as Read() or Error() of the HTTPPipe is called or the AutoReadCloser of the Pipe is read. Since the HTTPPipe is composed of a normal Pipe, every filter already defined can be used here. By default the source tries to fetch the provided URL with a GET. This is similar how tools like curl or wget work.
The sink does by default a POST. This matches the behavior of curl. As soon as you provide data for the body, curl does a POST unless configured otherwise.
Example Usecases:
Download a file:
func main() {
  script.HTTP("https://httpbin.org/json").WriteFile("download.json")
 }

Download a file from a basic auth protected server:
func basicAuth(username, password string) http.Header {

	auth := username + ":" + password
	enc := base64.StdEncoding.EncodeToString([]byte(auth))
	h := http.Header{}
	h.Set("Authorization", "Basic "+enc)
	return h
}

func main() {
	user, password := "admin", "supersecret"
	_, err := script.HTTP("https://httpbin.org/basic-auth/admin/supersecret").
		WithHeader(basicAuth(user, password)).
		WriteFile("download.txt")
	if err != nil {
		log.Fatal(err)
	}
}

Post local JSON files to a URL.
Example use cases from my day to day admin tasks are updating elasticsearch index templates.
func main() {
	_, err := script.Args().
		MatchRegexp(regexp.MustCompile(".*\\.json")).
		First(1).
		Concat().
		HTTP("https://httpbin.org/put").
		WithHeader(http.Header{"Content-Type": []string{"application/json"}, "MyOrganisationsRequiredHeader": []string{"foo"}}).
		WithMethod(http.MethodPut).
		Stdout()
	if err != nil {
		log.Fatal(err)
	}
}

I think this interface gives us both, a simple interface for simple task but allows the user to construct complex HTTP requests required to talk to real REST APIs.

I updated my DRAFT PR #72 with a rewrite of the HTTP API. I switched over to a fluent interface. The general idea is, that the HTTP(url string) function (the source) and method (the sink) on a Pipe creates a new HTTPPipe. This HTTPPipe can be configured with methods like WithMethod or WithBody. The HTTPPipe executes the HTTP request in a lazy fashion. The request is executed as soon as Read() or Error() of the HTTPPipe is called or the AutoReadCloser of the Pipe is read. Since the HTTPPipe is composed of a normal Pipe, every filter already defined can be used here. By default the source tries to fetch the provided URL with a GET. This is similar how tools like curl or wget work.
The sink does by default a POST. This matches the behavior of curl. As soon as you provide data for the body, curl does a POST unless configured otherwise.
Example Usecases:
Download a file:
func main() {
  script.HTTP("https://httpbin.org/json").WriteFile("download.json")
 }

Download a file from a basic auth protected server:
func basicAuth(username, password string) http.Header {

	auth := username + ":" + password
	enc := base64.StdEncoding.EncodeToString([]byte(auth))
	h := http.Header{}
	h.Set("Authorization", "Basic "+enc)
	return h
}

func main() {
	user, password := "admin", "supersecret"
	_, err := script.HTTP("https://httpbin.org/basic-auth/admin/supersecret").
		WithHeader(basicAuth(user, password)).
		WriteFile("download.txt")
	if err != nil {
		log.Fatal(err)
	}
}

Post local JSON files to a URL.
Example use cases from my day to day admin tasks are updating elasticsearch index templates.
func main() {
	_, err := script.Args().
		MatchRegexp(regexp.MustCompile(".*\\.json")).
		First(1).
		Concat().
		HTTP("https://httpbin.org/put").
		WithHeader(http.Header{"Content-Type": []string{"application/json"}, "MyOrganisationsRequiredHeader": []string{"foo"}}).
		WithMethod(http.MethodPut).
		Stdout()
	if err != nil {
		log.Fatal(err)
	}
}

I think this interface gives us both, a simple interface for simple task but allows the user to construct complex HTTP requests required to talk to real REST APIs.

This is neat, but I wish there weren't an HTTPPipe type. One of the nice things about script is that everything is a Pipe. Can we provide the same functionality using just Pipe?

This is neat, but I wish there weren't an HTTPPipe type. One of the nice things about script is that everything is a Pipe. Can we provide the same functionality using just Pipe?

I think we plump everything into the Pipe. However, what is the benefit of this? Sure, the library contains less types, but it does not help the user. What is the semantic of:
script.WithMethod("PUT").Match("bar").Stdout()

This will compile perfectly fine, but does not make any sense. Moreover it allows the user to write bugs like this:
_, err := script.Args().
		MatchRegexp(regexp.MustCompile(".*\\.json")).
		First(1).
		Concat().
		HTTP("https://httpbin.org/put").
		WithHeader(http.Header{"Content-Type": []string{"application/json"}, "MyOrganisationsRequiredHeader": []string{"foo"}}).
                Match("foo").
		WithMethod(http.MethodPut).
		Stdout()

In this case the WithMethod() call does not have any effect, but it will compile.

I think we plump everything into the Pipe. However, what is the benefit of this? Sure, the library contains less types, but it does not help the user. What is the semantic of:
script.WithMethod("PUT").Match("bar").Stdout()

This will compile perfectly fine, but does not make any sense. Moreover it allows the user to write bugs like this:
_, err := script.Args().
		MatchRegexp(regexp.MustCompile(".*\\.json")).
		First(1).
		Concat().
		HTTP("https://httpbin.org/put").
		WithHeader(http.Header{"Content-Type": []string{"application/json"}, "MyOrganisationsRequiredHeader": []string{"foo"}}).
                Match("foo").
		WithMethod(http.MethodPut).
		Stdout()

In this case the WithMethod() call does not have any effect, but it will compile.

Yes, that's not the answer. It's not just about what types exist in the program, but the fact that you don't want methods that are only meaningful for certain kinds of data.
What about something like this instead:
script.HTTPGet("https://httpbin.org/json").Stdout()
...
req := http.NewRequest...
req.Header.Set...
script.HTTPDo(req)...

Yes, that's not the answer. It's not just about what types exist in the program, but the fact that you don't want methods that are only meaningful for certain kinds of data.
What about something like this instead:
script.HTTPGet("https://httpbin.org/json").Stdout()
...
req := http.NewRequest...
req.Header.Set...
script.HTTPDo(req)...

With this design the user can't:

Access a REST Endpoint secured by client certificates. These have to be set in the underlying http.Transport of the http.Client.
Access anything other than the response body. It gets really hard to check the response status code in a pipeline.
Access the Headers of the response.

Are that restrictions we are ok to live with? In those cases the user can fallback to a pure go implementation of the source and init the pipe with script.NewPipe().WithReader(...).
If we choose this, we should document the limitations of our HTTPClient cleanly.
I did not find any explicit API compatibility guarantees of the script library. Do we follow the default SemVer guarantees of only adding non-breaking API changes in a minor version?

With this design the user can't:

Access a REST Endpoint secured by client certificates. These have to be set in the underlying http.Transport of the http.Client.
Access anything other than the response body. It gets really hard to check the response status code in a pipeline.
Access the Headers of the response.

Are that restrictions we are ok to live with? In those cases the user can fallback to a pure go implementation of the source and init the pipe with script.NewPipe().WithReader(...).
If we choose this, we should document the limitations of our HTTPClient cleanly.
I did not find any explicit API compatibility guarantees of the script library. Do we follow the default SemVer guarantees of only adding non-breaking API changes in a minor version?

Well, as in any good API design, I aim to make simple things simple, and complicated things possible. What would it look like to set a custom HTTP client? Let's see if we can think of a reasonable way to do it which doesn't place an extra burden on someone who's happy with the default client (the script equivalent of http.Get, for example).
Similarly, how can we provide access to the response status and other headers?

Do we follow the default SemVer guarantees of only adding non-breaking API changes in a minor version?

We are at v0, so breaking changes in minor versions are allowed and expected.

Well, as in any good API design, I aim to make simple things simple, and complicated things possible. What would it look like to set a custom HTTP client? Let's see if we can think of a reasonable way to do it which doesn't place an extra burden on someone who's happy with the default client (the script equivalent of http.Get, for example).
Similarly, how can we provide access to the response status and other headers?

Do we follow the default SemVer guarantees of only adding non-breaking API changes in a minor version?

We are at v0, so breaking changes in minor versions are allowed and expected.

Whats your opinion on the following API combining your idea and my second idea with the HTTPPipe:
func HTTP(url string, httpOptions...) *Pipe

A normal GET looks like this:
script.HTTP("https://httpbin.org/json").Stdout()

When I want to modify the request, response or client I can use:
script.HTTP("https://httpbin.org/post", WithMethod("POST"), WithClient(c), WithResponseProcessor(f)).Stdout()

This has the following benefits:

Users can modify all bells and  whistles of the HTTP request
They must not modify anything other than the URL
Everything is still a normal Pipe.

Whats your opinion on the following API combining your idea and my second idea with the HTTPPipe:
func HTTP(url string, httpOptions...) *Pipe

A normal GET looks like this:
script.HTTP("https://httpbin.org/json").Stdout()

When I want to modify the request, response or client I can use:
script.HTTP("https://httpbin.org/post", WithMethod("POST"), WithClient(c), WithResponseProcessor(f)).Stdout()

This has the following benefits:

Users can modify all bells and  whistles of the HTTP request
They must not modify anything other than the URL
Everything is still a normal Pipe.

Yes, functional options would be a nice pattern here (though a bit unwieldy as they'd have to be script.WithMethod... and so on).
Let's try and write non-trivial examples of both patterns (simple case, and extra configuration case), and see what API emerges.

Yes, functional options would be a nice pattern here (though a bit unwieldy as they'd have to be script.WithMethod... and so on).
Let's try and write non-trivial examples of both patterns (simple case, and extra configuration case), and see what API emerges.

One alternative to functional options could be using a context.Context-available previously initialized http.Client, a pattern used on many other libraries and on the stdlib.
That made me think that having a Context to share state or resources and to control Pipe execution would make a lot of sense, only to find there is no support for it. This might be a good idea.
How to add context.Context support might be a whole discussion but the simplest thing that comes to my mind is add a Context variant to all script Sources. A second alternative (although more complex) is to allow to set the context on a Pipe (on this alternative it would be complex to define and explain what happens when setting a Context on a Pipe that already has one).
To play with this idea let's try the idea of having context variants for source methods:
client := ... // initialize an http.Client with custom configuration
ctx := script.WithHTTPClient(context.Background(), client)
script.ExecContext(ctx,"find /").HTTPGet("https://example.com/service?filename={{.}}").WriteFile("/tmp/foo")

Please ignore the text/template-style argument to HTTPGet, it was just an idea popped out of my head while I was writing the example. I didn't think much about it but it could be a good idea.
Of course using a context could allow new features like having timeouts, cancellation, etc.

This has been a very productive and helpful discussion, thank you. I'm still exploring ideas on this front, but let's close this and continue the good work over on #85, just to keep everything in one place.


Extrema display bug with mixed units of measurements

Checklist

[X] I updated the card to the latest version available
[X] I cleared the cache of my browser
[X] I verified that I'm really running the lastest version in my browser console
[x] I checked if there is another issue opened with the same problem

Describe the bug
Hey RomRider, Thank you very much for this gorgeous card, i love it. Farewell to Ingress and Grafana with such a wonder.
However i maybe have a bug to report or my config is faulty.
When i mix units of measurements in a line card, one of the entity will have it's extrema placed in a wrong position
Version of the card
Version: 1.7.7
To Reproduce
This is the configuration I used:
          - type: 'custom:apexcharts-card'
            graph_span: 7d
            header:
              show: true
              show_states: true
              colorize_states: true
            apex_config:
              chart:
                height: 250
                zoom:
                  enabled: true
                toolbar:
                  show: true
                  tools:
                    zoom: true
                    zoomin: true
                    zoomout: true
                    pan: true
                    reset: true
              yaxis:
                - title:
                    text: Température
                  decimalsInFloat: 0
                  #min: 18
                - title:
                    text: Humidité
                  decimalsInFloat: 1
                  opposite: true
                  #min: 29
            series:
              - entity: sensor.humidity
                color: '#3498db'
                name: Extérieur Humidité
                curve: smooth
                show:
                  extremas: true
                group_by:
                  func: avg
                  duration: 120min
              - entity: sensor.temperature
                color: orange
                name: Extérieur Température
                curve: smooth
                group_by:
                  func: avg
                  duration: 120min
                show:
                  extremas: true

Screenshots

Desktop (please complete the following information):

Browser chrome
Version 88.0.4324.192 (Official Build) (x86_64)

Duplicate of #89

This is fixed in the latest beta already :)

Thanks.


Enable semgrep using auto config as recommended by the semgrep suppor…

…t. This should enable semgrep to run w/o Semgrep Cloud Accout
Issue #, if available:
https://github.com/aws/glide-for-redis/issues/995
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ikolomi still WIP, right?

@barshaul nope, waiting for your approval to merge

@ikolomi ping


Philips Hue Outdoor Nyro muurlamp

Hi,
Is it possible to add this device?
https://www2.meethue.com/nl-be/p/hue-white-and-color-ambiance-nyro-muurlamp/1745630P7
Producent ID: Philips
Product ID: 1745630P7
Device ID: 269
Profile ID: 260
Kind regards,
Aaron

Same with this one :)
Adding it to the todo list.

Added to upcoming SDK3 version of the app


from HarmonicPatterns.harmonic import send_alert, search_function

from HarmonicPatterns.harmonic import send_alert, search_function
This example code does not work as harmonic.py file does not exist. Please suggest

sorry, the code is too old.
function send_alert and search_function could be found in example/run_detect.py
I think the working part left is:
ccxt fetch_kline -> HarmonicDetector search() -> output

sorry, the code is too old.
function send_alert and search_function could be found in example/run_detect.py
I think the working part left is:
ccxt fetch_kline -> HarmonicDetector search() -> output

hello as far as I understand it gives the following error when running "search_function":
NetworkError: binance GET https://api.binance.com/api/v3/exchangeInfo
I tried to understand how it followed to draw information from the ccxt library, but it didn't. can you help?
By the way, I get this error when I run the DETECT BTC cell in the "HarmoCurrent.ipynb" file, the code is below:
s = ['BTC/USDT', 'ETH/USDT']
search('binance', s, periods = ['15m', '30m', '1h', '4h'])

please to the updated notebook, with a step by step. Should be easy to try


Clearing Tech Debt / Code Refactoring

Description:
Currently, the codebase is in quite a mess, as the sole developer @cliffchew84 has been focused on just trying to hack out a somehow workable tool for himself. However, he understands that his code is in dire need of much refactoring and repayment of tech debt.
Proposed solutions / help needed:

[x] General clean up current code base to remove legacy backend code
[x] Refactor current FastAPI main.py file into more maintainable
[ ] Removal of old accounts that have not logged in for more than X months
[ ] Adding of unit tests ( what types of units tests can be further discussion )

Other potential improvements includes:

[ ] More modern dependencies management with uv or poetry
[ ] Implement Supabase-CLI as local staging environment for postgre database and data migration requirement without touching production environment.
[ ] Documentation for getting started as developer.

@cliffchew84 As discussed in our previous meetup, happy to share that all of the refactoring work has been completed in staging and ready to be merged to main.
However, since in #182, uv is added as dependency management solution, help is required to update the deploy instruction in on-render's configurations to the following:

Build Command:curl -LsSf https://astral.sh/uv/install.sh | sh

Start Command:uv run -- uvicorn src.main:app --host <IP_ADDRESS> --port 10000

Since UV is a relatively new tool, documentation on deploying for on-render could not be found so some trial-and-error with the configuration might be required.

Also since work on adding proper supabase authentication and unit test requires the usage of Javascript Framework as discussed, may I request the 2 leftover tasks to be created in seperate issue? Then this issue can be closed.

I tried shifting to uv, but couldn't get it to work so far. Here are the steps that I have taken:

[ Success ] Shifted to Python 3.9.10 using the docs here - https://docs.render.com/python-version, as uv needs to use at least Python 3.8, and my original Python setup on Render was Python 3.7. I tried to shift to Python 3.10, but there seems to be some config issues with one of my legacy packages. Once I align my package dependencies with yours, I can consider to shift to Python 3.10>=.
[ Success ] On Build Command, I managed to do this curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH=$PATH:$HOME/.local/bin && uv pip install -r requirements.txt. My idea was to at least test the installation of uv, while maintaining my current requirements.txt set up for now. Definitely should shift to pyproject.toml set up once I update my packages from you. Logs show that uv and the packages got installed properly, and the build was successful ( and blazingly fast )
[ Failed ] On Start Command, I tried these two commands uv run -- uvicorn main:app --host <IP_ADDRESS> --port 10000 and export PATH=$PATH:$HOME/.local/bin && uv run -- uvicorn main:app --host <IP_ADDRESS> --port 10000, and both commands say uv command not found

We can look into debugging this together soon :D

If the error is uv not found, high chance is because the location where uv is installed are not carried over to the run layer.
If that's the case, there are two options:

Install uv binary in some local path that we know for sure will exist in the run layer. (E.g. ./)
Scourge from onrender documentation on exact location to install for custom binary dependency.

Need to test out more over the weekend to figure this out.

@cliffchew84 I managed to test with a dummy FastAPI repo, the following configuration command works :smiley:

Build Command:pip install uv && uv sync --frozen

Start Command:uv run --no-sync -- uvicorn src.main:app --host <IP_ADDRESS> --port 10000


[Question] How to run test suit

Hi @xenova,
I want to work on adding new features, but when I try to run the tests of the project I get this error:
Error: File not found. Could not locate "/Users/yonatanchelouche/Desktop/passive-project/transformers.js/models/onnx/quantized/distilbert-base-uncased-finetuned-sst-2-english/sequence-classification/tokenizer.json".
    at getModelFile (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:235:23)
    at async fetchJSON (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:288:18)
    at async Promise.all (index 0)
    at async Function.from_pretrained (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/tokenizers.js:2571:48)
    at async Promise.all (index 0)
    at async pipeline (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/pipelines.js:1308:17)
    at async text_classification (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:90:22)
    at async /Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:897:25

I guess it is because the models are missing from the models dir. Is there a programmatic way to download them from the lib?
By the way, I was thinking about adding a CI on PRs to run the tests and perhaps adding jest as the test runner. What, do you think about that?

I guess it is because the models are missing from the models dir. Is there a programmatic way to download them from the lib?

Yes that's right. Currently, I've been the only one testing the models (running them locally) because otherwise, contributors would have to download all the models from the hub.
If you want, you can do this by cloning the huggingface repo like this:
# Make sure you have git-lfs installed (https://git-lfs.github.com)
git lfs install
git clone https://huggingface.co/Xenova/transformers.js

# if you want to clone without large files – just their pointers
# prepend your git clone with the following env var:
GIT_LFS_SKIP_SMUDGE=1

By the way, I was thinking about adding a CI on PRs to run the tests and perhaps adding jest as the test runner. What, do you think about that?

That would be AMAZING! Yes please!

I have the models and now I get another error:
/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:27
            this.body = new ReadableStream({
                            ^

ReferenceError: ReadableStream is not defined
    at new FileResponse (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:27:29)
    at getFile (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:177:16)
    at getModelFile (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:231:26)
    at fetchJSON (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:288:24)
    at Function.from_pretrained (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/tokenizers.js:2572:13)
    at pipeline (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/pipelines.js:1292:27)
    at text_classification (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:90:28)
    at /Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:897:31
    at Object.<anonymous> (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:903:3)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)

Do I need to run another process except npm run test? I tried several approaches and still get this error.

I have the models and now I get another error:

/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:27

            this.body = new ReadableStream({

                            ^

ReferenceError: ReadableStream is not defined

    at new FileResponse (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:27:29)

    at getFile (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:177:16)

    at getModelFile (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:231:26)

    at fetchJSON (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:288:24)

    at Function.from_pretrained (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/tokenizers.js:2572:13)

    at pipeline (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/pipelines.js:1292:27)

    at text_classification (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:90:28)

    at /Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:897:31

    at Object.<anonymous> (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:903:3)

    at Module._compile (node:internal/modules/cjs/loader:1105:14)

Do I need to run another process except npm run test? I tried several approaches and still get this error. It's weird because node should be available when running tests

Ah yes, there was a PR made yesterday to fix that:

https://github.com/xenova/transformers.js/pull/72

I'll merge it soon

Now that automated testing is implemented (via GH actions), you probably don't need to run the test suite locally. If you would like to, feel free to follow the steps in the CI pipeline: https://github.com/xenova/transformers.js/blob/main/.github/workflows/tests.yml
Otherwise, I will close the issue.


Prefer mold linker on Linux

Currently, fleet uses zld on MacOS and lld on Linux and Windows. A better alternative on Linux would be mold as it is even faster than lld.
Please refer to the mold's README to get some real benchmarks on the performance difference.
It wouldn't be recommended to use it on Windows as it's support for Windows is still being worked on but we can for sure use it on Linux.

I don't think Mold is stable enough? It's still in the alpha stages of the project.

We did look into mold but we decided to drop it as it is not stable yet (and all the resources we could find on installation told that the end user had to build from source). However we will be introducing more customization options so that you can set the type of linker you would want to use on your projects!

Our license is not compatible with that of mold, which is why we were forced to drop it as an option.

This issue has seemed to be fixed. If this issue re-occurs, or you’d like to open another issue, please create one! If you feel like it needs to be reopened, reach out to me over at our Discord Server (https://discord.gg/RsTeV6rpqJ).
Grinder (Community Manager)


[Editor] Mouse cursor locks up when right-clicking while using a scrolling number input field

Operating system or device - Godot version:
Crux Linux, Kernel 4.9.0rc2
Godot 12843167cacf3bacca32c29b7ea8b4426392bad0
Issue description (what happened, and what was expected):
When holding the left mouse button pressed to scroll through numbers in a scrolling number field and then clicking right, the mouse cursor locks up and disappears. Expected behavior would be the mouse cursor not locking up and re-appearing.
Steps to reproduce:
1: You need a scrolling number input field. You can create a Sprite3D which has input fields like that, for example the ones for Vframes and Hframes.
2: Left-click the field and hold the button while moving your cursor to change the number.
While still holding the left mouse button, perform a right-click.
3: The cursor stays invisible and is locked up. Keyboard input still works though.

Also got this behaviour with Godot 2.1 on Windows 10 64 bits.

BTW, mouse is locked on tree.cpp:2312 and unlocked on tree.cpp:2363 and then again on tree.cpp:2949 (but the second time doesn't matter much).
Also, it is done for spinbox controls seperately in spin_box.cpp:173/spin_box.cpp:152, but this implementation doesn't suffer from the bug.

For me, #7385 fixes the bug.


Parse error on import {-# SOURCE #-}

Using build system Stack
prune-juice.exe: user error (Failed to parse imports due to ParseErrorBundle {bundleErrors = Tri
vialError 7 (Just (Tokens ('{' :| ""))) (fromList [Tokens ('"' :| ""),Tokens ('(' :| ""),Tokens
('q' :| "ualified"),Label ('a' :| "lphanumeric character"),Label ('w' :| "hite space")]) :| [],
bundlePosState = PosState {pstateInput = "import {-# SOURCE #-} Msg.Payload", pstateOffset = 0,
pstateSourcePos = SourcePos {sourceName = "./src/AppEnv/Types.hs", sourceLine = Pos 1, sourceCol
umn = Pos 1}, pstateTabWidth = Pos 8, pstateLinePrefix = ""}})

Seeing the above error running prune-juice.exe on a stack based project in WSL on Windows 10.  Looks like it doesn't handle importing .hs-boot files?

@nxths does this fix your issue?
https://github.com/dfithian/prune-juice/pull/3

@dfithian thanks just tested with that commit, there's no longer a parse error

Woo!


Added house number and additional address info for the address.

Description

Tested scenarios

Fixed issue:

Hi @atty31,
Thanks for the PR. This will cause issues with US addresses and probably more countries.
Could you let me know where you are using the two street fields for. Think it needs to be a bit smarter and check if it contains indeed only a house number and if not to not send it across.
Regards,
Rik
Adyen

HI @rikterbeek,
I made an update for my PR. I made it configurable. But why the house number should be only integer ? What about these kind of house numbers : 142 B or 13 C .  These have an additional string.
Thank you :)

Hi @atty31,
Sorry forgot about this one. Could you add the default value to false and could you move the setting from required section as last field of the adyen_order_process section ? If you can add a tooltip as well that this is for enriching the API data for cards that would be helpful for other merchants.
If you can change that then we can merge it on our end.
Regards,
Rik
Adyen


⚠ Cioos National CKAN Sitemap has degraded performance

In 5f512f1, Cioos National CKAN Sitemap (https://catalogue.cioos.ca/sitemap/sitemap-1.xml) experienced degraded performance:

HTTP code: 200
Response time: 17953 ms

Resolved: Cioos National CKAN Sitemap performance has improved in da3dc00 after 10 minutes.


??? what

p was undefined and it kept giving me random lint errors

my guy this is literally what my pull request was


Render crashes

Hi!
I've had a bit of time on my hands and fixed a few crashing bugs I've found. I've also added test cases for (most) of the bugs I've found (except for "panic when <body> is not the second child of the root element").

Hi @farhaven thanks for taking some time to fix those bugs. I'm glad you liked the project and wanted to contribute!


an option to disconnect an endpoint from a network forcefully

since we are not yes using engine-api we need to duplicate this change here: https://github.com/docker/engine-api/pull/29

ping @abronan @dongluochen @ehazlett

LGTM.

LGTM


"Unable to find pages project" error even though deploy is successful

Every time the Action runs, it fails with the following error

The project name is correct however. In fact, when I go to the Deployments tab in the Pages dashboard, I can see that the deploy was successful.
I am more than a little bit confused.

Added some better error messaging which should help you track what is going wrong :)

Very helpful, thank you!


Remote Video is getting corrupted in iOS (simulator and real device)

Bug
Remote Video is getting corrupted in iOS (simulator and real device) and showing in green preview. But the same video as a local source is working and url also playing in the browser (couldn't share url here as it's a private info).  What would be the problem? If the problem with video, then what should be the correct format (resolution, codecs, duration)?
Screenshot:

MP4 Video Properties:

React Native Environment Info:
System:
  OS: macOS High Sierra 10.13.6
  CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Memory: 2.31 GB / 16.00 GB
  Shell: 3.2.57 - /bin/bash
Binaries:
  Node: 8.12.0 - /usr/local/bin/node
  Yarn: 1.3.2 - /usr/local/bin/yarn
  npm: 6.4.1 - /usr/local/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
  iOS SDK:
    Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
  Android SDK:
    API Levels: 23, 24, 25, 26, 27, 28
    Build Tools: 23.0.1, 23.0.2, 23.0.3, 24.0.0, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.3, 27.0.3, 28.0.3
    System Images: android-19 | Google APIs Intel x86 Atom, android-21 | Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-25 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
  Android Studio: 3.0 AI-171.4443003
  Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
  react: 16.5.0 => 16.5.0
  react-native: 0.57.2 => 0.57.2
npmGlobalPackages:
  react-native-checkbox: 2.0.0
  react-native-cli: 2.0.1
  react-native-datepicker: 1.6.0
  react-native-git-upgrade: 0.2.7
  react-native-rename: 2.4.1

Library version: 3.2.1
Steps To Reproduce

Describe what you expected to happen:

Remote Video is not playing in iOS (simulator and real device).

But the same video as a local source is working.

Reproducible sample code
                       <Video
                          repeat={false}
                          paused={!this.state.playing}
                          muted={this.state.muted}
                          resizeMode={'cover'}
                          source={{uri: this.state.videoURL}}
                          ref={(ref: Video) => { this.player = ref }}
                          onBuffer={this.onBuffer}
                          onError={this.videoError}
                          onEnd={this.endVideo}
                          style={...}
                        />

Finally, got to know we haven't support multipart download from our BE Server which is required for iOS.


Add base CD integration

Add base CD integration with something like Heroku, DigitalOcean
Assigned: @micumatei

Solved in https://github.com/micumatei/asciipic/pull/2

Solved with https://github.com/micumatei/asciipic/commit/5e70a1908d02934459cb3ba8a440caeb14f85333


fix gradle deamon memory struggling

Description
I noticed a big memory usage from android studio after some builds,
thourgh VisualVM i noticed that Gradle Deamon stays idle for a long time after build and keeps also reference to
org.jetbrains.kotlin.daemon.KotlinCompileDaemon.
Each one keeps up to 4gb ram
Steps to test this PR
Try multiple build and each time you can notice that at build time studio requires up to 14gb ram but after process finish
returns to normal memory usage

Closing as per contribution guidelines. Contributions should be related to an accepted issue (label Help wanted). Thanks.


[AutoPR compute/resource-manager] Add api version 2019-03-01 for Microsoft.Compute

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

(message created by the CI based on PR content)


Wrong .dxf for Pour Panel uploaded

Hey deeplocal team,
I really enjoyed your drinks on Google I/O last year there is a wrong .dxf for the pour panel (pour_panel.dxf) uploaded. It doesn't fit the other parts dimension wise and has no corresponding tongues for the holes in the back panel. Probably an old design? Could you please upload the right file?
Thank you!

@darkfile
The original "pour_panel.dxf" is not wrong, it's just with Millimeters instead of inch as measurement unit.


Manually cache an url

Library Affected:
workbox-sw
Browser & Platform:
"all browsers".
Issue or Feature Request Description:
In sw-toolbox, I was able to manually cache any url like this:
Inside the sw.js:
self.addEventListener('message', function(event) {
   if (event.data && event.data.action === 'navigate') {
     caches.open(cacheName).then(function(cache) {
       var req = new Request(event.data.url);
       toolbox.cache(req.url);
     });
   }
 });

Then I could call anywhere:
navigator.serviceWorker.controller.postMessage({ action: 'navigate', url: '/about' });

Now using this example: https://workboxjs.org/examples/workbox-sw/ is there a way to do the same ?

Ok I found:
importScripts('https://unpkg.com/workbox-runtime-caching@0.0.2/build/importScripts/workbox-runtime-caching.dev.v0.0.2.js');

...

const custom = new workbox.runtimeCaching.RequestWrapper();
self.addEventListener('message', function(event) {
  if (event.data && event.data.action === 'navigate') {
    custom.fetchAndCache({ request: new Request(event.data.url) });
  }
});

The solution does not work in 3.0.0-beta

In general, you can use the Cache Storage API directly to accomplish this. The one Workbox-specific wrinkle is that you might want to get the name of the default runtime cache that Workbox uses when you don't specify your own cache name. You can get this in v3 via workbox.core.cacheNames.runtime.
So the equivalent to https://github.com/GoogleChrome/workbox/issues/807#issue-258338019 is:
self.addEventListener('message', event => {
   if (event.data && event.data.action === 'navigate') {
     // Just use the Cache Storage API directly,
     // and add to the default runtime cache:
     caches.open(workbox.core.cacheNames.runtime)
       .then(cache => cache.add(event.data.url));
   }
 });

We've got some info about this in the v3 preview docs at https://developers.google.com/web/tools/workbox/guides/configure-workbox#configure_cache_names

Let's add this to V3

Yes, it would be nice to have a public method for this, because initial resources loaded while web-worker is installing will not be added to the runtime cache before the second visit, so there is a need to send path for the landing-page and its page-specific assets manually into runtime-caching if you would like to offer them offline on next visit

@gerhardsletten if support lands I can immediately add to next-offline 🔥


Unit test fails using uiThread() inside doAsync()

I'm creating some unit tests for my Android app logic and I'm stuck trying to figure out how to make uiThread() work in them.
The code I have is very basic:
doAsync {
    // Update the DB

    uiThread {
        // Update LiveData
    }
}

and the error I'm getting is:
java.lang.ExceptionInInitializerError
	at org.jetbrains.anko.AsyncKt.uiThread(Async.kt:67)
...
Caused by: java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked. See http://g.co/androidstudio/not-mocked for details.
	at android.os.Looper.getMainLooper(Looper.java)
	at org.jetbrains.anko.ContextHelper.<init>(Async.kt:209)
	at org.jetbrains.anko.ContextHelper.<clinit>(Async.kt:208)
	... 12 more

Any idea how I can make this work?

just a wild a** guess, but perhaps InstrumentationRegistry.getInstrumentation().runOnMainSync { } would help?

Thanks for the answer @Ant8. In the end, I ended up moving to coroutines as I thought it was interesting to learn how to use them. I still had this issue in a different way (when using the UI constant that is used to run a coroutine on the main thread), so I created some custom code to use my own constant instead of UI so that I could override it in tests.
I hope your answer can help other people that are having this issue!


Add read_json to SessionContext

Related to #28.
MR adds functionality to read json files. I have added some tests cases (not all parameters are covered). Please let me know if the test cases are sufficient and/or if I should store the test data differently.
Example:
import datafusion
ctx = datafusion.SessionContext()
df = ctx.read_json("data.json")
df.show()

@larskarg It looks like there is a Python lint issue and also needs an upmerge

@andygrove
Upmerge done.
I did also run
flake8 --exclude venv --ignore=E501
black --line-length 79 --diff --check .

locally but didn't see any Python lint issues. Unfortunately, I cannot trigger the github workflow as a first-time contributor. Can you please point me to the python lint issue? Thanks.

🎉


Remove unnecessary checks in WebSocket08FrameDecoder (IDE highlighted)

First check frameOpcode != OPCODE_PING is removed because the code executed int the branch where frameOpcode <= 7, while OPCODE_PING is 9.
Second check frameOpcode != OPCODE_PING is removed because the above code has:
if (frameOpcode == OPCODE_PING) {
   ...
   return;
}

@doom369 thanks


Measure usage of Hot Reload

We can measure how often Hot Reload is used, how long it takes, and if it succeeded or not.
Some ideas:

ping when r is used by user, measure how long the reload took, and report "yes, reload finished" or "no, reload did not finish" (we'd like to know how often a user tries a reload, but can't reload due to something prohibiting it like a source change that isn't reloadable, so we can learn if users are making source changes that aren't reloadable)
ping when R is used. Similar to above.
report when a crash happens in the r or R code, from within the flutter tool or framework itself. This can answer "was the crash the fault of flutter?" Not sure if this is possible, but we'd like to know how stable this new feature is.

Can we measure a useful time from the reload process?

cc @johnmccutchan

I am ready to wire this up but I am unfamiliar with usage and analytics enough to know what I should report (and specifically how to report it).

@devoncarew would know.  We use package:usage last I knew.

@devoncarew Should I report using sendCommand or sendEvent or maybe startTimer. I have some other metadata that I would like to report with events as well. Any tips here are appreciated.

There's an art to it. A lot of it depends how you want to pull the data out on the reporting side.
We've been using the commands to indicate parts of the app the user is in - so the run (flutter run) command or the analyze (flutter analyze) command. I think for this case we'd want to map a reload action to an event, and probably double report it as well as a timer, so that we get some (aggregated) elapsed time numbers.

I'm pretty sure we're doing this now, no?  @johnmccutchan

Speculatively closing.  Please re-open if I'm mistaken.

We do this now! :)


Destroying the cookies after logout of user

I want to contribute in this issue, Please assign this to me.

I want to contribute.

There is no guarantee that the client would follow thru and delete the cookie.  The cookie needs to be managed from the server side which is already implemented.


Compile fix for Mac

LGTM

sigh this is "only" affecting tests, but let's make this a release-0_10 commit, in case we have another release later.


Fix for #3396 - Pull request conflict status not updating properly

Fix for #3396.  AddTestPullRequestTask needed to be called from PullRequest.Merge.

Thanks!