unable to return error with embedded hal i2c example

Hi, when i try to replicate the example code for i2c sensor in i2c.rs i have a warning from the compiler:
unused import: Error
I can communicate with my sensor (an accelerometer), but when i try to generate an error, for example by detatching the sensor from the board, the code crashes an i'm unable to return an error. I'm using an stm32f401
use embedded_hal::i2c::{I2c, Error};
const ADDR: u8 = 0x15;
pub struct TemperatureSensorDriver {
i2c: I2C,
}
impl<I2C: I2c> TemperatureSensorDriver {
pub fn new(i2c: I2C) -> Self {
Self { i2c }
}
pub fn read_temperature(&mut self) -> Result<u8, I2C::Error> {
    let mut temp = [0];
    self.i2c.write_read(ADDR, &[TEMP_REGISTER], &mut temp)?;
    Ok(temp[0])
}

}

it seems it's a problem of stm32f4xxhal


Draw flipped bitmap if scaleX or scaleY is negative

I wanted to be able to pass { scaleX: -1 } (and similar) to the GraphicsContext.prototype.drawBitmap() function so I could draw flipped bitmaps without including additional pre-flipped images.
To do this, I updated the C implementation of this function to handle negative integers for the scaleX and scaleY members of the options argument. The scale_x and scale_y values were changed from uint8_t to int8_t to support the negative values and the gc_draw_bitmap function was updated to call into a new gc_draw_bitmap_helper helper function for the actual pixel filling. At first I wasn't going to create a helper function but there was enough duplicated code that I felt it warranted a separate function implementation.
I was able to test this on an RP2040 board with a 1-bit screen (SSD1306 over I2C) but unfortunately I don't have any higher resolution set-ups available.

Thanks for your contribution 👍. What about adding options (flipX: boolean, flipY: boolean) instead of using negative values for scaleX and scaleY?.

@niklauslee Good suggestion. I added flipX and flipY as booleans instead. Let me know if there's anything else I can address or if you find anything in further testing.

Perfect! Thank you for your contribution 👍


console_bridge undefined x86_64 symbol

Installing matlab_rosbag for use in MATLAB R2017a with ROS Kinetic and MacOS High Sierra (10.13).
When running bash mex_compile.sh, I get a linking error about the log_deprecated symbol not being found.

The problem is that log_deprecated was removed from the console_bridge code here.
To fix this, build and install console_bridge at this specific commit: https://github.com/ros/console_bridge/commits/c227ae01ce16d73facb477644d9c25a5ddb166fa


Clarify contributing pipeline and update to new YAML metadata files

@J535D165 Because I wanted to eliminate as many '"' as possible in the yaml files. You don't think that's a good move?

Thanks :)


chore(release): prepare for 0.26.3

🧀

Uhh, no idea tbh

LGTM.
Why are the tests failing though?

Fixed in #1117


Add significant indentation as apply block

These two statements become equivalent:
if x == 10 { a = 10; a += 1 }
if x == 10
  a = 10
  a += 1

Fixed by this commit


Open linked files with (system default) external application

Does this feature exist in Emacs orgmode core?
Yes
Orgmode link
https://orgmode.org/manual/Handling-Links.html#index-C_002dc-C_002
see org-open-at-point
Feature value
It would be good to open (by default with <Leader>oo) linked files (like [[file:/home/maltimore/interesting_file.png]] with their corresponding application.
I think for now we should just default to opening with the system default programs. I think on linux and macos you can just use open (might work on windows as well). So in the case above we'd just have to call open /home/maltimore/interesting_file.png.
Additional context
No response

Sorry, mis-clicked. Regarding open: this doesn't do what you want it to do, at least on my Ubuntu machine. Any chance you are talking about xdg-open? I think we could set that as default and have an option to configure it in case you want different program to handle the opening

Weirdly, open works on my KDE-neon (which is 99% ubuntu), and I seem to remember that debian at some point in the recent past  decided to use open as well. Maybe I'm misremembering, but it doesn't matter anyways because xdg-open works for me as well, so we should just use that :)
Yes, making it configurable is sort of the extended goal I'd say. I'm sure there is a use case where you want your default program to open a certain filetype to be A, but if you open it from within org-mode you want it to be B, but I think that's already power-user level.

Oh, I actually meant to make it configurable which binary takes care of opening the link:
link_handler = xdg-open
and then just use whatever the user has in link_handler. That use case you described is indeed quite elaborate and I'd like to avoid making things more complicated than they are

Hi, sorry for never responding. I'm going to be too tight with time for the foreseeable future to work on nvim-orgmode :(.
Regarding this issue, I just saw it's a duplicate of https://github.com/nvim-orgmode/orgmode/issues/506 so I'm closing here.


Sets don't need at() function, do they?

https://github.com/colyseus/docs/blob/master/docs/colyseus/state/schema.md#setat

Hi @CocosGames, thanks for noticing this, indeed .at() does not exist on SetSchema


Statistics for users

Added the following statistics for each User:

number of combinations they made;
number of new words they generated (i.e., added to the DB as a result of their combinations made)
rarest word found (in terms of reachability when that word was generated)

Did you also get this?
Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowError); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: ch.uzh.ifi.hase.soprafs24.entity.Combination["word1"]->ch.uzh.ifi.hase.soprafs24.entity.Word["combinations"]->org.hibernate.collection.internal.PersistentBag[0]->ch.uzh.ifi.hase.soprafs24.entity.Combination["word1"]->...

I will try again tomorrow to find out why I got this

Did you also get this?
Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowError); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: ch.uzh.ifi.hase.soprafs24.entity.Combination["word1"]->ch.uzh.ifi.hase.soprafs24.entity.Word["combinations"]->org.hibernate.collection.internal.PersistentBag[0]->ch.uzh.ifi.hase.soprafs24.entity.Combination["word1"]->...

I will try again tomorrow to find out why I got this

Huh, I didn't get this.


feat: probability filter

introduced the probability filter feature.
UI is a slider currently, as it was the most minimal effort element

the heatmap layer adds an other layer of complexity as the filtering is right now just for the point layer. We either do the same for the heatmap layer or we figure out a way to have the heatmap layer with the distinct points:)

does the slider now also works if I select more then one timestamp? :)

I will take over this feature :)


Incomplete interface for validate in NgxLinkifyOptions

The interface for validate in NgxLinkifyOptions is incomplete. https://github.com/AnthonyNahas/ngx-linkifyjs/blob/254d6d682189fc8d0787e3644d0a0119f90dcc42/src/module/interfaces/ngx-linkifyjs.interface.ts#L21
According to linkifyjs the validate attribute could be a boolean, function or an object
https://soapbox.github.io/linkifyjs/docs/options.html#validate
When I set validate to a function the linter typescript warns me I'm using the wrong type.
If I set the function as any, everything works fine. So the code accepts an function but the interface does not

I would appreciate a PR from you🍻


Test flake in quimb state_vector_test

Seen in automated checks for #3580, affecting cirq/contrib/quimb/state_vector_test.py. Error log:
=================================== FAILURES ===================================
__________________________ test_tensor_state_vector_3 __________________________

    def test_tensor_state_vector_3():
        qubits = cirq.LineQubit.range(10)
        circuit = cirq.testing.random_circuit(qubits=qubits, n_moments=10, op_density=0.8)
        psi1 = cirq.final_state_vector(circuit, dtype=np.complex128)
        psi2 = ccq.tensor_state_vector(circuit, qubits)
