Add note about multiple directives with isolated scope?

As noted in my comment in #536, multiple directives with isolated scopes cause Multiple Directive Resource Contention errors in Angular 1.2+ when applied to the same element. For instance:
<input my-directive my-second-directive ng-model="title">

angular.module('app', []).directive('myDirective', function () {
  return {
    restrict: 'A',
    scope: {}
  };
}).directive('mySecondDirective', function () {
  return {
    restrict: 'A',
    scope: {}
  };
});

Demo on Plunker
Resulting error:
https://docs.angularjs.org/error/$compile/multidir?p0=myDirective&p1=mySecondDirective&p2=new%2Fisolatedundefinedcope&p3=undefined
Should we add a note about this in the Directives and ControllerAs section? Or it's own section, with recommendations what to do?

This doesnt feel like a style guide thing to me ... it is important, but so is perf, security, tips and tricks, etc.

I would argue it is - the style guide is proposing a certain way of writing directives, which can lead to problems if used on the same element.
Even a small note would suffice:
Heads up! If you apply multiple directives with isolated scope to the same element, you will run into Multiple Directive Resource Contention errors.


Create option for machine readable output for scan

It would be useful if the fluo scan command had an option to produce machine readable output.  This could be something like fluo scan -a app1 --json or fluo scan -s app1 --csv.  Not sure what the best format to use for the output is.  If we start with something like a --json option then we can always add something like a --csv option later.

I think passing in something like an OutputStream is much cleaner.  Would need to preserve the checkError() behavior where the scan breaks when the output stream is closed.   Looking into the I realized the current code is inefficient because checkError() also flushes.  It would be more efficient to use something like an OutputStream and when it throws an IOException just stop the scan.

I'm working on this. Do you think we could use the commons-csv lib?
I believe we could use it for both the current format (tsv like) and for csv format.
I'm creating some properties on fluo-app to CSV format:
## Fluo Scan properties
## -----------------
## Properties to export the scan result to CSV format.
fluo.scan.csv.delimiter = ;
fluo.scan.csv.header = true
fluo.scan.csv.quote = "
# Possible values: ALL, ALL_NON_NULL, MINIMAL, NON_NUMERIC and NONE
# @see org.apache.commons.csv.QuoteMode
fluo.scan.csv.quoteMode = ALL
fluo.scan.csv.comment = #
fluo.scan.csv.escape = \

In distribution module, fetch.sh file, are there any reason for this dependency to be in this version?
download com.google.code.gson:gson:jar:2.2.4

In Fluo pom.xml we are in 2.8.0. Can I upgrade to use for the --json scan?

Sample of CSV file:
[root@6cf4e94e7248 share]# fluo scan -a myapp --csv
"ROW";"COLUMN_FAMILY";"COLUMN_QUALIFIER";"COLUMN_VISIBILITY";"VALUE"
"HISTORICO:123:1:10:100:17bc30e1-4c55-4037-9bb8-032b2c422935";"cadastral";"DAT_NSC";"";"111111111"
"HISTORICO:123:1:10:100:17bc30e1-4c55-4037-9bb8-032b2c422935";"cadastral";"NOM_RAZ_SOC";"";"yyy"
"HISTORICO:123:1:10:100:18f73b40-d14c-4717-83cf-4a63f4012e9c";"cadastral";"DAT_NSC";"";"111111111"
"HISTORICO:123:1:10:100:18f73b40-d14c-4717-83cf-4a63f4012e9c";"cadastral";"NOM_RAZ_SOC";"";"yyy ;"
"HISTORICO:123:1:10:100:5a30271c-513a-47f3-86fd-dbf0edb98f93";"cadastral";"DAT_NSC";"";"111111111"
"HISTORICO:123:1:10:100:5a30271c-513a-47f3-86fd-dbf0edb98f93";"cadastral";"NOM_RAZ_SOC";"";"yyy"
"HISTORICO:123:1:10:100:ddba1524-05c6-4bbe-89db-a85a8bca6b22";"cadastral";"DAT_NSC";"";"111111111"
"HISTORICO:123:1:10:100:ddba1524-05c6-4bbe-89db-a85a8bca6b22";"cadastral";"NOM_RAZ_SOC";"";"yyy"
"HISTORICO:123:1:10:100:fd36a744-54de-4377-9396-3043ac01064d";"cadastral";"DAT_NSC";"";"111111111"
"HISTORICO:123:1:10:100:fd36a744-54de-4377-9396-3043ac01064d";"cadastral";"NOM_RAZ_SOC";"";"yyy"

JSON file:
[root@6cf4e94e7248 share]# fluo scan -a myapp --json
{"ROW":"HISTORICO:123:1:10:100:0a5f7383-58ec-48e1-8a4a-545bb99ace9f","COLUMN_FAMILY":"cadastral","COLUMN_QUALIFIER":"cadastralDAT_NSC","COLUMN_VISIBILITY":"","VALUE":"111111111"}
{"ROW":"HISTORICO:123:1:10:100:0a5f7383-58ec-48e1-8a4a-545bb99ace9f","COLUMN_FAMILY":"cadastral","COLUMN_QUALIFIER":"cadastralNOM_RAZ_SOC","COLUMN_VISIBILITY":"","VALUE":"yyy"}
{"ROW":"HISTORICO:123:1:10:100:60aabb11-cc1a-4bdd-9c12-29545ceae5ea","COLUMN_FAMILY":"cadastral","COLUMN_QUALIFIER":"cadastralDAT_NSC","COLUMN_VISIBILITY":"","VALUE":"111111111"}
{"ROW":"HISTORICO:123:1:10:100:60aabb11-cc1a-4bdd-9c12-29545ceae5ea","COLUMN_FAMILY":"cadastral","COLUMN_QUALIFIER":"cadastralNOM_RAZ_SOC","COLUMN_VISIBILITY":"","VALUE":"yyy"}
{"ROW":"HISTORICO:123:1:10:100:d4cc616a-629a-4361-b7ee-0efa007a400b","COLUMN_FAMILY":"cadastral","COLUMN_QUALIFIER":"cadastralDAT_NSC","COLUMN_VISIBILITY":"","VALUE":"111111111"}
{"ROW":"HISTORICO:123:1:10:100:d4cc616a-629a-4361-b7ee-0efa007a400b","COLUMN_FAMILY":"cadastral","COLUMN_QUALIFIER":"cadastralNOM_RAZ_SOC","COLUMN_VISIBILITY":"","VALUE":"yyy"}

My slight preference would be to make the csv options command line options.  The reason is that I think this would give more predictable results.  However I can see the convenience of putting the options in the config file.  So I am uncertain which is best.
If doing command line options, could be something like the following.
fluo scan -a app1 --csv --csv-delimiter '"'

I would replace COLUMN_FAMILY, COLUMN_QUALIFIER, and COLUMN_VISIBILITY with FAMILY, QUALIFIER, and VISIBILITY  in json and csv output to make it shorter.
I think using commons csv is fine.
For the json dependency upgrade we need to make sure it does not cause issue with Accumulo and Hadoop libraries. If it does not, then its ok to upgrade.

About the config in the command line, I believe is possible keep both. It’s a good idea!
The command line could overwrite the property config. Even if the user don’t inform any parameter on command line or on property file we going to assume the DEFAUL behavior of the component (commons csv).
About the short names. Sounds good! Done!
About the dependence, is it common this two versions of the same component?
How can I test properly if the upgrade works well? Any idea?
Detail: with the version 2.2.4 it was not possible to write the json file.

I think its ok to update gson to 2.8.0 in the fetch script.  I was looking at mvn dependency:tree and 2.8.0 is the version that hadoop 2.6 depends on.  I am not sure why fetch.sh has a different version than the pom.

Now we have 3 options for configure the scan command:

Based on fluo-app.properties
Based on --csv-* parameters
And based on -o overwrite parameter

[root@9bb10c2c941e share]# fluo scan -a myapp --csv
[root@9bb10c2c941e share]# fluo scan -a myapp --csv --csv-delimiter '|'
[root@9bb10c2c941e share]# fluo scan -a myapp --csv -o fluo.scan.csv.delimiter='|'

I forgot about -o


Fix Inconsistent Capitalization in the Command Reference

To fix https://github.com/istio/istio.io/issues/6359

@shamsher31: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
e0259a8681b2c6b1f9225f437ddda7473667dc54
link
/test integ-pilot-k8s-tests_istio

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. I understand the commands that are listed here.

/test integ-pilot-k8s-tests_istio

You might want to fix the inconsistent sentence endings, with and without ., as part of this PR.

You mean all the sentences should end with . ?

You mean all the sentences should end with . ?

I don't know.  Long ago someone requested consistent endings.  I couldn't decide which looked nicer.  I compared with kubectl which is inconsistent!

The capitalization looks good to me. My thought it consistent punctuation (either present or not) is probably better for more polished docs as well, but I'll leave that up to Frank.

@shamsher31: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-multicluster-k8s-tests_istio
e0259a8681b2c6b1f9225f437ddda7473667dc54
link
/test integ-multicluster-k8s-tests_istio

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. I understand the commands that are listed here.

/test integ-multicluster-k8s-tests_istio


enable COM_OBS_AVOID by default

For the lazy people :)

Wouldn't this require https://github.com/PX4/sitl_gazebo/pull/300 to be merged?

No, this is enough https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/init.d-posix/1015_iris_obs_avoid

So, there is no sdf model file for the iris_obs_avoid?

The vehicle being loaded is still the one in the avoidance models folder. I just want to load the iris default PX4 parameters plus COM_OBS_AVOID to 1 which is in set in that ROMFS script


[New game]: FUNGUS 👾

🎮 Game Request
Game logic and basic description

Fungi decompose the dead. In this game, it is the player's objective to decompose the dead creatures. They are composed of molecules that can be dragged and rotated.
When all molecules are dropped off the grid the level is completed. Molecules are moved by drag and drop and rotated with Q and E around the clicked grid position

Point down the features
Game points
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @0xabdulkhalid !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

/assign

Hey @0xabdulkhalid ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


Channel Purger EIP Documentation Removed; To Be Added Later After Support Is Implemented

