Change app quitting/killing behaviour

(continuing #573)
Change app quitting/killing behaviour and additionally invent new $LaunchDaemonsToUnload variable that will be handled by DealWithLaunchDaemon function.
The latter is a new addition with zero consequences since not changing anything. The purpose is to define background tasks that might interfere with installations (at our place we have a daemon watching every minute whether a VoIP application is running and restarts if needed)
The more serious or 'disruptive' change is introducing the QuitOrKillGently function to quit and kill apps in a different way than before. With the new functionality per string in $blockingProcesses the following happens:

send a quit event, wait 5 seconds, recheck using pgrep -xq, send another quit event, wait another 5 seconds
create a list of matching PIDs using pgrep, walk through them and send a SIGTERM signal to each, wait 5 seconds
again create a list of matching PIDs using pgrep, walk through them and send a SIGKILL signal to each, wait 3 seconds
iterate through the two steps above for max 3 times and return in any case
if there are remaining processes the checkRunningProcesses function will catch them via pgrep -xq and exit as before

The purpose of this 3 step attempt to quit an app as gently as possible while also saving some time (not waiting multiple times 30 seconds for nothing).
But unfortunately this change is disruptive in the following way:
The old way checkRunningProcesses worked was partially broken if processes were immediately restarted. One such example is 1PasswordNativeMessageHost as member of $blockingProcesses for both 1password7 and 1password8. You can quit or kill 1PasswordNativeMessageHost in any possible way but to no avail since being immediately restarted with a new PID.
Quoting the log:
found blocking process 1PasswordNativeMessageHost
telling app "1PasswordNativeMessageHost" to quit
sending SIGTERM to PID 11166: /Applications/1Password 7.app/Contents/Library/LoginItems/1Password Extension Helper.app/Contents/MacOS/1PasswordNativeMessageHost
sending SIGKILL to PID 12263: /Applications/1Password 7.app/Contents/Library/LoginItems/1Password Extension Helper.app/Contents/MacOS/1PasswordNativeMessageHost
sending SIGTERM to PID 12273: /Applications/1Password 7.app/Contents/Library/LoginItems/1Password Extension Helper.app/Contents/MacOS/1PasswordNativeMessageHost
sending SIGKILL to PID 12284: /Applications/1Password 7.app/Contents/Library/LoginItems/1Password Extension Helper.app/Contents/MacOS/1PasswordNativeMessageHost
sending SIGTERM to PID 12294: /Applications/1Password 7.app/Contents/Library/LoginItems/1Password Extension Helper.app/Contents/MacOS/1PasswordNativeMessageHost
sending SIGKILL to PID 12305: /Applications/1Password 7.app/Contents/Library/LoginItems/1Password Extension Helper.app/Contents/MacOS/1PasswordNativeMessageHost

And then this starts over and over again. The only way to 'fix' this is either removing the task in question from $blockingProcesses in the app definition (safe since it never worked before) or to take special precautions and unload the LaunchAgent first (this will be part of another PR to deal not only with LaunchDaemons but also LaunchAgents):
launchctl asuser launchctl stop 2BUA8C4S2C.com.agilebits.onepassword7-helper
launchctl asuser launchctl remove 2BUA8C4S2C.com.agilebits.onepassword7-helper

Only after unloading the LaunchDaemon the corresponding process 1PasswordNativeMessageHost can really be stopped. In this case the solution is simple (since stopping never really worked removing the string from the $blockingProcesses list) but this could be disruptive for other apps as well.
I searched through the current definitions and found the following entries that might be candidates for troubles:
blockingProcesses=( "Autodesk Fusion 360" "Fusion 360" )
blockingProcesses=( "Google Docs" "Google Drive" "Google Sheets" "Google Slides" )
blockingProcesses=( "iStat Menus" "iStatMenusAgent" "iStat Menus Status" )
blockingProcesses=( "Keyboard Maestro Engine" "Keyboard Maestro" )
blockingProcesses=( "Mattermost Helper.app" "Mattermost Helper (Renderer).app" "Mattermost Helper (GPU).app" "Mattermost Helper (Plugin).app" )
blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "OneDrive" )
blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "OneDrive" "Teams")
blockingProcesses=( NVivo NVivoHelper )

So without testing with the corresponding apps this PR might introduce failing updates if one of those strings above is also the result of a process being fired up (and restarted immediately) by a LaunchDaemon or LaunchAgent.

After adding LaunchAgentsToStop functionality for testing purposes the script over there https://github.com/ThomasKaiser/Installomator/blob/main/Installomator.sh is ready for testing.
Not planning to do any further updates but waiting for feedback now.

Oops, just realized that a real PR needs to go against https://github.com/Installomator/Installomator/blob/main/fragments/functions.sh – apologies for that.
But maybe we can discuss functionality still here and editing the assembled script may help with testing?

While I can see the desire to do this, shouldn't the vendor's installer take care of that? I believe there are too many variables here to build a general solution?


TypeError: process.hrtime is not a function

import * as SpeedTest from 'speedtest-net';
let testRun = SpeedTest({maxTime:5000});
testRun.on('testserver', server => {
console.dir(server);
});
run this on browser,  and it throws a error:  TypeError: process.hrtime is not a function

I got it. I added 'process.hrtime = require('browser-process-hrtime')' to index.js  and installed the browser-process-hrtime. and it works now


Formula automatic updates range but not the result value

Hi,
I'm testing a simple formula SUM(B1:B4) where the column B is of type number and the formula is in the last line in another column. I want to be able to add a new line in the spreadsheet and see the formula update it's value but that's not happening.  The formula updates the range when I add a new line like SUM(B1:B5) but never takes into account the value I put in column B for that new line. If I change the other lines that already exist it updates but the new line it doesn't do anything. If updates the range of the formula when I add a new column why doesn't it update the value accordingly with the value of the new line?

Hi,
Thanks for your comment. This feature is only available on the Pro version: https://jspreadsheet.com/docs/
You can test in development for free.

Hi,
This feature is only available on the Pro version: https://jspreadsheet.com/docs/


limit decorator compatible with asyncio

Hi,
I find this module very useful and promising - however more and more of my code is getting asyncio based. Wouldn't it be nice if limit decorator could be asyncio compliant?
It seems like aio-limit would be essentially the same as limit with couple of async and await in it.
I'm willing to make a PR for that. Would you guys consider merging such thing?

Any progress on this?

@j4v thanks for pinging me on this one. I've made a PR for this #35 - have a look :)

Thanks @evemorgen - looks good. We've implemented this (for now) with https://github.com/hallazzang/asyncio-throttle and it works, but as the library isn't supported we'd rather move to a more mature project as https://github.com/tomasbasham/ratelimit.

@tomasbasham would it be possible to merge this, now that python 2.7 is unsupported ?


Multilingual RoBERTa?

Thanks for the easy to understand paper and repo. This issue is more of a question wrt paper than the repo. The convenient thing about BERT (from an industry perspective) was the availability multilingual model and tokenizer.
I was hoping if there are plans to have a multilingual RoBERTa?
And a few followup (not important) questions are

Wikipedia might be available in 100s of languages about what about CC-News?
Will you replicate exactly the dataset for all languages?

We're considering a multilingual RoBERTa, but do not currently have concrete plans. CC-News does have decent cross-language coverage.
We do obtain very good results on XNLI in the TRANSLATE-TEST setting with the current model, so you may have success translating into English depending on your task. Also the RoBERTa tokenizer (BPE) can encode any unicode string, so there won't be unknown tokens regardless of input language, but I wouldn't necessarily expect good performance out of the box on non-English text.
In the meantime you might also try XLM: https://github.com/facebookresearch/XLM/

@myleott , is there documentation on the format of these files?
In the pretraining tutorial, I notice 3 files namely vocab.bpe, dict.txt and encoder.json, but haven't seen documentation those formats yet.

Any news about a possible multilingual RoBERTa? 😁 @myleott

@josecannete We have it under plans, there's no fixed date of release though.

@ngoyal2707 , would a documentation update to the README to detail what the contents of vocab.bpe, dict.txt and encoder.json be enough to get started.  If I'm not mistaken
dict.txt is a count of the word frequencies (in some training dataset I presume).
encoder.json is a mapping between ids and their word corresponding words (in bpe format, specified in vocab.bpe).

Here you go: https://github.com/pytorch/fairseq/tree/master/examples/xlmr

@ngoyal2707 , would a documentation update to the README to detail what the contents of vocab.bpe, dict.txt and encoder.json be enough to get started? If I'm not mistaken
dict.txt is a count of the word frequencies (in some training dataset I presume).
encoder.json is a mapping between ids and their word corresponding words (in bpe format, specified in vocab.bpe).

Please guide me to build encoder.json for other language

@myleott hi, I can't find any information for accessing the dataset mentioned in XLM-R/mBART. There are a plan to release the dataset  ?


Command fixes and changes

Fixes the kick command :ye:, If there is any problems let me know I'll fix them

Thanks for being helpful <3

No problem


Anyproxy exist

Hello,I can't run it by the command "anyproxy",so I went to the anyproxy folder run it by "nohup nodejs bin.js&" , It works OK and so fast at the beginning. But the memory(1G) used too fast.At last anyproxy existed automatically. I think there is something wrong... please help me. it's so good.

Hi,
We haved noticed that sometimes anyproxy would use too much memory resources. This would be fixed in a week or two.

It's amazing for IO now. If the memory used like "Squid-cache" that will be perfect. Thanks for all anyproxy project members.

Hi,
We have just released AnyProxy v3.8.0Beta. The problem of memory usage has been greatly optimized. Would you please have a try and give us some feedback ?
you may fetch the beta version using  npm install -g anyproxy@beta

Hello,
I will continue to follow this project and give you more feedback. Thank
you for all.
2015-10-26 23:48 GMT+08:00 Otto Mao<EMAIL_ADDRESS>
Hi,
We have just released AnyProxy v3.8.0Beta. The problem of memory usage has
been greatly optimized. Would you please have a try and give us some
feedback ?
you may fetch the beta version using npm install -g anyproxy@beta
—
Reply to this email directly or view it on GitHub
https://github.com/alibaba/anyproxy/issues/38#issuecomment-151180141.

