How to create Timber::get_posts inside a Twig template

I have a custom post type I use to display banners on my site.
Besides the main banner information, I trying to display a loop of 3 related WooCommerce products, picked from a ACF relationship field.
I can just run {% for post in banner.get_field('products') %} and that does retrieve the data, but not as I would hoped for. It returns a regular posts object but in this case, being WooCommerce posts, I would rather use Timber's Timber::get_posts so that I can use the tease templates and have the hooks running with the right context.
How would you approach this, any ideias?
Update:
I though I would elaborate a little more on my use case in the hopes someone can give a hand with this.
Let's say im passing to my template a banner post type loop, for which the query is something like:
    $args = array(
        'numberposts' => 5,
        'post_type'   => 'banners',
        'tax_query' => array(
		    'relation' => 'AND',
    		array(
    			'taxonomy' => 'banner_pos',
    			'field'    => 'slug',
    			'terms'    => array( 'home-main' ),
    		)
    	),
        'order'       => 'ASC',
        'orderby'     => 'menu_order'
    );
    $context['banners_top']       = Timber::get_posts( $args );

Now inside my template, lets say home.twig, I call a new twig file which contains the logic that will act on the data passed to $context['banners_top']

            {% if banners_top %}

                {% for banner in banners_top %}

                        {% if banner.manual_link %}
                            {% set link = banner.manual_link %}
                        {% elseif banner.banner_link %}
                            {% set link = fn( 'get_permalink', banner.banner_link|first ) %}
						{% else %}
							{% set link = undefined %}
                        {% endif %}

                        {% if banner.title or banner.description or banner.button_text %}

                                {% if link %}
                                    {{banner.title}}
                                {% else %}
                                    {{banner.title}}
                                {% endif %}

                                {% if banner.description %}

{{ banner.description }}

                                {% endif %}
                                {% if banner.button_text and link %}

                                    {{ banner.button_text }}
                                {% endif %}

                        {% endif %}

                        {% if banner.products %}

                                {% for post in banner.get_field('products') %}

{{ post.post_title }}

                                {% endfor %}

                        {% endif %}

						{% if link %}  {% endif %}

                {% endfor %}

            {% else %}

                            {{ fn( '__', 'No Banners Published' ) }}

            {% endif %}

The relevant part here is:
{% if banner.products %}

                                {% for post in banner.get_field('products') %}

{{ post.post_title }}

                                {% endfor %}

                        {% endif %}

banner.get_field('products') is an ACF relationship field (WooCommerce products) for which I would like to loop inside my banner. I do get a regular post object and can loop through them. But I would like to have them available as a Timber object so that I can have a few utilities to have the posts available in the right context.
For example, with the code shown above I don't have access to things like prices, discounts, etc. This also happens with regular loops, unless you apply a quick fix to set the right context as @jarednova explained me before. Im guessing the same needs to happen here but im having trouble getting it to work.
Many thanks.

@lmartins I think the solution might be as simple as applying the TimberPost function to the result, so in the relevant part...
{% if banner.products %}

        {% for post in TimberPost(banner.get_field('products')) %}

{{ post.title }}

{{ post.price }}

        {% endfor %}

{% endif %}

... this is the same as converting to a TimberImage, etc.
As a separate/similar note, I want to expose the global Timber object in the Twig template in the next version, so that you could do something like...
{% for product in Timber.get_posts('post_type=product') %}

{{ product.title }}

{% endfor %}

Hi Jared,
Many thanks for your input here.
After my initial post I was actually doing something similar:
                        {% if banner.products %}

                                {% if banner.box_title %}

{{ banner.box_title }}

                                {% endif %}

                                    {% for entry in banner.get_field('products') %}
                                        {% set post = TimberPost(entry) %}
                                        {{ fn('timber_set_product', post)}}
                                        ...
                                    {% endfor %}

                        {% endif %}

Sadly thought, with either solution I get the following error:
Fatal error:  Call to a member function get_price_html() on null in /var/www/html/wp-content/plugins/woocommerce/templates/loop/price.php on line 17

For some reason Timber is unable to set the right context for each product.
I'll keep digging this to see if I can find any solution. If you have any other ideas please do share.
You side note about exposing the global Timber object looks really useful. Can't stop preaching about Timber to everyone I know working on WordPress projects ;)

Ok, just to add to this.
Do you remember the little utility function you suggested to set the right context for product loops?
function timber_set_product( $post ) {
    global $product;
    var_dump($product);
    if ( is_woocommerce() || is_search() ) {
        $product = get_product($post->ID);
    }
}

That var_dump shows that for some reason if the context im trying to achieve here the global $product isn't accessible.
This is what I get from that var_dump. At the top the loop im trying to build (it shows null for the var_dump), bellow the object is printed with success:

This explains why the hooks specific for WooCommerce products cannot run. Only thing missing is understanding why the global $product is inaccessible in this case.
Thanks again Jared.

Ok, got it to work.
I don't really remember why but the function call wc_get_product need to be wrapped in a if condition. Just added the is_front_page which was obviously missing for this scenario.
function timber_set_product( $post ) {
    global $product;
    if ( is_woocommerce() || is_search() || is_front_page() ) {
        $product = wc_get_product($post->ID);
    }
}

Hope this do not induces any unforeseen issues.
Thanks again for your suggestion @jarednova, it ultimately pointed me in the right direction. :)


Apparently this is part of the new UI update mentioned here

Apparently this is part of the new UI update mentioned here
However it doesn't seem to work as described. Even when explicitly calling chrome.pageAction.hide(tabId). I have posted on their dev forums here
For now the workaround is to either show the icon in your toolbar constantly (it won't grey out) or explicitly check your hamburger menu. Sorry about that
Originally posted by @Frozenfire92 in https://github.com/Frozenfire92/Pages2Repo/issues/20#issuecomment-201079803

https://github.com/Frozenfire92/Pages2Repo/issues/23#issue-843385852


How do I get the contents of the input box

Any more info of what you're looking to achieve?

Closing this as after 2 months no description was provided.


UpdateRequest payload should ONLY include Spec fields with Delta

In the current implementation of newUpdateRequestPayload method inside sdk_update.go.tpl file, all the Spec fields from desired resource are included in the UpdateRequest.
For the most part this works well because AWS APIs ignore update of a field to similar value in the backend. But there are some minority of cases where the Update API can return ValidationError(or have some other unknown side-effect). Example: RDS's ModifyDBInstance API does not allow passing identical value for DBSubnetGroupName field.
To be on the safer side, ACK code-generator should only include Spec fields, with Delta between desired and latest state, inside the UpdateRequest payload. This will have two advantages:
a) Reduces the chances of ValidationError
b) The UpdateRequest payload for customers will be more useful when customers try to debug using CloudTrail.

As per @jaypipes, The flip side for only adding a field in UpdateRequestPayload when there is delta(between desired & latest state), is that whether AWS Update API will remove the fields absent in UpdateRequest from the AWS Resource in some cases.
So there should be a configuration option per resource in generator.yaml that will control whether to consider delta before adding a field inside UpdateRequest payload.

This is already implemented as OmitUnchangedFields config https://github.com/aws-controllers-k8s/code-generator/commit/9fbf8c4cbf99b2a944ac0e38872b0cd776cc2962
/close


fix: added internal variable to suport private hosted zones

/jira open ticket

/jira open task

/jira open task


ROX-13640: Build mock-grpc-server image on GHA

Description
A detailed explanation of the changes in your PR.
Feel free to remove this section if it is overkill for your PR, and the title of your PR is sufficiently descriptive.
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why
you did not do so. Valid reasons include, for example, "CI is sufficient",
"No testable changes". Feel free to attach JSON snippets, curl commands,
screenshots.
In addition to reviewing your code, reviewers must also review your testing
instructions and make sure they are sufficient.

Current dependencies on/for this PR:

master

PR #3926

PR #3942   👈

This comment was auto-generated by Graphite.

/retest

I was able to pull the mock grpc server image and the tag looks good. Before I approve I would like to understand the CI failures. They don't appear to be related to the changes made here, but still I don't want to approve of a PR with failing tests without understanding the failures.

/retest

@JoukoVirtanen @gavin-stackrox PTAL

/retest

/retest

@gavin-stackrox @JoukoVirtanen PTAL


how to set NFTPort Gallary?

I want to make the NFTPort gallery Unity through your asset.
What should I do?

Hi there, it is very easy:

Clone and Open in Unity

You just need to set up your APIKey in NFTPort/Home in the top window bar of the project.
https://docs.nftport.xyz/docs/nftport/ZG9jOjUwMzc2NzA5-getting-started#getting-started

Then in the scene, just copy the Gallery Object to your scene if you need to,

Under this Object, there are frame prefabs, Arrange these frames in however shape/size to meet your metaverse/game needs.

Let us know,
I'll have a quick code walkthrough video up soon, and will post it here.

Thank you for your answer.
I want to make a gallery using your NFT-Unity3D-Metaverse-Template. However, I have a few questions.
How do I upload files from gallery template, get nft issued, and register my nft in gallery?