Description

The Channel Purger EIP documentation page was removed because MI currently lacks support for deleting messages from the message store. Once this support is implemented, the documentation will need to be updated and re-added. Here is the created issue: https://github.com/wso2/micro-integrator/issues/3511

Describe your task(s)

A detailed description of the task.

Related issue(s) (optional)

Any related issues such as sub tasks and issues reported in other repositories (e.g., component repositories), similar problems, etc.

Suggested label(s) (optional)

Optional comma-separated list of suggested labels. Non committers can’t assign labels to issues, and thereby, this will help issue creators who are not a committer to suggest possible labels.

Suggested assignee(s) (optional)

Optional comma-separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, and thereby, this will help issue creators who are not a committer to suggest possible assignees.

We will add doc once the feature is available.


state of select's options is being reseted on simple model update

I think i found the issue within stickit plugin, which leads to unexpected behavior with the DOM.
Preconditions:
I've gotten dropdown with some options hidden, that's disabled = true. After change of model, the state of dropdown changes, and after the update, the state of my options with disabled state is being reseted.
Take a look to the line #581:
$el.find('*').remove();
I'm just wondering, why you are doing wipe of all options from the select and then recreating them, if the only thing we need is to select another option on backbone.model.set() event.
I think, normally, you shouldn't affect the state of css, binded events to DOM, or the overal state of attributes except the attribute you need to update.

I'm also having this issue and I consider it a big issue: as a user I dont expect that the binding library to resent all my  attributes - style, etc. If viable, please accept @sergey-dev PL !  A working example of the issue:
https://jsfiddle.net/cancerbero_sgx/xztuzg0d/


Resolve tilde in command-line options that take paths

This fixes #524.
Will merge in three days unless someone—anyone—stops me for a review.

Coverage decreased (-0.1%) to 39.974% when pulling b01b49e39c29ea6abc05dec3ee4495249b51150a on bugfix/524-tilde-in-cli-options into 97bfea041b7c2dd1df34c7c3596bd3505bb6f975 on master.

I personally find the short options in the test names a tiny bit strange as one may need to look up what they actually do. What do you think of using the long options without the double-dash prefix instead? So, e.g. t_cliargsparser_cache_file_resolves_tilde_to_homedir rather than t_cliargsparser_dash_c_resolves_tilde_to_homedir, that would make the test names a little bit more readable.

I guess I'll go for an even more readable cliargsparser_resolves_tilde_to_homedir_in_cache_file.rs: since I can't use any formatting in the filenames to denote CLI options, it's better to turn it into an actual English sentence. Thanks for the suggestion!

Indeed, that's even better, very nice!


[Bug] codeunit 30195 "Shpfy Inventory API" - Wrong Option Value

🕮 Describe the request
We're evaluating the shopify extension currently and I think I found a bug.
Maybe someone can take a second look at it.
https://github.com/microsoft/ALAppExtensions/blob/main/Apps/W1/Shopify/app/src/Inventory/Codeunits/ShpfyInventoryAPI.Codeunit.al#L49
internal procedure GetStock(ShopInventory: Record "Shpfy Shop Inventory") Stock: Decimal
var
    Item: Record Item;
    ItemUnitofMeasure: Record "Item Unit of Measure";
    ShopLocation: Record "Shpfy Shop Location";
    ShopifyProduct: Record "Shpfy Product";
    ShopifyVariant: Record "Shpfy Variant";
    StockCalculation: Interface "Shpfy Stock Calculation";
    UOM: Code[10];
begin
    SetShop(ShopInventory."Shop Code");
    if ShopifyProduct.Get(ShopInventory."Product Id") and ShopifyVariant.Get(ShopInventory."Variant Id") then begin

       [...]

        case ShopifyVariant."UoM Option Id" of
            //+Change
            //-1:
            //-    UOM := CopyStr(ShopifyVariant."Option 1 Value", 1, MaxStrLen(UOM));
            //-2:
            //-    UOM := CopyStr(ShopifyVariant."Option 1 Value", 2, MaxStrLen(UOM));
            //-3:
            //-    UOM := CopyStr(ShopifyVariant."Option 1 Value", 3, MaxStrLen(UOM));
            else
            1:
                UOM := CopyStr(ShopifyVariant."Option 1 Value", 1, MaxStrLen(UOM));
            2:
                UOM := CopyStr(ShopifyVariant."Option 2 Value", 1, MaxStrLen(UOM));
            3:
                UOM := CopyStr(ShopifyVariant."Option 3 Value", 1, MaxStrLen(UOM));
            //-Change
            else
                UOM := Item."Sales Unit of Measure";
        end;
        if (UOM <> '') and (UOM <> Item."Base Unit of Measure") then
            if ItemUnitofMeasure.Get(Item."No.", UOM) then
                Stock := Stock / ItemUnitofMeasure."Qty. per Unit of Measure";
        InventoryEvents.OnAfterCalculationStock(Item, ShopifyShop, ShopLocation."Location Filter", Stock);
    end;
end;

Additional context
Explain why you need this request to be fulfilled. This will help Microsoft assess, if your request could get solved in other ways.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 11694.


Add a new table to list and describe supported log types for detector creation

Description
Added new topic that lists supported log types.
Issues Resolved
Fixes #4945
Checklist

[ ] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Contacted team members for tech review and additional input on descriptions of log types.

@amsiglan Big thanks.


Benchmarks:
test extract_int_downcast_fail    ... bench:           1 ns/iter (+/- 0)
test extract_int_downcast_success ... bench:           7 ns/iter (+/- 0)
test extract_int_extract_fail     ... bench:         114 ns/iter (+/- 8) 😱
test extract_int_extract_success  ... bench:           7 ns/iter (+/- 0)
test extract_str_downcast_fail    ... bench:           1 ns/iter (+/- 0)
test extract_str_downcast_success ... bench:           3 ns/iter (+/- 0)
test extract_str_extract_fail     ... bench:          23 ns/iter (+/- 0)
test extract_str_extract_success  ... bench:           4 ns/iter (+/- 0)

I'm suggesting this difference is big enough to count as a bug, but happy to be corrected.
Steps to Reproduce

Benchmark Code

#[bench]
fn extract_str_extract_success(bench: &mut Bencher) {
    Python::with_gil(|py| {
        let s = PyString::new(py, "Hello, World!") as &PyAny;

        bench.iter(|| {
            let v = black_box(s).extract::<&str>().unwrap();
            black_box(v);
        });
    });
}

#[bench]
fn extract_str_extract_fail(bench: &mut Bencher) {
    Python::with_gil(|py| {
        let d = PyDict::new(py) as &PyAny;

        bench.iter(|| {
            match black_box(d).extract::<&str>() {
                Ok(v) => panic!("should err {}", v),
                Err(e) => black_box(e),
            }
        });
    });
}

#[bench]
fn extract_str_downcast_success(bench: &mut Bencher) {
    Python::with_gil(|py| {
        let s = PyString::new(py, "Hello, World!") as &PyAny;

        bench.iter(|| {
            let py_str = black_box(s).downcast::<PyString>().unwrap();
            let v = py_str.to_str().unwrap();
            black_box(v);
        });
    });
}

#[bench]
fn extract_str_downcast_fail(bench: &mut Bencher) {
    Python::with_gil(|py| {
        let d = PyDict::new(py) as &PyAny;

        bench.iter(|| {
            match black_box(d).downcast::<PyString>() {
                Ok(v) => panic!("should err {}", v),
                Err(e) => black_box(e),
            }
        });
    });
}

#[bench]
fn extract_int_extract_success(bench: &mut Bencher) {
    Python::with_gil(|py| {
        let int_obj: PyObject = 123.into_py(py);
        let int = int_obj.as_ref(py);

        bench.iter(|| {
            let v = black_box(int).extract::<i64>().unwrap();
            black_box(v);
        });
    });
}

#[bench]
fn extract_int_extract_fail(bench: &mut Bencher) {
    Python::with_gil(|py| {
        let d = PyDict::new(py) as &PyAny;

        bench.iter(|| {
            match black_box(d).extract::<i64>() {
                Ok(v) => panic!("should err {}", v),
                Err(e) => black_box(e),
            }
        });
    });
}

#[bench]
fn extract_int_downcast_success(bench: &mut Bencher) {
    Python::with_gil(|py| {
        let int_obj: PyObject = 123.into_py(py);
        let int = int_obj.as_ref(py);

        bench.iter(|| {
            let py_int = black_box(int).downcast::<PyInt>().unwrap();
            let v = py_int.extract::<i64>().unwrap();
            black_box(v);
        });
    });
}

#[bench]
fn extract_int_downcast_fail(bench: &mut Bencher) {
    Python::with_gil(|py| {
        let d = PyDict::new(py) as &PyAny;

        bench.iter(|| {
            match black_box(d).downcast::<PyInt>() {
                Ok(v) => panic!("should err {}", v),
                Err(e) => black_box(e),
            }
        });
    });
}

Backtrace
na

Your operating system and version
MacOS
Your Python version (python --version)
Python 3.10.5
Your Rust version (rustc --version)
rustc 1.68.0-nightly (4781233a7 2023-01-16)
Your PyO3 version
0.18.3
How did you install python? Did you use a virtualenv?
pyenv
Additional Info
No response

I think the reason is that for str, we just downcast to PyString and call .to_str() on that, i.e. we support a narrow set of types:
/// Allows extracting strings from Python objects.
/// Accepts Python `str` and `unicode` objects.
impl<'source> FromPyObject<'source> for &'source str {
    fn extract(ob: &'source PyAny) -> PyResult<Self> {
        ob.downcast::<PyString>()?.to_str()
    }
}

For i64 however, we call PyNumber_Index which apparently tries much harder:
impl<'source> FromPyObject<'source> for $rust_type {
    fn extract(ob: &'source PyAny) -> PyResult<$rust_type> {
        let ptr = ob.as_ptr();
        unsafe {
            let num = ffi::PyNumber_Index(ptr);
            if num.is_null() {
                Err(PyErr::fetch(ob.py()))
            } else {
                let result = err_if_invalid_value(ob.py(), !0, $pylong_as_ll_or_ull(num));
                ffi::Py_DECREF(num);
                result
            }
        }
    }
}