>       np.testing.assert_allclose(psi1, psi2, atol=1e-8)
E       AssertionError:
E       Not equal to tolerance rtol=1e-07, atol=1e-08
E
E       (shapes (512,), (1024,) mismatch)
E        x: array([-0.044194+0.106694j,  0.106694+0.044194j, -0.044194+0.106694j,  0.106694+0.044194j, -0.044194+0.106694j,  0.106694+0.044194j, -0.044194+0.106694j,  0.106694+0.044194j,  0.044194-0.106694j, -0.106694-0.044194j,  0.044194-0.106694j, -0.106694-0.044194j,  0.044194-0.106694j,
E              -0.106694-0.044194j,  0.044194-0.106694j, -0.106694-0.044194j, -0.018306+0.044194j, -0.044194-0.018306j, -0.018306+0.044194j, -0.044194-0.018306j, -0.018306+0.044194j, -0.044194-0.018306j, -0.018306+0.044194j, -0.044194-0.018306j,  0.018306-0.044194j,  0.044194+0.018306j,
E               0.018306-0.044194j,  0.044194+0.018306j,  0.018306-0.044194j,  0.044194+0.018306j,  0.018306-0.044194j,  0.044194+0.018306j,  0.044194+0.106694j,  0.106694-0.044194j,  0.044194+0.106694j,  0.106694-0.044194j,  0.044194+0.106694j,  0.106694-0.044194j,  0.044194+0.106694j,...
E        y: qarray([-0.044194+0.106694j,  0.106694+0.044194j, -0.044194+0.106694j, ...,  0.      +0.j      ,  0.      +0.j      ,  0.      +0.j      ])

cirq/contrib/quimb/state_vector_test.py:45: AssertionError

As a flake, this may take several runs to reproduce. Without the full contents of psi1 and psi2 to compare it's hard to say where the issue occurred, but it's possible that simply increasing the tolerances will fix this.

Can't repro. Closing for now, feel free to re-open if it re-appears.


Add support for cuDNN 6

cuDNN 6 is out and it would be great have support for it in dlib.
Thanks in advance

Done :)

Thank you very much, it works like a charm!


feat: register options route param

This pr add a parameter registerOptionsRequest.
If you set this true, OPTIONS route will be automatically added to handle CORS preflight requests.
I also bumped dependencies and updated README.md

This can cause non-unique route assertion failure

Neat, I never would have thought to add this. Thanks. +1


[$500] Web - "An unexpected error occurred. Please try again." when Clicking "Pay Elsewhere"

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Create a new workspace
Request money and select the newly created workspace
Delete the workspace
Click on requested money
select and click "Pay Elsewhere"

Expected Result:
The error should not appear
Actual Result:
"An unexpected error occurred. Please try again."
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: <IP_ADDRESS>
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Error-pay-elsewhere.webm

Expensify/Expensify Issue URL:
Issue reported by:  @hichamcc
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693854830712439
View all open jobs on GitHub

Hm, strange. Not sure why this auto-assigned me since @sophiepintoraetz is already assigned. Going to remove myself, but feel free to add me back if I'm missing something.

@hichamcc did this also leave you with unread notifications you can't clear?

@garrettmknight No

Looks like this is ready for payment, @allroundexperts can you fill out the checklist above please?

@dukenv0307 and @hichamcc - can you please apply for the job here? Thank you!

@sophiepintoraetz  done

all right, Payouts due:
Issue Reporter: $50 (done)
Contributor: $750 @@duken0307 - offer sent
Contributor+: $750 @allroundexperts - raise a ND request once the checklist is done!
Eligible for 50% #urgency bonus? Y

@dukenv0307 - can you please accept the offer?

Paid.

$750 payment for @allroundexperts approved based on BZ summary.


Login account

Hi how can I login an account to download paid stories?

i think its gonna be really complicated to do.

You can try to store your login cookies in settings for each source, either manually or via the popup window and clicking save cookies. I cant gurantee that it works because i don't have accesse to accounts with unlocked stories to test with.

Thank you. I already downloaded the unlock chapters that I need thru your program.


Handle Broadcast events

Jira issue:
https://glia.atlassian.net/browse/MOB-2389
Show Toast message — “This action is not currently supported on mobile'.

Project plan says:
On the GVA side, there is a feature flag to show/hide this type of button, and it is and should always be off. So this kind of buttons shouldn’t appear on mobile GVA. But to make sure that in case if they sneak into a mobile GVA, will not break the SDK, it should be rendered, but will show an error message to the user (“This feature is not supported on mobile”) and log an error (level = info) when clicked.
I guess you also need to add logging.

Project plan says: On the GVA side, there is a feature flag to show/hide this type of button, and it is and should always be off. So this kind of buttons shouldn’t appear on mobile GVA. But to make sure that in case if they sneak into a mobile GVA, will not break the SDK, it should be rendered, but will show an error message to the user (“This feature is not supported on mobile”) and log an error (level = info) when clicked.
I guess you also need to add logging.

Good point. I will remove the logging part from the project plan.
When we started working on the project, there was an idea to just silently log the error when this type of button is clicked.
But with Aksel, we figured out that this could confuse visitors, so we decided to replace the log with a toast message. I think there is no benefit to logging.

!squash


Azure HCIBox - After logon script runs on HCIBox-Client I don't see the hosts in ARC Machines

Is your issue related to a Jumpstart scenario, ArcBox, HCIBox, or Agora?

    HCIBox

    https://arcjumpstart.com/azure_jumpstart_hcibox/cloud_deployment

Describe the issue or the bug

      Using the Azure CLI Deployment instructions and Bicep template. All resources deploy correctly.   I log into the HCIBox-Client and the logon script runs and completes.  The next step in the instructions state:

    In Azure portal, validate that both HCI nodes have been created as Arc-enabled servers.

    I don't see the nodes in Arc - Machines as shown in the accompanying photo.

To Reproduce

    According to the instructions, the nodes AzSHOST1 and AzHOST2 should be registered as ARC machines.  They aren't.

Environment summary

      az 2.57.0

Have you looked at the Troubleshooting and Logs section?

      Yes.  I see nothing related to ARC.

Screenshots

Additional context

This is because of the 2402 release changing the New-HciAdObjectsPreCreation command. I am working on a fix right now which should be available early next week.


Remove redundant "What is Druid" section from Readme.

Coverage remained the same at 71.139% when pulling 5430ffe8b758ad48a1a85b4b81159213d2f3c0f5 on lotyrin:patch-1 into bd9051a16818d77dfe896884b6b337d981774731 on airbnb:master.

Thanks for the PR but it's already fixed!


Shopify Theme

Hi,
I'm new here and i need a shopify code file for a and this a E-com store that i need to to build.
so, here anyone who guide me what i need to do,
Thanks.

Hi!
The project has just started. Alas, there is no ready-made solution yet. It is for such tasks that I decided to create it. But I need some time and I'll be happy to help you later!


Fix link to pymupdf.readthedocs.io

Previously, it was being treated as a relative link.

Thanks!


set future course for network policy engine + conformance (formerly: Cyclonus)

Follow up on https://github.com/kubernetes-sigs/network-policy-api/issues/34 -- what is the future of this network policy tool?
I suggest considering:

[ ] rename to something appropriate for kubernetes-sigs (positive side effect: disambiguates from my personal project)
[ ] define goals

[ ] engine

[ ] features

[ ] ANP
[ ] BANP

[ ] applications

[ ] understand use cases -- CI, end user, https://github.com/kubernetes-sigs/network-policy-api/issues/46

[ ] conformance suite

[ ] ANP
[ ] BANP

[ ] builds, distros, devex

[ ] binaries
[ ] images
[ ] kubectl plugin
[ ] yaml for k8s deploys

Note: this is just off the top of my head, I'm sure there are more things to consider.

@astoycos feel free to close if this isn't useful, I see problems like: build scripts in this repo point to my personal repos, and want to figure out how I can help the community to tackle them!

/assign

@mattfenwick @astoycos happy to file some issues against this.
For Build/Distribution related items, would we want to publish to registry.k8s.io? Or just under releases on our repo?

/assign @olivercodes
thanks that would be great!

For Build/Distribution related items, would we want to publish to registry.k8s.io? Or just under releases on our repo?

Let's talk about this in today's meeting

Confirmed in 12/5 meeting, we'll use GHCR. No binaries for now, may change in future if need/convenience for someone is there.

@mattfenwick @astoycos
Engine one created here - https://github.com/kubernetes-sigs/network-policy-api/issues/69
Can probably track "add conformance suite" with the original conformance tests issue? - https://github.com/kubernetes-sigs/network-policy-api/issues/35
Kubectl Plugin

I don't think we've really discussed the lifecycle/usage of the kubectl plugin yet (and admittedly I'm not as familiar with it yet, other than what Matt showed me). Probably a good topic for next meeting.

Rename the tool

Probably want to decide on that before someone tackles https://github.com/kubernetes-sigs/network-policy-api/issues/68
Any ideas for name @mattfenwick ?


Add test for subsecond ISO 8601 timestamp

see https://github.com/rakudo/rakudo/pull/638 and RT 126948

The change has been merged now I think


WIP on customizing contributors step of deposit workflow for instruments

I'd like to do more work on this if I have time, but I'm pushing up what I have currently in case I don't.
In terms of UI behavior, I think that this is correct/complete based on what we've discussed, and it should at least convey the gist of how I think that this should work. At the very least, it needs some additional unit tests for some of the new code as it's currently written. Those are missing because I'm not quite settled on the design of the new form objects that I've introduced.
There were a handful of failing tests in the base branch when I started, and those that were directly related to the new instruments pathway are fixed now, but there are a few tests that use VCR that are still failing for me. I'm not sure why they were failing to begin with since they don't seem related to this work, and I haven't looked into it.
In terms of the overall design, I'm also not yet quite happy with how we're handling data validations in general. Right now we have a mixture of validations on the form objects that validate data in the context of the deposit UI steps, and also validations on the ActiveRecord model that validate data in other contexts such as depositing works via the API. This has the effect of layering validations on top of other validations that are sometimes redundant, and it forces us to incorporate conditional logic in some of the validations. Some validations are common/shared, but they're all context-specific to some extent. In the long run, I think that it might be better to remove most or all of the validation logic from the WorkVersion ActiveRecord model and validate input from the API using another, separate form/model object that may share some validation logic with the existing UI forms. However, that's a larger refactoring that doesn't specifically have to do with this new deposit pathway.

Thanks, @ajkiessl. I likely won't have time to finish, but I'm hoping that I can at least push up a little bit more work on it while it's still fresh in my mind.


Fix/amqp connection

@jaime-amesti-frontiers  I took your commit and open a new PR from a new branch as you used the master branch so I cannot add commits on it.
This will fix #19 by providing individual properties for each connection properties.

@jaime-amesti-frontiers thanks for your contribution, this is now merged. The new version of the plugin will allow configuring the AMQP production with multiple properties solivng the issue.

Thank you very much @loicmathieu .

@jaime-amesti-frontiers I trigger a new build of Kestra, if you use our develop or develop-full docker images you can try it.

I've just tested it, and it works fine. The only thing I saw is the documentation does not reflect your latest changes, probably because it displays the last release documentation, right?

@jaime-amesti-frontiers great to know it works!
The documentation is cached in the browser (for one day I think) so it will reflect the latest change later.

if you want to force the destiny :


Markdown Editor

The /<lockAddress>/write lets the owner of a lock write content as markdown and save it to IPFS.
We need a simple markdown editor to let the user easily type their posts.
Ideally we support a preview so that the author can make sure that their content looks as expected (one of the challenges of publishing on IPFS is that there is no edit possible).

https://github.com/unlock-protocol/locked.fyi/pull/9

Thanks @KadenZipfel


Use classic bluetoth with flutter in android studio

I am creating an application for Android/Ios on Flutter in Android studio. This application has to get serial data from a classic bluetoth device.
I am new to Flutter. I have found a package: 'flutter_blue' that allows to scan and connect to BLE device. I tried it and it only perform BLE scan and does'nt detect classic Bluetooth devices. I'd like to find a similar package for Bluetooth classic.
Is there any package on https://pub.dartlang.org/flutter that would allow me to do that ? Or lower level function to scan,connect and get the stream of my device?

After asking the same thing on stack overflow: https://stackoverflow.com/questions/53005941/use-classic-bluetooth-on-flutter it seems, that it is not possible to desing application with flutter that use classic bluetooth on iOS.

Yes on iOS Classic Bluetooth is very limited, you pretty much need to use BLE.
On Android you can do either. I don't know of any packages for Classic Bluetooth, but you can write the platform implementations with Platform Channels.
https://flutter.io/platform-channels/

So... it looks like there a few ble packages in https://pub.dev/flutter/packages?q=ble
Would any of it solve your issue? Maybe opening an issue in some of the current packages would be the best approach to solve this issue.

There is this plugin, published in Aug, 19, used for a classic bluetooth serial implementation.
Besides, @ViasVegas the link you provided from stack overflow is broken. Could you retreive it please?
I intend to write a classical bluetooth app in flutter too. I'd like to know if in 2020 there is any way of developing a flutter app with bluetooth support in android and iOS (not BLE as it does no meet my requirements), and maybe in yout stack post I can find an updated answer to this question.

Is there any bluetooth api for android in flutter? In my app, I just need to get those devices and connect to them (with Android inbuilt bluetooth manager) but I don't want to handle low level stuff. I tried but I was not able to find any package

is there any one find anything on this ?

Closing as a duplicate of https://github.com/flutter/flutter/issues/53493, which has more discussion.


Introduce a pass-through transaction option setter

This allows passing through code and bytes directly to set options, bypassing the generated option types. This is handy when receiving already serialized code and data to not require mapping it to the enum and back to raw data.

Hi @behos :wave:
Thanks for opening the PR :smile:
Could you add a small, dummy test about set_raw_option? :pray:

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 9 (0.0%)  changed or added relevant lines in 1 file are covered.
17 unchanged lines in 2 files lost coverage.
Overall coverage increased (+0.08%) to 72.204%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

foundationdb/src/transaction.rs
0
9
0.0%

Files with Coverage Reduction
New Missed Lines
%

foundationdb/src/directory/mod.rs
2
93.39%

foundationdb/src/directory/directory_partition.rs
15
76.61%

Totals

Change from base Build<PHONE_NUMBER>:
0.08%

Covered Lines:
4281

Relevant Lines:
5929

💛  - Coveralls

Hi @behos wave
Thanks for opening the PR smile
Could you add a small, dummy test about set_raw_option? pray

Yes, of course! It was an oversight not adding one in the first place.
Added the test and fixed a bug that it detected :)

Hi @PierreZ , it looks like the checks are passing successfully :) Is there something else to change in this PR or should I leave it to you to merge when convenient?