Hi @Hye1Kim , Gallery is a read NFT data example. It will read all the NFTs in the collection or an account. To register/issue your NFT you need to use any of the write/Mint endpoints.
Easiest to start with easy mint URL:  or East Mint FIle components.
If you would like to mint to your own collection and add more custom attribute and metadata to your NFT use Custom Mint , it involves multiple steps and you will need to also use storage features there.
Once you mint it to the wallet, you can query the gallery and NFT will show up, it may take a minute or two to register and if it doesn't let us know. .
There's a PR #2 open which will show examples of it once finalised.

Hello, Thanks for the reply.
But my NFT doesn't appear in the gallery yet.
I'll show you my work below.

Easy Mint URL

Mint was successful through Easy Mint URL, and Mint to Address used the rinkeby address of my Metamask.
Screenshot from 2022-09-15 15-52-25.png
fig 1 . Sucess Easy Mint URL
abf0976b-9814-49d3-8e3b-2b8a1d38151c.png
fig 2 . Sucess Easy Mint URL   -  Metadata
image.png
fig 3. my Account - Rinkeby Test Network
Screenshot from 2022-09-15 15-57-15.png
fig 4-1.  A list of NFTs I have minted
Screenshot from 2022-09-15 15-57-17.png
fig 4-2.  A list of NFTs I have minted (scroll ->)

Connet Address ( NFT-Unity3D-Metaverse-Template)

I can't see anything even though I did mint.
Screenshot from 2022-09-15 15-57-51.png
fig 5. Enter my address > Connect address
Screenshot from 2022-09-16 11-04-31.png
fig 6. I can't see anything
Screenshot from 2022-09-16 11-05-09.png
fig 7-1. Iogs
Screenshot from 2022-09-16 11-05-19.png
fig 7-2. Iogs
Screenshot from 2022-09-16 11-05-13.png
fig 7-3. Iogs
Screenshot from 2022-09-16 11-05-15.png
fig 7-4. Iogs
I really want to make a nice nftport using your nftport. Help me

Hello, Thanks for the reply.
But my NFT doesn't appear in the gallery yet.
I'll show you my work below.

Easy Mint URL

Mint was successful through Easy Mint URL, and Mint to Address used the rinkeby address of my Metamask.

fig 1 . Sucess Easy Mint URL

fig 2 . Sucess Easy Mint URL   -  Metadata
image.png
fig 3. my Account - Rinkeby Test Network

fig 4-1.  A list of NFTs I have minted

fig 4-2.  A list of NFTs I have minted (scroll ->)

Connet Address ( NFT-Unity3D-Metaverse-Template)

I can't see anything even though I did mint.

fig 5. Enter my address > Connect address

fig 6. I can't see anything

fig 7-1. Iogs

fig 7-2. Iogs

fig 7-3. Iogs

fig 7-4. Iogs
I really want to make a nice nftport using your nftport. Help me

@khw0114  Thanks for posting the elaborated steps. super appreciate it. The issue has been solved now and all minted NFTs are visible in NFTs of account feature.
I would also recommend disabling the big gallery and using the smaller gallery in the hierarchy for small collections/accounts.
Let us know if you're still facing any difficulties.
PS, if you would like to use custom mint, you need to deploy your own erc721 contract here with same API key and input that in the contract field of custom mint.
https://docs.nftport.xyz/docs/nftport/b3A6Njg1NTI0MTI-deploy-a-contract-for-nft-products
Best, looking forward to what you build.

Hello
Thanks to you, I solved the problem well.


Staging

Description
Fixed O auth providers and uploader, small amount of "error" handling in place

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

Change Status

[x] Complete, tested, ready to review and merge
[ ] Complete, but not tested (may need new tests)
[ ] Incomplete/work-in-progress, PR is for discussion/feedback

How Has This Been Tested?

[ ] Test A
[ ] Test B

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] My code has been reviewed by at least one peer
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] There are no merge conflicts

Looks good! Merge that beast into master

I won't be able to, it'll need to be one of you all if everything is looking good


Better defaults Forge

I don't plan on releasing anymore Forge builds for 1.19.2. In 1.19.3 this will be included as part of parity port.


Insufficient consensus error reverts in price feed smart contract

In particular de following bytes trigger the error. 39([81, 0.5, 0.7]). We should investigate why this happens as this stalls the price feed contract

It happens because it is an assumption of the Witnet library that error payloads are uint64[], but the Witnet node is encoding percentages as floating point numbers :sweat:

We tried putting a try-catch in the Witnet library but since it should to support multiple versions, and the try catch with memory identifiers was only working after 0.6.6, we decided to fix it in the client contracts. This issue has been closed by bf42e2830a33c1e4082890d07c78867f04c26bf6


Callbacks for evaluate() and evaluate_generator()

Keras Model functional API allows fit() and fit_generator() to have a callback. This is useful to record logging history or temporary information, or for use with tools such as keras-tqdm. However, evaluate() and evaluate_generator() can also take a long time (30mins+ on my current dataset), and so would seem a priori to be good candidates to also take a list of callback functions.
I've searched but found no discussion on this. Is there a reason this would not be feasible to implement?
Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or join the Keras Slack channel and ask there instead of filing a GitHub issue.
Thank you!

[ y] Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

[ y] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.

[n/a ] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps

[ ] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

I believe this is already being discussed in #4185.
(If we can get callbacks for validation, then we will also have them for evaluation: Either evaluate() or evaluate_generator() is called by fit_generator() for validation. And test_loop() is called by both evaluate() and fit_loop(), which is called by fit().)


MRG: Weak dep on mpl

Closes #5248.
Not doing the install_requires for now. We can wait until sklearn does it :)

thx @larsoner !


unittests: add a more verbose error message

This test was failing for me locally due to a path configuration issue.
Add an indication which option is missing.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@swift-ci please smoke test

@swift-ci please test macOS platform

Build failed
Swift Test OS X Platform
Git Sha - 2c15beb98e37310c2cc3b4e326494446ce585f8b

@swift-ci please test macOS platform

Build failed
Swift Test OS X Platform
Git Sha - 2c15beb98e37310c2cc3b4e326494446ce585f8b

@swift-ci please smoke test macOS platform


Feature/957 modal

Modal header shrinking when bootstrap 3 or 4 is included.

@saadmhybris just fixed the issues you mentioned. Please take a look. Thanks!

looks good


Support for v2 requests?

This is more of a feature request.  Is there any plans to incorporate v2 requests, Cisco has made some bigger requests more streamlined in v2.
Let me know if there is anything I can help with, I am subpar programmer, but I am willing to test or information gather as needed.

Glad to hear that some people are using the library :).
I will try to integrate the v2 ressources and services as soon as I get some free time.
The idea would be not to specify the /v1 or /v2 in the url during the class construction but rather the URL without the /v1 or /v2. It will be up to the library to test both v1 and v2 url.

I tried to fork it and make a pull request. I am not sure I did right.


next init: Create supplied directory if it does not exist.

