Allow to customize the stripe factory

In order to use my own Stripe instance with this library, I want to be able to inject it into the provider. To make it flexible, I propose to expose the stripeFactory property.

In order to use my own Stripe instance

Hey @n-sviridenko, thanks for the PR! Just checking on one thing—by "my own Stripe instance" do you mean that you've downloaded the Stripe.js script locally? This is explicitly unsupported:
https://stripe.com/docs/stripe.js#including-stripejs
If that's not the case, I'll take another look at what this diff adds.

@jez-stripe Hi Jake. No, I mean my instance. My already initialized Stripe(..) singleton that I am using outside of React context and would like to reuse inside React.

Ah, ok. We've been hesitant to make changes similar to this in the past. Have you read through this comment? → https://github.com/stripe/react-stripe-elements/issues/24#issuecomment-314839641
After reading it (or if you already have), I'd love to hear more about your specific use case that justifies using react-stripe-elements like you describe. It's quite possible that yours is a new use case that we've not considered before!

@jez-stripe it's also about the lazy loading, because I do not need Stripe everywhere. So the <StripeProvider /> could be constructed/destructed many times when I visit and leave the payment page. But the main use case is different. My application uses redux + redux-saga to manage the state and perform actions. So I use Stripe outside of the view via a singleton already defined somewhere in the application. But at the same time, I need to have access to it inside the view to be able to pass it inside <*Element /> components.

@jez-stripe is there any news?

I just want to throw another voice in favor of supporting this change, for exactly the reasons @n-sviridenko listed.

So I use Stripe outside of the view via a singleton already defined somewhere in the application.

Hi! Just curious -- what do you use Stripe for outside of the checkout form?

@michelle, to explain it, I need to go into details.
My application is build on react + redux. I try to move all business logic outside of the view layer. So I need Stripe in the react layer to render elements and after I need it in the redux layer to create a token. Also, I do not need to load Stripe every time. I understand that it is a recommendation, but in order to load less of resources, I do it only when user visits the payment page. So the Stripe Provider can be mounted and unmounted many times, but in case if user already was in the payment page, I would like to keep the same Stripe instance. For this I also need a singleton.
The singleton works the following way:
// utils/stripe.js
import * as config from 'config';

let stripe;

function createInstance() {
  if (!global.Stripe) {
    throw new Error('Stripe.js is not loaded.');
  }

  return global.Stripe(config.stripe.apiKey);
}

function getInstance() {
  if (!stripe) {
    stripe = createInstance();
  }

  return stripe;
}

export default {
  getInstance,
};

In my case the singleton function be:
import stripeUtils from 'utils/stripe';

const customStripeFactory = (props: StripeFactoryProps): StripeShape => {
  return stripeUtils.getInstance();
};

Got it, that makes sense. Thank you for taking the time to explain your use case!
I think this release solves that problem: https://github.com/stripe/react-stripe-elements/releases/tag/v1.1.1
The StripeProvider nows gives you the same instance of stripe across mounts, as long as you're using the same configuration. Does that work for you?

@michelle it resolves my problem, but partially. For example, one day I will need to create a token for a bank account. The workflow with the solution you propose will be the following:

I mount stripe elements
I share the Stripe instance with a store via an action (this.props.onSometing(this.context.stripe, ...))
I execute the stripe.createToken('bank_account', bankAccountData) method (https://stripe.com/docs/stripe.js#collecting-bank-account-details) inside a saga

The thing is in this case I do not need any Element because the data is not sensitive. At the same time, if I will use a custom Stripe factory, I will not need to mount the Provider at all: anything will be already available in my saga.

@n-sviridenko I see! Sorry for all of the back and forth here, and thank you for your patience.
I think there are quite a few potential APIs that would help with the use case you're describing (being able to store stripe in redux and performing all async actions in saga). What are the benefits of the factory approach over having the StripeProvider accept a stripe instance directly?

@michelle having the StripeProvider accept a stripe instance directly is also fine. The goal is do not instantiate such services in the view layer and transfer it after to the application logic layer. Otherwise, for me it is like instantiating a redux store instance inside a Provider instead of passing it as a property. Because you are not always dependent on the view layer (sometimes, there is no need to send an elements instance).

Otherwise, for me it is like instantiating a redux store instance inside a Provider instead of passing it as a property. Because you are not always dependent on the view layer (sometimes, there is no need to send an elements instance).

To be clear, you're saying that the <StripeProvider stripe={stripeInstanceFromRedux} /> solution works for you, right?
If that's the case, great! There's a little thing we need to be careful of, though. Because stripe is injected to child components via React context[0] (very much like how react-redux/connect work), we'll need to make sure the stripeInstance never changes (and make sure to show a nice user warning when it does). Otherwise, child components are not guaranteed to receive updates.
Happy to take a PR implementing that API :) -- otherwise, we'll try to get around to it soon, but no promises on the timeline.
[0] https://medium.com/@mweststrate/how-to-safely-use-react-context-b7e343eff076


Search-Index and Sitemap not generated after Theme update

Hey Folks,
just updating the theme on our project "BITS Training" form version 5.3 to 5.23. Fixed all error, warning and deprecation messages during hugo build but can't get search to work. It was working perfect with the old "JSON" Based search before.
I checked the index.search.js and it is quite empty. It seams only the more section content is indexed. These are the sites that where moved due to the changes in Theme version 5.9
The same thing is happening with the sitemap.xml. It was working with Theme 5.3 and now only the more section content is listed in the sitemap.xml 🤷♂
Maybe someone can check out the repo and give me a hint what's going wrong with our content?
Many thanks 😊

I'll take a look into it... stay tuned

This seems to be race condition. If I run hugo server initially the index is broken. If I change the index template and cause a regeneration, the index is fine.
Interestingly, my own page never behaved this way...
...still thinking how to avoid this...

Ok, got it. Although I still don't know why this race condition happens.
The main reason is, that pages with empty title are treated as hidden. This was always the case but over the theme's version history an additional check got added where it was missing.
In your case your content/_index.de.md does have an empty title and therefore the page itself and all descendends are treated as hidden.
To solve it, exchange your title to this:
title: " "

Wow! Thank you so much for this quick find. The empty Title in the top most _index.de.md was changed during the update because of the new archtype=home Template that is used. We have a H1 with a parameter in the content and this was the easiest way to get the same look. Think this was a bit too quick and dirty 😉 Will try to find a better solution with a real title, but your idea with a space is a nice workaround and kept in mind.
But it's interesting why this accidental hiding of the pages doesn't affect the menu generation?

But it's interesting why this accidental hiding of the pages doesn't affect the menu generation?

He he, Full roundtrip here: https://github.com/McShelby/hugo-theme-relearn/issues/134#issuecomment-959834008
If you visit a hidden page, it is always revealed in your menu. Because the hidden option is not inherited by its descendends, they will all be shown as well.

🙄 lol 🤣

I soon have a more elegant solution: #744


Toggling Edit Button Spams Messages

When toggling the Edit button on a character sheet it causes the module to spam chat with messages once it's switched back or the sheet is closed and the changes saved. This only seems to apply to Ability Scores and Skills, and disabling those options will stop the messages. It does this even when no changes were made to Ability Scores or Skills, I assume it simply just reads it as being edited even if no new information was put in.

