text:
[Bug] Coordinator device: Cannot read properties of null (reading 'vendor')

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
I updated zigbee2mqtt server to latest (mine was over a year old) and get this...
[4/28/2024, 11:26:14 AM] [homebridge-z2m] Restarting Process...
[4/28/2024, 11:26:14 AM] [homebridge-z2m] Launched child bridge with PID 244983
[4/28/2024, 11:26:14 AM] Registering platform 'homebridge-z2m.zigbee2mqtt'
[4/28/2024, 11:26:14 AM] [homebridge-z2m] Loaded homebridge-z2m v1.11.0-beta.2 child bridge successfully
[4/28/2024, 11:26:14 AM] Loaded 31 cached accessories from cachedAccessories.0E706CE49E2D.
[4/28/2024, 11:26:14 AM] [homebridge-z2m] Connecting to MQTT server at mqtt://192.168.29.49:1883
[4/28/2024, 11:26:14 AM] [homebridge-z2m] Restoring accessory: Coordinator (0x00124b0026b87de8)
TypeError: Cannot read properties of null (reading 'vendor')
    at isDeviceDefinition (/var/lib/homebridge/node_modules/homebridge-z2m/src/z2mModels.ts:302:72)
    at Zigbee2mqttAccessory.updateDeviceInformation (/var/lib/homebridge/node_modules/homebridge-z2m/src/platformAccessory.ts:418:30)
    at new Zigbee2mqttAccessory (/var/lib/homebridge/node_modules/homebridge-z2m/src/platformAccessory.ts:98:10)
    at Zigbee2mqttPlatform.addAccessory (/var/lib/homebridge/node_modules/homebridge-z2m/src/platform.ts:575:19)
    at Zigbee2mqttPlatform.configureAccessory (/var/lib/homebridge/node_modules/homebridge-z2m/src/platform.ts:474:10)
    at /var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:328:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:288:69)
    at ChildBridgeFork.startBridge (/var/lib/homebridge/node_modules/homebridge/src/childBridgeFork.ts:191:24)
[4/28/2024, 11:26:14 AM] [homebridge-z2m] Child bridge process ended
[4/28/2024, 11:26:14 AM] [homebridge-z2m] Process Ended. Code: 1, Signal: null

I was able to work around the error by specifically excluding this device.
Related devices
No response
Related Devices
No response
Steps To Reproduce
No response
Expected behavior
No response
Device entry
No response
Status update
No response
Messages from this plugin
No response
This plugin
1.11.0-beta2
Homebridge
1.8.1
Zigbee2MQTT
1.36.1
Homebridge Config UI X (if applicable)
No response

@dkerr64 You'll have to completely exclude your coordinator 0x00124b0026b87de8, save and restart. See also #810

Yes, thanks.  That is exactly what I did.
Sorry, my search did not turn up #810 possibly because I only searched on open issues.  oops.  You can close this as a duplicate if you want.


text:
Progress spam in Gitlab CI log

I would like to avoid spam from butler push in Gitlab CI log:

I guess butler doesn't detect a non-interactive console, and Gitlab CI cannot handle \r correctly. Maybe a --quiet or --no-progress flag could be added? Note that this is happening for me only for Windows builder; Linux and macOS don't print progress in CI log.

I guess butler doesn't detect a non-interactive console

Actually, it does: https://github.com/itchio/butler/blob/678ef99eb840afded4c292cf52f729335a3fb91e/main.go#L581
Your windows runner is showing progress because.. there's no way (that I know of) to tell apart terminals from redirected outputs in windows, so it's just hardcoded to true: https://github.com/itchio/butler/blob/2c524f7e5403b35fe2c00984acb6f3be4bd41519/term_win.go
You could pass --no-progress yourself, though :)

You could pass --no-progress yourself, though :)

Oh, thanks! butler push --help didn't show that. It'll work.

Oh, thanks! butler push --help didn't show that. It'll work.

Right! There's a bunch of stuff hidden from butler help to keep it concise, need to find a better way to do that.

You could pass --no-progress yourself, though :)

Correction: it's --noprogress, not --no-progress ;)

Good catch!
https://github.com/itchio/butler/blob/5e4fced596e93775d18823972ebb113b712b8fab/main.go#L118-L120

This option (and others) are missing from the documentation - can the doc pages at https://itch.io/docs/butler/pushing.html be updated?

source: gharchive/issue

authors: fasterthanlime quyse temportalflux

repo: itchio/butler

license: mit

license_type: permissive

license_source: bigquery


text:
Added one color theme

Added matching theme for one, which gained popularity as the default color theme of the Atom text editor.
Dark version:

Light version:

I prefer the both files merged into one file like #175.

Merged them into one file.

Changed indentation to soft tabs (2 spaces).

Thank you for your contribution.

source: gharchive/pull-request

authors: ZoltanDalmadi itchyny


text:
Somehow "ignore" old CETs during rehydration

Previous CETs are irrelevant after a rollover. However, due to the use of event sourcing, those are still kept around and pro-actively deserialized upon every hydration, regardless of whether or not they are used.
The deserialization of those CETs (around 1.3MB per event) incurs a big performance hit that is significant over time.
We need to somehow address this within the bounds of event sourcing (i.e. deleting the old event is not really a solution :upside_down_face:).
Ideas:

Have a Lazy wrapper around data types that allows to delay deserialization up until the data is actually accessed.
Have an in-memory read-model that keeps the applied CFD around so we don't go to the database for every update but only load the new events.

Why is pruning event (data) not an option?
I think it's far to keep the event around but remove the data of old ones when storing a new, successful rollover.

drive-by, unsolicited suggestion: one way to handle this in event-sourced systems (I haven't dug into the ES in itchysats, so I'm going to be general and hand-wavy) is:

Have a "snapshot" event type that reifies/materializes the state as of event t in the log and store that as entry t+1.
store a start-index on disk with the log that points to the latest snapshot event

Periodically write a new snapshot entry to the log and bump the index stored in start-state. Whenever a node starts up or needs to rehydrate its state (after an update or something), it reads event-log[start-index] to initialize state and then starts replaying all the events that came after it. In this case with old (and no longer relevant) CETs, the CETs would still be in the log, but would be older than the latest state so you won't deserialize them again.

drive-by, unsolicited suggestion:

Very appreciated!

Have a "snapshot" event type that reifies/materializes the state as of event t in the log and store that as entry t+1.

store a start-index on disk with the log that points to the latest snapshot event

Periodically write a new snapshot entry to the log and bump the index stored in start-state. Whenever a node starts up or needs to rehydrate its state (after an update or something), it reads event-log[start-index] to initialize state and then starts replaying all the events that came after it. In this case with old (and no longer relevant) CETs, the CETs would still be in the log, but would be older than the latest state so you won't deserialize them again.

This is very interesting. I hadn't considered the idea of a snapshot event! This should definitely improve the performance for rehydration.
I also added the idea of an in-memory read-model to the original ticket description. When given the choice, would you pick the read-model or the snapshot event as an initial performance improvement?

Why is pruning event (data) not an option? I think it's fair to keep the event around but remove the data of old ones when storing a new, successful rollover.

I am hesitant to do this because it is a pretty unexpected way of dealing with the problem. At the moment we assume that historical CETs are absolutely useless and there is a very high chance that this is the case. However, I'd prefer if we find solutions that mitigate the problem in different ways before we go down the path of selectively deleting data out of old events.
My current, preferred order would be (to optimize rehydration performance, not disk usage):

Check how much we can shave off with https://github.com/itchysats/itchysats/issues/1288, i.e. reduce the storage down to the absolute minimum required
Introduce an in-memory read-model
Snapshot closed CFDs and delete all of their events

Optimizing for long-term disk storage is a different concern but (1) and (3) would also help with that!

The projection actor now keeps in-memory read-model, meaning this problem is solved for now.

authors: a5an0 da-kami thomaseizinger

repo: itchysats/itchysats

license: MIT

license_source: github-api


text:
Fix NUM_LIBP2P_CONNECTIONS_GAUGE to only increment if the peer does not have an active connection

At the moment we always increment upon receiving an identify message regardless of if we have a connection recorded for the peer or not.
Since we sometimes are not notified about ConnectionDropped we should only increment if the peer is not known yet (i.e. no connection to the peer is on record) otherwise we might count peers multiple times.
This does not solve the problem that we might not decrement if we don't get a ConnectionDropped, but that cannot be easily solved.
Note: Eventually we should move this gauge into the endpoint, it is weird that it is in the responsibility of identify to record this metric. But at the moment the metric depends on additional information (wire version, daemon version, environment) that is not known to the endpoint but only received in the identify message.

Why don't we just add a separate metric to the Endpoint already? Even if it doesn't have all the other information you mention it will be useful by itself.

I think it would be a good idea to move it. I'll adapt the ticket and we can create a separate one independent of the work in #2845
Originally I thought it would be better to bind the stats on connections and the stats on environment/version together so they don't diverge (which could be confusing). But I don't think that should be a problem, because the endpoint does not know more about connected/disconnected peers then identify does.
From a concern in code perspective it would be cleaner to create separate metrics.

Self-assigning to take a look at this

Why don't we just add a separate metric to the Endpoint already? Even if it doesn't have all the other information you mention it will be useful by itself.

Would we keep the existing NUM_LIBP2P_CONNECTIONS_GAUGE (maybe renamed) with all its current labels in identify, then, in order to record the connections per wire version, daemon version, and environment (should these maybe each be split into one int gauge vec per label)? Then, we could have a different metric in the endpoint just for total connections. I am still figuring out prometheus so let me know if this makes sense or doesn't.

Currently blocked on #3001

Temporary solution could be removing the authentication for the metrics endpoints.

authors: Restioson bonomat da-kami luckysori


text:
Don't expose internal model on the maker API

We don't have tests for the maker's API to create new offers.
We should not expose internal types that can change, but treat the HTTP API as a separate interface, otherwise we might accidentally break the API.
I really think we should stop exposing our internal model to the outside and keep proper API boundaries.
Some of these changes might be controversion, feel free to come up with other ideas if you have better ones.

Blocked until the new version is out because it is a breaking API change for the automation. Trivial to change but let's wait nonetheless.

Blocked until the new version is out because it is a breaking API change for the automation.

What part of this is a breaking change?

Closing this because the API changed.

authors: da-kami thomaseizinger


text:
improve dvc import fixed revisions example

This section is confusing, probably because it misses a step. These are the steps I expect:

importing a particular version (this one is missing)
updating
rebinding a revision

That would read as a story unfolding.
The other thing is that we start from some yaml, not from a command, which is also confusing. Should we include those yamls at all? Or include but hide in a bubble.

@Suor could you please share a link? :)

@shcheklein linked "this section" in the original message.

importing a particular version (this one is missing)... we start from some yaml...

