Cleaner functionality for custom constraints

I suggest adding some functionality that allows you to cleanly create custom constraints using the annotated objects. The functions provided with the library are incredibly useful, but trying to create custom constraints (even something as simple as negating a proposition) is clunky. Currently it seems like the only way to do it is to take care of the "abstract" annotated constraints first, then convert the theory to an NNF object and add extra constraints manually with an endless string of "&"s. Every proposition also has to be casted to an NNF variable, leading to a lot of verbose syntax for relatively simple statements.

All set w/ #90


Any interest in converting this into WPF?

I could help with that. I don't think it would take that much time. I have some hard time using the app on high resolution screens for example, especially when opening system dialogs, because they make the main app ultra small, it's clearly some dpi issue.
I mean I would start converting it right away but I don't want to fight with you. You know how it is, some creators are touchy when it comes to their babies, including me, so it's better to ask if such help is welcome.
Ondrej

Hi @OndrejValenta
Yes, if you'd like to convert this WinForms app to WPF, I think that would be a great improvement and I would appreciate any contributions.
Thank you.

Any progress on this?


Add actions copyDirectoryContent and runBuilderWith

These new functions will be helpful when implementing the 'sdist' and
'install' rules.

Thanks @KaiHa! (I've finally found some time for coding, hurrah!)
I added a bunch of comments above. Most of them a minor things, but there seem to be one important problem: tracking the files that are copied by copyDirectoryContent. At the moment it is clear that this function does not track the files, but the interface with a predicate FilePath -> IO Bool suggests that the caller will not track the files either. But somebody has to!
I start to think that we need an equivalent of getDirectoryFiles that will have an additional argument for excluding certain FilePattern's during the search. @ndmitchell Do you think such a function will be generally useful in Shake? Or will you suggest a better way?

@snowleopard just like ndmitchell has suggested I have implemented the copyDirectoryContent function with an oracle.

@KaiHa Great! Everything looks good, but see two comments above about ExcludeNot and ||.

@KaiHa Once you are happy with this PR let me know and I'll merge it and test on my machine.

Great! Everything looks good, but see two comments above about ExcludeNot and ||.

The reason for the Exclude and ExcludeNot is that I want to be able to do something like this:
copyDirectoryContent (Exlcude ["//*.o"]) (ExcludeNot ["//HS*.o"]) "."

ghc
├── apps
│   └── bar
│       ├── bar     # copied
│       ├── bar.hs  # copied
│       └── bar.o   # NOT copied
└── libs
    └── foo
        ├── foo.hs  # copied
        └── HSfoo.o # copied

Therefore it is named ExcludeNot and not Include.
As it is not possible to use a predicate with oracles, this is the best solution I have found. Maybe I should Improve the documentation, or do you see any better (more intuitive) way of achieving the above?

Once you are happy with this PR let me know and I'll merge it and test on my machine.

I will improve the documentation and will let you know then I am satisfied.

I would have been tempted to define a small abstract syntax tree:
data Match a = Test a | Not (Match a) | And [Match a] | Or [Match a]

copyDirectoryContent :: Match FilePattern -> FilePath -> Action ()

That makes the semantics much clearer and more flexible. Only downside is that you have to write a Binary instance for Match, but with Generic deriving maybe that's not too bad either. It's also more flexible, if you ever need the power.

@KaiHa Yes, I now see why you need ExcludeNot.
One possible alternative, which may be clearer, is to copy required files explicitly. Something like:
copyContext :: Context -> FilePath -> Action ()
copyContext context dir = do
    -- Haskell sources
    srcs <- haskellSources context
    forM_ srcs $ \src -> copyFile src (dir -/- src)
    -- Library
    lib <- pkgLibraryFile context
    copyFile lib (dir -/- lib)
    -- plus a bunch of other files

This may be more work, but I like this approach because it is very explicit: we know and specify exactly what we need to copy instead of relying on Exclude/ExcludeNot or more general matching mechanism proposed by @ndmitchell.
This could be made even clearer by pulling all files into a list:
sdistFiles :: [Context -> Action FilePath]
sdistFiles = [ haskellSources -- Haskell sources
             , pkgLibraryFile -- Library
             -- plus a bunch of other files
             ]

Now this works both as specification and documentation at the same time. Isn't it nice?

@snowleopard I agree, that sounds nice. Unfortunately my attempt to implement it looks a lot messier.

How do I prevent generated files from sneaking in?
Getting the haskellSources feels clumsy, am I doing something wrong?
Are there functions to get the paths to all the other needed files or must I list them like I have done for the hadrian files?

@KaiHa Yes, it does look messier than I thought... all those extra source files (like README) and Hadrian sources are not easy to deal with.

How do I prevent generated files from sneaking in?

I think we should actually use contextFiles instead of haskellSources. The former returns actual source files (e.g. *.x files if need be) instead of possibly generated Haskell files.

Getting the haskellSources feels clumsy, am I doing something wrong?

Do you perhaps mean Hadrian sources here? I agree, listing them explicitly is clumsy, but at the moment I don't see a clear alternative. We could in principle include hadrian as a Package in the build system and ask Hadrian to compute its own sources, but this feels crazy :)

Are there functions to get the paths to all the other needed files or must I list them like I have done for the hadrian files?

I think Settings/Paths.hs and Oracles/ModuleFiles.hs contain all functions that compute package files. There are no others.

To sum up: I think your initial approach with copyDirectoryContent may be a more sensible way forward at the moment. The alternative seems not as clear as I thought. My mistake.

I have implemented a small AST as proposed by @ndmitchell, that was easier than expected. Thanks for the hint on Generic deriving! @snowleopard if you find the result acceptable, please merge.

Many thanks @KaiHa! I've merged this. I may do some minor revision later, hope you don't mind.
By the way, for some reason AppVeyor build failed, but this seems to be unrelated to your changes.

Feel free to revise. I have no clue why AppVeyor is reporting a complie error.


⚠ Bofrost.lu has degraded performance

In e3f40e5, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 891 ms

Resolved: Bofrost.lu performance has improved in da25e86 after 6 minutes.


Istio mTLS fails after neon-desktop paused for long time

@marcusbooyah reported that the demo desktop where we have neon-desktop deployed failed to restart correctly after being paused for several days.  This turned out to be an mTLS problem where the certificates expired and apparently weren't refreshes after the cluster restarted.  Note that users can also pause other Hyper-V clusters, not just neon-desktop and Windows automatically pauses all VMs when shutting down and I presume we'll see the same problem when Windows hibernates for a long period of time.
I looked around a bit for an Istio setting where we could set the mTLS TTL to a long time (like 100 years) but couldn't find anything.
It does look like we can restart pod sidecars specifically (which fixed this):
kubectl exec POD_NAME -c CONTAINER_NAME reboot

Perhaps we can have the Hyper-V hosting manager do this after resuming a cluster.  One problem with this is that users can manually resume Hyper-V VMs via the Hyper-V Manager UI and PowerShell, so we'd have to somehow address this as well.  Perhaps the cluster operator can somehow detect that the cluster has been sleeping and reboot the side cars.
Alternatively, I wonder if upgrading Istio to get the ambient features might fix this since the sidecars go away.
These are somewhat unrelated but discusses Envoy Hot Restart which might be applicable.  Hot restart might be better than rebooting the container since hot restart tries to drain traffic first:
https://blog.envoyproxy.io/envoy-hot-restart-1d16b14555b5
https://istio.io/v1.4/docs/ops/configuration/security/root-transition/
https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/hot_restart
It's not clear how to trigger a hot restart after a quick read though.  I'm still hoping that ambient will just work.

Moving this to Next Release


Remove userId arguments in User Facade - Order History  functions

See master ticker GH-1092
Remove the userId argument from these functions. Use the user id currentinstead inside the facade functions.

loadOrderDetails(userId: string, orderCode: string): void {
getOrderHistoryList( userId: string, pageSize: number ): Observable {
loadOrderList( userId: string, pageSize: number, currentPage?: number, sort?: string ): void {

We also need to refactor the components that use these functions and write down smoke test instructions for which feature we know we should look closer into for regression.

PR: GH-2713

Test:
Make so there's no trace of userId in
loadOrderDetails(userId: string, orderCode: string): void {
getOrderHistoryList( userId: string, pageSize: number ): Observable {
loadOrderList( userId: string, pageSize: number, currentPage?: number, sort?: string ): void {
Make sure order history is still functional as it was before

Tested on Dev2.

Verified that Order History is using "current" now for both getting all orders, and one specific order.

Verified that Order History works like before (can sort by date or order number, select an order).


Check constraints for discriminator columns

Originally raised by @henrikdahl8240 in https://github.com/dotnet/efcore/issues/20880.
Note that we should only do this for discriminators marked as complete.

https://github.com/dotnet/efcore/issues/2594

Thanks @bricelam, closed that one in favor of this.


How to catch/expect the error: F tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc:273] Unexpected Event status: 1

TF version 1.x and 2.x.
Is there a way to catch this error with try-expect in python?
F tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc:273] Unexpected Event status: 1

@kiflowb777,
This question is better asked on StackOverflow since it is not a TensorFlow bug or feature request. There is also a larger community that reads questions there. Thanks!

https://stackoverflow.com/questions/65405886/how-to-catch-expect-the-error-f-tensorflow-core-common-runtime-gpu-gpu-event-mg

hey ! I am a begginer in open source although I know tensorflow etc but I want to contribute can someone tell from where can I find issues for begginers like me

https://stackoverflow.com/questions/32391561/how-to-catch-exception-caused-in-c-in-python

https://stackoverflow.com/questions/65405886/how-to-catch-expect-the-error-f-tensorflow-core-common-runtime-gpu-gpu-event-mg

@kiflowb777,
Can we please close this issue, as it is being tracked on StackOverflow? Thanks!


[extension/debug/snippets] Cannot insert ${command:...} into a snippet.

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.79.2
OS Version: Ubuntu 20.04

Steps to Reproduce:

Create an extension with a debugger and configurationSnippets json section.
Populate snippet like this:

"label": "(gdb) Attach to process",
"body": {
  "name": "(gdb) Attach to process",
  "process": "${command:pickRemoteProcess}"
}

Field process is treated as a placeholder, which is right. However, I want to insert this text literally. I've tried a number of combinations for escaping $, {, }, but none seem to work properly.

https://stackoverflow.com/questions/42669459/vs-code-snippet-escape-file
https://code.visualstudio.com/docs/editor/userdefinedsnippets#_how-do-i-have-a-snippet-place-a-variable-in-the-pasted-script

@roblourens suggested answers do not work for this specific case.

Increasing \\ escapes does nothing.
However, it works properly with ordinary snippets:

I assume this might be a bug specific to debugger's configurationSnippets

Sorry, there's an open issue for this https://github.com/microsoft/vscode/issues/176795


Fill in the blank questions not working

The extension seems to halt function once it reaches a question that asks to fill in the blank.

Yeah I’m having the same issue as it answer a couple normal questions at the beginning of the questions and then is not able to answer the fill in the black questions.
Is this similar to what you’re having?


Update maniquet benchmark identifier

Removed an unnecessary ' from the end of Maniquet2024-confusion_similarity'. This change has been updated in the database as well.

travis credentials error. going to merge


Add jxcore scraper

jxcore manifest to scrape: https://github.com/ktrzeciaknubisa/jxcore-issues/blob/master/index.json from https://github.com/jxcore/jxcore/issues/686

As commented here the only remaining blocker is the inclusion of the npm tarball url/sha info for each release. (And the publishing of the manifest at an official url.)

npmjx info now included in manifest.json. Just waiting for official URL


Does this work with all mobile operators in India or is there a Limitation?

Currently works on Airtel and Vodafone, Jio is expected soon


Add generic logic to remove secrets from logs

Fix #941
I added generic logic to mask config keys which have the tag secure.

/lgtm
/approve

@dsbrng25b Thanks!


[Automation] Generate Fluent Lite from postgresql#package-flexibleserver-2022-12-01

[Automation] Generate Fluent Lite from postgresql#package-flexibleserver-2022-12-01

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-resourcemanager-postgresqlflexibleserver


Update grunt and dts

Could you update the grunt version and the dts version? There are some severe bugs in version 3 of dts_bundle.
Thanks!

Not sure about grunt but bumping dts seems like a one-line change, https://github.com/TypeStrong/grunt-dts-bundle/pull/4

In the meantime, you can use "grunt-dts-bundle": "git@github.com:jukibom/grunt-dts-bundle.git" in your package.json


[else/slider2d] reacts to cursor velocity

[else/slider2d] reacts to mouse cursor velocity.
If the velocity is not high enough, the values of the slider don't change at all.
OS: Windows 10
Pd version: 0.54.1
ELSE version: 1.0-0 RC-11
https://github.com/user-attachments/assets/1bd47f2c-36b9-4a9f-8608-13673f61c251

@yepsan95 [slider2d] depends on [else/pad], all of its mouse interactions are just given by it.
Can you please show me a video of you testing the help file of [pad]? It obviously works completely fine here.

@yepsan95 [slider2d] depends on [else/pad], all of its mouse interactions are just given by it.
Can you please show me a video of you testing the help file of [pad]? It obviously works completely fine here.

In PlugData the behaviour is different. The output values always changes when click button is holded and when it's not, no matter the velocity of the cursor.
https://github.com/user-attachments/assets/ca4d29e8-d5c3-4431-a169-d39df445b030

so everything works as expected in plugdata, right? can you just try [slider2d] in plugdata as well?

so everything works as expected in plugdata, right? can you just try [slider2d] in plugdata as well?

[slider2d] works fine in PlugData. It doesn't react to the velocity of the mouse cursor.
https://github.com/user-attachments/assets/9215f080-accf-4742-bf03-d8e7ed1d0926


Display from the XS OData service

There is an error in Step 4 code for collaborative.view.xml & contentbased.view.xml.  It is a rudiment prefix odata_ in XML fragments that raise errors in the App Log like no such file or directory, stat '***/app/resources/webapp/fragment/xsodata/odata_ratings_detailed.fragment.xml'# and disables opening the recommendations UI. I see you removed odata_prefix in Step 3 for collaborative.fragment.xml, contenbased.fragment.xml and ratings_detailed.fragment.xml. When it fixed, App works as designed.
P.S.
Special thank you for such a huge code snippets! You may post them as floorplans in Fiori already :)

Thanks for catching this one!
Fixed it in commit 789cfac


Allow only certain bonded client to connect to NimBLEServer. Whitelist in advertising does not work for already bonded peers

Hi, first of all thanks a lot for this library! So much better than the bluedroid based library. Solved a lot of issues.
I want an ESP32 to act as a server, to be precise as an HID bluetooth keyboard.
I need to connect to different clients (in my case a FireTV and an AppleTV) and to switch the connection to them at runtime. Only one should be connected at the same time.
I am able to pair and bond both of them. One after the other. In the list of bonded peers I have two peers afterwards.
Remark: It is possible to connect both of them at the same time, if advertising is not stopped after the first connect. But it does not make sense because both devices would receive the same keyboard keys. I cannot force certain keys to be send to a certain peer.
So to achieve switching between the two peers, I tried to:

NimBLEDevice::getServer()->disconnect(...)  // the currently connected peer
add the other device to the whitelist (AppleTV or FireTV) and restart advertising with advertising->setScanFilter(true, true);

The whitelist filter works in principle (bonding is only possible based on the whitelist). But if a client is already bonded, it can reconnect no matter if there is a whitelist set in advertising or not.
So how can I force only a certain bonded client to connect to the NimBLEServer?
I tried to pair the HID without bonding, NimBLEDevice::setSecurityAuth(false, false, false);, but when doing so, reconnects completely fail. It seems that keyboards always need to be bonded, not only to be paired.

This should now be resolved in the master branch, use the new onIdentity client and server callback to know when you can store the ID address and add it to the whitelist.

@h2zero Thanks for the hint that the new onIdentity callback was introduced.
Could you please give me some advice on how to use this new callback?
I pair the ESP32 as a HID to a client, let's say a Windows machine. My server callback onIdentity and also the default callback (if I don't provide my own one) is never called. That's because the event BLE_GAP_EVENT_IDENTITY_RESOLVED never fires.
But even if it fired, what should I do in the callback? My problem is, that if a client connects for the first time, it is automatically added to the list of bonded peers. And whenever I start advertising again (with a whitelist), the whitelist is not used if an already bonded client connects. The whitelist only works for not already bonded clients. How does the new callback help here?

The use case for this callback is when bonding with devices that use a random resolvable address and you want to add the id address to the whitelist. The onAuthenticationComplete callback did not provide the correct identity address so adding it to the whitelist there wouldn't have the desired effect.
To answer your question though, it doesn't help your case please ignore my previous comment as I thought this was a different issue and didn't read it again.
Have you tried clearing the whitelist and then adding the device you want? Alternatively you could try using directed advertising.

Directed advertising sounds good. I tried this:
advertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
When doing so, a bonded client does not reconnect at all. No matter if I use a whitelist or not.
How do I tell the directed advertising to which client the advertising should be sent?
BTW, clearing the whitelist of course would work, but this is not want I need. I need two clients bonded at the same time. I need to switch the connection between these two bonded clients at runtime.
I can successfully bond two clients. I simply power off the first one while the second one gets bonded.
When starting advertising with two bonded clients, it is random which one connects first. I need to control which of the two bonded clients connects to the server.

What I meant was you could just change the whitelist before advertising to have one or the other device in it instead of both.
Directed advertising sadly does not have an API but you can use custom data like so:
// 0x17 = public address, change to 0x18 for random, 0x11 - 0x66 = address
char directedAdv[8] = {0x17, 0x06, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
NimBLEAdvertisementData data;
data.addData(directedAdv, sizeof(directedAdv));
advertising->setAdvertisementData(data);
advertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
advertising->start();

Thanks for the snippet. I tried it, with the following result:
D NimBLEAdvertising: >> Advertising start: customAdvData: 1, customScanResponseData: 0
primary service
           uuid 0x1800
         handle 1
     end_handle 5
characteristic
           uuid 0x2a00
...
E NimBLEAdvertising: Unable to advertise - Duration too long
D NimBLEAdvertising: << Advertising start

I think the Unable to advertise - Duration too long should not be there. At least the already bonded client does not reconnect.
Do you have any idea what could have gone wrong?

I think the duration is limited to 2 seconds for directed advertising, so you would have to restart it every time it ends with that duration.

Got it working. But not with your snippet. I think it cannot work.
Unable to advertise - Duration too long is misleading. This is not the reason. The message appears immediatly, no waiting time at all.
Why it is not working: when calling NimBLEAdvertising::start(), this line is called. In the next line, since dirAddr == nullptr, peerAddr will be NULL when calling ble_gap_adv_start
In ble_gap_adv_start this line is executed, with direct_addr being NULL.
In ble_gap_adv_validate, because of this line, the result is BLE_HS_EINVAL.
So for directed advertising to work, you must provide the peer address when calling NimBLEAdvertising::start(), like in this example:
// either public address
NimBLEAddress directedAddress = NimBLEAddress("11:22:33.44:55:66", BLE_ADDR_PUBLIC);
// or in case of a random address
//NimBLEAddress directedAddress = NimBLEAddress("11:22:33.44:55:66", BLE_ADDR_RANDOM);
advertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
advertising->start(BLE_HS_FOREVER, nullptr, &directedAddress);

So thanks for your support, for me this is now working. I tested it with public and random addresses.
I can connect and bond several devices - one after each other, turning the already bonded devices off while bonding the next one.
With directed advertising I can connect exactly to the device I want to connect to. Switching the connection is very fast.

Glad you got it working, I completely forgot about that parameter being added to advertising start call 👍

The directed address should be the static id address of the device, which is what is stored when bonded.

If you are not sure which is the static id address, you can use
NimBLEConnInfo connInfo = BLEDevice::getServer()->getPeerIDInfo(0);
Serial.println(BLEAddress(connInfo.getAddress()).toString().c_str());

or
Serial.println(BLEDevice::getBondedAddress(0).toString().c_str());

(assuming that you have only one device bonded and connected).
Then this should work
directedAddress = NimBLEAddress("11:22:33.44:55:66", BLE_ADDR_PUBLIC);
advertising->setScanFilter(false, false);
advertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
advertising->start(BLE_HS_FOREVER, nullptr, &directedAddress);

But I also struggled with direct advertisement to devices with random addresses.
To be honest, I can't remember exactly

if it finally worked
or if I had to tell the mobile phone to not use random addresses

I believe directed advertising worked even if the phone used RPA.
But I just tried to repeat the test and was not successfull.
Since phones are not my use case, but only media devices which are not using RPA, I don't have a lot of experience with devices using RPA.

OK I did a few more tests with different devices and can see a pattern..
If the static address in your check above MATCHES the ID address (BLEAddress(connInfo.getIdAddress()).toString().c_str()), then we know the device is NOT using RPA.
An Android TV device with no RPA (Id address == address), works just fine with direct advertising.
An Android phone with RPA (Id address != address), is causing issues. Switching the directed address to BLE_ADDR_RANDOM doesn't seem to work for the phone (at least the one I tried).
I looked into some other Bluetooth API's that also support direct advertising and saw Zephyr - they 2 different directed advertising modes: Zephyr. Does that suggest there's some else lower in stack that needs to support this?

It would t make sense to direct advertising to an RPA because it could change at any time, most phones change their address every 15 minutes.
I think this may be resolved in the master branch which provides a callback when the identity address is received.

Another detail: it seems only 2 bonds can be saved in the NVS (I'm using an ESP32). If I bond the third peer, one of the older two is deleted.
I saw a lot uses of "BLE_STORE_MAX_BONDS" in the code, but I cannot find where it is defined or where it can be changed.
@h2zero could you please help out?

@rac146 which version of NimBLE are you using? Currently for me directed advertising only works with master branch, not with 1.4.2 ...

I've been using master branch..

I saw a lot uses of "BLE_STORE_MAX_BONDS" in the code, but I cannot find where it is defined or where it can be changed.
@h2zero could you please help out?

https://github.com/h2zero/NimBLE-Arduino/blob/f68bb5f9607c33021ce213c4afa0e2cf7280cc72/src/nimconfig.h#L120
If you're using the master branch you should obtain the ID address in this new callback:
https://github.com/h2zero/NimBLE-Arduino/blob/f68bb5f9607c33021ce213c4afa0e2cf7280cc72/src/NimBLEServer.h#L207

I saw a lot uses of "BLE_STORE_MAX_BONDS" in the code, but I cannot find where it is defined or where it can be changed.
@h2zero could you please help out?

https://github.com/h2zero/NimBLE-Arduino/blob/f68bb5f9607c33021ce213c4afa0e2cf7280cc72/src/nimconfig.h#L120

@h2zero thanks for pointing me to // #define CONFIG_BT_NIMBLE_MAX_BONDS 3
It turned out that this was not the limiting factor, since only 2 bonds have been stored.
In my case it seems that I have 4 CCCDs, so each bond takes 4 CCCDs.
Default is // #define CONFIG_BT_NIMBLE_MAX_CCCDS 8
If I raise the maximum numbers of CCCDs to 12, I can store up to 3 bonds.

I've been using master branch..

@rac146 Do you think you could repeat the test with version 1.4.2, just to be sure that direct advertising is really not working in the latest official release? Your code should almost stay the same. Only the callbacks for onConnect and onDisconnect changed.
In version 2.0.0 (master) you get NimBLEConnInfo& connInfo in these callbacks as parameters.
In version 1.4.2 you can get the same information inside the callback with NimBLEConnInfo connInfo = pServer->getPeerInfo(0);
If I understand everything correctly, the situation is:

NimBLE version
direct advertising for public addresses
direct advertising for random addresses

1.4.2
not working
not working

2.0.0 (master)
working
not working

Unfortunately I cannot switch in my published project to the master branch, as long as there are still breaking changes. I ran into at least one between March and October. That's totally fine for a master branch, but I cannot use this in a published project which could break when the NimBLE master changed.

So apologies here - I've been running the esp-nimble-cpp branch, as I'm building an ESP-IDF project. I know the branches are similar, but might not give you the answer you're looking for in regards to the NimBLE-Arduino branch.
Here's the table as it stands, we can fill in as we test.. I'll update this with my esp-nimble-cpp 1.4.1 findings

NimBLE version
direct advertising for public addresses
direct advertising for random addresses

NimBLE-Arduino 1.42
?
?

NimBLE-Arduino master
Assuming works
?

NimBLE-ESP 1.41
?
?

NimBLE-ESP master
YES
NO

🗙from my posting above means NO. So with NimBLE-Arduino, only public addresses on master works. The three other combinations didn't work, at least in my tests.

@rac146 And I also have problems when reusing already bonded peers when going from 1.4.2 to 2.0.0 or vice versa.
See https://github.com/h2zero/NimBLE-Arduino/issues/740

I would like to reopen this issue, because direct advertisement only works in 2.0.0, not in 1.4.2
And in both versions, it does not work if a device uses private addresses.

Just dropping by to verify that directed advertising is not working with 1.4.2.

Just tested with iOS 17.6.1 and following code for directed advertising after bonding a device:
        fNimbleAdvertising->setScanFilter(false, false);
        fNimbleAdvertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
        NimBLEAddress directedAddress = NimBLEAddress(fBondedDevices[fBondedDeviceIndex].toString().c_str(), BLE_ADDR_PUBLIC);
        fNimbleAdvertising->startDirectedAdvertising(BLE_HS_FOREVER, nullptr, &directedAddress);

I NimBLEDevice: BLE Host Task Started
I NimBLEDevice: NimBle host synced.
D NimBLEDevice: >> setPower: 7 (type: 11)
D NimBLEDevice: << setPower
BLE stack initialization state: true
Server BLE address: C8:C9:A3:CA:14:22
Device BLE Pin: 060927
D NimBLEDevice: Setting bonding: 1, mitm: 1, sc: 1
D NimBLEDevice: >> setLocalMTU: 512
D NimBLEDevice: << setLocalMTU
D NimBLEServer: >> createService - 00002ffa-0000-1000-8000-00805f9b34fb
D NimBLEServer: << createService
ServiceHandler::addEncryptedCharacteristics() - Characteristics in service: [82c314b2-e53a-4d5e-b021-fc5887b4373f]
ServiceHandler::addEncryptedCharacteristics() - Characteristics in service: [3c5577d7-d182-482a-940a-7e5062441f43]
D NimBLEService: >> start(): Starting service: UUID: 00002ffa-0000-1000-8000-00805f9b34fb, handle: 0x0000
D NimBLEService: Adding 2 characteristics for service UUID: 00002ffa-0000-1000-8000-00805f9b34fb, handle: 0x0000
D NimBLEService: << start()
Initializing display controller
SSD1306 initialized properly...
Number of bonded devices: 1
Found bonded ble client with address:<PHONE_NUMBER>53008
Real voltage:      17.41 V
Is advertising: false
Is connected: false
Is bonded: false
Number of peer devices: 0
Ping value: 0
LedControl::update() - state: Init
DirectedAdvertiser::loadBondedDevices()
Loaded bonded device: 60:7e:c9:7b:65:10
D NimBLEAdvertising: >> setAdvertisementData
D NimBLEAdvertising: << setAdvertisementData
D NimBLEAdvertising: >> setScanResponseData
D NimBLEAdvertising: << setScanResponseData
DirectedAdvertiser::loadBondedDevices()
Loaded bonded device: 60:7e:c9:7b:65:10
DirectedAdvertiser::update() - switch from: State_Init to: State_Stopped
BluetoothController::update() - switch from: State_Init to: State_Disconnected
BluetoothController::update() - switch from: State_Disconnected to: State_Advertising
D NimBLEAdvertising: >> setScanFilter: scanRequestWhitelistOnly: 0, connectWhitelistOnly: 0
D NimBLEAdvertising: << setScanFilter
D NimBLEAdvertising: >> Advertising start: customAdvData: 1, customScanResponseData: 1
primary service
           uuid 0x1800
         handle 1
     end_handle 5
characteristic
           uuid 0x2a00
     def_handle 2
     val_handle 3
   min_key_size 0
          flags [READ]
characteristic
           uuid 0x2a01
     def_handle 4
     val_handle 5
   min_key_size 0
          flags [READ]
primary service
           uuid 0x1801
         handle 6
     end_handle 13
characteristic
           uuid 0x2a05
     def_handle 7
     val_handle 8
   min_key_size 0
          flags [INDICATE]
ccc descriptor
           uuid 0x2902
         handle 9
   min_key_size 0
          flags [READ|WRITE]
characteristic
           uuid 0x2b3a
     def_handle 10
     val_handle 11
   min_key_size 0
          flags [READ]
characteristic
           uuid 0x2b29
     def_handle 12
     val_handle 13
   min_key_size 0
          flags [READ|WRITE]
primary service
           uuid 00002ffa-0000-1000-8000-00805f9b34fb
         handle 14
     end_handle 20
characteristic
           uuid 82c314b2-e53a-4d5e-b021-fc5887b4373f
     def_handle 15
     val_handle 16
   min_key_size 0
          flags [READ|NOTIFY|INDICATE]
ccc descriptor
           uuid 0x2902
         handle 17
   min_key_size 0
          flags [READ|WRITE]
characteristic
           uuid 3c5577d7-d182-482a-940a-7e5062441f43
     def_handle 18
     val_handle 19
   min_key_size 0
          flags [READ|WRITE|NOTIFY|INDICATE|READ_ENC|READ_AUTHEN|WRITE_ENC|WRITE_AUTHEN]
ccc descriptor
           uuid 0x2902
         handle 20
   min_key_size 0
          flags [READ|WRITE]
D NimBLEAdvertising: << Advertising start
Directed Advertising to bonded device[0]: 60:7e:c9:7b:65:10

The result of this is, that my phone cannot even see my BLE server, let alone connect to it. I verified that the address used 60:7e:c9:7b:65:10 is indeed the BLE MAC Address of my iPhone.
Used master, commit: c3886723116e202a102900709a9cf00a4d434512
Currently at a loss as to what I should change/fix in my code.
Same code also does not work in 1.4.2 either.
If anyone has any suggestion, I'll be happy to test/try them out.

What devices are you using while testing this?

Processing az-delivery-devkit-v4 (platform: espressif32; board: az-delivery-devkit-v4; framework: arduino)
-------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/az-delivery-devkit-v4.html
PLATFORM: Espressif 32 (6.8.1) > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20017.0 (2.0.17)
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-openocd-esp32 @ 2.1100.20220706 (11.0)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Adafruit GFX Library @ 1.11.5
|-- Adafruit SSD1306 @ 2.5.7
|-- NimBLE-Arduino @ 2.0.0+sha.c388672
|-- googletest @ 1.15.2
|-- SPI @ 2.0.0
|-- Wire @ 2.0.0
Building in debug mode
Retrieving maximum program size .pio/build/az-delivery-devkit-v4/firmware.elf
Checking size .pio/build/az-delivery-devkit-v4/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   9.3% (used 49612 bytes from 532480 bytes)
Flash: [=====     ]  48.1% (used 946457 bytes from 1966080 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: /dev/ttyUSB0
Uploading .pio/build/az-delivery-devkit-v4/firmware.bin
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting......
Chip is ESP32-D0WDQ6 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c8:c9:a3:ca:14:20
Uploading stub...
Running stub...
Stub running...

And my iPhoneSE ( 2020 ) with iOS 17.6.1.

Is the address you are directing to the current random private address of the phone or is it the ID address?
The original esp32 doesn't have controller based privacy so it is limited to it's ability to resolve addresses in the host. If you try this code on a esp32c3 or esp32s3 does it work?

@h2zero thanks for the quick responses. The address I am using I get like this:
    void DirectedAdvertiser::loadBondedDevices()
    {
        std::cout << "DirectedAdvertiser::loadBondedDevices()" << std::endl;
        std::lock_guard<std::mutex> lock(fMtx);
        fCurrentNumOfBondedDevices = NimBLEDevice::getNumBonds();
        for (int i = 0; i < fCurrentNumOfBondedDevices; i++)
        {
            NimBLEAddress address = NimBLEDevice::getBondedAddress(i);
            if (address != NimBLEAddress())
            {
                fBondedDevices.push_back(address);
                std::cout << "Loaded bonded device: " << address.toString().c_str() << std::endl;
            }
        }
        //start from first device again
        fBondedDeviceIndex = 0U;
    }

        fNimbleAdvertising->setScanFilter(false, false);
        fNimbleAdvertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
        NimBLEAddress directedAddress = NimBLEAddress(fBondedDevices[fBondedDeviceIndex].toString().c_str(), BLE_ADDR_PUBLIC);
        fNimbleAdvertising->startDirectedAdvertising(BLE_HS_FOREVER, nullptr, &directedAddress);

The idea is, to only advertise to previously bonded devices. So I am not quite sure if this is an RPA or the ID Address. That said, I checked it and it is the MAC Address of the BLE of my iPhone ( if that makes any sense ).
Regarding the other question. I have a C3 lying around. Will test with that and get back to you asap.

@sanastasiou thanks a lot for jumping in and testing.
I repeated the test with an ESP32-S3 and got the following interesting result. All tests were done with NimBLE 2.0.0.
So with an ESP32-S3, indeed advertising to a device using RPA works. But direct advertising to a "normal" device, which is not using RPA, does not work any longer ...

NimBLE version
device not using RPA (Windows)
device using RPA (Android)

ESP32, undirected
YES
YES

ESP32, directed
YES
NO

ESP32-S3, undirected
YES
YES

ESP32-S3, directed
NO
YES

@KlausMu thanks also for sharing your results. Here are my results:

board
peer using RPA (iOS 17.6.1)
peer using RPA (Android 13)

ESP32, undirected
YES
YES

ESP32, directed
NO
NO

ESP32-C3, undirected
YES
YES

ESP32-C3, directed
NO
NO

Using master version of Nimble commit c3886723116e202a102900709a9cf00a4d434512 and platform = espressif32 @ ^6.5.0  ; Latest stable platform version
Bonding with undirected communication(s) works as before. After bonding directed advertising is done using the bonded address.
The peer devices are unable to see the ESP32-C3 unfortunately.
@KlausMu do you do something else as this to get directed advertising work on your S3?
void DirectedAdvertiser::loadBondedDevices()
{
    std::cout << "DirectedAdvertiser::loadBondedDevices()" << std::endl;
    std::lock_guard<std::mutex> lock(fMtx);
    fCurrentNumOfBondedDevices = NimBLEDevice::getNumBonds();
    for (int i = 0; i < fCurrentNumOfBondedDevices; i++)
    {
        NimBLEAddress address = NimBLEDevice::getBondedAddress(i);
        if (address != NimBLEAddress())
        {
            fBondedDevices.push_back(address);
            std::cout << "Loaded bonded device: " << address.toString().c_str() << std::endl;
        }
    }
    //start from first device again
    fBondedDeviceIndex = 0U;
}

    fNimbleAdvertising->setScanFilter(false, false);
    fNimbleAdvertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
    NimBLEAddress directedAddress = NimBLEAddress(fBondedDevices[fBondedDeviceIndex].toString().c_str(), BLE_ADDR_PUBLIC);
    fNimbleAdvertising->startDirectedAdvertising(BLE_HS_FOREVER, nullptr, &directedAddress);

Do you use the new onIdentity callback somehow? I cannot find out why my code doesn't work at all. Would you be able to paste a minimal amount of code that works for directed advertising?
@h2zero my C3 device is this one by the way:

[env:seeed_xiao_esp32c3]
extends = env
board = seeed_xiao_esp32c3
board_build.mcu = esp32c3
board_build.f_cpu = 160000000L
build_flags =
    ${env.build_flags}
    -D LED_PIN_GPIO=8
	-D LED_PAIRING_PIN_GPIO=9
	-D PAIRING_SWITCH_PIN_GPIO=10
	-D BATTERY_VOLTAGE_INPUT_PIN_GPIO=2
	-D ARDUINO_USB_MODE=1
	-D ARDUINO_USB_CDC_ON_BOOT=1
	-D SDA_GPIO_I2C_PIN=6
	-D SCL_GPIO_I2C_PIN=7
monitor_port = /dev/ttyACM0        ; Adjust this for your OS (Windows: COMx)
upload_port = /dev/ttyACM0         ; Adjust this for your OS (Windows: COMx)
debug_tool = esp-builtin
debug_init_break = tbreak setup
upload_speed = 921600

https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/
I have logs too but they are identical to the ones I already posted. Let me know if I can help in any way.

@sanastasiou
I used the latest versions of NimBLE and platform-espressif32 from yesterday (11-03-2024) (have been freshly pulled from Github by PlatformIO).
As you did, I am getting the address from the already bonded peers.
I am using the new onIdentity callback, but only for informational purposes in my log messages, not for using this information for the direct advertisement.
And I am using the exact four lines of code for starting the advertisement as you posted here.
My example is a more complex one, since I am using the ESP32 as a BLE keyboard, and the overhead for the definition of the BLE keyboard is quite big.
So I am not sure on how to provide a minimal example. Is this even possible? What is the most simple example that could be used to bond the ESP32 with e.g. Windows or Android?
I could try to create such an example if you point me into the right direction. It seems in the examples folder of NimBLE there is no such simple example.
My ESP32-S3 device definition is
[env:esp32-s3-devkitc-1]
board = esp32-s3-devkitc-1
platform = espressif32
framework = arduino
build_flags =
	-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
upload_speed = 921600
monitor_speed = 115200

Hi @KlausMu thanks for the reply. No need to provide a bonding example. I am sure that actually works also in my case, it works at least for undirected advertisement when using encrypted attributes and never ask to rebond so I think that's fine.
So either my C3 is not supported/broken in some way..  or I don't know what.  Also is the bonded Address the MAC Address of the peer device in your case?
How do u check if the directed advertisement is working? I am using the "Light Blue" app on my smartphones. Is there some other way?

Also is the bonded Address the MAC Address of the peer device in your case?

Correct, it is the bluetooth MAC address of the peer device.

How do u check if the directed advertisement is working? I am using the "Light Blue" app on my smartphones. Is there some other way?

I can see if the bonded peer reconnects. In the list of bonded peers both Windows and Android show which of the known (bonded) devices are connected and which not. When starting a direct adv. to Windows, Windows instantly connects when using an ESP32, but not with an ESP32-S3. With Android it is exactly the other way around. Android ignores an ESP32, but connects to an ESP32-S3.

@KlausMu thanks again for the info! So I am guessing there is some systematic error here depending on which HW is used and also which SW stack is used against it. For me it's becoming a headache because I am developing an app which has to be as secure as possible and the best way to do that is to only connect with previously bonded devices and make bonding possible only via physical access to the device. Perhaps @h2zero can shed some light. In the meantime I'll buy an S3 and try with that as well.
Thanks again!

@h2zero tried with BLE_ADDR_RANDOM. Still invisible to my phones. Will try deleting everything and rebonding.

Can you provide the specific address?

@h2zero I tried following:

Deleting all bonded devices
Rebonding -> works
Changing both Android/Ios to BLE_ADDR_RANDOM -> did not work
Changed ad duration to 2000ms and switch over both bonded devices -> invisible to both ( I see both MAC addresses in the console alternative for 2s each )

What do u mean by specific address? Like const auto dir_addr = NimBLEAddress("60:7e:c9:7b:65:10"); ?

        static auto dir_addr = NimBLEAddress("60:7e:c9:7b:65:10");
        fNimbleAdvertising->startDirectedAdvertising(AD_DURATION, [this](NimBLEAdvertising* pAdvertising){
            this->onAdvertisementStopped(pAdvertising);
        }, &dir_addr);

No change. Also my config is like this:
platform = espressif32 @ ^6.9.0  ; Latest stable platform version
framework = arduino
lib_deps =
	https://github.com/h2zero/NimBLE-Arduino.git#c3886723116e202a102900709a9cf00a4d434512

I'll see what I can find later this week, hopefully there is something easy to fix.

I believe I have found the cause, and it is not an issue with this library. Basically it comes down to lack of support for directed advertising by some device (all Apple devices for sure). Take a read of this: https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf specifically page 236.

Interesting. At least this gives an explanation for iOS.
But why does direct advertisement from ESP32 to Windows work with 2.0.0 (and is indeed really reliable) and not with 1.4.2?
Why does it not work at all from ESP32-S3 to Windows (not with 2.0.0 and not with 1.4.2)?
And why does it sometimes work with Android?
It's a mystery ...

Still investigating, using this for testing:
#include <NimBLEDevice.h>

class serverCB : public NimBLEServerCallbacks {
  void onConnect(NimBLEServer* pServer, ble_gap_conn_desc* desc) {
    Serial.print("Client address: ");
    Serial.println(NimBLEAddress(desc->peer_ota_addr).toString().c_str());
  }

  void onDisconnect(NimBLEServer* pServer) {
    Serial.println("Client disconnected - start advertising");
    if (NimBLEDevice::getNumBonds()) {
      NimBLEAddress baddr = NimBLEDevice::getBondedAddress(0);
      Serial.printf("Starting advertising with bonded address %s\n", baddr.toString().c_str());
      pServer->getAdvertising()->setAdvertisementType(1);
      pServer->getAdvertising()->start(0 ,nullptr, &baddr);
    } else {
      Serial.println("starting normal advertising");
      pServer->getAdvertising()->setAdvertisementType(2);
      pServer->getAdvertising()->start();
    }
  }
};

void setup() {
  Serial.begin(115200);
  Serial.println("Starting NimBLE Server");
  NimBLEDevice::init("NimBLE");
  NimBLEDevice::setSecurityAuth(true, true, true);
  NimBLEDevice::setSecurityPasskey(123456);
  NimBLEDevice::setSecurityIOCap(BLE_HS_IO_DISPLAY_ONLY);
  NimBLEServer *pServer = NimBLEDevice::createServer();
  pServer->setCallbacks(new serverCB());
  pServer->advertiseOnDisconnect(false);
  NimBLEService *pService = pServer->createService("ABCD");
  NimBLECharacteristic *pNonSecureCharacteristic = pService->createCharacteristic("1234", NIMBLE_PROPERTY::READ );
  NimBLECharacteristic *pSecureCharacteristic = pService->createCharacteristic("1235", NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::READ_AUTHEN);

  pService->start();
  pNonSecureCharacteristic->setValue("Hello Non Secure BLE");
  pSecureCharacteristic->setValue("Hello Secure BLE");

  NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();
  if (NimBLEDevice::getNumBonds()) {
    NimBLEAddress baddr = NimBLEDevice::getBondedAddress(0);
    Serial.printf("Starting advertising with bonded address %s\n", baddr.toString().c_str());
    pServer->getAdvertising()->setAdvertisementType(1);
    pAdvertising->start(0 ,nullptr, &baddr);
  } else {
    pAdvertising->addServiceUUID("ABCD");
    Serial.println("Starting normal advertising");
    pServer->getAdvertising()->setAdvertisementType(2);
    pAdvertising->start();
  }
}

void loop() {
}

If you would like to use this for your own testing please do and report back your findings. Don't bother trying against apple devices though 😄.
I have verified with a sniffer that this does indeed advertise directed to the address provided on an esp32 dev board using release v1.4.2.

Hm, ok so assuming iOS doesn't support this and whitelisting is broken in ESP32 completely plus switching on / off encrypted attributes on the fly also has issues I see no way to provide truly secure communications between ESP and all kinds of smartphones.
So I am guessing time to switch ECU on my side. But still thanks a lot for all your efforts @h2zero and @KlausMu !

@sanastasiou Yes, the esp32 is not an option for your purposes and I would suggest a c3 or s3 variant.

@h2zero thanks, is whitelisting supposed to be working in S3/C3 ?

Yes @sanastasiou, they have controller based privacy and can manage the RPA's correctly.

Another interesting find: https://devzone.nordicsemi.com/f/nordic-q-a/42111/android-and-directed-advertising

Just rewrote the code and tested with C3 device.
Works with iOS perfectly.
Does not work with Android. Android does not see the device after the bonded address is added to the whitelist. Without whitelist everything works. With active whitelist nothing works for android.
As usual used master branch of the library plus latest espressiff/arduino versions.
Can provide logs if you're interested.

Hm, after doing a reset on the ECU it works with both devices. Investigating further.

So found the Android issue.. During bonding a check is done to see if the device has bonded already in the authentication callback.
This code which works in 1.4.2 now fails:
            const auto peerDevices = fPServer->getPeerDevices();
            std::cout << "ServiceHandler::isConnectedDeviceBonded() - Number of peer devices: " << peerDevices.size() << std::endl;
            const auto isBonded = ((fPServer->getConnectedCount() == 1U) && (peerDevices.size() == 1U) && fPServer->getPeerInfo(peerDevices[0]).isBonded());

This is printed:
ServiceHandler::isConnectedDeviceBonded() - Number of peer devices: 1
E NimBLEServer: No peer at index 1

Although the bonding itself succeeds. After a reset the whitelist is populated with the bonded addresses and everything works fine. It just doesn't work exactly after bonding.. but I can work around this. In any case, it's inconsistent behavior that peer size is 1 but peer[0] doesn't exist.

Can you share more code details?

Sure. So in the server callbacks:
        void ServerCallbacks::onAuthenticationComplete(NimBLEConnInfo& connInfo)
        {
            const std::lock_guard<std::mutex> guard(fBleController.getMutex());
            const bool isBonded = (connInfo.isBonded());
            const bool isEncrypted = (connInfo.isEncrypted());
            const bool isAuthenticated = (connInfo.isAuthenticated());
            std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - encrypted: " << isEncrypted << std::endl;
            std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - authenticated: " << isAuthenticated << std::endl;
            std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - bonded: " << isBonded << std::endl;

            if(fBleController.isPairing())
            {
                /** Check that encryption was successful, if not we disconnect the client */
                if(!(isBonded && isEncrypted && isAuthenticated))
                {
                    std::cout << "Encrypt connection failed with client: " << connInfo.getAddress().toString() <<  std::endl;
                    return;
                }
                else
                {
                    //bug in stack, this returns false here..
                    //std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - bonded: " << NimBLEDevice::isBonded(connInfo.getIdAddress().toString()) << std::endl;
                    fBleController.expirePairingTimer();
                }
            }
            else
            {
                if(isBonded && isEncrypted && isAuthenticated)
                {
                    std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - Client with address: " << connInfo.getAddress().toString() << " is authenticated." << std::endl;
                }
                else
                {
                    std::cout << "Attempted to authenticate while not pairing -> reject connection." << std::endl;
                    NimBLEDevice::getServer()->disconnect(connInfo.getConnHandle());
                    return;
                }
            }
        }

When this is true and we are bonding for the first time there is no way to actually check if the device has bonded outside of this function.
This used to work with the code above ( peer[0].isBonded ) with 1.4.2 but it now no longer works because for whatever reason size == 1 but peer[0] does not exist. Also disconnecting at this line: fBleController.expirePairingTimer(); before the authentication callback returns, results in the bonded device not being stored as bonded at all.
What I now do is, blindly accepting that a device has bonded when the authentication callback is called without looking at bonded devices / peer info at all. Tested that and it works fine.
I also have a question. When I bond with my Android phone and then disconnect I can see during scan the device and I can reconnect ( :heavy_check_mark:  ).
If I scan however with my unbonded iOS phone I still can see the device ( :x: ) but I cannot connect to it ( :heavy_check_mark: ).
I would have thought that when whitelisting for scan response and connect are both true, the device would be invisible to non whitelisted peers. Is that not the case? fNimbleAdvertising->setScanFilter(true, true);

So, what appears to happen is that callback is called before the bonded state is set for the peer in the stack, all good though, just check for authentication and or encryption. Whitelist does not prevent other devices from reporting them as seen, only prevents any connection attempt, which scan response is a pseudo connection, so it cannot get the data in the scan response and cannot connect. All devices can see your advertisements, BLE wouldn't work otherwise, but you can control the sensitive data, though not encrypted in the scan response.

Still investigating, using this for testing:
#include <NimBLEDevice.h>

class serverCB : public NimBLEServerCallbacks {
...

...
I have verified with a sniffer that this does indeed advertise directed to the address provided on an esp32 dev board using release v1.4.2.

I am not sure if this code snippet can reveal the problem. My test case was always

bond the ESP32 to Windows (can only work if the ESP32 behaves as something like keyboard, mouse, audio device, DLNA etc.) - no authentication is involved
disconnect the ESP32
start direct advertisement to this specific Windows machine

With your code snippet no available device at all shows up in Windows when trying to pair, so I cannot even bond the device.
As said earlier, Android and iOS are not really my use case, but of course I can contribute test results.
To me currently only devices not using RPA are relevant, like a Fire TV, NVIDIA shield or other such devices. But even with these there are currently some problems. I was not able to test all these devices until now. But only the combination ESP32 + Windows / 2.0.0 seems to be reliable until now, Android and iOS not.
What I am more afraid of:

why does ESP32 + Windows with NimBLE 1.4.2 not work?
why does ESP32-S3 + Windows does not work at all (neither 1.4.2 nor 2.0.0)

If there is anything I can do to provide more test results, please let me know. Currently I don't know what to do.

Just adding my 2 cents here for master branch.
Although whitelisting works with C3 with master I have observed following behavior.

Bond device
Start advertising with whitelist -> works
Bond other device and start advertising with whitelist -> works
Abruptly disconnect android device by e.g. power off of the device
Advertisement still works, but upon connection the peer device receives a broken service without any characteristics and cannot do anything.

I could reproduce the latter in master branch 100%. I switched back to 1.4.2 where the above scenario works perfectly without any issues. Imo master branch needs some work.

There are no changes in the master branch that would affect this as far as I can see.

Well I could reproduce it 100% tried several times. The exact same steps work flawlessly in 1.4.2. Also I am pretty sure something change from 1.4.2 to master regarding NV storage of bonds.
Having bonded devices stored into NV from master and going back to 1.4.2 results 100% reproducible exception during loading of bonds.

Could you please try with the release/1.5 branch? I wonder if this is a core issue.

Let's start with the bonds issue as that seems to be what changed with the master branch

Having bonded devices stored into NV from master and going back to 1.4.2 results 100% reproducible exception during loading of bonds.

In my tests, both directions did not work: going to master (silent failure) and going back to 1.4.2 (crash). please see this issue

Bond device
Start advertising with whitelist -> works
Bond other device and start advertising with whitelist -> works
Abruptly disconnect android device by e.g. power off of the device
Advertisement still works, but upon connection the peer device receives a broken service without any characteristics and cannot do anything.

I could reproduce the latter in master branch 100%. I switched back to 1.4.2 where the above scenario works perfectly without any issues. Imo master branch needs some work.

I am seeing this same broken behavior between a mac and iPhone on 1.4.2 and 1.4.3.


Increase tomcat resource cache size

The default tomcat context.xml file included with uPortal-start doesn't increase the resource cache size as recommended here: https://github.com/Jasig/uPortal-start/tree/master/docs/en/tomcat

This change has been merged in.


how to implements a proper WaveformZoom？

Hi there,
I was wondering how can I  evaluate  a proper zoom value? Sometimes, I dont need that accurate wave such as pixelsPerSecond(100). Even 2 to 3 pixelsPerSecond is enough for me. But it extracts a null waveform. Well, if the audio is long enough, it works.
Thanks

@ryanheise Thanks for the quick respond.
I was trying to figure out  the lowest pixels per second because I noticed that a low pps may cause a null waveform, so I am not sure the pps I'm using is always big enough for a certain audio file.


feat: add windows support

What type of PR is this?

feat
What this PR does / why we need it (en: English/zh: Chinese):

en: add windows support
1. use os.TempDir to decide temp dir
2. switch some hertz option's separator from : to | to avoid conflicts with C: in the windows path
zh: 增加 windows 支持
1. 用 os.TempDir 去决定 temp dir 的位置
2. 将 hertz 一些选项的分隔符从 : 切换到 | 以避免与 windows 路径中的 C: 冲突
Which issue(s) this PR fixes:

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: wzekin:x: AdminAdmin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Try squash to get rid of the commit from "Admin"


Please add License

Hello! I was wanting to fork your repo for some work that I need to do, however I do not find any license that would allow me to extend your work. Would you consider adding an open license so I may do this? Also have you considered adding this to PyPi? I think it would be very useful. Thanks!

Done! ;) I didn't really thought of making a proper module, I expected people to copy/paste the code in their project...but pull requests are always welcome.

Thanks! I will end up forking this. I'll be sure to contribute back with a pull request if I make any substantial changes.


Dependency to PyQt

Do you plan to propose a headless version of picamera2, without the dependency on PyQt which is only necessary for previews (if I understand correctly)?

I am wondering about this too. I have no need for GUI stuff (my current code is based on mmalobj from original picamera ( I have no need for GUI stuff) which works fine without running X11 and so on (with preview).
Pulling in QT and GL stuff is too heavy for my usecase. I just want the bare minimum.

Hi, thanks for raising this. To understand the problem, it's not that things don't work, it's just that more code is being installed than you need, is that right? We can look into that.
To answer the other question, PyQt is only required for preview windows when running under X-Windows. (When not running X-Windows, you can still use the DRM/KMS preview window if you want.)

To understand the problem, it's not that things don't work, it's just that more code is being installed than you need, is that right? We can look into that.

That's exactly my concern. Ideally, one could choose to install this dependency or not, via the pip install options. And the absence of PyQT would need to be caught at import's time if one did not install the proper options but try to open a preview window.

I think this is resolved now, but please open another ticket if there are still problems. Thanks!


Data type not exported

There are many handful types like Database, Page etc. defined in api-types.ts and yet none of them is exported.
For the downstream users, we need to access them for creating our own functions.
Can we export them all in index.ts?

Closing this issue since our types are now generated based on our source code and these types no longer exist.


V almonacid/ch2285/add support for legacy utxo tx

This PR contains functions that are not yet implemented in the rust bindings and also a few other things have been recently modified in js-chain-libs. I open this PR anyway to help keeping track of the changes and ease comparison with the history of additions by seba in front-end.

@v-almonacid you removed the [WIP / DO NOT MERGE] label, do that means that this could be merged?

@nicarq yes all PR's should be merged in the right order (even if they have deprecated/non functional code), I'm adding the changes more or less in the same way as in frontend. First I added the WIP label because I thought I would do everything in the same PR, but then I changed my mind.


Header in HTTP

How do you send a header in HTTP?

Gotcha! :)
        $response = new Workerman\Protocols\Http\Response();
        $response->header("Content-Type", "application/json");
        $response->withBody(json_encode([
            "jsonrpc" => "2.0",
            "error" => [
                "code" => -32700,
                "message" => "You have not sent a JSON request."
            ],
            "id" => null
        ]));


fix touching of .boot_repository for iso

During docker run lfedge/eve:6.6.0-kvm-amd64 installer_iso I see mkdir: cannot create directory ‘boot’: File exists so, with this exit code we do not create .boot_repository file.
Signed-off-by: Petr Fedchenkov<EMAIL_ADDRESS>

Do we know whether this makes the USB installer iso work? Or unrelated?

It is related, and it helps me to install on VirtualBox, but we need to check it on real device.


Critical Path Tree View

It would be nice if we had a tree view for the critical path to make it easier/more efficient to navigate.
The way I sort of imagine it is that when you click critical path for an item, it opens a scrollable pane with a tree that shows you both the upstream and downstream things that you are waiting on/waiting for you and when you hover over an item in the tree it will pan/zoom to that item in the profile and there would be a pane that shows you that items info instead of popping up another window.

Seems like its possible with egui: https://github.com/blitzarx1/egui_graphs

Someone will need to help me upgrade egui if we're going to use this; they're on the newest version and we're still on 0.25.

What would be required to upgrade to the latest egui? Does it have backwards breaking changes?

egui 0.26 introduces text selection, which is great but breaks all our custom widgets. Because they rearchitected the way that inputs are handled, I haven't been able to trace through all the new abstractions to figure out how to do what we need to do yet.

Splitting this discussion of into its own issue: https://github.com/StanfordLegion/prof-viewer/issues/71


Diagnostics virtual text not show after changing definition function.

Describe the bug
https://github.com/nvimdev/lspsaga.nvim/assets/40637063/93d3e51f-45f6-4aae-9324-1fc64e7156d6
As you can see in the video, when I change the definition of log function, there is no virtual text showing error diagnostics, until I enter insert mode and exit.
Steps to reproduce
create a simple golang project, and perform behaviors in video.
Expected behavior
Error diagnostics virtual text show when I change the definition of log function.
Neovim version (nvim -v)
NVIM v0.9.5
lspsaga commit
2198c07
Terminal name/version
tmux 3.3a

Seems it is no related with lspsaga


Fix file-server Makefiles

@dungwinux Please give this a test (make measure in each 5 directory), as before for some reason my laptop does not like file-server.
I would like to launch a set of measurements for this today, I know some benchmarks (Python...) take a while.

C++, Java, JS, Go work. Python for some reasons never detect the initialized line.
I think the run-server-client.py script has a little bit issue where it does not kill the server after finished running the client.

Alright, this should work (minus the OS not marking port as available again, which is another issue). Can you give this one more try and let me know? Thanks.

The Python fix works.
Now that I test the make measure, it seems like the RAPL script messed it up.
Since we concat each parameters without quoting each, the parameter passing to system is different when it includes space, and thus I cannot run the measurement

The following I think would fix but I am stepping out for a bit and cannot test. I'm not the biggest fan since now if there are single quotes in command ' this will cause issues. If you have a better fix please let me know, I will complete this later this evening. I think I rather not touch RAPL if possible.
// OLD
std::string command = argv[2];
for (int i = 3; i < argc; ++i) {
    command.append(" ");
    command.append(argv[i]);
}

// NEW
std::string command = "'" + argv[2] + "'";
for (int i = 3; i < argc; ++i) {
    command.append(" ");
    command.append("'" + argv[i] + "'");
}

For run, on my laptop:

key-value: All work but Python for me. Maybe concurrency problem? We should use 1 client job and reduce input size.
file-server: For some reason still not working on my setup, any languages.

I will have to fix measure issue tomorrow. @dungwinux If you test your solution and it works please feel free to push to this branch. Thanks!

Seems like GitHub was bugging and I have to do an extra empty commit to resolve a conflict

Both key-value and file-server seems to quit properly now.


can't Preparing data.....

When I run "python model.py", In the Preparing data step, the process is always 0%,the output is:
Training...
Loading question data...
Loading passage data...
Preparing data...
Total number of trainable parameters: 1195735
Built model
Loading question data...
Loading passage data...
Preparing data...
0%|                                         | 0/2064 [00:00<?, ?b/s]Killed
Thanks!

Hi @zhangxinars It seems to me the model is running on cpu and killed due to an overtime. Make sure you're training on GPU otherwise this will take a long time.

Thanks!


Unable to send lightning payment

Same as #124 but that issue was closed. I was aware of the fee and tried sending a lower amount, I tried sending 50 sats which should have enough room for the fee but the 'Ok' button is still disabled.

Can you share or create an invoice which is causing this?

I figured out what the issue is after further testing:
If you scan an invoice for an amount over your spendable amount and then lower the sat amount to an amount that will work, the 'Ok' button still will be disabled even though you are now sending an acceptable amount. It is still using the disable button because the original invoice is over your limit.
If that makes sense?

It is still using the disable button because the original invoice is over your limit.

Yes, it does. This is an expected behavior since a payment of amount which is lower than requested would be rejected by receiver anyway (according to LN protocol convention).
What will work here is SPLIT button which allows two or more wallets to pay to the same invoice in parts.

Ok sounds good, I didn't know this was expected behavior. Thanks for letting me know, will close now.


[WIP][MLIR][DISC] Add device type info to memref's address space in lmhlo dialect

We are porting our MLIR-based dynamic shape compiler to tf community (From OP def, Patttern, to Optimization pass, etc).
There will be 3 PRs to process memory allocation for dynamic shape. 1) Mark shape calculation Ops by Op attribute and insert D2H and H2D Op in mhlo dialect; 2) Add device type info to memref's address space in lmhlo dialect; 3) Convert for device alloc/dealloc with memref's address space.
This PR mainly is to add device type info to memref's address space in lmhlo dialect.
Related discussion is here.

@azazhu  Can you please check @joker-eph's comments and resolve conflicts?. Thanks!

@azazhu Can you please check @joker-eph's comments and resolve conflicts?. Thanks!

Sure, I am working on this PR according to Mehdi's comments.

@azazhu  Can you please check @sanjoy's comments and resolve conflicts?. Thanks!

Sorry for late response, We are working on internal porting(to make sure final porting can e2e run) based on tot TF, which takes more time than we expected. We will continue updating this PR once internal verification finished.

@azazhu  Any update on this PR? Please. Thanks!


scipy.linalg.eigh should handle diagonal matrices better

Eigenvalues of a diagonal matrix are just it's main diagonal. Scipy seems to be unaware of it and takes a very long time to produce the same result.
Reproducing code example:

import numpy
import scipy
import time

# even make it sorted
DD = numpy.diag(numpy.sort(numpy.random.uniform(0, 0.9, size=3000)))
t0 = time.time()
scipy.linalg.eigh(DD)
t1 = time.time() - t0
print(t1)
# 4.456470966339111 - 4 and a half seconds!

Error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  ...

Scipy/Numpy/Python version information:

If you know that the matrix is diagonal (or close to diagonal), consider using a sparse matrix:
DD = scipy.sparse.diags(np.sort(np.random.uniform(0, 0.9, size=3000)))
%timeit scipy.sparse.linalg.eigsh(DD)

Gives me 378 ms ± 44.7 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

@perimosocordiae
This only returns 6 eigenvalues by default. If you run it with k=2999, it's even slower

@ilayn Thanks! I'll see if I can come up with an efficient way to do it and update this thread.


AssertionError when evaluating pretrained models

Can some one kindly help me solve this problem?
When I run this:
python3 ./pytorch/train.py evaluate --config_path=./configs/car.fhd.config --model_dir=/home//catkin_ws/src/SECOND-ROS/KITTI_PKL/pretrained_models_v1.5/car_fhd --measure_time=True --batch_size=1
This is the error i get:
[  41 1600 1408]
Restoring parameters from /home//catkin_ws/src/SECOND-ROS/KITTI_PKL/pretrained_models_v1.5/car_fhd/voxelnet-74280.tckpt
remain number of infos: 3769
Generate output labels...
Traceback (most recent call last):
  File "./pytorch/train.py", line 689, in <module>
    fire.Fire()
  File "/home//.local/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home//.local/lib/python3.6/site-packages/fire/core.py", line 468, in _Fire
    target=component.__name__)
  File "/home//.local/lib/python3.6/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "./pytorch/train.py", line 635, in evaluate
    for example in iter(eval_dataloader):
  File "/home//.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 345, in __next__
    data = self._next_data()
  File "/home//.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 385, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home//.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home//.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home//catkin_ws/src/SECOND-ROS/second/pytorch/builder/input_reader_builder.py", line 18, in __getitem__
    return self._dataset[idx]
  File "/home//catkin_ws/src/SECOND-ROS/second/data/dataset.py", line 70, in __getitem__
    prep_func=self._prep_func)
  File "/home//catkin_ws/src/SECOND-ROS/second/data/preprocess.py", line 344, in _read_and_prep_v9
    example = prep_func(input_dict=input_dict)
  File "/home//catkin_ws/src/SECOND-ROS/second/data/preprocess.py", line 233, in prep_pointcloud
    points, max_voxels)
  File "/home//.local/lib/python3.6/site-packages/spconv/utils/__init__.py", line 173, in generate
    or self._max_voxels, self._full_mean)
  File "/home//.local/lib/python3.6/site-packages/spconv/utils/__init__.py", line 69, in points_to_voxel
    assert block_filtering is False