maybe due to how changes are passed in the preUpdateActor...
can be modified :
look for section in dnd5e-character-monitor.js and add the last line in the code below (for proficiencies) :
            // Proficiency changes
            if (game.settings.get(moduleName, "monitorProficiency") && ("skills" in (data.system || {}))) {

                for (const [skl, changes] of Object.entries(data.system.skills)) {

                    if (!("value" in changes)) continue;
                    if (typeof changes.value !== "number") continue;
                    if ( changes.value == actor.system.skills[skl].value) continue;

and for abilities :
            // Ability changes
            if (game.settings.get(moduleName, "monitorAbility") && ("abilities" in (data.system || {}))) {
                for (const [abl, changes] of Object.entries(data.system.abilities)) {
                    if (!("value" in changes)) continue;
                    if (typeof changes.value !== "number") continue;
                    if ( changes.value == actor.system.abilities[abl].value) continue;


Support devise 4.2 without deprecation warnings

This PR resolves #194 by updating some deprecated code - the bypass option on sign_in, and including Devise::Test in tests.
The tests seem to pass. I get one warning,
DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`

...but the Rails 5 PR already written will resolve this.

When will it be released on rubygem with a new tag?


cast run on zksync era txns returns Transaction(GasMaxFeeGreaterThanPriorityFee)

Component
Cast
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (59f026f 2023-05-24T00:08:52.543117000Z)
What command(s) is the bug in?
cast run
Operating System
macOS (Apple Silicon)
Describe the bug
cast run returns
Context:
- backend: failed while inspecting: Transaction(GasMaxFeeGreaterThanPriorityFee)

on zksync era transactions
i.e.
cast run 0x53e9e6f05372b808a31fb3607c95e712e4b465af8e11fa7b2012fcf2e1188e76 --rpc-url $ZKSYNC
ZKSync doesn't support EIP1559 transactions

https://github.com/matter-labs/foundry-zksync
Looks like they've fixed compatibility with a fork - closing for now


Fix code scanning alert - Exposure of private information

Tracking issue for:

[x] https://github.com/gilbertalgordo/semantic-kernel/security/code-scanning/12

send


Fixed typo

Fixed some tiny typos in Readme.

This isn't a typo: https://golang.org/pkg/net/http/pprof
On Tue, Sep 6, 2016, 3:45 AM Xing<EMAIL_ADDRESS>wrote:

Fixed some tiny typos in Readme.
You can view, comment on, or merge this pull request online at:
https://github.com/uber/go-torch/pull/47
Commit Summary

Fixed typo

File Changes

M README.md https://github.com/uber/go-torch/pull/47/files#diff-0
(6)

Patch Links:

https://github.com/uber/go-torch/pull/47.patch
https://github.com/uber/go-torch/pull/47.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/uber/go-torch/pull/47, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEmaFHRqvMe7IENU91iqv96oNmEpPwsdks5qnRojgaJpZM4J1jR2
.

Coverage remained the same at 94.505% when pulling a3e2fb3ecce39899a4f9d75ef35e43bf3b0b0d24 on mikespook:master into 3433eb0230c9cfec28057be939c40539dc4cb6ef on uber:master.

Misread at first, I do think this is a typo

Thanks for the contribution @mikespook
Can you please sign the Uber CLA? Thanks!

No problem. I've already done with Uber CLA. Cheers

Great, thanks!


feat: update learn intro

just changed it to Lato for readability and made it wider on smaller screens.

As Oliver said. new users who sign in will completely miss this info. Should we have it in an expandable div on /learn for singed in users and have it around until the user completes a certain number of challenges?

@ojeytonwilliams @ahmadabdolsaheb
For the queries, please ping @QuincyLarson who seems to be less active on GitHub and misses the clarifications needed.
Merge when you are happy.

@raisedadead I just met with @ahmadabdolsaheb on this, and he is going to make the text a bit larger like it is on Ghost.
We are also going to make this an additional step for campers during the new account creation flow. It will go like this:

Sign in (Auth0)
Check boxes for TOS, Privacy Policy, and weekly email blasts.
"Welcome to freeCodeCamp's curriculum" view
Normal /learn authenticated page

Sure, I will leave the PR as is for Ahmad to push updates to this. Thanks for confirming.

The last commit closes #37701;

We are also going to make this an additional step for campers during the new account creation flow. It will go like this:

Sign in (Auth0)
Check boxes for TOS, Privacy Policy, and weekly email blasts.
"Welcome to freeCodeCamp's curriculum" view
Normal /learn authenticated page

These requirements were not satified?

These are to be addressed in another pr.

So do we block deployment? How long before the PR the next PR is ready?

No we don't need to block deployment. We would include the next features when they are ready. I will create issues with description.

Understood. Could you drop that these features are deffered in the team chat. This PR could have landed yesterday, but I was under the impression that these features are being worked upon.


Import & export

[ ] Import & export to office 2007 (OOXML format)

Univer exchange.

https://github.com/dream-num/univer-exchange
not found 404


Store the uploaded images to MongoDB

is it possible to create a form that uses upload_bootstrap and once the user click submit, the images will be stored in mongoDB?

You can do it in server side in "finished" callback.


unbound-control reload Doesn't reload settigns related to use-syslog and logfile

Describe the bug
Changing logfile or use-syslog on unbound's config, and then calling unbound-control reload doesn't work; the new setting gets applied only after either a restart or a call to unbound-control log_reopen.
The same also happens if those setting gets changed via unbound-control set_option.
To reproduce
Steps to reproduce the behavior:
sudo unbound-control set_option logfile: /tmp/unbound_log_test

Expected behavior
Logs get written to /tmp/unbound_log_test.  Actual behavior: log location doesn't change.
Workaround
Calling unbound-control log_reopen or restarting unbound.
System:

Unbound version: 1.7.3
OS: Linux (custom version)
unbound -V output:

unbound: invalid option -- 'V'
usage:  unbound [options]
	start unbound daemon DNS resolver.
-h	this help
-c file	config file to read instead of /etc/unbound/unbound.conf
	file format is described in unbound.conf(5).
-d	do not fork into the background.
-v	verbose (more times to increase verbosity)
Version 1.7.3
linked libs: libevent 2.0.21-stable (it uses epoll), OpenSSL 1.0.2k-fips  26 Jan 2017
linked modules: dns64 python ipsecmod subnetcache respip validator iterator
BSD licensed, see LICENSE in source package for details.
Report bugs to<EMAIL_ADDRESS>
Additional information
N/A

I realize it's documented that unbound-control set_option shouldn't work.
However, the same behavior happens when going from logfile and use-syslog (and viceversa) by editing the config and then calling unbound-control reload: nothing happens until unbound-control log_reopen is called

unbound-control reload will reopen logfile when use-syslog set to 0. However, I encountered a problem. The logfile failed to be opened, and errno was 13 (Permission denied). Even though I changed the owner group of the logfile to unbound.

Do not add the -d when execute unbound. The above error will be not reported.

为什么termux中启动一直报错

在termux中安装了unbound，pkg install unbound
并且正确配置了unbound.conf文件但是无法启动如上个评论所示
同时也获取了root权限


add country national archive availability to wiki

Results from an earlier questionnaire of the individual meteo services documented here:
https://github.com/adokter/vol2bird/wiki/Radar-data-requirements-and-availability-for-ENRAM

@adokter is this about data at national weather services (mentioned in dmp here) that is not necessarily submitted to BALTRAD?
I included a table with the countries in the license agreement (https://enram.github.io/globam-dmp/pvol_europe.html#geographical-scope), but still need to figure out what is available at BALTRAD (#15)

Table under Country status Oct 2015 is what was coming in at Baltrad in 2015, we have to contact @leijnse for an updated version of the table and figures.

Table under Country national archives time span was the result of a survey I passed around at an OPERA meeting, and refers to what national weather services have stored in their local national archives.

The earlier assessment is now listed on the wiki home page: https://github.com/enram/globam-dmp/wiki


[SPARK-23971] Should not leak Spark sessions across test suites

What changes were proposed in this pull request?
Many suites currently leak Spark sessions (sometimes with stopped SparkContexts) via the thread-local active Spark session and default Spark session. We should attempt to clean these up and detect when this happens to improve the reproducibility of tests.
How was this patch tested?
Existing tests

Test build #89296 has started for PR 21058 at commit 92afcc2.

This is a followup to https://github.com/apache/spark/pull/20971 @gatorsmile

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2287/
Test PASSed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/89296/
Test FAILed.

Retest this please.

Test build #89307 has started for PR 21058 at commit 92afcc2.

Test build #89307 has finished for PR 21058 at commit 92afcc2.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/89307/
Test PASSed.

Merged build finished. Test PASSed.

Thanks! Merged to master.


Still in preview?

Greetings, is this still in preview?  Any word on a release date?

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

ID: 37e9991e-98d3-bf56-ffbd-c2d77bfb0820
Version Independent ID: e568baab-36e7-293e-5d6d-6d3b02931004
Content: Authorize to Microsoft Graph in your Office Add-in - Office Add-ins
Content Source: docs/develop/authorize-to-microsoft-graph.md
Product: non-product-specific
Technology: add-ins
GitHub Login: @o365devx
Microsoft Alias: o365devx

Closing as this seems to be a duplicate of https://github.com/OfficeDev/office-js-docs-pr/issues/1233


dtypes: add int16, priority change, refactor

Did the following changes:

removed float and half dtypes alias for float32 and float16 respectively
added int16 and uint16 dtypes (short, ushort)
changed dtype priorities such that no dtype priority is the same (thus order of ops wont effect resulting dtype)
renamed is_int to is_signed_int. renamed is_unsigned to is_unsigned_int. Added is_int which encapsulates both signed and unsigned.
removed _half4 type since not in use
added some tests for int16, moved tests for int64 from int8 class to its own int64 test class

Changes made in tinygrad/:
------------------------------------------------------------
files                             insertions       deletions
------------------------------------------------------------
tinygrad/codegen/assembly.py               2               2
tinygrad/codegen/assembly_rdna.py          2               2
tinygrad/codegen/cstyle.py                 4               4
tinygrad/codegen/linearizer.py             3               3
tinygrad/codegen/llvmir.py                 4               4
tinygrad/helpers.py                       19              18
------------------------------------------------------------
total                                     34              33
------------------------------------------------------------
lines added in the tinygrad folder: 1

to add support for a new type, theres some not-obvious places where it has to be added support for. I would like to propose also moving these mapping to inside Dtype. Something like:
int16: Final[DType] = DType(3, 2, "short", np.int16, c=ctypes.c_int16, torch=torch.int16, llvm=ir.IntType(16))
uint16: Final[DType] = DType(3, 2, "ushort", np.uint16, c=ctypes.c_uint16, torch=None, llvm=None)

Also move from helpers.py to dtype.py or something

Tests failing

I'll look into it.
@geohot What do you think about my suggestion to move C, torch and LLVM type map to DType class?

Can this be split into separate PRs. Functionality and refactors usually shouldn't be mixed, and I like the float and half aliases

Sure! I'll do it soon


Optimal ordering with block mask

From my understanding, flex attention (using block_mask) gets faster when the number of empty blocks is larger. If the inputs (Q, K, V) do not represent sequences, but graphs with local connectivity (e.g. pixels in an image) the ordering of the elements has a huge impact on the number of empty blocks.
It would be very useful to add helpers to find optimal, or simply better, orderings given a mask. For example, for images, it is likely better to order the pixels by small patch (close to the attention window size), rather than the standard row-by-row order.
Note that this is related to the minimum degree algorithm.

Yeah, this is a pretty fun idea :) I had previously played around with an idea like this using a permute_transform like so
def permute_mod(mod, permutation):
  def new_mod(b, h, q, kv):
    q_idx = permutation[q]
    kv_idx = permutation[kv]
    return mod(b, h, q_idx, kv_idx)
  return new_mod

and so, this allows you to transform any existing mask_mod to one that operates on a permuted input. Unfortunately, this does require you to do a bunch of additional memory accesses, so might not be worth it unless you get way more sparsity. But I had some good successes in certain cases with a hilbert curve.
For 2d images, uwu (on Discord) suggested trying a Morton curve, which could be a good alternative, since it's cheap to "compute" :)

I think it is worth it if you can do the permutation once before a series of attention operations. That is pretty much the case in vision transformers with local windows.
I also tried the Hilbert and Moore curves, but I haven't conducted a proper benchmark.

The issue isn't necessarily that permuting the tokens itself is expensive, but rather that after the permutation you need to load the permutation index into the "inner loop" of the attention, which does offset some of the sparsity gains you can get.

I don't think you need to load the permutation index if you compute the BlockMask once.

If you can guarantee that all of your non-empty blocks are "full" (i.e. non-masked at all), then you don't need to load the permutation index for those blocks.
However, for the partially-masked blocks, you still need to load permutation index to compute the mask for those blocks.

I don't see where the permutation indices appear anymore after the BlockMask has been created with the permuted mask_mod. If both the sequence and the block mask are permuted, there is no permutation happening anymore. There is indexing involved, indeed, with respect to column indices in the block mask, but no "permutation".

Yes, that's what I mean. You must load from your column indices (which represent a permutation) in your inner loop.

I think we are speaking of the same think in different terms, but I don't see how the column indices represent permutations. They are ordered (which allows faster access than random indexing) and target a subset of the full block. I agree that the subset is determined by the original permutation, but the indexing operation does not involve a permutation.
Anyway, your NATTEN + Hilbert curve seems much more efficient than NATTEN alone! Do you still have the code to generate the permutation? I used a random Python library previously.

as long as the positions of your latents aren't changing, there shouldnt be any case where you need to apply a permutation at score/mask mod time, unless you are relying on some non permutation equivariant function of q_idx and kv_idx.
If your latents dont move, then all you should need to do it reorder them (& any  position associated data - rope coeffs, e.g) once
then:

Your score_mod is nothing or doesnt depend on any input data - then the ordering doesnt matter & the block_mask encodes the sparsity pattern
Your score_mod depends on q_idx/kv_idx to access position associated data - then the upfront reordering of this data should cancel out

There is one case where you would need to permute/unpermute
3. Your score_mod depends on q_idx/kv_idx in a way that isnt permutation equivariant. e.g, if you had score * torch.exp(q_idx - kv_idx)). Then, the reorder changes, and you would need to unpermute
the morton code in pytorch if anyone finds this helpful. wont be as good an ordering as hilbert curve probably:
def quantize_coords(coords: torch.Tensor, bits: int = 21):
    max_int = (1 << bits) - 1
    coords = coords.clamp(0, 1)
    return (coords * max_int).long()

def split_by_3_bits_21(x: torch.Tensor):
    x = (x | (x << 32)) & 0x1f00000000ffff
    x = (x | (x << 16)) & 0x1f0000ff0000ff
    x = (x | (x << 8)) & 0x100f00f00f00f00f
    x = (x | (x << 4)) & 0x10c30c30c30c30c3
    x = (x | (x << 2)) & 0x1249249249249249
    return x

@torch.compile
def morton_encode(coords: torch.Tensor, bits: int = 21):
    coords = quantize_coords(coords, bits)
    x = split_by_3_bits_21(coords[..., 0])
    y = split_by_3_bits_21(coords[..., 1]) << 1
    z = split_by_3_bits_21(coords[..., 2]) << 2
    morton_code = x | y | z

    return morton_code


Trusted contacts are not getting confirmed.

I can't get rid of the timer.

This is a duplicate of https://github.com/bithyve/hexa/issues/2055


postman: fix checkver and update to 9.11.0

This has been changed back and forth lately. Currently, the changelog check is more reliable than the release check as the latter one is not sorted reliably.
Relates to #7787 #7694

[x] I have read the Contributing Guide.

/verify


⚠ Bofrost.nl has degraded performance

In 3a12fd8, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 1069 ms

Resolved: Bofrost.nl performance has improved in e33eb4c.


net: BSD Sockets like API initial implementation

This implements BSD Sockets like API, blocking mode, functions: socket(), bind(), connect(), listen(), accept(), recv(), send(), per https://jira.zephyrproject.org/browse/ZEP-2226 .
A sample echo server is supplied (portable to (well, from) POSIX systems) and a simple test for UDP functionality.

@jukkar , @tbursztyka , @lpereira , @Likailiu : Please review.
There're many commits, something definitely needs to be squashed, I'm open to suggestions how much. Other thing requiring decision is "WIP: kernel: fifo: Add peek_head/peek_tail accessors." - whether to turn these functions into true kernel fifo apis, or make private socket functions.

@askawu: Please review too.

Shippable fails (so far) due:

Commit 279ddf5839:
1: T5 Title contains the word 'wip' (case-insensitive)

That's "WIP: kernel: fifo: Add peek_head/peek_tail accessors." commit, about which I ask suggestions above.

Looking that we have tests/net/lib/, maybe should create tests/net/sockets/ to group socket tests?

From a cursory glance, the patchset looks fine. I'll carve some time to review it more carefully.
For some future work, it would be nice to make something similar to poll() or select().  Select is going to be tricky, considering that the fd is just a pointer in disguise, but poll() might be doable.
As far as samples-for-the-future goes, having a "forking" server would be interesting as well as having something like a thread pool with a shared FIFO to service clients.

@lpereira :

For some future work, it would be nice to make something similar to poll() or select(). Select is going to be tricky, considering that the fd is just a pointer in disguise, but poll() might be doable.

poll/select is planned, for "stage 3" of the implementation, https://jira.zephyrproject.org/browse/ZEP-2228, stage 2 non-blocking support (https://jira.zephyrproject.org/browse/ZEP-2227), because realistically, socket poll functionality becomes useful only with non-blocking mode. Indeed, select() will be tricky, so in my plan, I offload it for future "generic POSIX API" work, which also would include read()/write() support for socket objects, etc. poll() should be both good enough and more efficient, though even it would add enough bloat to this implementation.

As far as samples-for-the-future goes, having a "forking" server would be interesting as well as having something like a thread pool with a shared FIFO to service clients.

I assume mentioning of "forking" server is a joke - realistically, we'll never have fork() or vfork() in Zephyr ;-). As I mentioned above, the idea of the current socket_echo sample is to show that it's possible to write apps portable between POSIX and Zephyr, so I didn't want to use Zephyr-specific threading. That again can be addressed by more generic POSIX API advent which would include Pthreads support. Anyway, more examples (or tests) of different kinds can be added later.
Thanks for reviewing!

Some updates:

samples/net/socket_echo: Added Makefile.posix which allows to build the sample (very same source code) on Linux, etc.
tests/net/socket_udp: Converted to tests/net/socket/udp, in anticipation that there will be more socket tests.

I don't understand either, and yet it's like that - w/o CONFIG_NET_BUF_LOG=y, printf() output is not shown (network echo works).

So, previously this was tested on qemu_x86, now confirmed that on qemu_cortex_m3 it leads to the same behavior.

GCC does tail-call optimization depending on the arch. For example, last time I looked re: that at gcc-xtensa, it didn't do it. Anyway, I assume it makes sense to try that refactor.

Ok, some stats:
code size of sockets.o:
qemu_x86: before: 1075, after: 1072, new zsock_recb_stream() is inlined
qemu_cortex_m3: before: 814, after: 826, new zsock_recb_stream() is inlined
qemu_xtensa: before: 781, after: 780, new zsock_recb_stream() is inlined
em_starterkit: before: 928, after: 928, new zsock_recb_stream() is inlined
All in all, single use of static inline function is properly inlined in all cases (which can be "d'oh", but knowing gcc, seeing's believing), and in few cases even leads to surprising reduction in code size, though still noticeable increase for something, which is still relatively minor though. So, I'm rebasing patchset to use separate zsock_recv_stream() function.

@andyross , @andrewboie : Can you please check commit titled "WIP: kernel: fifo: Add peek_head/peek_tail accessor" (https://github.com/zephyrproject-rtos/zephyr/pull/498/commits/cc155f7e8a17005b21df36bc9c9e63d8f1035956 currently, though may be rebased later), and tell whether you'd prefer these functions, k_fifo_peek_head() and k_fifo_peek_tail() to become part of the general FIFO API (by moving them to <kernel.h>), or if it's better for them to be used in adhoc way just for sockets code.
In this regard it's similar to https://github.com/zephyrproject-rtos/zephyr/pull/26, but that was truly new functionality, so I submitted it ahead, to be sure I can rely on it at all. The functions above are just macro wrappers though, so if there're concerns with making them part of the API, everyone in need can just reinvent them, like done here.
Thanks.

@dbkinder : Currently this fails with:
                    /home/buildslave/src/github.com/zephyrproject-rtos/zephyr/doc/reference/kconfig/CONFIG_NET_SOCKETS_POSIX_NAMES.rst:8: ERROR: Unknown target name: "zsock".

Context around CONFIG_NET_SOCKETS_POSIX_NAMES.rst:8 is:
.. option:: CONFIG_NET_SOCKETS_POSIX_NAMES:
.. _CONFIG_NET_SOCKETS_POSIX_NAMES:

By default, Sockets API function are prefixed with "zsock_" to avoid
namespacing issues. If this option is enabled, they will be provided
with standard POSIX names like socket(), recv(), and close(), to help

Any idea why it suddenly interpreters plain text as link mark up ans what to do to make it happy (I already tried single quotes around zsock_, didn't help).

@dbkinder : Using backquotes seems to resolve the issue, but that's italics IIRC. Perhaps using double-backquotes (monospace IIRC) probably would make even more sense, it's just unclear why all this markup does in Kconfig files... Please suggest.

@andyross , @andrewboie : Can you please check commit titled "WIP: kernel: fifo: Add peek_head/peek_tail accessor" (cc155f7 currently, though may be rebased later)...

Based on @Vudentz' suggestion at https://github.com/zephyrproject-rtos/zephyr/commit/cc155f7e8a17005b21df36bc9c9e63d8f1035956#commitcomment-22763881 , this was refactored into kernel.h,  please review: https://github.com/zephyrproject-rtos/zephyr/pull/498/commits/dbf743a4a174a121a425dd8c8a353f8689d3d588

Thanks!


[firebase_messaging] 6.0.9 - Navigate to a screen when notification is opened is bypassed by default screen

Describe the bug
I need to navigate to second screen when notification is opened.
If I do it in onLaunch function, the problem is that the time the app is launched, the code in the function is executed and the default screen has been shown instead the second one.
So what the user sees is the second screen for a decimal of seconds, and after that the app launches the default screen.
To Reproduce
Steps to reproduce the behavior:
_firebaseMessaging.configure(
    onLaunch: (Map<String, dynamic> message) async {
        // ... navigate to NO default screen
    }
);

Hi @GiacomoK
Did you define route for custom screen?
can you please provide your flutter doctor -v and flutter run --verbose? Also, to better address the issue, would be helpful
if you could post a minimal code sample to reproduce the problem
Thank you

Hi @GiacomoK
Did you define route for custom screen?

Yes, the route is defined and working.

can you please provide your flutter doctor -v and flutter run --verbose

╔════════════════════════════════════════════════════════════════════════════╗
║ A new version of Flutter is available!                                     ║
║                                                                            ║
║ To update to the latest version, run "flutter upgrade".                    ║
╚════════════════════════════════════════════════════════════════════════════╝
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Versione 6.1.7601], locale it-IT)
• Flutter version 1.12.13+hotfix.8 at H:\flutter
• Framework revision 0b8abb4724 (8 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at H:\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.
[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] Connected device (1 available)
• SM A510F • 33004dc9aa4493e1 • android-arm • Android 7.0 (API 24)
• No issues found!
flutter run --verbose is very long, do you need I copy here?
This is the code of main.dart:
// ... import

final navigatorKey = new GlobalKey<NavigatorState>();

final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();

///
/// Navigation Middleware: manage navigation after action is dispatched
///
void navigationMiddleware(
    Store<AppState> store,
    dynamic action,
    NextDispatcher next,
    ) {
  next(action);

  if (action is MyAction) {
    navigatorKey.currentState.push(
        MaterialPageRoute(
            builder: (context) => SecondScreen(appState: store.state, id: action.id)
        )
    );
  }
}

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  final persistor = Persistor<AppState>(
    storage: FlutterStorage(),
    serializer: JsonSerializer<AppState>(AppState.fromJson),
  );

  final initialState = await persistor.load();

  final store = Store<AppState>(
    appReducer, /* Function defined in the reducers file */
    initialState: initialState ?? AppState.initial(),
    middleware: [persistor.createMiddleware(), navigationMiddleware],
  );

  FlutterError.onError = (FlutterErrorDetails details) async {
    if (isInDebugMode) {
      FlutterError.dumpErrorToConsole(details);
    } else {
      Zone.current.handleUncaughtError(details.exception, details.stack);
    }
  };

  runZoned<Future<void>>(() async {
    runApp(MyApp(store: store));
  }, onError: (error, stackTrace) {
    _reportError(error, stackTrace);
  });
}

class MyApp extends StatefulWidget {
  final Store<AppState> store;

  const MyApp({Key key, this.store}) : super(key: key);

  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var _location = new Location();

  Future<void> onSelectNotification(String payload) async {
    if (payload != null) {
      var message = jsonDecode(payload);
      widget.store.dispatch(new MyAction(message['id']));
    }
  }

  @override
  void initState() {
    super.initState();
    initPlatformState();

    _location.onLocationChanged.listen((LocationData currentLocation) {
      widget.store.dispatch(new ActionGeoLocationChanged(currentLocation.latitude, currentLocation.longitude));
    });

    ///
    /// FIREBASE CODE
    ///
    _firebaseMessaging.configure(
      onMessage: (Map<String, dynamic> message) async {
        UpdateServerHelper.setPushNotificationTokenRead(message['data']['notification_uid']);
      },
      onLaunch: (Map<String, dynamic> message) async {
        void justWait({@required int numberOfSeconds}) async {
          await Future.delayed(Duration(seconds: numberOfSeconds));
        }

        int waitSecs = 3;
        await justWait(numberOfSeconds: waitSecs);

        UpdateServerHelper.setPushNotificationTokenRead(message['notification_uid'] != null ? message['notification_uid'] : message['data']['notification_uid']);

        widget.store.dispatch(new MyAction(message['id']));
      },
      onResume: (Map<String, dynamic> message) async {
        UpdateServerHelper.setPushNotificationTokenRead(message['notification_uid'] != null ? message['notification_uid'] : message['data']['notification_uid']);

        widget.store.dispatch(new MyAction(message['id']));
      },
    );
    _firebaseMessaging.requestNotificationPermissions(
        const IosNotificationSettings(sound: true, badge: true, alert: true));
    _firebaseMessaging.onIosSettingsRegistered
        .listen((IosNotificationSettings settings) {
    });

    _firebaseMessaging.getToken().then((String token) async {
      assert(token != null);

      widget.store.dispatch(new ActionPushNotificationTokenCreated(token));

      UpdateServerHelper.updatePushNotificationToken(token);
    });
  }

  /// Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    if (!mounted) return;
  }

  @override
  Widget build(BuildContext context) {
    return new  StoreProvider<AppState>(
        store: widget.store,
        child: ... widget
    );
  }
}

As you can see I use a middleware and to try to solve my problem I wait for 3 secs before dispatching the action.

is this the only way to open a notification when the app is terminated? we have the same issue, have a splash screen and animation for 1.5 seconds so adding a wait of 2 seconds or else the page isnt routing. onResume works fine


Upterm is looking for maintainers

Hey GitHub community!
If you are a Node.js/Electron developer, you have probably heard of Upterm open source, a terminal emulator for the 21st century.
Upterm has 18634 (2018-05-28) stars and people who use it, call it "magnificent".
This message is about Upterm and its future. But it is also about people and what they do in their lives, how they come and go, and how only a few of them leave a lot of great products & ideas for all of us to use and enjoy.
Vlad Shatskyi (@vlad-shatskyi) died. He was the main contributor to Upterm, the one who had the vision and love for this project, the person who moved it forward.
He used to work for Railsware, and we (his colleagues) decided to find one or a group of developers who would not let this project die, who would be willing to take over the ownership, start maintaining and pushing it forward.
We at Railsware will be happy to see Upterm wake up and start living again, evolving and benefiting the global dev community.
Let’s find the new Upterm contributor together, let’s breathe life into it and not let it be forgotten.
Shares, likes, and all possible ways of distributing this message are welcome!
P.S.
I have completed some urgent requests. Even though I have other open source projects that I contribute to, I don't have a vision for Upterm. And having a clear vision is what drives open source!

I want to try. I learn some electron and nodejs, but need you help me to understand this the great project

@zsirfs thanks. You can setup project and start doing some improvements by PRs. Hope, you also familiar with TypeScript.

@le0pard .Thanks Reply. I wrote an electron application myself long ago. Typescript is familiar, type has made our application less error

Hey. I tried this terminal couple of times and liked it. I hope I could start helping. I think best for now is start grabbing issues from list and improve through PRs

I would like to contribute but I am not a programmer I am more a webdesigner

DomTerm shares similar goals (and some technologies) but takes a different approach than Upterm. It too uses JavaScript/DOM/CSS in the front-end, optionally wrapped in Electron (but can also use a regular desktop browser). However, the server side is C, using the libwebsockets library. (At some point a migration to Rust might make sense, but I'm not yet ready for that.)
DomTerm starts with a rock-solid xterm-compatible terminal emulator (well, it does better on vtttest than any other JavaScript-based terminal I've tried). In addition you can embed general HTML data (images, rich text) in the output, and it also organizes the DOM in a structured way (commands, input, output). For data display it has builtin dynamic pretty-printing and builtin folding (show/hide buttons), so implementing something like the cat tslint.json screenshot should be easy (coming soon ...).
I think implementing a shell from scratch is a mistake. Better to take an existing shell, and integrate it better.  Maybe the fish shell, since it already supports "autosuggestions" (command completion as you type).  The idea would be to extend fish (or some other shell or input library) to use escape sequences to send completion suggestions to the terminal.  The terminal could (for example) pop up a scrollable selection widget.  Ideally the escape sequence would be general enough that it can be used by different shells and input libraries (and different terminals).
You can also have the input editing library coordinate with the terminal, for better integration with the mouse, selection, and system clipboard.  DomTerm already has a nice input editor. The goal would be for the shell's input library (readline for bash) would delegate much of the editing to the terminal (which also helps if you have slow connection).
I welcome you to try out DomTerm, and maybe contribute.  There is extensive documentation.

Hey there, been in React and Javascript engineering for a while. stumbled on this the other day, really love the concept. I am interested :+1:

Very interested .. had a lot of vision for Up-term, But got discouraged. Lot of issues in backlog. Also i know basic JavaScript. Someone if they upload a video or something and run us through code, will be helpful.

Wow, what a shame, what happened to the project and its creator.
I fell here from parachute, I was reading and researching a lot about it, I'm working on a project that will need a terminal maybe I can try to help this project, to start it on again what do I need to do?

what do I need to do?

Start with PR requests. Select any issue, fix it, create PR. Repeat. For best contributors in this tasks I will give write access to project. I hope it is the best way to find contributors to project.

I would like to help with the project. Will start with some issues

I would love to help with this project. I have a few years of experience programming, but I'm still pretty much a novice with ts/js and open source. I'll go through pr and issues as much as I can.

Hey @le0pard, I'd like to be a part of this.
Here's my first PR: https://github.com/railsware/upterm/pull/1314

Hey @le0pard, I would like to be part of this. I have contributed on electron-react-boilerplate and other electron based repository.

Hey @le0pard I would like to be part of this too, I'm trying to be a more active open source contributor.

@le0pard
Hey, I'm can help you with upterm tasks.

I am a Javascript and Python developer. I'm familiar with Node.js even though I'm not an expert. I would like to contribute to this project. I think it's very interesting to develop a terminal. If you want to know more about me you can see my professional profile https://www.linkedin.com/in/alexol/


Output locals mapping in trace logging

The Locals line in the Frame Object output is now, for example:
Locals: {"num": RefCell { value: [PyObj int 9] }, "f": RefCell { value: [PyObj function] }}
(Note that in cases where the inner values of the PyObjectRefs are unexpected, I simply output to the log and continue; potentially we should panic instead, but I wasn't sure if that was appropriate in a trace log.)

Thanks for the comments. I'm away from my laptop today, so I'll address
them tomorrow.
On Wed, Aug 1, 2018, 11:53 Windel Bouwman<EMAIL_ADDRESS>wrote:

@windelbouwman commented on this pull request.
In vm/src/frame.rs
https://github.com/RustPython/RustPython/pull/22#discussion_r206934524:

@@ -114,11 +114,16 @@ impl fmt::Debug for Frame {
.map(|elem| format!("\n  > {:?}", elem))
.collect::<Vec<_>>()
.join("");

   let local_str = "".to_string(); /* self.locals

       .iter()

       .map(|elem| format!("\n  {} = {}", elem.0, elem.1.borrow_mut().str()))

       .collect::<Vec<_>>()

       .join(""); */

   let local_str = match self.locals.borrow().kind {

       PyObjectKind::Scope { ref scope } => match scope.locals.borrow().kind {

           PyObjectKind::Dict { ref elements } => format!(" {:?}", elements),

           ref unexpected => format!(

               "locals unexpectedly not wrapping a dict! instead: {:?}",

A panic is fine at this point I would say, since this is internally
managed. If this is wrong, we are in really bad shape. It is not a python
exception, but really a rust panic. Also consider if let for match
statements with one arm only. It might be a good point to use here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/RustPython/RustPython/pull/22#pullrequestreview-142443947,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAD1EOUzX9sHKtzhnmZ7pqOQk37VpnEuks5uMc7ngaJpZM4VpzQu
.

Hi @windelbouwman, I've addressed your comments; the output format now looks like:
 Locals:
  g = <func>
  foo = <func>
  f = <func>

and we're panicking instead of simply logging. I didn't switch to if let because we capture the value of the default clause for use in the panic message, which is more readily expressed in a match

Hi @OddBloke , fantastic! Great job!


Update link to FOI Help site

Title of ticket: Update link to FOI Help site
Description
Refer to original ticket #4246. The link to the website should be updated to bring users directly to the Help articles site. Update supported by Matthew and Loren.
Dependencies
None
DOD

[Update link from https://help.foirequests.gov.bc.ca/ to https://help.foirequests.gov.bc.ca/help-articles
]
[ ]
[ ]
[ ]
[ ]

working good, so closing it


Fix/add ttn and others

Fix decoder.js direction size and different put the same name on the ttn.
Fix keywords.txt file.
Fix decode type Generic and Time, add getValue32 to get the uint32_t directily.
Add decodeTTN.
Add example decodeTTN.
Add a description for decodeTTN on API.

@xoseperez help us a little and review?

LGTM, my only concern are the changes in the field names (s/analog_output/analog/out/ and others). The reason is to make them compatible with the default CayenneLPP decoder in TTN. Still they could break some implementations. Maybe a notice in the README wouold be good.
Travis complains due to changes in 3c1d96e8911b84d3625ec629195c70d14ef2e381.


OCPBUGS-12458: Deprecate --use-oci-feature in favor of --include-local-oci-catalogs

Description
Based on the decision with the PM on April 24, --use-oci-feature flag is replaced by --include-local-oci-catalogs
The previous flag is marked deprecated in 4.13, and is to be removed completely in the 4.14 version.
Fixes # OCPBUGS-12458
Type of change
Please delete options that are not relevant.

[ ] 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)
[x] This change requires a documentation update

How Has This Been Tested?

Unit tests pass
E2E tests pass
manual tests with both flags give expected results.

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] 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
[ ] Any dependent changes have been merged and published in downstream modules

cc @bergerhoffer

/jira refresh

/cherrypick release-4.13


[R] Possible undesirable handling of POSIXlt objects

In the course of updating documentation, I noticed that it is possible to create an Arrow array of POSIXlt objects from R, but not a scalar.
https://github.com/apache/arrow/pull/14514#discussion_r1016078081
This works:

tm <- as.POSIXlt(c(Sys.time(), Sys.time()))
arrow::Array$create(tm)

This fails:

arrow::Scalar$create(as.POSIXlt(Sys.time()))

It's possible to manually convert a POSIXlt object to a struct scalar like this:

df <- as.data.frame(unclass(as.POSIXlt(Sys.time())))
arrow::Scalar$create(df,
              type = struct(
                sec = float32(),
                min = int32(),
                hour = int32(),
                mday = int32(),
                mon = int32(),
                year = int32(),
                wday = int32(),
                yday = int32(),
                isdst = int32(),
                zone = utf8(),
                gmtoff = int32()
              ))

although this does not seem precisely the same as the behaviour of Array$create() which creates an extension type?
It was unclear to us ( @thisisnic and myself) whether the current behaviour was desirable, so it seemed sensible to open an issue!
Related issue:
https://issues.apache.org/jira/browse/ARROW-18263
Reporter: Danielle Navarro / @djnavarro
Assignee: Dewey Dunnington / @paleolimbot
PRs and other links:

GitHub Pull Request #15277

Note: This issue was originally created as ARROW-18337. Please see the migration documentation for further details.

This has been merged pointing to the original issue. I am closing the issue manually. Should we update the merge script to not allow merging issues pointing to JIRA so we have to update the titles? I already created a PR to update the title check on the PR: https://github.com/apache/arrow/pull/33611

@raulcd yes I think that makes sense


[cp-zookeeper] - Add Custom env parameter at helm charts

What changes were proposed in this pull request?
Propose to add customEnvs in cp-zookeeper helm/charts. For example change log level and others envs.
How was this patch tested?
This patch are tested in Kubernetes EKS env.

It looks like @cesarokuti hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement here.
Once you've signed reply with [clabot:check] to prove it.
Appreciation of efforts,
clabot

[clabot:check]

@confluentinc It looks like @cesarokuti just signed our Contributor License Agreement. :+1:
Always at your service,
clabot

+1


{azure-cli-testsdk} Enable https-only property for storage accont to fit security policy

History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)
[Component Name 1] (BREAKING CHANGE:) (az command:) make some customer-facing change.
[Component Name 2] (BREAKING CHANGE:) (az command:) make some customer-facing change.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

Approved. Related to https://github.com/Azure/azure-cli/issues/12519. I still think default https should be enabled on swagger as well.


413 Request Entity Too Large

I am uploading files to cloudinary with this code
public function upload(Request $request)
{
$folder = 'product_photo';
    if ($request->hasFile('photo')) {
        $file = $request->file('photo');
        request()->validate([
            'photo' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:6048',

        ]);

        $cloudinaryResponse = Cloudinary::upload($file->getRealPath(), [
            'folder' => $folder,
        ]);

        $secureUrl = $cloudinaryResponse->getSecurePath();
        return response()->json(['secure_url' => $secureUrl], 200);
    } else {
        return response()->json(['error' => 'No file uploaded'], 400);
    }
}

the problem is that it works on local but on production it shows this error message

413 Request Entity Too Large

413 Request Entity Too Large

nginx/1.24.0

Hello @Ngozistephen if you haven't resolved this issue yet, this is not an issue with the library but your nginx config. Here's how you can resolve it. https://stackoverflow.com/a/27895973


ImportError: DLL load failed with error code<PHONE_NUMBER> while importing pywrap tensorflow_internal in Python3.8

How i can solve this error while import TensorFlow
System information:

Python 3.8.4.
Windows 7 Ultimate 64bit.
2GB Ram.
Intel(R) Celeron(R) CPU N2840 @ 2.16GHz.
Intel(R) HD Graphics.

Error Text/Logs:
>>> import tensorflow as tf
Traceback (most recent call last):
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\te
nsorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed with error code<PHONE_NUMBER> while importing _pywrap_
tensorflow_internal

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
    from tensorflow.python import pywrap_tfe
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "G:\Users\Abdo-Prgraming\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed with error code<PHONE_NUMBER> while importing _pywrap_tensorflow_internal

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

@AIabdoPr
What is make/model of your cpu?
I suspect your cpu model does not support AVX instructions sets.See hardware requirements
TF Version >= 1.13 requires CUDA 10.0 and TF Version < 1.13 (till TF 1.5) requires CUDA 9.0.
If you have above configuration and using Windows platform -
Try adding the CUDA, CUPTI, and cuDNN installation directories to the %PATH% environment variable.
Refer windows setup guide.

@AIabdoPr
I guess this is an issue with mixing two or more versions.
1.Check multiple tensorflow folder under 'site-packages/` folder and delete them
2.check environmental file and check for path system variable, if the path are not pointing to correct version of software (python), then adjust accordingly
3.Uninstalled tensorflow-->uninstalled python-->restart computer
4. python--> set and check system variables in the environmental file
5.install TF and then check whether everything is working as expected or not.
Also, i guess this issue you might not have faced with python 3.7 or 3.6.Can you please see whether you are facing this issue with python 3.6 , 3.7 also or only with python 3.8
Thanks!

How i can solve this error while import TensorFlow
(TF_PY) C:\Users\hp>python -c "import tensorflow as tf;print(tf.reduce_sum(tf.ra
ndom.normal([1000, 1000])))"
Traceback (most recent call last):
File "C:\Users\hp\anaconda3\envs\TF_PY\lib\site-packages\tensorflow\python\pyw
rap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: Le module spécifié est introuvable.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\hp\anaconda3\envs\TF_PY\lib\site-packages\tensorflow_init_.p
y", line 41, in
from tensorflow.python.tools import module_util as module_util
File "C:\Users\hp\anaconda3\envs\TF_PY\lib\site-packages\tensorflow\python_i
nit.py", line 40, in
from tensorflow.python.eager import context
File "C:\Users\hp\anaconda3\envs\TF_PY\lib\site-packages\tensorflow\python\eag
er\context.py", line 35, in
from tensorflow.python import pywrap_tfe
File "C:\Users\hp\anaconda3\envs\TF_PY\lib\site-packages\tensorflow\python\pyw
rap_tfe.py", line 28, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\hp\anaconda3\envs\TF_PY\lib\site-packages\tensorflow\python\pyw
rap_tensorflow.py", line 83, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\hp\anaconda3\envs\TF_PY\lib\site-packages\tensorflow\python\pyw
rap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: Le module spécifié est introuvable.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.


pip install --no-binary :all: mitmproxy-wireguard fails

https://crates.io/crates/x25519-dalek has recently shipped v2.0.0-rc.2, which includes a breaking change over the previous v2.0.0-pre.1 release. This causes pip install --no-binary :all: mitmproxy-wireguard to fail (see https://github.com/mitmproxy/mitmproxy/discussions/6045). Things seem to work for mitmproxy_rs because the sdist there includes Cargo.lock (and that is somehow take into account I guess), but it fails for mitmproxy-wireguard. Can we ship a quick patch release including Cargo.lock? :)

Should be fixed with v0.1.23:
https://pypi.org/project/mitmproxy-wireguard/0.1.23/


Notes from MIDI keyboard do not produce audio

Describe the bug
I'm running on a Raspberry Pi 3B with a Keystep 37.  Notes can make it into the Pi, and notes can make it out separately from midi files, but I can't get the notes playing to produce any sound.
Notes show up with aseqdump, e.g.:
pi@keystep:~ $ aseqdump -p 24
Cannot connect from port 24:0 - Invalid argument
pi@keystep:~ $ aseqdump -p 20
Waiting for data. Press Ctrl+C to end.
Source  Event                  Ch  Data
 20:0   Note on                 7, note 71, velocity 80
 20:0   Note off                7, note 71, velocity 64

And if I run a command like the following, I hear audio from the connected headphone jack:
fluidsynth -a alsa -o audio.alsa.device=plughw:0,0 -n -i /usr/share/sounds/sf2/FluidR3_GM.sf2 SquishBox/midi/elevatorgroove.mid

Because I had to add that -o flag, and because of the output from aplay -l, I have edited my fluidsettings to include audio.alsa.device: 'plughw:0,0'.
pi@keystep:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 2: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

SquishBox/squishboxconf.yaml:
soundfontdir: SquishBox/sf2
bankdir: SquishBox/banks
mfilesdir: SquishBox/midi
plugindir: /usr/lib/ladspa
currentbank: bank1.yaml
fluidsettings:
  audio.driver: alsa
  audio.alsa.device: 'plughw:0,0'
  audio.period-size: 64
  audio.periods: 3
  midi.autoconnect: 1
  player.reset-synth: 0
  synth.audio-groups: 16
  synth.cpu-cores: 4
  synth.ladspa.active: 1
  synth.polyphony: 128

If I add a few print statements, I can see the listener from headlesspi.py firing for notes, but I don't see send_event functions elsewhere getting called.
Output of headlesspi.py (the thread priority messages go away if I run with sudo):
pi@keystep:~ $ python headlesspi.py
fluidsynth: warning: Requested a period size of 64, got 444 instead
fluidsynth: warning: Failed to set thread to high priority
fluidsynth: warning: Failed to set thread to high priority
fluidsynth: Connection of Midi Through Port-0 succeeded
fluidsynth: Connection of Arturia KeyStep 37 MIDI 1 succeeded
fluidsynth: warning: Failed to set thread to high priority
fluidsynth: Connection of Network succeeded
fluidsynth: warning: Failed to set thread to high priority
fluidsynth: warning: Failed to set thread to high priority
Loading bank 'bank1.yaml' ..
fluidsynth: warning: Sample 'SineWave': ROM sample ignored
Bank loaded.
Selected patch 1/26: Piano

Any ideas what I could try next?
Background Info

I am trying to run the program via headlesspi.py.
Running on Raspberry Pi 3B with Debian GNU/Linux 12 (bookworm)
FluidSynth version 2.3.1

Thanks for the helpful info - it appears from your aseqdump output that your Keystep is sending notes on MIDI channel 7. The bank1.yaml bank file assumes your keyboard is sending on channel 1. You can change this on your keystep or add the following rule to the router_rules section at the top of the bank file:
  - {type: note, chan: 7=1}

Side note - if you're using headlesspi.py, you may have installed the legacy version of the RPi synth software. I'm trying to disentangle fluidpatcher from the squishbox software - apologies for any confusion.

Thank you for finding that so quickly!  I tried a lot of things but hadn't found that setting in bank1.yaml.
In general, I was trying to go off of the steps from Headless Raspberry Pi Synthesizer Update video, but maybe I installed something from the other project when I was struggling and didn't realize how all the parts fit together.  The YouTube videos have been very helpful--thanks for all the work you've put into this project, both developing it and sharing it!


Ospec - Errors inside tests swallowed up

I believe this is a bug.
To reproduce, run:
const o = require('ospec')

o('Swallowed Error', function() {
  o(1+1).equals(2)
  throw 'swallowed error'
})

o.run()

When executed directly, this file prints the following error, no matter what the original error is:
:!node /Users/jg/Documents/projects/pokerquiz/tests/ospec_bug.js
/Users/jg/Documents/projects/pokerquiz/node_modules/ospec/ospec.js:211
                                var stackTrace = r.error.match(/^(?:(?!Error|[\/\\]ospec[\/\\]ospec\.js).)*$/m)
                                                        ^

TypeError: Cannot read property 'match' of undefined
    at report (/Users/jg/Documents/projects/pokerquiz/node_modules/ospec/ospec.js:211:29)
    at next (/Users/jg/Documents/projects/pokerquiz/node_modules/ospec/ospec.js:108:6)
    at next (/Users/jg/Documents/projects/pokerquiz/node_modules/ospec/ospec.js:97:7)
    at series (/Users/jg/Documents/projects/pokerquiz/node_modules/ospec/ospec.js:69:4)
    at test (/Users/jg/Documents/projects/pokerquiz/node_modules/ospec/ospec.js:48:4)
    at Function.o.run (/Users/jg/Documents/projects/pokerquiz/node_modules/ospec/ospec.js:43:3)
    at Object.<anonymous> (/Users/jg/Documents/projects/pokerquiz/tests/ospec_bug.js:10:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)

shell returned 1

When executed through the npm ospec command, ospec prints nothing, and just hangs, until you kill it with ctrl-C:
/Documents/projects/pokerquiz (master) $ npm run ospec

> @ ospec /Users/jg/Documents/projects/pokerquiz
> ospec

^C
~/Documents/projects/pokerquiz (master) $

What's your "ospec" npm script look like?

It's literally ospec.  That is, it calls the binary that comes with the package.

Check if console.log within the tests is stripped.

It is not stripped.

Is console.error stripped? I suspect it won't be, but I'm not sure.

Part of why I'm confused is because it doesn't respawn Node before running the tests.

To update based on our gitter conversation, it seems that using the ospec version from mithril#next fixes the 2nd problem, ie, ospec silently hanging.
However, the first problem -- that all error are reported as a generic TypeError: Cannot read property 'match' of undefined results from a still extant ospec bug: namely, that ospec assumes all errors are js Error objects, so that errors which result from throw 'some error description (or anything else that results in a primitive string "error" rather than an Error object, if alternate causes exist) will be reported as the above type error because of this:
	function record(message, error) {
		var result = {pass: message === null}
		if (result.pass === false) {
			if (error == null) {  // <-- HANDLES null, but not a "string" error
				error = new Error
				if (error.stack === undefined) new function() {try {throw error} catch (e) {error = e}}
			}
			result.context = subjects.join(" > ")
			result.message = message
			result.error = error.stack
		}
		results.push(result)
	}

A one line-fix results in the correct error being reported:
			if (error == null || typeof error === 'string') {

although without a stack trace.  However, I'm not sure it's possible to access the stack trace with string errors.  The above is at least somewhat helpful.
One final note: These errors stop processing completely, rather than finishing the remaining tests.  I'm not sure if this is intended.  Personally, I think reporting the test as failed with the error, and then continuing to process the remaining tests, would be preferable.  This may be a bigger change.


CIF-1197 - Update pricing information on product list component

See https://github.com/adobe/aem-core-cif-components/pull/195.

Verified together with https://github.com/adobe/aem-core-cif-components/pull/195


test from 10 to 20

why test from 10 to 20?
EAO  is the most important ?

The last epoch may not be the best, so we test all models from 10 to 20.
EAO is the most important metric on VOT benchmarks. If you want to test other dataset, success is the most important metric.

EAO is important than the Accuracy and Robustness?


Add mac M1/arm64 workarounds to "Developer FAQ"

This PR adds M1/arm64 workarounds to Developer FAQ

Fixes https://github.com/near/devrel/issues/325


any possible to make this window resizable??

What is the feature you'd like to have?
Please provide a clear and concise description of what you want.

What window manager are you using? We're not doing anything to prevent resizing as far as I can tell. It's resizable on MacOS.

I use manjaro
Tomorrow I will try again to check
Thanks for your answer

What window manager are you using? We're not doing anything to prevent resizing as far as I can tell. It's resizable on MacOS.

I check it again
Sorry I should make a clear description
It is resible
But it can not make smaller
That is we can change the window  bigger, but we can not make it smaller.

Whoops, I mis-rememebered this was an issue and thought it came from slack and filed a duplicate issue at #4847. Sorry about that! I'm closing this as a duplicate even though the other one is the real duplicate because I already set all the appropriate labels for it. 😉
Builds >= 4730 will let you make the dialog smaller than the default size.


Permissions

Summary by CodeRabbit

New Features

Expanded the list of allowed catalogue adaptors for versions 2.2 and 2.5, providing more options for users.
Increased the number of allowed positions for version 2.2, enhancing operational flexibility.
Introduced two new adaptor constants to improve system configurability.

Improvements

Streamlined the allowed positions for version 2.5, promoting a more efficient management approach.

There is an issue in the time crate causing compilation errors. It doesn't happen locally on my machine; I bumped the image's rust version to 1.76 to match my local environment but it didn't fix it.


Debug assertion support

There is a debug_assert feature in mojo. https://docs.modular.com/mojo/stdlib/builtin/debug_assert.html
When it is fully working https://github.com/modularml/mojo/issues/622,  it would be nice to support this for mojo-pytest MojoTest items.

Going to add support for a --mojo-assertions option in pytest, which invokes -D MOJO_ENABLE_ASSERTIONS however it does not seem useful at all right now (mojo 0.7) https://github.com/modularml/mojo/issues/1709


Add bulletin series feature with routable pages and automated release determination

Description:
This PR adds the necessary functionality to support a deterministic and joined-up bulletin release series. The following features are included:

Added a BulletinSeriesPage to act as a container for each type of release.
Implemented routable pages to provide /latest and /previous-releases endpoints.
Automated the determination of the latest and previous releases based on the release_date.

Known Issues:
Currently, there is an issue with the wagtailmath package where it tries to import wagtail.core, which no longer exists in recent versions of Wagtail. The error message is:
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'wagtailmath.templatetags.wagtailmath': No module named 'wagtail.core'
Steps to Reproduce:

Run python manage.py migrate in the local development environment.

Attempted Fixes:

Updated the import path in the wagtailmath package to use the new wagtail module:

from wagtail.core.blocks import FieldBlock

to:

from wagtail.blocks import FieldBlock

Despite this change, the issue persists.
Steps Taken:

Attempted to update the import paths in the wagtailmath package to align with the new Wagtail version.
Followed suggested fixes but the issue persists.

Request for Feedback:
I am submitting this PR to gather feedback and suggestions from the team. If anyone has encountered similar issues or has ideas for a fix, your input would be greatly appreciated.
Checklist:

[x] Add a bulletin series page to act as a container for each type of release.
[x] Use RoutablePageMixin to provide /latest and /previous-releases.
[x] Automate the sorting and determination of the latest and previous releases based on release date.
[x] Add view latest release box/link to older bulletins.
[x] Ensure the previous releases box is displayed on /latest and the latest bulletin page.

Additional Notes:
This PR is part of the POC and aims to demonstrate the core functionality. Further refinements and fixes will be made in subsequent iterations.

@islas104 you can copy ons_alpha/settings/local.py.example to ons_alpha/settings/local.py and set it there

Hi @zerolab ,
I've implemented all the changes you requested, including updating the routes and template adjustments. However, I'm encountering an error related to wagtail.core.blocks, which seems to be causing issues during the migration process.
The error message I'm seeing is:
ModuleNotFoundError: No module named 'wagtail.core'
I suspect this might be due to changes in the Wagtail package structure. Could you advise on the best way to address this? Should we update the imports to use wagtail.blocks or is there another preferred method to resolve this issue?

The error message I'm seeing is:
ModuleNotFoundError: No module named 'wagtail.core'
I suspect this might be due to changes in the Wagtail package structure. Could you advise on the best way to address this? Should we update the imports to use wagtail.blocks or is there another preferred method to resolve this issue?

poetry install please

Tidied the PR up and recorded a screencast: https://www.loom.com/share/455a5c6d05ba48aea046a84c2e1a21bc?sid=ff166e0b-560e-44d3-bb07-c25f5d5628a1
@MebinAbraham can you give your seal of approval so I merge this?


Problem with twig-view being initialized before

I'm using Twig-View behind a proxy. Therefore, I use your middleware in order for extensions base_url and path_for to work properly.
But as the renderer seems to be initialized before the middleware, it uses the initial Uri object which is not modified by the middleware yet (getUri() below).
$container['renderer'] = function ($c) {
    $settings = $c->get('settings')['renderer'];
    $view = new Slim\Views\Twig($settings['template_path'], [
        'cache' => $settings['cache_path'],
        'auto_reload' => true
    ]);
    $view->addExtension(new Slim\Views\TwigExtension(
        $c['router'],
        $c['request']->getUri()
    ));

    return $view;
};

Consequently my paths are generated in http instead of https.
Any solution for this?
As it concerns twig-view as well, I didn't know where to open the issue, I hope it's not a problem.

@kalvn: can use this middleware as a workaround:
class UpdateTwigBaseUrlMiddleware {
    private $twig;
    public function __construct(Twig $twig) {
        $this->twig = $twig;
    }
    public function __invoke($request, $response, $next) {
        $this->twig->getEnvironment()->getExtension('slim')->setBaseUrl($request->getUri());
        return $next($request, $response);
    }
}

I'll give a try, thanks :)


add ngram field to all corpora with date field and main_content_mapping

All indices have been prepared for offering the "neighbouring words" visualization, but the corpus definitions themselves hadn't been updated to actually add those visualizations. This PR fixes that.

Urgs. My apologies, my code formatter was still set to format on save. I adjusted that now, but these files are still heavily formatted. The changes basically come down to adding "ngram" in the following fields:

Dutchnewspapers.content
GuardianObserver.content
Times.content
Periodicals.content

In principle, we can probably also add this feature for corpora which have a year field, instead of a date field, but I left those alone for now.

The formatting makes it hard to see what's going on, but just looking at the changes you pointed out: looks good!


S3C-885: Change v2 query auth window to 7 days

PR has been updated. Reviewers, please be cautious.

@ironman-machine r+

Hello @nicolas2bert
"r+": Success

:hourglass: PR is now pending. CI build url: http://ci.ironmann.io/gh/scality/Integration/17471

:sunny: :+1: circleCI test succeeded!


Should the table_map in EventStreamReader be cleared when a ROTATE_EVENT is received?

#[derive(Debug, Clone, Eq, PartialEq)]
pub struct EventStreamReader {
    fde: FormatDescriptionEvent<'static>,
    table_map: HashMap<u64, TableMapEvent<'static>>,
}

Hmm.. Next TABLE_MAP_EVENT will overwrite it anyway.
Not really sure how ROTATE_EVENT affects TME, to be honest. Found no documentation on this.

TME has a lifetime of a transaction.
It's meant for easy lookup of row events. Instead of having row events with db.name they have an Integer stamp.
Every row event will have a precedent Table Map Event. A transaction never spawns into multiple binlogs.
The only reason for resetting the TM hash will be to reduce the memory footprint. But functionally an ever incremental hash map still works.

Hmm.. Next TABLE_MAP_EVENT will overwrite it anyway. Not really sure how ROTATE_EVENT affects TME, to be honest. Found no documentation on this.

When I was reading the Debezium code, I found that its processing logic is as follows:
        // Set up the event deserializer with additional type(s) ...
        final Map<Long, TableMapEventData> tableMapEventByTableId = new HashMap<Long, TableMapEventData>();
        EventDeserializer eventDeserializer = new EventDeserializer() {
            @Override
            public Event nextEvent(ByteArrayInputStream inputStream) throws IOException {
                try {
                    // Delegate to the superclass ...
                    Event event = super.nextEvent(inputStream);

                    // We have to record the most recent TableMapEventData for each table number for our custom deserializers ...
                    if (event.getHeader().getEventType() == EventType.TABLE_MAP) {
                        TableMapEventData tableMapEvent = event.getData();
                        tableMapEventByTableId.put(tableMapEvent.getTableId(), tableMapEvent);
                    }

                    // DBZ-2663 Handle for transaction payload and capture the table map event and add it to the map
                    if (event.getHeader().getEventType() == EventType.TRANSACTION_PAYLOAD) {
                        TransactionPayloadEventData transactionPayloadEventData = (TransactionPayloadEventData) event.getData();
                        /**
                         * Loop over the uncompressed events in the transaction payload event and add the table map
                         * event in the map of table events
                         **/
                        for (Event uncompressedEvent : transactionPayloadEventData.getUncompressedEvents()) {
                            if (uncompressedEvent.getHeader().getEventType() == EventType.TABLE_MAP
                                    && uncompressedEvent.getData() != null) {
                                TableMapEventData tableMapEvent = (TableMapEventData) uncompressedEvent.getData();
                                tableMapEventByTableId.put(tableMapEvent.getTableId(), tableMapEvent);
                            }
                        }
                    }

                    // DBZ-5126 Clean cache on rotate event to prevent it from growing indefinitely.
                    if (event.getHeader().getEventType() == EventType.ROTATE) {
                        tableMapEventByTableId.clear();
                    }
                    return event;
                }
                // DBZ-217 In case an event couldn't be read we create a pseudo-event for the sake of logging
                catch (EventDataDeserializationException edde) {
                    // DBZ-3095 As of Java 15, when reaching EOF in the binlog stream, the polling loop in
                    // BinaryLogClient#listenForEventPackets() keeps returning values != -1 from peek();
                    // this causes the loop to never finish
                    // Propagating the exception (either EOF or socket closed) causes the loop to be aborted
                    // in this case
                    if (edde.getCause() instanceof IOException) {
                        throw edde;
                    }

                    EventHeaderV4 header = new EventHeaderV4();
                    header.setEventType(EventType.INCIDENT);
                    header.setTimestamp(edde.getEventHeader().getTimestamp());
                    header.setServerId(edde.getEventHeader().getServerId());

                    if (edde.getEventHeader() instanceof EventHeaderV4) {
                        header.setEventLength(((EventHeaderV4) edde.getEventHeader()).getEventLength());
                        header.setNextPosition(((EventHeaderV4) edde.getEventHeader()).getNextPosition());
                        header.setFlags(((EventHeaderV4) edde.getEventHeader()).getFlags());
                    }

                    EventData data = new EventDataDeserializationExceptionData(edde);
                    return new Event(header, data);
                }
            }
        };

@artorias1024, @altmannmarcelo, please look at bde2d0f
Table map now cleared on non-fake ROTATE_EVENT


"normalizeLabelContent" should not convert all content to lower case

Is your feature request related to a problem? Please describe.
I am building a protobuf language plugin for IntelliJ platform.
And I use the commonmark-java for document comment rendering.
I need to resolve the references in document like [selector][google.api.DocumentationRule.selector].
So I create a DelegateInlineParserFactory to intercept InlineParserContext instance.
But I found the parameter label of the getLinkReferenceDefinition method has been converted to lower case by String label = Escaping.normalizeLabelContent(ref); in line 326 of InlineParserImpl.java
The google.api.documentationrule.selector is not a valid symbol, so I can't resolve it to a reference link to language element.
Describe the solution you'd like
Maybe the case ignoring should not handle in InlineParserImpl, it should pass the original label value to InlineParserContext, let InlineParserContext decide whether to ignore case.

Raised a PR for this change, have a look: https://github.com/commonmark/commonmark-java/pull/205

@robinst Thanks for your work


ArduCAM OV2640 with HTML photo captured but not showed on the webpage

Hello,
I'm working with a Feather esp8266 board with ArduCAM OV2640. I basically followed this tutorial https://learning.oreilly.com/library/view/esp8266-robotics-projects/9781788474610/e82e4482-aea4-4f98-b066-bd3487510ff5.xhtml. I got the ArduCAM connected to the websocket, but after I clicked capture, though the serial monitor prints "CAM send Done", the photo doesn't show on the HTML.
Thank you!

@yueningbai
Thi is not our project. I advise you use our demo here https://github.com/ArduCAM/ArduCAM_ESP8266_UNO
We have a video operation here https://youtu.be/n1dDGNpbxGM


Text  style textDecorationLine not support on android

Text  style textDecorationLine not support on android

This is being addressed in https://github.com/facebook/react-native/pull/3819. Thanks!


Add Ripple effect to Buttons for playing the Game

In the overall effort to style the website more to Material Design we should add a Ripple effect when clicking on a Tile in the Game.
Affected components:

Tile:

Add Ripple component as documented here: https://jamesmfriedman.github.io/rmwc/ripples
Maybe it has to be checked if the Tile is clickable or not and only if it is clickable it should be wrapped in a Ripple component.

App: Add CSS import: import<EMAIL_ADDRESS>
Other things to do:

Add the CSS import in Storybook
Update and verify the Tile Snapshot (yarn test -u)

This isn't as easy I thought it to be. Closing for now, the effect doesn't provide much value anyway.


[BUG] Scavenger create scanner issue

Java 8 only. Occasionally, Scavenger when trying to open segment scanner gets EOFException. Looks like some rare race condition. I have not observed this under Java 11 though. Will keep this open. Simple workaround (mitigation) is available in the corresponding patch.

This is Java 8 issue. I have never seen it in Java 11. As since support only Java 11+ - close it.


Adding wrappers for pod.babashka.buddy.sign.jwt

Started adding wrappers for pod.babashka.buddy.sign.jwt.
Before completing this, I wanted to discuss some ideas on the best way we could load the private keys which uses BouncyCastle under the hood.
For now, I have created a new sign function that takes extra opts in order to know how to load the key. Any other ideas or this is the best way to move ahead with this?

There are a few things we could do here with the custom sign API.

Support your API. Question: do you expect the three options to be sufficient or do you expect more variations in the future?
Is this Key object in any way serializable, e.g. as a map or vector with bytes or so? Then we could define a transit handler back and forth for it. (I can help with this)
If not 2, then we can still wrap sign and the buddy.core.keys functions like this: In the wrapper, we accept an argument, define the key object in some atom under an id and send back then id to the pod client. When invoking sign, our sign wrapper looks up the key in the atom by the id and then calls buddy's sign with the key.

If 2 and 3 sound too complicated and 1 is expected to be sufficient, I'm ok with doing that.

Thanks for the detailed feedback!
I have managed to find a way to tackle it as number 2.
I have added a new function for now sign2.
With these changes, we will only need to wrap the buddy.core.keys and return encoded keys as a byte[]. That will then need to be sent with the jwt sign/unsign functions. The encoded byte[] will need to be coerced back into a key.
It seems to be working with the RCA PEM key.
I will add the other key/algo types tomorrow to make sure it works for all, this looks like a way better way to keep as close as possible with the original.

@brandonstubbs Excellent! Any reason to not expose sign2 as sign?

@borkdude that's the plan, just kept both options available until I can confirm all algos work 😄

@brandonstubbs I'm really looking forward to this one for a side project!
Since there's been no update in a while I assume you've been busy. If so I would love to help move this towards the finish line.

@Oddsor Thank you very much 😄
I have pushed the changes for where I have got up to.
At the moment there seems to be an issue with the native build and BouncyCastle SecurityProvider. Will need some time to dig into it tomorrow, or if you have any ideas!
----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available
Data:     {:type "class org.bouncycastle.openssl.PEMException"}
Location: /Users/brandonstubbs/projects/clojure/pod-babashka-buddy/test.clj:63:18

I have completed adding the wrappers.
@Oddsor Do you want to test it out and see if it works for you?
This currently will only work with GraalVM version 22.0.
GraalVM version 22.1 is throwing errors for which there is already an issue open.
Following your checks, we can mark this ready for merge.

I have completed adding the wrappers.
@Oddsor Do you want to test it out and see if it works for you?
This currently will only work with GraalVM version 22.0. GraalVM version 22.1 is throwing errors for which there is already an issue open.
Following your checks, we can mark this ready for merge.

Great work and thanks! 👏
Apologies for the delayed response; I'm selling an apartment this week so most of my non-work time goes towards that up till Thursday 🙈
However I did do a quick build of this and discovered that the exact use-case I was looking to test also depends on the jwk->private-key function from here: https://github.com/funcool/buddy-core/blob/master/src/buddy/core/keys.clj#L70
However, I think we can safely say that is outside the scope of this PR; I'll see if I can get some time in to implement the missing bits to cover my use-case 😅

@Oddsor Sorry for the delay, just got some time to work on this again - I added most of the key functions. The one that you were missing is there now

build fails  for linux-aarch64.
It just seems to hang
========================================================================================================================
GraalVM Native Image: Generating 'pod-babashka-buddy'...
========================================================================================================================
Error: Image build request failed with exit status 1
com.oracle.svm.driver.NativeImage$NativeImageError: Image build request failed with exit status 1
	at com.oracle.svm.driver.NativeImage.showError(NativeImage.java:1770)
	at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1477)
	at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1438)
	at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1425)