Thanks for your contribution :rocket:


Integrate mapping tooling with Fuse IDE

All the nitty gritty details are provided here (under Integration Points):
https://github.com/fabric8io/data-mapper/wiki/Fuse-IDE-Integration
If there is a Fuse IDE release within the m3 window, then we should target that.  If not, look at doing this on a branch and publishing it separately for evaluation purposes.

Talked to Lars about this and we thought it would be best to arrange some time at the F2F where we could explore the extension support he has in place now and discuss what we need to support our use cases for integration.

Handle this in m4 when we move the tooling into Fuse IDE.


issue under customer with vat registered user

[x] if the customer is vat registered user is able to create sales transaction by removing trn number
steps to reproduce:

1: create a sales transaction using vat registered customer
2: then remove TRN number only
3: fill remaining fields and save

issue closed


The 'elm-make' compiler is not available.

I get this error every time I save a file, however it does build...
On Mac, OSx

I also get this if I change the "elm.makeCommand": "elm-make" setting. I wanted to have warnings ("elm.makeCommand": "elm-make --warn") and that gives me the same error you mentioned.

I also have this error, Arch Linux. I cannot build either, though.
Elm and related things such as elm-make are available in my $PATH.

In my case, using Ubuntu 16.04, I solved it by setting the path in the .bash_profile file. It seems that vscode uses it. If you set it only in your .bashrc you may see it in your path when using the terminal but vscode will miss the path and you'll get the error.

This can be fixed either by adding elm-make to $PATH or by setting elm.makeCommand

Somehow elm-format and elm-make are not visible in vscode, even though are in $PATH.
I needed specify full paths in settings:
{
    "elm.formatCommand": "/Users/user/bin/elm-format",
    "elm.makeCommand": "/usr/local/bin/elm-make"
}


Add check if value exists

Signed-off-by: Lehner Florian<EMAIL_ADDRESS>This patch adds a check if the received pointer is not nil.

Florian, do you have a stack trace you could provide?
On Mon, Oct 9, 2017 at 9:52 AM, Aslan Bakirov<EMAIL_ADDRESS>wrote:

@aslanbekirov commented on this pull request.
In pcap/pcap.go
https://github.com/google/gopacket/pull/366#discussion_r143508394:

@@ -775,6 +775,10 @@ func findalladdresses(addresses *_Ctype_struct_pcap_addr) (retval []InterfaceAdd
}