I tried v3.8.0Beta as a https proxy server. memory less than before but I
found another issue the memory can't release when I close the browser. It
means the old connections not colsed or have a long time to close ?
I write a shell script to watch the memory change. see the result (I closed
the browser but the memory anyproxy used not release for long time)
[image: 内嵌图片 1]
2015-10-27 13:45 GMT+08:00 Yong Ai<EMAIL_ADDRESS>
Hello,
I will continue to follow this project and give you more feedback. Thank
you for all.
2015-10-26 23:48 GMT+08:00 Otto Mao<EMAIL_ADDRESS>
Hi,
We have just released AnyProxy v3.8.0Beta. The problem of memory usage
has been greatly optimized. Would you please have a try and give us some
feedback ?
you may fetch the beta version using npm install -g anyproxy@beta
—
Reply to this email directly or view it on GitHub
https://github.com/alibaba/anyproxy/issues/38#issuecomment-151180141.


Needs a comparison about the changes from version 1.3 to 1.4

Thanks for the events, instead the callbacks:)

?

take this:
https://github.com/kenwheeler/slick/blob/1.3.0/slick/slick.js
https://github.com/kenwheeler/slick/blob/1.4.0/slick/slick.js
and diff ;)

lol or read the release notes


Champlain Regional College

Champlain Regional College
https://www.champlainonline.com/champlainweb/
2-year CS and math program:
https://www.champlainonline.com/champlainweb/future-students/computer-science-mathematics/
<EMAIL_ADDRESS>listed as contact email address here:
https://www.champlainonline.com/champlainweb/contact-us/

@patrickmineault Pull request merged. Thank you!


Feat: Adding ActivationThresholdValue details for Influxdb

Signed-off-by: Ritikaa96<EMAIL_ADDRESS>Checklist

[x] Commits are signed with Developer Certificate of Origin (DCO)

Fixes #
Related to https://github.com/kedacore/keda/issues/2800
Related to https://github.com/kedacore/keda/pull/3516

@zroubalik , @JorTurFer @tomkerkhove @ahmelsayed PTAL


Use windows-bindgen to generate only necessary bindings

Not sure if you're aware of this, but after reading your blog post (and especially since you mentioned "I'd rather have less code in my executables in general"), this might be interesting? Just showing that this can work.

Oh interesting!  Is it the same code generator used by windows-sys?  What is the benefit, I guess less code in the crate?
...but it's only declarations so it's only a compile-time thing, right?  And then this is maybe more code at compile time because it's doing the bindings generation as part of its computation?
It's funny, there's a whole FAQ-like section about windows vs windows-sys, I need one about this crate too :)
https://kennykerr.ca/rust-getting-started/windows-or-windows-sys.html

This makes me wonder if I should be deriving some of my implementations of the Windows API from this binding generator, hrmm
https://github.com/evmar/retrowin32/blob/c498c8a0a5977cbf558a6ed33239cd77a247a552/win32/src/winapi/ddraw/ddraw1.rs#L22

Yes, it should be the same code and the benefit is indeed that there's less code that gets included at compile time (assuming dead code elimination works well it might not make a difference after compilation?).

Sorry for not responding, I wasn't sure what to do with this.  I think it's got pros and cons and I couldn't conclude what the balance was.  I think retrowin32 now uses windows-sys in a few different places with different subsets of API so the thing where Rust unifies the features so things just work is a big benefit.  I think windows-bindgen ends up being about as large too (just in XML) because it includes the whole windows API for generation purposes.


ODDR issues

I receive this issue when using ODDR
ERROR: Failed to route arc 0 of net '$abc$10147$iopadmap$vga_r[0]', from SITEWIRE/OLOGIC_X0Y78/OUTFF_Q to SITEWIRE/IOB_X0Y78/OUSED_OUT.

When using SDR it works, but also with previous version of nextpnr-xilinx (generating the image below)
Vivado produces no issue.
Verilog code: https://gist.github.com/suarezvictor/ded5ce54e8533a6f2bf45d555113c114

You need to regenerate the chipdb with the new toolchain version.
The old chipdb contains the wrong output wire name SITEWIRE/OLOGIC_X0Y78/OUTFF_OQ
instead of SITEWIRE/OLOGIC_X0Y78/OQ


How to run electron app as sudo/root user?

In my npm start script I have sudo electron . but after running the packager the app does not start with sudo privileges. Can someone point me in the right direction for starting electron app as sudo user?
Some of my npm modules require sudo access for them to work

I do not endorse the idea of starting an Electron app as root. Starting up a web browser engine with administrator access is a large security risk. What you should do instead is run it as an unprivileged user, and then use a module like sudo-prompt to call the app again with a Node script that contains all the logic that requires superuser privileges, but with the ELECTRON_RUN_AS_NODE variable set in the child environment.

@malept cool, thanks!

If someone is curious, neither sudo-prompt or electron-sudo worked for me. I ended up using a custom osascript for my electron app on mac
var cmd = '/usr/bin/osascript -e \'do shell script "echo some_command" with administrator privileges\''

var proc = exec(cmd)

@miguelmota I am the author of sudo-prompt, which uses essentially the same osascript (but with support for status code, stdout and stderr as well as an application icon in the Mac prompt) as well as cross-platform support. How could sudo-prompt be improved to work better for you?

@jorangreef I can't remember what the exact issue was but I think it wasn't getting stuck at some point and not returning a response which was halting my application.
If you're wondering here's my code where it's using a custom script for sudo prompt
https://github.com/miguelmota/global-keypress/blob/master/index.js

Thanks @miguelmota, if you ever encounter that again just let me know and I will open an issue so we can resolve it.

Hi Guys,
I have many problems to run my Electron App using “system” privileges.
I need to run it with “system” privileges in order to view UAC messages.
I'm using desktopCapturer and navigator.mediaDevices.getUserMedia and i need to make remote connection "unattended".
Thanks in advance!
Matteo

An unattended desktop capture sounds dubious. Anyway, try setting win32metadata.requested-execution-level. If that doesn't work, ask in one of the community forums.

Hi, someone can help me? :)

There's nothing special about Electron in this sense. I would suggest looking up how to do what you're looking for in a standard Windows application.
If you require more assistance than that, please ask in one of the community forums. More people look at those websites that could help you.

Electron base app is made by 2/3 executables. Main process run other render processes.
I need that render processes runs with system privileges but seems not possible at all...
Do you have some useful resources where i can find something useful about?

Hi,
using psexec with my exe electron::

I used a search engine to look for "Electron UAC" and got http://layer0.authentise.com/electron-and-uac-on-windows.html
Try using requireAdministrator instead of highestAvailable.
If you require more assistance than that, please ask in one of the community forums. More people look at those websites that could help you.

Hi,
I tried change manifest.xml...but nothing happened.
Maybe it's for Electron Architecture?
I try everything..it's possible to run Electron processes with System Privileges ?? :(
Thanks for you help....i'm near to give up.

electron-builder add "requestedExecutionLevel": "highestAvailable"     can work
"build": {
    "productName": "MyApp",
    "compression": "maximum",
    "forceCodeSigning": false,
    "asar": true,
    "win": {
      "icon": "resources/icon/icon.ico",
      "requestedExecutionLevel": "highestAvailable"
    }
  }

@miguelmota I am the author of sudo-prompt, which uses essentially the same osascript (but with support for status code, stdout, stderr and an application icon in the Mac prompt) as well as cross-platform support. How could sudo-prompt be improved to work better for you?

We are facing an issue with running privileged operations in our Electron-based application on MAC. Our application deals with accessing the hardware operations (which are in a DYLIB implemented in C), which we need to execute them(operations) in sudo mode.
We can perform them if we run the application from the terminal with sudo command (terminal --> sudo application_path and then giving the user credentials in the terminal to open the applications).
But that is running the entire application as a superuser.
We are trying to run a daemon via launched, which on application startup takes the users' credentials and keeps running in the background. Whenever the user initiates the hardware operations, the application will call this daemon to run those operations.
We are able to.... Created a simple daemon file and called it from a .js file. When the application runs, it asks for a password also. but .js was not able to survive on its own. As soon as it is started by launched, it will execute and exit. We want to create a daemon in such a way that runs quietly in the background, usually for a long time.
We tried with sudo-prompt, but the application was not run with root user privileges.
var sudo = require('sudo-prompt');
var options = {
name: 'vgsPro',
};
// we can give here only cmmand
sudo.exec('npm run electron-build', options, function (error, stdout, stderr) {
if (error) {
console.log('error: ' + stderr);
throw error;
} else {
console.log('stdout: ' + stdout);
}
});
Please let us know 1. If we are having the correct approach and if yes, where are we going wrong? 2. Are we using sudo-prompt correctly?
Is there any better way to achieve this

@ukirdemonika please direct your question to the sudo-prompt support forums as your question is off-topic for Electron Packager.


Not updating content when using with ngx-summernote

I am using this plugin, it works but its not triggering OnChange event, just Div is updating but not the value!

What is ngx?

@DiemenDesign ngx is the wrapper for summernote, allowing us to use with angular 6/7
https://github.com/lula/ngx-summernote

Have you tried using Summernote in it's native form, to make sure the events your expecting to fire do fire?

This issue is over a year old, so I am hoping you were able to fix this, or find a workaround.


Fix for github link error in ARM and BICEP template

Fix for error Cannot find source control token with name github during deployment
Purpose

...

Does this introduce a breaking change?

[ ] Yes
[x ] No

Pull Request Type
What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Get the code

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Test the code

Use Deploy to Azure to test

## What to Check
Verify that the following are valid
* Resources are successfully deployed without error

## Other Information
<!-- Add any other helpful information that may be needed here. -->

Also encountered the same problem on my side
Cannot find SourceControlToken with name GitHub

@microsoft-github-policy-service agree [company="Microsoft"]

@microsoft-github-policy-service agree company="microsoft"

@microsoft-github-policy-service agree

@delynchoong, We have made this change as part of another PR #19. Thanks for your contribution.


Feature request: add option to allow multi popovers, but only when called from an open popover

I use webui-popover extensively in the app and I use the option multi: false because I think that having multiple popovers open at the same time is kind of confusing to the user, but sometimes I need to let the user open a popover when inside a popover (see image)

Having an option to allow multiple only when called from another popover would be great, but don't know if would be possible.

Hi @Edddy  , this idea is great, but I don't have enough time to deal with it recent days. After the end of October will be more free time, then I may be focus on this issue.
Thanks!


Remove version: SmartSoft.SmartFTP version 10.0.3214.0

[Automated] It returns code over 400 in all urls
Microsoft Reviewers: Open in CodeFlow

URL: https://static.smartftp.com/static/Products/Client/10.0.3214.0/x64/SmartFTP.msi
Response Error: The remote server returned an error: (404) Not Found.
(Automated message - build 911)


You can't preview page templates when picking one

It would be useful if, when the user selected  page template from the list, they saw a preview of it in the preview pane. This could be treated as a JavaScript enhancement.

Closing this issue for now. This is something that should be on the trello backlog (ICEBOX) to consider later in public beta