As you noticed, the example starts by providing a sample DVC-file fragment of a specific rev import. We don't always have end-to-end reproducible commands in our examples. (They're not tutorials.) I'm not sure whether its better to keep them as short as possible, or as complete as possible. This is an interesting question though, and whatever guidelines we decide will involve reviewing lots of command examples for consistency.

updating

The dvc update examples are in https://dvc.org/doc/command-reference/update

As you noticed, the example starts by providing a sample DVC-file fragment of a specific rev import, which implies a particular version has been already imported.

This is a part of the problem, using rev is supposedly common case, but we don't show/example it.

We don't always have end-to-end reproducible commands in our examples.

Showing the result and not showing a command doesn't make sense to me. This makes it hard to read.

Good points. I'll add an explicit example of dvc import --rev .... It's a small addition anyway and it will improve readability like you suggest.
Regarding update examples, those require import first, but import doesn't require update. The example in question simply has not much to do with updating, so why would we add an update command example here? We simply mention that "for static refs such as tags (unless manually updated), or for SHA commits, dvc update will not have any effect on the import."

The explanation for reimport requires update. Now it looks like you are explaining how to solve a problem, which doesn't exists and so you are forced to mention update anyway, only you do it later breaking the linearity of the story.
I think some duplication in related help pages is ok as long as this pages are not meant to be read consequentially, like Get Started. People get there randomly and need a comprehensible story anyway.

Of course repetition and cross-usage of commands in their examples is OK, we do this a lot already. I'm not opposed to using update for that reason, there's just nothing to update in this example, and we wouldn't want to create a special scenario in the import cmd ref just so we can have an update example – This is what I meant when I mentioned that update examples are in the update cmd ref.
Can you give a more specific suggestion on what update example you would add to this doc?
Also, I don't think examples have to be linear among them, if that's what you mean. Again, command refs are not tutorials or get started chapters. Each example should be "linear" internally though – in the sense that it should be logical and easy to understand – that I agree with.

Please check the PR @Suor. I added the --rev example and also improved the references between this example and dvc update, hopefully you find it more cohesive now.

p.s. you can see the actual PR version rendered in https://dvc-org-pr-800.herokuapp.com/ 🙂

Can you give a more specific suggestion on what update example you would add to this doc?

Just a couple of lines: If the branch or tag "..." has moved you can update an artifact by:
dvc update stage.dvc

Also, I don't think examples have to be linear among them,

Yeah, but each example itself should be, or at least it shouldn't have any gaps what make it harder to comprehend.

If the branch or tag "..." has moved you can update an artifact..

The problem is that this example now starts with a dvc import example that uses an actual tag.
See https://dvc-org-pr-800.herokuapp.com/doc/command-reference/import#example-fixed-revisions-re-importing
We'd need to make the example more abstract (not reproducible), so the --rev can be ambiguous (branch or tag). Not sure this is better.

We can leave it with tag and just say:
In the case it moves/reassigned you may use dvc update to update both the stage and its artifact. This is probably more useful when you refer a branch not a tag.
In case of a tag you might want to switch it ...

I don't want to make it more abstract either.

OK. I've updated the wording to be more positive, like your suggestion. Please review the PR again. Let's move this discussion to the PR. Thanks

authors: Suor jorgeorpinel shcheklein


text:
Add simple Typeform component and /enterprise page using it

A quick solution to adding a Typeform to the url /enterprise, much like the viewer beta form.
Currently, it blends into the site UI and specified a min-height that ensures a nested vertical scroll doesn't happen.
If we want any changes to the Enterprise page specifically, they can simply be added to the page component.
I haven't added a link to any menus yet, but that can also be done in either this or another PR.

@rogermparent looks awesome, could we disable the banner on that page? The idea that people will go from the banner link to it.
Also, can we update the banner itself as part of the PR - :shield: DVC for Enterprise - data access control & compliance!

Thank @rogermparent !

authors: rogermparent shcheklein


text:
Problem with run example model from cli in zsh

I have been following this guide https://mlem.ai/doc/get-started/applying#applying-from-cli, when I tried to run a command in zsh
mlem apply rf new_data.csv -i --it pandas[csv] -o prediction
I got an error
(base) ╭─maverchenko@datalab-gpu ~/test_mlem
╰─➤  mlem apply rf new_data.csv -i --it pandas[csv] -o prediction
zsh: no matches found: pandas[csv]

After that error I tried to run this command in bash shell and it works!
maverchenko@datalab-gpu:~/test_mlem$ mlem apply rf new_data.csv -i --it pandas[csv] -o prediction
⏳ Importing object from new_data.csv
⏳ Loading model from .mlem/model/rf.mlem
🍏 Applying `predict` method...
💾 Saving data to .mlem/data/prediction.mlem

Can you try escaping the []? or quoting it?

Yeah, I found that is common problem with zsh shell. Other commands like pip install dvc[s3] aren't work in this shell.
Solution is here https://github.com/jhollinger/otr-activerecord/issues/8

repo: iterative/mlem


text:
fix(combobox): stop button from receiving focus

This change: (check at least one)

[ ] Adds a new feature
[x] Fixes a bug
[ ] Improves maintainability
[ ] Improves documentation
[ ] Is a release activity

Is this a breaking change? (check one)

[ ] Yes
[x] No

Is the: (complete all)

[x] Title of this pull request clear, concise, and indicative of the issue number it addresses, if any?
[ ] Test suite(s) passing?
[ ] Code coverage maximal?
[ ] Changeset added?

What does this change address?
#160
How does this change work?

Add tabindex="-1" to the combobox button to avoid keyboard focus
Update click and blur handling for desired behavior

Additional context
This removes the ability to toggle the combobox open/closed by clicking the button repeatedly—we could change that, but this is consistent with the WAI ARIA example.

Not quite sure how this change is resulting in the following test failure:
 lib/components/combobox/pharos-combobox.test.js:

 ❌ pharos-combobox > renders a checkmark on an option that has been selected
      TypeError: Cannot read properties of null (reading 'querySelector')
        at o.<anonymous> (src/components/combobox/pharos-combobox.test.ts:122:37)

repo: ithaka/pharos


text:
IL2CPP Problem Resolution

I have found the reason why IL2CPP faster runtime cannot run.
It is mainly due to the fact that System.Reactive.Subjects.Subject cannot be translated properly when full generic sharing is not supported in IL2CPP.
It is expected that UniRx (https://github.com/neuecc/UniRx) can be used to solve this issue.
Error code Location:

Error Stack:
System.ExecutionEngineException: Attempting to call method 'System.Reactive.Concurrency.CurrentThreadScheduler::Schedule<System.ValueTuple2[[System.Action1[[System.ValueTuple2[[System.Reactive.Producer2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Reactive.Linq.ObservableImpl.AsObservable1+_[[System.String, mscorlib, Version=[4.0.0.0](http://4.0.0.0/), Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Reactive, Version=[5.0.0.0](http://5.0.0.0/), Culture=neutral, PublicKeyToken=94bc3704cddfc263]], System.Reactive, Version=[5.0.0.0](http://5.0.0.0/), Culture=neutral, PublicKeyToken=94bc3704cddfc263],[System.Reactive.Linq.ObservableImpl.AsObservable1+[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Reactive, Version=5.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.ValueTuple2[[System.Reactive.Producer2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Reactive.Linq.ObservableImpl.AsObservable1+_[[System.String, mscorlib, Version=[4.0.0.0](http://4.0.0.0/), Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Reactive, Version=[5.0.0.0](http://5.0.0.0/), Culture=neutral, PublicKeyToken=94bc3704cddfc263]], System.Reactive, Version=[5.0.0.0](http://5.0.0.0/), Culture=neutral, PublicKeyToken=94bc3704cddfc263],[System.Reactive.Linq.ObservableImpl.AsObservable1+[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Reactive, Version=5.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>' for which no ahead of time (AOT) code was generated.  Consider increasing the --generic-virtual-method-iterations=1 argument

Thank you for reporting this issue. I'm currently tied up with other commitments
if you or the community find a fix, please consider submitting a pull request. Your contribution is highly valued.

in IL2CPP build socket.io couldn't connect to server without any error but when I updated my unity from 2021.x to 2022.3.20, problem fixed.

Hi,
Big thanks for this bug search.
I did not do a deep search in socket.io client source code, but between the 3.0.6 and 3.0.8 versions they did some refactoring and they do not use Subscribe anymore.
So this pending pull request, updateing library from 3.0.6 to 3.0.8, seem to fix this issue.
I changed my package.json in unity to use the forked repository and I'm now able to connect to my server in android.

Hi, Big thanks for this bug search.
I did not do a deep search in socket.io client source code, but between the 3.0.6 and 3.0.8 versions they did some refactoring and they do not use Subscribe anymore. So this pending pull request, updateing library from 3.0.6 to 3.0.8, seem to fix this issue.
I changed my package.json in unity to use the forked repository and I'm now able to connect to my server in android.

This fix my problem tool. Tkanks!

authors: EwertonLug Fafou ZhouXinyu001 itisnajim noobogami

repo: itisnajim/SocketIOUnity


text:
Add start probe to support lengthy init of modpacks

Only thing I would suggest is adding a start probe, some modpacks can take up for 10 mins to boot on init install.
Thank you!
/close
Originally posted by @Blackphidora in https://github.com/itzg/minecraft-server-charts/issues/44#issuecomment-765095241

There are https://github.com/itzg/minecraft-server-charts/blob/master/charts/minecraft/values.yaml#L41
Is this issue asking for something else?

I even approved/merged the PR that added the startup probes 😬
Thanks as always @ChipWolf , for keeping me honest.

authors: ChipWolf itzg

repo: itzg/minecraft-server-charts


text:
Classif documentation

Add #278 to RTD

Pull Request Test Coverage Report for Build 213853558

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at ?%

Totals

Change from base Build 213828280:
0%

Covered Lines:

Relevant Lines:
0

💛  - Coveralls

repo: ivadomed/ivadomed


text:
implement immutable_registers method

This commit just puts in the immutable_registers method

That was easy.
Thank you!

I can build a new version and publish the crate. But I am right now on a business trip, it may take me a couple of days.

it may take me a couple of days.

No problem, thanks for your help

It's published now as v0.3.7.
Thank you for your contribution.

authors: ivanizag omarandlorraine


text:
Problem with #include <SPI.h> (from RFM69 library)

I'm a bit puzzled, I just installed platformIO, and used it to build some test code which includes RFM69 library (which I installed via platformio lib install 92) for arduino uno.
Everything works fine but I got an issue with the #include <SPI.h> line in the RFM69 file:
.pioenvs/autogen_uno/RFM69_ID92/RFM69.cpp:33:17: fatal error: SPI.h: No such file or directory
The strange thing is that if I #include <SPI.h> in main.ino, it compiles fine, so I suspect there's something wrong.
I'm running linux mint if that's of any help, and followed the get started page to get things running.
Is it a bug, or did I miss something?

@laurentS
Yes, this is a bug. Thanks a lot! I will fix it.

@laurentS  can you retest it with the latest develop?
$ pip uninstall platformio
$ pip install https://github.com/ivankravets/platformio/archive/develop.zip

Thanks a lot! If you have any problems, please reopen this issue.

@ivankravets just tested the latest develop, it works fine, thanks for fixing it!

authors: ivankravets laurentS

repo: ivankravets/platformio


text:
Location Permissions on Apple Silicon always return Undetermined

Describe the bug
When running an iOS app on a Mac (Apple Silicon), location returns undetermined when location permissions are grated.
EX:
when ProcessInfo.processInfo.isiOSAppOnMac is true
& location is allowed
Both:
SPPermissions.Permission.locationWhenInUse.notDetermined
SPPermissions.Permission.locationAlways.notDetermined

are true
In this state, the UI is correctly showing the location permission is allowed.
Smartphone (please complete the following information):

iOS Version 14+ running on Mac w/ Apple Silicon
Framework Version 6.6.3+
Installed via Cocoapods

I have checked it, and can share some info.
I full confirm behaviour that you describe, really bug. I see if set delay even zero, new state with same request changed. I think it some special logic for location center for Mac catalyst. For now I can't add ant solution because its catalyst bug.
I leave issue open for observe it. You can set zero delay and request valid states for now like temp solution.

For clarity, I'm referring to the behavior on iOS App on Mac, not Mac Catalyst.
iOS App on Mac defined as:
// Swift
var isiOSAppOnMac = false
if #available(iOS 14.0, *) {
    isiOSAppOnMac = ProcessInfo.processInfo.isiOSAppOnMac
}
print("\(isiOSAppOnMac ? "iOS app on Mac" : "not iOS on Mac")!")