func sockaddrToIP(rsa *syscall.RawSockaddr) (IP []byte, err error) {

if unsafe.Pointer(rsa) == nil {

I a sorry why we should cast it? I did it without casting in #365
https://github.com/google/gopacket/pull/365 , worked for me and passed
the tests.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/gopacket/pull/366#discussion_r143508394, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABJ9tjf0GtMOAxrlFbhHbd0dsUJ_4bCfks5sqkEtgaJpZM4Px1XU
.

Sorry for my delayed answer.
The lines of code I used to reproduce the problem:
`package main
import (
"fmt"
"github.com/google/gopacket/pcap"
)
func main() {
devices, err := pcap.FindAllDevs()
if err != nil {
fmt.Errorf("%v\n", err)
return
}
for _, device := range devices {
	fmt.Println("\nName: ", device.Name)
	fmt.Printf("\nFlags: %x\n", device.Flags)
	for _, address := range device.Addresses {
		fmt.Println("- IP address: ", address.IP)
		fmt.Println("- Subnet mask: ", address.Netmask)
		fmt.Println("- Broadaddr mask: ", address.Broadaddr)
		fmt.Println("- P2P mask: ", address.P2P)
	}
}

}`
And the stack trace, if I run it without the casting:
`$ ./devices
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4ff416]
goroutine 1 [running]:
github.com/google/gopacket/pcap.sockaddrToIP(0x0, 0xc4210d46d8, 0x4, 0x4, 0x0, 0x0)
/home/flo/go/src/github.com/google/gopacket/pcap/pcap.go:778 +0x26
github.com/google/gopacket/pcap.findalladdresses(0x134e770, 0x0, 0x0, 0xc420012700)
/home/flo/go/src/github.com/google/gopacket/pcap/pcap.go:769 +0x1f9
github.com/google/gopacket/pcap.FindAllDevs(0xc420012700, 0xd, 0xd, 0x0, 0x0)
/home/flo/go/src/github.com/google/gopacket/pcap/pcap.go:734 +0x231
main.main()
/home/flo/devices.go:9 +0x55
`

can you please also past code of github.com/google/gopacket/pcap.sockaddrToIP that used for this example?

The trace was generated with if rsa == nil {.

I run exact same code with only change if rsa == nil  in github.com/google/gopacket/pcap.sockaddrToIP and it worked for me. that is interesting. wonder why.


Responses are not displayed in network tab

Used both Edge and Firefox for my project with Mercure.

Having the same problem, is there any solution ?

EventSource does not support custom headers. event-source-polyfill is implemented with fetch/XMR. It can support custom headers, but the browser tab cannot be displayed correctly.
At present, we can only accept this imperfection.

Event does not show up in the Chrome EventStream subtab inside the Network tab when viewing the eventstream connection
Setting headers for EventSource


Update README.md

Updating an incorrect link.
What does this PR do?

Motivation

Additional Notes

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have changelog/ and integration/ labels attached

Pushed the fix


New example data set

We like to add a small demo data set for course training purposes. From our recent paper in Indian skin microbiome. Having this as part of the package is a better solution for fast demo examples than having it in the microbiomeDataSets. We know the data well and it is good for demonstrating certain methods.

Closed via #248

@Renuka-3 I forgot this:

update the NEWS file

Added.


feat: 🎸 sm and lg sizing for radio and checkbox

Should I be trying to merge to main, alpha or beta?

Inspiration: https://design-system.service.gov.uk/components/checkboxes/

👋 Thanks for creating a pull request! 🚀 Checkout the storybook we created for it here.

We always merge into main and then do releases from there.
I think some margins have to be adjusted in the large and possibly medium sizes. Otherwise looks good 👍🏻
What do you think @hjalmers ?

Yeah it looks like the alignment of the checkmark inside the checkbox needs some tweaking and also the checkmark transition/animation is a bit quirky: https://sebgroup.github.io/green/pr-271/chlorophyll/?path=/story/components-form-concepts-sizing--page
I've never seen any SEB app use different sizes of checkboxes and radio buttons, is it something that we want to support? From an accessibility perspective I guess it might be good to provide a bigger version but then again, everything should be bigger  and most likely the user should use zoom instead. If the interface is zoomed these large versions including the large radio button and checkbox will become gigantic compared to everything else on the page. Personally I think we should avoid using different sizes, so far I've only seen them being used for sign up forms etc in standalone settings.

Thanks for the feedback! The largest one is indeed a bit wonky, will have another look at it. I'll also switch to main and adjust any discrepencies but before that maybe we can see if actually having bigger or smaller checkboxes and radio makes sense in the first place. @hjalmers raises some very good points. Honestly I like the idea of even regular sized checkboxes and radios being bigger (maybe the same height as a button).
Initially the idea for this PR came after playing around with the sizing part of the docs and I wanted to see what would happen if I add the size-lg to a checkbox input element.

@mario-subo are you still working on this or can we close it? I haven't seen this designed in Green so not sure that we need it?

Yeah we can close it. I don't think we need it.


Inconsistent --version output

> delivery --version
delivery 0.0.15 (454c3f37819ed508a49c971f38e42267ce8a47de)
> delivery api --version
delivery-api

@stevendanna I think the reason why this is happening is just because we use clap under the hoods to manage our commands and it has the awesome option to version your sub-commands (like delivery api) but we are not using it.... I guess it might be confusing for customers though!

You can use AppSettings::GlobalVersion to just use the version of the main command for all subcommands or AppSettings::VersionlessSubcommands to remove the --version from subcommands entirely

I'm starting to work on this. 👍


The default value of defineModel is not ssr friendly

Vue version
3.4.18
Link to minimal reproduction
https://play.vuejs.org/#__SSR__eNqNUttu1DAQ/RVjIQWkTdxleUBRWhVQJUDcBEi8+KFpMrtxiS+yJ7tbRfl3Jk67pAtUffNczpwzZ9zz185l2w54zotQeeWQBcDOnUmjtLMeWc9qWCsDn2wNLRvY2lvNEoIk0khTWROQ6bBhp/O+ZxFVdi3mLHkHbWvZT+vb+knChud3qJ2qsTnCJTGZLCbaacCLk5OIKsSkkLRRgKBdWyJQxFjRLFke8KaFU8l7pku/UeYjrAl9+bSPMwe3v2SD5Gc91UnvMBSiWU5oZVyHbJvqUQNNiADJGd64caDp9BV4igW1F2LGzBd8sinVpcuugzVkZD/OlLeFIHnOYmbMkW1jLHmD6EIuRFUbghGr2vrMAArjtDinNuE7g0pDWlt9vspeZstXolYB5/kMgk6vvN0F8DRF8sWMR1ByCz71YGrwo/zH8R7B7nEf1f7iH+kHaQayBQMdea02R6ZUVjvVgv/iUNEnuGdOSd9k9yHm0HdwWKZqoPr1j/x12E9LffUQlc0MQPoBgFP54vtn2NP7UKQzd+3tIf5T/AbBtt2ocWp705maZM/6otr38cbKbH6Eiz2CCXdLjUKjG7E/HuTtA6v/kbvKVgcXh9+1OzmA
Steps to reproduce
You can get this error just using defineModel inside any component and using its default value.
Both if it is used inside a tag style or you just print it as plain text, you will get a hydration error.
Ssr must be enabled
What is expected?
The default value should be also set server side
What is actually happening?
The default value is not set server side
System Info
No response
Any additional comments?
No response

Looks like a duplicate of #10209。


Test fails CI due to 404

One of our tests fails due to the kagle notebook api call
path = PosixPath('/home/runner/work/soorgeon/soorgeon/tests/../_kaggle/intro-to-time-series-forecasting')
    @pytest.mark.parametrize('path', path_to_nbs, ids=list(index))
    def test_notebooks(tmp_empty, path):
        name = Path(path).name
        download_fn = index[name]['partial']
>       download_fn()
/home/runner/work/soorgeon/soorgeon/tests/test_sample_notebooks.py:[23](https://github.com/ploomber/soorgeon/runs/6747373533?check_suite_focus=true#step:7:24):

if not 200 <= r.status <= 299:
>           raise ApiException(http_resp=r)
E           kaggle.rest.ApiException: (401)
E           Reason: Unauthorized```

This error is intermittent; I've seen it fails only sometimes. probably because the Kaggle API isn't very reliable. I'll open an issue to follow-up on this


Example of "embedded signing" redirects to an external URL but shouldn't

The official docusign documentation here says that embedded signing does NOT redirect the signer to an external url.

The first example in this demo app description is called "Embedded Signing Ceremony":

AFAIC that demo does redirect the signer to an external URL but it shouldn't.
Could someone point me to an example where the signer is NOT redirected to an external URL?
Or maybe I'm using this demo app incorrectly or I'm misreading something?
Embedded signing demo redirects to an external URL where the documentation suggest it wouldn't:

hoto, the confusion is that you can do it in an iframe, without redirecting, or you can redirect. The two options are available to you. This shows how to redirect, but the iframe option is also available to you.

While an iFrame can be used for embedded signing it isn't recommended:

ID Verification feature doesn't work in an iFrame
Using an iFrame tempts the developer to add additional "chrome" above or adjacent to the signing ceremony. That does not work well when a mobile is used with the signing ceremony.
In the year 2020, there is no need to use an iFrame to maintain application state.


Gci 1451 create chprd records

Implements saving of MID order details to CHPRD ORDERHEADER and ORDERDETAIL tables.

Would it be possible to extend something like MissingImageDeliveriesControllerIntegrationTest to verify the database contents that result from handling the request?


Change suggestions

Hey, I'm doing a set of changes to this plugin. I can extend your base classes in my own app or I can PR some of these to you:

Internationalize app (gettext);
Add setting to section container to include prev/next links;
Add setting to section container to include menu;
Add plugin that renders menu (allows placing menu in separate placeholder independently);
Break section-container.html into partials to override less;
Provide to template all sections, not just the ones in menu (otherwise sections.0.section_menu_slug may not work as expected);
Better default HTML5 tags (i.e., <main> instead of <div> for main content and <article> instead of <section> for section content?

What do you think?

+1!

How can I have a field in a plugin that allows me to choose from another plugin in the current page?
I want to have a "Sections Menu Plugin" that allows me to select a container plugin from the current page. Is there a better way to render the menu separately?

I've chosen the approach used by the Alias plugin, where you create a menu plugin from the contextual menu of a sections container plugin in structure mode. It's working now :)

What's the subordinate_page for in SectionContainerPluginModel?

That option allows you to treat "subordinate pages" (i.e., not the front page) differently. When I started this project, it was for a project that was supposed to be a single page, but then, over time, it because multiple pages, and I needed a way to tell this app to treat non-front pages differently is all.

Ok, since nothing in the app used it I removed it. Maybe it can go into an extension if it's needed? SectionContainerPlugin was using CMSPlugin as model, but I changed it to SectionContainerPluginModel so I could target these plugin types (with isinstance).


Remove implict dependency on //envoy/common:base_includes

Risk Level: Low
Testing: Unit Tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

@yanavlasov looks like there are legitimate build failures in CI.

kicked ci for network transients hopefully fixed by #28876


Update Roadmap

Update the roadmap to provide more direction for collaborators and potential collaborators.

This is amazing!

This is amazing!


docs: fix bullet lists

Fixes https://github.com/envoyproxy/envoy/issues/17312

Also fix the logo which I think broke with the sphinx upgrade.

@phlax updated. When dependebot opens the PR to upgrade we can deal with it then.

follow up issue is here #17364


sticky-discussion-sidebar feature broken

The .discussion-sidebar class doesn't exist anymore, will need to use #partial-discussion-sidebar to target the sidebar element instead.

This was changed last week, did they change class again? 🤔

That class existed on the element with the id mentioned above, but we always used the class to target the sidebar since the feature was originally introduced. It doesn't exist anymore on the page.
I think they're dropping classes for all the elements that already have an id. If that's the case, we should expect some more broken features.

Hi.
Actually, it looks like they made our job easier with this clean-up.
I will address this issue now.


[usb,sival] Various improvements and fixes

The main purpose of this PR is to fix the test harness that I broke by mistake in https://github.com/lowRISC/opentitan/commit/52714dcdce25352e48537c8dc7c9063ee7b261fc
The issue is that in certain test, the harness is needed to enable VBUS sensing but no USB device will actually appear on the bus so the harness must not wait for it. I took this opportunity to do some further cleanup/improvements.
The reason this failure was not caught by CI is that certain tests do not require the harness on the CW310 so it was not used and therefore the CI didn't break. This PR changes that to run the harness (even when almost useless) even on the CW310.

I can reproduce your timing for the stream and mixed test but the iso test on crius seems to take significantly longer (40s), in particular it takes quite longer for the host to receive all the data. It  seems very consistent though so I think we should be fine.


fix: make public via settings with proper groups

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


How to convert the coordinates from mixamo to normal 2d pose coordinates?

Hi, can tell me the pipeline for getting 2d pose coordinates from files from mixamo? I run your code (https://github.com/ChrisWu1997/2D-Motion-Retargeting/blob/7eaae7e87e927d279ad91e703b6e8f8b4d482f64/dataset/fbx2joints3d.py#L89), but found some problems with bpy 2.9.

We used blender 2.79/2.80, so maybe you encountered a version problem.
The pipeline for getting 2d pose coordinates is simply to 1) extract global 3d coordinates from the character(the function you referenced) 2)  project 3d coordinates into 2d by orthogonal projection (https://github.com/ChrisWu1997/2D-Motion-Retargeting/blob/7eaae7e87e927d279ad91e703b6e8f8b4d482f64/functional/motion.py#L8)

Thanks for your quick reply. My question is why we should extract the global 3D coordinates like the function I referenced before. I am confused with it. Could you give me more information?

I see. I guess your confusion is mainly about this line, right? https://github.com/ChrisWu1997/2D-Motion-Retargeting/blob/7eaae7e87e927d279ad91e703b6e8f8b4d482f64/dataset/fbx2joints3d.py#L104
The rationale behind is that the posebone structure in blender only records each bone's local transformation against its parent bone. So in order to extract the global 3D coordinates, we need to do some calculation by the local transformation matrix(posebones[name].matrix) and the global transformation of the armature itself (armature.matrix_world). See the answer here.

OK, why do we need *vector((0,0,0))?

The last item is local displacement of each bone, which can be queried by posebones[name].location. Here each bone is tightly connected to its parent, so this item is always (0, 0, 0).

Due to the version incompatibility of 2.9 and 2.8 etc, the code with
"armature.matrix_world * posebones[name].matrix * Vector((0, 0, 0))"
cause error"  Element-wise multiplication: not supported between 'Matrix' and 'Vector' types", if with code like "armature.matrix_world * posebones[name].matrix @ Vector((0, 0, 0))", then the ouptut becomes zero, which is weird.

What about using armature.matrix_world @ posebones[name].matrix @ posebones[name].location? Does this work?

Yes, it works.  I have to check if the output is correct later.

Hi, I test the code, but find some 2d coordinates are negative. By the way, could explain the code below and why do we need subtracting centers and adding velocities?
def trans_motion2d(motion2d):
    # subtract centers to local coordinates
    centers = motion2d[8, :, :]
    motion_proj = motion2d - centers

    # adding velocity
    velocity = np.c_[np.zeros((2, 1)), centers[:, 1:] - centers[:, :-1]].reshape(1, 2, -1)
    motion_proj = np.r_[motion_proj[:8], motion_proj[9:], velocity]

    return motion_proj

Subtracting the center point is to normalize the data so that poses in each frame are now local. In other words, subtracting the center point gives the local motion representation. This is beneficial because same poses performed in different global position will now have the same representation (i.e. their arrays will become identical). The negative 2d coordinates come from here.
However, subtracting the center point will lost the information for the global position. So we additionally include the global velocity to retain the global information. The final representation becomes local motion + global velocity.

Hi. How do we rescale the pose coordinates from this negative range to the range 0, image_size? I need to pass the value to motion2video function in order to generate skeleton images. Thanks

Hi. How do we rescale the pose coordinates from this negative range to the range 0, image_size? I need to pass the value to motion2video function in order to generate skeleton images. Thanks

The function trans_motion_inv should be able to convert normalized motion back to original scale.

Just to clarify, am I supposed to pass the initial 3D points that I get from fbx (which in range roughly -1 to 1) to the trans_motion_inv function? Cz I never explicitly normalize the motion anywhere. I was trying to pass the 3d joints generated through fbx to the trans_motion function as suggested above in this thread

Just to clarify, am I supposed to pass the initial 3D points that I get from fbx (which in range roughly -1 to 1) to the trans_motion_inv function?

No, I mean that you can use trans_motoin_inv to restore the motion if trans_motion3d is applied before. So you can apply trans_motion3d and trans_motoin_inv consecutively to the initial 3D points that I get from fbx.

I was trying to pass the 3d joints generated through fbx to the trans_motion function as suggested above in this thread

I think another simple solution for you is to remove this line in the trans_motion3d function: https://github.com/ChrisWu1997/2D-Motion-Retargeting/blob/7eaae7e87e927d279ad91e703b6e8f8b4d482f64/functional/motion.py#L24 because trans_motion2d would do some normalizations. Then trans_motion3d only does a 3d to 2d projection, and you can apply it to the initial 3D points that I get from fbx. But note that the result may not lie in the center of the image.

Gotcha!
That worked perfectly. Thank you very much.


Azure AD PowerShell cmdlets for the ForceTakeover option not implemented

In the external admin takeover section, the powershell command "confirm-mgdomain" is mentioned as being able to accept the flag "ForceTakeover" option. This flag is available in the MSOL variant of the cmdlet but not the MSGraph variant?

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

ID: cd934d58-08f8-a3ca-2686-0006b0b8f74a
Version Independent ID: 84d9cab3-09b7-95ba-83ea-435ca0ccbb47
Content: Admin takeover of an unmanaged directory - Microsoft Entra
Content Source: articles/active-directory/enterprise-users/domains-admin-takeover.md
Service: active-directory
Sub-service: enterprise-users
GitHub Login: @barclayn
Microsoft Alias: barclayn

@robertb211
Thanks for your feedback! We will investigate and update as appropriate.

Hi @robertb211
The Confirm-MgDomain cmdlet is part of the AzureAD PowerShell module, which is used to manage Azure AD using the Microsoft Graph API. However, the ForceTakeover option is not available in the Confirm-MgDomain cmdlet. This option is only available in the Confirm-MsolDomain cmdlet, which is part of the MSOnline PowerShell module. So, to answer your question, the ForceTakeover option is not available in the Confirm-MgDomain cmdlet, which is part of the Microsoft Graph API.

Hi there, yes I understand that is the case, the issue I am reporting is that this page tells users to use that flag on the Graph cmdlet, screenshot below

@robertb211
Thanks for bringing this to our attention.
I'm going to assign this to the document author so they can take a look at it accordingly
@barclayn
Can you please check and add your comments on this doc update request as applicable.

@ManoharLakkoju-MSFT @barclayn Any update on this request?

@ManoharLakkoju-MSFT @barclayn This issue is still outstanding, is there an ETA to resolution?


Error trying to run test

After following setup instructions and running npm run test:
Validation Error:

  Module jest-browser should have "jest-preset.js" or "jest-preset.json" file at the root.

  Configuration Documentation:
  https://jestjs.io/docs/configuration.html

Tried:
Following on-screen instructions, adding jest-preset.js
Following jest's docs, adding jest.config.js

Thanks for giving this a shot and filing this issue! Unfortunately, I haven't had time to work on this in a while. If you're looking for a project that does the same thing and is more actively maintained, I'd recommend taking a look at this:
https://github.com/smooth-code/jest-puppeteer
That's the library recommended by the Jest docs here:
https://jestjs.io/docs/en/puppeteer

Not sure if I'm missing the point, but seems like jest-puppeteer allow to write jest tests that control puppeteer, while jest-browser just exec the tests in a browser environment instead of the default jsdom, isn't it? If so, targets are different and complementary, since jest-browser could be used for unit test or integration tests (using a real browser instead of mocks), while jest-puppeteer seems to be more focused for end-to-end tests... Am i right?

I agree with @piranna. I think there is a real need for this, but I understand if you don't have the time to work on it. Maybe people looking for repos to contribute to could work on this.

Hi all, thanks for the questions! As I understand it, jest-puppeteer does a couple of convenient things:

Provides a test environment that initializes/cleans up a Puppeteer instance instead of a JSDOM instance (similar to this example)
Provides some helpers for writing expectations in the new Puppeteer environment: https://github.com/smooth-code/jest-puppeteer/blob/master/packages/expect-puppeteer/README.md#api

My experimental repo here also provides a Puppeteer-based test environment and a set of helpers for working with it. The main differences are that the helpers look slightly different, and jest-puppeteer has had lots more time/energy/testing put into it 😄
That said, I'd welcome PRs here to improve this project, but you're also welcome to fork it and improve it that way!


planning for better handling of text & complex script languages

I've only tested Graphite briefly as it was suggested to me by a friend, and as I tried to write in Arabic some issues were apparent.
Text doesn't seem to be handled in anyway besides just rendering it? Is it just Harfbuzz shaping behind the scene (perhaps through the browser engine)? For example the unicode bidirectional algorithm (as implemented by FriBidi for example) is never applied which often browsers do apply, I don't see a way in the UI to force RTL rendering (or LTR for that matter), there doesn't appear to be a paragraph alignment, and somewhat importantly, there is no font fallback when some glyphs fail to render under some font. Below attached a showcase video, and another one of expected behavior on something like GIMP, with the example text الأسرب Graphite أفضل محرر للصور!  (Graphite ['Usrub] is the best image editor!).  Feel free to mark this as duplicate if so, a quick issues search didn't reveal much!
Screencast from 2024-06-16 21-47-06.webm
Screencast from 2024-06-16 22-06-21.webm

Thanks for reporting @Bilal2453. Graphite is very early prototype software and I would suggest an alternative like Inkscape or Krita for more mature vector or raster editing.
The current text support is using rustybuzz (a port of harfbuzz) shaping. The text editing is not very good and some necessary improvements such as font fallbacks, text spans, and alignment are tracked in issue #1105. Bi-directional text is something we haven't yet considered much but would like to keep in mind.

Hey @0HyperCube thanks for the reply.  Sounds good! I am really only reporting this here for planning purposes in case that wasn't already done.
One potential thing that may come up in the future is applying a text stroke.  Currently seems like the glyphs aren't joined in any way (similar to Inkscape), which in a vector application may make sense, but for a text application it is going to break for scripts and fonts with connected glyphs, might want to keep track of that too in the future!
I've heard about rustybuzz and was a bit skeptical considering how much work went into Harfbuzz, but seems like it is working just fine over here.
Will close for now as the bidi impl is now being tracked in the aforementioned issue.


Find cause of Navigation Panel not displaying node deletions

Description:

The navigation panel is not working well when items are moved or in some cases, simply changed. The problem can be severe enough to cause a crash. A thorough code review of the Navigation Panel code is needed to find why removing nodes is causing so many problems.

This appears to be fixed, likely as a result of PR #336 or one of the other PR's between 335 through 338. Reopen if it shows up again.


Create a bottom to execute cmd/main.py directly from the web page

Description
To use the application, we are manually running cmd/main.py in our terminal, I want to enhance this behaviour and create a bottom to execute it.

Didn't fix this issue, to fix it, I should create a localhost server, but I won't.


discord.ext.commands.errors.ExtensionFailed: Extension 'errorhandler' raised an error: RuntimeError: asyncio.run() cannot be called from a running event loop

Summary
a runtime error whenever I try to load an extension(cogs)
Reproduction Steps

create a new file where a cog will reside.
create a class, inheriting commands.Cog, write constructor(__init__)
in the main file, load the cog with Bot().load_extension(...) method.

Code
# in the main file
from discord.ext import commands

from discord.ext.commands import Context

from dotenv import load_dotenv
from os import getenv

load_dotenv()
PREFIX="->"
TOKEN=getenv("TOKEN")

bot = commands.Bot("->", self_bot=True)

@bot.event
async def on_ready():
    print(f"logged in as {bot.user}")
    await bot.load_extension("errorhandler") # the file where a cog resides

# ...other methods

bot.run(TOKEN)
# in "errorhandler.py", where the cog resides

class ErrorHandler(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
    # ...methods...

async def setup(bot):
    await bot.add_cog(ErrorHandler(bot))

Expected Results
Bot().load_extension(...) should load the specified file and do what it is supposed to do. Which is to handle errors in my case.
Actual Results
I was greeted by the error below:
Traceback (most recent call last):
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\ext\commands\bot.py", line 777, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\codin\code\selfbot\errorhandler.py", line 4, in <module>
    from main import bot_reply
  File "C:\Users\codin\code\selfbot\main.py", line 55, in <module>
    bot.run(TOKEN)
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\client.py", line 938, in run
    asyncio.run(runner())
  File "C:\Users\codin\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 186, in run
    raise RuntimeError(
RuntimeError: asyncio.run() cannot be called from a running event loop

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\client.py", line 507, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\codin\code\selfbot\main.py", line 20, in on_ready
    await bot.load_extension("errorhandler")
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\ext\commands\bot.py", line 855, in load_extension
    await self._load_from_module_spec(spec, name)
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\ext\commands\bot.py", line 780, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'errorhandler' raised an error: RuntimeError: asyncio.run() cannot be called from a running event loop
2023-09-10 01:17:31 ERROR    discord.client Ignoring exception in on_ready
Traceback (most recent call last):
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\ext\commands\bot.py", line 777, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\codin\code\selfbot\errorhandler.py", line 4, in <module>
    from main import bot_reply
  File "C:\Users\codin\code\selfbot\main.py", line 55, in <module>
    bot.run(TOKEN)
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\client.py", line 938, in run
    asyncio.run(runner())
  File "C:\Users\codin\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 186, in run
    raise RuntimeError(
RuntimeError: asyncio.run() cannot be called from a running event loop

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\client.py", line 507, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\codin\code\selfbot\main.py", line 20, in on_ready
    await bot.load_extension("errorhandler")
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\ext\commands\bot.py", line 855, in load_extension
    await self._load_from_module_spec(spec, name)
  File "C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\ext\commands\bot.py", line 780, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'errorhandler' raised an error: RuntimeError: asyncio.run() cannot be called from a running event loop
C:\Users\codin\code\selfbot\.venv\Lib\site-packages\discord\client.py:512: RuntimeWarning: coroutine 'Client.run.<locals>.runner' was never awaited
  await self.on_error(event_name, *args, **kwargs)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

System Information

Python v3.11.4-final
discord.py-self v2.0.0-final
aiohttp v3.7.4.post0
system info: Windows 10 10.0.22621

Checklist

[X] I have searched the open issues for duplicates.
[X] I have shared the entire traceback.
[X] I am using a user token (and it isn't visible in the code).

Additional Information
No response

I have found a workaround:
1. install nest_asyncio
2. call `nest_asyncio.apply() in the main file`

# ...other imports
import nest_asyncio

nest_asyncio.apply()
# ...symbols ans whatnot

bot = commands.Bot(...)

@bot.event
async def on_ready():
     await bot.load_extension("cog")

I have found a workaround::
1. install `nest_asyncio`(with pip)

2. call `nest_asyncio.apply()` in the main file

# ...other imports
import nest_asyncio

nest_asyncio.apply()
# ...symbols ans whatnot

bot = commands.Bot(...)

@bot.event
async def on_ready():
     await bot.load_extension("cog")

load_extension() no longer raises an error.

this however makes my bot do everything twice, not ideal.

apparently there was some errors in my code involving imports...i have fixed it now.


Update macros to 2.4.0

Updates com.softwaremill.macwire:macros from 2.3.7 to 2.4.0.
GitHub Release Notes
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.softwaremill.macwire", artifactId = "macros" } ]

labels: library-update, semver-minor

Superseded by #344.


Hres pl

Adds pressure levels to the HRES API
Description

moves a/b/zlevels to an external file
adds fixed height levels
For some reason the API doesn't like arbitrary floats in the min bounding box?

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):
Type of change

[ ] 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)

Checklist:

[ ] I have added an explanation of what your changes do and why you'd like us to include them.
[ ] I have written new tests for your core changes, as applicable.
[ ] I have successfully ran tests with your changes locally.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

@dbekaert this should be good to go now!


Can't delete last digit in some formats

Open the official demo https://react-telephone.joris.re/
Select "United States" in the country dropdown
Type "1" into the number input box
Press Backspace

Actual result:
Nothing happens.
Browser: Microsoft Edge:	103.0.1264.37 (Official build) (64-bit)

Good catch! fixed in #392 sorry for the delay


[Help] Not downloading 1080p60

not downloading in 1080p60 (yes the I tried a lot 1080p videos)
as you wrote in README:

Features

Ultra HD Quality (1080,60FPS)
CUSTOM SETTINS (Change Your Prefered Quality In PrNdOwN.py)

my conf. in PrNdOwN.py:
'Video': {
        'format': 'bestvideo+bestaudio/best',
        'noplaylist': True,
        'postprocessors': [{
            'key': 'FFmpegVideoConvertor',
            'preferedformat': 'mp4',
            #'preferredquality': '137',
        }]
    },

Can you help me? btw when uncommenting the 'preferredquality': '137' it throws error

not downloading in 1080p60 (yes the I tried a lot 1080p videos)
as you wrote in README:

Features

Ultra HD Quality (1080,60FPS)
CUSTOM SETTINS (Change Your Prefered Quality In PrNdOwN.py)

my conf. in PrNdOwN.py:
'Video': {
        'format': 'bestvideo+bestaudio/best',
        'noplaylist': True,
        'postprocessors': [{
            'key': 'FFmpegVideoConvertor',
            'preferedformat': 'mp4',
            #'preferredquality': '137',
        }]
    },

Can you help me? btw when uncommenting the 'preferredquality': '137' it throws error

it's unfortunate to say it requires premium account to be able to download at 1080p.

it's unfortunate to say that it requires premium account to be able to download at 1080p.

PH allows watching 1080p without premium as you can see here:


Feature Request: Add additional context for the App Template

Describe the solution you'd like
Users could not understand what the app template was showing at first and what they were seeing on the page. They also did not realize that it was an NFT that they were transacting for - I would further clarify after.... We could add more context on the dev docs for it? May be helpful. I also think this could be another helpful app template: https://x.com/fkpxls/status/1841829742431133868
Describe alternatives you've considered.
No response

Addressed with the new quickstart app template and on the Commerce template.


Unintuitive navigation controls

Discussed in https://github.com/koekeishiya/yabai/discussions/1210
I first posted about this in Discussions along with some ideas for improving the system, but I've since become convinced it's an actual issue that needs fixing.
Here's a short screen recording illustrating the problem in an easily reproducible situation.
(The only shortcuts used are window --focus west and window --focus east represented by the ← → arrows in the windows.)
https://user-images.githubusercontent.com/22216124/161406620-3321806e-1298-4ae5-a25d-9919429b1170.mp4
Stage 1:
Focusing → then ← brings me to a different window than I started on. Not a big deal since the situation is 'ambiguous' due to the two possible targets. If Yabai resolves this consistently (it does not) I could get used to this.
 ┌──┬──┐
 │  │← │
 ├──┤  │
 │→ │  │
 └──┴──┘

Stage 2:
Everything works as expected
 ┌──┬──┐
 │  │  │
 ├──┼──┤
 │→ │← │
 └──┴──┘

Stage 3:
A small change from stage 2, yet now  ← brings me to the window ? for seemingly no reason. This is the biggest issue which I run into on a daily basis, and it makes directional focusing/manipulation of windows hard to understand.
┌─┬─┬──┐
│ │?│  │
├─┴─┼──┤
│→  │← │
└───┴──┘

The linked discussion goes into a little more detail on possible solutions. I'd be willing to help contribute a fix, but unsure if others are facing the same issues.

This bothered me as well, but can be fixed very easily: https://github.com/FelixKratz/yabai/commit/15adc077db5ccc866e5a6a887493e90d366c71df

Implemented better detection logic on master.


Add custom logger functionality for CacheLevels

Basic idea is that every CacheLevel has its own logger reference. Logger is a protocol with a log function.
Breakdown would be:
public enum LogLevel {
    case Debug, Info, Warning, Error, Fatal, None
}

public protocol Logger {
    func log(message: String, level: LogLevel)
}

and then
public protocol CacheLevel {
   [...]

   func setLogger(logger: Logger)
}

Then one can call setLogger on whatever CacheLevel (for example the top-most, that will set the logger to all its managed cache levels, or whichever you need to).

Won't fix because it's IMHO too complex and the reward is not worth the effort


Claim Greater China

LANCELOT
@simsulla adout the decision “great China”

redstonecobra
Have you considered on expanding the ROC's claims on Mongolia, Tuva, Kachin, East Khorug? Though it's unlikely the ROC will ever do such a thing they still lay claim to these regions

All credit to arandomperson5000 for fixing this issue.


openapi(dm): add openapi conifg in dm-master config file

What problem does this PR solve?
Issue Number: ref #3583
What is changed and how it works?

add new config part openapi for dm-master, default value is false
depreated openapi in experimental config

Check List
Tests

Unit test
Integration test

Code changes

Has exported function/method change

Side effects

Possible performance regression
Increased code complexity
Breaking backward compatibility

Related changes

Need to update the documentation

Release note
`turn on the openapi for DM by default`.

/run-dm-integration-tests

not sure we plan to turn on it by default or remove it from experimental features.

not sure we plan to turn on it by default or remove it from experimental features.

ptal @sunzhaoyang

not sure we plan to turn on it by default or remove it from experimental features.

ptal @sunzhaoyang

I prefer to remove from experimental features and turn off by default (for security), if dmctl depend on openapi in the future, perhaps it should be implemented with api authentication. @Ehco1996 @lance6716

基于安全考虑，没有认证鉴权的openapi默认不要打开，后续实现了api的认证鉴权后再打开会比较合适

not sure we plan to turn on it by default or remove it from experimental features.

ptal @sunzhaoyang

I prefer to remove from experimental features and turn off by default (for security), if dmctl depend on openapi in the future, perhaps it should be implemented with api authentication. @Ehco1996 @lance6716

so we need add a new config like openapi=true in dm-master's  conig file ?

Again, I considered the necessity and safety.
It might be better to keep the configuration item under [experimental] and default openapi = false, maybe we can change it to default true when the authentication is implemented.
@lance6716 Any better advice?

/hold
we are waiting for tidb to come up with a solution to the security issue.

/unhold
update final solution in PR  description

/run-dm-integration-tests

/run-dm-integration-tests

/run-dm-integration-tests

Codecov Report

Merging #3836 (53273c6) into master (3873d39) will decrease coverage by 1.8616%.
The diff coverage is 66.7491%.

Flag
Coverage Δ

cdc
58.7101% <66.7491%> (+0.4735%)
:arrow_up:

dm
52.2147% <ø> (-3.8199%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.
@@               Coverage Diff                @@
##             master      #3836        +/-   ##
================================================
- Coverage   57.0741%   55.2125%   -1.8617%
================================================
  Files           478        488        +10
  Lines         56551      60374      +3823
================================================
+ Hits          32276      33334      +1058
- Misses        20978      23663      +2685
- Partials       3297       3377        +80

could you please take another look for this pr ? thanks 🧡🧡🧡
/cc @lance6716  @okJiang

/merge

/run-leak-test
/run-verify


Golang release target

Issue #, if available:
https://github.com/aws/eks-distro-internal/issues/206
Description of changes:
golang release target, which is invoked by the post-submit.
this will run the whole rpm build process, and then run the s3-sync, syncing the output RPMs to the post-submit artifacts bucket for later consumption.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

/approve


az eventgrid event-subscription list required parameter

Describe the bug
Not sure if this is related to this change, but I'm finding that az eventgrid event-subscription list at least is requiring the --location parameter, which is contrary to the documentation and examples.

To Reproduce
Run az eventgrid event-subscription list with other parameters.
Expected behavior
You should be able to run without the location.
Environment summary
Portal Bash Shell
Additional context
Very strangely, the only subscription I can actually find when using the --location parameter is one that was supposed to have failed.

@kalyanaj can you look into this. Also can you remove the examples that are in the --topic-type-name help for az eventgrid event-subscription list -h
https://github.com/Azure/azure-cli/blob/cbcf889258d16d58b4eb9acedc911865d9ace912/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/_help.py#L229-L235

@dcbrown16 Thanks for reporting this issue. The usage of location parameter is required in some cases for "az eventgrid event-subscription list" command. Event Subscriptions are not Azure Resource Manager (ARM) tracked resource and hence we need to specify the location to determine if this is for "global" event subscription or for specific region (say westus).
For example, "Microsoft.Storage.StorageAccounts" is an event grid topic type is that regional only. Hence, it does not exit in the global context. Hence, the first command fails while the other succeeds.
--> With global location
az eventgrid event-subscription list --topic-type-name "Microsoft.Storage.StorageAccounts" --location global
Invalid usage: Global cannot be specified for the location as the specified topic type is a regional topic type with regional event subscriptions. Specify a location value such as westus. Global can be used only for global topic types: Microsoft.Resources.Subscriptions and Microsoft.Resources.ResourceGroups.
az eventgrid event-subscription list --topic-type-name "Microsoft.Storage.StorageAccounts" --location westus2
Hope this helps clarifies the difference and the need for location.

@ahamad-MS I see, thanks.


How get job state by curl？

Describe your question, attach logs, images or anything that might help to better understand it.
I need get job state，but not by nodejs. I want update python，but I don't know requested address and params

I solution the problem!
get job status:
request url: http://<IP_ADDRESS>:3050/api/v1/jobs/job.uid/status
headers = {
"nexrender-secret": "*******",
"content-type": "application/json"
}
method: get
get all job infos:
request url:http://<IP_ADDRESS>:3050/api/v1/jobs
headers = {
"nexrender-secret": "*******",
"content-type": "application/json"
}
method:get


Implement ListAuthenticators

Implement the operation added in https://github.com/parallaxsecond/parsec-interface-rs/issues/70 - the Core provider must be enhanced to store the authenticator metadata and reply with it to a ListAuthenticators request.

Done in #220


function write_num_flt() not handling certain decimal numbers properly

I am trying to read excel file having amount in one of the columns, it needs to be rounded to 2 decimal places. It fails when rounding certain values after decimal point(e.g. .999345). For example 56.9999456 becomes 56.10 instead of 57.00.
After debugging the issue, I have found the reason for this strange behavior.
faulty code:
if((r = fmt.match(/^#,##0.([#0]*0)$/)) !== null) {
return val < 0 ? "-" + write_num_flt(type, fmt, -val) : commaify(""+(Math.floor(val))) + "." + pad0(dec(val, r[1].length),r[1].length);
}
Here, function dec() returns 100 and it results in "56" + "." + "10". I believe, the code should be handling this specific scenario.

This was fixed a while ago, you should use the current version.
FWIW The number formatting logic can be tested in the project page http://oss.sheetjs.com/ssf/ :


JAVA-970 Don't complete Future in maybeAddPool until onDown completed.

For JAVA-970
Avoids a race in updateCreatedPools by not completing Future returned in maybeAddPool on failure until the Future returned from triggerOnDown completes.
Note: Did not add a changelog for this yet as wasn't sure if this would be a candidate for <IP_ADDRESS>/2.0.12.

I think this may not completely solve the problem.  If the pool fails to initialize and all connections go down, a triggerOnDown is called in signalConnectionFailure, so could possibly have a problem in this case.

Closing this since it's against an old branch and the fix probably isn't ideal.  I'll leave the branch on my personal fork.


MotoAPI - do not blow up on uninitialized objects

Fixes #5326
When calling BaseModel.__new__, created instances are stored in model_data
We then try and initialize the instance by calling __init__
However, initialization may fail, and if that happens none of the regular attributes will be set.
This PR ensures that we can still print/repr the uninitialized instance, despite the fact that no attributes have been set

Codecov Report

Merging #5384 (26c405c) into master (3d913f8) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #5384   +/-   ##
=======================================
  Coverage   96.05%   96.05%
=======================================
  Files         708      708
  Lines       71000    71000
=======================================
  Hits        68200    68200
  Misses       2800     2800

Flag
Coverage Δ

servertests
35.83% <0.00%> (ø)

unittests
95.99% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

moto/moto_api/_internal/responses.py
88.88% <100.00%> (ø)

moto/awslambda/models.py
93.91% <0.00%> (-0.11%)
:arrow_down:

moto/autoscaling/models.py
96.97% <0.00%> (+0.15%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


[BUG] Spring Cloud Stream Service Bus delivers a message sometimes twice

Describe the bug
Last Month we had 6000 cases (out of 5 Mio), where a Message gets delivered twice with Spring Cloud Stream Service Bus.

The message stays for the Timeout in the Queue (2 Min, thats the minor problem)
Then we process the message and complete it
Then the message gets delivered again. (after another 2,8 mins)
Then Spring Cloud Stream Azure is doing a renewMessageLock which fails, becuase the message is already completed
But thats an internal exception, thus we process the message again. That the major problem.
 Not only on high Load on service Bus (Premium) and Container App.

Exception or Stack Trace
com.azure.messaging.servicebus.ServiceBusException: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue. For more information please see ...
To Reproduce
unclear
Expected behavior
A Message get delivered only one time.
Screenshots

** Logs **
Logs from Service Bus Side (From Azure Support Ticket)
Message sent to queue | 0:12:01:01.529093
First delivery (msg lock) | 0:12:01:01.529272
Abandoned | 0:12:03:01.520244
Second delivery | 0:12:03:01.530253
Completed Successfully | 0:12:03:02.480113
what we can see in the application Insights Logs (100% of all logs are saved in Insight at that time)
first processing      on 2024-11-28T12:03:01.527Z (UTC)
complete           on 2024-11-28T12:03:02.366Z (UTC)
second processing on  2024-11-28T12:05:48.082Z (UTC)   why?
**Setup **

OS: Linux Docker Image
Library/Libraries:
spring-messaging-azure-4.15.0,
spring-messaging-azure-servicebus-4.15.0
spring-cloud-azure-stream-binder-servicebus-4.15.0
spring-cloud-stream-4.0.3
spring-boot-3.1.5
Java version: 17
App Server/Environment: Azure Container Apps
Frameworks: Spring Boot

Information Checklist

[ x ] Bug Description Added
[ x ] Repro Steps Added
[ x ] Setup information Added

Hi @mlohmeyer ,
Thanks for using Spring Cloud Azure~
Please double check the versions you used, the version combination Spring Boot 3.1.5 + SCA Service Bus Binder 4.15.0 is not compatible; if you are using Spring Boot 3.1.5, SCA Service Bus Binder version should be 5.x. And could you provider a minimal project to reproduce the issue?

Hi @moarychan , sample code and pom file were shared with you over email

Hi @moarychan we will upgrade to SCA Service Bus Binder 5.19.0, but it will lasts until mid on January because of cristmas holiday until we will get it productive.


Using SQLMAP in Kali Linux to combat SQL Injections

Topic Suggestion
Using SQLMAP in Kali Linux to combat SQL Injections
Pre-submission advice
SQL injection attacks are injection attacks in which SQL commands are inserted into data-plane input to influence the execution of predetermined SQL commands.
SQLMAP: One of the most popular and powerful sql injection automation tools available is sqlmap. Sqlmap may exploit and also fix a remote database by using a vulnerable http request url to extract database names, tables, columns, and all the data in the tables, among other things.
Key takeaways
Upon completion of this lesson, the reader should be able to:

Understand sql injection and the risks it poses.
Download and install sqlmap on kali-linux
Scan for injections with sqlmap on Kali-linux after downloading and installing it.
eliminating all injection flaws

Article quality
In penetration testing, SQLmap is an open-source tool for detecting and exploiting SQL injection issues. SQLmap is a program that detects and fixes SQL injections automatically. As a pentester, we require this tool to keep our database free of injections and to improve its security.
Conclusion
Unlike other blogs that only skim the surface of correcting injections using sqlmap, we'll delve deep into the subject and show you the key details you need to know.

This topic seems a bit over-saturated. Feel free to suggest another topic. Thanks


Data access dashboard: Study team managers unable to see button to access page

The Guatemala OI Cohort investigators wish to add people to view the data, but they can't see the "Data access dashboard" button on the View Study details page even when logged into their accounts that have study team access and Is manager = yes. Jamie suspects a bug

Looks great, thanks Jamie!


R&D: Create a PoC of offline-cache without indexedDb

What is the motivation for adding / enhancing this feature?
The indexedDB caching prooved to be a problematic solution because of:

problems with network-errors handling (we need to pass over the network errors because Service Worker is not returning data for API calls - we're simulating that we're fine with getting the data from idnexedDb)
indexedDb sometimes has really strange response times (>800ms) and sometimes even kind of deadlocks (when You've got few tabs opened)

Currently, we're populating the cache in search.ts

This is PER-QUERY cache that we can replace with Service Worker cache. We can switch-off this logic in this PoC
IMPORTANT NOTE: Service Worker CAN NOT cache the POST requests - currently all the api/rest and graphql requests
We can easily modify the search adapter to send the GET requests + the searchQuery as a base64 encoded GET parameter instead of JSON body (check this) - and then modify the vue-storefront-api to unpack the GET-based search query and pass it to Elastic in correct format.
However, we CAN NOT add service worker caching for graphQL queries (read on graphQL supprt)
So - this service-worker only caching strategy should be disabled automatically when the search.engine=graphql and use the current indexed-db based cache as there won't by any offline mode otherwise.
The same in the situation when service-worker cache is not available at all

Moreover, we're setting the cache of products by SKU (for having the product pages available even for products that user hasn't clicked; The cache is populated in the product/quickSearchByQuery

There is no network call for product data as we're using the product data pre-fetched in the product/list action
This cache won't be replaced by Service Worker. In fact - we probably need to keep this logic to avoid additional network-calls on product page (product/single vuex action)  because of ...

If You went to "Women" all products will be available even when offline because we do have a per-sku cache - which is used in product/single action)

The question is - how to keep this "pre-fetching" enabled without using the indexedDB? I mean per-sku cache. Service worker cache will work on full queries (product/list results).
**Probably: ** we can store the per-sku cache (2) just in kind of in-memory hash - as the product/list action is always called first (as user is browsing first the category/search results - then selecting the product - so in product/list we can populate the memory cache allowing product/single to use it)
Our indexedDb driver is using the in-memory stores for speed optimization already
Notes:

the same logic as described in here is being used for category actions
to remove indexedDb from being used we should modify product vuex actions either modify; the storage.ts is used also for accessing localStorage - shopping carts, user tokens  etc and probably it shouldn't be modified
we should populate the in-memory cache on the persistent data we received from Service Worker
the /api/* requests are excluded from Service Worker -

What are the acceptance criteria

user can go to Women category - switch of the Internet - and still being able to access the products on the page (even these that he/she hasn't visited before - so the data should be prefetched - optimally without aditional network calls)
the current / legacy indexedDB cache should still be in use for a) browsers that are NOT supporting service workers, b) when search.engine = graphql as graphQL is only available via POST and no service-worker caching is possible on these requests

Can you complete this feature request by yourself?

Additional information

@NataliaTepluhina could You please reframe this issue's description and put it into docs as kind of "How Offline Mode works" ?

Any other ideas how to improve this - welcomed :)

Ill take it :)

@filrak it seems like @patzick already took it :) we discussed it yesterday evening and he’s already investigating this issue

Haha no problem. Just please consult it with me. We should obviously use Workbox for this

And take this i to account https://github.com/DivanteLtd/vue-storefront/issues/1994

We need to consider this one as well:
https://github.com/DivanteLtd/vue-storefront/issues/1698


useActiveAccount bug when using AA

Bug:
With AA enabled, upon first connection, changing the connected EOA doesn't update the AA (useActiveAccount) until force refresh.
Reproduction:
1 - Go on https://playground.thirdweb.com/connect/account-abstraction/sponsor
2 - Disconnect everything
3 - Connect your EOA, check the Smart Account address, change your connected EOA and see the Smart Account address not change.
See the video for details:
https://github.com/user-attachments/assets/acd25cb3-b3ae-4903-9916-4f92c4a85dd4
4 - Now refresh the page
5 - Now changing the EOA will update the Smart Account address
See the video for details:
https://github.com/user-attachments/assets/0bff156a-fe13-42c2-9489-ed3a408b87a4
Expectations:
I expect the step 5 to work at step 3.

thanks for the detailed report @sshmaxime - we're looking into this

@joaquim-verges Any ETA ?

@sshmaxime fix will be in the next version once this merges: https://github.com/thirdweb-dev/js/pull/5592


Distinguish the collect mode of different engines

:mag: Description
Issue References 🔗

Describe Your Solution 🔧
Currently, Spark, JDBC, and TRINO engines support incremental collection, but they share the same configuration option kyuubi.operation.incremental.collect. Sometimes, it's necessary to enable incremental collection only for specific engines, which requires distinguishing between them.
Types of changes :bookmark:

[ ] Bugfix (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 change)

Test Plan 🧪
Behavior Without This Pull Request :coffin:
Behavior With This Pull Request :tada:
Related Unit Tests

Checklist 📝

[ ] This patch was not authored or co-authored using Generative Tooling

Be nice. Be informative.

Codecov Report
Attention: Patch coverage is 68.18182% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 58.47%. Comparing base (c1239f2) to head (3c43d2c).
Report is 10 commits behind head on master.

Files
Patch %
Lines

...in/scala/org/apache/kyuubi/config/KyuubiConf.scala
64.70%
5 Missing and 1 partial :warning:

...ine/spark/operation/SparkSQLOperationManager.scala
80.00%
0 Missing and 1 partial :warning:

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6201      +/-   ##
============================================
- Coverage     58.47%   58.47%   -0.01%
  Complexity       24       24
============================================
  Files           649      649
  Lines         39312    39379      +67
  Branches       5415     5415
============================================
+ Hits          22988    23027      +39
- Misses        13856    13871      +15
- Partials       2468     2481      +13

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Thanks, merged to master


Valid data does not pass the test.

Challenge Modify Array Data With Indexes has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
// Example
var ourArray = [1,2,3];
ourArray[1] = 3; // ourArray now equals [1,3,3].

// Setup
var myArray = [1,2,3];

// Only change code below this line.
myArray [0] = 3;

While myArray [0] is valid js syntax this code doesn't pass the tests because the test for use of brackets doesn't allow that space.
recommend /myArray\s+[0]\s+=.*/ as a better test that allows for the space but still doesn't allow for the reassignment of the array

@sjames1958gm Thanks for contributing!
This is for first-timers only.
Edit this line to allow for as many spaces as required between myArray and [0].

I will give it a try on fixing it as a first-timer.

@Bouncey although this is "valid" JS, I don't see arrays being accessed like that with a space. I can't find the conversation we had about this on another challenge but I think we all agreed that we should enforce no spaces. If we change it for this one, we'll have to change it for all the other ones.

Ok, if that's what we agreed then no problem, we can close this issue.

I agree with Eric on enforcing best practices on coding style since someone might think it is fun to have var myArray    [0]  = 1;  And this might become a bad habit on real world coding.

Since there is no indication what the error might be and no instruction or style guide saying no space is best practice, campers are going to get stumped on what the valid solution is, esp. if they go to get help and the people helping don't have any indication that this is a "best" practices issue.

@sjames1958gm thanks for the feedback. What we can do is have a note in the lesson/challenge that explores accessing array data with indexes and mention that there shouldn't be any spaces between the array name and the square brackets.
Maybe add something like this to the end of the description and before the instructions.

Note
There shouldn't be any spaces between the array name and the square brackets, like array [0]. Although JavaScript is able to process this correctly, this may confuse other programmers reading your code.

I changed the "description" property (whose value is a string array) in this file which starts at line 1859. But the changes I made are not visible in the site, even if I restart the server. I am accessing the server at http://localhost:3001 . So, what am I doing wrong ? Can anyone help me ?

OK. Somehow I guessed that I have to run the
npm run only-once
command again, even though it says "only-once". And the output said some files were parsed. The file names were related to the names of the JSON files in the seed/challenges/ folder.
Is it like the JSON files are parsed and put in the mongo server ? And the site shows the data of the challenges from the server ?