Currently, when running next init some-directory, if some-directory does not yet exist the command will exit with a nasty looking error (see below).
This PR creates the supplied directory if it does not exist, preventing the error.
next init some-directory
{ Error: ENOENT: no such file or directory, open '/Users/timoxley/Projects/tests/some-directory/package.json'
    at Error (native)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/timoxley/Projects/tests/some-directory/package.json' }

Just thought of something else: it'd be nice to support next init ./dir, if this doesn't already.

@rauchg yep this does exactly that

@timoxley LGTM. Can you fix conflicts ?

done

Thank you!


demo: update mdast

The demo is powered by the ancient<EMAIL_ADDRESS>This patch fixes it.

@eush77 Thanks! Totally forgot about that... :frowning:


"Error: You are not logged in to jpdb.io - Reviewing cards requires being logged in", despite being logged in on Firefox.

I've tested both Wikipedia and ttsu, I've tried different words and different review grades. I've relogged into jpdb.
The cards do get added to my deck, I just can't review them.
As I was writing this, I decided  to test it with (ungoogled) chromium. Works fine. Issue is only on Firefox, for me.
It's very possible that one of the many tweaks I've made to my Firefox settings is causing problems.

Got this issue when I was logged into jpdb in a Firefox Container, and tried to review a word in a tab in the same container. But it looks like this extension requires a login outside of containers, in the "main" Firefox, if that's the right way to call it. Logging in again outside of containers solved it.
This requirement might be inevitable with how extensions work, but perhaps still something to document.


Add support to Compute Library for Arm Architecture (ACL)

Add support to Compute Library for Arm Architecture (ACL)

Add package support to install ACL 21.02
Include option to build TVM on Linux using ACL

@icemelon9 also in case you can have a look

Friendly reminder about this one @tqchen @icemelon9


fix:helm install kmesh failed

What type of PR is this?
bug

What this PR does / why we need it:
fix :helm install kmesh failed
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

/lgtm
/approve


Yep, this has been tested in uPortal, with uPortal web components and Notification web components


Feature Request: Equivalent of bash &&

Summary of the new feature/enhancement

Note: Sorry in advance, if there are already similar cases. I couldn't find with && or old connect case # 778798

To improve more Linux-friendlyness, I do like to propose && syntax, again. (as many others used to do since powershell is released)
In CMD or Bash, there are && which means "execute command 1, and if it succeeds, execute command 2".
When I move cmd/bash command build && run_tests to PowerShell, I need to change code to run with following choices.

(build) -and (run_tests)
build; if ($?) {run_tests}
cmd /c "build && run_tests" or bash -c "build && run_tests"` (don't forget quote command with "", it means can not straight copy&pate.)

-and is powershellish way but not familiar to fresh users, and it will output Error Message and boolean output. try  (ls z:\) -and (echo hoge).
I think offer build && run_tests syntax is great experience for many users.
Proposed technical implementation details (optional)

New operator &&.
Currently it produce error.
PS> echo fuga && echo hoge
At line:1 char:11
+ echo fuga && echo hoge
+           ~~
The token '&&' is not a valid statement separator in this version.
+ CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine

Ref

https://connect.microsoft.com/PowerShell/feedback/details/778798/implement-the-and-operators-that-bash-has
https://stackoverflow.com/questions/563600/can-i-get-to-work-in-powershell

Indeed it would be nice to have that, but it has already been proposed in #3241.

thanks, close as dup.


enhancement: Avoided capitalizing all letters and increased space between buttons.

Fixes #250
Changes: All names now just have the first letter capitalized. Space between send/transfer buttons and the section above has also been increased.
Screenshots for the change:

@adityastic @mariobehling @iamareebjamal please review.

Thanks!


Fallback font for titles and bold texts

Currently there is a fallback font robotoflex-regular-normal-400-fallbackconfigured as a fallback for "Roboto".  The fallback font works very well for normal text, however it doesn't honour the font-weight argument.
The consequence of this is that titles h1, h2, etc... and bold texts, are first rendered with the normal font-weight and when the fallback font is swapped by the actual one, the right font-weight is applied causing CLS.
This ticket is to investigate if there is a way to apply font-weight to the fallback-font

@dzehnder let's do this to boost performance with go-live pushed by a week - please talk to @karlpauls who has recently modified fallback font handling.

take note of https://github.com/adobe/helix-project-boilerplate/commit/e6399b8eed912d23f298b2ea8881a584378d4a64

@dzehnder please take a look at this. Font swapping is still a contributor to CLS (around 0.002+). it would be awesome if we found a better solution (see previous comment). Might require some experimentation. @karlpauls recently switched to pure CSS fonts, but given the solution by uncled it might be beneficial to go back to woff2. Let me know your thoughts.


Question: Deployment with Serverless framework

Thanks for your work on the project. As a frequent Serverless framework user, I'd like to get your POV if an (additional) deployment method via Serverless would make sense. If yes, I think I could create a serverless.yml for this project within a PR.

I think it would be great to have deployment scripts for Serverless. A PR would be very welcome!
I haven’t used it much myself - would you be able to also expand the readme with Serverless deploy instructions?

Hello! Did you get anywhere with this? No stress, just I might close the issue if there's no PR coming.

@TimothyJones Sorry, this kind of skipped from my list of todos... Unfortunately, it looks like I won't have time to implement it soon. You can close the issue if you like.

No stress. A PR would still be welcome if you change your mind, but no need if you're busy 👍


New package: Colocalization v0.1.0

Registering package: Colocalization
Repository: https://github.com/bencardoen/Colocalization.jl
Created by: @bencardoen
Version: v0.1.0
Commit: 40299fa2bea556a76d898a85c33dcbc231167300
Git reference: HEAD
Description: Colocalization metrics and distances for images or their sparse representations.

@JuliaRegistrator register


[Feature] WinUI TabView element

Description

Add support for the WinUI TabView element.
Support available for:

TabListView (ListView)

ListViewItem incl. CloseButton

AddButton
Selected item

Anything else left to implement on this?

Nope! Will close off.


feat(api): Added some internal temporary APIs to stats for Town Halls

These are for internal use only. The queries are heavy and may take up to a few minutes to resolve. We don't plan to support them after we implement dedicated statistics pages on Explorer frontend.

nice work!
there is some updates for this:
Hey, have an update on the metrics needed on explorer Dashboard
of smart contracts deployed (w/ chart)
of accounts created (chart? explorer just has fixed #)
Growth in stake (w/ chart)
Gas paid (w/ chart)
optional bonus — GDP
Weekly + Daily Active Accounts
Weekly + Daily Active Contracts
Number of Transactions
Transactions Volume
Number of Staking
Staking Volume
Weekly +Daily Active Validators
13. Average Transaction Size
@frol

@icerove as we discussed, we will need proper support on the backend with caching. The implementation of all the charts will require:

Craft the queries
Designing the framework on the backend for caching the precomputed values (it will quickly grow into something we cannot maintain efficiently if we just keep adding the metrics ad-hoc, so we need some structure, at least, having a stats folder on the backend)
Implementation on the backend
Design the framework to query the data on the frontend
Implement the charts

Which parts of the scope are you comfortable leading?

important updates:
these are most important metrics:
of smart contracts deployed (w/ chart)
of accounts created (chart? explorer just has fixed #)
Gas paid (w/ chart)
Weekly + Daily Active Accounts <Chart + Most active accounts list>
Weekly + Daily Active Contracts <Chart + Most active contracts list>
Number of Transactions Daily
Staking Volume

definitely can leading for 3, 4, 5 since really familiar with those. 1 and 2 I would like to sync with you together. @frol

@khorolets I would like to ask you to help with (1) and (2). As to (1), let's focus on the important metrics first. As to (2), I see it somewhat similar to the approach you took for circulating supply caching, just come up with some project layout and pattern, so adding more metrics will be just a matter of following the same flow (ideally, with as little boilerplate as possible).

P.S. The queries for the following stats can be extracted from this PR:

# of smart contracts deployed
# of accounts created
~Gas paid~ Gas used (we need to clarify the intent of this metric and whether sum of gas_used in chunks is accurate to estimate the paid gas or should we account the gas attached to function calls with Evgeny Kuzyakov after holidays, so far, gas_used should be enough)
Number of Transactions Daily

whether sum of gas_used in chunks is accurate to estimate the paid gas

It is equal to the amount of gas burnt. It is not clear to me why you want to know the amount of gas attached given that it is generally the case that people attach more than needed.

finish current frontend implementation and wait for new queries. @frol @khorolets

@bowenwang1996 I was not following closely the topic after we discussed to burn all the attached tokens. So just to double-check, can you confirm that the sum of gas_used in the chunk headers is what we want to present here? (If that is the case, it is done correctly now)

So just to double-check, can you confirm that the sum of gas_used in the chunk headers is what we want to present here?

Yes

I do not see the api function for staking one, are you still working on that or I will add that directly? @frol @khorolets

Note:

for active accounts and contracts, they also want weekly data, should we add query or aggregate the data from frontend

also for active accounts and contracts, they want most active list, we should also have those query and make it table I think.

@frol @khorolets

we need active accounts and contracts for both daily and weekly. And need list of 10 most active guys

we need active accounts and contracts for both daily and weekly. And need list of 10 most active guys

@khorolets I will finish and merge this PR today and will add staking in a separate PR tomorrow. Since this is in urgent need somehow.

@khorolets I will finish and merge this PR today and will add staking in a separate PR tomorrow. Since this is in urgent need somehow.


[feature request] change the arg_perfix of coqpit

Is it possible to change the arg_perfix when using Coqpit object to another value / empty string?
I see the option is supported in the code by changing arg_perfix, but not sure how to access it using the proposed API.
Thanks for the package, looks very useful!

Just figured out it is accepted by init_from_argparse as an arguments, sorry for the false alarm


optimizer: prioritize picking tables of same distribution on multi-way join

Currently, the heuristic ordering of join only consider eq conditions.
https://github.com/singularity-data/risingwave/blob/23e4c1cd5e435ca61de889f31f63827882d93468/src/frontend/src/optimizer/plan_node/logical_multi_join.rs#L171-L250
Consider the following case:
select * from a, b, c, d where a.v1 = b.v1 and a.v1 = c.v1 and a.v2 = d.v2

In this case, the two orders can all be without nested loop join:

((a join b) join c) join d
((a join b) join d) join c

However, the second one will introduce 1 more shuffle, as a join b's distribution is not the same as d.v2, and when joining c, we need to shuffle back to follow c.v1's distribution. The first one only need to shuffle once at join d.
We can make this part of the join reordering heuristics. Also this heuristics has already been considered in delta join solver.

Join reordering happens in logical optimization, so distribution is not available yet. A more accurate description of this requirement may be:
Let the 1-1 joins with same join keys be aside of each others. e.g. for a.v1 = b.v1 and a.v1 = c.v1, tables a,b,c should be put together, so the order a, b, c, d is better than the order  a, b, d, c

Join reordering happens in logical optimization, so distribution is not available yet. A more accurate description of this requirement may be:
Let the 1-1 joins with same join keys be aside of each others. e.g. for a.v1 = b.v1 and a.v1 = c.v1, tables a,b,c should be put together, so the order a, b, c, d is better than the order a, b, d, c

That's more accurate, thanks! 🤪

One idea I had to do this heuristic was to go through the join edges in BFS order (though DFS should also work). That way, edges that share a node with a previous edge will be joined first before other edges. Thoughts?

Yes. We are using a similar approach:
https://github.com/singularity-data/risingwave/blob/753fd97a9895742a24bf7e3be9de25e58896712c/src/frontend/src/optimizer/plan_node/logical_multi_join.rs#L308-L327

Close this issue. Please re-open it if need further improvement,


Deprecates use of Task in ConfigKey

Also avoid StackOverflowError in ExecutionContext.getImmediately(task)
When a non-BasicTask is passed in.

The motivation for deprecating setting a ConfigKey as a Task is that we really shouldn't be doing it! It can get very messed up if one tries to getImmediately or get non-blocking (e.g. by a Transformer that is trying to evaluate its result when triggered). That can leave the task in a cancelled state, so all subsequent calls to task.get() (i.e. all calls to config().get(mykey)) will fail!
Instead, we should be using TaskFactory (which is how the DSL evaluation works).
It's good to deprecate this before a major release of 1.0.0.
It would be good to add an overloaded method for setting config to set(ConfigKey<T>, TaskFactory<T>) so that such usage doesn't involve ugly casting to work around the strongly typed generics. We can do that as a stage two, separate from this PR.

Looks good.  Merging.
Agree re set(ConfigKey<T>, TaskFactory<T>).  Would also be nice to warn but similarly we can do that in a separate PR, once we've removed other uses.  In particular Java calls to DependentConfiguration eg attributeWhenReady will make Task instances so that is an obvious item to fix.
There is related work in #853 which should be built upon as this continues.


Escaping special characters in ReplaceTokens Secrets

Colin,
Any way to escape the ':' and ';' characters when using Advanced -> Secret Tokens?
Related - does usage of your Secret Tokens feature provide additional security beyond simply not echoing the secrets to logs and masking them in the K:V pair UI? (i.e. does it protect me from more than just eyes over my shoulder / someone with direct access to my VSTS account?)
p.s. sorry for the duplicate issue, I thought maybe this was user error and deleted my first issue on this. (of course, it still may be user error, in which case please correct me!)

hey @joshfitabase - not sure what you mean by "additional security"? What else are you looking for other than masking in the logs? By the way, the new (.NET Core) agent that uses vsts-task-lib actually passes the secret variables to the task, so sometime soon I'll remove the property from the frontend (passing it in via K:V pairs was a hack since the current vso-task-lib doesn't pass secret variables to the tasks).

@colindembovsky thanks for the quick reply! That's pretty much what I expected. I wasn't sure what else it could be doing for me behind the scenes, but I wanted to cover my bases in case your reply was something like "due to strange quirks in the vsts environment https doesn't get used for that logging data so you really want to obfuscate it"
It still would be nice to have an escape sequence for those characters, but sounds like it isn't a dealbreaker if the only security concern is someone with direct account access (or standing behind me)


Include vulkan.h before #define VMA_VULKAN_VERSION

Hi, upon updating my local fork my compilation started hitting the following assert:
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/4d65f7e113480be158f85e6f924b3d775e215a2b/include/vk_mem_alloc.h#L14582-L14587
This happens because in commit https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/commit/5c710e86a0ce0664bbc2374c39b956b9928b2f29 the definition of VMA_VULKAN_VERSION was moved before the include of <vulkan/vulkan.h>. So, instead of 1002000 it is now being set to 1000000 (on the #else branch), since I'm not including vulkan.h myself in the .cpp file where I define VMA_IMPLEMENTATION.
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/4d65f7e113480be158f85e6f924b3d775e215a2b/include/vk_mem_alloc.h#L132-L142
I have opened this PR because I didn't see a particular reason for the order switch in commit https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/commit/5c710e86a0ce0664bbc2374c39b956b9928b2f29, but please let me know if this is something I should correct on my usage of the library (e.g. by defining VMA_VULKAN_VERSION myself).

I moved the definition of VMA_VULKAN_VERSION above functions like extern PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; but I forgot about this include. Thanks for fixing this.

Hey @adam-sawicki-a thank you! I was wondering if including vulkan.h itself is necessary, or if vk_mem_alloc.h could simply do:
#ifndef VK_PLATFORM_H_
    #include <vulkan/vk_platform.h>
#endif
#ifndef VULKAN_CORE_H_
    #include <vulkan/vulkan_core.h>
#endif

I have tested this locally on Windows but haven't digged into the code to see if there are any dependencies on other specific platforms (that are included by VK_USE_PLATFORM_* in vulkan.h). If there aren't any though, I think it could be a good replacement, since this would avoid including windows.h when VK_USE_PLATFORM_WIN32_KHR is defined.


Special Mission tracking

Special missions now award mission completes
Genin => D-rank
Chuunin => C-rank
Jonin => B-Rank
Sennin => A-Rank
Selecting an easy difficulty at any rank will downgrade the mission 1-rank
Selecting a hard or nightmare difficulty at any rank will upgrade the mission 1-rank
Being a capped Chuunin will upgrade the mission 1-rank
Selecting an easy or normal mission as a capped Chuunin will downgrade the mission 1-rank (stacks with base dg on easy)
Being level 90+ Jonin will upgrade the mission 1-rank
Being a level 80+ Jonin and selecting easy or normal difficulty will downgrade the mission 1-rank (stacks with base dg on easy)
These will progress daily missions, so long as the rank meets the minimum daily task requirement
Notes:
SM will always county as a minimum of D-rank
Mission rank awards are hard-capped to A-rank

I believe this should work

This will resolve #129


Dynamically load color maps or setting minimum display value for noisy data?

Currently NiiVue can only select from a preset list of color maps. This is enough for most applications, but not seem flexible enough to be general purpose. Consider the following old 3D backscatter imaging data taken years ago with significant noise:
image.zip
Direct load gives the following result:

Whereas in older version MRIcroGL one could adjust transparency and have the following:

Or is there a way to set minimum display value for generic greyscale data?

@shangjiaxuan

Your image looks squashed in NiiVue because you have set the sform_code to zero, making the spatial transform unknown. Therefore, the image orientation and dimensions are ambiguous. When you create a NIfTI image and you want the viewer to use the spatial transformation matrix (the sform) make sure you set the sform_code to a value of 1 or greater, and make sure this value is greater than the qform_code. You should set the qform_code to zero (unknown). See here for details.

Here are a few ways you can optimize your image that you can explore with the drawing live demo:

Set the minimum and maximum intensity range (cal_min and cal_max) for your image. You can do this via code or by dragging the mouse over a region of the 2D slices that you want to optimize.
Choose a colormap that uses hue as well as intensity. Here I have chosen the Plasma item from the Color menu.
Choose Remove Haze from the View menu to remove noise spikes (using Otsu's method). This works best after you have already set an appropriate intensity range.

@shangjiaxuan please see the colormaps live demo for an example of creating your own custom color tables (the custom button).


Onboard and start writing ReportStream tests

Placeholder for Giang Hoang to get up and running and writing some tests. Assigning to Joe for now.


Fix unitfile. Fix #65

Pull Request (PR) description
As requested  on #68 by @fe80 , independent pull request addressing #65
This Pull Request (PR) fixes the following issues
Fixes #65

@fe80 I hope it's now ready to be merged

@fe80 This is needed for #75 to work without issues

Rebased on latest master

Ping @fe80

Hello @NITEMAN
You have a review for this pr :)

Sorry @fe80 but I can't see it (maybe latest UX changes in GitHub made me lost my way), could you please provide me a link?

sorry it was not publish...

@fe80 I hope it's ready now ;)


Common Ruby Errors

We have a large number of acceptance tests that run against live Google Cloud services, using service account credentials. The tests take on average 10 minutes to run. We have seen many errors using GRPC/protobuf in this environment.
When we create a new protobuf service (e.g. Pub/Sub Publisher or Subscriber) for every api call, the tests will run for a few minutes, but it is very common for an getaddrinfo error to be raised from within grpc causing the tests to hang.
E0311 10:06:34.633032000<PHONE_NUMBER>50560 resolve_address_posix.c:126] getaddrinfo: nodename nor servname provided, or not known

When we don't create a new protobuf service for every api call, but instead memoize the protobuf service, we can run our acceptance Pub/Sub tests to completion. However, when we run all the acceptance tests for all the services, we will eventually see a "Getting metadata from plugin failed with error" error.
E0310 09:04:41.211931000<PHONE_NUMBER>92256 credentials.c:1155] Getting metadata from plugin failed with error: NoMethodError
E0310 09:04:41.211990000<PHONE_NUMBER>92256 client_auth_filter.c:93] Client side authentication failure: Credentials failed to get meta

This metadata error is because the updater_proc object the ruby code gives to GRPC::Core::CallCredentials to sign the HTTP request is being replaced with a different object that doesn't have the call method. So the NoMethodError happens because new object (that is not the updater_proc object) does not have the call method. This behavior is very surprising. The objects we've been able to observe that have replaced our updater_proc object are the strings "DATASTORE_BACKUP" and "path". Both those strings are in our code, but nowhere near the proximity of any GRPC calls. I've looked extensively into this but have not yet found where this object is being replaced.
We are also increasingly seeing a "goaway" error. Sometimes this error will even create a segfault. The goaway error looks to be originating from the server. When this happens in our acceptance tests hang indefinitely, similar to the getaddrinfo error.
D0311 12:01:56.431449000<PHONE_NUMBER>45952 chttp2_transport.c:683] got goaway [0]: 73 65 73 73 69 6f 6e 5f 74 69 6d 65 64 5f 6f 75 74 'session_timed_out'

These issues are becoming a real blocker for us adding GRPC as a dependency.
/cc @jgeewax @quartzmo

I have the suspicion https://github.com/grpc/grpc/pull/5718 will solve this.

I pulled the branch and run our acceptance tests multiple times, but now they are hung on the following error, repeated every 15 seconds:
E0311 15:52:24.737155000<PHONE_NUMBER>50560 resolve_address_posix.c:126] getaddrinfo: nodename nor servname provided, or not known
D0311 15:52:24.737179000<PHONE_NUMBER>50560 dns_resolver.c:189] dns resolution failed: retrying in 15 seconds

That's ... not promising. What host name are you passing in?
On Fri, Mar 11, 2016 at 7:08 PM Mike Moore<EMAIL_ADDRESS>wrote:

I pulled the branch and run our acceptance tests multiple times, but now
they are hung on the following error, repeated every 15 seconds:
E0311 15:52:24.737155000<PHONE_NUMBER>50560 resolve_address_posix.c:126] getaddrinfo: nodename nor servname provided, or not known
D0311 15:52:24.737179000<PHONE_NUMBER>50560 dns_resolver.c:189] dns resolution failed: retrying in 15 seconds
—
Reply to this email directly or view it on GitHub
https://github.com/grpc/grpc/issues/5721#issuecomment-195647093.

We are setting the hosts "pubsub.googleapis.com" and "logging.googleapis.com". But I wonder if the same bug that is swapping out the updater_proc object is also swapping out the host object. I'll try to add some debugging statements to the code and retry tonight.

I've reproduced several times and grpc is trying to resolve "pubsub.googleapis.com" when the errors start, so the host value is not changing.

I do suspect that the issue with the updater_proc object might have something to do with ruby's GC and the location of the object being moved in memory. That issue doesn't show up when we create a new service and updater_proc object for every API request made. But it does when we when we hold on to those object for several minutes, enough time for the GC to sweep marked objects and consolidate memory. I'll continue trying to verify if this is the case or not.

I am certain that I can prove that the issue with the updater_proc on long running ruby processes is because the location of the proc object is moved during GC, and GRPC is holding on to the pointer to the original location. The actual ruby error is swallowed by GRPC, and a GRPC::BadStatus error with code 16 is raised instead. This happens in src/ruby/ext/grpc/rb_call_credentials.c, where the updater_proc object is called.
The original rescue function is:
static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args,
                                                      VALUE exception_object) {
  VALUE result = rb_hash_new();
  (void)args;
  rb_hash_aset(result, rb_str_new2("metadata"), Qnil);
  /* Currently only gives the exception class name. It should be possible get
     more details */
  rb_hash_aset(result, rb_str_new2("status"),
               INT2NUM(GRPC_STATUS_PERMISSION_DENIED));
  rb_hash_aset(result, rb_str_new2("details"),
               rb_str_new2(rb_obj_classname(exception_object)));
  return result;
}

Of we change the code to print the error object as a string instead of showing the error object's class, we will show the object that we are invoking the call method on:
static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args,
                                                      VALUE exception_object) {
  VALUE result = rb_hash_new();
  (void)args;
  rb_hash_aset(result, rb_str_new2("metadata"), Qnil);
  /* Currently only gives the exception class name. It should be possible get
     more details */
  rb_hash_aset(result, rb_str_new2("status"),
               INT2NUM(GRPC_STATUS_PERMISSION_DENIED));
  rb_hash_aset(result, rb_str_new2("details"),
               rb_funcall(exception_object, rb_intern("to_s"), 0));
  return result;
}

With that change we will see the object we are trying to invoke. The original debugging message printed to stdout shows only that a NoMethodError was raised:
E0313 15:11:08.914634000<PHONE_NUMBER>92256 credentials.c:1162] Getting metadata from plugin failed with error: NoMethodError
E0313 15:11:08.914648000<PHONE_NUMBER>92256 client_auth_filter.c:93] Client side authentication failure: Credentials failed to get metadata.

But with the change the new debugging messages are show what object raised the NoMethodError. Here are some of the messages I've gotten:
E0311 11:33:36.352378000<PHONE_NUMBER>92256 credentials.c:1155] Getting metadata from plugin failed with error: undefined method `call' for ["Content-Type", "application/x-protobuf"]:Array
E0311 11:33:36.352391000<PHONE_NUMBER>92256 client_auth_filter.c:93] Client side authentication failure: Credentials failed to get metadata.