Not Catalyst:
#if targetEnvironment(macCatalyst)
    print("UIKit running on macOS")
#else
    print("Your regular code")
#endif

As a workaround are you saying a delay such as this would work?

//state check
let state = [SPPermissions.Permission.camera, SPPermissions.Permission.photoLibrary, SPPermissions.Permission.mediaLibrary, SPPermissions.Permission.locationWhenInUse]

DispatchQueue.main.asyncAfter(deadline: .now() + 0.0) {let permissions = state.filter { $0.notDetermined }}

Same for iOS app on Mac.
yes, async will help

@jminutaglio maybe you can check how it going now? Maybe fixed?

authors: ivanvorobei jminutaglio

repo: ivanvorobei/SPPermissions


text:
can't find crate for panic_abort

Hi there,
first of all, I really appreciate your work on rust and the esp controllers!
It'll be amazing, once this runs smoothly with the stdlib, thanks a lot!
So, I tried to compile  and flash this project onto a ESP32-C3-32S, which is detected via espflash
Chip type:         ESP32-C3 (revision 3)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi
MAC address:       xx:xx:xx:xx:xx:xx

I cloned this project, changed the target in .cargo/config.tomlto riscv32imc-esp-espidf and tried to compile it, but that does not seem to work:
$ RUST_ESP32_STD_DEMO_WIFI_SSID=ABC RUST_ESP32_STD_DEMO_WIFI_PASS=DEF cargo +nightly build -Z build-std

...

   Compiling embedded-svc v0.12.0
   Compiling esp-idf-sys v0.24.4
   Compiling esp-idf-hal v0.23.3
   Compiling esp-idf-svc v0.28.1
   Compiling rust-esp32-std-demo v0.20.2 (/tmp/rust-esp32-std-demo)
error[E0463]: can't find crate for `panic_abort`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `rust-esp32-std-demo` due to previous error

$ rustc --version
rustc 1.56.1 (59eed8a2a 2021-11-01)
$ rustc +nightly --version
rustc 1.58.0-nightly (495322d77 2021-11-08)

Sooo... what silly mistake am I doing? :)

Sooo... what silly mistake am I doing? :)

-Z build-std
Remove this from the build command line and it should work. -Z build_std and a few build_std_features are already passed to the build command via .cargo/config.toml. Your manual override with -Z build_std is overriding the build_std_features that need to be passed as well with empty ones, and hence your build fails.

If you are wondering, -Zbuild_std is compiling by default with a panic_unwind strategy, which will never be supported on the ESP32. We need panic_abort instead. Moreover (for now), we need the panic_immediate_abort behavior of the panic_abort crate, as without it, panic_abort tries to dump a backtrace before panic-ing, which is also not (yet) supported for the esp32 and hence leads to a crash while a crash (panic) is already in progress.

Uff, thats a silly one. I tried cargo build previously but not cargo +nightly build :facepalm:
$ RUST_ESP32_STD_DEMO_WIFI_SSID=ABC RUST_ESP32_STD_DEMO_WIFI_PASS=DEF cargo +nightly espflash /dev/ttyUSB0

and
$ espmonitor

now works as well, nice.
Any ETA for ESP32-C3 projects on stable?
Thanks!

Any ETA for ESP32-C3 projects on stable?

"ETA for ESP32-C3 projects on stable" = "ETA for cargo -Z build-std on stable".
Seriously. The only reason we are on nightly is because -Z build-std is a nightly-only thing. The STD support for ESP-IDF itself has hit stable since 1.56.
If you have a brilliant idea how to bring functionality similar to -Z build-std to stable, I'm all ears. A solution might be shipping somehow prepackaged core/libstd components for our riscv32imc-esp-espidf target. Since this target is Tier3, Rust upstream does not ship (nor test & compile)  these.

By the way, using the Espressif-provided esp toolchain is the closest you get to Rust stable, as these are branched off from the same Rust upstream commit that is used to release/branch the corresponding upstream Rust stable release.

Seriously. The only reason we are on nightly is because -Z build-std is a nightly-only thing. The STD support for ESP-IDF itself has hit stable since 1.56.

Yeah, I saw that release note, which is why I am testing it now :)

Since this target is Tier3, Rust upstream does not ship (nor test & compile) these.

My naive approach would then be to try to promote it to Tier2? ^^
Tbh, since espressif controllers are quite widespread, one could argue that the riscv version will be relevant soon as well.
But I am not familiar with the promotion process at all, so no idea how laborious this would actually be...

authors: ivmarkov kellerkindt


text:
The test, how to drag title to move around

Sorry,
This supports drag title to move around?
If yes, how to?
Thanks
Eric Xin

Hello Eric,
Thank you for the interest in this project! Dragging the title of a sheet is currently not supported due to the implementation approach. This seems to be more of a functionality that a window component would have to implement.
I hope you will find a library that fulfills your requirements.
Best wishes,
Ivan Teplov

repo: ivteplo/html-sheet-element


text:
Mitra

Gagal insert email pada form mitra
output : gagal tambah data - email sudah digunakan

done diperbaiki


text:
Add remove_node_drop_children

Todos:
Do you think there is an obvious more performant way to implement this?
Naming?

I can't think of any more performant way to implement it, but that certainly doesn't mean there's not a faster way to do it.  I hate that there have to be two clones in there, but I understand why they're there.
As for naming, the only other thing I can think of is remove_node_drop_children.  I like it a little bit better than remove_node_remove_children, but not by much.

I actually like drop_children much better.

I can get rid of both clones with take_children from #5
Once you merge that, I will finish this.

@Drakulix #5 is merged, not rushing you, just pinging.

Done

Tried to address all your criticism.
Tell me if there is anything missing!

Everything looks good, but I do have one more concern. (Sorry!)
I just realized that this method is different from the other remove_node_[something] methods in that the existing methods don't remove other Nodes from the Tree (and this one does).  This seems obvious, of course, but it does have a not-so-obvious consequence: Because child Nodes are removed, the NodeIds that refer to them in the calling context will be invalid after the call is made.
I don't think this is a reason not to include the method (we return Options/Results for a reason), but I do think it merits some kind of mention in the documentation.  Could you add something like that in the documentation for this method?
Basically just something like: "Please keep in mind: Children of this NodeId are removed during this method call, so NodeIds that previously pointed to them will no longer be valid after calling this method".

Done

Awesome!  Thanks, and I like that wording!  Merging now and I'll let you know when it's up on crates.io.

@Drakulix it's up on crates.io

authors: Drakulix iwburns

repo: iwburns/id-tree


text:
🛑 Takagi is down

