e2e: gpu: add a basic tensorflow test

Codecov Report

Merging #1374 (96a5bbe) into main (44e5886) will decrease coverage by 0.07%.
The diff coverage is n/a.

:exclamation: Current head 96a5bbe differs from pull request most recent head 504f09e. Consider uploading reports for the commit 504f09e to get more accurate results

@@            Coverage Diff             @@
##             main    #1374      +/-   ##
==========================================
- Coverage   50.62%   50.56%   -0.07%
==========================================
  Files          44       44
  Lines        4952     4952
==========================================
- Hits         2507     2504       -3
- Misses       2300     2302       +2
- Partials      145      146       +1

see 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

This is stuck until I can get access to the bmaas machine to debug the failure.


[[FIX]] Tolerate RegExp as void operand

Hey @rwaldron. I imagine that a patch like this would cause you to wonder about my priorities. Rest assured: I'm focused on async functions these days. I just stumbled on this corner case while trying to parse await correctly.

Coverage remained the same at 98.744% when pulling fc40371028ffdc9248fc2f310401323fffafbcc6 on jugglinmike:void-regexp into d03662c84c9eb032ab2163489989cde45b8f8565 on jshint:master.

LGTM


[Graphql] How to send header is like rest

I find that when using rest (), it is possible to include the header

rest (string $ type, string $ path, array $ params = null, array $ headers = [], bool $ sync = true),

but with graph () how to do it?

Hi, please open an issue in osiset/basic-shopify-api repo, thanks!


Check for logger manager authority for LoggerManagerController

Coverage remained the same at 54.005% when pulling caf1976ab79603aa7f27e8dd43f3c3f8e92c0ccd on RLejolivet:logger-manager-security into c197217604e172ae75a26db3775659d35b1fdb4b on blossom-project:master.


Stuck on startup after update to 1.7.1

Describe the bug
Updated to 1.7.1. Now I'm stuck on the loading screen.
> orb
panic: timed out waiting for services to start [recovered]
        panic: timed out waiting for services to start [recovered]
        panic: timed out waiting for services to start

goroutine 1 [running]:
github.com/orbstack/macvirt/scon/cmd/scli/cmd.RecoverCLI()
        github.com/orbstack/macvirt/scon/cmd/scli/cmd/utils.go:43 +0x78
panic({0x10454ce40?, 0x140002000d0?})
        runtime/panic.go:785 +0xf8
github.com/orbstack/macvirt/scon/cmd/scli/scli.init.OnceValue[...].func5.1()
        sync/oncefunc.go:54 +0x78
panic({0x10454ce40?, 0x140002000d0?})
        runtime/panic.go:785 +0xf8
github.com/orbstack/macvirt/scon/cmd/scli/scli.check(...)
        github.com/orbstack/macvirt/scon/cmd/scli/scli/scli.go:12
github.com/orbstack/macvirt/scon/cmd/scli/scli.init.func2()
        github.com/orbstack/macvirt/scon/cmd/scli/scli/scli.go:19 +0x88
github.com/orbstack/macvirt/scon/cmd/scli/scli.init.OnceValue[...].func5()
        sync/oncefunc.go:57 +0x74
sync.(*Once).doSlow(0x140001abbb8?, 0x104426828?)
        sync/once.go:76 +0xc8
sync.(*Once).Do(0x0?, 0x0?)
        sync/once.go:67 +0x24
github.com/orbstack/macvirt/scon/cmd/scli/scli.init.OnceValue[...].func6()
        sync/oncefunc.go:62 +0x3c
github.com/orbstack/macvirt/scon/cmd/scli/cmd.init.func28(0x104882e40, {0x1048e44e0?, 0x4?, 0x10442c9c3?})
        github.com/orbstack/macvirt/scon/cmd/scli/cmd/run.go:156 +0x7c
github.com/spf13/cobra.(*Command).execute(0x104882e40, {0x1048e44e0, 0x0, 0x0})
        github.com/spf13/cobra@v1.6.1/command.go:916 +0x648
github.com/spf13/cobra.(*Command).ExecuteC(0x10487ef00)
        github.com/spf13/cobra@v1.6.1/command.go:1044 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.6.1/command.go:968
github.com/orbstack/macvirt/scon/cmd/scli/cmd.Execute(...)
        github.com/orbstack/macvirt/scon/cmd/scli/cmd/root.go:25
main.runCtl(0x70?)
        github.com/orbstack/macvirt/scon/cmd/scli/main.go:142 +0x1dc
main.main()
        github.com/orbstack/macvirt/scon/cmd/scli/main.go:43 +0x84

To Reproduce
No response
Expected behavior
No response
Diagnostic report (REQUIRED)
OrbStack info:
Version: 1.7.1
Commit: 1946fb789831b1900078c1a0d2684efa7964f27c (v1.7.1)
System info:
macOS: 13.6.9 (22G830)
CPU: arm64, 10 cores
CPU model: Apple M1 Pro
Model: MacBookPro18,1
Memory: 32 GiB
time="2024-09-02T12:34:33 02:00" level=error msg="failed to get scon info" error="panic: timed out waiting for services to start"
Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-09-02T10-34-33.027256Z.zip

Screenshots and additional context (optional)

Fixed, thanks. There was a compatibility issue with a combination of older versions of macOS + CPU models.
Expect a hotfix shortly. Sorry for the inconvenience.
Older versions are available at https://docs.orbstack.dev/downgrade#older-versions.

Fixed in hotfix v1.7.1 (17385).


[GLBC] Fix problem surfacing error

Fixes #645
All of that code could use refactoring, but priority is making a working release.

This change is

Coverage remained the same at 47.15% when pulling 334cc366beb4783559d311330b634164562e8ad7 on nicksardo:gclb-err-fix into cd3e546c80d6fbb80445f5b0f55a1a25013ea05a on kubernetes:master.

/lgtm
@nicksardo thanks!

Coverage increased (+0.02%) to 47.174% when pulling f36203aec80a61135209d9eecfbd97ac9d5ce4a0 on nicksardo:gclb-err-fix into cd3e546c80d6fbb80445f5b0f55a1a25013ea05a on kubernetes:master.


urface/cli deprecation warning

Saw this scary warning at the end of the lego run:
DEPRECATED Action signature.  Must be `cli.ActionFunc`.  This is an error in the application.  Please contact the distributor of this application if this is not you.  See https://github.com/urfave/cli/blob/master/CHANGELOG.md#deprecated-cli-app-action-signature

Doesn't seem to prevent lego from doing its job.

Hello there!
Which version of lego are you using?
Sounds a lot like #206 and #232.

$ lego --version
lego version 0.3.0

Yeah it probably is a dupe. Sorry for the noise.

I installed this using brew so I suppose their config is just out-of-date.

I didn't even know that homebrew had lego in it's repository :smile:

achievement unlocked!

Closing this as a dupe of #232


⚠ Bofrost.fr has degraded performance

In c503425, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1074 ms

Resolved: Bofrost.fr performance has improved in a5c71b9 after 8 minutes.


Missing test case: duplicate label definition

Hello! I'm following along with the test-suite, but not the book – I feel like this might be a useful disclaimer.
I believe there's a test missing in chapter_6/invalid_semantics/extra_credit testing for the case when a label has multiple definitions – c.f. N1570 <IP_ADDRESS>:

Label names shall be unique within a function.

You're correct, there should be a test case for this. (The extra-credit tests aren't finished yet, so there are currently a lot of missing test cases for these features.)

I've pushed a couple of test cases for this to complete-test-suite; let me know if you run into issues with any of them! (I'll leave this issue open until they're merged into main)


Improve Speed of "Generating Captions" by switching the model

After a user reported that the scan took a long time for him, I investigated and logged each step. The result is that for a normal JPEG generating captions takes up 13% of the scan time or 1.4 seconds on my machine.
I think this could be improved by switching the default model to MobileNetV3 see #54
Currently, the results of places365 are not that good, but it still gives unique results back. If MobileNetV3 is faster and is better at finding objects, we should make places365 deactivated/optional with a high minimum confidence.
This would allow us to keep the speed high, while allowing for advanced features like object detection and unique features like scene detection.

Was mostly an IO issue and is fast enough with the new service architecture.


Fix initialization issue in cache unit tests

This fixes a segfault that is likely the same one seen in CI. The diags may be accessed by the global FetchSM allocator, so we have to initialize them before that global is constructed. The name for the diags has been changed because we no longer have access to the unit test metadata at initialization.

[approve ci]

Will wait for #11464.


Warn before pull image when upgrading to the currently running version

If user get the Warn and give up the upgrade. we should not pull the image.
so move the Warn code before container.Pull() method.
Signed-off-by: Wang Long<EMAIL_ADDRESS>

I think moving the confirmation before the image pull makes sense. If we're already going to move one confirmation though, I think we should also move the other one.
Another issue with this is that the user should not have to confirm anything if they use the --stage flag.

@joshwget The current patch will have nothing to confirm if user use the --stage flag.

This should have been fixed in #955. Thanks @datawolf!


Cropped Image with dynamicSizing=true not respecting croppedWidth/croppedHeight

Hi there, thanks for the great lib!
I'm running in some problems with the following config:
this.cropperSettings = new CropperSettings();
this.cropperSettings.noFileInput = true;
this.cropperSettings.width = 150;
this.cropperSettings.height = 150;
this.cropperSettings.croppedWidth = 150;
this.cropperSettings.croppedHeight = 150;
this.cropperSettings.dynamicSizing = true;
this.cropperSettings.cropperClass = "custom-class";

css
.custom-class {
  width: 100%;
}

The cropped image seems dependent on the canvas size it has available and not fixed to my settings of 150/150. Am I doing something wrong? Tried a lot of different settings but always get squeezed images as output. Some are much bigger 750/300ish, depending on the available size for the canvas. When i remove the dynamicSizing everything is okey (except for not being responsive).
edit:
using angular 4.0.0 and 0.8.4 of your lib

So ... not sure that I really understand your problem but there might be the chance that you stumble upon a bug.
If you need to preserve size of the final output image you can set:
this.cropperSettings.preserveSize = true;
and you will get (as output) a cropper image with 1-1 pixel ratio with the original.
there was a bug there and I am going to do a release on 0.8.5 today for you to check.
if still reproducible - can you please send me 2 image samples with the bug?
thank you!

Thanks for the answer, i will check that out. What i expected was that the cropped image has the size I specified in the settings. Let me show you how it behaves.
Original Image:

With the following settings I get this image
this.cropperSettings = new CropperSettings();
this.cropperSettings.noFileInput = true;
this.cropperSettings.width = 150;
this.cropperSettings.height = 150;
this.cropperSettings.croppedWidth = 150;
this.cropperSettings.croppedHeight = 150;

And with those new settings i get that image
this.cropperSettings = new CropperSettings();
this.cropperSettings.noFileInput = true;
this.cropperSettings.width = 150;
this.cropperSettings.height = 150;
this.cropperSettings.croppedWidth = 150;
this.cropperSettings.croppedHeight = 150;
this.cropperSettings.dynamicSizing = true;
this.cropperSettings.cropperClass = "custom-class";

is .custom-class sets the image width to 100%?

yes, that seems to be necessary that the control is responsive

That seems to be the output image not the cropper - so custom-class does not apply here

I can reproduce this when:
this.cropperSettings1.keepAspect = false;
but I am trying to enforce a fixed width/height on the cropped result
this.cropperSettings1.croppedWidth = 200;
this.cropperSettings1.croppedHeight = 200;

The settings:
this.cropperSettings.dynamicSizing = true;
this.cropperSettings.cropperClass = "custom-class";
apply only on the cropper canvas component and hidden canvas used as buffer

Its also reproducable with keepAspect=true. I guess you set the preview image similar to this:
<img [src]="data.image" [width]="cropperSettings.croppedWidth"
                                     [height]="cropperSettings.croppedHeight">

Which in turn corrects the wrong sized cropped image to show as if its correct. But you can see in the dev-tools that the image is out of proportion (or in my case i can also see the uploaded result has resolution 756x378 with dynamicSizing and custom-class instead of 150x150 without dynamicSizing and custom-class).
Is there a way to force the cropped result to be a fixed size with dynamic sizing or is it a bug or am I doing something wrong?

here's what i mean:

@Theophabis have you tried the following
<img [src]="data.image" [width]="croppedWidth"
[height]="croppedHeight"> ?

@limpep yes thats what I do. You can see in the screenshot above that the preview image from the img-tag looks okey because it has fixed width/height set that corrects the wrong sized data.image.
On the right side of the screenshot you see the chrome dev tools that show the real data.image with wrong resolution.
The problem is not the preview image, its that data.image has the wrong resolution. The first images that i postet in answer 2 are the actual images that are in data.image and not from a preview or something.

This is definitely a bug, as preserveSize: true with dynamicSizing: true causes the output image to be cropped with the correct ratio but the wrong dimensions (the dimensions use the croppedWidth/croppedHeight ratio but scaled to the original image size).


undirected graph setting fix

Description
Please include a summary of the change. For large or complex changes please include enough information to introduce your change and explain motivation for it.
Changes proposed in this pull request:

/intelci: run

/intelci: run


[4.14] OCPBUGS-21472: fix: CVE-2023-39325 and CVE-2023-44487

Description
It fixes CVE-2023-39325.
Fixes OCPBUGS-21472
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

/jira refresh

/label backport-risk-assessed

/lgtm

/label qe-approved

/label cherry-pick-approved

/label staff-eng-approved

/assign @openshift/openshift-staff-engineers

/assign @jerpeter1

/lgtm

/hold

This is on hold until after 4.14 is GA

/unhold


Lint/ReturnInVoidContext should not work if there is a condition

Hello!
The new Lint/ReturnInVoidContext cop is good, but I found an unpleasant situation.

Expected behavior
Code:
## Set (or delete) cookies for response
## @param key [String, Symbol] name of cookie
## @param new_value [Object, nil] value of cookie
## @example Set new value to `cat` cookie
##   cookies['cat'] = 'nice cat'
## @example Delete `cat` cookie
##   cookies['cat'] = nil
def []=(key, new_value)
  return @response.delete_cookie(key.to_s, path: '/') if new_value.nil?
  @response.set_cookie(key.to_s, value: new_value, path: '/')
end