AssertionError

@nanaBaah I get the same error now, after trying to switch from spconv v1.0 commit 7342772 to master branch. Don't know why, though.


fix: add Intl.getCanonicalLocales type definition

Fixes #29129
The issue to resolve this PR is not Backlog milestone.
Intl.getCanonicalLocales type definition should be included in #45647, but unfortunately it could not do.
Even now, the Intl.getCanonicalLocales type is not resolved.
We can check it in the playground.
https://www.typescriptlang.org/play?ssl=1&ssc=6&pln=1&pc=25#code/JIOwLgNgdA5gpmAwgQxAexASwMbIgGTVwjgGcg
about Intl.getCanonicalLocales

MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales
ecma402 spec: https://tc39.es/ecma402/#sec-intl.getcanonicallocales

why do i add as es2016.intl
Intl.getCanonicalLocales is supported since 2016, so some proejcts using typescript might still use es2016.
I've added es2016.intl.d.ts for compatibility and defined in it.
Parameters and return types of Intl.getCanonicalLocales
UnicodeBCP47LocaleIdentifier is not defined at es2020.intl.d.ts. In the past, A comment of #39662 has tried to support UnicodeBCP47LocaleIdentifier by defining it in es2016.
However, if we do that, it will result in a destructive change for some users, as this comment states.
UnicodeBCP47LocaleIdentifier is currently an alias for string. So, as a compromise, the parameters and return value of Intl.getCanonicalLocales are defined as string. by that way, we can keep compatibility.

