Visualize annotations using point pairs and transformation parameters to determine which is cleaner

If transform parameters seem cleaner make an experiment using those values in the cost

Also, have a look at the bounding box regression setting in the following papers:
http://arxiv.org/abs/1504.08083
http://arxiv.org/abs/1506.01497
They use x,y offsets and log-scale offsets too (4 values to predict). The cost function could also be implemented instead of just squared error as we currently have.

Added ground truth graphs to [this notebook](/notebooks/Test data trajectory analysis.ipynb). My supposition was wrong, transform parameters do not seem to be much cleaner than x,y pairs GT. First of all because the first x,y of the GT match the x,y of the transform params. What I saw was that "sometimes" when the scale does not change too much, the last x,y may be correlated to the first x,y. But  scales may be correlated between them "sometimes" if the object tends to keep its aspect ratio. The only way to know which parametrization is better is to perform experiments. Review the practices in the Fast-RCNN papers and apply what we consider relevant.


Not working anymore with 2.9.12

Hi!
I came across this repo after reading your blog post (https://adamlynch.com/preprocess-cypress-tests-with-vite/).
I'm really interested in having a working solution for vite + cypress + typescript, for a vue 3 project. This bit has been causing me some trouble. After trying your example, this seems not to work anymore.
Different types are not matching anymore, which make running the script as is impossible.
if(shouldWatch) {
    viteConfig.build!.watch = true; // expected type is now: WatcherOptions | null | undefined
}:

const watcher = await vite.build(viteConfig);
// watcher has now type: RollupOutput | RollupOutput[] | RollupWatcher
// which doesn't work with the rest of the logic

Have you considered making an update? :)
Edit:
Current version:

vite: 2.9.12
typescript 4.7.0
vue: 3.2.37

This sounds like you're getting TypeScript compilation errors and it would actually work at runtime, i.e. if your support/index.ts file was support/index.js then it would work. Either that or your TS setup is linting your support/index.js when it doesn't have to.
(In fact, yes I'm correct that it would run fine because I just tested this example project with 2.9.12 and it's ok)
If you really want a TypeScript support/index.ts file... I don't think the types have changed? For example, for the version this example uses (2.9.2), vite.build also returns RollupOutput | RollupOutput[] | RollupWatcher. If watch is enabled then it will return a RollupWatcher.
Aside from using // @ts-ignore, you can also work around this by updating any watcher.example( function calls to (watcher as RollupWatcher).example( or you can create a new variable (e.g. const rollupWatcher = watcher as RollupWatcher; and use that when calling rollupWatcher.example(.
For viteConfig.build.watch, you can change this to {} to satisfy the type.
Please correct me if wrong.
I'm not planning on keeping this project up-to-date forever to be honest but feel free to submit a pull-request with an (additional) support/index.ts file once you get this running for you.
P.S. I see you mention that it's a Vue project. You should know that you can use Cypress 10 for Vue component tests and not need a setup like this example project shows.


Minor updates to form-related components.

Issue numbers: #273 and #261
This PR does the following:

Adds some changes so I could get Label, Input, HelperErrorText, and Checkbox to work in the Library Card app. Specifically:

The HelperErrorText component wasn't exported.
The Library Card app uses refs to focus on input elements for specific errors. So if there are 10 input elements on the page and the 6th one has an error because the email (for example) is invalid, the app creates a dynamic anchor error link to that input. But this doesn't seem to work if the Input component doesn't implement forwardRef to pass down the ref but not as a prop.
Used the attributes prop in the Input component.
Fixed the issue with the prop table not showing up in the "Info" tab in Storybook. The webpack config was removed...
Updated the stories for some of the components.

Let me know if I'm missing anything else for this PR. I'll create a draft PR in the Library Card app that uses these changes.
Front End Review:

[ ] View the example in Storybook

I pushed another commit that also adds the forwardRef implementation to the Checkbox component.

The Library Card PR using this change is up: https://github.com/NYPL/nypl-library-card-app/pull/48
Whenever both can be reviewed, that'd be great.


can anyone verify on custom-domains.qwilr.com

qwilr.com

coming across a subdomain I found this and created an account on qwilr.com but it required a business account to add a custom domain. https://app.qwilr.com/#/settings/subdomain here you see the settings for adding a custom domain

test


Deprecate SV_IsFrontFace as a geometry shader output

After several internal/offline discussions about this, I've come to the conclusion that this is the right change to make. I'm not sure how this particular "feature" came to be, but it seems that it was only ever supported by the compiler. Here's my case:
The D3D11 functional spec indicates that the only case where it is valid to output a "system generated value" is primitive ID, in the DXBC documentation for declaring an output system generated value.. It specifically uses "IsFrontFace" as an example of something that is invalid:

This may seem odd, because the System is supposed to "generate" a System Generated Value.  But the purpose for this declaration is to allow a shader that inputs a System Generated Value to still be used in a scenario where a Shader Stage before it is activated, where the earlier Stage inputs the System Generated Value expected by the later stage.  The earlier Stage can output the value to the later Stage (or it could make up its own value regardless of what the actual System Generated Value is), and pass that down to the later stage.  It turns out the only System Generated Value this applies to is PrimitiveID, when passed from GS to PS.
...
A System Generated Value cannot be output from a Stage that is before the place in the pipeline where the hardware would normally generate the value.  e.g., a Geometry Shader cannot output "IsFrontFace", and a VS cannot output "PrimitiveID".  The only stage that can sensibly output a System Generated Value is the Geometry Shader output of PrimitiveID to the Pixel Shader.

The only place in all of the D3D specs and documentation I can find where this feature is mentioned is on the HLSL semantics doc page:

System-Value Semantic
Description

SV_IsFrontFace
Specifies whether a triangle is front facing. For lines and points, IsFrontFace has the value true. The exception is lines drawn out of triangles (wireframe mode), which sets IsFrontFace the same way as rasterizing the triangle in solid mode. Can be written to by the geometry shader, and read by the pixel shader.

There's no indication what the expected behavior should be, and given that SV_IsFrontFace is supposed to be a system-generated value, and not system-interpreted, it seems the only valid behavior would be for forwarding an already-generated value; but as discussed in the DXBC documentation linked above, the only stage which can receive this generated value is the pixel shader.
From skimming the WARP implementation, I see that it would not handle forwarding this value correctly. The SV_IsFrontFace value received in the pixel shader will always come from the rasterizer. Given that, plus some additional searching, I can find no test collateral which would attempt to validate behavior of outputting this value from a geometry shader. On top of all of this, a look at similar APIs across the industry reveal that neither GLSL nor SPIR-V (and by extension, GL and VK) have a similar construct.
So, this seems to have simply been a mistake, perhaps a simple copy/paste error in an old HLSL spec that was used to implement FXC's behavior, or a feature that was proposed but then was supposed to be cut, but FXC was never updated to remove it. This apparent mistake has carried forward into DXC. That said, I see no reason to continue supporting it, as it seems apparent that the hardware doesn't actually support this functionality. I propose that it should be invalid to specify this system value as a GS output, for future shader models at least, but I see no reason to continue to support this in current shader models either.

To do here:

make sure that the semantics spec in clang handles this correctly
figure out when / if we want to make a change to DXC to bring it in line with the spec.


not enough arguments error

the 4th argument is extraHeaders

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

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

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

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

This PR isn't necessary.  Please godep restore to get the updated azure driver.


Taken picture get shifted to the left

Is this bug resolved? Can anyone help me with this?

this is not a bug but the issue is its taking bit more part of framelayout apart from showing in frame or window of screen at time of capturing image and its also taking that part in image also and that is why main image has little bit more width compare to it shows in cameraview at time of click or capture image

@neelmevada But how to solve it？My app require exactly what preview.

Did anyone solve this issue? I'vee the same issue too?

+1


How do I disable an item inside the carousel wrapper div?

Hi all
Everything inside the owl-carousel wrapper turns into an item, works good, but how can I disable an element (in this instance, the ) so the carousel ignores it and doesn't create a new slide?
Example:

Back..

Slide 1

Slide 2

Slide 3

The above creates 4 slides, I only want 3 and need the span to be ignored. Is this possible without pulling it from the container?
Thanks, Barry

You an do this if you wrap your slides in another div and use the nestedItemSelector property.
NOTE: nestedItemSelector would be the selector of the slides, not the container.
Example HTML:

  Back..

Slide 1

Slide 2

Slide 3

Example JS:
  $('.owl-carousel').owlCarousel({ nestedItemSelector: 'slide' });

Thank you! Been trying to figure this out for over a week now, much appreciated Greg :)


Pre-cache Cluster Sizing Recommendations?

Hi,
Is it possible to somehow pre-cache the Cluster Sizing Recommendations (and other) pages?  Sometimes they are very slow to come up. I assume it's rebuilding the information.  This isn't the sort of data that needs to be up to the minute fresh (for us at least), so if it just updated itself in the background and showed whatever the last result was, that would be fine and improve the user experience substantially.
Thank you
Dan
gz#1679

Related: https://github.com/kubecost/cost-model/issues/1165

@DanTulovsky Thank you for the suggestion. We have several performance and caching improvements in the works which should improve the UI performance.
Jason

@kaelanspatel is working on exactly that! We'll be computing this data from our ETL cache of prometheus metrics starting in v1.93

However, when recording rules are available this should be reasonably fast on my clusters... something else may be going on here.

Yeah, if recording rules are available I tend to agree-- couple more notes on slowness here: https://github.com/kubecost/cost-model/issues/1165#issuecomment-1102830786

How fast is reasonably fast? It seems to take 2 min right now..

I would call < 15 seconds reasonably performant. Sounds like we have a major improvement here.

This issue is being closed because it may not be relevant to the OpenCost project and appears stale. If you feel this was closed in error, please open a new OpenCost issue with updated details or if it is still relevant for Kubecost please open an issue with Kubecost Support.