As I can't trigger builds I don't want to spam commits to try debug

@Oddsor Sorry for the delay, just got some time to work on this again - I added most of the key functions. The one that you were missing is there now

Wow! I gave it a try and it works for my use-case (using a jwk-key) 🎉
It took me an hour to figure out that there was some cached nonsense in my project folder that caused the pod to not work as expected 😅
But yeah, it works! Thanks for your awesome work 👏 🙏

So, good to merge now?

I am going to spin up an arm machine my side to test

It works on the machine I tested on
========================================================================================================================
GraalVM Native Image: Generating 'pod-babashka-buddy'...
========================================================================================================================
[1/7] Initializing...                                                                                (5.0s @ 0.24GB)
The URL protocol jar is not tested and might not work as expected.
Supported URL protocols enabled by default: file,resource. Supported URL protocols available on demand: http,https.
--initialize-at-build-time without arguments has been deprecated when not using --diagnostics-mode. With GraalVM 22.0.0 --initialize-at-build-time will only work with --diagnostics-mode for debugging purposes.
The reason for deprecation is that --initalize-at-build-time does not compose, i.e., a single library can make assumptions that the whole classpath can be safely initialized at build time; that assumption is often incorrect.
 Version info: 'GraalVM <IP_ADDRESS> Java 11 CE'
 1 user-provided feature(s)
  - graalvm.feature.BouncyCastleFeature