@microsoft-github-policy-service agree

It took a lot of digging, but I found proof that this was indeed added in 2016: The first page of https://402.ecma-international.org/3.0/ mentions it explicitly.


Fix reprojection of raster sources with gutter

This is a possible solution to reprojecting raster sources with gutter (currently only ol.source.TileWMS).
The ol.source.Tile#getGutter gets additional projection parameter which is used to distinguish whether to return 0 (when reprojecting) or the actual gutter value of the source tiles (when not reprojecting). And the gutter handling is added to the reprojection process so only the proper parts of the tiles are used.
I'm not 100 % sure this is the best way to solve this, so any ideas are welcome.
Demo of the problem: https://jsfiddle.net/aymvra7g/ (from #4681)
Closes #4681.

Rebased

I am not convinced that using a gutter would solve the issue reported in #4681. I updated the fiddle using Boundless's demo GeoServer, and I am seeing the same problem: http://jsfiddle.net/aymvra7g/3/. It looks like wrong scaling in a transform (see how the border is interrupted).

The same problem was also reported here: http://stackoverflow.com/questions/35335067/openlayers-3-white-gaps-between-osm-map-tiles

Fix for precision issue with reprojection in separate PR: https://github.com/openlayers/ol3/pull/4869.
This fix for missing gutter support is still required (rebase will be needed).