chore(main): release 0.4.2

:robot: I have created a release beep boop
0.4.2 (2024-12-08)
Bug Fixes

update dependencies manually (9cf7907)
update dependencies manually (#99) (d76fb61)
Update renovate references to 3.21 (b9fb671)
Update renovate references to 3.21 (#97) (5110ad3)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

0.4.2
:sunflower:


Implement std::error::Error to ease type erasure

Box::from(...) is implemented by default for anything that
implements Error, and ? uses from by default, making this handy for
anything dealing with multiple error types.

Since CI targets 1.24.0, implement the soft-deprecated description()
Implementing Error requires implementing Display.
Also ignore warnings about not using &dyn Debug while we're at it.

I wanted to go the opposite direction and have it be no_std, but we could probably put this behind a feature flag if so.
I'll let this sit a bit and think on it


[Workflow] Add a non-generic Register method that takes a Type.

Describe the feature
All workflows and activities need to be registered.  The current way to do that is by manually adding each of them using the RegisterWorkflow<> or RegisterActivity<> methods respectively.   Having to add workflows and activities is tedious and error prone.
A welcome addition would be a Register method that takes a Type and determines at runtime if it is a workflow or an activity, registering it if it passes all of the necessary checks.
This will allow people to do is easily reflect on the assembly and find the workflows and activities and register their types.
Since this only happens once at service startup, performance isn't a goal here.
Release Note

RELEASE NOTE:

@clintsinger There's been a bit of a recent shift away from reflection-based registration as it slows down the startup time of the application (as reflection is heavy, it's done only at runtime and it keeps you from easily trimming the assembly).
My own projects contain dozens of registrations and I was finding myself spending more time removing duplicates and adding missing registrations (errors caught only at runtime) than I cared to.
Rather, a few weeks ago, I open sourced a project through my company that implements a project-wide Metalama aspect to do a compile-time analysis of your project to identify any types that implement either Workflow or WorkflowActivity from the Dapr.Workflow namespace. It introduces a static class that you can use as a method group in the typical workflow registration method and with that, you don't ever have to maintain a list of all the types you want to register - they'll be automatically identified and included with each rebuild.
In other words, where today you might write something like this:
builder.Services.AddDaprWorkflowClient();

builder.Services.AddDaprWorkflow(options => {
  options.RegisterWorkflow<OrderProcessingWorkflow>();

  options.RegisterActivity<NotifyActivity>();
  options.RegisterActivity<ReserveInventoryActivity>();
  options.RegisterActivity<ProcessPaymentActivity>();
});

You instead need only include:
builder.Services.AddDaprWorkflowClient();

builder.Services.AddDaprWorkflow(DaprRegistrationHelper.RegisterAllEntities); //That's it!

And it'll Just Work and without all the reflection downsides.


More than 16 PMP registers

Some RISC-V users have requested more than 16 PMP registers.  We can fit another 48 in CSR address ranges 0x3A4-0x3AF and 0x3B0-0x3DF.
One hitch is that the current spec says that, if any PMP registers are supported, all of the PMP registers must be readable, even if hardwired to 0.  Obviously this statement needs to be amended if more PMP registers are added, or it would invalidate existing implementations.  We could just amend the spec to say that any number of PMP registers may be implemented, and some of those might be hardwired to 0.  Or require they be expanded in groups of 16, while still allowing some to be hardwired to 0.

to say that "any number of PMP registers may be implemented, and some of those might be hardwired to 0" isn't backwards compatible, but if no existing firmware touches those upper 48, and no one uses them as custom CSRs (they shouldn't be...) it doesn't matter. Another option is to say if any are implemented above 16, then all 48 are implemented. From a HW cost point of view, once you've defined any CSR as being all zero, the cost of implementing all of the upper 48 as all zero is negligible, just a few gates at most.  In hindsight, it probably would have been easier for both HW and SW to say that they're always implemented but could be hardwired 0.

Right, I guess I was implying that it’s a benign backwards incompatibility. Maybe it’s not. I’m fine with your alternate formulation (if any of the upper 48 are implemented, all are).

So the idea is to simply extend the CSRs to fit another 48?

@aswaterman: This can be closed, right?


refactor: move pkg to correct places

Signed-off-by: Allen Sun<EMAIL_ADDRESS>
Ⅰ. Describe what this PR did
When I am learning the structure of package pkg, I find that there are at least three packages which should be moved out of it:

client
quota
runconfig

Here is my reason:
we usually keep totally general packages in package pkg, while three packages above are something specific, client is for control server or something like that, quota for filesystem quota for container, and runconfig is for pouch container's some kind of config parameter.
I wish we could add a folder which is named storage, then some structure may be like:
storage:
     \___volume
      \__quota
       \_ controlserver
                 \_client

Actually I am afraid the package name of client is not my dishes. Like the code makes me feel confused:
return client.JoinURL(c.BaseURL, types.APIVersion, client.StoragePath)

Here, I think client is a struct instance, however it is a package. So hard to understand and quite awkward.
Ⅱ. Does this pull request fix one issue?

fix https://github.com/alibaba/pouch/issues/1051
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #1147 into master will increase coverage by 0.38%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1147      +/-   ##
==========================================
+ Coverage   15.19%   15.58%   +0.38%
==========================================
  Files         173      173
  Lines        9705     9817     +112
==========================================
+ Hits         1475     1530      +55
- Misses       8125     8178      +53
- Partials      105      109       +4

Impacted Files
Coverage Δ

apis/opts/memory_swappiness.go
100% <ø> (ø)

apis/opts/cpu.go
0% <ø> (ø)

daemon/mgr/container.go
0% <ø> (ø)
:arrow_up:

apis/opts/devicemappings.go
95.55% <ø> (ø)

daemon/mgr/spec_devices.go
0% <ø> (ø)
:arrow_up:

apis/opts/oom_score.go
0% <ø> (ø)

apis/opts/spec_annotation.go
60% <ø> (ø)

apis/opts/mountpoint.go
84.61% <ø> (ø)

cli/update.go
0% <ø> (ø)
:arrow_up:

storage/controlserver/client/httpcli.go
0% <ø> (ø)

... and 21 more

LGTM


Integration test fixes

just so we can discuss

closes #43
implements part of #44 (see comment on #44 as to what remains)
flags the places where work is needed for #48


Artifact rename

Renamed artifact spring-boot-vaadin => spring-vaadin-boot
All Spring Vaadin artifacts start with spring-vaadin-* except the spring-boot-vaadin.

It was just an idea. I will close it.


Allow [String: [String]] dictionaries to be resultant of parsing URL-encoded strings

…rather than [String: String] dictionaries where multiple values for keys are comma-separated.

Description