Verifying the Signatures of Amazon SNS Messages

I can't find where spring cloud aws verifies sns message signature (http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.verify.signature.html).
Is it done at all?

I know this is an old ticket, but I can't find the part of code that verifies the signature too. I think it should be in the NotificationRequestConverter.java, but I could not find it there.
According to AWS Docu the message signature should be verified on all messages. Therefore, not checking the signature could be a security leak. 🤔
And, in the Java code example from AWS it is also pointed out that the DNS name should be verified. (Don't know if this is done yet)
Can someone either:

show me where the signature is verified(what I don't think is done yet),
or make this to a feature request.

Thanks @KarlKl for letting us know. We are taking care of it.

With the move to a new repository (https://github.com/awspring/spring-cloud-aws) I was wondering if there was any update on this issue being addressed?
I had a quick look but the code still looks to be very similar to the code in this repository (I might have missed it).

Replaced with https://github.com/awspring/spring-cloud-aws/issues/176


Broadlinks s1c on the new version 0.92

Hello
The componet is not working in the new version ov HA 0.92
What i need to change?
Thanks

Me too, if you delete __pycache folder, it work oK, Bute after several times, it will not working! Please help us to fix! This component very usefull. Thanks

Me too
"Integration broadlink_s1c not found when trying to verify its sensor platform."
deleting __pycache folder didn't help.


Cannot select text in contenteditable element

Based on the question from discuss forum

The fix is published in<EMAIL_ADDRESS>

In ver<EMAIL_ADDRESS>- method selectText doesn't work http://s.csssr.ru/U5LQQCK7T/20180606190308.jpg

Hi @Andrei1982
Could you please send me your test credentials (login/password) so I can reproduce the issue on a real-life web site?
My corporate email is<EMAIL_ADDRESS>


Localization

Could you translate this project into other languages?

I haven't resources to do it. But it whould be cool if someone help to translate. Texts can be found here: https://fallacy.hyoo.ru/web.locale=en.json


Identify Project Pythia  cookbooks to showcase

Select at least one cookbooks as representative notebooks that showcase MyST integration on 2i2c managed infrastructure.

I think https://github.com/projectpythia-mystmd/radar-cookbook is an excellent example of the Project Pythia cookbook that we should showcase.


Major improvements and refactoring

Added several new CLI args.
Added YAML config.
Introduced Get/Set methods based on Reflect+Schema+Meta.

@russjones @r0mant can you folks help me to code review?


Feature/dag improvements

Now uses CWL Avro to deserialize CWL files for parsing. Also improves DAG by showing correct dependencies between nodes.

[x] Check that you pass the basic style checks and unit tests by running mvn clean install

Coverage decreased (-0.5%) to 72.748% when pulling<PHONE_NUMBER>46c98ffc2c478737d3c8407e181a50 on feature/dag_improvements into fc75f4d68e2d5157214450d05e4d6287745a0798 on develop.


Add workflow to name Sentry Releases with versions

Sentry docs: https://docs.sentry.io/product/cli/releases/
Uses this GitHub Action: https://github.com/marketplace/actions/sentry-release

@markhougaard from what I know, when creating a react app, the source maps are generated under the folder map-template/build/assets. They are the .map files under that folder.
I'm not 100& sure I'm correct here, so maybe @ammapspeople has some input too.

@markhougaard @andreeaceachir142

When building the React app for production, source map files are located alongside the distribution files in the build/assets folder.
When building for npm, source map files are also located alongside the distribution files in the dist folder.

So if we can set a relative folder for the source map, it should work.

I think @markhougaard is planning to release this


getSelectedIndex() only display the 1st item (default item)

getSelectedIndex() only shows 0, when i select another item it doesn't change it's value.

This should be fixed in the last releases.


Added test_code_quality.py as a lint for wptview

We were recently working on something similar over at SymEngine
Also more checks can easily be added on top of this.
cc @martiansideofthemoon

@Sumith1896,
Thanks for this lint file. There are a few things I'd like you to do before I actually review it. So we would ideally want the lint to run as an executable in the base folder as ./lint or integrated with git commit. That would be ideal and I'll be really grateful if you could make the needful changes.
Secondly, if you could document the exact functionality of this lint file it would be excellent.  This could be added as in the code as comments or in a separate file.
Lastly, the included / excluded files are likely to change. So if you could move the list of included / excluded files and folders to an external folder.
(This pull request tries to fix #22)

@martiansideofthemoon I'll get back to you soon

I wonder if a more promising approach would be to add support for running eslint with an appropriate rule set?

@Sumith1896 any progress?

As discussed with @martiansideofthemoon, eslint will be preferred over the python script.


[Feature request] Preserve JSDoc linebreaks

I suppose, it will be fine if VSCode could leave all handmade line breaks in JSDoc while interpret comments in popups. It will allow developers to make lists inside comment, etc.

 * Note:
 *      - this is unstable
 *      - can be undefined
 */

interpret literally to this
List of dialogs.
Note:
     - this is unstable
     - can be undefined

We interpret jsdoc comments as markdown, which will wrap text automatically. This wrapping is also the expected behavior in most cases.
Two options if you want to create a manual break:
End the line with two spaces (note the spaces after  List of dialogs.):
/**
 * List of dialogs.
 * Note:
 *   - this is unstable
 *   - can be undefined
 */
const x = 123;

Put in an extra newline:
/**
 * List of dialogs.
 *
 * Note:
 *   - this is unstable
 *   - can be undefined
 */
const ab = 123;


How to set authentication header with jwt token for outgoing requests?

Description:
I need to set the Authorization header with a jwt token for outgoing requests (i.e. when the service deployed alongside envoy acts as an http client).
The token is already generated by another process and we are fetching and storing it in a file.
Currently I'm doing setting the header with a Lua filter but it has two disadvantages

I'm using the Lua io package to read the file and the envoy docs says

Do not perform blocking operations from scripts. It is critical for performance that Envoy APIs are used for all IO.

It reads the file on each request (I don't know if we can make the lua filter stateful but even if that is true it won't be enough since now I need to implement refreshing the token, aka fetching it again  recurrently after a fixed time delay)

I can summarize my needs as the following

Avoid blocking IO in the filter to get the token
Preferably avoid any IO in the filter to get the token
Recurrently fetch for the token at a fixed delay

Is there any existing filter that could be used in this case? I couldn't find any.
If there is none, I'm wondering if it is a good use case for a wasm filter (unless you consider the requirement is general enough to provide it as a built in filter within envoy).
From what I read so far I think I could use the timer API in a singleton service to fetch the token trough http recurrently and store it in shared data, so the module running in the per worker wasm vms will just have to retrieve the token from shared data and add the Authorization header with it.
Are my assumptions correct about what can be done with wasm? Does this sounds a good alternative?  Is there a simpler approach that won't require wasm?
[optional Relevant Links:]
I've found a istio discussion asking for something similar, although it doesn't mention the need of refreshing the token but it is requesting the token through http for each outgoing request so I don't think is a good alternative.
https://discuss.istio.io/t/how-to-enable-inserting-of-authentication-headers-for-outgoing-requests-using-envoy/5110

You could use gcp_authn filter if you can start a http server alone side with envoy process to send the token.

@qiwzhang I'm not sure about using that filter that it is intended for a very specific use case of GCP. Besides that, it doesn't seem to provide any token refresh feature and I don't know if it is based on jwt tokens, if it is not then how can decide when to remove the token from the cache?

I've found this wasm example with assemblyscript and it is really close to what I need to I'll write my own based on that unless there is any existing alternative to avoid having to create wasm vm which seems to be the biggest disadvantage for this approach.

I wrote the wasm filter and run a very simple load test using k6 to compare against the envoy sidecar using the lua filter and I'm having a slightly worst 99 percentile with the wasm filter, specially at the beginning of the load test.
I wonder if at least in theory my implementation in the wasm filter is better than the lua filter, mainly because avoids blocking io by doing an http call in the background instead of reading the file in the worker thread.
Wasm filter
export * from "@solo-io/proxy-runtime/proxy"; // this exports the required functions for the proxy to interact with us.
import { RootContext, Context, registerRootContext, FilterHeadersStatusValues, stream_context, log, LogLevelValues, get_shared_data,
         set_shared_data, WasmResultValues, set_tick_period_milliseconds, Headers, makeHeaderPair, BaseContext, BufferTypeValues, get_buffer_bytes,
         send_local_response, GrpcStatusValues } from "@solo-io/proxy-runtime";

class AuthSingleton extends RootContext {

  onConfigure(configuration_size: u32): bool {
    super.onConfigure(configuration_size);
    let tickMillis = 30000; // TODO take from config
    log(LogLevelValues.info, "Token fetched tick configured to " + tickMillis.toString());
    set_tick_period_milliseconds(tickMillis);
    // get token eagerly
    this.updateConfig("/initial");
    return true;
  }

  onTick(): void {
    this.updateConfig("/refresh");
  }

  updateConfig(path: string): void {
    let headers: Headers = [];
    // TODO this should be obtained from configuration as well but it isn't clear how to get more than one value
    headers.push(makeHeaderPair(":path", path));
    headers.push(makeHeaderPair(":method", "GET"));
    // The value is irrelevant but the authority header MUST be set
    headers.push(makeHeaderPair(":authority", "foo"));
    let cluster = this.getConfiguration();
    log(LogLevelValues.info, "Token requested to cluster " + cluster);

    let result = this.httpCall(cluster,
      headers,
      new ArrayBuffer(0), [],
      // 1 second timeout
      5000,
      // pass us, so that the callback receives us back.
      // once AssemblyScript supports closures, this will not be needed.
      this,
      // http callback: called when there's a response. if the request failed, headers will be 0
      (origin_context: BaseContext, headers: u32, body_size: usize, trailers: u32) => {

        if (headers == 0){
          log(LogLevelValues.error, "Http response to fetch token returned an error");
          // TODO understand if I should clear the token in shared data or not, we fetch each minute but probabluy the token has a longer expiration time. Maybe on failure I could check the expiration time of
          // the one stored, the goal being avoiding requests with an expired token but at the same time avoid checking expiration on each request being sent.
        }
        else {
          let status = stream_context.headers.http_callback.get(":status")
          if (status == "200") {
            let bytes = get_buffer_bytes(BufferTypeValues.HttpCallResponseBody, 0, body_size);
            // TODO shall we check if it is a valid token here?
            set_shared_data("jwt-token", bytes);
            log(LogLevelValues.info, "Token fetched and stored in shared data succesfully");
          }
          else {
            log(LogLevelValues.error, "Http response status: " + status);
          }
        }
      });

      if (result != WasmResultValues.Ok){
        log(LogLevelValues.error, "Http call to get token failed, result code: " + result.toString());
      }
  }
}
class AuthRoot extends RootContext {
  token: string = "";

  createContext(context_id: u32): Context {
    log(LogLevelValues.info, "AuthRoot createContext called!");
    return new Auth(context_id, this);
  }
  onConfigure(configuration_size: u32): bool {
    set_tick_period_milliseconds(30000); // TODO take from config
    return true
  }

  // TODO why does this on tick? instead of onRequestHeader? just to decode the token once? But what if the tick of the singleton enters right after the tick of the worker?
  onTick(): void {
    this.syncConfig();
  }

  syncConfig(): void {
    let data = get_shared_data("jwt-token");
    if (data.result != WasmResultValues.Ok) {
      return;
    }
    let bytes = data.value;
    if (bytes == null) {
      log(LogLevelValues.error, "The token is not stored in shared data");
      return;
    }

    if (bytes.byteLength == 0) {
      log(LogLevelValues.error, "The token is empty");
      return;
    }

    this.token = String.UTF8.decode(bytes);

    log(LogLevelValues.debug, "Token obtained from shared data and decoded correctly");

  }
}

class Auth extends Context {
  constructor(context_id: u32, root_context: AuthRoot) {
    super(context_id, root_context);
  }

  onRequestHeaders(a: u32, end_of_stream: bool): FilterHeadersStatusValues {
    let root_context = this.root_context as AuthRoot;

    if (root_context.token == ""){
      send_local_response(401, "not authorized", new ArrayBuffer(0), [], GrpcStatusValues.Internal);
      return FilterHeadersStatusValues.StopIteration;
    }
    else {
      stream_context.headers.request.add("Authorization", "Bearer " + root_context.token);
      return FilterHeadersStatusValues.Continue;
    }

  }

}

// TODO rename to token fetcher rather than auth
registerRootContext((context_id: u32) => { return new AuthRoot(context_id); }, "auth");
registerRootContext((context_id: u32) => { return new AuthSingleton(context_id); }, "auth_singleton");

The requests to /initial and /refresh are served by a python server running in the same container. The initial is only called when the AuthSingleton is created and it is served from a local file, the refresh request is served by fetching the file from s3.
from http.server import BaseHTTPRequestHandler, HTTPServer
import io
import boto3
import json
import os

hostName = "localhost"
serverPort = 8085
s3 = boto3.client('s3')
bucket = 'some-bucket'
object = '/token.json'

token_file = open('/etc/credentials/token.json')
initial_token = bytes(token_file.read(),"utf8")
token_file.close()

class MyServer(BaseHTTPRequestHandler):
    def do_GET(self):
        if self.path == '/refresh':
          print('serving refresh')
          byte_buffer = io.BytesIO()
          s3.download_fileobj(bucket,object,byte_buffer)
          token = json.loads(byte_buffer.getvalue())[domain]
          self.send_response(200)
          self.send_header("Content-type", "text/html")
          self.end_headers()
          byte_buffer.close()
          self.wfile.write(bytes(token,"utf8"))
        elif self.path == '/initial':
          print('serving initial')
          self.send_response(200)
          self.send_header("Content-type", "text/html")
          self.end_headers()
          self.wfile.write(initial_token)
        else:
          self.send_response(404)

if __name__ == "__main__":
    webServer = HTTPServer((hostName, serverPort), MyServer)
    print("Server started http://%s:%s" % (hostName, serverPort))

    try:
        webServer.serve_forever()
    except KeyboardInterrupt:
        pass

    webServer.server_close()
    print("Server stopped.")

Lua filter
- name: envoy.filters.http.lua
  typed_config:
    "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
    inline_code: |
      -- authorization filter
      local open = io.open
      local function read_file(path)
          local file = open(path, "rb")
          if not file then return nil end
          local content = file:read "*a"
          file:close()
          return content
      end

      function envoy_on_request(handle)
        local token_string = read_file("/etc/credentials/token.json")
        token_string = string.gsub(token_string, "%s+", "")

        handle:headers():add("Authorization", "Bearer "..token_string)
      end


Support auto-stretch timebase in "SWS/AW: Set selected items timebase"

The new action is only registered in REAPER v6.01+.

:white_check_mark: Build sws 153-master completed (commit https://github.com/reaper-oss/sws/commit/878018c4d4 by @cfillion)

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=x86_64

build/sws-<IP_ADDRESS>-Linux-x86_64-r6-autostretch-timebase-878018c4.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2019, ARCH=x64

build/BuildUtils/SWS_Template.ReaperLangPack
build/BuildUtils/whatsnew.html
build/reaper_sws-x64.pdb
build/sws-<IP_ADDRESS>-Windows-x64-r6-autostretch-timebase-878018c4.exe

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=armv7l

build/sws-<IP_ADDRESS>-Linux-armv7l-r6-autostretch-timebase-878018c4.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=i686

build/sws-<IP_ADDRESS>-Linux-i686-r6-autostretch-timebase-878018c4.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Ubuntu1804, ARCH=aarch64

build/sws-<IP_ADDRESS>-Linux-aarch64-r6-autostretch-timebase-878018c4.tar.xz

Environment: APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2019, ARCH=x86

build/BuildUtils/SWS_Template.ReaperLangPack
build/BuildUtils/whatsnew.html
build/reaper_sws-x86.pdb
build/sws-<IP_ADDRESS>-Windows-x86-r6-autostretch-timebase-878018c4.exe

@Breeder If you'd like to test this early before release, the dev builds are in the comment above.

Thank you, I'll check it out immediately.

@cfillion
thought: How about exposing the ItemTimebase class globally to SWS so ther contributers could make use of it too?

I'm not sure whether it would be useful outside of these specific SWS/AW actions (searching for C_BEATATTACH didn't reveal other potential users). If otherwise then yes it would be a good idea to expose it & reuse it.


open_ai: Add support for tools in structured output methods

Description
This PR introduces support for state tools that the LLM can utilize. Providing tools to the LLM, even when not directly used, can influence and improve the LLM's output.
Changes

Implemented functionality to pass tool lists to the LLM
Added support for the LLM to recognize available tools
Ensured compatibility with 'function_calling' 'json_mode' and 'json_schema' methods

Examples

Without tool provided:

With tool provided:

'json_schema' functionality:

Benefits

Enhances LLM awareness of available tools
Improves output quality and relevance
Provides more flexibility in LLM interactions

I don't know if it is known issue or not, I cannot run with following code, even before.
before:

after my commit:

from pydantic import BaseModel, Field
from langchain_core.prompts import ChatPromptTemplate
from langchain_openai.chat_models.base import ChatOpenAI

class Plan(BaseModel):
    """Plan to follow in future"""
    step: str = Field(
        description="plan to follow"
    )

class PlanList(BaseModel):
    """Plans to answer a question"""
    plan_list: list[Plan] = Field(
        description="different plans to follow, should be in sorted order. specify tool to use"
    )

plan_prompt = ChatPromptTemplate.from_messages([('system', "search 'langchain' on google and find the first 5 links")])

plan_llm = ChatOpenAI(model="gpt-4o-2024-08-06", temperature=0).with_structured_output(PlanList, method='json_schema')
plan_chain = plan_prompt | plan_llm
plan_chain.invoke({})

When the pydantic model includes another pydantic model, it raises error because we need to specify additionalProperties=false to submodel too. My implementaion is convert the pydantic model into dict and add additionalProperties=false recursively.

I rebased and messed up I will open up another PR

I opened another PR https://github.com/langchain-ai/langchain/pull/25338


Unable to move/rotate shapes (reliably)

I'm having trouble moving/rotating shapes with Transform Control.
If I just click on the arrows they mostly don't engage and I end up moving the camera around the scene. Occasionally and incorrect arrow (direction) engages. (https://youtu.be/WbWLZBDpXgQ)
Translation seems to work if I hold x/y/z, but rotation still does not.
I'm running Ubuntu 18.04 docker image (Ubuntu 19.10 host). I compiled ignition gazebo today from source (3.1.0). I also tried installing binary (3.0.0), and I can't move the shapes at all in that version.

Thank you for the bug report and the video. I can't reproduce the issue locally either in a Ubuntu Bionic host or inside a Docker container.
My guess is that the mouse position is not being properly mapped to the 3D scene due to some resolution mismatch.

Is there anything else I can do to help?
Gazebo (classic) runs fine inside the same docker container. I can add models move them etc. So do the rest of the GUI ROS tools like Rviz, and rqt. I can make a few videos if you'd like.
I wanted to compile ignition gazebo on 19.10 without docker, but Ogre seems to build and install some dependencies from source that might conflict with what I'm already using for some other development, I can't risk it right now...
I will try to compile again on 20.04 once ignition gazebo and it's dependencies are available.

I will try to compile again on 20.04 once ignition gazebo and it's dependencies are available.

I just tried debs inside a 20.04 Docker container and I can't reproduce the issue there either (physics is not working yet though, we need a new release with https://github.com/ignition-release/ign-physics2-release/pull/4).

The mouse position seems to be ok when selecting shapes

Interesting, that does seem to indicate that the mouse positions are hitting the correct place on the scene.

Is there anything else I can do to help?

I can't think of anything else.

I just tested this but was unable to reproduce either.
@EvilPictureBook what graphics card and driver are you using? Do you have a high dpi display?

I'm using a 4k monitor, with Nvidia 1060, proprietary driver version: 440.82 from http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu.
Turns out I have an old laptop with 18.04 around, so I'll try installing on that tomorrow too.
My Dockerfile (if this is helpful...):
 So it's probably something to do with docker and GUI apps or my config. If I figure it out I'll post an update.

Sorry for the delay. I finally have a bit more time, and I'd like to test this on 20.04, and close the issue if everything works (since then it's probably a docker issue).
So I was wondering if it's possible yet to install gazebo on 20.04 (if this should go into a separate issue I'd be happy to start one).
(1)
For the binary install, the instructions on the README only has instructions for Bionic. There seem to be binaries available for Focal but they're libignition-gazebo3-dev when the README says to install libignition-gazebo4-dev.
(2)
When trying to install from source some of the dependencies seem to not be available for Focal yet.
I already installed the packages from Prerequisites:
libignition-cmake2-dev is already the newest version (2.1.1+dfsg-3).
libignition-common3-dev is already the newest version (3.6.0-1~focal).
libignition-common3-dev set to manually installed.
libignition-gui3-dev is already the newest version (3.2.0-1~focal).
libignition-math6-eigen3-dev is already the newest version (6.4.0-1~focal).
libignition-msgs5-dev is already the newest version (5.3.0-1~focal).
libignition-msgs5-dev set to manually installed.
libignition-physics2-dev is already the newest version (2.1.0-2~focal).
libignition-plugin-dev is already the newest version (1.1.0-1~focal).
libignition-rendering3-dev is already the newest version (3.1.0-1~focal).
libignition-tools-dev is already the newest version (1.0.0-1~focal).
libignition-transport8-dev is already the newest version (8.0.0-1~focal).
libsdformat9-dev is already the newest version (9.2.0-1~focal).

I had to manually install ignition-common3-profiler, and libignition-common3-av-dev

but none of the libignition-***4 dependencies seem available.

Full output from Cmake:
-- ignition-gazebo4 version 4.0.0~pre1
-- Operating system is Linux
-- Found CPack generators: DEB
-- Looking for ignition-math6 -- found version 6.4.0
-- Searching for dependencies of ignition-math6
-- Looking for sdformat9 - found

-- Looking for ignition-plugin1 -- found version 1.1.0
-- Searching for dependencies of ignition-plugin1
-- Searching for <ignition-plugin1> component [loader]
-- Looking for ignition-plugin1-loader -- found version 1.1.0
-- Searching for dependencies of ignition-plugin1-loader
-- Searching for <ignition-plugin1> component [register]
-- Looking for ignition-plugin1-register -- found version 1.1.0
-- Searching for dependencies of ignition-plugin1-register
-- Looking for ignition-plugin1 - found

-- Looking for ignition-transport8 -- found version 8.0.0
-- Searching for dependencies of ignition-transport8
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.3.2
-- Checking for module 'uuid'
--   Found uuid, version 2.34.0
-- Looking for ignition-msgs5 -- found version 5.3.0
-- Searching for dependencies of ignition-msgs5
-- Looking for ignition-math6 -- found version 6.4.0
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 6.2.0
-- Searching for <ignition-transport8> component [log]
-- Looking for ignition-transport8-log -- found version 8.0.0
-- Searching for dependencies of ignition-transport8-log
-- Looking for ignition-transport8 - found

-- Looking for ignition-msgs5 -- found version 5.3.0
-- Looking for ignition-msgs5 - found

-- Looking for ignition-common3 -- found version 3.6.0
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Searching for <ignition-common3> component [profiler]
-- Looking for ignition-common3-profiler -- found version 3.6.0
-- Searching for dependencies of ignition-common3-profiler
-- Searching for <ignition-common3> component [events]
-- Looking for ignition-common3-events -- found version 3.6.0
-- Searching for dependencies of ignition-common3-events
-- Looking for ignition-math6 -- found version 6.4.0
-- Searching for <ignition-common3> component [av]
-- Looking for ignition-common3-av -- found version 3.6.0
-- Searching for dependencies of ignition-common3-av
-- Checking for module 'libswscale'
--   Found libswscale, version 5.5.100
-- Checking for module 'libavdevice >= 56.4.100'
--   Found libavdevice , version 58.8.100
-- Checking for module 'libavformat'
--   Found libavformat, version 58.29.100
-- Checking for module 'libavcodec'
--   Found libavcodec, version 58.54.100
-- Checking for module 'libavutil'
--   Found libavutil, version 56.31.100
-- Looking for ignition-common3 - found

-- Looking for ignition-fuel_tools4 -- found version 4.1.0
-- Searching for dependencies of ignition-fuel_tools4
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.4
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.2.2
-- Checking for module 'libzip'
--   Found libzip, version 1.5.1
-- Looking for ignition-common3 -- found version 3.6.0
-- Looking for ignition-msgs5 -- found version 5.3.0
-- Looking for ignition-fuel_tools4 - found

CMake Warning at /usr/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:188 (find_package):
  By not providing "Findignition-gui4.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ignition-gui4", but CMake did not find one.

  Could not find a package configuration file provided by "ignition-gui4"
  with any of the following names:

    ignition-gui4Config.cmake
    ignition-gui4-config.cmake

  Add the installation prefix of "ignition-gui4" to CMAKE_PREFIX_PATH or set
  "ignition-gui4_DIR" to a directory containing one of the above files.  If
  "ignition-gui4" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:78 (ign_find_package)

-- Looking for ignition-gui4 - not found

-- Looking for Qt5 - found

-- Looking for ignition-physics2 -- found version 2.1.0
-- Searching for dependencies of ignition-physics2
-- Looking for ignition-math6 -- found version 6.4.0
-- Searching for dependencies of ignition-math6
-- Searching for <ignition-math6> component [eigen3]
-- Looking for ignition-math6-eigen3 -- found version 6.4.0
-- Searching for dependencies of ignition-math6-eigen3
-- Looking for ignition-plugin1 -- found version 1.1.0
-- Searching for dependencies of ignition-plugin1
-- Searching for <ignition-plugin1> component [all]
-- Looking for all libraries of ignition-plugin1 -- found version 1.1.0
-- Looking for ignition-plugin1 -- found version 1.1.0
-- Searching for <ignition-physics2> component [mesh]
-- Looking for ignition-physics2-mesh -- found version 2.1.0
-- Searching for dependencies of ignition-physics2-mesh
-- Looking for ignition-common3 -- found version 3.6.0
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Searching for <ignition-common3> component [graphics]
-- Looking for ignition-common3-graphics -- found version 3.6.0
-- Searching for dependencies of ignition-common3-graphics
-- Looking for ignition-math6 -- found version 6.4.0
-- Searching for <ignition-common3> component [profiler]
-- Searching for <ignition-physics2> component [sdf]
-- Looking for ignition-physics2-sdf -- found version 2.1.0
-- Searching for dependencies of ignition-physics2-sdf
-- Looking for ignition-physics2 - found

CMake Warning at /usr/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:188 (find_package):
  By not providing "Findignition-sensors4.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ignition-sensors4", but CMake did not find one.

  Could not find a package configuration file provided by "ignition-sensors4"
  with any of the following names:

    ignition-sensors4Config.cmake
    ignition-sensors4-config.cmake

  Add the installation prefix of "ignition-sensors4" to CMAKE_PREFIX_PATH or
  set "ignition-sensors4_DIR" to a directory containing one of the above
  files.  If "ignition-sensors4" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:100 (ign_find_package)

-- Looking for ignition-sensors4 - not found

CMake Warning at /usr/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:188 (find_package):
  By not providing "Findignition-rendering4.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ignition-rendering4", but CMake did not find one.

  Could not find a package configuration file provided by
  "ignition-rendering4" with any of the following names:

    ignition-rendering4Config.cmake
    ignition-rendering4-config.cmake

  Add the installation prefix of "ignition-rendering4" to CMAKE_PREFIX_PATH
  or set "ignition-rendering4_DIR" to a directory containing one of the above
  files.  If "ignition-rendering4" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:117 (ign_find_package)

-- Looking for ignition-rendering4 - not found

-- Looking for ignition-math6 -- found version 6.4.0
-- Looking for ignition-math6 - found

-- Looking for Protobuf - found

-- BUILD ERRORS: These must be resolved before compiling.
-- 	Missing: ignition-gui4
-- 	Missing: ignition-sensors4 (Components: rendering, air_pressure, altimeter, camera, gpu_lidar, imu, logical_camera, magnetometer, depth_camera, thermal_camera)
-- 	Missing: ignition-rendering4
-- END BUILD ERRORS

CMake Error at /usr/share/cmake/ignition-cmake2/cmake2/IgnConfigureBuild.cmake:66 (message):
  Errors encountered in build.  Please see BUILD ERRORS above.
Call Stack (most recent call first):
  CMakeLists.txt:146 (ign_configure_build)

-- Configuring incomplete, errors occurred!

@chapulina Sorry since this is ROS related I'm not sure if this is the right place to pose this issue, but since it's so similar to the one I started with I thought I'd start here. If this is not the right place for it, please let me know and I'll move it.
I tried the ig gazebo release that coems with ROS Noetic and I'm seeing very similar issues: https://youtu.be/BxEcnsSzNlo
I installed: apt install ros-noetic-ros-ign
And ran it with: rosrun  ros_ign_gazebo ign_gazebo shapes.sdf
rosrun  ros_ign_gazebo ign_gazebo --version

Ignition Gazebo, version 3.0.0
Copyright (C) 2018 Open Source Robotics Foundation.
Released under the Apache 2.0 License.

I'm not sure if this is the right place to post this issue

It looks like although you're going through ROS, the issue is still on Ignition, so this should be the right place.
I still don't have any tips on how to fix it though.

Is there any way I can help more? Any information (driver/system) / debug output / or for me to try to compile anything and see how it goes, I'm happy  to try it.
Also if there are any new instructions for building from source on 20.04, I can do that and post if the issue persists.

It sounds like it's not a high DPI issue, because you're being able to select the entities correctly. Have you tried clicking all around the arrows to see if they're selected if you click slightly outside them?
I'm not sure how else to debug it besides having you compile ign-gazebo from source and put some print outs on these lines to see why the gizmo is not being selected:
https://github.com/ignitionrobotics/ign-gazebo/blob/8ec8d66cc8a6b661a2db6ccae153a785287fa315/src/gui/plugins/scene3d/Scene3D.cc#L1057-L1065

@EvilPictureBook , you may want to give #291 a try just in case it's a DPI issue.

Sorry for another long delay (and an update to my account name).
Tested today with the ros2 release, and compiling from source on 20.04.
The issue persists. I tried enabling/disabling fractional scaling, and setting QT_AUTO_SCREEN_SCALE_FACTOR to various values.
I added print outs to the section of code you suggested. The reported axis seems to always be [0,0,0], and it never makes it to the print (4).
Video: https://youtu.be/Pt9_yrCSx3M
My section of code:
      // get the visual at mouse position
      rendering::VisualPtr visual = this->dataPtr->camera->VisualAt(
            this->dataPtr->mouseEvent.PressPos());
	  std::cout<<"[=========DEBUG==========]: (1) (visual) "<<visual<<std::endl;

      if (visual)
      {
	  std::cout<<"[=========DEBUG==========]: (2) (visual) "<<visual<<std::endl;
        // check if the visual is an axis in the gizmo visual
        math::Vector3d axis =
            this->dataPtr->transformControl.AxisById(visual->Id());
	  	std::cout<<"[=========DEBUG==========]: (3) (axis) "<<axis<<std::endl;
        if (axis != ignition::math::Vector3d::Zero)
        {
	  	  std::cout<<"[=========DEBUG==========]: (4) (axis) "<<axis<<std::endl;
          // start the transform process
          this->dataPtr->transformControl.SetActiveAxis(axis);
          this->dataPtr->transformControl.Start();
          this->dataPtr->mouseDirty = false;
        }
        else
          return;
      }

Print outs:
[=========DEBUG==========]: (1) (visual) 0x7f42cc827fc0
[=========DEBUG==========]: (2) (visual) 0x7f42cc827fc0
[=========DEBUG==========]: (3) (axis) 0 0 0
[=========DEBUG==========]: (1) (visual) 0x7f42cc827fc0
[=========DEBUG==========]: (2) (visual) 0x7f42cc827fc0
[=========DEBUG==========]: (3) (axis) 0 0 0
[=========DEBUG==========]: (1) (visual) 0x7f42cc827fc0
[=========DEBUG==========]: (2) (visual) 0x7f42cc827fc0
[=========DEBUG==========]: (3) (axis) 0 0 0
.
.
.

I remember @jennuine mentioned that fractional scaling has to be enabled and the scaling factor needs to be at 100% for things to work properly.
Just checking, do you have more than one monitor with different size / resolution plugged in?

Just one monitor. I had fractional scaling on at 100% for a few reboots now with no changes.

@dignakov  Do you mind to try this PR https://github.com/ignitionrobotics/ign-rendering/pull/221 ?

@ahcorde Thanks for the link, and sorry for not getting to it sooner.
The PR does not seem to fix my issue. It still acts as in the videos from before.
I compiled using the instructions here: https://ignitionrobotics.org/docs/edifice/install_ubuntu_src, with PR ignitionrobotics/ign-rendering#221 checked out for ign-rendering
In case this is useful:
$ vcs status
................
=== ./ign-cmake (git) ===
On branch ign-cmake2
Your branch is up to date with 'origin/ign-cmake2'.

nothing to commit, working tree clean
=== ./ign-common (git) ===
On branch ign-common3
Your branch is up to date with 'origin/ign-common3'.

nothing to commit, working tree clean
=== ./ign-fuel-tools (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./ign-gazebo (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./ign-gui (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./ign-launch (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./ign-math (git) ===
On branch ign-math6
Your branch is up to date with 'origin/ign-math6'.

nothing to commit, working tree clean
=== ./ign-msgs (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./ign-physics (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./ign-plugin (git) ===
On branch ign-plugin1
Your branch is up to date with 'origin/ign-plugin1'.

nothing to commit, working tree clean
=== ./ign-rendering (git) ===
On branch fixed_transform_control
nothing to commit, working tree clean
=== ./ign-sensors (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./ign-tools (git) ===
On branch ign-tools1
Your branch is up to date with 'origin/ign-tools1'.

nothing to commit, working tree clean
=== ./ign-transport (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./ign-utils (git) ===
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
=== ./sdformat (git) ===
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

Unable to move / rotate issue reproduced as per the @dignakov original.
Ignition Edifice binary installed on 20.04 (for a first look at Ignition).
Following the shapes tutorial, on attempting to translate an object, moving a model only works if one of x,y,z is constrained (key pressed).  Otherwise, the mouse pointer just moves the camera view of the world.
I cannot get a model to rotate - even when keys are pressed.
[The simulation then seems to fail depending on which model is selected by the transform tool - I think this might be a separate issue]

I'm still seeing the same issue on Fortress (on my main computer as above, no docker no virtualization, proprietary nvidia drivers), and on a laptop running with nvidia RTX 2060 proprietary drivers as well.
$ nvidia-smi
Sun Oct  3 20:59:25 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01    Driver Version: 470.63.01    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   47C    P8     4W /  N/A |    362MiB /  5934MiB |      3%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

Both systems are Ubuntu 20.04, both with proprietary nvidia drivers. Laptop has a 1080p monitor (unlike the desktop which has a 4k monitor since I know that came up, and I did try the fixes recommended above).
If I can help debug this please let me know what else I can do. I really would like to switch from Gazebo Classic to Ignition, but I can't seem to get it to run.

@dignakov, can you give this patch a try?
diff --git a/ogre2/src/Ogre2Camera.cc b/ogre2/src/Ogre2Camera.cc
index 86d1d7b9..b5043a52 100644
--- a/ogre2/src/Ogre2Camera.cc
+++ b/ogre2/src/Ogre2Camera.cc
@@ -259,7 +259,7 @@ VisualPtr Ogre2Camera::VisualAt(const ignition::math::Vector2i &_mousePos)
       this->ImageWidth(), this->ImageHeight());
   }

-  float ratio = screenScalingFactor();
+  float ratio = 1.0f;
   ignition::math::Vector2i mousePos(
       static_cast<int>(std::rint(ratio * _mousePos.X())),
       static_cast<int>(std::rint(ratio * _mousePos.Y())));

I have noticed that I can consistently grab the rotation or translation handles (arrows, rings) iff I mouse down on a spot where the handle is drawn on top of some other object -- any other object -- and the handle appears in a solid color. I can't grab the parts of the handle that are semi-transparent. I'm not sure if this is intended.
I am running the latest stable Garden built from source on a 20.04 box. I am not running in Docker.
$ nvidia-smi
Sat Mar 12 11:36:46 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.103.01   Driver Version: 470.103.01   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro K1200        Off  | 00000000:01:00.0 Off |                  N/A |
| 79%   80C    P0     6W /  35W |   1819MiB /  4043MiB |     39%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

I'm having the same issue. As shown in the video, I'm not able to select the transform tool if there is no object in the background.
https://user-images.githubusercontent.com/206116/173934494-de04bd2b-8a1c-4992-8812-4cac13f47a25.mp4

I have the same issue, and it also happens when using the rotate mode.
Is there any update on this issue?

I just tested on Garden and the issue shown in the video in https://github.com/gazebosim/gz-sim/issues/147#issuecomment-1156973396 still exists.

I'm having the same issue. As shown in the video, I'm not able to select the transform tool if there is no object in the background.

should be fixed by https://github.com/gazebosim/gz-rendering/pull/800

A couple of PRs addressing mouse interaction issues were merged:

https://github.com/gazebosim/gz-rendering/pull/800 (Garden)
https://github.com/gazebosim/gz-rendering/pull/811 (Fortress and forward ported to Garden)

Please re-open or create a new issue if you're still facing mouse translation/rotation issues.


image and buttons on the data list row with edit option

Hello,
Is there any option in data list to show the image and when click that row to open the popup..?
images for the reference...

when click the edit button in the list, the below popup will open.
↓
↓

please give me an idea...

Hi, this is out of the scope of the template ...
Suggestion you can use Datatables and some custom adjustment..
You can have a details view or a modal view just check for responsive plugin.
This will work as long as the information to edit is available from the table.
I would set the latest column as a tool column and always displayed as the latest.
Also Datatables have an editor that you can buy, you can try it for free and it' having the popup form too.
They have a documentation and a forum so you ask for more details
Good luck


Feature: resize on tmux zoom event

It's absolutly cool plugin. Thank you. It works better them focus.nvim.
I don't know it's possible or not, but mb you can add resize on tmux zoom event.

It should be added by #6 pull request.

It works, thank you!


Package Dependency issue: NuGet's fault?

Hi there,
My company uses PInvoke.NCrypt. When we update the package, the dependency is incorrect, NuGet sets PInvoke.Windows.Core's HintPath to .Net 2.0 version, not .Net 4.0. I have tried to install it in a fresh project and the same thing happens. Targeting 4.6.1 or 4.6.2 doesn't make a difference. Here is the output from the Package Manager Console:

PM> Install-package PInvoke.NCrypt
Attempting to gather dependency information for package 'PInvoke.NCrypt.0.5.64' with respect to project 'TestApplication', targeting '.NETFramework,Version=v4.6.2'
Gathering dependency information took 517.45 ms
Attempting to resolve dependencies for package 'PInvoke.NCrypt.0.5.64' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'PInvoke.NCrypt.0.5.64'
Resolved actions to install package 'PInvoke.NCrypt.0.5.64'
Retrieving package 'PInvoke.BCrypt 0.5.64' from 'nuget.org'.
Retrieving package 'PInvoke.Kernel32 0.5.64' from 'nuget.org'.
Retrieving package 'PInvoke.NCrypt 0.5.64' from 'nuget.org'.
Retrieving package 'PInvoke.Windows.Core 0.5.64' from 'nuget.org'.
Adding package 'PInvoke.Windows.Core.0.5.64' to folder 'D:\visual studio 2017\Projects\TestApplication\packages'
Added package 'PInvoke.Windows.Core.0.5.64' to folder 'D:\visual studio 2017\Projects\TestApplication\packages'
Added package 'PInvoke.Windows.Core.0.5.64' to 'packages.config'
Successfully installed 'PInvoke.Windows.Core 0.5.64' to TestApplication
Adding package 'PInvoke.Kernel<IP_ADDRESS>' to folder 'D:\visual studio 2017\Projects\TestApplication\packages'
Added package 'PInvoke.Kernel<IP_ADDRESS>' to folder 'D:\visual studio 2017\Projects\TestApplication\packages'
Added package 'PInvoke.Kernel<IP_ADDRESS>' to 'packages.config'
Successfully installed 'PInvoke.Kernel32 0.5.64' to TestApplication
Adding package 'PInvoke.BCrypt.0.5.64' to folder 'D:\visual studio 2017\Projects\TestApplication\packages'
Added package 'PInvoke.BCrypt.0.5.64' to folder 'D:\visual studio 2017\Projects\TestApplication\packages'
Added package 'PInvoke.BCrypt.0.5.64' to 'packages.config'
Successfully installed 'PInvoke.BCrypt 0.5.64' to TestApplication
Adding package 'PInvoke.NCrypt.0.5.64' to folder 'D:\visual studio 2017\Projects\TestApplication\packages'
Added package 'PInvoke.NCrypt.0.5.64' to folder 'D:\visual studio 2017\Projects\TestApplication\packages'
Added package 'PInvoke.NCrypt.0.5.64' to 'packages.config'
Successfully installed 'PInvoke.NCrypt 0.5.64' to TestApplication
Executing nuget actions took 1.54 sec
Time Elapsed: 00:00:02.5184976

Is there anything wrong with the dependency?
Thanks :)

By design. There is no need for net40 or higher for the Windows.Core package so we only ship net20.

If I understand it correctly, net40 and higher does not need the Windows.Core package, right?
However NuGet says it is needed for .Net 4.0 and portable class library 4.0 & 4.5. I guess something just went wrong...

@DSakura1987 Can you provide the repro project or repro steps to see the compiler error that you are seeing?


Getting an invalid polygon error which it appears the polygon is valid

Expected behavior and actual behavior.
polylabel should be able to compute an answer, but generates an invalid polygon error instead.
Steps to reproduce the problem.
The data is the SDN.geojson file located at https://github.com/AshKyd/geojson-regions/blob/master/countries/110m/SDN.geojson
(removed some of the "properties" for simplicity)
Note that if I use the 50m (https://github.com/AshKyd/geojson-regions/blob/master/countries/50m/SDN.geojson) version of the file, polylabel works.
I am not sure if this is actually a bug in with polylabel or if the polygon is invalid for some reason.
The script that generates the error is:
import json
from shapely.ops import polylabel
import geopandas
import os

data = {
  "type": "Feature",
  "properties": {
    "featurecla": "Admin-0 country",
    "filename": "SDN.geojson"
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          24.567369012152085,
          8.229187933785468
        ],
        [
          23.805813429466752,
          8.666318874542526
        ],
        [
          23.459012892355986,
          8.954285793488893
        ],
        [
          23.394779087017184,
          9.265067857292223
        ],
        [
          23.55724979014283,
          9.681218166538684
        ],
        [
          23.554304233502194,
          10.089255275915308
        ],
        [
          22.97754357269261,
          10.71446259199854
        ],
        [
          22.864165480244225,
          11.142395127807546
        ],
        [
          22.87622,
          11.384610000000123
        ],
        [
          22.50869,
          11.67936
        ],
        [
          22.49762,
          12.26024
        ],
        [
          22.28801,
          12.64605
        ],
        [
          21.93681,
          12.588180000000136
        ],
        [
          22.03759,
          12.95546
        ],
        [
          22.29658,
          13.37232
        ],
        [
          22.18329,
          13.78648
        ],
        [
          22.51202,
          14.09318
        ],
        [
          22.30351,
          14.32682
        ],
        [
          22.56795000000011,
          14.944290000000137
        ],
        [
          23.024590000000103,
          15.68072
        ],
        [
          23.886890000000108,
          15.61084
        ],
        [
          23.83766000000014,
          19.580470000000105
        ],
        [
          23.850000000000136,
          20
        ],
        [
          25.000000000000114,
          20.00304
        ],
        [
          25,
          22
        ],
        [
          29.02,
          22
        ],
        [
          32.9,
          22
        ],
        [
          36.86623,
          22
        ],
        [
          37.1887200000001,
          21.01885
        ],
        [
          36.96941,
          20.83744000000013
        ],
        [
          37.11470000000014,
          19.80796
        ],
        [
          37.4817900000001,
          18.61409
        ],
        [
          37.86276,
          18.36786
        ],
        [
          38.410089959473225,
          17.998307399970315
        ],
        [
          37.90400000000011,
          17.42754
        ],
        [
          37.16747,
          17.263140000000135
        ],
        [
          36.852530000000115,
          16.95655
        ],
        [
          36.75389,
          16.29186
        ],
        [
          36.32322,
          14.82249
        ],
        [
          36.42951,
          14.42211
        ],
        [
          36.27022,
          13.563330000000121
        ],
        [
          35.86363,
          12.57828
        ],
        [
          35.26049,
          12.08286
        ],
        [
          34.83163000000013,
          11.318960000000118
        ],
        [
          34.73115000000013,
          10.910170000000107
        ],
        [
          34.25745,
          10.63009
        ],
        [
          33.96162,
          9.58358
        ],
        [
          33.97498,
          8.68456
        ],
        [
          33.963392794971185,
          9.464285229420625
        ],
        [
          33.82496348090751,
          9.484060845715362
        ],
        [
          33.84213085302815,
          9.981914637215993
        ],
        [
          33.72195924818311,
          10.325262079630193
        ],
        [
          33.206938084561784,
          10.720111638406593
        ],
        [
          33.086766479716744,
          11.441141267476496
        ],
        [
          33.206938084561784,
          12.179338268667095
        ],
        [
          32.743419037302544,
          12.248007757149992
        ],
        [
          32.67474954881965,
          12.02483191958072
        ],
        [
          32.073891524594785,
          11.973329803218519
        ],
        [
          32.31423473428475,
          11.68148447716652
        ],
        [
          32.400071594888345,
          11.080626452941488
        ],
        [
          31.850715687025513,
          10.531270545078826
        ],
        [
          31.35286189552488,
          9.810240916008695
        ],
        [
          30.837840731903384,
          9.70723668328452
        ],
        [
          29.996639497988554,
          10.290927335388687
        ],
        [
          29.61895731133285,
          10.084918869940225
        ],
        [
          29.515953078608618,
          9.793073543888056
        ],
        [
          29.000931914987177,
          9.60423245056029
        ],
        [
          28.966597170745786,
          9.398223985111656
        ],
        [
          27.970889587744352,
          9.398223985111656
        ],
        [
          27.833550610778786,
          9.60423245056029
        ],
        [
          27.112520981708883,
          9.638567194801624
        ],
        [
          26.752006167173818,
          9.466893473594496
        ],
        [
          26.477328213242515,
          9.552730334198088
        ],
        [
          25.962307049621018,
          10.136420986302426
        ],
        [
          25.790633328413946,
          10.411098940233728
        ],
        [
          25.069603699343986,
          10.273759963267992
        ],
        [
          24.794925745412684,
          9.810240916008695
        ],
        [
          24.53741516360202,
          8.91753756573172
        ],
        [
          24.19406772118765,
          8.728696472403897
        ],
        [
          23.886979580860668,
          8.619729712933065
        ],
        [
          24.567369012152085,
          8.229187933785468
        ]
      ]
    ]
  }
}

features = {
    "type": "FeatureCollection",
    "features": [data]
}

gdf = geopandas.GeoDataFrame.from_features( features, crs = 4326 )
gdf.plot( figsize = ( 20, 20 ) )
center = polylabel( gdf.geometry.values[0], tolerance = .1 )
print( center )

Operating system
macOS 13.2 (22D49)
Shapely version and provenance
Shapely 2.0.0 installed via pip
Also reproduced with 1.8.2

The problem is the dataset. The 50m dataset is valid, and the 110m dataset is invalid. Use make_valid to fix the geometry and polylabel should function normally.

@eric-g-97477 what version of GeoPandas are you using?  Use geopandas.show_versions().
0.12.2 works for me (macOS 12.5):
>>> print(make_valid(gdf.geometry))
0    MULTIPOLYGON (((33.97498 8.68456, 33.96339 9.4...
Name: geometry, dtype: geometry

It may be that this is an issue with your GeoPandas installation, not shapely.
You can also use the shapely method directly on the geometry array:
>>> print(make_valid(gdf.geometry.values))
[<MULTIPOLYGON (((33.975 8.685, 33.963 9.464, 33.963 9.464, 33.975 8.685)), (...>]

# actually make the geometry valid:
>>> gdf['geometry'] = make_valid(gdf.geometry.values)

However, the other issue here is that polylabel only accepts one single-part polygon at a time, so these then fail when calling the .is_valid method and produces a similar error about the truth value being ambiguous.
Instead, you need to call it for a single polygon at a time:
>>> parts = shapely.get_parts(gdf.geometry.values)
>>> polylabel(parts[0])
<POINT (33.967 9.204)>

Using get_parts function of Shapely here, but you could also use explode on the GeoDataFrame:
>>> gdf['geometry'] = make_valid(gdf.geometry.values)
>>> gdf = gdf.explode()
>>> gdf.geometry.apply(polylabel)
0  0     POINT (33.96726 9.20438)
   1    POINT (30.54357 16.83595)

(omitted warnings re: explode, see the docs)

You are correct. That does work. My mistake was not reassigning the result of make_valid back into the dataframe.


Export Prometheus metrics from Fastly

Hi all,
This is a request to stand up a Prometheus instance to record the amount of data cache.nixos.org exports per month (or add that metric to an existing Prometheus instance if an appropriate one already exists). To facilitate this, we've added https://github.com/peterbourgon/fastly-exporter to Nixpkgs with PR#133726 (not merged yet). With some guidance from the infrastructure committee, I could probably configure Prometheus myself, but I expect I'll need some assistance from the Infra committee to access Fastly.  More context below!
Background
The marketing committee is trying to improve public awareness of metrics that shine light on Nix usage and growth over time (e.g. cache.nixos.org usage data, discourse.nixos.org membership data). The hope is that surfacing information about Nix's growth will make companies more comfortable incorporating Nix into their stack and more willing to donate to the NixOS foundation. We're calling the project "Nix by the numbers"
As part of this effort, we'd like to report how much data cache.nixos.org serves per month from Fastly. I had an initial conversation with @grahamc about the project, and he let me know the easiest way to do this would probably be to record that figure in Prometheus using the fastly-exporter and query Prometheus regularly when making the Nix-by-the-numbers report.
The marketing committee is mostly interested in reporting the amount of data served per month, but I imagine other metrics might also be useful to the infrastructure committee for monitoring/ops purposes. Please let me know how I can be helpful!

Fixed by 5ab455fbe03594a308291aa2108db81deb655227


Scanner can't read wanderer's name in russian

Current Behavior

Expected Behavior
The scanner continues to scan
Reproducing a Behavior
Just start scanning characters
Device OS
Windows 10
Genshin Impact Version
4.0
Inventory Kamera Version
1.3.10
Screen resolution, screen mode, and UI scale
full screen 1920x1080
Additional notes and remarks
when scan comes to wanderer, it just stops on attributes
and suddenly solution suddenly is quite simple, i just cleared field with wanderer's name
attaching logs tho scanner haven't said it was an error
Evidence
InventoryKamera.debug.log
InventoryKamera.log
Preflight Checklist

[X] I have checked for similar issues in the issue page, and I have not found any similar to mine.
[X] I am using the latest version of the scanner.
[ ] I tried setting the scanning delay to maximum, and it still doesn't work.
[ ] I have attached the video recording to the bug report.
[ ] I have attached the error log to the bug report.
[X] I am available to later explains the issue.
[X] I have disabled all screen filtering software or plugins (i.e. HDR, Image Sharpening) while scanning.
[X] I use default in-game keybindings or have configured keybindings for the scanner.

This isn't a bug. No languages except for English are currently supported, and adding support for them is not planned.

I don't know if this makes any sense or not, but it's still worth a try. The Tesseract recognizes all non-Latin characters... somehow. For example, my traveler's name Люми, parsed as jllumn. I saw it in the output window. And I guessed that Сенко could be Cenko, and I succeeded. The parser stopped thinking that Сенко is Cyno. I guess that even Chinese characters are parsed by the tesseract into some Latin letters. Perhaps if we had a screenshot insertion window for Wanderer's name in kamera interface somewere and parsed output of that, this feature would make life a little easier.


Integrate GPT-4 API

Implement the integration of GPT-4 API for natural language processing capabilities.

The GPT4 is integrated however it needs more improvements.

We can close this issue as we have accomplished the connection with the GPT-4 API. Further issues will delve deeper into the technicalities regarding this.


Password reset works, but email verification does not work

Hi,
I successfully migrate Parse server to Herouku and for email verification and password reset I am using Mailgun.
I managed to get email for password verification with link to reset password and it is working fine, but I do not get email for email verification.
What I could do about this?
Here is code: http://pastebin.com/yNQ0z7Mn

I am having the same problem. Did you manage to find a solution on that. I have been trying to find a solution for almost a month without luck.


Add dockerfile + generation wrapper script

Resolves https://github.com/ppy/SDL3-CS/issues/144
This is kind of a WIP because it doesn't generate identical bindings + generates some broken code + the image is unoptimised... Still useful to get a rough idea of binding gen without dealing with setting up clangsharp correctly (+xplat differences).
Running:
docker build -t 'sdl-gen' .
docker run --rm -v .:/app -w /app -it sdl-gen

Sample generation differences: https://gist.github.com/smoogipoo/93d8b0816379962f2dcddf8b9243e624

To make the windows and linux enum definitions almost the same, you can add:
    "--nativeTypeNamesToStrip",
    "unsigned int",

    "--with-type",
    "*=int",

The last one changes all enums to be int by default.

I noticed some issues when running this locally, both on WSL Ubuntu 24.04 and with the provided dockerfile. Could it be a difference with x86_64 and arm64?

SDL's Uint64 and Sint64 are mapped to uint and int instead of ulong and long
varargs don't compile, remapping __va_list_tag=byte fixes it
SDL_main.h for Windows doesn't work and results in an empty .g.cs file (this is also a problem in your gist)💠 SDL3/SDL_main.h for Windows
Diagnostics for '/mnt/c/.../SDL3-CS/External/SDL/include/SDL3/SDL_main.h':
    /mnt/c/.../SDL3-CS/External/SDL/include/SDL3/SDL_thread.h:39:10: fatal error: 'process.h' file not found
Skipping '/mnt/c/.../SDL3-CS/External/SDL/include/SDL3/SDL_main.h' due to one or more errors listed above.

Excerpt for how it looks for me:
diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs
index 062ecc6..b6e242b 100644
--- a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs
+++ b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs
@@ -96,7 +96,7 @@ public static unsafe partial class SDL3
         public static extern SDLBool SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec);

         [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
-        public static extern SDL_Surface* SDL_AcquireCameraFrame(SDL_Camera* camera, [NativeTypeName("Uint64 *")] ulong* timestampNS);
+        public static extern SDL_Surface* SDL_AcquireCameraFrame(SDL_Camera* camera, [NativeTypeName("Uint64 *")] uint* timestampNS);

         [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
         public static extern void SDL_ReleaseCameraFrame(SDL_Camera* camera, SDL_Surface* frame);
diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs
index b2cf25a..0560512 100644
--- a/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs
+++ b/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs
@@ -35,7 +35,7 @@ public static unsafe partial class SDL3

         [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
         [return: NativeTypeName("bool")]
-        public static extern SDLBool SDL_SetErrorV([NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);
+        public static extern SDLBool SDL_SetErrorV([NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] __va_list_tag* ap);

         [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
         [return: NativeTypeName("bool")]

varargs don't compile, remapping __va_list_tag=byte fixes it
The last one changes all enums to be int by default.

Thanks. Added and updated the gist.

SDL's Uint64 and Sint64 are mapped to uint and int instead of ulong and long
Could it be a difference with x86_64 and arm64?

Yeah, there are definitely platform differences coming from somewhere. These lines fix it for me:
    "--undefine-macro=__LP64__",
    "--undefine-macro=_LP64",

But they're not enough since it doesn't work for you. These come from https://github.com/llvm/llvm-project/blob/main/clang/lib/Frontend/InitPreprocessor.cpp
It would be nice if we could target a specific platform triple, but I couldn't get that to work. I also tried --additional -m64 as done in https://github.com/dotnet/ClangSharp/blob/main/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang.rsp, but it didn't have any effect...

SDL_main.h for Windows fails because it tries to import the Windows-only <process.h> header trough this long chain. We could provide a dummy process.h and add it to the import path on non-Windows builds.
graph TD;
    SDL_main.h-->SDL_events.h;
    SDL_events.h-->SDL_joystick.h;
    SDL_events.h-->SDL_audio.h;
    SDL_joystick.h-->SDL_mutex.h;
    SDL_audio.h-->SDL_mutex.h;
    SDL_mutex.h-->SDL_thread.h;
    SDL_thread.h-->process.h;

Ideally I'd like Clang to exist in the exact environment being targeted, but if that's not possible (and I'm not experienced enough with what amounts to cross compilation) then I suppose that would be a reasonable solution.

These lines still seem to be required for me even after #172:
    "--with-type",
    "*=int", # all types should be ints by default
    "--undefine-macro=__LP64__",
    "--undefine-macro=_LP64",

Adding a dummy <process.h> file to the include searchpath fixes the SDL_main SDL_PLATFORM_WINDOWS problem when building on linux. Try the diff and add it if it works for you.
diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py
index d6ea2c1..781abca 100644
--- a/SDL3-CS/generate_bindings.py
+++ b/SDL3-CS/generate_bindings.py
@@ -24,6 +24,7 @@ Example:

 import json
 import pathlib
+import platform
 import re
 import subprocess
 import sys
@@ -365,6 +366,11 @@ def should_skip(solo_headers: list[Header], header: Header):
 def main():
     solo_headers = [make_header_fuzzy(header_name) for header_name in sys.argv[1:]]

+    if platform.system() != "Windows":
+        base_command.extend([
+            "--include-directory", csproj_root / "include"
+        ])
+
     prepare_sdl_source()

     sdl_api = get_sdl_api_dump()
diff --git a/SDL3-CS/include/process.h b/SDL3-CS/include/process.h
new file mode 100644
index 0000000..524d68e
--- /dev/null
+++ b/SDL3-CS/include/process.h
@@ -0,0 +1 @@
+// dummy process.h when building for SDL_PLATFORM_WINDOWS on non-windows systems

Ideally I'd like Clang to exist in the exact environment being targeted, but if that's not possible (and I'm not experienced enough with what amounts to cross compilation) then I suppose that would be a reasonable solution.

I've found that cross-compiling works if you apt install the required gcc and point CPLUS_INCLUDE_PATH to the appropriate path.
Example:
sudo apt install gcc-13-aarch64-linux-gnu

export CPLUS_INCLUDE_PATH="$(echo /usr/lib/gcc-cross/*/*/include):/usr/include:${CPLUS_INCLUDE_PATH:-}"

When cross compiling for aarch64, I don't need to add this to fix int 64: (i.e. I get what you get)
    "--remap",
    "Sint64=long",
    "Uint64=ulong",

Ideally I'd like Clang to exist in the exact environment being targeted, but if that's not possible (and I'm not experienced enough with what amounts to cross compilation) then I suppose that would be a reasonable solution.

I think I understand now what you mean. When we're building platform agnostic headers, we should just use the system default (or a cross compiler that produces consistent results). But when building platform specific, we should use the appropriate cross compiler target and headers, eg --target=x86_64-w64-mingw32 and CPLUS_INCLUDE_PATH="$(echo /usr/lib/gcc/x86_64-w64-mingw32/*/include)" when building for SDL_PLATFORM_WINDOWS.
Seems complex, and out of scope for this PR.
If you're fine with the process.h hackery, then we can merge this PR and figure this out later.

Those remaps also work for me, have removed the undefines.

When we're building platform agnostic headers, we should just use the system default (or a cross compiler that produces consistent results). But when building platform specific, we should use the appropriate cross compiler target and headers

Seems complex, and out of scope for this PR.

Or, at least a common target. Ideally yeah we'd use the appropriate cross compiler target, but it's only Windows that's causing the issues right now.
But as you said, probably fine for now.

If you're fine with the process.h hackery, then we can merge this PR and figure this out later.

Sure, have confirmed that it works locally, and updated the final gist.

Time provided, I'll improve/optimise the Dockerfile later. Or someone else beats me to it :)

Also I'm fairly certain we don't need CPLUS_INCLUDE_PATH. That's just my inexperience.
We should be able to just --include-directories it, which would make platform-specific headers easier to handle. I.e. this also works for me:
diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py
index d855256..ecab900 100644
--- a/SDL3-CS/generate_bindings.py
+++ b/SDL3-CS/generate_bindings.py
@@ -252,6 +252,8 @@ base_command = [

     "--file-directory", SDL_include_root,
     "--include-directory", SDL_include_root,
+    "--include-directory", "/usr/include",
+    "--include-directory", "/usr/lib/gcc/aarch64-linux-gnu/13/include",
     "--libraryPath", "SDL3",
     "--methodClassName", "SDL3",
     "--namespace", "SDL",
diff --git a/SDL3-CS/generate_bindings.sh b/SDL3-CS/generate_bindings.sh
index a24ee04..9ee976c 100755
--- a/SDL3-CS/generate_bindings.sh
+++ b/SDL3-CS/generate_bindings.sh
@@ -7,7 +7,7 @@ dotnet tool restore
 dotnet restore --ucr SDL3-CS/SDL3-CS.csproj

 export LD_LIBRARY_PATH="$(echo ~/.nuget/packages/libclang.runtime.*/*/runtimes/*/native):$(echo ~/.nuget/packages/libclangsharp.runtime.*/*/runtimes/*/native):${LD_LIBRARY_PATH:-}"
-export CPLUS_INCLUDE_PATH="$(echo /usr/lib/gcc/*/*/include):/usr/include:${CPLUS_INCLUDE_PATH:-}"
+#export CPLUS_INCLUDE_PATH="$(echo /usr/lib/gcc/*/*/include):/usr/include:${CPLUS_INCLUDE_PATH:-}"

 python3 SDL3-CS/generate_bindings.py "$@"

I can commit that now if you'd like.

Need to figure out how to get the canonical include dirs

My suggestion is to install the appropriate packages in the dockerfile and only do the whole cross compiler thing when running the python script under docker. Otherwise, just use the systm libs and let the user provide CPLUS_ if they need (if not provided organically by their system) via their env vars.
That way, we have a guaranteed set of headers included in the image.
But I don't think this is super important to do so I wouldn't waste time on it unless you have nothing better to do :P
Worst case we run this as a CI workflow :)

Have done some final touchups to the Dockerfile so it doesn't restore every time. Merge is all yours @Susko3