In cee8a1e, Takagi (https://lixingyong.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Takagi is back up in 27028be.

repo: iwyang/check


text:
🛑 24Braindance is down

In f4fe956, 24Braindance (https://www.penginman.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 24Braindance is back up in 3ae2d15.


text:
🛑 05Takagi is down

In d087b5e, 05Takagi (https://lixingyong.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 05Takagi is back up in 7deac93 after 13 minutes.


text:
🛑 28mao is down

In f12aa8d, 28mao (https://meuicat.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 28mao is back up in 87987e3 after 25 minutes.


text:
🛑 21Eurkon is down

In 8c4de22, 21Eurkon (https://blog.eurkon.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 21Eurkon is back up in 8eab53f after 13 minutes.


text:
🛑 21Eurkon is down

In 44c8297, 21Eurkon (https://blog.eurkon.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 21Eurkon is back up in b73674d after 20 minutes.


text:
🛑 21Eurkon is down

In a905c6b, 21Eurkon (https://blog.eurkon.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 21Eurkon is back up in 6d923a7 after 23 minutes.


text:
🛑 21Eurkon is down

In 52483b2, 21Eurkon (https://blog.eurkon.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 21Eurkon is back up in 73a7df3 after 9 minutes.


text:
[NEW-FEATURE] Customizable export/import in AxoData

When exporting/importing data in AxoData, adding the option to choose which data will be exported.
Maybe using a table with all the data header and checkboxes.

/cib

Branch 112-_NEW-FEATURE_Customizable_export/import_in_AxoData created!

repo: ix-ax/AXOpen


text:
fix vulnerability

node_modules/minimist
https://github.com/advisories/GHSA-xvch-5gv4-984h

@CO0Ki3 Thank you for your PR, I have just merged your PR.

repo: ixartz/Next-js-Boilerplate


text:
🛑 Ixtanet MServer is down

In 1a11938, Ixtanet MServer ($MEDIA_SERVER) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Ixtanet MServer is back up in e540e19 after 26 minutes.

repo: ixtanet/upptime


text:
🛑 Ixtanet MServer is down

In 9bff684, Ixtanet MServer ($MEDIA_SERVER) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Ixtanet MServer is back up in 7077082.


text:
How to run “run_extract_feat.sh” file in Windows 10？

How to run “run_extract_feat.sh” file in Windows 10？

Open Git Bash in the directory and run "sh run_extract_feat.sh"

Thanks @JohnMath3w for the kind response.
Yes, zxq2233, you can use the window bash tools.  Or you can even run the actual code in the shell script. It's not a big deal.
Please search for the information on Google.


text:
how can i use this inside model class path?

how can i use this pdo object inside user model class path? for make database access easier and more efficient
$records = $db->table('users')
->getAll();
class User
{
public $id;
public $name;

public function getName()
{
     return $this->name;
}

}
some thing like that $result = $pdo->fetchAll(PDO::FETCH_CLASS, "User");

Hi @tonmooy ,
You can use like that:
$db->...()->fetchAll('class', 'YOUR_CLASS_NAME');
// or
$db->...()->getAll('class', 'YOUR_CLASS_NAME');

First parameter is fetch type for PDOx.
Thanks.

Hi @tonmooy ,
You can use like that:
$db->...()->fetchAll('class', 'YOUR_CLASS_NAME');
// or
$db->...()->getAll('class', 'YOUR_CLASS_NAME');

First parameter is fetch type for PDOx.
Thanks.

thank you it's working now

authors: izniburak tonmooy

repo: izniburak/pdox


text:
[WIP] Refactor rescheduling things

:warning: Please do not merge :exclamation: :warning:
By this change

Change Rescheduling to Rescheduling::Base
Add new 2 models, Rescheduling::Addition and Rescheduling::Cancel, inherited Rescheduling::Base

Breaking changes

Remove DatePeriod
Recreate reschedulings table (needs rake db:migrate:reset)
Split Rescheduling into Rescheduling::Addition and Rescheduling::Cancel
Remove Rescheduling.before_date_period and Rescheduling.after_date_period

TODO

[x] Remove DatePeriod
[x] Remove DatePeriodBuilder and its spec
[x] Fix Rescheduling model things

[x] Change reschedulings columns
[x] Fix its factory
[x] Fix associations
[x] Fix scopes

[x] Remove ReschedulingValidator and its spec
[x] Remove ReschedulingForm
[x] Fix API
[x] Fix reschedulings registration flow

[x] Fix staffs/rescheduilngs/{classes,lecturers}#timetable view
[x] Fix staffs/reschedulings#create and its spec
[x] Extra (or Addition)
[x] Cancel

[x] Fix the list view of reschedulings

[x] /reschedulings
[x] /staffs/reschedulings

Coverage decreased (-0.6%) to 95.49% when pulling d7186f473a7223b3776e2fbe91885a9c6412dee9 on refactor-rescheduling-things into c2f2db3322182d159ceb1a4296d462f72d0de79c on master.

Coverage decreased (-0.57%) to 95.52% when pulling 5a4caa153ff052d2c930ec8cbe0e1189eafac9ac on refactor-rescheduling-things into c2f2db3322182d159ceb1a4296d462f72d0de79c on master.

Coverage decreased (-0.93%) to 95.16% when pulling e1f1e106b668cfc4889e2ee8d52eb75086cf7eed on refactor-rescheduling-things into 908ad356f0b9a73611876ccf54e5e7c1ec82bae8 on master.

膨らみすぎてよくわからなくなってきたので一旦close :scream:


text:
What's the purpose of this module?

As the title says, play store already allows you to turn off auto updates for certain apps so why?

play store updates apps after some period of time ignoring that option. mindetach blocks that and also removes those apps from the update list and notifications.

authors: j-hc xslvrxslwt

repo: j-hc/mindetach-magisk


text:
test issue

please assign it to me

/assign

/assign

/assign

authors: Pygithub-bots j-imy

repo: j-imy/hackathon


text:
🛑 JaKeJu Calibre-Web is down

In 9df0a4b, JaKeJu Calibre-Web ($SECRET_SITE_1) was down:

HTTP code: 0
Response time: 0 ms

Resolved: JaKeJu Calibre-Web is back up in 57c4227.

repo: ja-m/Mader-Monitoring


text:
🛑 JaKeJu Calibre-Web (direct) is down

In aaaa277, JaKeJu Calibre-Web (direct) ($SECRET_SITE_2:8000) was down:

HTTP code: 0
Response time: 0 ms

Resolved: JaKeJu Calibre-Web (direct) is back up in 32c498a.


text:
Programar colisão entre personagens, objetos interativos e mapa

Depende de #21 e #26

Testar se está funcionando

Colisão no mapa em cena-p.js --> cena_principal --> linhas 240 a 241.


text:
The hidden menu bar icon can be displayed below the menu bar(隐藏菜单栏图标可以在菜单栏下面显示)

On Mac laptops with bangs, if there are too many icons in the menu bar and you don't want to hide the bangs, hiding them is not a problem. However, due to the large number of icons, the bangs may not be fully displayed. Therefore, it is hoped that hidden menu bar icons can be added to display under the menu bar to avoid such situations
在有刘海的 Mac 笔记本上，在不想隐藏刘海的情况下，如果菜单栏的图标多了，隐藏了没问题，但是显示的时候因为图标多，还是会在刘海部分显示不全，所以希望加入隐藏的菜单栏图标可以在菜单栏下面显示，这样就可以避免这样的情况了

Even if the bangs are hidden, they cannot be fully displayed (隐藏了刘海儿也显示不全)

Bartender是支持类似功能的，但是需要录制屏幕权限。而且在macOS 14之后的系统上经常会存在bug，目前似乎没有更好的实现方式，所以一直没有集成类似的功能。

authors: jacklandrin zxitedu

repo: jacklandrin/OnlySwitch


text:
Cannot specify max_tokens in OpenaiChatModel

I'm using a Llama_cpp backend that imitates OpenAI's API. Its default max_tokens is set to 10 whereas OpenAI's default is set to None (I think). Without the ability to specify max_tokens, I cannot use Magentic with OSS LLMs :(

@tranhoangnguyen03 Thanks for reporting this! I've added this param now and released as https://github.com/jackmpcollins/magentic/releases/tag/v0.7.2  Please let me know if have any more issues.

repo: jackmpcollins/magentic


text:
How to Zoom In or Zoom out for a particular node if selected?

It is hard to find Sigma methods like sigma.getCamera() or sigma.getmousecaptor(). Is there any website or documentation which has these all methods listed? I want to zoom in on a particular node when selected and zoom out after clicked somewhere else. Like I want to position the graph in its initial form after some clicks.

This is what I use to center the graph on a node :
function gotoNode(sigma: Sigma, nodeKey: string) => {
      // Get the node display data (ie. its coordinate relative to the actual camera state)
      const nodeDisplayData = sigma.getNodeDisplayData(nodeKey);
      if (nodeDisplayData) {
        // calling the animate function to go to the node coordinates
        sigma.getCamera().animate(nodeDisplayData);
     }
}

If you want to zoom in / out, you have to specify the ratio like that : sigma.getCamera().animate({...nodeDisplayData, ratio: 1});
You can try to click on a node on this codesandbox : https://codesandbox.io/s/issue-1266-ivvneg

This is what I use to center the graph on a node :
function gotoNode(sigma: Sigma, nodeKey: string) => {
      // Get the node display data (ie. its coordinate relative to the actual camera state)
      const nodeDisplayData = sigma.getNodeDisplayData(nodeKey);
      if (nodeDisplayData) {
        // calling the animate function to go to the node coordinates
        sigma.getCamera().animate(nodeDisplayData);
     }
}

If you want to zoom in / out, you have to specify the ratio like that : sigma.getCamera().animate({...nodeDisplayData, ratio: 1});
You can try to click on a node on this codesandbox : https://codesandbox.io/s/issue-1266-ivvneg

I get it - how to zoom in on a node - but I want to zoom out after zooming in!!

I don't see what you mean by "zoom out after zoom in"

I don't see what you mean by "zoom out after zoom in"

For example, https://www.sigmajs.org/demo/index.html on this page - there is a demo containing three buttons in the bottom left. I want to do what the last button does - it recenters and rescales the graph. The problem is the demo code is in react.js and I want to do it in simple typescript.

To reset the camera state (and so view the entire graph), you have to do : sigma.getCamera().animatedReset({})
You can check the code of the react sigma here :
https://github.com/sim51/react-sigma/blob/main/packages/core/src/hooks/useCamera.ts#L49


text:
Approx. Release of v3

First of all, thank you for your great work on this library! I am just starting a new project where I need a library that supports the layouting and rendering of networks with ~5k nodes and ~50k links. I'm currently looking into possible libraries, and I really like sigma.js. I saw that you recently released v3.0 alpha. So I would like to ask if you have an approximate date when you will release the final v3 version, so I can include the latest version in my considerations. Thanks a lot! :)

following the issue...

Yeah, I'm also inquisitive. It would be such a pity to set up everything in the current v2.4 (or similar), and then v3 is released with breaking changes... :D

The main reason we started working on a v3 is because we found some issues with the main renderers that required some breaking changes to be fixed. Then, we thought about what we should break at the same time, taking this new version as an opportunity.
We are starting to get a more precise roadmap (here, and not yet complete), and I hope we can release a proper v3 in 2023.

@Gykonik for the moment, custom renderers are the only thing impacted. Moving to v3 will take a bit of work - however, it will be way easier to develop custom renderers as well.
You can compare:

The main node program in v2
The main node program in v3

authors: Gykonik jacomyal wthrajat


text:
Ajouter une recette de poutine

Si tu as faim, n'oublie pas ceci : Une poutine par jour éloigne le docteur pour toujours.

Après l'étude du changement, nous ne conserverons pas la recette de poutine dans le readme.


text:
Switch to Typescript

I was planning on writing my own scraper but it's probably more useful for others if I contribute to this instead. I much prefer working with Typescript, would you accept a PR converting this project to Typescript?
Would understand completely if you don't want to.
Note I also found this library which seems kind of similar: https://github.com/thelifenadine/recipe-data-scraper

I'd gladly accept a PR that converts to TS. I've been using it at work the last year and can't imagine going back now. I checked out that other scraper. They are using JSON-LD which a recent contributor used for some scrapes. I'll likely add this in the future so we can have a generalized scrape to catch websites that don't have a dedicated one.

Just letting you know I decided not to do this as it seems pretty much all sites are using JSON-LD now so it was pretty easy to just roll my own.


text:
Ruby / Rails client

Is it there any work to add a ruby client?
If it is not, Is it possible to use zipkin-ruby with jaeger?

There is currently no Jaeger client in Ruby. A contribution would be awesome (but I don't think Ruby opentracing API is finalized).
I don't know how zipkin-ruby sends the traces out of process, but if it's in zipkin thrift format over HTTP, then Jaeger backend can accept them.

do you mean this one? https://github.com/opentracing/opentracing-ruby

Yes. I didn't follow it too closely as I don't know Ruby that well, but it looks like it might be in the "released" state already. @tedsuo do you know what the state of Ruby API?

I would be able to help in ruby side of things :)
On Thu, 13 Jul 2017 at 16:46 Yuri Shkuro notifications@github.com wrote:

Yes. I didn't follow it too closely as I don't know Ruby that well, but it
looks like it might be in the "released" state already. @tedsuo
https://github.com/tedsuo do you know what the state of Ruby API?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/uber/jaeger/issues/268#issuecomment-315099851, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAGGV_Mg0Gdf_MsruW-V3CDt1MLkkVLEks5sNi21gaJpZM4OXD-s
.

So as a guideline, the following is a rough outline for getting a new client out:

setup new project, travis build, code coverage, release publishing, etc.
implement basic tracer & span functionality with a simple 100% sampling & a configuration mechanism
implement remote reporter with abstract sender
implement UDP or HTTP sender or both
implement other samplers (probabilistic, rate limiting)
implement remote sampler that pulls sampling strategy from the agent
implement adaptive sampler
optionally other features like baggage whitelisting

Steps 5-8 could be added later, 1-4 are needed to get a minimal viable client.

I will need to get familiar with opentrace first
On Thu, 13 Jul 2017 at 17:13 Yuri Shkuro notifications@github.com wrote:

So as a guideline, the following is a rough outline for getting a new
client out:

setup new project, travis build, code coverage, release publishing,
etc.
implement basic tracer & span functionality with a simple 100%
sampling & a configuration mechanism
implement remote reporter with abstract sender
implement UDP or HTTP sender or both
implement other samplers (probabilistic, rate limiting)
implement remote sampler that pulls sampling strategy from the agent
implement adaptive sampler
optionally other features like baggage whitelisting

Steps 5-8 could be added later, 1-4 are needed to get a minimal viable
client.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/uber/jaeger/issues/268#issuecomment-315108578, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAGGV0vGK-CIFBCycQs0C16j2QCz5Plwks5sNjQrgaJpZM4OXD-s
.

@yurishkuro I've been concentrating on Java/Python/C++11, was going to look at ruby after python. The ruby API will need context management at some point just like the others, but otherwise I can say it is in production and working at LightStep.

I published a very basic ruby client some time ago: https://github.com/salemove/jaeger-client-ruby

@indrekj would you be interested in having the Ruby client as part of this organization?

For info I use opencensus-ruby in production to communicate with Jaeger via opencensus-ruby-exporter-jaeger and I'm pretty happy with it.
Notes:

OpenTracing and OpenCensus are merging into OpenTelemetry
If you want Sidekiq integration this is what we're using

Per #3362, we're sunsetting Jaeger clients.

authors: danielmbarlow indrekj jalberto jpkrohling tedsuo yurishkuro

repo: jaegertracing/jaeger


text:
Add physical dynamics

In a SoS, many elements are physical, which means that they have a material state and some dynamic relations that describe how states change over time. Many SoS agents (constituent systems) also have a physical representation, in addition to its mental capabilities. To capture this, a class of physical entities is needed.
As an example, a vehicle is a physical entity that has position, speed and heading. The driver can affect acceleration and steering angle, and this is fed into the dynamic relations to update the vehicle state.
Another example is the loads carried by vehicles. This could have physical properties, that change over time, such as deteriorating quality of food. Further examples include weather, or forest fires. All these are purely physical, and not social, but can still be affected by the social agents.
It is probably necessary to represent the nature of physical objects and socio-physical agents in the code to give the desired generality.

A module dynamics has been added. It currently contains declaration and access to state variables. Actuation variables could be added as well, and these could be set by act. The dynamics then becomes a function from current state variables and actuation variables, to new values of the state variables.
Since the agent act function is only called when the pre-conditions are true, it might be useful to have also a no_act function, which is called when they are false. Alternatively, provide a boolean argument to act, and pass the pre-condition to it. It should then be called always. As an example, if the actuation in vehicles are changed to speed and heading, the speed should be set to 1 if preconditions are met, and 0 otherwise.
Some state variables may require special treatment. An example is pos, which is changed by the space move function. To handle this, it might be necessary to define pos as a property rather than an attribute, and let its set function call space move.

repo: jakobaxelsson/sossim


text:
docs: Fix typo and add contributing section

Fix typo in Readme and Contributing files
Add Contributing section
Add question mark on questions Why Choose This and Why AVOID This

Close #1

Thanks! @all-contributors please add @TAKANOME-DEV for doc help

authors: TAKANOME-DEV jakobo

repo: jakobo/docmq


text:
Allow authentication via query string token

Sometimes it is not possible to supply a cookie for authentication. In this case one can add the authentication string via &authToken=asdfge342qwa... to the request.

Hi, I'm trying to figure out how to authenticate using an http header (I'm using play to develop a webservice). When I call /auth/authenticate/userpass/ with X-Auth-UserId and X-Auth-Password, it says a CSRF token is missing.
Do you have an example ?

@didmar I also need to authenticate without csrf and using an http header. Could you please share an example ?

@UITriX here you go: https://github.com/didmar/securesocial_ws_sample

authors: UlTriX didmar tmbo

repo: jaliss/securesocial


text:
Dealing with pre-mapped values in #[bw]

I've run into a problem a few times while writing a protocol codec, and while I've been able to handle it via various workarounds, it's come up enough times that it seems like it would be worth bringing up to see if there could be a better solution for this.
Suppose I have code something like this:
pub enum Mode {
    Regular = 1,
    Extended = 2,
    Special = 3
}

impl Mode {
    // The actual implementations of this conversion are not important, but assume they are non-trivial, i.e., they cannot be replaced by a `#[brw(repr(u32))]` or so on, and that it would be burdensome to run them more than necessary.
    // In many cases, rather than u32, this would be some other struct or say a Vec, but it's u32 here for the sake of making the example easier to understand.
    pub fn from_u32(value: u32) -> Result<Self, _> { ... }
    pub fn to_u32(&self) -> Result<u32, _> { ... }
}

#[binrw]
pub enum Packet {
    SomethingPacket {
        value: u8,
        #[br(try_map=|v: u32| Mode::from_u32(v))]
        #[bw(try_map=|v: &Mode| v.to_u32())]
        mode: Mode,
        #[brw(if(matches!(mode, Mode::Special)))]  // Here is where the issue is
        special_data: u8,
    },
    ... // Other packet types not included for brevity
}

This code, as written, doesn't work because while mode is Mode in the br half of the if, it's u32 in the bw half because of the mapping applied. Workaround ideas include:
Move the map implementations to Mode
If Mode were a struct, we might be able to do the following:
#[binrw]
#[br(try_map=|v: u32| Mode::from_u32(v))]
#[bw(try_map=|v: &Mode| v.to_u32())]
pub struct Mode {
    ...
}

However, when Mode is a unit enum it does not work because:
BinRead on unit-like enums requires either `#[br(repr = ...)]` on the enum or `#[br(magic = ...)]` on at least one variant
BinWrite on unit-like enums requires either `#[bw(repr = ...)]` on the enum or `#[bw(magic = ...)]` on at least one variant

Just convert it again
This approach, while it again does work, is sort of awkward and undesirable for a few reasons.
        #[br(if(matches!(mode, Mode::Special)))]
        #[bw(if(matches!(mode.from_u32().unwrap(), Mode::Special)))]
        special_data: u8,

Because, in our example, our from_u32 is non-trivial, we would prefer to not have to run it when serializing. In addition, while in theory the conversion should never fail (providing that from_u32 and to_u32 do a valid roundtrip), there is no try_if, so either we have to risk a panic as above, or do the following, which would instead suppress errors and potentially produce an invalid serialization.
        #[br(if(matches!(mode, Mode::Special)))]
        #[bw(if(matches!(mode.from_u32(), Ok(Mode::Special))))]
        special_data: u8,

Use self instead of the field
If packet were a struct, using self to get the field would make things easy. But because Packet is an enum, trying to match the mode field of SomethingPacket instead requires matching self in its entirety. It works, but it's kind of awkward.
        #[br(if(matches!(mode, Mode::Special)))]
        #[bw(if(matches!(self, Packet::SomethingPacket { mode: Mode::Special, .. })))]
        special_data: u8,

This approach is currently my preferred since it's the one that seems to have the least compromises and is most likely to get rustc to optimize it away.
Ideally there would be some easy way to access the pre-mapped fields here. There are a number of situations where you would want the post-mapped values also, so I'm not sure how the implemented version would look, but at the moment a lot of the workarounds seem to be less than ideal.

You can always decide to write your own parsers and writers. There you can both have the pre-mapped version and post-mapped version in separate variables.
I think this is the easiest way to get really customized parsing/writing
See
https://docs.rs/binrw/latest/binrw/docs/attribute/index.html#custom-parserswriters
If you need some special argument from a parent structure you can simply add the argument to your function signature and pass it down via args
https://docs.rs/binrw/latest/binrw/docs/attribute/index.html#arguments

authors: Gorialis Krensi


text:
(Testing: do not merge) Web Editor Pull Request

Web Editor update

#label: "docs-editor"

repo: jamarw/Contribute


text:
🛑 Portal is down

In b772884, Portal (https://portal.cnap.dso.mil) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Portal is back up in b2c62bc after 3 minutes.

repo: james-martinez/dso-mil


text:
🛑 Repo1 is down

In 2a8bb6c, Repo1 (https://repo1.dso.mil) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Repo1 is back up in 5e2d22f after 4 minutes.


text:
java.lang.AssertionError:  Expected: a string containing ""identifier":" in ca.uhn.fhir.rest.server.ServerFeaturesTest

James,
after refreshing hapi-fhir-structures-dstu from the trunk repo I'm getting this error:
Running ca.uhn.fhir.rest.server.ServerFeaturesTest
Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.651 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.ServerFeaturesTest
testAcceptHeaderWithMultiple(ca.uhn.fhir.rest.server.ServerFeaturesTest)  Time elapsed: 0.007 sec  <<< FAILURE!
java.lang.AssertionError:
Expected: a string containing ""identifier":"
but: was ""
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:956)
at org.junit.Assert.assertThat(Assert.java:923)
at ca.uhn.fhir.rest.server.ServerFeaturesTest.testAcceptHeaderWithMultiple(ServerFeaturesTest.java:155)
If I change line 155 to:
assertThat(responseContent, StringContains.containsString("identifier"));
it passes.
I'm assuming that you are only looking for the identifier element?

Can you please sync again? This was actually the unit test catching a
problem with a recent commit.
On Wed, Jun 17, 2015 at 3:58 PM, Paul Pogonoski notifications@github.com
wrote:

James,
after refreshing hapi-fhir-structures-dstu from the trunk repo I'm getting
this error:
Running ca.uhn.fhir.rest.server.ServerFeaturesTest
Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.651 sec
<<< FAILURE! - in ca.uhn.fhir.rest.server.ServerFeaturesTest
testAcceptHeaderWithMultiple(ca.uhn.fhir.rest.server.ServerFeaturesTest)
Time elapsed: 0.007 sec <<< FAILURE!
java.lang.AssertionError:
Expected: a string containing ""identifier":"
but: was ""
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:956)
at org.junit.Assert.assertThat(Assert.java:923)
at
ca.uhn.fhir.rest.server.ServerFeaturesTest.testAcceptHeaderWithMultiple(ServerFeaturesTest.java:155)
If I change line 155 to:
assertThat(responseContent, StringContains.containsString("identifier"));
it passes.
I'm assuming that you are only looking for the identifier element?
—
Reply to this email directly or view it on GitHub
https://github.com/jamesagnew/hapi-fhir/issues/186.

yep..it's gone now. ;-)
thanks

repo: jamesagnew/hapi-fhir


text:
test passing multiple files

I noticed that my previous changes from https://github.com/jameshanlon/netlist-paths/pull/24  also enable passing multiple files to compile.
This adds some basic tests for this feature, which I actually find quite useful when dealing with a netlist and cell libraries.

Looks good to me!

authors: heiner-bauer jameshanlon

repo: jameshanlon/netlist-paths


text:
Reimplement fixed types like types in magma

Each named type would have a metatable of ops that Systolic values could be dispatched to. ie. do plus on a FIXED type, it would dispatch to the type's metatable, which would then return a systolic value.

One issue with this is that we want the module signatures to actually match the type. IE if fixed:add dispatches to uint:add, we do want the result of the add to be a fixed type, not a unit. How does that work?

It seems like this is just a code organization change w/o any savings of complexity. We could either write 1 typechecking fn with switch statement on type, or N types that are dispatched to. Closed b/c  this doesn't clearly provide a complexity improvement.

repo: jameshegarty/rigel


text:
Comparison to Xamarin.Forms.Application.Properties

How does this package compare to the functionality in Xamarin.Forms.Application.Properties?
Some write-up in the readme would be helpful, since the readme implies this package is useful with Xamarin Forms, and yet there seems to be considerable overlap between this package and what's build into Xamarin Forms.

See: https://github.com/jamesmontemagno/SettingsPlugin/issues/56

authors: breyed jamesmontemagno

repo: jamesmontemagno/SettingsPlugin


text:
Xam.Plugin.Geolocator Exception - A task was canceled.

Please take a moment to fill out the following (change to preview to check or place x in []) and remove all unused areas
This is a

[x] Bug

Which plugin does this impact:

[x] Geolocator

Bug
Version Number of Plugin:Xam.Plugin.Geolocator.3.0.4
Device Tested On:Android 4.4
Simulator Tested On:Android 4.4
Expected Behavior
Get current location.
Actual Behavior
Get an error : A task was canceled.
Steps to reproduce the Behavior
Code:
var locator = CrossGeolocator.Current;
if (locator.IsGeolocationAvailable && locator.IsGeolocationEnabled)
{
locator.DesiredAccuracy = 50;
var position = await locator.GetPositionAsync(timeoutMilliseconds: 10000);
CurrentLocation = new LocationModel
{
Name = Constants.CURRENT_LOCATION,
Latitude = position.Latitude,
Longitude = position.Longitude
};
}
Error Message:
A task was canceled.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0002d] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:193    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable 1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:580    at Plugin.Geolocator.GeolocatorImplementation+<GetPositionAsync>d__27.MoveNext () [0x00597] in C:\projects\xamarin-plugins\Geolocator\Geolocator\Geolocator.Plugin.Android\GeolocatorImplementation.cs:175  --- End of stack trace from previous location where exception was thrown ---   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00027] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:190    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142    at System.Runtime.CompilerServices.TaskAwaiter 1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:372

It timed out, you can increase your timeout and make sure to wrap in a try/catch statement.

@jamesmontemagno Even if I set for 30 minutes, it's still threw an exception.

Same issue here! Help!

Are you checking on actual device or simulator?
It throws this exception only on simulator. On an actual device its working fine.

I haven not had any issues on Visual Studio emulators for Android, Xamarin Android player, or google emulators. Make sure the emulator support it.

thanks jamesmontemagno,,you make a great plugin......but i met the same issue on my phone.....but i can get my position while use google map.

I have the same problem, it was working for a pair of hours. but now I can't make it work.
Plese helpppp..

Had the same problem here. I thought some devices were ok, some devices not ok. So I restarted the device that was not OK to my surprise then it worked. I ignore what is going on though

I have same issue, even in physical device.
Some times works, some times not. The most important is that I'm not able to catch the error and continue the program, it just crash the app (I'm new on xamarin and mobile development).

Same problem on the emulator...

geolocator crash everytime

Same problem here. Any solution found yet?

If you use an emulator you have to click the send location in the settings each time of the google emulator. It doesn't cache the actual location.

Hey James, your efforts in creating plugins are really of help.
This issue might not be from the plugin nor from Xamarin but I found this android issue. This issue is open since 2013, and there was no solid solution for the same
here is the link: "onLocationChanged" is not called(LocationManager using Network Provider)
Still if anyone comes up with some work around for the same, it would be great, cause one of our testing teams device is trapped under this situation 😫  .

Same problem here.
Version 5.0.0-beta124

same problem here. did anyone find solution please post here.

  <uses-feature android:name="android.hardware.location.gps" />
  <uses-feature android:name="android.hardware.location.network" />

Adding this in my mainfest.xml  and increase timeout like 30 seconds
solved my problem

I banged my head for a while on this issue. To solve this, catch the taskCanceledException. When you get this, ask the user to open Google Map, to locate the device then to come back in the app.

@DanielEnid this worked for me, i only opened google maps and go back to the app and everything has worked fine

authors: DanielEnid GaboSchool R11812 Sivamuralidhar ak47akshaykulkarni altondevir angelieri giamba61 gsaldana gustblima imicer jamesmontemagno jdamasceno lylxiaole meluamarilla tcthechamp trilm208


text:
Question: how to explore a data dump?

Apologies if this is the wrong venue for questions, but:
I recently changed my read-XML-and-dump-postcard code to use quick-xml's serde integration instead of reading XML manually, using the usual serde annotations on my structs here and there instead of FromStr. The postcard dump is now 1MB larger and I don't understand why. Is there some tooling to help me understand where that MB is coming from?

Hey! I don't necessarily have an off-the-shelf tool for you, but it might be worth looking at the two experimental features, which can get you a Schema and MAX_SIZE for a given type. This might aid in your diff.
If that doesn't work, and you can give me a smaller repro case (with types used and before/after data), I can take a look!

authors: jamesmunns madig

repo: jamesmunns/postcard


text:
Groups in groups

It would be great if this library supported "groups in groups".

This issues was fixed by PR https://github.com/jamesscottbrown/pyyed/pull/21.

authors: jamesscottbrown mheden

repo: jamesscottbrown/pyyed


text:
Ra

What does this PR do?

Fixes # (issue)
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you read the contributor guideline,
Pull Request section?
[ ] Was this discussed/approved via a Github issue or the forum? Please add a link
to it if that's the case.
[ ] Did you make sure to update the documentation with your changes? Here are the
documentation guidelines, and
here are tips on formatting docstrings.
[ ] Did you write any new necessary tests?

Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

authors: HuggingFaceDocBuilderDev jamesthesnake

repo: jamesthesnake/transformerst


text:
Finish Snapshot API

This PR completes the Snapshot API implementation. Also implemented EntityQueryResponse as a driveby.
Work left to do:

[x] Move generate_snapshot to examples.
[x] Find a way to test snapshot output and input programatically. (This requires code generation so will probably require a separate project)
[x] Some TODOs littered in the codebase.

Unresolved questions:

[ ] Currently the implementation pre-supposes the ComponentDatabase exists. This should probably be refactored to have the option for custom vtables. Not sure how urgent this is?

Fixes #13

Haven't yet had a chance to review the PR, but with regards to your unresolved question:

Currently the implementation pre-supposes the ComponentDatabase exists. This should probably be refactored to have the option for custom vtables.

Could you elaborate on what you mean here? Do we potentially want a different serialization solution when working with snapshots vs when running a worker?

Agreed with @randomPoison - I would say that it's fine to assume a component database exists. It doesn't even make sense to serialize/deserialize a snapshot without one anyway without providing a custom vtable, but why should vtable logic be different compared to the connection?

This is more related to if a user wants to write their own code generation we are locking them into ComponentDatabase and inventory. Until we have a strong use case against this - I'm fine with leaving this in.

Yeah, I'd wait til then. However, I think we may want to allow users to disable the component database and pass in their own Schema objects.

Sounds like a good use case for Cargo features. I think it should be that the component vtable approach is opt-out rather than opt-in.
Might end up looking something like the C# SDKs structure 😉

authors: davedissian jamiebrynes7 randomPoison


text:
Not able to read the step definitions when the serenity js is added.

When i use the cucumber 3 with protractor and typescript. I is working fine.  Then i added the serenity js library into the config file. I am getting steps are undefined log message.
Please find the link below. https://stackoverflow.com/q/46792889/8779018
Please find where i am going wrong

Serenity/JS doesn't support Cucumber 3 just yet, but I'm planning to work on this shortly.
I'm also open to pull requests if anyone would like to help out.

Hi Jan, that is why I am using cucumber 1.3.3 or 1.3.2 version.
But when I run the cucumber tests the step definitions are not getting recognised. It's showing undefined implementation. I have tried with all the possibilities.
Please go throw the above link of stack overflow.  I have shared even the log file with config, feature, steps files and require files.

Ah OK, your original question mentions Cucumber 3, hence my response.
From what I can see in the examples in your StackOverflow question the problem is caused by the incorrect configuration of the feature files path. It doesn't seem to have anything to do with Serenity/JS, but I'll try to help you out regardless ;-)
So your project is stored under:
R:\protractor\protractorcucumber_typescript

You have a protractor.conf.ts file in that directory:
R:\protractor\protractorcucumber_typescript\protractor.conf.ts

And your feature files live under features here:
R:\protractor\protractorcucumber_typescript\features

That all makes perfect sense, but then in the protractor.conf.ts you state the following:
    specs: ['./features/**/*.feature'],     // `./` is unnecessary here
    cucumberOpts: {
        require: ['/features/**/*Page.ts'], // the first slash incorrectly indicates the root directory, so R:\ in your case
        format: "pretty",
        compiler: "ts:ts-node/register",
    },

Instead, specify the path in the same way as in the seed project, so:
    specs: ['features/**/*.feature'],       // no `./`
    cucumberOpts: {
        require: ['features/**/*Page.ts'], // no forward slash at the beginning
        format: "pretty",
        compiler: "ts:ts-node/register",
    },

Hope that helps!
Jan

repo: jan-molak/serenity-js


text:
broken with 4.02.3

# File "src/gen/common.ml", line 74, characters 10-20:
# Error: This variant pattern is expected to have type Types.type_expr list
#        The constructor Cstr_tuple does not belong to type list

Which version of ppx_core?

authors: diml vbmithr


text:
Add janhelgehoyland's file

add slide file

c

repo: janhelgehoyland/github-slideshow


text:
Enable full-screen

Closes #252.
This PR enables full-screen for both native and web builds.
Unfortunately this makes the web page a bit less pretty until the game loads in.
I propose to fix that with a proper loading screen (in HTML/JS), I have a prototype for that here: https://github.com/ramirezmike/game_off_2022/pull/1.
That's a topic for a future PR though.
TODO
Because we lose the window, we also lose the ability to exit the game on native builds. Whoops!
We should add an exit button to the pause menu to fix this.

Do you prefer Fullscreen or Borderless Window as a default?

Borderless window please :)

I realize this is still a draft, but just in case, FYI: you remove --game-ui-height from the css, but the code still references it.

@janhohenheim This should be ready to review now.
The quit button is ugly and the quit on WASM a bit hacky, but it seems to work :)

LGTM!

authors: TimJentzsch janhohenheim

repo: janhohenheim/foxtrot


text:
Feature/fix esm for webpack

All previous changes are upgrading the package to ESM, but it still breaks when we try to load the package as a module with the webpack loader. It is now clear that all the changes that were needed for jest are causing this. This pull request will reset the changes for jest, making it possible to load the package with webpack loader and we simply kick out jest in favor of vitest.

I don’t think that a small package like css-variable should dictate the testing stack of a project

i'm not talking about kicking out jest in our iso monorepo, i'm talking about switching css-variable from jest to vitest... i didn't push the changeset actually doing that yet because i still have an issue with one snapshot test after the switch

authors: jantimon rvetere

repo: jantimon/css-variable


text:
chore: sync yarn.lock

Running yarn install on main results in the following diff

Seems related to  https://issues.redhat.com/browse/RHIDP-1203 / https://issues.redhat.com/browse/RHIDP-1204
I'm happy to merge this but would prefer to avoid this in future. WDYT about this suggestion? https://issues.redhat.com/browse/RHIDP-1204?focusedId=24498905&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-24498905

Seems related to https://issues.redhat.com/browse/RHIDP-1203 / https://issues.redhat.com/browse/RHIDP-1204
I'm happy to merge this but would prefer to avoid this in future. WDYT about this suggestion? https://issues.redhat.com/browse/RHIDP-1204?focusedId=24498905&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-24498905

Ideally it's good to handle this in PR checks as you suggested but added this manual as we don't have it yet.

authors: invincibleJai nickboldt

repo: janus-idp/backstage-plugins


text:
RHIDP-3248: fix(learningpath): restore spacing between cards

Description
Fixes: https://issues.redhat.com/browse/RHIDP-3248
With #1379 the @mui/material package is updated from 5.15.21 to 5.16.0 which breaks the learning path page.

Removed an extra layer of Grid that wasn't necessary.
Also replaced the custom CSS rule textDecoration: 'none' with a Link prop .underline="none"

Some history:
1.0.0

1.1.0

1.2.0 branch (close to 1.2.2 release)

main branch (without latest theme, theme )

update-theme branch (with theme 0.1.7)

With this change on main

With this change on update-theme

Which issue(s) does this PR fix

Fixes TODO

PR acceptance criteria
Please make sure that the following steps are complete:

[ ] GitHub Actions are completed and successful
[ ] Unit Tests are updated and passing
[ ] E2E Tests are updated and passing
[ ] Documentation is updated if necessary (requirement for new features)
[x] Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

/cc @debsmita1

/approve

authors: invincibleJai jerolimov

repo: janus-idp/backstage-showcase


text:
General feedback

You can leave general feedback about the HAL here.

One thing I was wondering if it makes sense to further splits traits like Serial into two: one for Serial.read and another for Serial.write. My original thought was that such split would let you pick a different Error enum for each implementation; after all a read may run into different errors than a write. But I'm questioning how helpful is that in practice: on one hand higher level APIs will just try / ? several read and write calls so having a single error type makes unification simpler (there's only one Error enum); on the other hand even though read and write may cause different errors a write operation may encounter an error produced by a previous read call: should the write call not report that error? With two error types it may be impossible to report the error in that scenario.