A urlDecodedFieldMultiValuePairs() method is added to String alongside the existing urlDecodedFieldValuePairs(). Additionally, a BodyParserMultiValue class is added as a subclass of the existing BodyParser class. (Both of these are kind of ugly since the existing code isn't written to be flexible in this regard…)
Motivation and Context

I had a PR at https://github.com/IBM-Swift/Kitura/pull/1237 that would replace existing code related to decoding URL-encoding GET query strings and POST bodies so that foo=bar&foo=baz would result in ["foo": ["bar", "baz"]] rather than ["foo": "bar,baz"] as is the current behavior. As this would break pretty much all existing sites that handle such things, @ianpartridge asked me to try again in a way that wouldn't cause breakage. This is the result.
From the other PR:

The code that decodes the URL encoding to create these dictionaries is in String+Extensions.swift.
Consider a form such as:

What are your favorite pizza toppings?

<form method="get">
  <input type="checkbox" name="toppings" value="extraCheese" />Extra cheese
  <input type="checkbox" name="toppings" value="pepperoni" />Pepperoni
  <input type="checkbox" name="toppings" value="pineapple" />Pineapple
  <input type="checkbox" name="toppings" value="anchovies" />Anchovies
  <input type="submit" />
</form>

If you were to select both "Extra cheese" and "Pineapple," the resulting URL-encoded string would look something like toppings=extraCheese&toppings=pineapple. So there are two values for the same key.
However, Kitura will only allow a single string value for each key. So Kitura works around this by using a comma to concatenate all of the values. The result is that request.queryParameters["toppings"] will be "extraCheese,pineapple".
I don't like this. For one, it makes it impossible to simply count how many values you have for a key without doing something like .split(separator: ",").count. For another, what if a value itself has a comma? Now we're in painful territory.

With this PR, request.queryParametersMultiValues can be used in place of request.queryParameters to get values for a key as a [String]. Similarly, for POST forms, the following can be done:
router.post("/submit", middleware: BodyParserMultiValue()) // instead of BodyParser()
router.post("/submit") { request, response, next in
    if let postValues = request.body?.asURLEncodedMultiValue { // instead of .asURLEncoded
        // postValues is a [String: [String]] now

How Has This Been Tested?

Test cases have been added for both GET and POST requests.
Checklist:

[ ] If applicable, I have updated the documentation accordingly.
[x] If applicable, I have added tests to cover my changes.

Codecov Report

Merging #1238 into master will decrease coverage by 0.23%.
The diff coverage is 73.17%.

@@            Coverage Diff             @@
##           master    #1238      +/-   ##
==========================================
- Coverage   89.07%   88.84%   -0.24%
==========================================
  Files          38       38
  Lines        2280     2313      +33
==========================================
+ Hits         2031     2055      +24
- Misses        249      258       +9

Flag
Coverage Δ

#Kitura
88.84% <73.17%> (-0.24%)
:arrow_down:

Impacted Files
Coverage Δ

Sources/Kitura/RouterRequest.swift
90.12% <ø> (ø)
:arrow_up:

Sources/Kitura/bodyParser/ParsedBody.swift
93.33% <100%> (+1.66%)
:arrow_up:

Sources/Kitura/bodyParser/BodyParser.swift
77.38% <60%> (-3.78%)
:arrow_down:

...urces/Kitura/bodyParser/URLEncodedBodyParser.swift
66.66% <66.66%> (ø)
:arrow_up:

Sources/Kitura/String+Extensions.swift
89.28% <78.57%> (-1.63%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 661fc8a...13ac0cf. Read the comment docs.

Pushed tweaks to avoid force unwrapping as per @djones6 's concerns. (Thanks to ch1ck3n in #swift-lang (Freenode) for reminding me of the default trick.)
Perf tested again under similar circumstances:
> wrk -t8 -c100 -d1m 'http://localhost:8080/?foo=bar&baz=qux&multival=123&multival=234'
Running 1m test @ http://localhost:8080/?foo=bar&baz=qux&multival=123&multival=234
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     8.57ms    6.65ms 191.45ms   97.70%
    Req/Sec     1.50k   107.23     2.29k    74.62%
  715253 requests in 1.00m, 137.79MB read
Requests/sec:  11907.66
Transfer/sec:      2.29MB

Huh, so that's actually faster than my test with the unpatched code base, which doesn't make sense unless the speed change is actually negligible and all these results are just falling within a margin of error.

@NocturnalSolutions There is a fair margin of error with this sort of testing - your best and worst results are 2% apart, which I'd say is inconclusive based on a single execution of each test.
A way to get around that is to execute each test multiple times (before, after, before, after...) and compare the average of the befores with the average of the afters.
The test itself that you are performing looks fine, but I'd say an equally interesting case would be where you have no multi values at all:  the new code creates an empty array, appends a single element, then invokes .joined on the single-element array.  (I don't know what degree of fast paths the stdlib / compiler apply in this case).
I'd also expect that the level of regression a change like this could cause to a Kitura workload is very small - this is small fry considering the total cost of reading/writing to the socket, constructing the Request, Response objects, HTTP parsing, headers container and all the other bits and bobs involved in serving a request.
If we want to measure which approach is faster, for the sake of interest, then you could extract the before/after code into a standalone testcase and time it running in a loop.
Oh, one other (crucial) detail: make sure you compile with swift build -c release (or swiftc -O for simple scripts) when comparing performance: release mode enables compiler optimizations that are not applied to the default (debug) build, which can dramatically affect a comparison.

Okay, here's some results from going back-and-forth between patched and unpatched packages and testing in between, and using that -c release bit (which made a rather significant difference). The command run this time was http://localhost:8080/?foo=bar&baz=qux&multival=123 - so no actual multiple value GET parameter this time. Also, unlike my previous testing, I didn't quit all my other Mac apps besides Terminal this time.
Before results:
Running 1m test @ http://localhost:8080/?foo=bar&baz=qux&multival=123
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.15ms   12.03ms 230.47ms   94.67%
    Req/Sec     2.44k   319.24     4.05k    78.81%
  1164897 requests in 1.00m, 219.96MB read
Requests/sec:  19390.12
Transfer/sec:      3.66MB

Running 1m test @ http://localhost:8080/?foo=bar&baz=qux&multival=123
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.69ms   13.80ms 255.25ms   94.61%
    Req/Sec     2.37k   371.07     4.00k    84.33%
  1134102 requests in 1.00m, 214.15MB read
Requests/sec:  18876.50
Transfer/sec:      3.56MB

  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.81ms   14.81ms 234.57ms   94.50%
    Req/Sec     2.45k   298.84     4.76k    76.06%
  1169577 requests in 1.00m, 220.85MB read
Requests/sec:  19468.90
Transfer/sec:      3.68MB

Average req/sec: 19,245.17
After patching:
Running 1m test @ http://localhost:8080/?foo=bar&baz=qux&multival=123
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.38ms   12.23ms 235.99ms   95.33%
    Req/Sec     2.25k   316.03     6.98k    82.35%
  1074179 requests in 1.00m, 202.83MB read
Requests/sec:  17883.98
Transfer/sec:      3.38MB

Running 1m test @ http://localhost:8080/?foo=bar&baz=qux&multival=123
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.86ms   10.57ms 224.09ms   95.64%
    Req/Sec     2.31k   310.92     3.68k    81.40%
  1102305 requests in 1.00m, 208.15MB read
Requests/sec:  18356.73
Transfer/sec:      3.47MB

Running 1m test @ http://localhost:8080/?foo=bar&baz=qux&multival=123
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.89ms   13.85ms 225.28ms   94.38%
    Req/Sec     2.33k   304.64     4.25k    77.88%
  1113263 requests in 1.00m, 210.21MB read
Requests/sec:  18535.43
Transfer/sec:      3.50MB

Average req/sec: 18,258.71
Just as an aside, I know this is an artificial test with no real network use, but still, over 18 thousand requests per second on my oldish MBP? That's an unimaginably big number to me, and I don't think I could get similar numbers with a PHP-based stack on the same hardware without a lot more work. Great job, Swift and Kitura teams!

I ran some measurements on a Linux machine locally with the same route as @NocturnalSolutions - there is regression, the amount of regression depends on the query params specified but is surprising:

No query params:  no regression (70.8k vs. 70.9k)
?a=b:  2% regression (43.9k vs. 44.8k)
?a=b&c=d&a=c&a=d:  3% regression (30.3k vs. 31.3k)
?a=b&a=c&a=d&a=e&a=f&a=g&a=h&a=i&a=j&a=k:  1.5% regression (21k vs. 21.3k)
?a=b&c=d&e=f&g=h&i=j&k=l&m=n&o=p&q=r&s=t: 6% regression (17.6k vs. 18.7k)

The regression increases with the number of distinct query params:  a single query param with 10 values shows only 1.5% regression, whereas 10 query params each with a single value regresses by 6%.
I'm particularly surprised that this code could cause such a significant regression, but it does indicate that going via urlDecodedFieldMultiValuePairs is substantially more expensive for single value params than the existing code.  As a quick experiment, I tried replacing the values.joined(separator:) with values.first but this made no measurable difference to the 6% case above,  so it seems the whole cost is in building the intermediate array representation while computing urlDecodedFieldMultiValuePairs.
For this reason I think it would be worth the extra bit of code duplication to maintain the two as independent functions to avoid the regression for the common case (single value params).

Okay, pushed a change to duplicate the code in the relevant part. (I also gave up on trying to get the encoding/decoding bit in KituraContracts to play along. I don't think I had that working 100% in the first place. At any rate, I guess it can be saved for another day. So now you don't have to also patch KituraContracts to test this stuff.) I think there's deduplication that can be done in other ways, but for now, at commit 2e119e3, with wrk -t8 -c100 -d1m 'http://localhost:8080/?foo=bar&baz=qux&multival=123&a=b&c=d&e=f&g=h&i=j&k=l&mno=pqrst' , I get 10,841.50 reqs/sec before the patch and 11,060.16 reqs/sec after - probably due to statistical noise.

Ah, that's better. Before: 11154.13, after: 11132.90.

Ah, that's better. Before: 11154.13, after: 11132.90.

@djones6 any further thoughts on this?

I confirmed on Linux that this is now performance-neutral, so from that perspective I think it is fine to go ahead.


Linear Gradient fill with stops

Support more than 2 colors into gradients

Currently both linear and radial gradient supports only two colors, would be good to have more than two

use this glsl
uniform float windowHeight;
uniform vec2  gradientStartPos;
uniform vec2  gradientEndPos;
uniform int   numStops;
uniform vec4  colors[16];
uniform float stops[16];
void main() {
float  alpha = atan( -gradientEndPos.y + gradientStartPos.y, gradientEndPos.x - gradientStartPos.x );
float  gradientStartPosRotatedX = gradientStartPos.x*cos(alpha) - gradientStartPos.y*sin(alpha);
float  gradientEndPosRotatedX   = gradientEndPos.x*cos(alpha) - gradientEndPos.y*sin(alpha);
float  d = gradientEndPosRotatedX - gradientStartPosRotatedX;

float y = windowHeight - gl_FragCoord.y;
float x = gl_FragCoord.x;
float xLocRotated = x*cos( alpha ) - y*sin( alpha );

gl_FragColor = mix(colors[0], colors[1], smoothstep( gradientStartPosRotatedX + stops[0]*d, gradientStartPosRotatedX + stops[1]*d, xLocRotated ) );
for ( int i=1; i<numStops-1; ++i ) {
    gl_FragColor = mix(gl_FragColor, colors[i+1], smoothstep( gradientStartPosRotatedX + stops[i]*d, gradientStartPosRotatedX + stops[i+1]*d, xLocRotated ) );
}

}

how to integration this to nanovg?

See https://github.com/memononen/nanovg/blob/master/src/nanovg_gl.h#L637
d goes from 0.0 to 1.0 for the gradient.
I decided not to have multiple gradient stops, since the shader is already very complex for weaker GPUs, like iPhone etc.

thanks
iPhone's gpu is powerful
i see many vector graphics app have multiple gradient stops
and ios has a built-in multiple gradient stops

it's too hard to integrate the multiple gradient stops to the nanovg

It's simple using texture instead of shader. Working solution: https://github.com/lieff/lvg/blob/master/render/render_nanovg.c#L14

thanks a lot


ValueNotifier not disposed when dragging  cupertino text field

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce

remove notDisposedAllowList from the test Can double tap + drag to select word by word in test/cupertino/text_field_test.dart`.
See test reporting one undisposed ValueNotifier<_OverlayEntryWidgetState?>

PR that adds leak tracking for said test: #135804
Expected results
The Cupertino text field should not leak.
Actual results
The test fails
notDisposed:
      total: 1
      objects:
          ValueNotifier<_OverlayEntryWidgetState?>:
               test: Can double tap + drag to select word by word
               identityHashCode: 823061609

Code sample
Other tests that would fail when converted with testWidgetsWithLeakTracking:

Can move cursor when dragging, when tap is on collapsed selection (iOS) - multiline
Can move cursor when dragging, when tap is on collapsed selection (iOS)
Can move cursor when dragging (Android)

This leads me to believe the issue is related to dragging on the text field.
Flutter Doctor output
Doctor output
[!] Flutter (Channel [user-branch], 3.14.0-14.0.pre.461, on Garuda Linux 6.5.4-zen2-1-zen, locale en_US.UTF-8)
    ! Flutter version 3.14.0-14.0.pre.461 on channel [user-branch] at /home/derdilla/Coding/Flutter/flutter/flutter/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository https://github.com/NobodyForNothing/flutter is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to https://github.com/NobodyForNothing/flutter to dismiss this error.
    • Framework revision 2cc47574a9 (6 days ago), 2023-09-24 19:28:57 +0200
    • Engine revision e4bfdc1a67
    • Dart version 3.2.0 (build 3.2.0-190.0.dev)
    • DevTools version 2.28.0-dev.12
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc3)
    • Android SDK at /home/derdilla/Android/Sdk
    • Platform android-34, build-tools 34.0.0-rc3
    • ANDROID_HOME = /home/derdilla/Android/Sdk
    • Java binary at: /home/derdilla/bin/apps/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 16.0.6
    • cmake version 3.27.6
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2023.1)
    • Android Studio at /home/derdilla/bin/apps/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] Android Studio (version 2022.3)
    • Android Studio at /home/derdilla/.local/share/JetBrains/Toolbox/apps/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
    • IntelliJ at /home/derdilla/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
    • Flutter plugin version 75.1.4
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Garuda Linux 6.5.4-zen2-1-zen
    • Chrome (web)    • chrome • web-javascript • Chromium 117.0.5938.132 Arch Linux

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Hi @NobodyForNothing
I can reproduce this on the latest stable but it seems to be fixed on master as the linked PR has been merged, right? If so, is this safe to close?

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.13.6, on macOS 14.0 23A344 darwin-x64, locale en-VN)
    • Flutter version 3.13.6 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ead455963c (5 days ago), 2023-09-26 18:28:17 -0700
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 32.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio Giraffe.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio Giraffe.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.82.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.0 23A344 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 117.0.5938.132

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[!] Flutter (Channel master, 3.15.0-13.0.pre.40, on macOS 14.0 23A344 darwin-x64, locale en-VN)
    • Flutter version 3.15.0-13.0.pre.40 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 71acf24201 (3 hours ago), 2023-10-02 01:45:02 +0200
    • Engine revision 10b930ad1a
    • Dart version 3.2.0 (build 3.2.0-220.0.dev)
    • DevTools version 2.28.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 32.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio Giraffe.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio Giraffe.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.82.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.0 23A344 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 117.0.5938.132

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Theblinked PR does not fix the issue. It only marks the leak, the issue still persists when you remove the notDisposedAllowlist.
My reason for adding the allow list was to ensure no further leaks occur.

Could you share the modified test to reveal the leak? I ran the below test but can't reproduce it:

Sample test
  testWidgetsWithLeakTracking(
    'Can double tap + drag to select word by word',
    (WidgetTester tester) async {
      final TextEditingController controller = TextEditingController();

      await tester.pumpWidget(
        CupertinoApp(
          home: CupertinoPageScaffold(
            child: CupertinoTextField(
              dragStartBehavior: DragStartBehavior.down,
              controller: controller,
            ),
          ),
        ),
      );

      const String testValue = 'abc def ghi';
      await tester.enterText(find.byType(CupertinoTextField), testValue);
      await tester.pumpAndSettle(const Duration(milliseconds: 200));

      final Offset ePos = textOffsetToPosition(tester, testValue.indexOf('e'));
      final Offset hPos = textOffsetToPosition(tester, testValue.indexOf('h'));

      // Tap on text field to gain focus, and set selection to '|e'.
      final TestGesture gesture = await tester.startGesture(ePos);
      await tester.pump();
      await gesture.up();
      await tester.pump();

      expect(controller.selection.isCollapsed, true);
      expect(controller.selection.baseOffset, testValue.indexOf('e'));

      // Here we tap on '|e' again, to register a double tap. This will select
      // the word at the tapped position.
      await gesture.down(ePos);
      await tester.pumpAndSettle();

      expect(controller.selection.baseOffset, 4);
      expect(controller.selection.extentOffset, 7);

      // Drag, right after the double tap, to select word by word.
      // Moving to the position of 'h', will extend the selection to 'ghi'.
      await gesture.moveTo(hPos);
      await tester.pumpAndSettle();

      // Toolbar should be hidden during a drag.
      expect(find.byType(CupertinoButton), findsNothing);
      expect(controller.selection.baseOffset, testValue.indexOf('d'));
      expect(controller.selection.extentOffset, testValue.indexOf('i') + 1);

      // Toolbar should re-appear after a drag.
      await gesture.up();
      await tester.pump();
      expect(find.byType(CupertinoButton), isContextMenuProvidedByPlatform ? findsNothing : findsNWidgets(4));
    },
		leakTrackingTestConfig: LeakTrackingTestConfig.debugNotDisposed()
  );

Test code
testWidgetsWithLeakTracking(
    'Can double tap + drag to select word by word',
    (WidgetTester tester) async {
      final TextEditingController controller = TextEditingController();
      addTearDown(controller.dispose);

      await tester.pumpWidget(
        CupertinoApp(
          home: CupertinoPageScaffold(
            child: CupertinoTextField(
              dragStartBehavior: DragStartBehavior.down,
              controller: controller,
            ),
          ),
        ),
      );

      const String testValue = 'abc def ghi';
      await tester.enterText(find.byType(CupertinoTextField), testValue);
      await tester.pumpAndSettle(const Duration(milliseconds: 200));

      final Offset ePos = textOffsetToPosition(tester, testValue.indexOf('e'));
      final Offset hPos = textOffsetToPosition(tester, testValue.indexOf('h'));

      // Tap on text field to gain focus, and set selection to '|e'.
      final TestGesture gesture = await tester.startGesture(ePos);
      await tester.pump();
      await gesture.up();
      await tester.pump();

      expect(controller.selection.isCollapsed, true);
      expect(controller.selection.baseOffset, testValue.indexOf('e'));

      // Here we tap on '|e' again, to register a double tap. This will select
      // the word at the tapped position.
      await gesture.down(ePos);
      await tester.pumpAndSettle();

      expect(controller.selection.baseOffset, 4);
      expect(controller.selection.extentOffset, 7);

      // Drag, right after the double tap, to select word by word.
      // Moving to the position of 'h', will extend the selection to 'ghi'.
      await gesture.moveTo(hPos);
      await tester.pumpAndSettle();

      // Toolbar should be hidden during a drag.
      expect(find.byType(CupertinoButton), findsNothing);
      expect(controller.selection.baseOffset, testValue.indexOf('d'));
      expect(controller.selection.extentOffset, testValue.indexOf('i') + 1);

      // Toolbar should re-appear after a drag.
      await gesture.up();
      await tester.pump();
      expect(find.byType(CupertinoButton), isContextMenuProvidedByPlatform ? findsNothing : findsNWidgets(4));
    },
    // TODO(derdilla): remove after fixing and leak track other failing tests in
    // this file. https://github.com/flutter/flutter/issues/135803
  );

Thanks but your given test is successful on the latest master channel (3.15.0-13.0.pre.40). Can you retry on master channel?
✓ Can double tap + drag to select word by word

Hi @huycozy.
Please try to run the test from the terminal: flutter test 'test/cupertino/text_field_test.dart'.

@polina-c, do you know why running a test from IDE doesn't reveal the leak, but running from the terminal does?
https://github.com/flutter/flutter/assets/30288967/2fb0aff1-3b52-43aa-9049-90ca24dc53e3

Good question. Do you have latest version of flutter and latest version of leak_tracker?
Try to run flutter -update-packages.
I recently issued fox to make leak detection less flaky.
Another thing: running from IDE may say the test passed, but then show failure for tearDownAll.
Leak collection happens for all tests together for performance goals.

Good question. Do you have latest version of flutter and latest version of leak_tracker? Try to run flutter -update-packages. I recently issued fix to make leak detection less flaky.
Another thing: running from IDE may say the test passed, but then show failure for tearDownAll. Leak collection happens for all tests together in tearDownAll for performance goals.

Yep, I have the latest version of the dependencies.
Running all tests together from the IDE reveals the leak. But it is strange that IDE highlights the wrong test.
https://github.com/flutter/flutter/assets/30288967/0759a78c-71bd-44b7-92d2-be3eca0ccbd0

@polina-c  I am also not able to see the leaks while running from android studio ide.
https://github.com/flutter/flutter/assets/41873024/5e8ad09f-2ca3-4c41-bde2-6306bcb686a8

@ksokolovskyi , @droidbg
Flakiness is a bad thing, because it means bots may eventually start failing for master branch, when tests are randomized in a certain way.
To start working on the problem, we need repro steps that do not involve IDE, command line only.
If we could find them, it would be reason to create a separate issue.
For experiments you can use parameter --plain-name to run just one test.
Or you can use parameter --test-randomize-ordering-seed=20230817, passing different dates.


Pass Output type to Submission in onSubmit

Hello,
I apply this patch on my projects and i think it can be useful.
Make context.submission aware of the Output type.
Now we should be able to have intellisense with onSubmit context param.
Ex:
onSubmit(event, context) {
   // it has type
    if (context.submission.value?.step === "send-otp") {
        // do something
    }
},

Hi @rphlmr, thanks for the PR. I would love to improve the types here but your change is not accurate because there would be default submission object returned even when you didn't provide an onValidate handler.
To fix it, we might need to introduce an additional generic to capture the submission returned by the onValidate handler or some other adjustment on this behaviour.

This should be fixed on v1 as it will not returns a default submission anymore. Thanks!


Octomap does not update dynamically

Description
I'm working with a 6 DOF robotic arm in MoveIt2 using ROS 2 Foxy. I'm successfully visualizing the occupancy map of obstacles generated by Octomap in RViz, but I'm facing difficulties in achieving dynamic obstacle avoidance. The map is only updated when the robot is stationary, and if a dynamic obstacle appears in the arm's trajectory during execution, the arm continues its movement without stopping. I've tried enabling the replanning option, but it doesn't seem to address the issue. Could someone please suggest a solution or provide guidance on how to implement dynamic obstacle avoidance in MoveIt2 using Octomap?

My sensors_3d.yaml file is configured as follows:
sensors: ["zed2_handlerbot"]
zed2_handlerbot:
    sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater
    point_cloud_topic: /zed2i_filtered_pointcloud
    max_range: 2.0
    point_subsample: 4
    padding_offset: 0.0
    padding_scale: 1.0
    max_update_rate: 2.0
    filtered_cloud_topic: filtered_cloud

My move_group.launch file has the following configuration:
octomap_config = {'octomap_frame': 'zed2i_left_camera_frame',
                  'octomap_resolution': 0.05,
                  'max_range': 2.0}
run_move_group_node = Node(
        package="moveit_ros_move_group",
        executable="move_group",
        output="screen",
        parameters=[
            robot_description,
            robot_description_semantic,
            robot_description_kinematics,
            robot_description_planning,
            octomap_config,
            octomap_updater_config,
            ompl_planning_pipeline_config,
            trajectory_execution,
            moveit_controllers,
            planning_scene_monitor_parameters,
        ],
        arguments=["__log_level:=debug"],
    )

To perform the moves, I am following the example of moveit_cpp_example as follows:
rclcpp::executors::SingleThreadedExecutor executor;
executor.add_node(move_group_node);
std::thread([&executor]() {executor.spin();}).detach();

static const std::string PLANNING_GROUP = "handlerbot_arm";
moveit::planning_interface::MoveGroupInterface move_group(move_group_node, PLANNING_GROUP);
moveit::planning_interface::PlanningSceneInterface planning_scene_interface;
moveit::planning_interface::MoveGroupInterface::Plan my_plan;

// Raw pointers are frequently used to refer to the planning group for improved performance.
const moveit::core::JointModelGroup * joint_model_group =
  move_group.getCurrentState()->getJointModelGroup(PLANNING_GROUP);

move_group.setGoalOrientationTolerance(0.05);
move_group.setGoalPositionTolerance(0.05);
move_group.setPlanningTime(10.0);

geometry_msgs::msg::PoseStamped target_pose1, target_pose2;

std::this_thread::sleep_for(std::chrono::seconds(2));

move_group.setPlannerId("PRMstar");

// ############################################################################################################

move_group.setPoseReferenceFrame(pose_40.header.frame_id);
move_group.setMaxVelocityScalingFactor(0.2);
move_group.setPoseTarget(pose_40,"hand_press");
move_group.plan(my_plan);
move_group.move();
std::this_thread::sleep_for(std::chrono::seconds(2));

Your environment

ROS Distro: Foxy
OS Version: Ubuntu 20.04.6 LTS
Binary
Cyclone DDS

I have also tried setting replaning to true.

  move_group.allowReplanning(true);
  move_group.allowLooking(true);

Does anyone have any ideas on how I can troubleshoot and resolve this issue?"

I wonder if you have solved this problem?


S3FileSystem.getRootDirectories() returning an empty list

I think this is accordingly with the design choice of 1:1 between bucket and FS.
I am wondering if we could relax/review this choice to make an endpoint a FS and each bucket a root file system. IMHO this would be a more natural approach making the buckets discoverable:
FileSystem s3 = FileSystems.newFileSystem(...);
for (Path root : s3.getRootDirectories()) {
  do_something(root);
}

This is one area where S3 doesn't match a filesystem well. I did play with having the root of the filesystem "contain" buckets that you can list but there are lots of edge cases.

You need to have the ListBuckets IAM permission.
There are many more buckets that you can access (public buckets, cross account shared buckets etc) than you can list with a call to ListBuckets, so you end up with an S3 "filesystem" which has a partial root.
Related to the above. For historical reasons, buckets have a global namespace, even though they ultimately live in a partition (AWS, gov-cloud(s), AWS-cn etc), a Region and an account. This means all buckets could be thought of as living in a universal file system but in many ways this isn't a useful abstraction anymore.
Buckets can have quite different requirements for a client due to things like regional endpoints, accelerated endpoints, different encryption key types and properties.
In POSIX and windows filesystem root directories are not very different from a directory but buckets are substantially different from a directory and potentially from one another. This only becomes increasingly more true as S3 gains more features.

None of this is to say you couldn't do this differently. For example FSx for Lustre does allow you to map multiple buckets to locations on the drive but does still require specific mappings of named buckets.

Thanks for the explanation, it makes sense. What about returning "/" like posix file systems? It would be more consistent and it'd provide a starting point for descending the tree.

I think we already do do that. Where "/" is the root of the bucket
https://github.com/awslabs/aws-java-nio-spi-for-s3/blob/main/src/main/java/software/amazon/nio/spi/s3/S3FileSystem.java#L183-L186

That's strange... can you try this snippet:
FileSystem fs = FileSystems.newFileSystem(...);
for (Path root : s3.getRootDirectories()) {
    System.out.println(root);
}

I do not get anything (although I can see the call to getRootDirectories()

Turns out the method was returning the root Path rather than an Iterarable containing the root Path. It compiled because Path is itself Iterable.


test: fix ansible os name variable in edge installer

ANSIBLE_OS_NAME variable value has changed from rhel to rhel-edge in edge installer test case RHEL-9.5, we need to update this variable.

/test-rhel-9-5-ng

/test-rhel-9-5-ng

/test-rhel-9-5-ng


[HxInputDate] - name and logic consolidation for DefaultDates, UseDefaultDates

static HxInputDate.DefaultDates => InputDateSettings.SuggestedDates (HxInputDate.Defaults.SuggestedDates) - Today defined here
HxInputDate.UseDefaultDates => ShowSuggestedDates - overall on/off
HxInputDate.SuggestedDates => override for Defaults/Settings.SuggestedDates

Closed by 0807a4d187e0b41e9a4cf95b7fa666c20ed64539 and 8e9850b4a6c736ae16d42113030bbda94a702c6b.


Drop Node v14.x, Add Node.js v20.x

@simone-sanfratello @simoneb I'll cut a major afterwards

In some repos we've also been using this https://github.com/pkgjs/action/, which automatically creates the matrix of Node.js versions based on the engines in the package file

That'd be handy!

Are you ok for this change or are you planning some semver-major PRs?

Are you ok for this change or are you planning some semver-major PRs?

No plans for majors atm


[HOLD for payment 2023-04-20] Migrate AutoUpdateTime.js to function component

Class Component Migration
Filenames

[ ] src/components/AutoUpdateTime.js

type: React.PureComponent
has state values: true
has refs: false
has context: false
lifecycle methods: componentDidMount,componentWillUnmount,componentDidUpdate

Task

We currently have some class components in our codebase that we would like to refactor to a function component.
Here's a link with some general advice on how to refactor a class component to a function component: https://react.dev/reference/react/Component#alternatives
If you need additional guidance, please ask in #expensify-open-source
Test for any regressions and verify that there are no breaking changes

@puneetlath taking this issue off HOLD as per this Slack post
IMPORTANT: If anything unexpected pops up during the refactor/review:

[ ] Take it to #expensify-open-source to get clarification on.
[ ] Prefix the conversation with [HOOK REFACTOR] so that we can find it easily.
[ ] Link the result of the conversation in this section of the Design Doc titled “Best Practices Conversations”
[ ] Add it to the STYLE.md guide in this open PR so we can reference it and apply any teachings in the next phase

Woo hoo!

Reviewing label has been removed, please complete the "BugZero Checklist".

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.2.99-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

https://github.com/Expensify/App/pull/16968

If no regressions arise, payment will be issued on 2023-04-20. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

[ ] External issue reporter
[ ] Contributor that fixed the issue
[ ] Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

Merged PR within 3 business days of assignment - 50% bonus
Merged PR more than 9 business days after assignment - 50% penalty


Fedora 41 image

Fedora 41 will be released end of October  / begin of November.
https://fedorapeople.org/groups/schedule/f-41/f-41-key-tasks.html

Fedora 41 is available.


Changing node hex color fails

Hi all,
I'm new here but wanted to report an issue I found. I was trying to change my node's hex color using the following command: lightningd --rgb 000000 and I received an error that ended with "STATUS_FAIL_INTERNAL_ERROR: Failed to bind on 2 socket: Address already in use". I also tried it with an = after rgb and also received the same error. I ended up manually editing the lnd.conf myself to change the color but wanted to raise the issue here.

set the color in the c-lightning config file instead


Unhandled rejection TypeError: Cannot read property 'query' of undefined

Sorry for dropping it on you, I don't even know where to start to dig
Full output
Unhandled rejection TypeError: Cannot read property 'query' of undefined
    at Promise.each.then (/Users/askhat/code/polycode-frontend/node_modules/extjs-loader/lib/loader.js:164:26)
    at tryCatcher (/Users/askhat/code/polycode-frontend/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/askhat/code/polycode-frontend/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/askhat/code/polycode-frontend/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/askhat/code/polycode-frontend/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/askhat/code/polycode-frontend/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/Users/askhat/code/polycode-frontend/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/askhat/code/polycode-frontend/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/askhat/code/polycode-frontend/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

Mentioned block
loader.js:162
.then(() => {
  let ExtParser = pathMap['Ext'];
  if (ExtParser.query) {
    let fileProps = ExtParser.fileMapCache[self.resourcePath];
    if (fileProps && fileProps.requires && fileProps.requires.length > 0) {
      let requireStr = '';
      fileProps.requires.forEach((require) => {
        let result = ExtParser.query(require);
        if (result instanceof Array) {
          result.forEach((require) => {
            requireStr += `require('${require.src}');`
          });
        } else {
          requireStr += `require('${ExtParser.query(require).src}');`
        }
      })
      updates.push({type: 'add', start: 0, end: 0, data: requireStr});
    }
  }
}

webpack.config.js
module.exports = {
  devtool: 'inline-source-map',
  entry: {
    ext: path.join(__dirname, 'ext/build/ext-all'),
    app: path.join(__dirname, 'app.js')
  },
  output: {
    path: path.join(__dirname, 'dst'),
    filename: 'bundle.js'
  },
  devServer: {
    contentBase: 'dst'
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        loader: 'extjs-loader'
      }
    ]
  }
}

Most likely you do not have the module's peer dependency (ext-parser) installed.

But I have ext-parser installed, version ^1.0.4
On Wed, Aug 2, 2017 at 1:54 PM Zoltan Magyar<EMAIL_ADDRESS>wrote:

Most likely you do not have the module's peer dependency (ext-parser
https://www.npmjs.com/package/extjs-parser) installed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zmagyar/extjs-loader/issues/1#issuecomment-319638920,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADlfS3WI5KDfzP8uKJPrObtzsfs-Q8W0ks5sUFVIgaJpZM4Op_hh
.

--
Sincerely, Askhat Bikmetov

Ah, sorry. Seeing the above webpack config file, it looks like you are missing some essential config parameters. E.g. you do not have the paths configured. See https://github.com/zmagyar/extjs-loader#via-webpack-config-recommended for example.

Could you also give a minimal necessary example of configuration?

So, I added following config block
options: {
  debug: true,
  namespace: 'Poly',
  paths: {
    'Deft': false,
    'Ext': new extParser({
      toolkit: 'classic',
      path: path.join(__dirname, 'ext')
  })
}

And now error is
Unhandled rejection TypeError: Cannot read property '/Users/askhat/code/polycode-frontend/node_modules/webpack-dev-server/client/index.js' of undefined

And again, I don't quite understand what is happening. Perhaps due to lack either webpack and ext knowledge. Could you point me towards correct direction and explain things, please.

Will post a sample project soon.

Hi @askhat,
Sorry for the delay, it's been a busy period here. But finally managed to find some time to come up with an example to demonstrate the usage of the loader. You can find this sample project at https://github.com/zmagyar/extjs-loader-sample.

Description has been updated to include cross link to the sample project at eae7bbb1f56f7d5cdeac5359f44e68ca3af30c1f


Merge two files

I'd like to join two yaml files and I am struggling to find the right command.
Example
~ # cat k1.yaml
base:
  key1: val1
~ # cat k2.yaml
base:
  key2: val2

I'd like to merge the two with the result being...
base:
  key1: val1
  key2: val2

Hello @ChristianKniep,
wq don't have the --slurp option like jq
Instead you could do it with wq+jq (maybe a bit ugly) but works:
$ jq -slurp '.[0] * .[1]' <(wq -M -i yaml -o json . k1.yaml) <(wq -M -i yaml -o json . k2.yaml) | wq -i json -o yaml .
base:
  key1: val1
  key2: val2

(example taken from https://stackoverflow.com/questions/19529688/how-to-merge-2-json-objects-from-2-files-using-jq)

@ChristianKniep no news since september, I'm closing, this issue, reopen if needed.


Remove links from the WalletConnect QR code modal

Currently, we show 2 tabs on the WalletConnect connection screen: the list of various wallets able to connect via WalletConnect and the QR code for connection.
We want to remove the tab with links to various wallets because they can lead to hacked sites. There is a precedent already.

@alx-khramov do you mind creating a quick demo with https://www.loom.com/ and adding a link to the ticket?

@alx-khramov do you mind creating a quick demo with https://www.loom.com/ and adding a link to the ticket?

It can be shown on a few screenshots.
BEFORE
Desktop:

iOS:

Android:

AFTER
Desktop:

iOS:

Android stays as before.


Missing Datadog.h when installing pods via npx react-native run-ios

Describe what happened
Getting Datadog.h file not found error not found when running yarn ios after a clean installation of yarn add @datadog/mobile-react-native

❌  error: emit-module command failed with exit code 1 (use -v to see invocation)

❌  (/Users/Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/DatadogSDK/DatadogSDK-umbrella.h:13:9)

  11 | #endif
  12 |
> 13 | #import "Datadog.h"
     |         ^ 'Datadog.h' file not found
  14 | #import "ObjcAppLaunchHandler.h"
  15 | #import "ObjcExceptionHandler.h"
  16 |

› Compiling @datadog/mobile-react-native Pods/DatadogSDKCrashReporting » SwiftExtensions.swift

❌  (/Users/Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/DatadogSDK/DatadogSDK-umbrella.h:13:9)

  11 | #endif
  12 |
> 13 | #import "Datadog.h"
     |         ^ 'Datadog.h' file not found
  14 | #import "ObjcAppLaunchHandler.h"
  15 | #import "ObjcExceptionHandler.h"
  16 |

Pods/DatadogSDKCrashReporting/Sources/Datadog directory is empty, not sure if this is intended.
Steps to reproduce the issue:

Run yarn add @datadog/mobile-react-native
Run npx react-native run-ios

Describe what you expected:
Installation to work properly
Additional context
- SDK Version: ^1.0.0-rc9
- react-native Version: 0.68.2
- react Version: 17.0.2

Hi @sahzhang, thank you for reaching out!
Have you run pod install after the installation? You might need to run pod update DatadogSDKBridge if you made an upgrade to the SDK version.
Could you also try running the project from XCode (open the ios/YourAppName.xcworkspace in XCode, then click on the "Play" icon), and let us know if you have the same issue?
And if none of this solved the issue, could you share with us your Podfile and Podfile.lock to help us troubleshoot?
Thanks a lot :)

@louiszawadzki, yes I have a run pod install. I also tried running pod update DatadogSDKBridge and from XCode. All the same issue.
XCode stack trace:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "DatadogSDK-umbrella.h"
        ^
/Users/Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/DatadogSDK/DatadogSDK-umbrella.h:13:9: error: 'Datadog.h' file not found
#import "Datadog.h"
        ^
<unknown>:0: error: could not build Objective-C module 'Datadog'

From our Podfile.lock:
  - DatadogSDK (1.11.1)
  - DatadogSDKBridge (0.5.5):
    - DatadogSDK (~> 1.11.0-rc1)
    - DatadogSDKCrashReporting (~> 1.11.0-rc1)
  - DatadogSDKCrashReporting (1.11.1):
    - DatadogSDK (= 1.11.1)
    - PLCrashReporter (~> 1.10.1)
  - DatadogSDKReactNative (1.0.0-rc9):
    - DatadogSDKBridge (= 0.5.5)
    - React-Core
  ...
  - PLCrashReporter (1.10.2)

@louiszawadzki
We already have a Bridging header file:
#import <React/RCTBridge.h>
#import "React/RCTBridgeModule.h"
#import <React/RCTEventEmitter.h>
#import "React/RCTUIManager.h"
#import "React/RCTViewManager.h"

Still getting the same issue.
I'm on Xcode version 13.4.1. Also tried building the DatadogSDKCrashReporting scheme separately and errored out with the same could not build Objective-C module 'Datadog'. When just building the Datadog scheme, the build passes.

Hi @sahzhang,
On my side I'm able to build the DatadogSDKCrashReporting scheme, while my Pods/DatadogSDKCrashReporting/Sources/Datadog directory is also empty.
Could you share the output of the DatadogSDKCrashReporting scheme build so we can understand at what point it is failing?
You can get it in the report navigator (you can get there by pressing ⌘9), then clicking on the "Export" button.

@louiszawadzki Apologies for the delay, I have the scheme build report. Do you mind if I email this to you?

@sahzhang can you share it in the issue?
That would help me sharing it with the native iOS SDK team :)
If you don't feel confident sharing the file here no problems, tell me and I'll contact you through the email address from your github profile.
I'm going to be off in the next 2 weeks, so don't be alarmed if you don't hear back from me :)

Yes could you please email me. Thanks! :)

Hi @sahzhang!
Sorry for the long delay, I am just back! Actually I think the easiest will be for you to email the file to<EMAIL_ADDRESS>and mention that we've discussed this in this issue as well as my name (Louis Zawadzki), and it will be forwarded very quickly to me.
Going through support will make it a lot easier for me to share it with our iOS team and to reference the case later :)
If it turns out to take too much time I'll email you :)
Thanks a lot!

Hi @sahzhang,
I did not hear from Datadog's support yet, did you manage to reach out to them?
I am thinking that the issue could also come from the Podfile, could you share this file with us as well?
Thanks a lot

hey @louiszawadzki
here the Podfile
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.0'
install! 'cocoapods', :deterministic_uuids => false

require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}

target 'Measured' do
  use_expo_modules!
  post_integrate do |installer|
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
  end
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes',
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end

  pod 'RNSVG', :path => '../node_modules/react-native-svg'

  permissions_path = '../node_modules/react-native-permissions/ios'

  pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
  pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
  pod 'RNSentry', :path => '../node_modules/@sentry/react-native'

end

I tested out with the sdk: ^1.0.0-rc9 and 1.1.1
thank you in advanced

hey @louiszawadzki
I got working this library at the end.
I was upgrading the expo SDK and RN version, I was dealing with some issues, the way I faced out was removed completly from the project and get running the app, fixing all the issues related with the native changes on iOS and Android, and then I did a fresh installation of the DD module and everything works as expected.
thank you for you review.


Enable embedded dylib test in Bazel

Fix https://github.com/google/iree/issues/6748

Thanks for looking into it. If this is working with bazel, we can remove this CMake only blob here (
https://github.com/google/iree/blob/10f8b24b5fc21cc93641d2cd529bd3c587d66815/iree/test/e2e/xla_ops/CMakeLists.txt#L271
). We can just use what bazel_to_cmake does.

You are reading a commit not from this PR. :) The commits here already have the line removed and going back to the bazel_to_cmake flow.

Thanks for looking into it. If this is working with bazel, we can remove this CMake only blob here (
https://github.com/google/iree/blob/10f8b24b5fc21cc93641d2cd529bd3c587d66815/iree/test/e2e/xla_ops/CMakeLists.txt#L271
). We can just use what bazel_to_cmake does.

You are reading a commit not from this PR. :) The commits here already have the line removed and going back to the bazel_to_cmake flow.

No, I was giving a code pointer in ToT for what I was talking about. But I see that it is removed. Got thrown off by the diff.


fix(vm): remove sequencer usage from createVmThreadsPool function (fix #4637)

Description

--pool=vmThread in combination with --shard=1/x skips test files. This is due to unnecessary code remaining in the createVmThreadsPool function after a refactor where the Sequencer was refactored to be outside of pools.
This PR removes that code.
Related issue: https://github.com/vitest-dev/vitest/issues/4637

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. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
[ ] Ideally, include a test that fails without this PR but passes with it.
[x] Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

[ ] Run the tests with pnpm test:ci.

Documentation

[x] If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

[x] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Please, don't format code with your formatter

My bad on the formatting. I've returned it to it's original state

Great finding @mhogeveen!

Thanks! Happy to help


Either redundant imports or all

Not sure how useful it is but a single pyi files should not have redundant imports and have __all__. A more "strict" version might be to enforce that an entire project either uses only __all__ or only redundant imports.

I'm not sure about this one. There's a few stubs in typeshed where we explicitly re-export a few things that aren't included in __all__.
E.g. in stdlib/urllib/request.pyi, HTTPError is re-exported here:
from urllib.error imported HTTPError as HTTPError

(We do that because accessing HTTPError as urllib.request.HTTPError appears to be relatively common, so it would be a pain to have a type-checker emit an error if a user tried to do that.)
But it isn't included in __all__ at runtime, so we don't include it in __all__ in the stub either. That means that a type checker knows that if somebody does from urllib.request import *, HTTPError isn't available in the global namespace.
So if we were to implement this check, it would have to be on a per-import basis: a "Hey, you're doing a re-export here even though this specific symbol is included in __all__" kind of thing.

I think we're probably not going to implement this, but thanks for the feature request! :)


Kotlin version generates java code.

version used alpha 05
When running generation task, it also generates old java model interfaces.
classpath 'com.squareup.sqldelight:android-gradle-plugin:1.0.0-alpha5'

apply plugin: 'com.squareup.sqldelight.android'

can you run a clean then run the generateSqlDelightInterface task?

Something really wierd is happening. generateSqlDelightInterface doesn't generate java code, but when I edit .sq files, it generates java files for them, without running any gradle tasks

yea thats the idea plugin. You just need to download the latest alpha idea plugin:
https://plugins.jetbrains.com/plugin/8191-sqldelight


Some tests are not passing on 31st on some months

Hello,
Three tests do not pass when launched on the 31st day of the month (for example 31st of august).
The three tests in question are :

testItDrawsEventDaysOnCalendar
testItDrawsMultipleEventDaysOnCalendar
testItDrawsMultipleEventDaysOnCalendarWithPlusIndicator

Here is the error returned :
com.github.sundeepk.compactcalendarview.CompactCalendarControllerTest > testItDrawsEventDaysOnCalendar FAILED
    org.mockito.exceptions.verification.TooManyActualInvocations at CompactCalendarControllerTest.java:305
com.github.sundeepk.compactcalendarview.CompactCalendarControllerTest > testItDrawsMultipleEventDaysOnCalendar FAILED
    org.mockito.exceptions.verification.TooManyActualInvocations at CompactCalendarControllerTest.java:321
com.github.sundeepk.compactcalendarview.CompactCalendarControllerTest > testItDrawsMultipleEventDaysOnCalendarWithPlusIndicator FAILED
    org.mockito.exceptions.verification.TooManyActualInvocations at CompactCalendarControllerTest.java:337
They probably don't work in February as well.
I haven't really looked at why yet.

Hi these will fail if you have changed the code which draws days. The idea behind the test is, for example testItDrawsEventDaysOnCalendar, is that if there is one event on each day of the month then I expect it to draw a circle 29 times (minus 1 because the current day is ignored). All these tests will work on a similar idea. It could be these tests are too fine grained but it keeps confidence to know that its not drawing more than it needs to.
Let me know if you have any questions.

I don't think it's a problem from modifications I made : the tests pass every day except on the 31st.
From your explanation (and a look at the code in question), I 'm guessing it's because if we are the 31st, the current day won't be one of the day where there is an event thus the draw will be called 30 times instead of 29.
It probably won't work in February as well since there is only 28 (or 29) days in the month : draw will be called only 27 (or 28) times.
You'll probably have to add different conditions depending on the current day in the test... The real problem is that the tested method depends on an internal calendar that you can't mock easily.

@JulienArzul Yes your right, it's set to work only on specificdate because like you mentioned it can be little awkard to mock system time. Thats why the test, e.g. testItDrawsEventDaysOnCalendar, is set to use date for June which has 30 days. It will not work for the months you mentioned. But thats ok though right, because we explicity set the month we are testing. If you want to test for month that have 31 days then we can just add another test case.
However, If you want to mock systemtime, then I suggest we can mock system date/time using http://joda-time.sourceforge.net/apidocs/org/joda/time/DateTimeUtils.html. We can simply add JodaTime as a test dependency and it should be robust then. Which might be a good idea.

Actually, after looking a bit more at the code, I think that we've found a bug : since we're setting the month to draw to June 2015, we should never have the current day selected in this month ! And the events should actually be drawn 30 times.
The bug is with the variable isCurrentSelectedDay : the check is only whether the day of the month is the same than the day of the selected date. It doesn't take the month into account.
I think that right now it shouldn't happen since you automatically select the first day of the month when switching month. So we have two choices :

change the test to select the first day of june before drawing the events
correct the method to check the month of the selected date so that future enhancements like not changing the selected day when changing the month (I've seen issues regarding that) are handled

The second solution is better in my opinion : it handles both case elegantly. If you want me to do it, don't hesitate, I'll probably have some time tomorrow.

I've proposed a correction in a Pull Request

👍  @JulienArzul I havn't had a chance to look at the pull request, will do when I get time.

Merged pull request, closing this issue now.


How to access the Save Event - or send the new image to a form

Hi,
Sorry - I'm sure its a dumb question - but Google searches on this excellent cropper tool produce very few results...
How do I actually hook into the Save Event?
(I just need to trigger some javascript to save my new nicely cropped image)... and can't seem to figure it.
Many thanks,
Peter

Just pass a callback to the save plugin:
new Darkroom('#target', {
    save: {
      callback: function() {
        // do what you want
      }
    }
  }
});

Default callback is https://github.com/MattKetmo/darkroomjs/blob/master/lib/js/plugins/darkroom.save.js#L7

Great - thanks - that's easier than I was trying!!

Sorry - just want to check something. I still don't seem to be able to get the saved image to send to my server PHP script. Or rather I do - but the size of the object is quite large - and my PHP script dies from exhausted memory. I use the same script when sending other images - and it works fine. Here's the code of the darkroom save option:
save: {
callback: function() {
console.log('saved!');
var oMyForm = new FormData();
oMyForm.append("ContentID", $('#ID').val());
oMyForm.append("Title", $('#Title').val());
oMyForm.append("ContentType", 'content');
//Now the file (large version)
var oBlob = dkrm.sourceImage.toDataURL();
oMyForm.append("ImgFile", oBlob);
				oReq = new XMLHttpRequest();
				oReq.open("POST", "image_header_upload.php");
				oReq.onreadystatechange = ClientSideUpdate;
				oReq.send(oMyForm);
				return true;
			}

My intention is to be able to drop a large (straight from digital camera) image onto the canvas, crop an area of 1400x480 pixels and then save it (which uploads and stores the file on the server).
But even when trying to select a small crop area (140x48 etc) - I get memory exhausted on the server - and the file does seem too large for such a file. My complete darkroom initialisation is:
var dkrm = new Darkroom('#target', {
// Size options
minWidth: 140,
minHeight: 48,
maxWidth: 1400,
		// Plugins options
		plugins: {
		crop: {
		  ratio: 1400/480,
		  maxWidth: 1400,
		  maxHeight: 480
		},
		save: {
			callback: function() {
				console.log('saved!');
				var oMyForm = new FormData();
				oMyForm.append("ContentID", $('#ID').val());
				oMyForm.append("Title", $('#Title').val());
				oMyForm.append("ContentType", 'content');
				//Now the file (large version)
				var oBlob = dkrm.sourceImage.toDataURL();

				oMyForm.append("ImgFile", oBlob);

				oReq = new XMLHttpRequest();
				oReq.open("POST", "image_header_upload.php");
				oReq.onreadystatechange = ClientSideUpdate;
				oReq.send(oMyForm);
				return true;
			}
		}
	},

	// Post initialize script
	initialize: function() {
		$('.current-image').fadeTo( "fast" , 1);
		$('#instruction').css('opacity','0');

		var cropPlugin = this.plugins['crop'];
		cropPlugin.requireFocus();

		}
	});

Many thanks if you can shed any light Matt.

I guess the point of my question is:
Does    dkrm.sourceImage.toDataURL()    just send the new resized data (not the original full image)?
Thanks

Hi - I'm still really struggling to extract the resized item to send to the server - that's all I need to do! I don't want to send the original filesize up to the server (even if its been cropped to the proportion I need). I want to resize it in the browser (via a Canvas) and then send that blob up to the server.
Not sure why I'm finding this so difficult!
For example a large 5000x4000px file (for example) - I want to crop to 1400x480px - and just send the 1400px x 480px of data up to store etc.
Many thanks,
Peter

I'm having the same exact issue!

I figured it out! All the more reason we should start beefing up the documentation because this is definitely a crucial component of this excellent tool.
When you change the image, the actual URL of the image never changes. Just look at the darkroom html. It stays the same. What does change is the canvas. So if you want to actually generate the Base64 data for the new edited image, you need to ASK the canvas for it.
So in your save plugin details you do this.
                   save: {
                                callback: function() {
                                   // get rid of the toolbar and finalize
                                    this.darkroom.selfDestroy();

                                    var newImage = dkrm.canvas.toDataURL();

                                    // Set your data that will be sent to reflect this change
                                    self.fileData().modifiedDataURL = dkrm.canvas.toDataURL();
                                }
                            }

Thanks! Unfortunately I had to bail on this and find another solution using a different tool. Similar - but allowed a bit more flexibility in what I needed to do - that I just couldn't figure out in Darkroom.


tablex.iunion() - union() for arrays

It would be nice to have a convenience function to create the union of two arrays:
function tablex.iunion(t1, t2)
       return makelist(union(makeset(t1), makeset(t2)))
end

This uses union() from #195 and makelist() from #196.

Can also be written tablex.keys(Set(t1) + Set(t2)). But then I noticed the obvious thing - you lose original array ordering. So it's not as universally useful as we might think. Another way is to use tablex.index_map to get a quick index to one array, and just mosey through the other array, copying accordingly.  The more general principle is that there's already so many new table functions, and it's easy to forget them.

I have a similar function called concat_arrays in luacheck utility module, it's used a few times. It takes an array of arrays and simply uses ipairs to iterate over all of them, appending all elements to a new array.


Reduce unsafe methods in move-native

There are a huge number of unsafe functions in move-native, and some safe functions that probably aren't really.
Reducing the number of unsafe methods would help future maintenance and potential auditors.
Most of the unsafety is due to functions interpreting MoveType plus AnyValue or MoveUntypedVector, the fields of which must be trusted to be correct. The basic approach to reducing unsafe functions is to make the fields of these types private, but add unsafe constructors. Then further functions/methods can be safe, assuming the unsafe types were constructed correctly.
Values of these types received from the compiler are assumed correct.
i.e.:

// These fields must maintain safety invariants.
// Because the fields are public, functions operating on MoveType must be unsafe.
// If an unsafe constructor is required to build this, then the constructor caller is responsible for the safety,
// and methods on MoveType can be declared safe.

#[repr(C)]
pub struct MoveType {
    pub name: StaticTypeName,
    pub type_desc: TypeDesc,
    pub type_info: *const TypeInfo,
}

Places where MoveType is combined with an AnyType or MoveUntypedVector can be changed to combine these two types into yet another container, again with an unsafe constructor and private fields, allowing further operations on the pair to be declared safe. Something like this is already done for and TypedMoveBorrowedRustVec and MoveBorrowedRustVecOfStruct, but the methods aren't quite factored correctly to declare methods safe.
e.g.:
// This should be a completely safe method on `TypedMoveBorrowedRustVecMut` -
// the unsafe constructor `borrow_typeed_move_vec_as_rust_vec_mut` should be lifted out
// (and turned into an unsafe constructor method on `TypedMoveBorrowedRustVecMut`).

pub unsafe fn swap(type_ve: &MoveType, v: &mut MoveUntypedVector, i: u64, j: u64) {
    let i = usize::try_from(i).expect("usize");
    let j = usize::try_from(j).expect("usize");

    let rust_vec: TypedMoveBorrowedRustVecMut = borrow_typed_move_vec_as_rust_vec_mut(type_ve, v);

    match rust_vec {
        TypedMoveBorrowedRustVecMut::Bool(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::U8(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::U16(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::U32(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::U64(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::U128(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::U256(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::Address(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::Signer(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::Vector(_t, mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::Struct(mut v) => v.swap(i, j),
        TypedMoveBorrowedRustVecMut::Reference(_t, mut v) => v.swap(i, j),
    }
}

I'd also like to convert most free functions that operate on these types to methods.

The low-hanging fruit here is done, but there's so much unsafety in the runtime that there's plenty more that can potentially be done to introduce safe abstractions around the unsafe ones; though there's a question of whether it is worthwhile - the code contortions to make the internal abstractions truly safe will get uglier and may reduce performance.
Off-hand I recall that the vector abstractions still have many functions that are unsafe, and making them actually memory safe looked tricky.
It could be worth someone taking a fresh look at, though I note that creating safe Rust abstractions around unsafe code is pretty tricky and there are a bunch of subtle rules. This page is a good starting point:
https://doc.rust-lang.org/reference/behavior-considered-undefined.html


fix for aliases in server query

Issue
The local resolver wasn't being made to recognize and handle aliases in server-side portions of the query.
Solution
in the following query:
{
  foo @client { bar }
  baz: bar { foo }
}

The observer was looking for bar in the server portion instead of baz. I added a check for an aliased field (info.resultKey) in the observer.

@JakeDawkins DOH, the travis file totally doesn't work haha. Do the tests pass? I can fix that on master?

@jbaxleyiii 👍


Resolve issue with pbxFile extension

where pbxFile extension was being set to undefined
and add new test case to verify the bug fix
NOTE: These changes were originally part of PR #12,
extracted here by @brodybits (Christopher J. Brody).
/cc @n1ru4l @kspearrin

All changes except for the quick test fix by @brodybits were already reviewed in PR #12. Merging now to help unblock the upcoming release.


F680 from ISP - can't even read a signature

Description of new feature
This is a ZTE F680 from ISP, I cannot even read the signature due to an error in zcu module.
Describe alternatives you've considered
e.g. I have tried using --payload xxx but I get the following error < error >
Additional context

# python3 examples/signature.py f680.bin
Traceback (most recent call last):
  File "/Users/leshniak/zte-config-utility/examples/signature.py", line 22, in <module>
    main()
  File "/Users/leshniak/zte-config-utility/examples/signature.py", line 16, in main
    zcu.zte.read_header(args.infile)
  File "/Users/leshniak/zte-config-utility/lib/python3.12/site-packages/zcu-0.4.0-py3.12.egg/zcu/zte.py", line 17, in read_header
AssertionError

Starting Nmap 7.94 ( https://nmap.org ) at 2024-04-26 12:04 CEST
Nmap scan report for <IP_ADDRESS>
Host is up (0.0032s latency).
Not shown: 996 closed tcp ports (conn-refused)
PORT    STATE    SERVICE
23/tcp  filtered telnet
53/tcp  open     domain
80/tcp  open     http
443/tcp open     https

Nmap done: 1 IP address (1 host up) scanned in 1.87 seconds

Attach config.bin for your device
f680.bin.zip

Closing as dupe of https://github.com/mkst/zte-config-utility/issues/15.


[WIP] [spaceship] Methods for TestFlight tester management via Connect API

Checklist

[x] I've run bundle exec rspec from the root directory to see all new and existing tests pass
[x] I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary.

Motivation and Context

Adds support for the Connect APIs for managing beta testers (https://developer.apple.com/documentation/appstoreconnectapi/testflight/beta_testers)
The currently used APIs may not be documented and are at risk of breaking without prior notice (or already have)

Description
It seems like the Connect API uses different parameters than fastlane users are used to providing. For this reason (and also because I'm new to the fastlane codebase) fastlane users won't immediately notice the changes in this PR until the fastlane modules are updated accordingly, which may be a breaking change.

I've used fastlane for a little while but this is my first contribution to the codebase. As such, I was wondering if I could get any feedback regarding whether I'm doing this correctly and how I should test these changes to make sure they work correctly

https://github.com/fastlane/fastlane/issues/14562#issuecomment-484085128
Anyway to use this until the PR is ready?

Hi @rajivshah3 currently going through a few old PRs and trying to resolve them for anything spaceship related. Are you still using this? How can I test this to get it merged?

@max-ott I originally opened this with the aim of fixing https://github.com/fastlane/fastlane/issues/14562. I think these methods have already been implemented, so this PR is no longer needed


OfflineShop extension

How to use

    Register items.
    Print QR codes and paste them on your store, your menu, somewhere, somehow.
    Clients scan the QR codes and get information about the items plus the price on their phones directly (they must have internet)
    Once they decide to pay, they'll get an invoice on their phones automatically
    When the payment is confirmed, a confirmation code will be issued for them.

The confirmation codes are words from a predefined sequential word list. Each new payment bumps the words sequence by 1. So you can check the confirmation codes manually by just looking at them.

For example, if your wordlist is [apple, banana, coconut] the first purchase will be apple, the second banana and so on. When it gets to the end it starts from the beginning again.

Powered by LNURL-pay.

Codecov Report

Merging #154 (c7717a6) into master (88eb8e0) will increase coverage by 1.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
+ Coverage   29.35%   30.47%   +1.11%
==========================================
  Files          26       29       +3
  Lines        1785     1969     +184
==========================================
+ Hits          524      600      +76
- Misses       1261     1369     +108

Impacted Files
Coverage Δ

lnbits/core/crud.py
24.74% <100.00%> (ø)

lnbits/decorators.py
51.61% <0.00%> (ø)

lnbits/tasks.py
50.00% <0.00%> (ø)

lnbits/helpers.py
28.75% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88eb8e0...c7717a6. Read the comment docs.