E0313 15:18:01.248642000<PHONE_NUMBER>92256 credentials.c:1162] Getting metadata from plugin failed with error: undefined method `call' for "int32":String
E0313 15:18:01.248665000<PHONE_NUMBER>92256 client_auth_filter.c:93] Client side authentication failure: Credentials failed to get metadata.

E0313 17:48:06.941755000<PHONE_NUMBER>92256 credentials.c:1162] Getting metadata from plugin failed with error: undefined method `call' for #<HTTP::CookieJar:0x007feb84330e88>
E0313 17:48:06.941769000<PHONE_NUMBER>92256 client_auth_filter.c:93] Client side authentication failure: Credentials failed to get metadata.

E0313 17:59:42.872134000<PHONE_NUMBER>92256 credentials.c:1162] Getting metadata from plugin failed with error: undefined method `call' for "selfLink":String
E0313 17:59:42.872146000<PHONE_NUMBER>92256 client_auth_filter.c:93] Client side authentication failure: Credentials failed to get metadata.

This establishes that the object is changed, but it doesn't prove that the GC is the cause of the change. To prove that I've run our tests a couple dozen times, the first dozen unchanged, and the second dozen with the following code added:
GC.disable

The first dozen consumes ~225 MB of memory while the tests are run, and spikes up to ~300 MB during the cleanup process post-tests, and the second dozen consumes ~425 MB of memory while the tests are run, and spikes up to ~600 MB during the cleanup process post-tests. Every single run of the first dozen failed with several "Getting metadata from plugin failed with error" messages printed and GRPC::BadStatus errors (with a code of 16) raised. Some even raised a segfault during the post-test cleanup. And every single run of the second dozen with GC.disable passed without any messages printed or any errors raised or segfaults.

Also, I ran my tests against the master branch, because the 0.13.0 release was causing too many other problems. The goaway errors I mentioned in the issue description still happens, but it properly raises a GRPC::BadStatus error with code 14 now. So on master the goaway error no longer blocks indefinitely, which is super great. :+1:
I have also not seen a getaddrinfo error since switching to the master branch. Double :+1:

I opened https://github.com/grpc/grpc/pull/5744, can you verify that this
fixes the problem?
On Sun, Mar 13, 2016 at 5:35 PM Mike Moore<EMAIL_ADDRESS>wrote:

Also, I ran my tests against the master branch, because the 0.13.0 release
was causing too many other problems. The goaway errors I mentioned in the
issue description still happens, but it properly raises a GRPC::BadStatus
error with code 14 now. So on master the goaway error no longer blocks
indefinitely, which is super great. [image: :+1:]
I have also not seen a getaddrinfo error since switching to the master
branch. Double [image: :+1:]
—
Reply to this email directly or view it on GitHub
https://github.com/grpc/grpc/issues/5721#issuecomment-196089146.

@murgatroid99 Thank you for the PR! Moving the discussion there.


Adopt Scala Code of Conduct

I believe that these projects should offer a friendly and safe space for working together. I am in the process of adding this to most of my libraries.
If you have comments to this regard, I would like to hear them and this issue will be a good place to field such discussions.

@ChristopherDavenport go for it.


4.14.6-bone-rt-r10  missing wlan for Blue  + pin control issues

Try to make a new Image for the Blue for  ArduPilot Flight controler using latest Debian and rt-4.14
Seems that am335x-boneblue-wl1835.dtsi is missing on 4.14.6-bone- rt-r10 branch so I had this error on startup:
[  406.627162] wlcore: ERROR ELP wakeup timeout!
[  706.627220] wlcore: ERROR ELP wakeup timeout!
So I dtb-rebuild adding the wireless file and adding the adc patch to the blue dts : https://github.com/RobertCNelson/dtb-rebuilder/pull/23/commits/7b4ffd7df1b88d4403aa3a1d929696edf84ddfa7
With this , I have Wireless and ADC :-)
Here is the info:
git:/opt/scripts/:[968ea66122478e4eedc5b9c785a1671f51572cc3]
eeprom:[A335BNLTBLA21712EL004215]
model:[TI_AM335x_BeagleBone_Blue]
dogtag:[BeagleBoard.org Debian Image 2017-10-10]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2017.09-00002-g0f3f1c7907]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.11-00002-g7b415acfc1]
kernel:[4.14.6-bone-rt-r10]
nodejs:[v6.12.2]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20171215.0-0rcnee1~stretch+20171215]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee1~stretch+20170829]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
dmesg | grep pinctrl-single
[    0.854748] pinctrl-single 44e10800.pinmux: please update dts to use #pinctrl-cells = <1>
[    0.855070] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
END
=====pin control =====
Pins = Seems there is some mapping issue. According to message above I need to update dts.
Looking at the Blue DTS, I should see this on p8_15:
https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-boneblue.dts#L238
pinctrl-names = "pruin_pu", "gpio", "gpio_pu", "gpio_pd", "pruin", "qep", "pruecapin_pu";
I am missing the pruecap
config-pin -l p8.15
default gpio gpio_pu gpio_pd qep pruin
and obviously
config-pin P8_15 pru_ecap
Invalid mode: pru_ecap
====UPDATE== This works==
echo pruecapin_pu > /sys/devices/platform/ocp/ocp:P8_15_pinmux/state

@patrickpoirier51 looks like screwed up the irq used by the wl1835 when i submitted to mainline:
https://github.com/RobertCNelson/linux-dev/commit/1b4bec0097a39bd98abff83c683d8bd46679da71
Regards,


Collisions spawn death

The more players mod is messed up with collision even with 4 players,
and even with 3 players, one guy would still die in the spawn area

58fba88d343db0959c99ce50c812c639460d9465 Improves the issues for matches with smaller players numbers
With more players and larger player size depending on the level death still occur.
Maybe a solution would be to disable collisions in the start zone.


Adding CMake Support

Add all the necessary files to configure Thermochimica with CMake.  This work is immediately useful to support coupling with VERA, but could have other uses as well.

Note: this branches off the mstdb branch


Creating tag without description from web portal

The Description field in the create tag dialogue seems to be mandatory. What is the reasoning behind this, and is there any way to create a tag from the web portal without a description?

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

ID: 8eb20e31-fc65-913d-f4a6-61318f079224
Version Independent ID: 0c4960b1-d639-7452-a2e7-08c59934c3b3
Content: Working with Git tags
Content Source: docs/git/how-to/git-tags.md
Product: devops
GitHub Login: @steved0x
Microsoft Alias: sdanie

@Anders-Frey I spoke with Sandeep (for some reason he was unable to reply directly here), he said:
Lightweight tags are considered temporary tags that developers prefer to create in their IDEs. Mostly the intent is to push annotated tags to remote branch therefore we provide 1st class experience to add annotated tags in VSTS IDE. Users can continue to create lightweight tags using cmd line or IDE and push it remotely.
I'm going to update this article to make this more clear, and I'm closing this issue.
If creating lightweight tags in the web portal is something you think VSTS should support, you can file a request here: https://developercommunity.visualstudio.com/spaces/21/index.html and continue the discussion over there.
Thank you for your feedback.
Steve

Hi Steve and thanks for your answers. I appreciate the decision to only use annotated tags in the web portal and that is not a problem for my companys specific scenario. Our problem is that the description field is mandatory.
We've just upgraded from TFS 2017 to TFS 2018 and in the former version, the description field was not mandatory. If you created a tag without a description it was created as an annotated tag which worked fine for our need.
Now we have to fill the description field with non-information which is an (admittedly minor) inconvenience.
Br Anders from mobile


feat(languages): adding basic library validation support

:tada: This PR is included in version 1.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Issue in Render Note

Upon importing the zip (safe import off), I get this error message when I switch to the Render Note Trilium JSON Editor:
Error
×
You're passing an async function to api.runOnBackend() which will likely not work as you intended. Either make the function synchronous (by removing 'async' keyword), or use api.runAsyncOnBackendWithManualTransactionHandling()

I checked all notes properties (type, owned attributes) as-per the readme.

Here's a screengrab showing my issue and setup:
https://github.com/sottey/tje/assets/59992365/3aa8defd-866c-471c-b9a7-9d15fc9b03b4
https://github.com/sottey/tje/assets/59992365/5f79e2f3-288a-40f6-be77-ed3da05c2d27

same issue here...any help?

Hi all. Apologies for not responding more quickly. I am unable to reproduce this issue, but will have time this weekend to look into it. Thanks for reaching out!

you can see someone's fix at https://github.com/sottey/tje/issues/5


The to_property_graph docstring in the Neptune module is not well written and does not describe the behavior of the function when the node already exists

Is your idea related to a problem? Please describe.
Currently the docstring for to_property_graph reads:

Write records stored in a DataFrame into Amazon Neptune.
If writing to a property graph then DataFrames for vertices and edges must be written separately. DataFrames for >vertices must have a ~label column with the label and a ~id column for the vertex id. If the ~id column does not exist, >the specified id does not exists, or is empty then a new vertex will be added. If no ~label column exists an exception >will be thrown. DataFrames for edges must have a ~id, ~label, ~to, and ~from column. If the ~id column does not >exist the specified id does not exists, or is empty then a new edge will be added. If no ~label, ~to, or ~from column >exists an exception will be thrown.

If you would like to save data using single cardinality then you can postfix (single) to the column header and set >use_header_cardinality=True (default). e.g. A column named name(single) will save the name property as single >cardinality. You can disable this by setting by setting use_header_cardinality=False.

This does not indicate anything as to the nature of the function if a node or edge with the same ~id already exists within the database. Secondly this is not read easily, there are a couple of grammatical mistakes.
Describe the solution you'd like
Better written explanation as to the nature of the function when the node does not exist, exists, and nuances as to the errors thrown under those various scenarios.

Thanks, fixed in https://github.com/aws/aws-sdk-pandas/commit/7de0336e336b492bab1727770360759b4cbe0980


App shows "Änderung Ihres Risikostatus" even though a positive test is registered and the risk status is not visible to the user

Avoid duplicates

[X] Bug is not mentioned in the FAQ
[X] Bug affects both Android and iOS, for specific issues / questions that apply only to one operating system, please raise them in the respective repositories:

Android repository
iOS repository

[X] Bug is not already reported in another issue

Technical details

Device name: Not relevant
iOS/Android version: Not relevant
App version:

Describe the bug
The app shows the "Änderung Ihres Risikostatus" pop-up, which is shown when the last increased risk encounter was more than 14 days ago, even if a positive test is registered.
This makes no sense, as the user is not able to see their risk status.

Steps to reproduce the issue

Get an encounter with increased risk
Register a positive test in the app
Wait until 14 days since the encounter have passed
See the message

Expected behaviour
The "Änderung Ihres Risikostatus" pop-up should not be shown if a positive test is registered in the app.
Related issue

https://github.com/corona-warn-app/cwa-wishlist/issues/777

Additional context
This report is based on the feedback I received from a user on Twitter: https://twitter.com/bext0n/status/1493611763484483589?s=20&t=1ISQbqjOZikD6pn5BrY80Q

Internal Tracking ID: EXPOSUREAPP-11969

Thanks for your report @Ein-Tim. We have created an internal ticket for it and will raise this topic internally.
Internal Tracking ID: EXPOSUREAPP-11969

Corona-Warn-App Open Source Team

iOS PR fixing this: https://github.com/corona-warn-app/cwa-app-ios/pull/4336

Android PR: https://github.com/corona-warn-app/cwa-app-android/pull/4938

This has already been fixed in version 2.20.


Make File More Static For SRI Checks

Right now everytime a new translation is added the SRI hash changes. Most people will not and should not be loading a CDN resource without an SRI hash. If this is to be used by anyone, it should adhere to stricter security policies that many sites will have.
I was thinking of using something along the lines of https://libretranslate.com/, where the only hardcoded translation is English, and any other language will automatically get translated by the API. No need to keep adding new language translations, and thus maintain the same SRI hash.

While this sounds like a good idea, machine translation can be buggy. How accurate is LibreTranslate?

I don't know I've never used it. It's opensource and available at https://github.com/LibreTranslate/LibreTranslate

I don't think machine translation is a good idea. Maybe what we need is to split every translation into a single javascript file, and allow website owners to select language(s) they need. (or use ajax to automatically load the languages)
And about the SRI, we can use GitHub actions to automatically tag commits, and only use specific versions instead of main branch.
Does this look good to you?

I don't think machine translation is a good idea. Maybe what we need is to split every translation into a single javascript file, and allow website owners to select language(s) they need. (or use ajax to automatically load the languages) And about the SRI, we can use GitHub actions to automatically tag commits, and only use specific versions instead of main branch. Does this look good to you?

I agree with these ideas

Can you check this commit in sri branch?

We use SRI to make sure a 3rd party resource being loaded has not been tampered with. However, in this case we are also loading a JSON file whose untrusted contents we are then adding to the DOM, which kinda defeats the point of using the SRI. The contents of the JSON should be added in a safe manner, preferably we should not be using HTML in JSON. I see some translations use HTML and some don't.
If we use only text values, then it's contents in this case the external value ${text} can be added by using createTextNode instead of the unsafe innerHTML. Note, only the external value should avoid being used in innerHTML. The rest of the hardcoded HTML in the SRI checked file would be fine.
More info: https://cheatsheetseries.owasp.org/cheatsheets/DOM_based_XSS_Prevention_Cheat_Sheet.html

I have no idea how we can load the untrusted translation (json, LibreTranslate) including anchors without using innerHTML.
Can iframe solve this issue? AFAIK iframe can't leak sensitive information like cookies of the outer document.

iframes would make it more complicated from a security perspective due to needing to modify Content Security Policy sandboxing by the end-user.

If I insert a full screen  HTML tag into the document, and write translation into the iframe, this doesn't require end-user to enable sandbox manually.

For adding the links, we could implement something like <link https://example.com>a</link> and then use regular expressions to convert links to HTML, and then use something like DOMPurify to make sure that only  tags with only a href attribute will show up.

Proposed code:
(async () => {
  "use strict";

  // Add DOMPurify so that we can sanitize the translation file
  var script = document.createElement("script");
  script.src =
<EMAIL_ADDRESS>
  document.head.appendChild(script);

  // Get user language

  let lang =
    navigator.language ||
    navigator.userLanguage ||
    navigator.browserLanguage ||
    navigator.systemLanguage;

  // convert to lower if not undefined
  if (lang?.toLowerCase) {
    lang = lang.toLowerCase();
  } else {
    lang = "";
  }

  // fetch translation using ajax
  const translations_request = await fetch(
<EMAIL_ADDRESS>  );

  var translations = await translations_request.json();

  Object.keys(translations).forEach((key) => {
    translations[key] = DOMPurify.sanitize(translations[key], {
      ALLOWED_TAGS: ["a"],
      ALLOWED_ATTR: ["href"],
    });
  });

  // detect Web Environment Integrity API
  if (navigator.getEnvironmentIntegrity !== undefined) {
    // fuck it
    const text = (translations[lang] ??
      translations[lang.split("-")[0]] ??
      translations["en-us"])["message"];

    // Just in case the website has overwritten some of these styles, we're going to set everything as !important and overwrite things like `display` and `position` that could end up screwing up the text.
    // We're also setting the z-index value in case something gets added to the body after this script runs.

    document.body.innerHTML = `

          <div style="
              overflow: auto !important;
              background: #f54b39 !important;
              color: white !important;
              font-weight: bold !important;
              width: 100% !important;
              height: 100% !important;
              text-align: center !important;
              position: fixed !important;
              top: 0 !important;
              left: 0 !important;
              font-size: 3em !important;
              font-family: sans-serif !important;
              display: unset !important;
              z-index:<PHONE_NUMBER>69696969 !important;
          ">

                  ${text}

      `;
  }
})();

Yall are over complicating this. The proposed code just added another untrusted resource, which is what we are trying to solve to begin with.
Do this:

Remove all HTML from the JSON file, it should only contain the raw text translations.
Inside openweb.js built the HTML you want to display the alert box with, within the HTML put

 or however many translation text containers you need.
Then grab the JSON value(s) for the current language and then insert it within those containers using createTextNode() so if there were to be any malicious HTML inside the JSON values they will be made safe.

This way you can still use innerHTML for building your layout, but when inserting untrusted data from an external file it will be converted and inserted as raw text.

Yall are over complicating this. The proposed code just added another untrusted resource, which is what we are trying to solve to begin with.

Well, I could add SRI to DOMPurify. I want to be able to keep the links in there.

Here, I just added DOMPurify inline:
(async () => {
  "use strict";

  /*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
  //prettier-ignore
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=N(Array.prototype.forEach),m=N(Array.prototype.pop),f=N(Array.prototype.push),p=N(String.prototype.toLowerCase),d=N(String.prototype.toString),h=N(String.prototype.match),g=N(String.prototype.replace),T=N(String.prototype.indexOf),y=N(String.prototype.trim),E=N(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;function N(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function b(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=o(e)}return function(e){return console.warn("fallback value for",e),null}}const w=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),v=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C=i(["#text"]),O=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),M=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=function(){return"undefined"==typeof window?null:window},K=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.5",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:_,Node:N,Element:P,NodeFilter:F,NamedNodeMap:H=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:B,trustedTypes:G}=n,Y=P.prototype,V=R(Y,"cloneNode"),$=R(Y,"nextSibling"),Z=R(Y,"childNodes"),J=R(Y,"parentNode");if("function"==typeof _){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=r,{importNode:ie}=a;let ae={};o.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:ue,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:pe}=q;let{IS_ALLOWED_URI:de}=q,he=null;const ge=b({},[...w,...D,...L,...x,...C]);let Te=null;const ye=b({},[...O,...I,...M,...U]);let Ee=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ae=null,_e=null,Ne=!0,be=!0,Se=!1,Re=!0,we=!1,De=!1,Le=!1,ve=!1,xe=!1,ke=!1,Ce=!1,Oe=!0,Ie=!1;const Me="user-content-";let Ue=!0,Pe=!1,Fe={},He=null;const ze=b({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Be=null;const We=b({},["audio","video","img","source","image","track"]);let Ge=null;const Ye=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),je="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Xe="http://www.w3.org/1999/xhtml";let Ke=Xe,Ve=!1,$e=null;const Ze=b({},[je,qe,Xe],d);let Je=null;const Qe=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const ot=r.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Je=Je=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Je?d:p,he="ALLOWED_TAGS"in e?b({},e.ALLOWED_TAGS,tt):ge,Te="ALLOWED_ATTR"in e?b({},e.ALLOWED_ATTR,tt):ye,$e="ALLOWED_NAMESPACES"in e?b({},e.ALLOWED_NAMESPACES,d):Ze,Ge="ADD_URI_SAFE_ATTR"in e?b(S(Ye),e.ADD_URI_SAFE_ATTR,tt):Ye,Be="ADD_DATA_URI_TAGS"in e?b(S(We),e.ADD_DATA_URI_TAGS,tt):We,He="FORBID_CONTENTS"in e?b({},e.FORBID_CONTENTS,tt):ze,Ae="FORBID_TAGS"in e?b({},e.FORBID_TAGS,tt):{},_e="FORBID_ATTR"in e?b({},e.FORBID_ATTR,tt):{},Fe="USE_PROFILES"in e&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,we=e.SAFE_FOR_TEMPLATES||!1,De=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,ke=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ie=e.SANITIZE_NAMED_PROPS||!1,Ue=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||W,Ke=e.NAMESPACE||Xe,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(be=!1),ke&&(xe=!0),Fe&&(he=b({},[...C]),Te=[],!0===Fe.html&&(b(he,w),b(Te,O)),!0===Fe.svg&&(b(he,D),b(Te,I),b(Te,U)),!0===Fe.svgFilters&&(b(he,L),b(Te,I),b(Te,U)),!0===Fe.mathMl&&(b(he,x),b(Te,M),b(Te,U))),e.ADD_TAGS&&(he===ge&&(he=S(he)),b(he,e.ADD_TAGS,tt)),e.ADD_ATTR&&(Te===ye&&(Te=S(Te)),b(Te,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&b(Ge,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(He===ze&&(He=S(He)),b(He,e.FORBID_CONTENTS,tt)),Ue&&(he["#text"]=!0),De&&b(he,["html","head","body"]),he.table&&(b(he,["tbody"]),delete Ae.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=K(G,c)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));i&&i(e),nt=e}},at=b({},["mi","mo","mn","ms","mtext"]),lt=b({},["foreignobject","desc","title","annotation-xml"]),ct=b({},["title","style","font","a","script"]),st=b({},D);b(st,L),b(st,v);const ut=b({},x);b(ut,k);const mt=function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!$e[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Xe?"svg"===n:t.namespaceURI===je?"svg"===n&&("annotation-xml"===o||at[o]):Boolean(st[n]):e.namespaceURI===je?t.namespaceURI===Xe?"math"===n:t.namespaceURI===qe?"math"===n&&lt[o]:Boolean(ut[n]):e.namespaceURI===Xe?!(t.namespaceURI===qe&&!lt[o])&&(!(t.namespaceURI===je&&!at[o])&&(!ut[n]&&(ct[n]||!st[n]))):!("application/xhtml+xml"!==Je||!$e[e.namespaceURI]))},ft=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Te[e])if(xe||ke)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(ve)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Je&&Ke===Xe&&(e=''+e+"");const o=Q?Q.createHTML(e):e;if(Ke===Xe)try{t=(new B).parseFromString(o,Je)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Ve?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ke===Xe?re.call(t,De?"html":"body")[0]:De?t.documentElement:i},ht=function(e){return ne.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null,!1)},gt=function(e){return e instanceof z&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof H)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Tt=function(e){return"function"==typeof N&&e instanceof N},yt=function(e,t,n){ae[e]&&u(ae[e],(e=>{e.call(o,t,n,nt)}))},Et=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return ft(e),!0;const n=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:n,allowedTags:he}),e.hasChildNodes()&&!Tt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ft(e),!0;if(!he[n]||Ae[n]){if(!Ae[n]&&_t(n)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))return!1}if(Ue&&!He[n]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(V(n[o],!0),$(e))}}return ft(e),!0}return e instanceof P&&!mt(e)?(ft(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(we&&3===e.nodeType&&(t=e.textContent,u([le,ce,se],(e=>{t=g(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(ft(e),!0)},At=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(be&&!_e[t]&&E(ue,t));else if(Ne&&E(me,t));else if(!Te[t]||_e[t]){if(!(_t(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(Ge[t]);else if(E(de,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Be[e]){if(Se&&!E(fe,g(n,pe,"")));else if(n)return!1}else;return!0},_t=function(e){return e.indexOf("-")>0},Nt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=tt(a);let f="value"===a?c:y(c);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,n),f=n.attrValue,n.forceKeepAttr)continue;if(pt(a,e),!n.keepAttr)continue;if(!Re&&E(/\/>/i,f)){pt(a,e);continue}we&&u([le,ce,se],(e=>{f=g(f,e," ")}));const p=tt(e.nodeName);if(At(p,s,f)){if(!Ie||"id"!==s&&"name"!==s||(pt(a,e),f=Me+f),Q&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(p,s)){case"TrustedHTML":f=Q.createHTML(f);break;case"TrustedScriptURL":f=Q.createScriptURL(f)}try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),m(o.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},bt=function e(t){let n=null;const o=ht(t);for(yt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)yt("uponSanitizeShadowNode",n,null),Et(n)||(n.content instanceof s&&e(n.content),Nt(n));yt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(Ve=!e,Ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Tt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Le||it(t),o.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=tt(e.nodeName);if(!he[t]||Ae[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof N)n=dt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!xe&&!we&&!De&&-1===e.indexOf("<"))return Q&&Ce?Q.createHTML(e):e;if(n=dt(e),!n)return xe?null:Ce?ee:""}n&&ve&&ft(n.firstChild);const c=ht(Pe?e:n);for(;i=c.nextNode();)Et(i)||(i.content instanceof s&&bt(i.content),Nt(i));if(Pe)return e;if(xe){if(ke)for(l=oe.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Te.shadowroot||Te.shadowrootmode)&&(l=ie.call(a,l,!0)),l}let m=De?n.outerHTML:n.innerHTML;return De&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(j,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),we&&u([le,ce,se],(e=>{m=g(m,e," ")})),Q&&Ce?Q.createHTML(m):m},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};it(e),Le=!0},o.clearConfig=function(){nt=null,Le=!1},o.isValidAttribute=function(e,t,n){nt||it({});const o=tt(e),r=tt(t);return At(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],f(ae[e],t))},o.removeHook=function(e){if(ae[e])return m(ae[e])},o.removeHooks=function(e){ae[e]&&(ae[e]=[])},o.removeAllHooks=function(){ae={}},o}();return V}));

  // Get user language

  let lang =
    navigator.language ||
    navigator.userLanguage ||
    navigator.browserLanguage ||
    navigator.systemLanguage;

  // convert to lower if not undefined
  if (lang?.toLowerCase) {
    lang = lang.toLowerCase();
  } else {
    lang = "";
  }

  // fetch translation using ajax
  const translations_request = await fetch(
<EMAIL_ADDRESS>  );

  var translations = await translations_request.json();

  // Sanitize
  Object.keys(translations).forEach((key) => {
    translations[key] = DOMPurify.sanitize(translations[key], {
      ALLOWED_TAGS: ["a"],
      ALLOWED_ATTR: ["href"],
    });
  });

  // detect Web Environment Integrity API
  if (navigator.getEnvironmentIntegrity !== undefined) {
    // fuck it
    const text = (translations[lang] ??
      translations[lang.split("-")[0]] ??
      translations["en-us"])["message"];

    // Just in case the website has overwritten some of these styles, we're going to set everything as !important and overwrite things like `display` and `position` that could end up screwing up the text.
    // We're also setting the z-index value in case something gets added to the body after this script runs.

    document.body.innerHTML = `

            <div style="
                overflow: auto !important;
                background: #f54b39 !important;
                color: white !important;
                font-weight: bold !important;
                width: 100% !important;
                height: 100% !important;
                text-align: center !important;
                position: fixed !important;
                top: 0 !important;
                left: 0 !important;
                font-size: 3em !important;
                font-family: sans-serif !important;
                display: unset !important;
                z-index:<PHONE_NUMBER>69696969 !important;
            ">

                    ${text}

        `;
  }
})();

Here, I just added DOMPurify inline

That just adds unnecessary bloat to a script, whose only purpose is to just display an alert. Not to mention that if DOMPurity needs to be updated due to say a security/bug issue, then the SRI for openweb.js will change. Then everyone who uses this script as part of the protest will need to update the code, which defeats the purpose of this discussion. The browser already has what is needed and that's createTextNode(). Let's keep things simple and use what all browsers natively have and reduce complexity and maintenance.

I want to be able to keep the links in there.

You create/build the links in openweb.js using the method I explained in previous comment, opposed to keeping them in the JSON.
I'm going to leave this up to you guys. Best of luck, peace out ✌.

Well DOMPurify isn't updated that often, and when compressed with Brotli (as JSDelivr does), DOMPurify is only about 7kb. We could do the thing with making the links with JS but it seems a bit difficult to select the parts of text to add the links to.

Well DOMPurify isn't updated that often, and when compressed with Brotli (as JSDelivr does), DOMPurify is only about 7kb. We could do the thing with making the links with JS but it seems a bit difficult to select the parts of text to add the links to.

I don't like including another third-party library…
If you insist doing this way, you may try some Chromium-only experimental API. It's full-feature and built-in.

That sounds like a good idea


Updates to WebServer, ChakraHost and StartupTask

Updates to Web Server - improved network reliability
StartupTask - commented out StartMostRecentScript and Save calls
ChakraHost - changed scripting processing strategy to avoid race conditons

Hi @gloveboxes, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@gloveboxes, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, MSBOT;

Hi Dave, sorry for the delay. I added some comments. can you review?

looks good. merging.


Downloaded example workflow for ComfyUI and it fails

First of all, great work TencentARC team! We love it!
I know that this is not the repo on ComfyUI node. https://github.com/chaojie/ComfyUI-MotionCtrl but since there I can't put in a Issue I have to ask here.
I download the example workflow and I get this error. Any ideas?
Motionctrl Sample Simple:

Failed to convert an input value to a INT value: context_overlap, https://chaojie.github.io/ComfyUI-MotionCtrl/tools/draw.html, invalid literal for int() with base 10: 'https://chaojie.github.io/ComfyUI-MotionCtrl/tools/draw.html'

where it says null on one of the fields, put a 1 in there. context length.

where it says null on one of the fields, put a 1 in there. context length.

I have the same problem. Help me

There was a NaN in context overlap. I swapped it to 4 and it worked. Thanks!


Bump log4j-core and log4j-api  from 2.17.0 to 2.17.1 in /core and /co…

What problem does this PR solve?
merge log4j upgrate prs which are proposed by robot

/run-all-tests


Fix C string char type to use portable type c_char.

Hello,
Building the Vulkan runner failed on my ARM 64 Ubuntu virtual machine with the following error:
error[E0277]: a value of type `Vec<*const i8>` cannot be built from an iterator over elements of type `*const u8`
    --> examples/runners/ash/src/main.rs:319:18
     |
319  |                 .collect();
     |                  ^^^^^^^ value of type `Vec<*const i8>` cannot be built from `std::iter::Iterator<Item=*const u8>`
     |
     = help: the trait `FromIterator<*const u8>` is not implemented for `Vec<*const i8>`
             but trait `FromIterator<*const i8>` is implemented for it
     = help: for that trait implementation, expected `i8`, found `u8`
note: the method call chain might not have had the expected associated types
    --> examples/runners/ash/src/main.rs:318:18
     |
311  |               let layer_names = if options.debug_layer {
     |  _______________________________-
312  | |                 vec![CString::new("VK_LAYER_KHRONOS_validation").unwrap()]
313  | |             } else {
314  | |                 vec![]
315  | |             };
     | |_____________- this expression has type `Vec<CString>`
316  |               let layers_names_raw: Vec<*const i8> = layer_names
317  |                   .iter()
     |                    ------ `Iterator::Item` is `&CString` here
318  |                   .map(|raw_name| raw_name.as_ptr())
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Iterator::Item` changed to `*const u8` here
note: required by a bound in `collect`
    --> /home/bvideau/.rustup/toolchains/nightly-2024-11-22-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1967:19
     |