Lint/ReturnInVoidContext should not work, I guess, for situations, where return used with condition (void context doesn't care about return anyway, does it?).
Actual behavior
Lint/ReturnInVoidContext triggers and it forces you to write more code:
def []=(key, new_value)
  if new_value.nil?
    @response.delete_cookie(key.to_s, path: '/')
  else
    @response.set_cookie(key.to_s, value: new_value, path: '/')
  end
end

Steps to reproduce the problem
Write a code as in example above, run rubocop >= 0.50.
RuboCop version
$ rubocop -V
0.50.0 (using Parser <IP_ADDRESS>, running on ruby 2.4.2 x86_64-linux)

This is packing too work into one line IMO:
return @response.delete_cookie(key.to_s, path: '/') if new_value.nil?

Its like a regular guard clause, but doing some extra work before exiting the method by sticking it into return's argument.
I think the cop is justly prompting you to reconsider.

but doing some extra work before exiting the method by sticking it into return's argument.

I'm ready to put up with this "extra work".

I think the cop is justly prompting you to reconsider.

…and write 4 LoC instead of 2, yep. I'm not sure that getting rid of "extra work with return" is worth it. I doubt that it's very costly in performance.

I wasn't referring to line count or performance, just clarity.
Anyways, your code is providing an argument to return when it will be ignored. The cop isn't wrong for pointing that out. The debate is only whether this pattern should be exempt.

I wasn't referring to line count or performance, just clarity.

I referred to LoC, you referred to "extra work", what is meant "performance", I think.

Anyways, your code is providing an argument to return when it will be ignored. The cop isn't wrong for pointing that out. The debate is only whether this pattern should be exempt.

Yes.

Ignoring the problems of the specific example, the question of whether guard clauses in a void context method definition are okay seems legitimate.
On one hand, if you have a guard clause in a method without return value, you have no indication of which execution path the code took. On the other hand, in some cases that might not matter, as long as the behaviour is the same for both paths. 🤔

guard clauses in a void context method definition

To be clear, the offense isn't because of the guard clause or the conditional, only because return is given an argument. This code has no offense:
def []=(key, new_value)
  return if new_value.nil?
  @response.set_cookie(key.to_s, value: new_value, path: '/')
end

@mikegee: Then I agree this cop is behaving as intended. Saying return foo if bar? from within a void context is misleading at best. 🙂

This code has no offense:

And doesn't have cookie deletion, yes, great :confused:

Saying return foo if bar? from within a void context is misleading at best. :slightly_smiling_face:

allows you to write less code at best * :pensive:

And doesn't have cookie deletion, yes, great 😕

It looks like this object wants to implement a Hash like interface. To delete something from a hash, you use the Hash#delete method. So this could be an idea. Or just using an if-else clause over a guard clause also works.
Right now the API is a bit obscure. The method is overloaded with a special value that if you associate a key to that value, the key is deleted. There's no way to find that out without going in and reading the documentation or the code. (Unless this is a very strong convention in the project.)
It results in this strange trade-off that, in order to make the method less explicit about what it does (deleting something), it is forced to be more explicit about something it doesn't do (returning something.)

allows you to write less code at best * 😔

Less code is not an end in itself. We could probably meta-program most applications down to a few 100 lines of code, and make it completely impenetrable in the process.
What we want is code that is readable, understandable, and clear in its intent. Often less code is easer to read and understand, so it can work as a proxy measure, but there's a balance to be had. 🙂

@Drenmi OK, thanks.


Fix PreparedStatement.getParameterMetaData failing against encrypted columns

Fixes issue https://github.com/Microsoft/mssql-jdbc/issues/493
I purposely commented out the code instead of deleting it, since we might want to refer to this part of code in the future.

Turns out we won't be able to use the approach used here, due to the limitations of the implementation that relies on FMTONLY. We will have to search for an alternative - closing this PR in the meantime.


[BUG]  setCookie fails to login

Describe the bug
Using the updated setCookie methods, Any attempt to login using them gives the error: Failed to validate cookie: Are you sure the cookie is valid?
Ensure you include the full cookie, including warning text..
Code:
var cookie = "cookie was here"
function login () {
  return rbx.setCookie(cookie)
console.log(cookie)
}
login().then(function () {
  app.listen(port, function () {
  var Embed111 = new Discord.RichEmbed()
              .setTitle("VPS Request")
              .setDescription("A request to login was made and passeed!")
              .setColor("GREEN")
              .addField("Listening on Port: ", port)
              .setFooter("All Rights Reserved, SecureService Ranking")
              .setTimestamp();

              Webhook.send({embeds: [Embed111]});
    console.log('Listening on port ' + port)
  })
})

Expected behavior
Bot should login.
Screenshots

(Bot running on Nodejs v10 on Ubuntu 18.04)

Issue fixed, Had to re install the docker image used in the host, Works perfect.


noble fails to install on Raspberry Pi Zero

I am trying to install node-red-node-sensortag on a Raspberry Pi Zero running Jessie Lite. It gets to the a point in the install when it hangs at the stage:
extract:noble: verb gentlyRm don't care about contents; nuking /home/pi/.node-red/node_modules/.staging
I also tried to npm install noble itself and was met with a similar hang.
I can do the install successfully on a Pi 3 with the full Jessie image. Is the older ARM processor on the Pi Zero supported by noble?

As I was creating the issue, I had left the npm install running. After about another 10 minutes of elapsed time, the hang at the extract:noble stage was overcome and in another 20 minutes or so, the installation completed.
So I will close the issue although I am curious why the process is so drawn out. Is the Pi Zero that underpowered -- maybe it is.


Rework FPI tests

What should be done?
See https://github.com/0xPolygonMiden/miden-base/pull/896#discussion_r1795182825
How should it be done?
The indexes of the obtaining values should be changed from 0 to 1 and 2 to get the value from the first slot and a map from the second.
When is this task done?
This task is done when the tests will check that we can correctly obtain elements not only from 0th storage slot.
Additional context
No response

@Fumuran - is this now closed by #957 or is there anything else outstanding?

There are some issues about FPI tests which I described in the PR, but in terms of this issue the work is done, so I think we can close it.

Closed by #957.


Function set cookie with expired date

Set cookies without expires but functions of static web apps set cookies with expires=Mon, 01 Jan 0001 00:00:00 .
Code
https://github.com/hynjnk/azure-static-web-demo
  context.res = {
    // status: 200, /* Defaults to 200 */
    body: 'Hello, world.',
    cookies: [
      {
        name: 'cookie1',
        value: 'value1'
      },
      {
        name: 'cookie2',
        value: 'value2'
      }
    ]
  }

Function Endpoint

Static Web Apps Function https://jolly-mud-0554ede00.azurestaticapps.net/api/SetCookie

Functions App https://azure-function-demo.azurewebsites.net/api/SetCookie

@mkarmark Could you please take a look?

The fix for this issue has been globally deployed. Let me know if you have any further concerns!

Looks good. Thanks for the fix!


Fix compilation under mingw gcc

Include cmath header and use std::pow

That looks ok, thank you @resetnow for your contribution


Add timeoffset option to gam version

Service account is most impacted by wrong time so let's make it a default part of that check before we check each scope. If we're off by 30 or more seconds we should FAIL with an error to fix clock.


Unable to use custom form type

Enhancement
Greetings,
I wish to create a custom datepicker addon, as the angular-schema-form-datepicker addon does not suit my needs.
I have tried understanding the docs on creating an addon, but I seem to miss something somewhere.
Expected behaviour
As in the docs, the custom field uses the bootstrap decorator, I figured I would not need to create my own decorator. I mainly copied most code, changing only the settings to fit my project.
I would expect the field to show up by now.
Actual behaviour
Unfortunately, the field does not show up, I also do not get any errors in the console, and the extension's .html is also not loaded.
Demo
Here is my controller:
var app = angular.module('testApp', ['schemaForm']);
app.controller('FormController', function($scope) {
    $scope.schema = {
        type: "object",
        properties: {
            name: {
                type: "string",
                minLength: 2,
                title: "Name",
                description: "Name or alias"
            },
            email: {
                type: "string",
                format: "email",
                title: "E-mail address",
                description: "Example<EMAIL_ADDRESS>            },
            birthdate: {
                type: "date",
                title: "Birthdate",
                description: "Enter your birthdate"
            }
        }
    };
    $scope.form = [
        "*",
        {
            type: "submit",
            title: "Submit"
        }
    ];
});

And here is the code for the custom field type:
var app = angular.module('testApp');
app.config(function(schemaFormDecoratorsProvider, sfBuilderProvider) {
    schemaFormDecoratorsProvider.defineAddOn(
        'bootstrapDecorator',
        'date',
        '/client/fieldtypes/datepicker.html',
        sfBuilderProvider.stdBuilders);
});

And the fields html

    {{form.title}}
    <input sf-field-model schema-validate="form" type="text" placeholder="Hello, its me">

Thank you for your time, and I hope to get your response.
@json-schema-form/angular-schema-form-lead

Did you add your template to the templateCache?
$templateCache.put('client/fieldtypes/datepicker.html', '...')

I did not, where do you suggest I do this? Straight after defining the addon, at the beginning of my base file or elsewhere? Thank you for your reply.

I'm experiencing the same issue, @raoulus, this doesn't sound like the problem here, the URL to a template is the correct type of parameter looking at the documentation of the defineAddOn function.

Try it like this. Works for me.
var app = angular.module('testApp');
app.run(['$templateCache', function($templateCache) {
    $templateCache.put('client/fieldtypes/datepicker.html', 'YOUR_TEMPLATE');
});
app.config(function(schemaFormDecoratorsProvider, sfBuilderProvider) {
    schemaFormDecoratorsProvider.defineAddOn(
        'bootstrapDecorator',
        'date',
        'client/fieldtypes/datepicker.html',
        sfBuilderProvider.stdBuilders);
});

This has changed nothing for me, am I correct to assume I can use the bootstrap decorator and do not need to create a custom decorator?

@HeerRik yes you can use the bootstrap decorator and use the define addOn as @raoulus has explained above. The call does indeed take a url HOWEVER the url MUST have been loaded as a template.
https://github.com/json-schema-form/angular-schema-form/blob/master/docs/extending.md#the-template
You can compile the template the same way the bootstrap decorator compiles, I believe the addOn template repo also provides this ability from memory.

Also I would usually use a different name than the built in one or make sure your template and script is loaded last.

Please re-open if you do not feel the question has been answered sufficiently.

Hello again @Anthropic and @raoulus ,
Thank you for your responses, and I apologise for not responding the last few days.
I have created a plunk, with the code that, if I am not mistaken, is what it should be.
Now I do know, I have to compile the template into the templateCache, but how exactly do I do this?
Do I need to install gulp-angular-template?
Also, is the code I have so far correct?

@HeerRik in your plunker you are not loading any assets in the index.html. You have to reference angular, schema-form etc. Take a look at this plunkr https://plnkr.co/edit/ijhY8C?p=preview
template cache is basically a key-value store, you don't have to compile anything. Just follow the example above. I guess your problem has to do with loading/referencing the files in the right order.

@raoulus I didnt bother collecting all the cdn links for the plunker example, here is how it is in my actual project. It should be in the right order if I am not mistaken, loading dependecies first etc..

@HeerRik https://github.com/json-schema-form/angular-schema-form/blob/master/docs/extending.md#defining-a-decorator
Look at the example code below the text "This is the function that makes it a datepicker", you don't have that function in your plunker which is why it wont work.
You also don't load a decorator either so it has nothing to attach to.
Look at the working datepicker https://github.com/Textalk/angular-schema-form-datepicker/blob/master/bootstrap-datepicker.js copy it and change it, easily the quickest way to get yours working. Especially the end of the file where it defines the add on.

@Anthropic You would advise against using the .defineAddon and instead use .addmapping?


fix(cli): 🐛 merge user & commitlint configs when --commitlint

Codecov Report

Merging #18 (8192ca2) into master (c41e406) will increase coverage by 7.17%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
+ Coverage   61.39%   68.57%   +7.17%
==========================================
  Files          29       29
  Lines         316      315       -1
  Branches       56       56
==========================================
+ Hits          194      216      +22
+ Misses        115       92      -23
  Partials        7        7

Impacted Files
Coverage Δ

src/config/helpers/loadConfig.ts
36.36% <ø> (ø)

src/config/helpers/validate-config/constants.ts
100.00% <ø> (ø)

src/config/helpers/validate-config/lang.ts
100.00% <ø> (ø)

src/config/helpers/validate-config/schema.ts
100.00% <ø> (ø)

...nfig/helpers/validate-config/validateUserConfig.ts
100.00% <ø> (ø)

src/config/getUserConfig.ts
100.00% <100.00%> (+100.00%)
:arrow_up:

src/config/helpers/getCommitlintConfig.ts
31.25% <100.00%> (ø)

src/config/helpers/validate-config/validators.ts
100.00% <100.00%> (ø)

... and 1 more

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 c41e406...8192ca2. Read the comment docs.

Codecov Report

Merging #18 (8192ca2) into master (c41e406) will increase coverage by 7.17%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
+ Coverage   61.39%   68.57%   +7.17%
==========================================
  Files          29       29
  Lines         316      315       -1
  Branches       56       56
==========================================
+ Hits          194      216      +22
+ Misses        115       92      -23
  Partials        7        7

Impacted Files
Coverage Δ

src/config/helpers/loadConfig.ts
36.36% <ø> (ø)

src/config/helpers/validate-config/constants.ts
100.00% <ø> (ø)

src/config/helpers/validate-config/lang.ts
100.00% <ø> (ø)

src/config/helpers/validate-config/schema.ts
100.00% <ø> (ø)

...nfig/helpers/validate-config/validateUserConfig.ts
100.00% <ø> (ø)

src/config/getUserConfig.ts
100.00% <100.00%> (+100.00%)
:arrow_up:

src/config/helpers/getCommitlintConfig.ts
31.25% <100.00%> (ø)

src/config/helpers/validate-config/validators.ts
100.00% <100.00%> (ø)

... and 1 more

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 c41e406...8192ca2. Read the comment docs.


Add document.activeElement()

Add document.activeElement()

This issue was imported from Google Moderator
Moderator votes: +8
Issue added by Nicolas McCurdy on 2014-05-27
To vote this issue up or down, simply include +1 or -1 in your comment.

Duplicate of #1129.


Changing JSON Completion Block Handlers

Issue
Currently, in Swifter, each method's success handler depends on the method itself: multiple status lookup will return a JSON array, a tweet lookup will return a JSON dictionary, search (or anything that includes cursors, will return ([JSON], prevCursor: String, nextCursor: String)
As convenient as it may seem, this is counter-intuitive as those objects are no longer able to directly use JSON methods for accessing it's properties.
For example, if you fetch a tweet, you'll receive a Dictionary<String, JSON> object. When you access the text property, you'll have to do this...
let tweet: [String: JSON] = /* returned tweet object */
if let tweetText = tweet["text"]?.string {
  // ...
}

Since tweet is a dictionary, and not a JSON object, using subscripts will return an Optional(JSON), rather than the standard JSON type you would get when you access through a JSON object. This makes it slightly redundant to access the .string property as it is already an optional value.
Proposal
Change all (where appropriate) Swifter success handlers to use "raw" JSON without using .array or .dictionary before handing the object to the completion block. This would simplify the process of accessing the values from the JSON. The previous example would then be like the following, with no redundant ? optional casting involved, making it clearer for the client to use.
let tweet: JSON = /* returned tweet object */
if let tweetText = tweet["text"].string {
  // ...
}

Changes to Swifter
Current Swifter methods, such as
public func showUser(screenName: String, includeEntities: Bool? = nil, success: ((user: Dictionary<String, JSON>?) -> Void)? = nil, failure: FailureHandler) { ... }

will simply be changed to
public typealias JSONCompletion = (JSON) -> Void

public func  showUser(screenName: String, includeEntities: Bool? = nil, success: JSONCompletion? = nil, failure: FailureHandler) { .. }

Impact
Obviously, anyone using Swifter will have to update their client code accordingly to use the JSON objects instead of the casted ones provided in current versions of Swifter. However, since we're already planning on changing a lot for Swift 3, it's best if we do this now, than later.

Speaking of JSON: can we please get rid of the JSONInvalid case?
We could just return nil where necessary instead (and use failable initializers).

Definitely in favour of this change. I originally introduced the JSON type to help with accessing nested JSON values, but in the newer versions of Swift this is no longer a problem

@zntfdr I actually find the .invalid case very useful, because we're able to chain the JSON without having to optionally cast it. The client should never need to check for .invalid, since they'd just access the values by .string, .object, .array, .double, etc; and if the JSON is .invalid, it'd just be return nil on its own when accessed through the methods.

@meteochu you're right:
I was reading the JSON.swift file and missed the .object computed property (I haven't used Swifter in a while :sweat_smile: ).
With that property and your explanation .jsonInvalid makes sense.
Thank you.
Since we're talking about JSON.swift, what about these three lines?
Can't we embed them inside the JSON declaration (or in an JSON extension) as static, even computed, properties?

I took them out when I was doing some stuff over the weekend. (Completely forgot to push it, oops)
I've also renamed all the enum cases to remove the redundant json title in it.
Check out the swift-3 branch JSON.swift

Great job, thank you!

Complete as of 2024e35905efeaf7509bc1fbbf5eac2a06213142


[Feature Request] Improve docs for configuration Android Studio

Is your feature request related to a problem? Please describe.
The currently docs about configuration Android Studio, do not fit with the new setup by FVM 3.0
Describe the solution you'd like
I would like that the documentation will be clear about how configure Android Studio to handle dynamically flutter version with FVM 3.0 setup
Describe alternatives you've considered

Update documentation

Additional context
With the currently setup, the flutter version won't be dynamically

@deandreamatias will leave this open, but there was a PR brought over to improve this
https://github.com/leoafarias/fvm/pull/576, will document later

@deandreamatias There is the second symlink missing. There should be a flutter_sdk symlink, see
https://github.com/leoafarias/fvm/blob/e5c0c0fe5ef09ca64d471ef81f3d7b2e22c4420f/lib/src/workflows/use_version.workflow.dart#L272
And then it works like described in the docs.

@leoafarias Assign issue to me please, I can fix it in case there is really something not working as expected.

Ok, I investigated a bit further: https://github.com/flutter/flutter-intellij/issues/6616
Unfortunately, the behavior has changed to resolve symlinks which was not the case, when I did the PR #576.
So, at the moment, it seems that with Android Studio the automatic SDK switch is broken.
Best would be, if the Flutter Plugin supports FVM, see: https://github.com/flutter/flutter-intellij/issues/6289 - which is not likely to happen from the official team.
In .idea/libraries/ are several files with paths to the SDK. Before the current behavior, the IDE wrote a PROJECT_DIR path in it. With the current behavior, it resolves the symlink and writes  USER_HOMEDIR paths in it, which breaks the dynamic SDK switch.
FVM could update those paths, but this will likely get overwritten by the IDE anytime, so it will break again.
It looks like puro.dev is doing it: https://github.com/pingbird/puro/blob/146a79d729aff35dc2282bb076047d1e166f1e21/puro/lib/src/workspace/intellij.dart#L75-L160 - so they will have the same issue as soon as the plugin is saving something different/new paths.


Support and documentation for services injected through component constructors

I'm using the approach described at https://github.com/dotnet/aspnetcore/issues/18088 so my components' dependencies are injected through constructor parameters.
namespace modelx.app.ui
{
  public partial class Project : IAutoRegisteredComponent
  {
    private readonly ILogger _logger;

    [ActivatorUtilitiesConstructor]
    public Project(
      ContextLoggerFactory contextLoggerFactory)
    {
      _logger = contextLoggerFactory.Invoke(GetType());

What is the correct way in bUnit to instantiate and test such components? It would be great to add it to the documentation.
Relevant initialisation code:
using System;
using System.Linq;
using System.Reflection;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;

// ReSharper disable once CheckNamespace
namespace modelx.app
{
  public interface IAutoRegisteredComponent
  {
  }

  public partial class Program
  {
    // https://github.com/dotnet/aspnetcore/issues/18088
    private static void Components(IServiceCollection services)
    {
      services.Replace(ServiceDescriptor.Transient<IComponentActivator, ServiceProviderComponentActivator>());

      var autoRegisteredComponentTypes =
        Assembly.GetExecutingAssembly().GetTypes()
          .Where(p => typeof(IAutoRegisteredComponent).IsAssignableFrom(p) && p.IsClass);
      foreach (var type in autoRegisteredComponentTypes)
        services.AddTransient(type);
    }
  }

  public class ServiceProviderComponentActivator : IComponentActivator
  {
    private readonly IServiceProvider _serviceProvider;

    public ServiceProviderComponentActivator(IServiceProvider serviceProvider) =>
      _serviceProvider = serviceProvider;

    public IComponent CreateInstance(Type componentType)
    {
      var instance = _serviceProvider.GetService(componentType) ??
                     Activator.CreateInstance(componentType);

      if (instance is not IComponent component)
        throw new ArgumentException(
          $"The type {componentType.FullName} does not implement {nameof(IComponent)}.",
          nameof(componentType));

      return component;
    }
  }
}

Hi @AlexAtNet
Interesting solution. I have not tried this before, but bUnit's TestContext has a Services collection that should work just like the IServiceCollection in your Programs.Components method, so the you should be able to similarly register your own IComponentActivator with bUnit:
[Fact]
public void Test()
{
  var ctx = new TestContext();
  RegisterComponents(ctx.Services);

  ctx.Services.Replace(ServiceDescriptor.Transient<IComponentActivator, ServiceProviderComponentActivator>());

  var cut = ctx.RenderComponent<...>();

  // ...
}

private static void RegisterComponents(IServiceCollection services)
{
  services.Replace(ServiceDescriptor.Transient<IComponentActivator, ServiceProviderComponentActivator>());

  var autoRegisteredComponentTypes =
    Assembly.GetExecutingAssembly().GetTypes()
      .Where(p => typeof(IAutoRegisteredComponent).IsAssignableFrom(p) && p.IsClass);
  foreach (var type in autoRegisteredComponentTypes)
    services.AddTransient(type);
}

I dont see any reason this should not work, as long as your component activator also works with "regular" components do not use constructor injection, but instead use the normal property based injection in Blazor.

Fantastic, it works just as expected. Thank you very much!  Would be great to add this to the documentation.


SocketListener warnings in Travis log when using Arduino IDE 1.8.2

Use of install_package or build_sketch functions with Arduino IDE 1.8.2 causes many SocketListener warnings such as:
[SocketListener(testing-gce-b31aaad6-3573-4af8-8ea4-e547cb17aa6f-c-travis-ci-prod-5-internal.local.)] WARN javax.jmdns.impl.DNSIncoming$MessageInputStream - bad domain name: possible circular name detected. Bad offset: 0x3fff at 0x72

as well as other undesirable output.
For example:
https://travis-ci.org/per1234/arduino-ci-script/builds/223366084#L358
and
https://travis-ci.org/per1234/arduino-ci-script/builds/223366084#L1039
This also occurs with the hourly build of the Arduino IDE:
https://travis-ci.org/per1234/misc/builds/220508986#L188
It does not occur with Arduino IDE 1.8.1 or older:
https://travis-ci.org/per1234/arduino-ci-script/builds/223366084#L1020
It does occur with Arduino IDE 1.9.0 beta build 31:
https://travis-ci.org/per1234/misc/builds/325452271
The undesirable output (along with desirable output) does not appear when stderr from the verification is redirected to /dev/null:
https://travis-ci.org/per1234/misc/builds/412440730
This does not affect the build success but it makes it very difficult to read the log.
The ideal solution is to find a way to configure the Travis CI environment so this output is not produced.
The workaround solution is to filter the undesirable lines from the output. This has the potential for false positives.
UPDATE: Workaround completed in https://github.com/per1234/arduino-ci-script/commit/bc7f89a9aed35f2644c49bc524db11645772012e
If future versions of the Arduino IDE can be modified to avoid the creation of this output that would be nice but it will not solve this issue since the output will still occur with the previously released versions that will be used for testing backwards compatibility.
Arduino forum thread:
http://forum.arduino.cc/index.php?topic=469428
Somewhat related: https://github.com/arduino/Arduino/issues/7388

I ran into a similar problem. It appeared when I added sudo apt-get install libc6-i386 on 64-bit Ubuntu (trusty) under Travis to test our library with a new BSP. Reverting the change also cleared up the unwanted output. The problem, of course, is that there are some 32-bit-only tools in the BSP in question (in particular, STM32 dfu-suffix in this BSP is not shipped in 64-bit form). Luckily, i could use a --pref option to disable use of this 32-bit tool when doing CI. (It's always called at the end of a build.)
I could not find anything your scripts or test files that was installing libc-i386; so this might be irrelevant. Nevertheless, the messages were identical. Note that the query appears to be looking for names containing 'travis'. It's possible that this is a travis setup problem.

@terrillmoore thanks for your information!
I did some more tests and am even more confused than ever. Using identical configurations in two different repos, one has warnings, the other doesn't.
It seems like the warnings may be related to using symlinks but it's extremely difficult to investigate this with these inconsistent results.
The fact this problem doesn't always occur (as I had previously thought) gives me hope that it's possible to find a real solution to this problem but, for now, it's beyond me.

Hmm. strange, this problem resurfaced today. No changes on my part. I am not sure what's happening, but it may be related to the recent migration of the referenced repos from travis-ci.org to travis-ci.com. This both slows down my builds and causes extra messages (seems to be one message per compile step).
This is happening with 1.8.5 and 1.8.7 IDEs. It's no longer conditional on which BSP I use.
Since this is coming from the JDK, it seems like there must be some kind of a setting problem or environment problem.

Well, I can guess what's happening. jmdns implements bonjour, so it's listening for broadcasts. TravisCI is not running our tests in a stand-alone environment. My guess is that some other process(es) in the same compute cluster are sending bonjour notifications, triggering the messages. There's probably nothing we can do about it. This would explain the randomness. Seems unlikely that this would have anything to do with symlinks.
I have no idea if it's possible to run IPFW on Travis VMs or if they'd be effective. But maybe this should be brought up with Travis tech support? It's likely something they can fix.

Thanks for your comment terrillmoore. I also have thought that this might be something only Travis CI can fix, since it doesn't seem like Arduino thinks they can do anything. The problem for me is that I am reluctant to report bugs that I don't have a fairly good understanding of. I've found that, all too often, developers take the attitude of "user error unless overwhelming proof is given to the contrary" and I am required to provide a rigorous defense of my bug reports to get them taken seriously, even when I thought I had made the issue quite clear from the start. In this case, I don't feel I have good footing for such a defense.

I can confirm that bringing the network down, then compile using arduino --verify... and then back up prevents the annoying messages. Of course that does not work if the Arduino-IDE is supposed to download something.
The relevant part is:
- sudo ifdown -a
- arduino --verify --board $BD Desk-Lamp-Alternative-Firmware.ino
- sudo ifup -a

I think I know what the root cause is -- the IDE is checking for updates and this destructively interferes with the VM/Docker config on Travis. If the Arduino IDE people could have a switch to disable checks for updates, that would simplify things (and probably make builds faster too, as there's no need to check for updates during CI testing). The firewall hack is a nice one, thanks @Torxgewinde.

Oh so happy, thank you @Torxgewinde . I was struggling to read the CI logs. Also thanks for @per1234 for dealing with the issue in the first place.


Make debounce specific to the instance

This is a start at a solution to #47
This change solves the problem I was having, but creates a new big one as the mode detection is now broken. The syntax highlighting is gone and the auto indent doesn't work. Hoping for suggestions.
Also worth noting is that our tab settings are clearly different (annoying) and that git thinks I added the onScroll stuff when in fact it was already there.

After experimenting I see that the mode detection is broken even when I don't have my debounce change in place. The only change I have in my local copy is the ref change that I required to avoid the "Only a ReactOwner can have refs" error. This, apparently, is enough to break mode detection.

Believe it or not, the error I reported was a result of a browser caching issue.
With that out of the way, I can verify that my change works and I've detected no issues whatsoever. This should be good to merge!

Update regarding the broken language detection, as my previous comment was inaccurate.
When I am linked to my local copy of react-codemirror before running npm start, my debounce change works but the language detection does not work.
When I am using the published version of react-codemirror before running npm start, and then link to my local copy while webpack is running and trigger a reload, then the language detection works (and my debounce change still works if that's not obvious).
Is this something I need to be concerned about? Using webpack & browser sync. @JedWatson some input on this would be much appreciated.

Pried a little further and I see that in scenario 1 where I start out with my local copy linked, all the node_modules are being loaded, so there are multiple copies of react, which is probably the issue.
In scenario 2, where I link my local copy with webpack running, I get the right version of Codemirror.js, but without all the node modules pulled in. So I'm guessing this issue is specific to my development setup rather than to the change I made.
Some pointers on how to link this without causing these issues would still be very nice, but this should not be a blocker for this PR to be merged.

Any chance of getting a review on this?

Just a note that I've also stumbled on issues caused by #47 too — my first instance of CodeMirror on a page doesn't keep its options in sync with state when there is another instance on the page too.
This pull request solves the problem for me.

I can vouch for this PR too. I have several Codemirrors on the same page and modifying the 'value' (i.e. the code within the textarea) was only working for the bottom instance. With this PR, it works for all instances.
Thanks @sslotsky

@JedWatson Any chance of getting this PR reviewed?

This also fixed an issue I was having with redux state not updating multiple mirrors.
Thank you @sslotsky - @JedWatson you should consider merging this one.

I'm getting following error with this merge.
modules.js?hash=c05f772…:68425 Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

I agree with @sslotsky the ref string attribute are gone in version 0.15.0 and you need to use ref callbackup attribute.
check here
In render function
        return (
            <div className={editorClassName}>
                <textarea ref={(ref) => this.textarea = ref} name={this.props.path} defaultValue={this.props.value} autoComplete="off" />
            </div>
        );

in ComponentDidMount
 componentDidMount () {
        const textareaNode = this.textarea;

I was having the same problem where the value wouldn't update as @nm2501 and this fix worked for me too.
Thanks @sslotsky

Hey @sslotsky would it be worth rebasing this?
@JedWatson I'm more than happy to help steward maintenance here as are other folks in the PRs. Let us know if there's a way to resolve (or even close!) these PRs.

@rgbkrk I'd be happy to rebase it but I'd be even happier if I had some indication that @JedWatson is aware of this PR.

Sorry for the delay on this - I totally missed it (!)
Looks good, would be very happy to merge it if you don't mind rebasing @sslotsky.

@JedWatson Sure I'd be glad to rebase it. Would you also like me to undo the changes to lib? It occurs to me that you probably just compile before publishing, and that's why my lib changes included things that I hadn't touched in src.

Closing in favor of #68


A better 2D hull function

I have found a 2D hull function faster than the one implemented by hull2d_path().  I based may implementation on a C code referenced in a code comment. It performs a previous lexicographical sort of the input points and operates in two steps: initially it finds the lower points of the convex hull and then proceeds to the upper part of it. The implementation runtime seems to be linear with the number of input points for less than 300 points but I would expect that it has the optimal complexity.
I attached a file with the code implementation of the process including a random test of it and a runtime comparison with hull2d_path() (change the extension to .scad to run it). For 200 points, it is 5 times faster than the current implementation in BOSL2.
BOSL2_hull.txt

Hmm.  The file you link to is identical to the current BOSL2 hull.scad file.  Are you sure you linked to the correct file?

Diacho! I have attached the wrong file. Sorry. Here is the right one.
hull_points_2_BOSL2.txt

Looks like the new one returns the actual points instead of an index list.  Can you change it to return an index list?  I think that's better.  (Also easier to check that results match output from old code.)
I tested with 20k points and the new code took 3s compared to 59s for the old code.   New code was still showing linear runtime.  It handles 200k points in 39s.

Here is the revised code, now returning the indices of the points in the convex hull.
I have included a check to confirm the new code returns the same polygon returned by hull2d_path().
hull_points_2_BOSL2.txt

It looks good to me, and clearly faster.  I integrated it and found it failed a test for collinear inputs.  The old version handled this case differently, and also the cases of <3 points.  I adjusted it to match the old version and included it in my latest PR.

With a little change in the function _is_CW() , the function hull2d_path() is itself able to deal with the collinear cases:
function _is_cw(a,b,c) = cross(a-c,b-c)<-EPSILON;
Besides, that will eliminate the points on the hull border whose adjacent edges are (virtually) collinear (like the old function does).
So, the preamble of hull2d_path() could be just:
function hull2d_path(points) =
    assert(is_path(points,2),"Invalid input to hull2d_path")
    len(points) < 2 ? [] :
    let( n  = len(points),
         ip = sortidx(points) )
    // lower hull points
    ...

To be scale independent, a better definition would be:
function _is_cw(a,b,c) = cross(a-c,b-c)<-EPSILON*norm(a-c)*norm(b-c);
BTW, _hull_collinear() fails with
points = [[-10,0], [-10,0], [10,0] ]

The proposed change fails on line 9 of tests/test_hull.scad.

Yes, but the hull is the same:
hull(test_collinear_2d) == [1,7]
The assert should be rewritten.

That's not what I'm getting.
 ECHO: "EXPECT: [7,1]"
 ECHO: "GOT   : [1,2,3,4,5,0,6,8,7,8,6,0,5,4,3,2]"

function _hull_collinear(points) =
let(
    a = points[0],
    i = max_index([for(pt=points) norm(pt-a)]),
    n = points[i] - a
)
norm(n)==0 ? [0]
:
let(
    points1d = [ for(p = points) (p-a)*n ],
    min_i = min_index(points1d),
    max_i = max_index(points1d)
) [min_i, max_i];

I think this fixes the problem with _hull_collinear.

Indeed but it would be simpler:
function _hull_collinear(points) =
    let( ps = sortidx(points) ) [ps[0], ps[len(ps)-1]];

I am not so sure.  First of all sort is O(n log n) and finding the max is O(n).  But also, sort seems like it can choose a poor option, such as if the inputs are [0,0,0], [0,0,10],[0,0,100],[1e-9,0,0].  I show them in sorted order.  The third point is very close the the first, but sorts last because its first index is epsilon larger.

You are right. Clever counterexample.
A sábado, 6/03/2021, 03:00, adrianVmariano<EMAIL_ADDRESS>escreveu:

I am not so sure. First of all sort is O(n log n) and finding the max is
O(n). But also, sort seems like it can choose a poor option, such as if the
inputs are [0,0,0], [0,0,10],[0,0,100],[1e-9,0,0]. I show them in sorted
order. The third point is very close the the first, but sorts last because
its first index is epsilon larger.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/revarbat/BOSL2/issues/448#issuecomment-791849666, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AEYKSLMLM5ARR4GCHFZRIXLTCGLGNANCNFSM4YLEIJIQ
.


Feature request: provide a light entity

It would be great if the display could be switched on, off and dimmed through a light entity. The API calls are very simple for this.

Oh, strange enough the light entity now popped up. It wasn't there when I setup the integration in the first place. Thanks!


Some tidying up of config.json

The config file has got a little bit messy in places.
Some changes proposed:

Move all top level settings into sections. Add new top level sections for APPLICATION and EVENT.
Move APP_ID and APP_TITLE to APPLICATION.ID and `APPLICATION.TITLE'.
We have TIMEZONE and TIMEZONECODE settings. It would make sense to combine these into a section, and move under EVENT, so they would become EVENT.TIMEZONE.NAME and EVENT.TIMEZONE.CODE.
Move HEADER and NAVIGATION under APPLICATION.
Move settings like LOCATIONS and TAGS under PROGRAM.

I think these changes should wait until after Chicon, as we don't want to cause anything to break for it.

I like these ideas and am willing to help on this after Chicon. :-)


Frontend Modularization: Datasets

Feature or Bugfix

Refactoring

Detail

Move datasets views into dataset module
Move services that were only used by datasets into datasets module
Move datasets components into datasets module

Relates

#398

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jorgeig-space, and @nikpodsh
I moved all shared components into the Shared module, and shared services into services module.
The PR is quite big as it affects many other modules that are pending modularization.
I also updated the datasets module to be optional in case the user disables it in the configs.json file


Update merge_sort.cpp

Reduce the extra loop used by changing condition in merge function.
Description of Change

Checklist

[ ] Added description of change
[ ] Added file name matches File name guidelines
[ ] Added tests and example, test must pass
[ ] Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
[ ] Relevant documentation/comments is changed or added
[ ] PR title follows semantic commit guidelines
[ ] Search previous suggestions before making a new one, as yours may be a duplicate.
[ ] I acknowledge that all my contributions will be made under the project's license.

Notes:

Your use of dynamic arrays was correct. The error reported by the CI was to use *arr in the argument of function merge().


ignorePathCase for authz policy path matching

Implementation of this new field.

@briansonnenberg: PR needs rebase.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Hi @briansonnenberg. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


Form: automated today in form doesn't work correctly

Document
https://www.ccsce78.fr/uploaded/insc-2023.pdf
(GitHub doesn't allow to upload)
Same document as #16937 (where an issue of XFA vs AcroForm has been diagnosed).
Configuration:

Web browser and its version: Firefox 117.0
Operating system and its version: MaxOS
PDF.js version: Firefox 117.0 built-in
Is a browser extension: no

Steps to reproduce the problem:

Open the document
At the bottom of first page there is a input field that is supposed to contain the dynamic date of today, in format DD/MM/YY. Same on a similar field on the second page.

What is the expected behavior? (add screenshot)
Today I expect to see "12/09/23".
What went wrong? (add screenshot)

The field contains "19/12/22" which I suppose is the date when the document has last updated with Acrobat tools.
As the field is not editable, I can't even manually fix the value.

(GitHub doesn't allow to upload)

That's actually supported, please note the Attach files by dragging & dropping, selecting or pasting them. at the bottom of all input-fields here at GitHub.

Same document as #16937 (where an issue of XFA vs AcroForm has been diagnosed).

Isn't this issue effectively a duplicate of the other one, since it seems that none of the AcroForm-fields have working scripting and you'd apparently need to use the XFA in order for this to actually work?
Opening the PDF document in PDFium (i.e. the Google Chrome PDF Viewer) it appears to be similarly "broken" there as well.


Is the variable of "colors"  really used for optimization?

https://github.com/KevinXu02/splatfacto-w/issues/10


abnormal circulating tyrosine level - amend definition

The definition for abnormal circulating tyrosine level MP:0013722 currently reads:
CURRENT DEF: the amount of the amino acid histidine in the blood is more or less than expected
Same is true for its child terms decreased circulating tyrosine level MP:0013724 and increased circulating tyrosine level MP:0013723 where definition uses histidine instead of tyrosine in error.
Amend definition as follows:
abnormal circulating tyrosine level MP:0013722
SUGGESTED DEF: aberrant concentration in the blood of tyrosine or 4-hydroxyphenylalanine, a non-essential amino acid with a polar side group present in most proteins and synthesized metabolically from phenylalanine; tyrosine is a precursor of melanin, catecholamines, and thyroid hormones
DEF SOURCE: https://medical-dictionary.thefreedictionary.com/tyrosine

Amended definitions for abnormal circulating tyrosine level MP:001372 and its child terms, as suggested above.


process name

I have not done a lot of work with atom-shell, but would be nice to name the process differently. Related to #5 I had to hunt for which process to kill, top shows it as Atom.

this is a good question... i'm not sure. I just looked through the atom-shell issues and didn't see anything obvious

https://github.com/atom/atom-shell/issues/1345 just got fixed


Add newline for REPL output

The current REPL library doesn't provide whitespace between the expression and the output.  With the REPL here, we have the ability to color the prompt which helps.  to visually group the expression with the output.  But with the PAC CLI, we don't have this ability and it all bleeds together.  This is particularly true for Power Fx where an expression could cause recalc of other values which are rightly shown in the output.
In short, we want to change this:

Into the slightly longer, but much easier to parse and read:

We could have fixed this just in the PAC CLI, however I prefer this whitespace here too and consistency is good.  This also ensures that table formatting works correctly with added newlines.  It also mirrors the tests cases.

✅ No public API change.


favicon for api

now that documentation route exists browsers will be asking for this ugh

robots and humans file too?


What Python version is required?

I'm trying to find out which Python version this is targetted at. The 'print' statements suggest it's Python 2.x, but when I try running it (e.g. coapserver.py) it can't import 'concurrent.futures', which is a Python 3.x module. How can I get this to run?
Thanks
Ian

Hi
as you supposed it is python 2.7, the concurrent.futures package has been ported to python 2.7, if you follow the installation instructions you will end with the concurrent.futures package installed through pip.
Best
Giacomo


Stop blink while dropping node from source to destination

Hello all,
Is it possible to stop blink(make sure to drop first node if tree is empty).
Now what happening is like on move, sometimes placeholder disappear and sometimes placeholder remains as it is and element get not dropped.
If destination tree is empty then dropping tree node must be dropped withing box and not out of box. How we can achieve?

I'm facing the same issue, please resolve this asap


Create elam.txt

@SigSec I am sorry for a delay with processing your request.
Pull request merged. Thank you!


Added an error type [Attachment Failed]

Here I have added a new error type [AttachmentFailed]. This can be returned whenever any VHD's or ISO files fail to get attached during VM creation.

@abhadoriya26 could you please abandon this PR?


Deployment Failed.

I have checked Vercel dashboard there are only successful deployments and I cannot find any that have resulted in errors.
It states my last upload was 2 hours ago, despite the fact that I have published barely a few minutes ago. I am not sure why the logs are not publishing on vercel

I'm thinking that I've reached the 100 deployment limit. I have decided to stop all deployments from main branch and any deployments that occur will be directed to the deployment branch.


chore: project addition by Bhumica #1683

Related Issue
#1683

Description
Added a TO-DO LIST. This project is a to-do list where users can add new items in different lists and strike out them to mark them as completed. It is easy to use. Fully responsive.

Screenshots

New item added

New list

Hello,
I wanted to ask, about the points. My 2 pull requests have been merged in
this repo, but sadly, when I checked the leaderboard, I haven't received
any points for the same. I would be very grateful to know about this.
Thank you in advance.
Bhumica.
On Thu, 13 Jul, 2023, 7:42 pm Priyankar Pal, @.***>
wrote:

Merged #1684 https://github.com/priyankarpal/ProjectsHut/pull/1684 into
main.
—
Reply to this email directly, view it on GitHub
https://github.com/priyankarpal/ProjectsHut/pull/1684#event-9811727636,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AWY3E5O4WY5CYENRUVQ7FOLXP766LANCNFSM6AAAAAA2IMF4UQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hello, I wanted to ask, about the points. My 2 pull requests have been merged in this repo, but sadly, when I checked the leaderboard, I haven't received any points for the same. I would be very grateful to know about this. Thank you in advance. Bhumica.
…
On Thu, 13 Jul, 2023, 7:42 pm Priyankar Pal, @.> wrote: Merged #1684 <#1684> into main. — Reply to this email directly, view it on GitHub <#1684 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY3E5O4WY5CYENRUVQ7FOLXP766LANCNFSM6AAAAAA2IMF4UQ . You are receiving this because you were mentioned.Message ID: @.>

We are not providing any labels for project additions as they are not associated with solving any issues(according to GSSoC23 rules)


CachableLookup preventing Jest from exiting

I'm not sure if this or CachableLookup is the right place to report it, but it appears a dependency of this module is preventing Jest from shutting down after running tests. When run with the --detectOpenHandles option I'm seeing:
Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  DNSCHANNEL

      at new CacheableLookup (../node_modules/cacheable-lookup/source/index.js:91:14)
      at new Request (../node_modules/amply.js/lib/request.js:64:21)
      at new Client (../node_modules/amply.js/lib/client.js:9:20)
      at Object.<anonymous> (../node_modules/amply.js/index.js:4:18)

I'd opened https://github.com/szmarczak/cacheable-lookup/issues/58 to see if they could help but the error goes away when I comment out these two lines:
https://github.com/sendamply/amply-js/blob/3d726e373b4a72e4477c175087d8d7ef521ed070/lib/request.js#L64-L65
I'll try downgrading to the 0.0.2-rc.8 release and see if that addresses it.

Maybe the solution is to just upgrade Jest? https://github.com/facebook/jest/pull/11470 Seems like they no longer think this is a problem.


startcli with X

Is there a way to launch X apps from startcli without loading all desktop?

Take a look at 'startxiwi', it might do what you want.
chronos@localhost ~ $ startxiwi
startxiwi [options] chroot_app [parameters]

Wraps enter-chroot to launch a window or tab in Chromium OS for any graphical application.
Applications launched in this way show in independent windows or tabs.

By default, it will use the primary user on the first xiwi-enabled chroot found and launch
the chroot_app in a window.

Options:
    -b          Fork and run the specified command silently in the background.
    -c CHROOTS  Directory the chroots are in. Default: /mnt/stateful_partition/crouton/chroots
    -k KEYFILE  Override the auto-detected encryption key location.
    -n NAME     Name of the chroot to enter. Default: first one found in CHROOTS
    -t TARGET   Only enter the chroot if it contains the specified TARGET.
    -u USERNAME Username (or UID) to log into. Default: 1000 (the primary user)
    -F          Launch the chroot_app full-screen.
    -T          Launch the chroot_app in a tab.
    -f          Prevent xiwi from quitting automatically. (see NOTE below)

NOTE:
xiwi will normally close when the application returns. Some gui applications
fork before or during normal operation, which can confuse xiwi and cause it to
quit prematurely. If your application does not have a parameter that prevents
it from forking, and crouton is unable to automatically detect the fork, you can
use -f to prevent xiwi from quitting automatically.
xiwi will quit if you close the Chromium OS window when nothing is displayed.

You can cycle through multiple windows inside the application
via Ctrl-Alt-Tab/Ctrl-Alt-Shift-Tab, or close them via Ctrl-Alt-Shift-Escape.
If the chroot_app begins with 'start' but you still want to
use the default window manager, specify the full path of the application.

For one example, try something like: sudo startxiwi uxterm
Hope this helps,
-DennisL


[stable/datadog] Fix java settings for 6.15

What this PR does / why we need it:
It updates the default configmap so that relevant java settings are set according to the image tag.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[ ] DCO signed
[ ] Chart Version bumped
[ ] Variables are documented in the README.md
[ ] Title of the PR starts with chart name (e.g. [stable/mychartname])

It's been implemented in #19559


32 delete audios

added setup and teardown for directories
raw_audios, raw_videos, final_products

eventually we move raw_video directory generation, because it is supposed to be cached instead of temp like audios and final products


Building IOS Framework does nothing.

As per instructions, I opened the Project, selected the Target, did Project -> Build, but "Products" folder does not appear with Framework file as instructions dictate.

Did you already manage to build the framework (because you already opened #119)?

I do have it working, but not by using exact steps in instructions..
Following the instructions to open the "NMSSH-IOS" project, select the target in the top left, then build, but the framework file does not appear in a "Products" folder as indicated in the steps and images.
I tried normal build, plus the others, but no where was this "Products" folder to be found which was supposed to have the "NMSSH.framework" file.
What I did after was open the NMSSH-IOS again, and "right-clicked" the "NMSSH.framework" file inside the XCode, then clicked "Show in Finder".
This brought me to the file, which was located in a sub, sub, sub, sub folder inside the XCode.app Package as part of iOS SDK files.
I was then able to copy this file successfully into my new project and everything worked as expected.
Thank you for the quick reply, and don't know if it was something with my XCode, or some combinations of setting or other things installed..

I tried to follow his steps but they can't help me. I tried using Finder to find NMSSH.framework but to no avail. XCode shows the file as missing (red) and although there are no errors when building, I don't get a resulting file

Forget t, found it. For everyone else: I solved it by using an iOS device as deployment target, not the iOS simulator!

Tried finding NMSSH.framework in Finder but no success.  Xcode shows it is as missing in red.  To use iOS device as deployment target instead of the simulator, do I need to sign up for an apple developer account?  I don't have one at the moment, that's the reason I'm asking.  Thanks in advance.

@thomas-pk Yes, you need a (paid) iOS developer account to build against a device.

Brilliant, coernel, I'd never have thought of that. Thanks


Bug report: list command does not work

Thanks for a nice tool!
I have a trouble that ghr list command does not work. I'd love to know if you have any solution.
❯ ghr list
error: The subcommand 'list' wasn't recognized

Usage: ghr <COMMAND>

For more information try '--help'

Other commands, such as ghr cd, ghr clone or ghr delete is working as expected.
My environment
OS: macOS Monterey
shell: fish
version:
❯ ghr version
ghr v0.2.2 built with rustc 1.65.0 (897e37553 2022-11-02) at 2022-11-29 03:20:54Z

@hajimism
Thank you for trying ghr!
Listing repositories feature is not released yet and will be released in v0.3.0.
Until that, please install ghr directly from GitHub:
cargo install --git https://github.com/siketyan/ghr.git

@siketyan
Thank you for your answer and sorry for my misunderstanding. It is not a bug😅
Your advice helped me a lot and now ghr list is working on my shell! Thanks!


Update for Arm64?

Some of the images are no longer relevant given ARM64 (such as the step relating to BatchBuild).   Should we update them?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 5842072b-8382-e7bb-7fd7-9e91cb4b4704
Version Independent ID: c3e784d1-2aa7-9313-fcb6-bbbdb6ddb987
Content: Create NuGet Packages for the Universal Windows Platform
Content Source: docs/guides/Create-UWP-Packages.md
Product: nuget
GitHub Login: @karann-msft
Microsoft Alias: karann

@edwardskrod that's great feedback. Can you help us with a PR with these changes?

@edwardskrod - your team has more expertise than ours on this. Can you submit PRs?


Restructuring the Directory

Here are a couple of things that we could do:

Move the /src/app/fonts into the public dir update as needed

Create a new directory called /src/docs and colocate there the following from the src dir:

Components,
Hooks,
Lib,
Utils,
Blog,
Examples as examples alone without the subdir of components. So stuff would be in examples/badges and examples/buttons

At the end I would like to see the src directory with the following:

app for framework-related code
docs for docs-related code
mailingui for library-related code
emails for Preview Mode

Please also make sure to update our tsconfig.json
Map everything from the docs directory included in the path, meaning that imports would still look the same.


React to CentOS Stream dist-git comments

As a next step for basic CentOS Stream support implemented in https://github.com/packit/packit/pull/2085 , we need to support reacting to CentOS Stream dist-git comments.
TODO:

[ ] Treat the events coming from https://gitlab.com/redhat/centos-stream/rpms/ as dist-git events so the various packit comment commands work the same way as in Fedora dist-git.

[ ] Refactor parsing of GitLab events (since there will be upstream events directly via GitLab webhook and downstream events provided via Fedora Messaging)
[ ] Parse the dist-git GitLab events (example of such event)
[ ] Revamp the hierarchy for dist-git events, if necessary (afterwards the events will be coming from both GitLab and Pagure)
[ ] Enable consuming of those events in packit/packit-service-fedmsg (the topic is bit more complicated since it includes the namespace and repository too, hopefully it won't be a problem)
[ ] Ensure that handlers are able to handle (pun not intended) the dist-git events from GitLab

[ ] Make a demo about that.
[ ] Create a Mastodon post about that.

Split off the first three points into a separate card… story points: 5


Support direct quantization for FP8 matmul

Historically, FP8 matmul quantization followed the pattern of fake quantization, which involved a sequence of operations: quantization -> dequantization -> dot. Here, (de)quantization refers to type casting and the application of scaling factors. The XLA GemmWriter pass was designed to transform this pattern into a custom cublasLt call.
This PR proposes a departure from the historical approach by adopting direct quantization, which is quantization -> dot -> dequantization. This adjustment aligns better with mainstream quantization implementations for other data types. However, the success of this PR hinges on another PR in JAX (PR-21211) because of the mixed fp8 type matmul.
cc @lukaszlew @kaixih

I think the new design is much clearer of the idea of direct quantization. By the way, do you think we should create a new Fp8DotGeneral op for it and keep the existing fake quant Op untouched? And then we gradually change downstream uses to migrate to the new op?

I think the new design is much clearer of the idea of direct quantization. By the way, do you think we should create a new Fp8DotGeneral op for it and keep the existing fake quant Op untouched? And then we gradually change downstream uses to migrate to the new op?

Praxis doesn't use Fp8DotGeneralOp directly but dot_general_with_precision. Given that most PAXML models access fp8 from praxis. So instead, I think it makes more sense to keep both fake and direct quant Op there.

A gentle reminder to @lukaszlew

Sorry, I don't have cycles to review this PR. I'm focusing on AQT.

Could we get @levskaya to help review since Lukasz is busy with something else these days?

@levskaya could you take a look?

Sorry we block if trailing spaces are left in the file, there's some after the line class Fp8Test(parameterized.TestCase): in the tests (you can see the failed precommit) - could you fix and we can run the tests.   I think things look ok.

@levskaya I think all the issues have been resolved by @wenscarl . Can you help review and merge?

@levskaya Just resolved some formatting issues. I think all the tests should pass now. Can you help review and merge?

@wenscarl @kaixih - hey also, I invited you as collaborators to this repo, apologies that I hadn't done that earlier, it should immediately trigger presubmit tests once you join.

@wenscarl - I'm seeing a failed test?
E       UserWarning: The function dot_general_with_precision will set the precision/preferred_element_type and disregard any provided values.

@levskaya Thanks for reviewing. All checks are passed.


 I've attached two configuration files that show this:
Working:
working.zip
Not Working:
not-working.zip
The scenario I am trying to get working is have an individual tab for each user session. Each tab needed several base replacements so that I could modify their CSRF token in the header and the numerous cookies the application uses to identity the user.

Hey,
I noticed this behavior earlier today. The reason it's like this is because originally all of the Base Replacements would get bundled up into one one request and get sent and then that request would get copied and each Replacement would get applied to it separately. This was causing extra outbound requests and was confusing. I changed it to have Base Replacements not send a request but I agree that the behavior isn't correct because it doesn't allow AutoRepeater to handle situations like the one you described.
I'll change the behavior to send the outbound request if a tab has Base Replacements defined but not Replacements to fix this.
Also, I think i've fixed the threading issue, i'll push both these fixes together in a few minutes.
Thanks,
Justin

This should be fixed in the newest JAR now, I'll wait for confirmation before i close this.

I'll close this now. If there's any more issues feel free to reopen.


Fix parsing of certs, keys and messages with unrecognizable subkeys, signatures and ESKs

BC currently chokes when parsing OpenPGP certificates with contain subkeys with unrecognized algorithms.
As a result, the whole PGPPublicKeyRing becomes null and is therefore unusable.
This means that unfortunately BCs OpenPGP implementation is not upwards compatible to when keys with PQC subkeys are introduced. Ideally an implementation should just ignore subkeys that it does not recognize and instead try to use the other keys.
This PR changes BCs behavior to ignore unrecognizable subkeys when parsing PGPPublicKeyRing and PGPSecretKeyRing objects.
Note, that only subkeys are ignored, since a key with an unrecognizable primary key is not usable at all.
I took the test vectors from the OpenPGP interoperability test suite and implemented them as unit tests.
Unfortunately there weren't any test vectors for secret keys available, but the change is similar enough as to that I have confidence in its correctness.
In any case I made an extra commit for the changes in secret key parsing.
I also added commits that ignore unsupported signatures when reading then from certs and from ObjectFactory objects.
Further, the PGPObjectFactory will no longer fail to parse PKESKs/SKESKs when there are unknown versions in the list.
This is further improving upwards compatibility.

Yes, looking at the new draft and what's appearing because of it I can see the merit in this... I've added the option of logging where things are being skipped so people can keep an eye on what might be going wrong if they need. Merged, thanks!


MILU dataset from AI4Bharat for Indic LLM eval

Raising PR, for the benchmark from this paper [https://arxiv.org/pdf/2411.02538] (https://arxiv.org/pdf/2411.02538)
This is their git repo -> github.com/AI4Bharat/MILU
This PR ports the MILU benchmark from AI4Bharat/MILU to the main lm-evaluation-harness repository. The original implementation extends lm-evaluation-harness with YAML task definitions for Indian language evaluation, and consolidating these benchmarks in the main repository would improve accessibility and maintainability for the broader community. This integration aligns with the project's goal of providing comprehensive language model evaluation tools in a centralized location.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


The vsix size of my own python is unusually small

Hello, why I made my own python plugin installation package, the size is only 4M. The package downloaded from the official has 15M. Is my packing order wrong? My packing procedure is as follows:

npm install
npm run package

I compared the two vsix, The difference seems to be due to the contents of the pythonFiles directory. How can I solve this problem?

There is no lib file in the pythonFIles directory of my own python vsix. Why

Follow the steps in this yaml to build your VSIX: https://github.com/microsoft/vscode-python/blob/main/.github/actions/build-vsix/action.yml
That should help you build the VSIX exactly as we do.


WIP: Augur-2195

looks good, I guess we'll go with the index.ts files. reducers.js can be renamed to reducers.ts


Example - Key Rotation

Continuing from #953
Show that A can rotate to a new key an still prove to B that is the same A as before.

@SanjoDeundiak could you post the simplest possible code snippet to do this here.

fn alice_main() -> ockam_core::Result<()> {
    let index_a = alice.change_events().len();
    alice.rotate_key(Profile::PROFILE_UPDATE.into(), None)?;

    // Send to Bob
    let change_events = &alice.change_events()[index_a..];
    let change_events = Profile::serialize_change_events(change_events)?;

    Ok(())
}

fn bob_main() -> ockam_core::Result<()> {
    // Receive from Alice
    let change_events = Profile::deserialize_change_events(&change_events)?;
    bob.verify_and_update_contact(&alice_id, change_events)
}


Avoid function call in toString function of currency

I'm gonna merge it, because I don't have anything against it, but it's premature optimization.

Thanks!


Add requirements

Codecov Report

Merging #24 (e4a432c) into master (1bf2e5d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #24   +/-   ##
=======================================
  Coverage   85.40%   85.40%
=======================================
  Files          33       33
  Lines        2453     2453
=======================================
  Hits         2095     2095
  Misses        358      358

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 1bf2e5d...e4a432c. Read the comment docs.


Add eslint-plugin-playwright

Problem

In https://github.com/WordPress/openverse/pull/2199 we added eslint-plugin-jest. However, this only covers tests run by jest and does not apply any checks to Playwright tests, of which we have many important ones. eslint-plugin-playwright has many similar rules but also adds Playwright-specific rules that we could benefit from.
Description

Add eslint-plugin-playwright and apply it to frontend/test/playwright and frontend/test/storybook using overrides, similar to how eslint-plugin-jest is applied only to the frontend/test/unit directory.

I'm going to block this on #2482 to avoid package changes headaches.

eslint-plugin-playwright does not support the eslint-plugin-jest feature on the expect-expect rule to override the list of "assertion functions". This is difficult because we make heavy use of re-usable assertion functions in our playwright tests, in particular the expectSnapshot function for our visual regression tests.
I'll put this one back to blocked and open an issue in the plugin repository to ask for the ability to expand the assertion functions to have better parity with the jest plugin. I'll also deprioritise this one as we can't do much about it, unless the prioritisation would be reflected in our working towards a contribution in the plugin.

Actually, I'm going to enable the plugin just with the expect-expect rule disabled. I'll try to open a PR in the plugin now that the plugin maintainer has said they would accept a PR for it. I've opened https://github.com/WordPress/openverse/issues/2571 to enable expect-expect once the plugin supports the feature we need.


docker build stucked on 2 step

Trying to build the image locally, but build stops at second step, hanging like this:
Step 2/3 : RUN PowerShell -Command New-Item -Path "C:\\" -ItemType "directory" -Name "UiPath";     Invoke-WebRequest "https://download.uipath.com/UiPathStudio.msi" -OutFile "C:\\UiPathStudio.msi";     Start-Process C:\\UiPathStudio.msi -ArgumentList 'ADDLOCAL=DesktopFeature,Robot APPLICATIONFOLDER=C:\\UiPath /quiet' -Wait;     Remove-Item "C:\\UiPathStudio.msi" -Force;     Install-PackageProvider -Name NuGet -Force;     Register-PSRepository -Name UiPath -SourceLocation https://www.myget.org/F/uipath-dev/api/v2;     Install-Module -Repository UiPath -Name UiPath.Powershell -Force                ---> Running in 1391568c4ccc                                                                                Directory: C:\                                                                                Mode                  LastWriteTime         Length Name                                                                                ----                       -------------         ------ ----                                                                                d-----         5/26/2020   3:40 PM                UiPath

hi @salvorusso ,
Please give the docker build more time. Bear in mind that during the build, the installer msi needs to be downloaded and then installed, as well as the PoSh library.
Please have a look at the latest docker build here: https://dev.azure.com/andbarbu0717/UiPath Good Practices/_build/results?buildId=36&view=results
which was successful, but it did take some time


Observability features for 2021

Observability: Logs, Metrics APM & Trace Analytics
Software is becoming exponentially more complicated; from monoliths, micro services application are built with many languages, frameworks, serverless functions, data stores and more. This makes it difficult to understand problems when problems do arise. To stay competitive developers are deploying code faster and increasing complexity to maintain and debug.  This has resulted in an increase in complex telemetry. This why we will build “The Observability plugin framework” to provide end-to-end visibility into performance and code efficiency.
Why OpenSearch ?
OpenSearch's Lucene data structures are one the most valuable assets for us that can be used to store structured or unstructured data for text analysis, relevance search, clustering and anomaly detection. It can also store numerical data points efficiently while allowing operation that can bucket, sort, aggregate and run correlation operations. Lucene can also supports graph, geospatial and semantic operations on the  same datasets. All this while being able to scale to large data volumes.
Our goal is to offer a complete solution for log analytics, trace analytics  and metrics analysis built around the core principles as follows.
1/ Open instrumentation
Support for top public agents for logs, metrics and traces.
Open telemetry is a good standard, and the Data Prepper project will be used to support that an add support for enrichment over it. Observability platform will define the Physical OpenSearch Simple Schema (OS3) mapping patterns and relationships.
Every data source will use an index which follows its own usage of OS3. For example EC2 data will be stored in an machine specific index with the relevant fields from OS3. A single OpenSearch instance can contain multiple indices each containing a data source integrations storing values for its own data in the OS3 format.
2/ Connected entities
Relationships and correlations are keys to unlocking value in machine data. Observability platform will map OpenSearch indices with relationships, thus allowing data exploration and deeper relational analytics. For example, the host and CPU field in an EC2 index have a relationship to a host and CPU field in micro services. As we analyze the host for issues we can use our relational links to quickly overlay different application micro services and  all processes running on the same host to analyze them in an unified view.
3/ Programmability
Every business problem is unique, application needs keep changing with the development life-cycle. To support custom and specialized application simultaneously, we will use reusable components as Operational Panels and plugins to allow for extensibility. All workflows and UIs will be built on Piped Processing Language (PPL) with composable UI elements.
Observability Deliverables

Event explorer #41
Add auto-suggest for Piped Processing Language #42
Visualization editor #53
Custom Operational panels #67
Trace Analytics integration
Enable Log , Trace correlation #86
Support for saved queries and saved charts #85
Enable support for OpenSearch Simple Schema #25
App Analytics Dashboards
Create plugin panels for Query Tabs, Query view sub-tabs , co-relation fly-outs

Hi @anirudha, will "The Observability plugin framework” you announce be an extension of the trace-analytics plugin or evolve into a separate project?

The trace analytics repo will be renamed observability. The current code will evolve without breaking compatibility for older trace-analytics users

Cool. The log tailing feature #768 fits into the Observability umbrella.


Sema: Eliminate typeCheckExpression() calls from convertLiteralInPlace()

Currently this is only used for string literals, but soon I'd like to look into using it for other literal kinds too, eliminating some usages of callWitness() in the process.

@swift-ci Please test

@swift-ci Please test source compatibility

@swift-ci Please test Linux

Build failed
Swift Test Linux Platform
Git Sha - 08d22a14261a821a4d7f58cf138eb1769f3c8769

@swift-ci Please test source compatibility

@swift-ci Please test source compatibility

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - 08d22a14261a821a4d7f58cf138eb1769f3c8769

Build failed
Swift Test OS X Platform
Git Sha - 08d22a14261a821a4d7f58cf138eb1769f3c8769

@swift-ci Please test source compatibility

@jrose-apple The SIL.rst change was unrelated, but the SILGen changes were required because Sema now produces slightly different expressions in the case of a string literal modeled by a subclass of a class adopting ExpressibleByStringLiteral. I also consolidated some SILGen changes and added a test for a generic function producing a string literal, since an earlier version of this PR broke that and the problem was only exposed by building corelibs-foundation. I should’ve made the commit message clearer but those were related changes required to get everything working with the Sema change.


request for messages clarification

Hello, I'm currently using 0.13.0 of dry-validation for this particular case. Consider a test schema:
TestSchema = Dry::Validation.Params do
  # Intent: if key `a` has a value then `b` or `c` should be filled.
  required(:a).maybe(:str?).when(:filled?) do
    value(:b).filled? | value(:c).filled?
  end

  required(:b).maybe(:str?)

  required(:c).maybe(:str?)

  # Intent: if key `d` has a value then that value should be `hello` or `world`.
  required(:d).maybe(:str?).when(:filled?) do
    eql?('hello') | eql?('world')
  end
end

If I run the following test, I receive the following validation messages:
describe TestSchema do
  subject { described_class.(params) }

  describe "#success?" do
    context 'when a is filled but b is (nil) and c is (nil)' do
      let(:params) { {'a' => 'test', 'b' => nil, 'c' => nil, 'd' => nil} }

      it { puts subject.messages(full: true) }
      # Expected: b must be filled or c must be filled
      # Actual:   {:b=>["b must be filled"], :c=>["c must be filled"]}
    end

    context 'when d is filled with a value other than (hello) or (world)' do
      let(:params) { {'a' => nil, 'b' => nil, 'c' => nil, 'd' => 'other'} }

      it { puts subject.messages(full: true) }
      # Expected: d must be equal to hello or d must be equal to world
      # Actual:   d must be equal to hello or d must be equal to world
    end
  end
end

If the intended behavior of the first test case is working as intended, it would be awesome to get some clarification on how this use case should be handled to get the expected results. I've stepped through the code a bit and looked at how Dry::Validation::MessageCompiler is handling the visit_or case in both situations. The evaluation that happens makes sense in how the paths/leafs are evaluated but the inconsistency of the output based on the left/right leafs vs. homogenous path makes me feel like I might not be using the API correctly but I haven't read any docs to suggest otherwise.
I can solve this by creating a rule or custom validate block with a custom error message but that feels like a code smell in my understanding of dry-validation. For example:
  configure do
    def self.messages
      super.merge(en: { errors: { when_a_then_b_or_c_required: 'b must be filled or c must be filled' } })
    end
  end

  # This feels inconsistent to require a custom rule and error message when the `when` method + `value` method could handle it.
  rule(when_a_then_b_or_c_required: [:a, :b, :c]) do |a, b, c|
    a.filled? > (b.filled? | c.filled?)
  end

If dry-validation simply cannot handle the first test-case and the end-user is supposed to manually join the errors with messages[:or] (or write a custom rule etc), it would be suuuper helpful to be pointed towards any guidelines of when to use something like when vs. rule vs. validate. The docs are decent at pointing some cases out but I would have expected when + value to output the correct messages vs. having to write a custom error message for this specific use case (i.e. when a rule depends on a different key's value). Any guidance or insights would be appreciated.

Sorry but when was removed in dry-schema, which is the new coercion/validation backend that dry-validation 1.0.0 uses (currently in beta phase), and rule now works in a different way (very similar to validate from 0.x series but with a highly improved API for setting up messages).

@solnic Thanks. I'll switch over to 1.0.0.  The contract code looks straight forward enough.

@rforte cool! if you decide to try it out before 1.0.0 please do report any issues, because it's a great time to address them :)


Project has two names

The repository is called UM2N but the codebase is called WarpMesh. We should pick one name for simplicity and consistency.

Majority vote for UM2N so we should change the warpmesh/ subdirectory to um2n or UM2N. I don't have a strong preference which. Do you, @erizmr @chunyang-w?

Majority vote for UM2N so we should change the warpmesh/ subdirectory to um2n or UM2N. I don't have a strong preference which. Do you, @erizmr @chunyang-w?

I don't either.