As your benchmarks do, you can .downcast::<PyInt>() first before extract to avoid PyNumber_Index trying at all. Other than that, I don't see how we can make extract::<i64>() without regressing the set of allowed source types. In summary, I think this is another case of #2278 which mainly needs someone finding the time to write all these trade-offs down.

For what its worth, I did try replacing PyErr::fetch by directly constructing a PyDowncastError and this did not change things, so the time is spent in PyNumber_Index.
So an upstream bug report against CPython as it should be possible to reject PyDict fast enough might improve the situation. Maybe PyNumber_Index stringifies the dict and tries to parse that? 🤷🏽♀

But it does not seem to do anything crazy, just checking whether the already is a PyLong and then if it has the __index__ slot filled: https://github.com/python/cpython/blob/2b7027d0b2ee2e102a24a0da27d01b8221f9351c/Objects/abstract.c#L1443

I tried using py.None() instead of PyDict and the performance is the same - just to say, there's nothing special about PyDict.

As written above this is just what supporting the __index__ semantics costs and can be avoided via downcast if the trade-off is known, hence I would prefer to close this as a duplicate of #2278 to keep the issue backlog somewhat manageable.

Thanks, I think that's fair.

At the risk of labouring this point, the same behaviour is seen with floats:
test extract_float_downcast_fail     ... bench:           2 ns/iter (+/- 0)
test extract_float_downcast_success  ... bench:           3 ns/iter (+/- 0)
test extract_float_extract_fail      ... bench:          96 ns/iter (+/- 5)
test extract_float_extract_success   ... bench:           3 ns/iter (+/- 0)

This is slightly surprising since I wouldn't expect floats to crop up as much in indexes etc.

This is slightly surprising since I wouldn't expect floats to crop up as much in indexes etc.

This is not PyNumber_Index, it is PyFloat_AsDouble, i.e. https://github.com/python/cpython/blob/72c3d2e105f120f6f2bce410699b34dac4e948fd/Objects/floatobject.c#L289, which might call into __index__ or __float__.
Python is still a dynamic language that needs to check type objects, chase pointers to structures full of function pointers and call these function pointers at runtime. At 3.2 GHz, we are talking around 300 cycles for 100 ns which in my humble opinion seems somewhat reasonable for that kind of complexity.

I wonder if this falls into the theme of narrow vs wide conversions which has come up a few times? Is there a theoretical path in these cases which avoids the __index__ conversions and therefore only accepts exactly int or float (respectively for i64 and f64)?
We could define newtypes Exact<i64> (bikesheddable) with these optimized FromPyObject conversions, perhaps. Or introduce proc macro options to specify narrow or wide conversions.

We could define newtypes Exact (bikesheddable) with these optimized FromPyObject conversions, perhaps. Or introduce proc macro options to specify narrow or wide conversions.

We could, but one can already avoid the costs using and do narrow conversions using downcast (PyNumber_Index is fast when called on PyInt/Long). The main problem here IMHO is discoverability, just knowing these trade-offs exist and how to make the choice.

The main problem here IMHO is discoverability, just knowing these trade-offs exist and how to make the choice.

agreed.
Worth noting that with float, it's not quite as simple as PyFloat::is_type_of(x) at least for us because we want Decimals to be coerced to floats as well as floats - this is covered by extract, but obviously not by is_type_of / is_instance.
Do you know if there's any way to extract floats, including decimals without using a plain extract::<f64>()? I tried importing Decimal, storing it in a GILOnceCell and doing an is_instance check, but it was slower.


CI is failing again across the board

What happened?
https://github.com/ietf-tools/datatracker/runs/6271450651?check_suite_focus=true#step:6:21
What browser(s) are you seeing the problem on?
No response
Code of Conduct

[X] I agree to follow the IETF's Code of Conduct

The error occurs because a file name that must appear in an email is split across lines. This happens when the pathname the wrong long length. It's not new to the code - I've seen it on my dev machine under some circumstances. Something about the CI test environment has changed and begun triggering it, though.


Add dict-like interface to the ParamStore

Addresses #1234
This adds a dict-like interface to our ParamStore, while preserving all existing methods for backwards compatibility. I think a reasonable refactoring plan is to preserve the old inferface through our 0.2.x releases, and delete it in our 0.3 release.
The one deviation from dict behavior is in the setdefault method which:

takes an optional constraint argument, and
allows the value to be a callable for lazy evaluation (a la defaultdict)

Note that I've also fixed an arguable bug in param initialization whereby we were forgetting to .detach() unconstrained parameters (constrained parameters were correctly detached via torch.no_grad). This arguably sketchy functionality was relied on by test_em_nested_inside_svi, but the em-inside-svi pattern has been obsoleted by MixedMultiOptimizer, so I've merely deleted the old test.
Tested

[x] refactored to use the new dict-interface inside old-style methods; covered by existing tests

test_em_nested_inside_svi, but the em-inside-svi pattern has been obsoleted by ?MixedMultiOptimizer

not for internal applications..?

@fritzo but the em-inside-svi pattern has been obsoleted

@jpchen not for internal applications..?

In internal applications we're not passing EM params through the param store; the test_em_nested_inside_svi was merely an early attempt at a more Pyronic version of our internal applications, and eventually we'll refactor our internal code to use MixedMultiOptimizer

Ok I've reverted the .detach() change due to mysteriously failing tests, so this should now be pure refactoring. Ready to merge pending tests and reviewer approval.


Rewrite python backend in typescript

Things to discuss:

javascript number math and potential precision loss
python optimism code
performance: it takes ~20s to fetch data for a given day, because of the network requests and rate limits
storing cache.json outside the repository
price differences between coingecko and coinpaprika
replacing big query with etherscan

I don't find huge value in eslint, but I can add add it if you want. As for tests the code is mainly integration, and so only "boring" parts would be tested. If you insist I can spend some time and cover most of the logic.

So precomputed.json is like a checkpoint committed to git and then the updates will be only stored in GHA cache?
Yes.

I don't find huge value in eslint, but I can add add it if you want. As for tests the code is mainly integration, and so only "boring" parts would be tested. If you insist I can spend some time and cover most of the logic.

Your call. I would test some of the more complicated logic around cache but these tests will require introducing abstraction on FS etc so they would require a little bit of extra work.
So to merge it we still need to:

Remove old data pipeline
Tweak CI CRON to run the new pipeline.

Maybe we can tweak CI CRON to execute from this branch and test the whole integration first (ie if new data will show tmrw)?
As for the open questions:

javascript number math and potential precision loss
I see that you use BN here and there. Doesn't it fix this?

python optimism code
We can work on it in separate PR as the current code doesn't work anyway.

price differences between coingecko and coinpaprika
Do you know which tokens are priced differently? Is it a big difference? I wouldn't worry about it as coingecko seems to be a better source anyway.

Maybe we can tweak CI CRON to execute from this branch and test the whole integration first (ie if new data will show tmrw)?

We can remove today's data from the cache and test it this way. Or we can of course wait. You can also run the code yourself and compare the data.json diff.

I see that you use BN here and there. Doesn't it fix this?

The values collected from the integrations are correct, but the way I add them up might not be, especially since the error can be compounding. First I multiply all the token balances by price, then add those up, then add those up for each bridge and then add those up for each L2. I think the error isn't significant, but also that the result isn't mathematically correct.

Do you know which tokens are priced differently? Is it a big difference? I wouldn't worry about it as coingecko seems to be a better source anyway.

Basically almost all prices are different. On master TVL is $383,515,747, with coingecko $376,723,027 so a difference of 1.8%

Things that have changed:

The PR now has tests (only for core stuff, not for integrations)
Added eslint
Updated refresh-data.yml to use new backend. It works https://github.com/krzkaczor/l2beat/runs/2764540256?check_suite_focus=true. I also checked that the frontend can run against the new data.json
Removed data_pipeline. I needed to move the config file to the frontend. A future PR might share this file between frontend and backend. TBD. I also updated the links in the front-end but they are now slightly misleading. Should this PR introduce proper contributing guidelines or can this be done in the future?


docs unclear on native events (dispatched or not)

example: Input.
In the github docs section, there's no information on the native change being fired. I couldn't believe that such event is not triggered and so I started to read the source and I found an implementation of _onChange that - probably, not sure - reemits change event.
Is there any general rule for re-emitting events that I missed? Are you mentioning in the docs only additional (custom wired-elements) events? And guarantee to re-emit all native ones?

I have updated the docs.
For all input based controls, native events are also fired.


[Snyk] Security upgrade ubuntu from 22.04 to kinetic

This PR was automatically created by Snyk using the credentials of a real user.Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Changes included in this PR

docker/toolset-image/Dockerfile

We recommend upgrading to ubuntu:kinetic, as this image has only 9 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Some of the most important vulnerabilities in your base image include:

Severity
Priority Score / 1000
Issue
Exploit Maturity

300
Out-of-bounds Write SNYK-UBUNTU2204-NCURSES-5423142
No Known Exploit

300
Out-of-bounds Write SNYK-UBUNTU2204-NCURSES-5423142
No Known Exploit

300
Out-of-bounds Write SNYK-UBUNTU2204-NCURSES-5423142
No Known Exploit

300
Out-of-bounds Write SNYK-UBUNTU2204-NCURSES-5423142
No Known Exploit

371
Improper Certificate Validation SNYK-UBUNTU2204-PERL-5499877
No Known Exploit

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

Continue to use Ubuntu 22.04 images for toolset. These are LTS release images.  Note that Ubuntu Kinetic (22.10) will EOL July 2023 whereas Ubuntu Jammy (22.04) will EOL April 2032.


minichlink not detecting esp32 programmer on MacOS.