1967 |     fn collect<B: FromIterator<Self::Item>>(self) -> B
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`

The c char type is unsigned on this platform.
This patch addresses the issue.

Thanks, will do ASAP.

Ok, I pushed an update with my changes through cargo fmt.  The issue is it touches other part of the file(s), so I did not stage those other changes. The CI will most probably still fail.


Initial work to use core to parse fragment json

Sibling PR to https://github.com/liveview-native/liveview-native-core-jetpack/pull/10.
Subtask of https://github.com/liveview-native/liveview-native-core/issues/40
Depends on https://github.com/liveview-native/liveview-native-core/pull/45

Supersceeded by #10


Adding support for configuring ...

... ssh connection details using connection tags.

looks good.
some of the tests need tidying.
the test failure reported is
testWorkflowLogging(org.apache.brooklyn.core.workflow.WorkflowBasicTest)  Time elapsed: 0.064 sec  <<< FAILURE!
java.lang.AssertionError: null: lists don't have the same size expected [8] but found [11]
	at org.apache.brooklyn.core.workflow.WorkflowBasicTest.testWorkflowLogging(WorkflowBasicTest.java:381)

which is almost certainly unrelated.  i think i've seen it before.  not sure why it happens occasionally (nice to fix that but not relevant here.)
merge after minor test fixes


Batch size and RoiAlign

Dear contributor,
Many thanks for your attention.
I got a question that if we train the module on multi-batch size (such as 2), the input of the module will be transformed to [2,3,1024,806] for picture size (1024,800) and (800,806). There is a different from 800806 to 1024806 but the bounding box will not fit this transform.
Could you give me some advice that where you deal with this problem?
Thanks very much

Hi,
If I understood your problem properly, this part is done  in https://github.com/facebookresearch/maskrcnn-benchmark/blob/9a1ba140c8d8294f23b0a28a87bffd09d7b1adbe/maskrcnn_benchmark/structures/image_list.py#L29
This takes the max height and width from each image to form the batch tensor. Height is max(1024, 800) and Width is (800,806). Then the image is copied and pasted to the top-left of the batch tensor.
So for the image(800, 806), pixels outside this region will be zero, so you don't need to change anything on the annotation.

wow
such a BRILLIANT idea! Thank you very much!