[2/7] Performing analysis...  [**********]                                                              (39.2s @ 1.40GB)
   9,894 (87.96%) of 11,248 classes reachable
  11,780 (49.06%) of 24,009 fields reachable
  43,357 (59.23%) of 73,203 methods reachable
     875 classes,   398 fields, and 1,551 methods registered for reflection
      63 classes,    71 fields, and    53 methods registered for JNI access
[3/7] Building universe...                                                                               (2.7s @ 1.63GB)
[4/7] Parsing methods...      [**]                                                                       (2.5s @ 1.89GB)
[5/7] Inlining methods...     [****]                                                                     (3.9s @ 0.98GB)
[6/7] Compiling methods...    [****]                                                                    (21.0s @ 1.08GB)
[7/7] Creating image...                                                                                (7.3s @ 1.63GB)
  19.77MB (36.29%) for code area:   30,599 compilation units
  25.67MB (47.12%) for image heap:   7,645 classes and 358,580 objects
   9.04MB (16.59%) for other data
  54.48MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 packages in code area:                               Top 10 object types in image heap:
   2.33MB clojure                                              6.01MB byte[] for general heap data
   1.37MB clojure.lang                                         4.01MB java.lang.Class
 779.63KB java.util                                            1.95MB java.lang.String
 752.80KB org.bouncycastle.math.ec.custom.sec                  1.76MB java.lang.Object[]
 669.63KB java.lang.invoke                                     1.61MB byte[] for java.lang.String
 581.02KB com.oracle.svm.core.reflect                        966.48KB clojure.lang.PersistentHashMap$BitmapIndexedNode
 575.70KB org.bouncycastle.crypto.engines                    540.89KB java.util.HashMap$Node
 557.99KB clojure.spec                                       522.94KB java.util.concurrent.ConcurrentHashMap$Node
 462.80KB com.sun.crypto.provider                            513.57KB clojure.lang.Symbol
 368.12KB sun.security.x509                                  402.09KB java.lang.String[]
      ... 315 additional packages                                 ... 3711 additional object types
                                           (use GraalVM Dashboard to see all)