Nice! Avoiding these canvas transforms should also improve performance. Please merge.

Sorry, I commented on the wrong pull request. I meant to comment on #4869.

It doesn't look like this will give the desired results, because the gutter overlaps are not really used in the reprojected output.I think at this point, it would be better to just document that gutter does not work on reprojected views.

@ahocevar There are two gutter-related issues why the http://jsfiddle.net/aymvra7g/ does not work:

The ol.reproj.render uses whole source images (ignores the gutter value), so the gutter pixels are present twice in the reprojected tiles.
The #getGutter method on the source always returns the gutter value for the source tiles although the reprojected tiles are always created without gutter.

This PR changes both of these: ol.reproj.render ignores the additional gutter pixels + #getGutter takes additional projection argument and returns different value for the data projection (actual gutter value) or 0 for other projections (no gutter when reprojecting).
With changes in this PR, the code in http://jsfiddle.net/aymvra7g/ seems to be working as expected for arbitrary gutter value.

Doesn't #4869 also fix http://jsfiddle.net/aymvra7g/?
My point was that it makes no sense to request images with a gutter from the original source when the gutter is discarded:
stitchContext.drawImage(
  src.image,
  gutter, gutter, // discards left/top gutter from the source image
  src.image.width - 2 * gutter, src.image.height - 2 * gutter, // discards right/bottom gutter
  xPos * stitchScale, yPos * stitchScale,
  srcWidth * stitchScale, srcHeight * stitchScale);
});