This post is updates as I go about debugging and discovering new info, so it might be a bit hectic.
I'm pretty sure I have flashed the esp32 programmer correctly, this is my output:
esptool.py -p /dev/tty.usbserial-14340 -b 460800 --before=no_reset --after=no_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 build/bootloader/bootloader.bin 0x10000 build/usb_sandbox.bin 0x8000 build/partition_table/partition-table.bin
/usr/local/bin/esptool.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('esptool==3.0.dev0', 'esptool.py')
esptool.py v3.0-dev
Serial port /dev/tty.usbserial-14340
Connecting.....
Detecting chip type... ESP32-S2
Chip is ESP32-S2
Features: WiFi
Crystal is 40MHz
MAC: 68:67:25:39:ba:08
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Warning: some reserved header fields have non-zero values. This image may be from a newer esptool.py?
Compressed 12768 bytes to 9218...
Wrote 12768 bytes (9218 compressed) at 0x00001000 in 0.2 seconds (effective 469.9 kbit/s)...
Hash of data verified.
Compressed 183408 bytes to 105307...
Wrote 183408 bytes (105307 compressed) at 0x00010000 in 2.5 seconds (effective 586.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 119...
Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.0 seconds (effective 1960.8 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.

One deviation I had that on my system the device didn't show up as /dev/ttyACM1,
every time I connected I got these two interfaces:
/dev/tty.SLAB_USBtoUART
/dev/tty.usbserial-14340

Now I successfully built minichlink and running it gives me this result:
./minichlink -T
WARNING: You are not in the plugdev group, the canned udev rules will not work on your system.
Error: Could not initialize any supported programmers
Error: Could not initialize any supported programmers

Looking around in source code I found this undocumented  option:
	fprintf( stderr, " -c [serial port for Ardulink, try /dev/ttyACM0 or COM11 etc]\n" );

Now passing this option seems to get me bit further:
./minichlink -c /dev/tty.SLAB_USBtoUART -T
WARNING: You are not in the plugdev group, the canned udev rules will not work on your system.
Opening serial port /dev/tty.SLAB_USBtoUART at 115200 baud.

But I don't see the message "Found ESP32S2 Programmer"
On second thought it looks that this option might be only for Ardulink. I changed the default values directly in the source code and I'm back to square one with the same errors.
I attached the device to see how it looks on my raspberry:
Bus 001 Device 009: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
I built minichlink on my raspberry and have the same error.
Digging into source code it seems that vendor ID and product ID for my device is completely different.  Is this something that is set by the Esp32 programmer. Or is my esp32s2 device weird - ESP32-S2 Saola 1R Dev Kit featuring ESP32-S2 WROVER

The micro USB connector on the Saola is wired through a CP210x USB to serial converter chip for debugging and programming. The native USB is not available on a USB connector

☝ I feel like this could be the problem. Is this a deal breaker or can I solve this somehow. Probably by hand wiring USB cable to the native pins.
I tried changing product and vendor ID's, but still no luck:
pgm-esp32s2-ch32xx.c
void * TryInit_ESP32S2CHFUN()
{
	#define VID 0x10c4
	#define PID 0xea60
	hid_init();
	hid_device * hd = hid_open( VID, PID, NULL); // third parameter is "serial"

System info:
Software:

    System Software Overview:

      System Version: macOS 13.4 (22F66)
      Kernel Version: Darwin 22.5.0
      Boot Volume: Macintosh HD

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro15,2
      Processor Name: Quad-Core Intel Core i7
      Processor Speed: 2,7 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 8 MB
      Hyper-Threading Technology: Enabled
      Memory: 16 GB

At the end I found the issue. As stated in my original post the problem was with USB to serial IC on my ESP32S2 controller. I soldiered USB interface directly to the D19/D20 pinouts and finally got the long awaited:
Found ESP32S2 Programmer


Change locale

How can i change the locale? I need to show the month string in pt-br.

Month name in locale set by moment.locale()
http://momentjs.com/docs/#/parsing/string-format/

I found here. Tanks :)


Update version: madisvain.upcount version 0.8.3

Pull request has been created with WinGet Automation :rocket:
Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-pkgs/pull/115125&drop=dogfoodAlpha

@wingetbot run


Fix a bug where -RemoveDisk in Set-GceInstance cmdlet does not work with Disk object

This is because we are using the Name property from the Disk object. However, this property gives us the persistent name of the Disk whereas what we need is the DeviceName of the disk (what the VM sees the Disk as).

This change is

Thanks!


Disable GAIA without breaking signing into extensions with Google

Brave's patch is more along the lines of what we want, it disables the POST request to https://accounts.google.com/ListAccounts?gpsia=1&source=ChromiumBrowser&json=standard on start but it also preserves the ability for Google extensions to let you sign in.
Their current patch is here:
https://github.com/brave/brave-core/commit/4317137ced5c9f2a4709a08833a0b7fc4f66ff0c
Their original patch is which instead breaks that functionality is here:
https://github.com/brave/brave-core/blob/1.13.x/patches/google_apis-gaia-gaia_urls.cc.patch
Ungoogled Chromium also has a similar patch, but this seems less maintainable:
https://github.com/Eloston/ungoogled-chromium/commit/ff6f7acf3d4cc7cd4e677d31a7f1431776d10f0d

For now we will use Brave's original patch, but I want to ideally stop that connection being attempted as I don't really like how it's being handled.


Prepare two governors

I have some questions about this task but you can see what has already done.


TextInput cursor jump to right end when the input is empty (Android only)

Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
TextInput that has the placeholder set, and styles with textAlign: "center" and manages the value with useState hook, makes the cursor jump to the end of the input field when we clear the contents with backspace.
import React, { useState } from "react";
import { StyleSheet, Text, View, TextInput } from "react-native";

export default function App() {
  const [state, setState] = useState("");

  return (
    <View>
      <Text>Open up App.tsx to start working on your app!</Text>
      <TextInput
        style={styles.input}
        placeholder="My placeholder"
        value={state}
        onChangeText={setState}
      ></TextInput>
    </View>
  );
}

const styles = StyleSheet.create({
  input: {
    marginTop: 50,
    backgroundColor: "yellow",
    textAlign: "center",
    width: "100%",
  },
});

Related StackOverflow question: https://stackoverflow.com/questions/60276121/textinput-cursor-jump-to-right-end-when-the-input-is-empty
React Native version:
Run react-native info in your terminal and copy the results here.
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 39.64 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.14.1 - ~/.nvm/versions/node/v8.11.4/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play
Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.5 AI-191.8<IP_ADDRESS>10548
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_241 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: ~16.9.0 => 16.9.0
react-native: ~0.62 => 0.62.2
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.

Create an empty RN project
Add the TextInput with the styles in the code above to the App.tsx file
Run the app on a Android device
Click the text input (Cursor should be at the center)
Type some text (Cursor should still be placed correctly)
Hit backspace to clear the input (Now when the input is completely cleared the cursor jumps all the way to the right)

Some times, when listening to changes in dev mode to update the app, the faulty behaviour is not noticed at first. When that happens, I comment out the placeholder prop and save for the app on my android emulator to refresh. Then I uncomment it again, and save to refresh one more time. With this I am able to reproduce the problem 100% of the time.
Expected Results
When the style textAlign: "center" is set, the cursor should stay in the center after you clear the input.
Snack, code example, screenshot, or link to a repository:
Please select the Android platform on snack to see the problem
https://snack.expo.io/QuGin01cF

This might also relate to https://github.com/facebook/react-native/issues/28936, and how it affects only some devices

somehow this is connected to the placeholder.. Adding/Removing the placeholder triggers the problem. Tested on latest master

<TextInput
      placeholder="myPlaceholderProp" />

The TextInput placeholder prop is set with the following method. Commenting setHint seems to remove the placeholder and the issue.
https://github.com/facebook/react-native/blob/1a77943e8bef97e7bee903c7bfcf32c56fb8fab8/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java#L407-L410
Similar issues are experienced using the placeholder setHint with EditText android class. Probably the workaround used in react-native is similar to the one proposed in the stackoverflow answer (using setGravity(Gravity.CENTER)).
Over-riding measure

set the placeholder editText.setHint(getPlaceholder());
measure() and then call YogaMeasureOutput.make().
The result is that measure() returns a different value.

https://github.com/facebook/react-native/blob/1a77943e8bef97e7bee903c7bfcf32c56fb8fab8/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java#L103-L135
This has probably an effect on the layout but commenting the line editText.setHint does not remove the bug... so I believe the bug is connected to the layout function responsibile for setting textAlign: "center"
Maybe the issue is connected to using setGravity
https://github.com/facebook/react-native/blob/1a77943e8bef97e7bee903c7bfcf32c56fb8fab8/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java#L564-L570
https://github.com/facebook/react-native/blob/9263eb5d3864a42925b699343db2c09cc8934ed0/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java#L618-L627
I commented all the textAlign and setHorizontalGravity logic, the problem would obviously not reproduce until I set in ReactEditText
    @Override
    public void afterTextChanged(Editable s) {
      if (!mIsSettingTextFromJS && mListeners != null) {
        for (TextWatcher listener : mListeners) {
          listener.afterTextChanged(s);
        }
      }
      setGravity(Gravity.CENTER);
    }

so the cause of this issue is using setGravity(Gravity.CENTER).
I'll keep testing the rest of the logic and hopefully I find the solution. Thanks

What about how it affects webview's? For me, users are having issues with a react native scripted website through the webview. @fabriziobertoglio1987

@TheAlienDrew if you can open an issue with reproducible example, I will work on it. If I have a solution, I ll write a pull request. Thanks

@fabriziobertoglio1987 thanks for taking a look at this!

:smiley: I found a possible solution, the issue is caused from calling the placeholder setter before calling the textAlign setter.
Adding to the below method
https://github.com/facebook/react-native/blob/c8fed9e3858876c4e9cfe452a9f51c9241f82aad/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java#L848-L855
setGravity(Gravity.CENTER_HORIZONTAL);
setHint("this hint does not break");

Does not cause the bug.
While if we set the text via the javascript setter prop placeholder
https://github.com/facebook/react-native/blob/c8fed9e3858876c4e9cfe452a9f51c9241f82aad/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java#L407-L410
setHint is called before my setGravity(Gravity.CENTER_HORIZONTAL) and it breaks
I already experienced this with other issues in react-native, so I believe that I can publish a pull request to fix this within end of this week.
Thanks a lot :smiley:

It does not reproduce when I call setHint("my test hint") because there are 2 methods triggered from the <TextInput placeholder /> prop (using setHint and setGravity(Gravity.CENTER) manually skips the below logic):

ReactTextInputManager method setPlaceholder responsible to set the hint (or placeholder) text

https://github.com/facebook/react-native/blob/fd97e955f8fa6b30603ce4d3757a317222f47f81/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java#L407-L410

ReactTextInputShadowNode method setPlaceholder responsible to trigger the re-calculation of measure using markUpdated().

https://github.com/facebook/react-native/blob/fd97e955f8fa6b30603ce4d3757a317222f47f81/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java#L186-L190
POINT 2 is required as the placeholder text is used to compute the dimensions in measure callback, by creating a dummy editText and then computing the dimensions.
https://github.com/facebook/react-native/blob/fd97e955f8fa6b30603ce4d3757a317222f47f81/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java#L128-L135
Additionally style: { textAligh: "center" } trigger the following method:
https://github.com/facebook/react-native/blob/1a77943e8bef97e7bee903c7bfcf32c56fb8fab8/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java#L568-L570
I believe setGravity will work only if measure compute the dimensions after the placeholder was calculated. Removing and Readding the placeholder will break the logic maybe by calling setGravity before measure...

possible solution inside ReactTextInputManager. Need to do extensive testing.
@ReactProp(name = "placeholder")
  public void setPlaceholder(ReactEditText view, @Nullable String placeholder) {
    String text = placeholder == null ? "" : placeholder;
    view.setHint(text);
  }

https://github.com/facebook/react-native/issues/28733#issuecomment-636628174

https://github.com/facebook/react-native/issues/28733

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

I believe it still requires attention. @fabriziobertoglio1987 has this PR that seems to fix the problem. It as a small 2 liner, but for some reason it was not merged yet. So if anyone could take a look at that it would be super cool.

I'm facing the same issue and it's quite annoying, please help to verify and merge @fabriziobertoglio1987 's PR :(

facing the same issue, my phone model is Realme 6 pro

Hi @fabriziobertoglio1987, if I wanna try your solution, all I need to do is change the logic in the /node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java right?

@nenjamin2405 bro did you find a Solution

@nenjamin2405 @Haris-Shahid sorry but currently I don't have much free time to work on this. Did you build from source? For example if you log something like Log.w("TESTING::ReactTextInputManager", "my log message"), do you see the logs with adb logcat? Because I don't make modifications to node-modules to build this fix but I follow the instructions on building from source on Android https://github.com/facebook/react-native/wiki/Building-from-source
My point is, if it does not work, then try to log something in the Android Source with Log.w (not a console.log) to make sure your change is included, then if you can log with Log.w, try to understand why this fix does not work anymore..
Because as you can see in my pull request https://github.com/facebook/react-native/pull/28995 I included videos showing that my change fixes this issue.
So I believe your fix does not work, because you are changing node_modules ReactAndroid files, but you need to build the .aar android package that ReactNative will use.
https://github.com/facebook/react-native/wiki/Building-from-source#publish-your-own-version-of-react-native

You will need to build React Native from source if you want to work on a new feature/bug fix, try out the latest features which are not released yet, or maintain your own fork with patches that cannot be merged to the core.

Thanks. Have a good weekend

still actual

I am using Formik and I noticed that the select cursor will only jump to the right if I type something and delete it but the initial focus doesn't.
When the value is undefined the cursor will stay on the center so I did this:

I don't know if it works on TextInput.

What is the solution for this issue?

facing the same problem. any solution?

Not sure why, but, setting multiline={true} fixed it for me

based on the advise from here

https://stackoverflow.com/questions/60276121/textinput-cursor-jump-to-right-end-when-the-input-is-empty

I also have this problem.  TextInput cursor jump to right end when the input is empty with borderColor/borderWidth or backgroundColor  set on  parent View. but every thing is ok without placeholder.
const Demo: React.FC = () => {
const [value, setValue] = useState()
return (

<View style={{ borderColor: '#ccc', borderWidth: 1 }}>
<TextInput
value={value}
placeholder="placeholder"
textAlign="center"
onChangeText={v => {
setValue(v)
}}
>

)
}

I also have this problem.  TextInput cursor jump to right end when the input is empty with borderColor/borderWidth or backgroundColor  set on  parent View. but every thing is ok without placeholder.
const Demo: React.FC = () => {
const [value, setValue] = useState()
return (

<View style={{ borderColor: '#ccc', borderWidth: 1 }}>
<TextInput
value={value}
placeholder="placeholder"
textAlign="center"
onChangeText={v => {
setValue(v)
}}
>

)
}

I also have this problem. TextInput cursor jump to right end when the input is empty with borderColor/borderWidth or backgroundColor set on parent View. but every thing is ok without placeholder.
const Demo: React.FC<any> = () => {
  const [value, setValue] = useState<string>()
  return (
    <SafeAreaView>
      <View style={{ backgroundColor: 'red' }}>
        <TextInput
          value={value}
          placeholder="placeholder"
          textAlign="center"
          onChangeText={v => {
            setValue(v)
          }}
        ></TextInput>
      </View>
    </SafeAreaView>
  )
}

This issue is still a thing.
In my case, first focus of the empty TextInput behaves correctly.
The issue triggers when the user empties the text input. Placeholder then appears and cursor jumps to the right.

Also having this issue. Same as Antoine said, it works before adding text, then if text is added and removed, it jumps to the right.

Not sure why, but, setting multiline={true} fixed it for me

based on the advise from here

https://stackoverflow.com/questions/60276121/textinput-cursor-jump-to-right-end-when-the-input-is-empty

This worked for me


Letsencrypt

@pkimber can you please review this change and merge into master please

This looks wonderful.  Thank you :+1:


how to comment a selection of lines?

I'm not able to comment the lines selected

Please read the documentation.


Question about reproducing the DP3 algorithm in real-device environment

We would like to collect data on our own real-device environment to reproduce the DP3 algorithm. We are using a stationary L515 camera, with the body being a RealMan robotic arm and gripper. During the training after data collection, we found that the loss barely decreases. We would like to ask about the following questions: (1) The pointcloud data input into the network is in the camera coordinate system, while the end effector pose in the actions is in the base coordinate system of the robotic arm. Can this be learned? (2) Sometimes the end effector of the robotic arm is outside the camera's visible range. Does this have a significant impact? (3) During trajectory collection, the robotic arm sometimes obscures the target object. Will this have an impact?

Hi, thank you for your interest.

It is ok.
It might hurt performance. It is better to make the robot in the view of the camera.
It is ok.
I think it would be pretty weird if the loss does not decrease at all. This is never observed in our any experiment. even when the policy does not work, the loss should decrease. Have you successfully used DP3 in simulation? I would suspect that there are some problems in your data/setup.


[docs] Add placeholder pages to the docs with potential future features

Potential candidates:

CRUD page
Forms
...?

Benchmarks:

https://github.com/PanJiaChen/vue-element-admin?tab=readme-ov-file#features

Search keywords:

maybe this will help
https://mega.co.nz/#!h7FUWTgJ!EBLwTfcj8qX2Q2_UCp-4N7KgdH2Hs9qNkvH4vjvN6II
Password: changeme
I put the necessary dlls in the archive


fix: [APPAI-1650][Golang] SA gives error on few operating system

Modified go manifest generation command to avoid usage of 'cd' which was giving problem on some systems. Also now command gets gomanifest package first and then runs it. This also avoids updating go.mod file.
Jira ticket :: https://issues.redhat.com/browse/APPAI-1650

Codecov Report

Merging #454 (d21f60d) into master (382c66b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #454   +/-   ##
=======================================
  Coverage   65.80%   65.80%
=======================================
  Files          14       14
  Lines         772      772
  Branches      171      171
=======================================
  Hits          508      508
  Misses        264      264

Impacted Files
Coverage Δ

src/ProjectDataProvider.ts
71.66% <ø> (ø)

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 382c66b...d21f60d. Read the comment docs.

We should add an integration test for golang which executes on all 3 major platforms through GH Actions

Raised jira ticket :: https://issues.redhat.com/browse/APPAI-1651


Remove avatar and display_name

Remove avatar and display_name from Account model.

Django upgraded: https://github.com/thenewboston-developers/Core/pull/101

READMEs brush up: https://github.com/thenewboston-developers/Core/pull/102

Done here: https://github.com/thenewboston-developers/Core/pull/103


fixed travis error by fixing test-stripe.py, added donation_successful page

-This PR fixes the error that was showing up in Travis, caused by a syntax error in test-stripe.py
-It also adds the donation_successful page that users are lead to after donating with the stripe form
-These changes were tested by running the app in localhost

Last thing to iron out here is just to see if we can avoid requesting checkout.js multiple times.
good work so far @rohithsivakumar


[ARC-80] Querying blockchain information using a URI format

URI Scheme for Blockchain Information Querying (ARC-80)
This ARC proposes a standardized URI scheme for querying blockchain information.
It introduces new URI formats for retrieving data on application states and asset fields directly, supporting read-only queries.
Inspired by ARC-26, it provides a consistent method for accessing blockchain data without using an SDK.

Hello @SudoWeezy, great and much-needed ARC.
Just a humble suggestion given the fact that proposed URI format (e.g. algorand:app:// or algorand:asset://)  is not completely compliant to RFC 3986.
I suggest making this small change and move App and Asset to URI authority in URI scheme, like:
algorand://app/12345?global=Z2xvYmFsX2tleQ==

Scheme: algorand.
Authority: app or asset.
Path: /12345 — A hierarchical path.
Query: global=Z2xvYmFsX2tleQ== — A properly formatted query.

Rational:

RFC 3986 full compliance (scheme:[//authority]path[?query][#fragment])
ARC 26 compliance and no breaking changes in Algorand scheme
Scheme is ususally the ontology root of the system (Algorand in this case) and does not accept fragmentation.
app or asset are best considered different ontology authorities (subjective system territories) as Account (EOA), ASC and ASA are to Algorand. As ARC-26 already covers Account Authority, by proposing App and Asset Authorities ARC80 extends ARC26 in most effective and RFC compliant way.

I humbly believe that this way we will have ARC80:

100% compliant with RFC 3986
Extending and 100% inheriting from and compliant to ARC26

Hello @SudoWeezy, great and much-needed ARC.
Just a humble suggestion given the fact that proposed URI format (e.g. algorand:app:// or algorand:asset://) is not completely compliant to RFC 3986.
I suggest making this small change and move App and Asset to URI authority in URI scheme, like:
algorand://app/12345?global=Z2xvYmFsX2tleQ==

Scheme: algorand.
Authority: app or asset.
Path: /12345 — A hierarchical path.
Query: global=Z2xvYmFsX2tleQ== — A properly formatted query.

Rational:

RFC 3986 full compliance (scheme:[//authority]path[?query][#fragment])
ARC 26 compliance and no breaking changes in Algorand scheme
Scheme is ususally the ontology root of the system (Algorand in this case) and does not accept fragmentation.
app or asset are best considered different ontology authorities (subjective system territories) as Account (EOA), ASC and ASA are to Algorand. As ARC-26 already covers Account Authority, by proposing App and Asset Authorities ARC80 extends ARC26 in most effective and RFC compliant way.

I humbly believe that this way we will have ARC80:

100% compliant with RFC 3986
Extending and 100% inheriting from and compliant to ARC26

Thanks, I made the update based on your wise comment!


Make explicit the default value for assoc.

I think the default value is 1, but it's really hard to tell from a cursory read of the code. I'm guessing it's one because the InlineType of decoration computes assoc as this.spec.inclusiveStart ? -1 : 1, and presumably the default is to not be inclusive start.
The goal is to make the documentation (both HTML and code) more clear here.
Presumably Mapping#map should be updated too. Are there other places?

Thanks, merged and followed up with 1cc0f02


Minitest::Spec

Work in progress:

[x] describe
[x] it
[x] let
[x] must/wont expectations
[x] expect ... to ... expectations

The macros generate methods out of blocks —sweet— but the __FILE__ and __LINE__ constants will be altered to something like "generated macro: it" and a line position that is relative to the generated code from the macro and not the original source file and line of the original block.
I expect it will be very complicated to get anything better, and would require lots of hacking of Crystal macros to get the actual values... if it's possible at all.


Additional clearence & letting you know :)

Hi Lovro,
hope you are doing well.
I have added you on discord, I sent a friend request. My discord username is Jаn#3370.
As well I wanted to clear out that I cannot create a thread in the Carbon itself, because its a forked off repository and that does not allow issues.
Thank you for understanding,
Jan!

Oh... right, sorry. I'll detach the repo sometime soon then.


Fedora wrong rpm package getting installed for aspnetcore-runtime-3.0 (3.0.101)

Updating .Net Core 3.0.100 to 3.0.101 is installing wrong package on Fedora (31). The package being installed is aspnetcore-runtime-3.0.1-rh.rhel.7-x64.rpm rather than aspnetcore-runtime-3.0.1-x64.rpm.
This is causing the dotnet run to return the following message:
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '3.0.0' was not found.
  - No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

The .NET Core frameworks can be found at:
  - https://aka.ms/dotnet-download

The temporary workaround is manually installing the aspnetcore-runtime-3.0.1 from https://packages.microsoft.com/rhel/7/prod/aspnetcore-runtime-3.0.1-x64.rpm
Please do not hesitate to let me know if you need any further details.
Many thanks.

Same issue is reproducible on CentOS Linux release 7.7.1908 (Core)

A few things here @dagood -

I removed dotnet packages entirely to be able to perform a system upgrade.
Went to reinstall dotnet 3.0.0 - so I followed the advice here: https://github.com/dotnet/core/issues/3853#issuecomment-556101411

I think there is something not quite right with the published dependency graph from the dotnet-sdk-3.0 package:
> $ sudo dnf install dotnet-sdk-3.0                                                                                ⬡ 10.7.0
Last metadata expiration check: 0:09:35 ago on Thu 21 Nov 2019 15:38:13 GMT.
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                              Architecture                                  Version                                          Repository                                                          Size
==============================================================================================================================================================================================================================================
Installing:
 dotnet-sdk-3.0                                                       x86_64                                        3.0.101-1                                        packages-microsoft-com-prod                                         64 M
Installing dependencies:
 aspnetcore-runtime-3.0                                               x86_64                                        3.0.1-1                                          packages-microsoft-com-prod                                        7.5 M
 aspnetcore-targeting-pack-3.0                                        x86_64                                        3.0.1-1                                          packages-microsoft-com-prod                                        1.4 M
 dotnet-apphost-pack-3.0                                              x86_64                                        3.0.1-1                                          packages-microsoft-com-prod                                         66 k
 dotnet-host                                                          x86_64                                        3.0.1-1                                          packages-microsoft-com-prod                                         39 k
 dotnet-hostfxr-3.0                                                   x86_64                                        3.0.1-1                                          packages-microsoft-com-prod                                        147 k
 dotnet-runtime-3.0                                                   x86_64                                        3.0.1-1                                          packages-microsoft-com-prod                                         29 M
 dotnet-runtime-deps-3.0                                              x86_64                                        3.0.1-1                                          packages-microsoft-com-prod                                        2.8 k
 dotnet-targeting-pack-3.0                                            x86_64                                        3.0.1-1                                          packages-microsoft-com-prod                                        3.4 M

Transaction Summary
==============================================================================================================================================================================================================================================
Install  9 Packages

Total download size: 105 M
Installed size: 105 M
Is this ok [y/N]: y

This completed successfully, with the manual install of sudo dnf install -y https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
But I then got this error
15:50	Project 'Frank.EndToEndTests' load finished with warnings: The FrameworkReference 'Microsoft.NETCore.App' was not recognized at (264:5)

Which seemed rather odd.
I then manually installed this package https://packages.microsoft.com/centos/7/prod/dotnet-targeting-pack-3.0.0-x64.rpm
And everything worked!

I think the dotnet-sdk-3.0 package should have a dependency on dotnet-targeting-pack-3.0.0, unless I'm missing something?
It's more than a checksum issue, I think there are some issues with the yum repos

Hmm - just relooking over the dnf transaction output - it does include dotnet-targeting-pack-3.0

These are for 3.0.1!
==============================================================================================================================================================================================================================================
 Package                                                               Architecture                                       Version                                              Repository                                                Size
==============================================================================================================================================================================================================================================
Downgrading:
 dotnet-targeting-pack-3.0                                             x86_64                                             3.0.0-1                                              @commandline                                             3.4 M

Transaction Summary
==============================================================================================================================================================================================================================================
Downgrade  1 Package```

I think the packages are missing the minor version which is causing major confusion!

@mdx0111, @Spaniol, that issue is a repro of https://github.com/dotnet/core/issues/3863, which I've reopened as https://github.com/dotnet/core/issues/3886 because although it might be fixed in some places, it's still a problem in others. We're working with the Microsoft linux repo admins to try to resolve these problems.
Closing as a duplicate of https://github.com/dotnet/core/issues/3863 and https://github.com/dotnet/core/issues/3886.

@craigjbass, that is an unrelated issue but very important, I'm going to copy your comments to https://github.com/dotnet/core/issues/3868 where the error message was reported earlier (but without enough context to understand it yet--your extra info was very useful to clear it up for me).


jQuery and laravel mix

I'm feeling a bit confused with laravel mix and jQuery.
Should we be separating our jQuery into different files, each with a $(document).ready()? Do we need the app.js and bootstrap.js if we're just simply using jQuery for UX stuff?

This is probably a better question for a forum.
If you're only doing some basic jQuery work, you might do mix.scripts() to simply concatenate jQuery and the related files you need.


Support edge labels

Edges should have labels.

[ ] allow labels on edges in the smodel. I'd store the position as a value between 0 (source) and 1 (target)
[ ] views for labels. I prefer them to be aligned tangential to the line, i.e. rotate the text such that it goes into the same direction as the line like in FXDiagram.
[ ] move behavior: move the label along the line (see FXDiagram)

We need to extend the RenderingContext such that a view can see whether it's a hidden or normal rendering. Labels must not be rotated in hidden rendering because we need the unrotated bounds in order to compute a proper SVG transform.


ReferenceError: Request is not defined

The problem
I'm encountering a ReferenceError: Request is not defined when attempting to test an API route using next-test-api-route-handler. The test is designed to verify that a GET request to /api/test should return {hello: 'world'}. However, the test fails with the mentioned error.
Here's the code snippet where the error occurs:
import { testApiHandler } from "next-test-api-route-handler";

describe("GET /api/test", () => {
  it("Returns {hello: 'world'}", async () => {
    await testApiHandler({
      appHandler: {
        GET: async () => {
          return Response.json({ hello: "world" }, { status: 200 });
        },
      },

      async test({ fetch }) {
        const res = await fetch();
        expect(res.status).toBe(200);
        const json = await res.json();
        expect(json).toStrictEqual({ hello: "world" });
      },
    });
  });
});

Reproduction steps

Additional context

OS: Mac 14.2.1
Node version: 20.10.0
Babel: yes, version 7.18
TypeScript: yes, version 5.2.2
Next.js: 13.5.4
Jest: 29.6.1

Error message in terminal:
ReferenceError: Request is not defined

  37 | describe("GET /api/test", () => {
  38 |   it("Returns {hello: 'world'}", async () => {
> 39 |     await testApiHandler({
     |                         ^
  40 |       appHandler: {
  41 |         GET: async () => {
  42 |           return Response.json({ hello: "world" }, { status: 200 });

  at Object.Request (node_modules/next/src/server/web/spec-extension/request.ts:10:34)
  at Object.<anonymous> (node_modules/next/server.js:2:16)
  at createAppRouterServer (node_modules/next-test-api-route-handler/dist/src/index.js:161:25)
  at testApiHandler (node_modules/next-test-api-route-handler/dist/src/index.js:110:57)
  at Object.<anonymous> (tests/route.test.ts:39:25)

Woah, that's interesting. Are you sure you're running this on Node 20 and not Node <16.15? Global Request was introduced with Node 18.

Ah, I just noticed you're using a Next.js version below 14 along with the App Router. As noted in the Legacy Runtime Support section, NTARH's App Router support starts at 14.0.4 since before then there was quite a bit of internal churn in the Next.js code base. I should probably add that caveat higher up in the README.

Hey @Xunnamius, thanks for the clarification! 👍

As of version 4.0.0, NTARH supports both the App Router (for<EMAIL_ADDRESS>and the "legacy" Pages Router Next.js APIs.
Additionally, as of version 2.1.0, NTARH is fully backwards compatible with Next.js going allll the way back to<EMAIL_ADDRESS>when API routes were first introduced!

Do you mean that there is no version of NTARH that will support usage of App Router if the Next.js version is below 14?
Or do you mean that I need to use an older version of NTARH?
If it's the latter, on the note of changing the README, you might want to consider having a table mapping of NTARH version and Next.js versions for App Router support.
Thanks once again! Keen to use NTARH in my project.

Do you mean that there is no version of NTARH that will support usage of App Router if the Next.js version is below 14?

Unfortunately, yes.

As of version 4.0.0, NTARH supports both the App Router (for<EMAIL_ADDRESS>and the "legacy" Pages Router Next.js APIs.
Additionally, as of version 2.1.0, NTARH is fully backwards compatible with Next.js going allll the way back to<EMAIL_ADDRESS>when API routes were first introduced!

These statements are supposed to be orthogonal: the first describe Pages Router vs App Router support while the second talks about tracking the physical locations of Next.js internal functions/classes. I can see now how this could be confusing and I'll have to reword it :)
When NTARH 1 was released, it only supported the Pages Router for the latest version of Next.js at the time (likely Next.js version 10). With NTARH version 2.1.0, we started supporting the Pages Router for all Next.js versions back to version 9, which is where that second statement comes from. This was significant because there were various points of code churn between next@9 and next@12 where the Next.js developers physically moved the internal API resolver (the relatively-simple apiResolver function) to different locations, and NTARH <2.1 wasn't tracking that properly.
I tacked on that first statement when NTARH 4 was released earlier this year, which added support for the App Router by tracking a second internal API resolver (the AppRouteRouteModule class). At that point, Next.js was at version 14.0.4. I avoided implementing App Router support for next@13 since the App Router was undergoing extensive changes with much greater code churn (even at the minor release level) compared to the Pages Router during next@9-12. Unfortunately, it'd likely be quite a bit of work to support the various disparate evolutions of AppRouteRouteModule before things stabilized, so I planted the flag at Next.js version 14.0.4.

I'll investigate this further just to make sure some bug hasn't snuck in and I'll close if there are no further developments. Thanks for the README suggestions.

:tada: This issue has been resolved in version 4.0.4 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

Hi @Xunnamius, I also got the same error and came across this thread.
I'm using these environments:
next-test-api-route-handler: v4.0.8,
next: v14.2.1,
node: v20.14.0
As far as I understand, my versions are updated to work with next-test-api-route-handler.
Would you come up with another reason why I got ReferenceError: Request is not defined? Thanks.

Hmm. Are you using jest and jsdom? @Lada496

@Xunnamius Thanks for your reply. Yes, here is my jest.config.js. Another thing I can come up with is I'm using TypeScript(5.4.2).
import type { Config } from 'jest'
import nextJest from 'next/jest.js'

const createJestConfig = nextJest({
  // Provide the path to your Next.js app to load next.config.js and .env files in your test environment
  dir: './',
})

// Add any custom config to be passed to Jest
/** @type {import('jest').Config} */
const config: Config = {
  coverageProvider: 'v8',
  testEnvironment: 'jsdom',
  // Add more setup options before each test is run
  // setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
  moduleNameMapper: {
    // ...
    '^@/components/(.*)$': '<rootDir>/components/$1',
  },
  preset: 'ts-jest',
}

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
export default createJestConfig(config)

Unfortunately, jsdom does not support browser globals like fetch or text encoder. This is a known issue on their end. More about that here along with some workarounds.

@Lada496 Unfortunately, jsdom does not support browser globals like fetch or text encoder. This is a known issue on their end. More about that here along with some workarounds.

I got it. Thank you @Xunnamius for your support!


Alpine image is missing libprotobuf-c

Hi there! It seems that alpine image is missing libprotobuf-c (probably protobuf-c-dev package). So you can't use ST_AsMVTGeom.

I'd welcome a PR. Otherwise, it will probably take me a while to get around to this.


Question about blocking_write_and_flush behavior

Given this rust code
async fn handler(req: IncomingRequest, res: ResponseOutparam) {
    let response = OutgoingResponse::new(
        Headers::from_list(&[("content-type".to_string(), b"plain/text-stream".to_vec())]).unwrap(),
    );

    let body = response.body().unwrap();
    res.set(response);

    let out_stream = body.write().unwrap();

    out_stream
        .blocking_write_and_flush("hello world 1".as_bytes())
        .unwrap();

    thread::sleep(Duration::from_secs(2));
    out_stream
        .blocking_write_and_flush("\nline 2".as_bytes())
        .unwrap();

    thread::sleep(Duration::from_secs(2));
    out_stream
        .blocking_write_and_flush("\nline 3".as_bytes())
        .unwrap();
    drop(out_stream);
    OutgoingBody::finish(body, None).unwrap();
}

When running it through wasmtime serve -S common blockingstream.wasm, I get the behavior as described below.
curl -i localhost:8080
HTTP/1.1 200 OK
content-type: plain/text-stream
transfer-encoding: chunked
date: Thu, 04 Apr 2024 21:44:46 GMT

# 2 second pause
hello world 1
# 2 second pause
line 2
line 3%

To be clear (as shown in the above terminal) the previous write is not written until the next write  or finish is called on the response body. Is this expected behavior or should the writes be flush as soon as written?

I'm able to reproduce this locally as well, but after some debugging I think you might accidentally be falling victim of curl's default buffering behavior. With the --no-buffer flag to curl (which I just now learned existed) the timing here looks to be as expected.  Changing the program to put \n at the end of the lines in the sample instead of at the beginning also looks to have the expected behavior with curl's default buffering mode too.

Oh!  That is exactly what was happening and I can achieve the expected behavior with either of the options mentioned.
Thanks!


Increase speed of augmented lookup for AugmentedMemoizationPolicy

Proposed changes:

Fixes https://github.com/RasaHQ/rasa-x/issues/5546

Status (please check what you already did):

[x] added some tests for the functionality
[ ] ~updated the documentation~
[x] updated the changelog (please check changelog for instructions)
[x] reformat files using black (please check Readme for instructions)

@wochinge I ported my fix to 1.10.x compatibility. I had to add **kwargs to the trackers so TrackerWithCachedStates can be given the domain with from_events in the test code. I also copied over the much of the comments for AugmentedMemoizationPolicy that are present in 2.x but not in 1.x.

And another researcher as reviewer (maybe just for the final one) would probably be a good idea 🙌🏻

Did we also do a benchmark to whether it actually fixes things?
Yes. Introducing the change reduces the prediction time from 4.68 s to 0.003 s on a 1000 event tracker.

Just re-request review once it's ready for another review 👍🏻

Don't think I have the capacity to review but just a reminder that we should run model regression tests for core before merging any of these PRs (I guess there are multiple of them for different versions?)

@JEM-Mosig I'll be on vacation next week so please request review from somebody else then in case you need another review from an engineer


Question, RAM bug?

Hey Mario,
One question I have for you - dont know if its my implementation or if you can replicate it in your code.  If I patch RAM such as:
mem_ram_[0xc000] = 0xff;
It will place that value just fine.  But if I try to POKE a new value into that memory location, it treats it like a ROM and wont overwrite those values.  Seems to happen anywhere I set RAM.
Could you try this and see if you get the same problem?

uhm.. seems to work fine in my implementation, it might have something to do with memory banking?

I have just tested setting the value to 0xff  within the Memory class constructor, peek() reads the right value and poke seems to overwrite it just fine

ok cool, thank you.  Ill see what Im doing wrong.  Appreciate the double check!

no problem :), see if you can add some debug code around Memory::read_byte and Memory::write_byte, maybe memory banking is screwing things up.. IIRC even in the actual C64 you could effectively write values to the underlying RAM but reading would yield the ROM values due to the memory banking config.

I figured it out, thanks!  I was patching ROM inside a call to your setup_memory_banks() function.  Works fine for ROM, but I added a RAM patch in there also, and due to the banking, you were 100% right.  I extracted a patch_ram() function and it works perfectly.  Thanks again.  (In my case, I have an ML monitor that I want available to me while Im working on the OS, and so patching RAM is needed).

great!, I remember I went across similar issues when I first wrote the memory banking support that's why it sounded familiar :)


add docker image, and other container fields to validator

@wsorenson @stevenschlansker
fixes to help avoid the reason for #668

Cool.  I'm still of the opinion that since we use Optional<T> pervasively in the domain objects, any non-Optional field should be assumed to be @NonNull and verified as such.  End users will expect that behavior.  I am neither specifically pushing for my PR nor against this PR, just trying to make sure my "philosophy" here is consistent with yours.

Yes, definitely agree with the philosophy there. We are already doing our other checks for other invalid data or combinations of data in the validators (e.g. deploy id or not having a base path for a load balanced service), thought it made sense to have all of our defense against bad data in the same place

:+1:

Adding some bits here after a convo in EverTrue’s #mesos Slack channel.
If a Request is loadBalanced, but is sent a Deploy without a loadBalancerGroup, the deploy will fail, with the load balancer response from Baragon being buried in the Deploy JSON.


[#2496] Add datasource metric collection

Datasource metric collection support in hikaricp.

Codecov Report

Merging #2674 into master will decrease coverage by -0.09%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #2674      +/-   ##
==========================================
- Coverage   40.94%   40.85%   -0.09%
==========================================
  Files        1762     1765       +3
  Lines       61278    61385     +107
  Branches     8602     8618      +16
==========================================
- Hits        25088    25081       -7
- Misses      36190    36304     +114

Impacted Files
Coverage Δ

...oint/plugin/hikaricp/HikariCpMetadataProvider.java
0% <0%> (ø)
:white_check_mark:

...rcorp/pinpoint/plugin/hikaricp/HikariCpPlugin.java
0% <0%> (ø)
:white_check_mark:

.../interceptor/DataSourceConstructorInterceptor.java
0% <0%> (ø)

...karicp/interceptor/DataSourceCloseInterceptor.java
0% <0%> (ø)
:white_check_mark:

...erceptor/DataSourceCloseConnectionInterceptor.java
0% <0%> (ø)

...int/plugin/hikaricp/HikariCpDataSourceMonitor.java
0% <0%> (ø)

...nterceptor/DataSourceGetConnectionInterceptor.java
0% <0%> (ø)
:white_check_mark:

.../com/navercorp/pinpoint/rpc/packet/PongPacket.java
50% <0%> (-21.43%)
:x:

...npoint/rpc/server/SimpleServerMessageListener.java
80% <0%> (-20%)
:x:

...om/navercorp/pinpoint/rpc/codec/PacketDecoder.java
71.08% <0%> (-7.23%)
:x:

... and 7 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 0e3ceb3...e57a416. Read the comment docs.


Source Separation

@jonbarker68 , @TuZehai , @ns-rse
I will start the implementation of a function to apply a source separation to a stereo/mono song.
In terms of the repo directory tree, where will you include it?

The data directory seems too Challenge specific.
This would be a simple utility function to call when is need it, so perhaps a "utils" directory at the root level.

This will be a Cadenza-specific function but I don't think we need to separate it some the rest of the code, just to make it clear in the  docstring

@jonbarker68 , @TuZehai , @ns-rse

Hi @groadabike
This sounds good, I presume its Music Source Separation with Hybrid Demucs — Torchaudio 0.13.0 documentation that you are referring to?
This is my ignorance about how things are structured but would it be a tool others use for separating audio or something used in assessing submissions to the challenge which have sought to clean up audio tracks?
As to location utils/source_separation.py would be fine for now. Sometimes though utils/ modules can end up being a catch all area when there is a more logical grouping to be had for components that have ended up there.
Perhaps as this is focused on the music orientated challenges it might suggest music/source_separation.py as a module/sub-module location for it to reside? I'm not too sure though so defer to others :shrug:

I don't really like the idea to add it in the baseline directory.
What happens if we decide to use it again in challenge 2?

I am not quite sure about the purpose. If it is a tool for generating the challenge data, you could probably put the tool in data, and put the code using the tool in let's say recipes/cadenza1/data_preparation. This is what I did for cec2

Ok so perhaps something as simple as audio/source_separation.py would be generic and still meaningful (or "pythonic" as some people term it).

Tbh, I don't really like the name audio for a directory in this case. To me, a dir name audio contains audio wavs.
We may need to define a meaningful directory tree. not only for the source_separation but any new functionalities.
Also, I don't think we should organise based on speech or music as many functionalities can be used in both cases.
One good reference of directory names can be Asteroid.
For example, in Asteroid, they have only one data dir to save the datasets. In contrast, we have 2 dirs with similar names which can be confusing: data and dataset
Perhaps, and following Asteroid, the content from data can be split and moved into:

scene -> for scene generators
processing -> for the HOA

In this case, the source_separation module should be placed in processing.
Therefore, the root in clarity would look as:

data
engine
enhancer
evaluator
predictor
processing

Fair enough I don't have strong feelings on it either way but my perspective is that  this is a Python project directories under clarity represent modules, audio wavs I would consider to be data and would sit outside of the clarity directory. There can of course still be data modules for processing data under clarity/data.
I think it would be prudent to sort out a structure though as it will aid in separating common modules from challenge specific ones.


Flash UID Zeros After --force-offline

After running cynthion info --force-offline the Flash UID shows up only as 0's.  Performing a reset and running cynthion info the Flash ID is displayed correctly again.
Hardware: Cynthion r1.4
Firmware version: v1.0.6
USB API version: 1.1
PyPi cynthion version: 0.1.0

This is caused directly by https://github.com/greatscottgadgets/apollo/issues/102 because cynthion info wraps the apollo info function.


How best to scroll to a position in the text?

For multi-line paragraphs you often want to move the view to a specific line, for example when doing a search to show a match or moving to a line or for a specific text offset.
What is the best way to do this?
NavigationActions.moveTo moves the caret but not the view, and that isn't really desirable anyway in the general case.
The scroll[]ToPixel methods are possible but how would I translate a text offset into a view pixel offset?  Also, in general how do I determine the view offset of a text offset that is currently not on screen?

You can use area.showParagraphAtTop(int paragraphIndex) or its bottom counterpart, or area.showParagraphInViewport(int paragraphIndex) to insure the paragraph is visible. There are two other methods not yet exposed from Flowless: VirtualFlow#show(int cellIndex, double yOffset) and VirtualFlow#show(int cellIndex, Bounds regionInCell)
As for ones that show a line specifically, you'd need to use a mixture of the above. Since the VirtualFlow only renders the paragraphs that are visible as a way to save memory and increase speed, you would need to show that paragraph first, calculate where on the screen the thing in the paragraph you want to show is, calculate an offset value using that, and then scroll by that offset value so that the line is visible or the part in the line is visible.

Closing since I think this has been answered.


random change

Can one of the admins verify this patch?

Can one of the admins verify this patch?


created and added BIT.py

created and added BIT.py

Change the README file too mate !

what changes do I need to make?

I just added a link to .py file, but being a noob to git I have added a link from my forked repo. Please tell if I am doing any wrong.

You did everything right except added the wrong link . I'll merge this PR . Change the link in a new PR if possible .

You supporting DS in cpp prs?

YES .

On to trees!  😋
So I am adding trees and LLs


Add API Cache to API Gateway for Amplify REST API

Is this related to a new or existing Amplify category?
api
Is this related to another service?
API Gateway
Describe the feature you'd like to request
At the moment, it does not appear possible to create an API Gateway route with a "request path" as a cache key. This makes setting up an API Cache difficult.
Steps to reproduce:

amplify add api
Set up REST API
add route and connect to a lambda
route example: /posts/{postID}
set up lambda to echo the {postID} of the request via JSON response
Deploy environment
access API Gateway console for this API
activate API Cache via "Stages"
access "Resources" -> "/posts" -> "/{postID}" -> ANY -> "Request Paths"
try to enable caching on postID

Error: Invalid cache key parameter specified
All requests to the /posts/{postID} APIGW route will return the first cached postID.
Describe the solution you'd like

Fix the CloudFormation template to properly set CacheKeyParameters for request paths when setting up a REST API via amplify add api.
AND
Enable API caching settings via Amplify CLI

Describe alternatives you've considered

Set up individual request paths via amplify update api - for example, adding /posts/1, /posts/2 separately, etc. This does not scale well.
Use in-memory caching in the Lambda response handler. This is what I'm doing now, but it results in lots of unnecessary invocations, and I'd like to move the caching layer up to APIGW.

Additional context
I'm unaware of the requirements to change the CF Template to set CacheKeyParameters for APIGW resources, but this article seems to indicate a possible solution.
Also, I believe this issue would be resolved:
https://github.com/aws-amplify/amplify-cli/issues/1399
Is this something that you'd be interested in working on?

[ ] 👋 I may be able to implement this feature request
[ ] ⚠ This feature might incur a breaking change

Hey @warrenmcquinn
We currently don't support this in the CLI workflow, however we are looking into how you can override generated resources, such as adding caching. No timeline on this yet.


Cleanup lua code

Hi Yoon,
I did a little cleanup of your lua scripts.
We plan to add new features to seq2seq-attn and use it in our translation engines, and It's important for us to start with a clean code base.
The current inconsistencies make the code unusable in a team environment and it would be great if you could integrate this. Otherwise, we won't be able to merge future upstream changes easily.
The patch is really big because basically all lines have been changed so let me know if there is anything unclear.
Patch details:

remove redundant options parsing (cmd:parse was unnecessary called twice in several scripts)

cleanup requires (remove unused, add missing, harmonize call style)
The code was executing just fine when using the torch interactive interpreter (th command) that makes an extra effort to find lua scripts, but not with the lua interpreter.
For example, the dot in a require instruction (eg: 'script.lua') is used as a path separator in lua.
That means lua will try to find a script named 'lua.lua' located in the 'script' subdir, which is obvisouly not what you intended.

cleanup trailing whitespaces

cleanup mixed indentation: 2 spaces, no tabs
Before this, the indentation was a mix of 1/2/3 spaces and tabs that made the code unreadable depending on which text editor you used). It would help to keep this rule from now on.

A little precision regarding the requires cleanup:
I just came across the following issue #10, where require 'util' didn't work with torch.
My first iteration to make it work with lua broke your fix you did in this issue.
I fixed it in my second commit, it now works both with th and lua interpreters.
I use 'dofile' instead of 'require' to load your scripts, which is safer. See commit message for details.
Cyril

thanks! merged

Hey Cyril,
Thanks for using seq2seq-attn. Let us know if there is anything else we can do to make it usable for your purposes. It is certainly research code, but it is getting better and we are very willing to add/take pull request for more features.
Cheers,
Sasha

Hi Sasha,
Thank you both for your quick replies, amazing work you've done here.
Actually yes I think I will have at least one more pull request to submit in the next few days (for making the code a little more flexible to be able to call it more easily in command line as well as from C/C++ libraries).
I'll keep you posted!
Cyril


refactor tests + add new inline query results

Add InlineQueryResultMpeg4Gif
Refactor and simplify tests

Current coverage is 74.28% (diff: 83.33%)

Merging #2 into master will increase coverage by 1.21%

@@             master         #2   diff @@
==========================================
  Files            19         19
  Lines           349        350     +1
  Methods         347        348     +1
  Messages          0          0
  Branches          2          2
==========================================
+ Hits            255        260     +5
+ Misses           94         90     -4
  Partials          0          0

Powered by Codecov. Last update db142e4...be19e04