My other question is where generic higher level abstractions like these should live? I would prefer to keep them in a different repository to keep the dependency count of this repo low. (I certainly don't want to make this crate depend on the futures crate.)

One quick thought, looking at how I'm currently doing serial/SPI and how I'd do it with this crate, is that in my applications almost all peripheral IO happens through DMA to large buffers, and almost none of it is word-at-a-time. How could the current traits be extended to support that sort of thing?
DMA fits very nicely into a variety of async patterns (since you start it, and then get an interrupt or can check a flag to see if it's done yet), and is generally faster and lower overhead. If I'm writing a high-level abstract library, say something to communicate packets over a UART with framing (so COBS or PPP style escapes), I'll want to tell the underlying hardware, via the HAL, to send/receive a whole &[Word] (or u8 for Serial but that should probably be Word too to handle 9-bit serial), and to tell me when it's done. Does that live as some new traits? Should the current traits have read_block and write_block style things, which could always fall back to a loop over read/write if there's no DMA support?

I agree with @adamgreig. Writing more bytes is a common thing. Maybe use something like genio would help. I think splitting Serial trait is good idea. Not just because of possibly different errors, but also possible consumers only using one half. Similar decision was made in case of tokio-io.

@adamgreig Yes, that would be in a different trait: SerialAsync with, for example, an #[async] write_all(&self, buf: &[u8]) -> Result<(), E> method where the default implementation (which you get for free if your Serial type implements the hal::Serial trait) makes progress word by word using Serial.write and await!. But you can specialize your write_all implementation to use the DMA under the hood. Wait, I take that back: having written a memory safe DMA transfer abstraction before I don't think both can have the same signature; with that signature you could (a) allocate a buffer on the stack, (b) start the async write_all operation that uses the DMA, (c) not complete the async operation and drop the generator, (d) free the buffer that was allocated on the stack (yes, the compiler won't complain in this case) and (e) have a Bad Day (the DMA transfer is still ongoing).
So, yeah I think stuff that uses the DMA will require different signatures / traits to actually be memory safe.
@Kixunil

but also possible consumers only using one half

That makes sense.

Maybe use something like genio would help

That seems to be a blocking API. We probably will want two APIs: a blocking way and a non blocking one.

That seems to be a blocking API.

As far as I understand, the only difference is Error type. You could easily bound by Read<ReadError=nb::Error<E>>
Maybe add some convenience traits or just duplicate those with slightly modified return types.

As far as I understand, the only difference is Error type. You could easily bound by Read<ReadError=nb::Error>

No, that wouldn't work for read_all / write_all. nb::Error and its associated macros are for retry-able operations who's retry operation doesn't require keeping / changing state. For operations that require a change of state you have to pick between futures, #[async] or blocking; you can't abstract over async-ness by changing the error type in that case because each model has a different function signature (-> impl Future vs #[async] -> Result vs -> Result).

I've opened PR #13, as I don't think we should use th nb crate -- futures will serve us just fine.
However, I think @adamgreig touches on a very important issue which is that we need ways to indicate that a whole buffer of data is ready. In std rust this would just be futures::Async<Vec<u8>> -- but obviously we can't use Vec!
In REQ-std I state that one core data type must be "buffering: creating global buffers and sharing them with functions and between threads". We must have core data types that enable sharing and returning of owned global buffers, as these kind of objects are extremely core to the operation of most embedded systems.
Then most of these IO features could be built on top of these buffers.

@japaric well, read_exact and write_all would both fail with nb::Error::WouldBlock, throwing away the state. Although it would be possible to use it without using such broken functions, I'm in favour of creating a new trait now.
That being said, I believe such trait should look like this:
trait AsyncRead {
    type ReadError;

                // Maybe some kind of buffer with possibly uninitialized memoy instead of [u8]?
    fn read(&mut [u8]) -> Result<usize, nb::Error<Self::ReadError>>;
}

Similar in case of Write.

Another thing to consider is where you would want to host libraries that are implemented using this hal. If I write say a stepper driver using the gpio hal, it would be nice if other people could easily find and use it. It could just be an index that someone maintains like the awesome rust page, or maybe something more involved like platformio

How will pin selection be handled? If there is overlap between, say, a GPIO line and a PWM channel line, will the HAL provide an error mechanism if one attempts to use both at the same time? Or is it possible that the svd2rust output already accounts for this (I haven't read into svd2rust thoroughly)? I can imagine one way to do this would be to make some sort of Pin struct that acts as a lock that a peripheral must acquire in order to work.
My apologies if this is a non-issue because of some implementation details I'm unaware of :)

Also a few other API's you may want to consider adding are RTC, Clock speed selection (I know you've mentioned in the past leaving this up to the board support crates, but I think it's pretty common), power saving (setting sleep/stop/standby), attaching an interrupt to a pin (may be out of scope), and DAC.

I think we're mixing up what's wanted from a HAL. embedded-hal provides a bunch of generic traits which is really useful to build device-portable libraries on top of (sensor drivers, communication stacks, etc), but things like pin selection, clock selection, etc are rightfully out of scope for this crate.
Where they would be really nice is microcontroller-specific HALs that make configuring that microcontroller easier, and there you could totally imagine having something that checked that your pin selections made sense, etc. But I think that's a lot of work and by its nature can't be very cross-device without losing a lot of utility, just because so many features are so device-specific.

@adamgreig you're right, I was looking at this more as a platform (the hal being more generic than just for writing libraries). It does make sense for device specific settings to be in separate crates, I was just looking at this crate to be where the API for those interactions would be defined. It does make sense if that's out of scope for this crate, but I do think it should be considered in the early stages of design.

@nicholastmosher @etrombly
From the documentation

Out of scope

Initialization and configuration stuff like "ensure this serial interface and that SPI interface are not using the same pins". The HAL will focus on doing I/O.

Now I think that that ^ is a useful thing to have but it doesn't belong to this crate, to this set of traits. This set of traits has constraits around zero cost-ness and async model agnostic-ness that don't make sense for a configuration layer.
I have written my thoughts on configuration at the end of this comment. I'll eventually open an issue about configuration on the rust-embedded/rfcs so let's keep this thread on topic please.

No problem, I believe having a DAC API would still be in scope then, and is available on several of the stm32 chips.

We (https://github.com/embed-rs/) cannot use the APIs as suggested here, since the APIs take &self instead of &mut self, even if the method obviously needs to modify the hardware-state. We pass around owned handles to different parts of the hardware to prevent accidentally using the same registers twice from different drivers (On purpose is still possible with Rc). To make this really useful, all methods modifying the hardware need &mut references to the register.
I think changing the appropriate methods to &mut will also work for you, since the traits can be implemented on &SomeType instead of SomeType. What do you think?
cc @f-bro @phil-opp

@oli-obk good observation. &mut self is also useful in cases one wants to write "virtual" devices for tests. I agree the traits should take &mut self

@oli-obk Sounds good to me.

@oli-obk For the record, there might be some downsides in using unique &mut references for hardware instances, particularly related to the performance of single-threaded event-driven code, as well as general auditability. See this post for details. I guess this doesn't apply for accessing the same hardware from multiple threads, in which case there would unlikely be any other alternative to &mut references for safety guarantees.
cc @f-bro @phil-opp

@Protagores I don't think your and our method are in conflict. Inside the map function you have a mutable reference to the object and can therefor call the &mut methods.

@japaric @etrombly

My other question is where generic higher level abstractions like these should live?

It is mostly a matter how we want different people to cooperate.
The advantage of having separate repositories is, that there can be different maintainers and work-groups. As a side effect those API's are usually better documented and more stable.
My suggestion:
repository type a: RTFM core developers
repository type b: Driver developers for chips
repository type c: Driver developers for board X (who combine and configure a. and b.)
repository type d: End user ("user land developers" in traditional design)
It is worth do have a look in TockOS. They differentiate between "chips" and "boards" and have a "capsule" API for drivers.

I think this issue has served its purpose. The signature of the methods has changed from &self to &mut self and the higher level traits are also living in this crate / repo. If someone wants to raise a concern please open a more targeted issue.

authors: Kixunil Protagores adamgreig etrombly getreu japaric nicholastmosher oli-obk vitiral

repo: japaric/cortex-m-hal


text:
Keyword-based dynamic shader raster state

Currently, it is NOT possible to use conditional definitions (keywords) to change the RASTER STATE of a shader dynamically, because the shader raster state is compiled when the shader is first imported.
It is up for debate if this would be a useful enough feature to be considered, as currently you can achieve the same by calling Graphics.Driver.SetEnableDepthTest(enable) after calling Material.SetPass(...), overriding the raster state set by the material instance.
This is what I'd like to achieve:
Properties
{
	...
}

Pass 0
{
#ifdef ENABLE_DEPTH_TEST  // Conditional depth testing
	DepthTest On
	DepthWrite On
#else
	DepthTest Off
	DepthWrite Off
#endif

	Vertex
	{
		...
	}

	Fragment
	{
		...
	}
}

Then in C# we could use material.SetKeyword("ENABLE_DEPTH_TEST", enable) to dynamically change depth test state BEFORE calling Material.SetPass(...).

Most likely will not be implemented, as you can now use RasterState override methods added in https://github.com/japsuu/KorpiEngine/pull/19.
The example above can be achieved by calling
Graphics.Device.SetEnableDepthTest(enable, force);
Graphics.Device.SetEnableDepthWrite(enable, force);

before drawing with the material.

repo: japsuu/KorpiEngine


text:
Package size seems unreasonably big

The package install size of Razzle weighs 178MB:
https://packagephobia.now.sh/result?p=razzle
Seems mainly because of 20+ postcss related dependencies all around 1-2MB individually and rxjs adding 17MB.
Might be some opportunities to decrease this size.

@Siilwyn hello, maybe adding "sideEffects": false to package.json help you. this will help tree-shaking do its job better.
if you are using CSS or SASS in your project just specify them in sideEffects
"sideEffects": ["*.css"]

Hi @nimaa77 unfortunately that won't help since this is about the package install size. I've looked a bit more into this issue and looks like this size is caused by including dependencies for all plugins!

that's not that much big
if you fetch those packages once, they are going to be stored inside the yarn/npm cache storage on your local machine, if you are using CI/CD you have to enable cache between pipelines and in this way node_modules will be available between each step of CI/CD setup
sorry for my bad English :)

It's still a waste of space and 50+ MB packages really are uncommon.
Besides using Razzle in the context of serverless functions becomes harder since most cloud providers limit the size, e.g. AWS Lambdas can only be 50MB.

do you have any ideas about how we can fix this?

@nimaa77 I think somewhere a dependency of packages/razzle is requiring some example or maybe a devDependency down the line that in turn requires other dependencies?
Tried to look into it but got stuck since I can't seem to find out how the packages are published to replicate locally at least. Do you know more about this perhaps?

I don't know about the dependencies, but I think you can skip downloading dev dependencies with adding --production to install command:
npm install --production

one other thing that could be useful is that you can fork razzle and remove things you don't want and just deploy in inside Github Package Registry or just put the Github repo link into package.json

you can also watch for releases and get notified when a new version gets released so you don't miss anything

Does the size shrink if you bundle an app that uses razzle? I find this concerning, as I would like to push razzle into a lambda func for ssr.

As razzle has no runtime, you only need it in devDependencies, so it adds almost nothing to a production build.
I installed in a clean project here and got 139MB, majority from rxjs / jsdom / webpack:
 flightstats ✭ yarn why rxjs
yarn why v1.22.4
warning package.json: No license field
[1/4] 🤔  Why do we have the module "rxjs"...?
[2/4] 🚚  Initialising dependency graph...
warning No license field
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "rxjs@6.6.0"
info Reasons this module exists
   - "razzle#react-dev-utils#inquirer" depends on it
   - Hoisted from "razzle#react-dev-utils#inquirer#rxjs"
info Disk size without dependencies: "16.93MB"
info Disk size with unique dependencies: "16.98MB"
info Disk size with transitive dependencies: "16.98MB"
info Number of shared dependencies: 1
✨  Done in 0.71s.
 flightstats ✭ yarn why webpack
yarn why v1.22.4
warning package.json: No license field
[1/4] 🤔  Why do we have the module "webpack"...?
[2/4] 🚚  Initialising dependency graph...
warning No license field
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "webpack@4.43.0"
info Reasons this module exists
   - "razzle" depends on it
   - Hoisted from "razzle#webpack"
info Disk size without dependencies: "2.82MB"
info Disk size with unique dependencies: "8.82MB"
info Disk size with transitive dependencies: "24.78MB"
info Number of shared dependencies: 98
✨  Done in 0.72s.
 flightstats ✭ yarn why jsdom
yarn why v1.22.4
warning package.json: No license field
[1/4] 🤔  Why do we have the module "jsdom"...?
[2/4] 🚚  Initialising dependency graph...
warning No license field
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "jsdom@11.12.0"
info Reasons this module exists
   - "razzle#jest#jest-cli#jest-config#jest-environment-jsdom" depends on it
   - Hoisted from "razzle#jest#jest-cli#jest-config#jest-environment-jsdom#jsdom"
info Disk size without dependencies: "5.18MB"
info Disk size with unique dependencies: "9.28MB"
info Disk size with transitive dependencies: "21.28MB"
info Number of shared dependencies: 43
✨  Done in 0.69s.

This size is only in dev, if you use razzle in a lambda you are adding the dependencies in the wrong way. The way we could get the size down is to make css support be a plugin. But I think a CRA alternative like razzle should do css by default. If the output bundle is big. That is another case. Closing

authors: Siilwyn fivethreeo mikestopcontinues nimaa77 ricardobeat

repo: jaredpalmer/razzle


text:
The Net50 only nuget package doesn't have the ReferenceAssemblies.Net50 alias

Heya!
I was trying to move from the base package to the Basic.Reference.Assemblies.Net50 one, and had to change my code from using Basic.Reference.Assemblies.ReferenceAssemblies.Net50 to Basic.Reference.Assemblies.Net50.All.
It's not a big deal, but would be nice to either add the alias or change the readme to document that in the https://github.com/jaredpar/basic-reference-assemblies#what-if-i-only-need-a-single-target-framework section.
Thanks!

Good point. That would make it simpler to jump back and forth between the packages.

Closing as the base package no longer has these references after #27 is complete.

authors: belkiss jaredpar

repo: jaredpar/basic-reference-assemblies


text:
How to add Hint text ?

I can't add default item in spinner ? Please tell me how to do this ?

To set the default item use:
spinner.setSelectedIndex(defaultIndex);

To get the selected item:
spinner.getItems().get(spinner.getSelectedIndex())

authors: hiepbeos jaredrummler

repo: jaredrummler/MaterialSpinner


text:
fpgrowth error in R

I am trying to fit a fpgrowth model on a in-built data set called Adult. While fitting a model, I was getting an error as shown below.
Error in .jcall(jPruning, "[[Ljava/lang/String;", "fpgrowth", support,  :
method fpgrowth with signature (DDI)[[Ljava/lang/String; not found

I used the below R code to fit fpgrowth model.
library(rCBA)
data("Adult")
Adult<-as(Adult,"transactions")
rules = rCBA::fpgrowth(Adult, support=0.001, confidence=0.5, maxLength=2)

What's wrong with the above code?

I have the same issue. Below my code:
library(rCBA)
library(rJava)
data("iris")
train <- sapply(iris, as.factor)
train <- data.frame(train, check.names = FALSE)
transactions <- as(train, "transactions")
reglas <- fpgrowth(transactions, support = 0.01, confidence = 0.7, maxLength = 3, consequent = NULL, verbose = TRUE, parallel = FALSE)
summary(transactions)

The fpgrowth implementation is limited to specific format of rules now. You have to choose the consequent. The selected name will be thus the only member of the RHS of the rule and the remaining items will be on the LHS.
e.g.
# Adult
rules = rCBA::fpgrowth(Adult, support=0.001, confidence=0.5, maxLength=2, consequent="income")
# iris
reglas <- fpgrowth(transactions, support = 0.01, confidence = 0.7, maxLength = 3, consequent = "Species", verbose = TRUE, parallel = FALSE)

What would be the right consequent for Groceries data from arules package?
Link:
https://www.rdocumentation.org/packages/arules/versions/1.6-4/topics/Groceries

authors: JMason88 janpristovnik jaroslav-kuchar krskalla

repo: jaroslav-kuchar/rCBA


text:
Explicitly-specialize parsing for std::array, similarly to std::vector

Options of type std::vector have an explicit specialization of the option parsing template. This being the case, I believe it also makes sense to have a similar specialization for std::array<T,N>, which fails if more or less than N elements are provided - rather than the user having to check the size afterwards.

That seems reasonable, although slightly difficult since parameters can be specified multiple times to fill up a container.
It could be done with the option separator in a single option, but that might be a bit unintuitive.

can be specified multiple times to fill up a container.

Well, as they're collected, if they hit N, it'll just be an error...

I think that this would fit better with a separate options validation library, which I do have in mind to get to some day.

@jarro2783 : Well, when you write that, use it, but for now, this would be a relatively easy hack.