This is why I think it would make more sense to document that reprojecting sources with a gutter is not supported. You could assert that gutter is 0 before reprojecting tiles.

Unfortunately, #4869 only fixes the thin white line visible in http://sookoll.ee/failid/ol_reproject_bug.png. The rest is specific to the gutter issue.
I see your point, but the gutter is discarded in the renderers as well:
renderContext.drawImage(tile.getImage(), tileGutter, tileGutter,
        tilePixelSize[0], tilePixelSize[1],
        ...

(from ol.renderer.canvas.TileLayer#composeFrame), so the behavior is similar here.
Anyway, the #getGutter in currently only implemented in ol.source.TileWMS where the gutter parameter documentation says:

The size in pixels of the gutter around image tiles to ignore. By setting this property to a non-zero value, images will be requested that are wider and taller than the tile size by a value of 2 x gutter. Defaults to zero. Using a non-zero value allows artifacts of rendering at tile edges to be ignored. ...

(http://openlayers.org/en/v3.13.1/apidoc/ol.source.TileWMS.html).
So it's ok in my opinion to discard the additional pixels.
I agree that not using gutter is actually more elegant and correct solution :), but since OL3 has support for sources with gutter, we should probably support this during the raster reprojection as well.
(Besides, turning the gutter off is possible for TileWMS, but it might not be possible for some static sources with prerendered tiles.)

Ah sorry, I had misunderstood how gutter works. Thanks for the explanation.
I'm not a big fan of passing the projection to getGutter, but since we do this already for other methods, it is probably ok.
Please merge.

Thanks for having a look at this!
I agree passing projection to #getGutter is not very clear, but I can't think of any better solution.
(It's similar to #getOpaque, which also gets projection parameter -- see https://github.com/openlayers/ol3/pull/4628.)
Merged.


Update quickstart.md

name: GitHub Actions Demo
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v2
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥 The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

Why:

Closes [issue link]
What's being changed:

Check off the following:

[x] I have reviewed my changes in staging. (look for the deploy-to-heroku link in your pull request, then click View deployment)
[x] For content changes, I have reviewed the localization checklist
[x] For content changes, I have reviewed the Content style guide for GitHub Docs.

[image: Word Document]
Atomic ID.docx
https://docs.google.com/file/d/1C9Nm6IHRUr2jW9mDQK5zOVh3OO90vd5l/edit?usp=docslist_api&filetype=msword
On Tue, Apr 13, 2021 at 08:25 stewert93 @.***> wrote:

name: GitHub Actions Demo
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:

run: echo "🎉 The job was automatically triggered by a ${{
github.event_name }} event."
run: echo "🐧 This job is now running on a ${{ runner.os }} server
hosted by GitHub!"
run: echo "🔎 The name of your branch is ${{ github.ref }} and your
repository is ${{ github.repository }}."
name: Check out repository code
uses: @.***
run: echo "💡 The ${{ github.repository }} repository has been cloned
to the runner."
run: echo "🖥 The workflow is now ready to test your code on the
runner."
name: List files in the repository
run: |
ls ${{ github.workspace }}
run: echo "🍏 This job's status is ${{ job.status }}."
Why:

Closes [issue link]
What's being changed: Check off the following:

I have reviewed my changes in staging. (look for the
deploy-to-heroku link in your pull request, then click View
deployment)
For content changes, I have reviewed the localization checklist
https://github.com/github/docs/blob/main/contributing/localization-checklist.md
For content changes, I have reviewed the Content style guide for
GitHub Docs
https://github.com/github/docs/blob/main/contributing/content-style-guide.md
.

You can view, comment on, or merge this pull request online at:
https://github.com/github/docs/pull/5328
Commit Summary

Update quickstart.md

File Changes

M content/actions/quickstart.md
https://github.com/github/docs/pull/5328/files#diff-d919da8f28a4704693e17abad25eb3cc677cded52565551de9842e1ba186dc27
(2)

Patch Links:

https://github.com/github/docs/pull/5328.patch
https://github.com/github/docs/pull/5328.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/github/docs/pull/5328, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASW622AYKIPIOX4NBZURIDTTIQZ2PANCNFSM423HU6YA
.

Chadwick Caraway mentioned you in a comment in the following document
install.bat
(https://docs.google.com/file/d/1W38HpuIRGr7bdX8JU_3Mm2OCIK1VIxTa/edit?disco=AAAAIQYzUoQ&ts=607641bf&usp=comment_email_document&usp_dm=false)
Chadwick Caraway
@dev
Chadwick Caraway
@@.***
Chadwick Caraway
@@.***
Chadwick Caraway
@@.***
Chadwick Caraway
@@.***
Chadwick Caraway
Marked as resolved
Google LLC, 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
You have received this email because you are mentioned in this thread.
Change () what Google sends you.
You cannot reply to this email. View install.bat
(https://docs.google.com/file/d/1W38HpuIRGr7bdX8JU_3Mm2OCIK1VIxTa/edit?disco=AAAAIQYzUoQ&usp=comment_email_discussion&usp_dm=false&ts=607641bf)
to reply.


Problem starting chromium

Problem starting chromium
Starting chromium ends with "undefined symbol".
To Reproduce
Steps to reproduce the behavior:
$ nix run nixpkgs.chromium -c chromium
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
/nix/store/ypm0s05hl2cxicy5nwgqh96nrp0cjabq-chromium-unwrapped-76.0.3809.100/libexec/chromium/chromium: symbol lookup error: /nix/store/hx3mk2bnjp4vlqfwzmycvdq3hh6vf71j-libselinux-2.7/lib/libselinux.so.1: undefined symbol: pcre_free_study

Expected behavior
I would expect chromium to start.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
If I check what the actual binary is from readlink -f $(which chromium), I can start the browser, so the problem is one of the environment variables.
I tried commenting out the exports and I could "fix" the problem locally by commenting out the LD_LIBRARY_PATH.
Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.

system: "x86_64-linux"
host os: Linux 5.2.9, NixOS, 19.09pre189585.1412af4b2cf (Loris)
multi-user?: yes
sandbox: no
version: nix-env (Nix) 2.2.2
channels(root): "home-manager, nixos-19.09pre189585.1412af4b2cf, unstable-19.09pre186574.88d9f776091"
channels(masse): ""
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

I can't reproduce this by running nix run nixpkgs.chromium -c chromium on NixOS master.
The error message indicates that this is a problem with grep. Does grep work for you elsewhere?
Are you still seeing this? Do you have any relevant system configuration or bashrc/zshrc?

Yeah, grep works elsewhere. And even chromium starts, if I copy the wrapper script to my home, modify the LD_LIBRARY_PATH line and only then call it.
nix-store --verify --check-contents was clean.
I tried within a "clean" bash shell (I usually use zsh so the bash config should be somewhat empty, unless some transient derivation modifies it)

Thanks for investigating, I have reproduced this with:
# touch libpcre.so.1
# chmod +x libpcre.so.1
# chromium --user-data-dir=/tmp/deleteme
grep: error while loading shared libraries: libpcre.so.1: file too short
/nix/store/pzx588yd5799gc5f9sysh41xzqf7vd4x-chromium-unwrapped-76.0.3809.87/libexec/chromium/chromium: error while loading shared libraries: libpcre.so.1: file too short

and I'll have a PR soon.

Great! Thank you


MADV_FREE in Linux

Linux also supports MADV_FREE from glibc 2.4 and Linux kernel 4.5.
One problem is that the madvise (..., MADV_FREE) function fails when program is built on glibc 2.4 or higher and runs on systems with Linux kernel 4.4 or earlier, memory is not returned even in aggressive decommit mode.
I think need some comments in system-alloc.cc file.

This issue already discussed in #780.


[bug] stop button doesn't work

press stop while it's generating, and it will keep generating

Thanks for the report. Will look into it.

@Geczy I can't tell. Is it the button that is grayed out, or do you click and nothing happens?
Any message on the console (F12, Esc on Chrome)? What device/Browser are you on?

i click and the chat continues writing
you cant tell? did you try it yourself?

Works for me, that's why I'm asking details.

Thanks for sharing this, I was wondering how to reproduce. I see something strange going on with the network requests. I'll try to investigate despite not being on Mac.

@enricoros any ideas about that yet? is there anything else i can try? different browser maybe?

i tested it in firefox and it does work there to stop ! so it looks like a chrome issue?

I know that chrome works on windows. Hmmm. On the other hand chrome on macOS also does a poor job of speech recognition, to the point i disabled the whole feature. Very weird.
Thanks for saying it works on Firefox!

I can see it is working on Windows Chrome. Is it fixed?

Correct, fixed long ago.


Robot wont connect

I have installed the sdk as listed on your webpage however i cant connect to alphamini , where do i set the robots ip etc in the files ?
Thanks

I have installed the sdk as listed on your webpage however i cant connect to alphamini , where do i set the robots ip etc in the files ?
Thanks

Hi, I also failed to connect to alphamini  on Windows. Have you successfully connected to it on Windows? Thank you.

Same here, when run test_connect.py, can't discover the robot:
C:\Users\Sistemas\AppData\Local\Programs\Python\Python312\python.exe C:\Users\Sistemas\PycharmProjects\mini_demo\test\test_connect.py
start scanning...
Address not available when adding <IP_ADDRESS> to multicast group, it is expected to happen on some systems
Address not available when adding <IP_ADDRESS> to multicast group, it is expected to happen on some systems
Address not available when adding <IP_ADDRESS> to multicast group, it is expected to happen on some systems
Address not available when adding <IP_ADDRESS> to multicast group, it is expected to happen on some systems
scan device timeout
stop scan finished.
test_get_device_by_name result:None
Process finished with exit code 0
@pacomms can you resolve this issue?
@marklogg please help us... what happend here...

I change this and put the serial number of my alpha mini:
result: WiFiDevice = await MiniSdk.get_device_by_name("XXXXX", 10)
Also change the type of robot (I'm trying EDU, DEDU and MINI):
MiniSdk.set_robot_type(MiniSdk.RobotType.MINI)
I still can't connect to the robot. :(

Well, I solved this in two ways, the first time I restarted my computer, in my case I use Windows 10, after restarting I managed to connect to the robot.
The second time it was necessary to restart the robot, after restarting it I was able to connect to it.
I don't know if it is related to zeroconf as mentioned in another issue.


Refactor: Camel case the JavaScript variables used.

Right now there are some variable names in PascalCase, they should be converted to camelCase

Hello. I'd like to take this one on.

@rcmtcristian All yours. Thank you for picking this up.

just confirming it, you want all variables with pascal case, including vallina.js, react and typescript refactored? or just vanilla js

That shouldn't matter. All Javascript variables need to be in camelCase.

Is this issue still open ?

is this issue still open ?


No processing?

Hi Andrew, I'm continuing my quest on running this on my Mac... The good news is that I see it consuming images and counting them on the UI as images processed... The bad news is that looks like the app is not sending requests to deepstack because I don't see any processing results on "deepstack logs" and nothing shows on "error logs" either :(
Any luck/suggestion on how to debug this?

Did you create a detection profile which matches the image file name? Deepstack will not be called unless the image file matches at least one of the profiles.

Do you see the image thumbnails in the deteciton events list? Can you click the event to get into the detection event screen? What do you see there?

Assuming you have a matching profile set up, and assuming the web server is storing the images correctly, then there may indeed be an issue with calling deepstack. You can check http://localhost:5001 to see if the deepstack service is running.

If the service is indeed running, then there may be some difference in how docker names the service on mac OS. On windows and linux, the container is named using the service name which is "deepstack" in this case. The deepstack service url is configured in the env file so you can change it, but I think this is not likely to be the problem. By default, the address should be http://deepstack:5000/.

You can check the log file at src/storage/logs/laravel.log to see if any exceptions are logged.

So, yes... I created the profile with matching filename pattern. Deepstack is running fine and I see image thumbnails being shown on the app but looks like they are not being "processed" by deepstack.
Laravel log is displaying some issues connecting to mysql, I now will investigate more on this. Let me see what I will discover next.
[2021-03-25 17:41:18] production.ERROR: SQLSTATE[HY000] [2002] Connection refused {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70)
[stacktrace]
#0 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct('mysql:host=127....', 'forge', '', Array)

Those kinds of errors can happen when the containers are first starting up. Most likely something was trying to call mysql before the container was up and running. It looks like that error was logged a few days ago, so you can ignore that unless you see it continuing to happen.

Can you go to the detection event page and confirm that the pattern matching worked? From the events list you can click on the event to view the details, and you should see the list of profiles which were matched.

so, with this screenshot you helped me find that the issue was on the pattern matching. Looks like my pattern was incorrect making it "bypass"the files. I'll probably fork and propose some OSX PRs with my findings. But yes: this works on a Mac! :)

Excellent! I will think about some adding discovery mechanisms to make it more obvious when an event did not match any profiles.


Denmark marriage abroad

https://trello.com/c/hOWRgOop/975-1-nov-getting-married-abroad-denmark-content-change-request
Updated all 18 outcomes to add in information about the cost of a 'no trace letter'.

Superseded by https://github.com/alphagov/smart-answers/pull/3245


Add -target:jvm-1.8 to buil.sbt

Fixes #122.

Looks good, let's give it a try. After this PR is merged, the SNAPSHOT build should be available, which you can use for testing. If it works, please let me know and I'll prepare a release.


[TabularNLPAutoML] Add the ability to pass text features directly to CatBoost

🐛 Bug
Comparing notebooks using text features, LAMA / CatBoost I get a significantly higher test RMSE using LAMA
Tried everything, in LAMA leave only CatBoost, adjust CB params manually. Maybe something wrong with my LAMA implementation?
To Reproduce
CatBoost Notebook
LAMA Notebook
Expected behavior
Comparable accuracy to CatBoost when using LAMA

Figured out that the issue is that CatBoost is currently receiving embedding-encoded numeric values from LAMA, rather than directly textfeatures. In my case, using text_features directly in CatBoost gives better results than using embedding from LAMA. Maybe it makes sense to add to the text_features parameter besides 'tfidf', 'embed' also the possibility to choose 'direct', i.e. to use the built-in CatBoost functions of processing text features.


Where should I call the API using recompose.

I have a list of countries that are being fetched from backend. I want to use this list as a dropdown. Which recompose method should I used to set the list of countries to the countries prop?

better to use specialized libs like https://github.com/heroku/react-refetch and many others to eliminate all possible edge cases


Adding Videos return error

When i am trying to add a youtube video i get the following error:
{
  type: 'VIEW_ERROR',
  err: Error: could not find video
      at findVideo (<anonymous>:1112:11)
      at async main (<anonymous>:1175:9)
}

This also happens for Twitch Streams with the error:
{
  type: 'VIEW_ERROR',
  err: Error: timeout waiting for video to start
      at findVideo (<anonymous>:1143:13)
      at async main (<anonymous>:1175:9)
}

Solution was fairly simple (once you know):

Check the checkbox in the controller "Show stream debug tools".
A new icon appears on the stream wall. Press the left one that looks like a window
A window will open up "showing what streamwall will see"
In this window, check that all popups and cookie banners are accepted
It will work again


Remove "last synced with" comments

This PR removes all "last synced with" comments as I think they are outdated.

Makes sense


Link RandCapEnemyUnit.cpp

lgtm - only nitpick is that some comments are just restatements of the following line, and some could be removed if there were defines for magic numbers (e.g., GROUND_TEKI and FALLING_TEKI)