------------------------------------------------------------------------------------------------------------------------
                        8.8s (10.1% of total time) in 96 GCs | Peak RSS: 3.33GB | CPU load: 5.72
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
 /home/ubuntu/pod-babashka-buddy/pod-babashka-buddy (executable)
 /home/ubuntu/pod-babashka-buddy/pod-babashka-buddy.build_artifacts.txt
========================================================================================================================

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy

$ uname -a
Linux ip-10-0-101-87 5.15.0-1009-aws #11-Ubuntu SMP Thu May 26 19:39:49 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

$ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu<IP_ADDRESS>)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu<IP_ADDRESS>, mixed mode)

Strange!

Does upgrading to CI GraalVM 22.1.0 help maybe?

Unfortunately no, it is blocked by this issue adding the BouncyCastle Feature it appears in that version. I will ping them on slack and see if anyone has any pointers

OK, I'd say we want on that then

@brandonstubbs Looks good. So what was the solution since last time?

I'd appreciate if you didn't force-push, then it's easier to see the diffs.

@borkdude
Updated to GraalVM 22.1.0, but that wasn't the issue. It seemed that on aarch-64 the build were hitting a deadlock - I updated all build images and tooling to the latest and it seemed to solve the issue.

@brandonstubbs Thanks. I'll make a new release, probably on Wednesday.


Carpet doesn't hide wires if there's plating (but no tile) underneath.

Description
How to reproduce:

Spawn a carpet in a maint tunnel, or another place that uses tile-less floors.
Put wires underneath it.
The wires will show up on top of the carpet.

Screenshots

Additional context

Fixed in #5130.