ඞ character in generated type is not keyboard friendly

Heya, I'm experimenting using this crate (it's magic!), and noticed that implementation crates need to import my_lib::TheTraitඞItem, defined here:
https://github.com/danielhenrymantilla/nougat.rs/blob/7ddcdefd416c1538c0fa578e74e2f9eeca1b1e5f/src/proc_macros/mod.rs#L71
It also means the library crate needs to export it.
Given I can't type that character (though my editor helpfully generates the import), could it be changed to a typable character, or even no character? (considering collisions, instinctively TheTraitItem doesn't tend to show up in the way I name types, but that's me)

Heh, I reckon this hard-to-type character may not suit everybody, but I'm currently trying a design where it's there on purpose / by design 😅: I just recently replaced __ with ඞ when I noticed mentions of people hard-coding the generated path.
But I won't force too much in this direction, if my strategy ends up being too problematic I'll backtrack and go back to __, I think.
But let me phrase why I went for that choice:

the main reason is that I'd like to keep the actual "hack" / workaround used to achieve GAT-ness as hidden as possible from the API of users, to hide the nitty-gritty details; mostly to give myself a bit more of lenience / freedom in what I could change without it being a breaking change (e.g., I had to go for __ -> ඞ being a breaking change precisely because of __ being "too public").

related to this, a design goal for future versions of nougat is to be able to "turn the crate down" and make it become a bunch of no-op / identity macros, through some generic-associated-types feature. That way, it will make the transition to proper gats smoother: anybody using nightly or future stable rust could enable the feature, and get rid of nougat's own logic (in compile-cime cost) and suboptimal diagnostics. Then, a direct user of nougat could just remove the #[gat]s and the Gat!s.
If people circumvent the abstraction boundary, then this wouldn't be possible.

But maybe I'm being too optimistic, so I'm mentally ready to let reality tell me wrong and to change this 😅.
But until then, let's try to fight a bit more for the abstraction API:
1st point: Gat proxy macros don't support use imports

and noticed that implementation crates need to import my_lib::TheTraitඞItem

This is, thus, imho, the actual issue: I've forgotten to offer an abstraction / macro layer over this operation! (all my tests implemented the gat-trait in the very module where it was defined, or using full paths in the impl line 🤦)
A simple workaround would be:
#[gat(Item)]
// pub /* supporting reëxports will be important too! */
use path::too::TheTrait;

and this would take care of importing the assoc-item traits as well.
However, this, and the whole explanation for ඞ, would need to be way better documented than it is now:
2nd point: document these things more extensively and with higher visibility (gotchas of the crate)


Where is the Converted audio file's folder

Stupid Q prehaps, but can’t find info via google nor youtube..
Where is the converted audiofile? I mean when using modelinterface WebUI.  There is no 3 dots on audiolayer (firefox) to download the result ie. converted audiofile. But It has to be somewhere? Tutorials about G-colab shows TEMP folder, but my local installation that’s empty.
I have worked around this by using batchconverter, where you can specify the output folder, but single conversion audio must be somewhere?
where?

I am assuming you are using Firefox and,like me, you cant find the download button, in witch case you can just right-click on the bar  (The one that lest you p[lay the file in the web-UI) and click on "save audio as" (it should be under hide controls). Alternatively you can  use google chrome (or chromium if you don't want spyware) temporarily to donload it simply by clicking the 3 dots and clicking "download"
If you still want to see the original folder for some reason and if you are using windows, the file should be located in your AppData\Temp folder and you can access it easily by pressing win+r and typing %Temp% in the field that comes up and then look for it (i recommend the search feature and copying the file name from q)
Hope this helps


Content Security Policy directive: "frame-ancestors 'self'

I have an issue with this implementation. When I sign in I get this error loading the page:
Refused to frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'
Have you seen that before? Thanks for any help.

I have the same issue.
I have added the
init_options={"checkLoginIframe": False},
to the config of the module.
But I think the issue lies with the keycloak server running in another domain i.e. not e.g. localhost but an "actual" internet domain. And in iframes, the source must be the same for all parts so that code from one domain cannot access data from another.
So I am hoping it will be ok once I deploy my code to the same system as the keycloak server and thus ensures both items come from the same protocol, domain and port.

Thanks. It does work.


Change the nar package name for pulsar-io-kafka-connect-adaptor

We have change the nar package name in #9808 which will broken the website download link,
The reported issue is https://issues.apache.org/jira/browse/PULSAR-16

I don't think it will break anything, but it might be confusing (as in: tracking what builds the file) given existing pulsar/pulsar-io/kafka-connect-adaptor module.
It should be ok to simply update the website.
Either way is good with me.

Integration tests failed.
@codelipenghui PTAL

@codelipenghui  integration tests failed with
Error:  Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.3.0:single (distro-assembly) on project pulsar-io-distribution: Failed to create assembly: Error adding file to archive: /home/runner/work/pulsar/pulsar/distribution/io/./../../pulsar-io/kafka-connect-adaptor-nar/target/pulsar-io-kafka-connect-adaptor-nar-2.9.0-SNAPSHOT.nar -> [Help 1]

probably need to update https://github.com/apache/pulsar/blob/0ead803a4b55e94b2116dc84de0a04a9f9148acc/distribution/io/src/assemble/io.xml#L60

Thanks @dlg99 @eolivelli. Will fix the tests soon.


Multiple PowerShell cmdlets

On most of the documentation pages, there are a number of different cmdlets provided for each command, without explaining which cmdlets should be used in which environments.
For example: https://docs.microsoft.com/en-us/powershell/module/azuread/connect-azuread?view=azureadps-2.0
This lists 3 different cmdlets for Connect-AzureAD each of which have slightly different parameters, but there is no explanation why there are three different commands.
If we look at the source code here: https://github.com/Azure/azure-docs-powershell-azuread/blob/live/azureadps-2.0/AzureAD/Connect-AzureAD.md
We can see that the first one is for "UserCredential (Default)", the second is for "ServicePrincipalCertificate", and the third is for "AccessToken", but none of this information exists in the rendered documentation page. Also, we don't know why there is three different cmdlets nor how you would end up with a specific version of the cmdlet installed in your environment.
Another example: https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureaddirectoryrole?view=azureadps-2.0
This lists 2 different cmdlets for Get-AzureADDirectoryRole, and one has a -Filter parameter and the other has an -ObjectId parameter, but there is no information given as to why there are two different cmdlets with different parameters.
Again, we need to look a the source code here: https://github.com/Azure/azure-docs-powershell-azuread/blob/live/azureadps-2.0/AzureAD/Get-AzureADDirectoryRole.md
And we can see that the first cmdlet is titled GetQuery (Default) and the second one is titled GetById, but again - no explanation is given in the docs about why there are two cmdlets with different commands.
This is especially confusing because the version of Get-AzureADDirectoryRole installed in the Cloud Shell (part of AzureAD.Standard.Preview`) does not have the filter option. Perhaps there is a logical explanation for this but it does not exist in the docs.

Hello @stuartmaxwell, thanks for your query and apologies for the delayed response.
To explain your query, these are not multiple cmdlets but multiple parameter variants and how to use them. Picking the example of the Get-AzureADDirectoryRole cmdlet the 2 parameter variants can be explained as below and also based on the examples provided which have made use of both the variants:

The first variant means you can run the cmdlet without providing any parameter and in that case it will return all directory roles. All parameters contained within [] are optional for each of the variants.
The second variant, gives you an option of running the cmdlet by providing the -ObjectId in which case it will only return the directory roles for the specified object.
Note that these variants are not to be run in different environments. They only provide options that can be used with the cmdlet depending on the expected result and the info you have at the time of running it.

Please let me know if this answers your question. Feel free to reopen this issue if you have follow up questions.


Addon not available in Add-on Store

Hi Fabio,
With more and more people getting behind NAT444, wireguard client  is more useful for home usage than wireguard server. So after finding that original plugin doesn't support client mode, I find this one. I added https://github.com/bigmoby/hassio-repository-addon as repository in Add-on Store, reloaded, but this add-on or repository is still not visible in my Hassio Add-on Store list.  System logs:
21-03-27 14:34:32 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/bigmoby/hassio-repository-addon repository 21-03-27 14:34:33 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository 21-03-27 14:34:34 WARNING (MainThread) [supervisor.store.data] Can't read /data/addons/git/fc962596/frpc/config.json: required key not provided @ data['arch']. Got None 21-03-27 14:34:35 WARNING (MainThread) [supervisor.store.data] Can't read /data/addons/git/fc962596/frpc/config.json: required key not provided @ data['arch']. Got None
My Home Assistant Core version: core-2021.3.2

Hi @vtanjga ,
it sounds to me as "platform not supported", could you give me your host type please? (Raspberry or whatelse)

Yes, it's Raspberry Pi 3 B+, Hassio is running on it. It's not supported?

Yes, it's Raspberry Pi 3 B+, Hassio is running on it. It's not supported?
Linux core-ssh 5.4.79-v7 #1 SMP Fri Jan 1 15:38:03 UTC 2021 armv7l Linux

Oh sure, it's fully compatible for these arch:
"arch":[       "aarch64",       "amd64",       "armhf",       "armv7",       "i386"    ],
so for your platform (and also mine! ;-) ) it's ok!
I see, from your log, a Fast Reverse Proxy error (/data/addons/git/fc962596/frpc/config.json) it's NOT releated to Wireguard Client add-on. Please consider to uninstall all not required addons (special mentions to all reverse proxy) and retry to install the Wireguard Client. Please keep in mind to give me a feedback ;-)

I had some nginx plugin installed. The moment I removed it - I had wireguard-client plugin available for installation! Good catch! But it's not quite working yet. I mean, it's configured, it connects to my WG server, but I'm not able to reach anything over dedicated ip addresses withing wireguard. What I was planning to to is to use my VPS with public IP to configure reverse proxy with hassio running at my home R Pi as backend . The way I understand it, I should be now able to just curl my_hassio_wireguard_ip:443 from VPS where reverse proxy and wireguard server are running and it should work. But, I'm getting this in Apache (that's used as reverse proxy):
[proxy:error] [pid 25557] (110)Connection timed out: AH00957: HTTPS: attempt to connect to <IP_ADDRESS>:443 (<IP_ADDRESS>) failed
[proxy_http:error] [pid 25557] [client public_ip:4942] AH01114: HTTP: failed to make connection to backend: <IP_ADDRESS>
I'm also not able to confirm that WG IP is reachable from either side using nc. I dropped all firewall rules I had (except forward rules WG set) to rule out that as the issue. WG logs from both sides shows that connection is active and fine. Any idea?

Hi @vtanjga with the Wireguard broker/client communication now you have a tunnel channel so, now, you could expose your Home Assistant service outside your provider nat. But, after that you must to forward all incoming connections to wireguard host to your client (in other words you have to try curl wireguard_host:433 ~> internal routing to wireguard client ~> and then response...). Please follow this guide I wrote (sorry at moment in italian only!): https://github.com/bigmoby/homeassistant_nat_network and the second part too https://github.com/bigmoby/homeassistant_nat_network/blob/main/README_IT_part_2.md
And you' solve! ;-)

Hi Fabio! I didn't have time to play with this over the week. So, it's definitely configuration/plugin problem. I configured another wireguard client on my desktop in the same home LAN, where Homeassistant RPi is. With this setup, I have no issues using curl from VPS/wireguard server to reach HA on the private LAN and no problem accessing HA web interface using public domain name which is routed through Apache reverse proxy on this VPS. What I'm thinking is that maybe plugin doesn't have enough privileges to actually configure RPi network, as every plugin on Hassio is a docker container. I have no actual knowledge of how Hassio OS actually works internally, so I may be wrong about this. Did you manage to make it work even on HA OS?

Looking at config.json it should have enough privileges...

Can you please take a look at the PR? I wasn't able to test it, so can't confirm if that will solve the issue.


Microchip not working on dedicated servers in 1.20.4

Attempting to perform any actions in Microchip in 1.20.4 fails

Oops, forgot to add the mod into the server mods


fd not working correctly

I'm hosting on dockers (linux mint)
I run the script to download the files and also copying them from my pc
I copy paste the folders but i'm stuck at final wave without choosing the titan
here my docker-compose.yml
https://pastebin.com/ZDQ0mVVh

You're halfchemistry on discord right? i was literally replying to you in there, posting the issue in here won't help much, someone else with more linux experience than me will be needed to help with this issue.

Sorry i wanted to open a issue under the fd mod but somehow i fcked up. Sorry and thank you for your help


init.gradle: Ignore BOM dependencies when comparing dependency trees

When comparing dependency trees, the count of sub dependencies should not include BOM dependencies, since they are skipped by the fetchDependency function.
This solves a bug where an Android project shipping 'androidx.appcompat:appcompat:1.5.1' would hang indefinitely. This is because, for instance, 'kotlinx-coroutines-android:1.6.1' depends on 'kotlinx-coroutines-core:1.6.1, kotlin-stdlib-jdk8:1.6.0 and kotlinx-coroutines-bom:1.6.1'. Since no ORT dependency is created for 'kotlinx-coroutines-bom' because it's a BOM file, it should also not be taken in account when comparing dependency trees. Otherwise, comparison would always fail, leading to a cache miss and overgrowth of the latter.
Signed-off-by: Nicolas Nobelis<EMAIL_ADDRESS>

@mpbecker and @pirvudoru, could help confirming whether this fixes your issues described here and here, respectively?


Updates _sp_authn_requests_signed_alg to work with multiple bindings

_sp_authn_requests_signed_alg allows overriding the algorithm used with SignatureMethod but currently only works with the BINDING_HTTP_REDIRECT. This change enables its use for both BINDING_HTTP_REDIRECT and BINDING_HTTP_POST, during login and its use during logout.
The motivation for this change is ADFS defaults to requiring SHA256.
This change was tested with Apache Shibboleth and ADFS on Windows Server 2012.

I think that would be better enable this feature in pySAML2, made a related PR here:
https://github.com/IdentityPython/pysaml2/pull/597

Hi @mobleyc, have you seen the pySAML2 PR I referenced, would you like to spend some words on?
I'm going to manage the old PR and a feedback from you will be really appreciated

Hi @mobleyc
here we have a default behaviour:
https://github.com/knaperek/djangosaml2/blob/8d9b692b10dae2613574baf5857513b35e5f0ce1/djangosaml2/views.py#L174
As far I tested the signed authentication requests in pySAML2 works in HTTP_POST binding and there we have this check.
Is there some tests that you would like to share here?
I disabled HTTP_REDIRECT in my implementations because of this

Hi the issue I encountered is not signing, it's the ability to configure the signing algorithm. Currently this line. ADFS uses sha256 by default and there is not way to override this using the BINDING_HTTP_POST binding.
I can add a comment to the pySAML ticket in support of the PR if that helps.

Thank you @mobleyc,
I have fixed this features, because I use SHA256 in djangosaml2 in a federation that want it, with that PR you find in pySAML2.
Regarding the general refactor you've done I think that's quite good. So if you are ready for that I would ask you to have a test with the current master branch of djangosaml2, because with the current implementation if a signing is required it alway rely on HTTP_POST, see:
https://github.com/knaperek/djangosaml2/blob/312a06529198ebf4a9e12263b9f0a10725fbb6bd/djangosaml2/views.py#L175
Do a test then we decide what to do, I would accept your PR with pleasure,
thanks for feedback

I think that also this should be considered
https://github.com/knaperek/djangosaml2/issues/193

Hi, please can you fix the conflicting files?
I think it's time to merge it

Due to missing reply but thank you for your idea


Reorder fails in Laravel v 5.3 and MySQL 5.7

In Laravel v 5.3 and MySQL 5.7, reorder fails.
A] Bug Description -

Prior to v 5.3, MySQL strict mode was not strict (I am too lazy to lookup the exact MySQL behavior, so just mentioning that MySQL mode was not strict, just to give you an idea)
Because of this, when we try to reorder the 'parent_id, depth, left, right' fields, even if these fields are blank (e.g. ''), these were automatically converted to null by MySQL, and hence they didn't cause issues.
But in v 5.3, the strict mode is enabled by default (see 'strict' => true entry for MySQL in config/database.php). Because of this, MySQL does not auto convert empty fields to null, and throws an error when trying to update the database.

B] Fix -
The bug is in the Reorder::updateTreeOrder method. The right fix for MySQL, is to add a null and empty check below assigning the fields to the model. i.e. to change the below code from

$item->parent_id = $entry['parent_id'];
$item->depth = $entry['depth'];
$item->lft = $entry['left'];
$item->rgt = $entry['right'];

to

if(isset($entry['parent_id']) && !empty($entry['parent_id'])) {
$item->parent_id = $entry['parent_id'];
}
if(isset($entry['depth']) && !empty($entry['depth'])) {
$item->depth = $entry['depth'];
}
if(isset($entry['left']) && !empty($entry['left'])) {
$item->lft = $entry['left'];
}
if(isset($entry['right']) && !empty($entry['right'])) {
$item->rgt = $entry['right'];
}

Note: I have tested this only on MySQL, and not on other databases, but I don't think this should cause issues.
C] Workaround - Until the bug is fixed, other 5.3 users can switch off the strict mode (just set strict to false in database.php)

Thanks for the bug report and suggestion, @vishalbhide . It's now fixed at CRUD-level, no need for tweaks in your controllers. MySQL strict mode can remain on.
Cheers!


reuploading a file of the same name for the same version does not reflect changes

When uploading a format file, if you've previously uploaded a file of the same name while having selected the same version of clang-format, the new upload will not overwrite the previously updated file, and thus the changes in the newly updated file of the same name will not be reflected.

Hi @catskul , thanks for reporting this.
Can you tell me what OS/browser you're using?  I've had a look at it in Chrome and IE10 and I couldn't reproduce the issue.
If you press F12 and look at the network requests does it make a request to /format after you upload the file?

Ubuntu 16.04, Chrome Version 51.0.2704.106 (64-bit)
I'll check the network requests when I get a chance to tonight.
On Mon, Aug 1, 2016 at 10:26 AM, Ben Falconer<EMAIL_ADDRESS>wrote:

Hi @catskul https://github.com/catskul , thanks for reporting this.
Can you tell me what OS/browser you're using? I've had a look at it in
Chrome and IE10 and I couldn't reproduce the issue.
If you press F12 and look at the network requests does it make a request
to /format after you upload the file?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zed0/clang-format-configurator/issues/10#issuecomment-236595956,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAW6BqPX5mtU0yDcpZcTEYZ9-7C1T5dDks5qbgIWgaJpZM4JYRkM
.


SQL Managed Instance Minimal Example

@lonegunmanb can you please review again? Also how can I find you on teams?

Thanks @urosran! Looks good to me.


Adding Google Analytics

This should help us learn more about who is visiting and why so we can do a better job.

Anybody objects?  If not, I'll pull this in this afternoon (PT) - I want to see how gAnalytics combines the info from blackberry.github.com/ with the one from this site.


Fixes issue #64 with Dynamic Menu Item Text

To pass $itemScope when using function ($itemScope) { … } for a Dynamic Menu Item Text

Hi @natharduini. Could you also update the documentation to match this? (under Custom HTML)

Done, by the way.


Add color wheel for picking label colors

I may just be overcomplicating a simple feature within GitHub, but when selecting colors for my labels, I always randomly shuffle colors. Sometimes I find a color I like but my obsessiveness drives me to find a slightly different shade of that color.
Would anyone else want a color picker to exist?
Example URL: https://github.com/sindresorhus/refined-github/labels
I'd imagine it'd look something like this:

IssueHunt Summary

Backers (Total: $5.00)

 jerone ($5.00)

Become a backer now!
Or submit a pull request to get the deposits!
Tips

Checkout the Issuehunt explorer to discover more funded issues.
Need some help from other developers? Add your repositories on IssueHunt to raise funds.

IssueHunt has been backed by the following sponsors. Become a sponsor

We could use the native color picker: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color

Sure, that'd suit my needs perfectly!

If you have Tampermonkey installed, I have a userscript that'll do this - https://github.com/Mottie/GitHub-userscripts/wiki/GitHub-label-color-picker

This is extremely easy:
for (const field of select.all('.js-new-label-color-input')) {
	field.type = 'color';
}

Anyone who wants it, just needs to create a feature called label-color-picker and add documentation for it. Follow contribute.md

@notlmn does your OS not show a text input together with the color picker?

I guess the alternative is to duplicate the field and bind them together (text field updates color field and viceversa). Something like:
for (const field of select.all('.js-new-label-color-input')) {
	field.after(<input type="color" className={field.className} style={{width:'2em'}}>);
}
delegate('.js-new-label-color-input', 'input', event => {
	event.delegateTarget.nextElementSibling.value = event.delegateTarget.value;
});
delegate('.js-new-label-color-input + input', 'input', event => {
	event.delegateTarget.previousElementSibling.value = event.delegateTarget.value;
});

However it would look something like:

I've started work on this!

I've made a PR here #2591 with the enhancement. But I closed it by accident, since it is my first PR on a big project and didn't know what is the workflow to submit a PR. I will appreciate some help on reopenning the PR, apparently I don't have the necesary privileges. Or maybe I'll have to upload another branch, I don't know.
The feature I've built has some little bugs that are commented on the file with FIXME tags: The most important is that if you press the "save button" to save the new color for your label, if you press the edit button again on the same label, the color palette will disappear. You will have to refresh the whole page again to see the color palette if you will like to edit the same label color again.

The PR can’t be reopened because the branch was deleted. Maybe try to restore the branch and then reopen.
Also include a screenshot in your PR to see how it looks first

Thanks, I'll take a look

I think the userscript will have to do, we don't have to include every feature.


Problem with dotnet running the application

Hello @duracellko Rastislav
The application works well running from the docker container as well as when it is being run from the visual studio.
Problem appears when I try to build it using either attached powershell or debug/release configurations. While starting it everything looks green and normal with console output of
info: Microsoft.Hosting.Lifetime[0]       Now listening on: http://localhost:5000 info: Microsoft.Hosting.Lifetime[0]       Now listening on: https://localhost:5001 info: Microsoft.Hosting.Lifetime[0]       Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0]       Hosting environment: Production info: Microsoft.Hosting.Lifetime[0]
But running the page ends up with

Loading...
An error has occurred. This application may no longer respond until reloaded.

If you have any immediate suggestion about debugging it or running it I would appreciate them.
best regards

Thank you for the feedback.
Do you see any specific error, when you open Developer tools in browser and Console tab?

Thank you for the feedback.
Do you see any specific error, when you open Developer tools in browser and Console tab?
Fair point - lots of missing files
GET http://localhost:5000/Content/Site.css net::ERR_ABORTED 404 (Not Found) (index):52 GET http://localhost:5000/Scripts/PlanningPoker.js net::ERR_ABORTED 404 (Not Found) (index):53 GET http://localhost:5000/_framework/blazor.webassembly.js net::ERR_ABORTED 404 (Not Found) (index):52 GET http://localhost:5000/Scripts/PlanningPoker.js net::ERR_ABORTED 404 (Not Found) (index):53 GET http://localhost:5000/_framework/blazor.webassembly.js net::ERR_ABORTED 404 (Not Found)

I think the application must be executed from current directory.
For example this does not work:
dotnet .\Build\web\Release\netcoreapp3.1\publish\Duracellko.PlanningPoker.Web.dll

but this should work:
cd .\Build\web\Release\netcoreapp3.1\publish
dotnet racellko.PlanningPoker.Web.dll

I think the application must be executed from current directory.
For example this does not work:
dotnet .\Build\web\Release\netcoreapp3.1\publish\Duracellko.PlanningPoker.Web.dll

but this should work:
cd .\Build\web\Release\netcoreapp3.1\publish
dotnet racellko.PlanningPoker.Web.dll

You gave a hint with the path - it required a publish not only a build.
As I published the application to catalogue "Build\web\Release\netcoreapp3.1\publish" this made sense.
Still left doker part.
Anyways thank you for a great comprehensive project, help and fast response!


Question about  - rel="noopener noreferrer" on mp4

Where is the right place to put rel="noopener noreferrer" in fluidplayer code in order not to leave referrer on mp4 url, in this case - https://example.com/vid.mp4 ?
I tried 2 combination, take a look a screenshots:

, but in both cases leaves referrer from domain A to domain B in this case (https://example.com/vid.mp4).
This is important for me  and I need your help.

This is really outside of scope of Fluid Player itself. Nevertheless.
To the best of my knowledge, HTML rel attribute only works for few select HTML elements, for example a, form and link. HTML5 video and related tags does not seem to support rel attributes, therefore doing what you want is not possible from video element itself.
It could be possible to use global <meta name="referrer" content="origin"> tag in the page <head> itself to achieve what you want however I have not personally tested this and can not guarantee it works on all browser or works at all. You could also attempt to set referrerpolicy="origin" on video and/or source tags, as an alternative.
Consider however that this is relatively new feature and not all of your visitors might be using browsers with support for the referrer policy.
Relevant documentation:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
https://html.spec.whatwg.org/multipage/urls-and-fetching.html#referrer-policy-attribute

Thanks Addvilz for extensive answer.
I solved problem on that way I putted in header:
header("Referrer-Policy: no-referrer")
Best regards


Global max images

What this PR does / why we need it: Fixes #700
Which issue this PR fixes (optional, in fixes #<issue number>)(, fixes #<issue_number, ...) format, will close the issue when PR is merged: fixes #:
Special notes:

Will do a closer review, but looks like you're missing the upgrade code for the additional db column added.

Will do a closer review, but looks like you're missing the upgrade code for the additional db column added.

@zhill You're right, added now

This needs another change to expose the new fields to the API, and found some problems with the actual rule processing, gonna push another commit

Merging with verbal permission from @zhill


Error with running Mac device

I'm trying to run the command:
python s2s_pipeline.py --recv_host localhost --send_host localhost --device mps

As mention in the guide to run it on mac use the --device mps flag.
When doing so I'm getting the following error:
    raise ValueError(f"Some specified arguments are not used by the HfArgumentParser: {remaining_args}")
ValueError: Some specified arguments are not used by the HfArgumentParser: ['--device', 'mps']

Swap branch
On Wed 21 Aug 2024 at 08:47, BIGdeadLock @.***> wrote:

I'm trying to run the command:
python s2s_pipeline.py --recv_host localhost --send_host localhost --device mps
As mention in the guide to run it on mac use the --device mps flag.
When doing so I'm getting the following error:
raise ValueError(f"Some specified arguments are not used by the HfArgumentParser: {remaining_args}")

ValueError: Some specified arguments are not used by the HfArgumentParser: ['--device', 'mps']
—
Reply to this email directly, view it on GitHub
https://github.com/huggingface/speech-to-speech/issues/26, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ASVG6CVO7GLSGJXWGBSMEBLZSRAYHAVCNFSM6AAAAABM3NVIY2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3TOMZSGE2TMMQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

@RonanKMcGovern
Getting a different error now:
    from MeloTTS.melo.api import TTS
ModuleNotFoundError: No module named 'MeloTTS'

Will try fix it

Update - Tried
git clone https://github.com/myshell-ai/MeloTTS.git

To the TTS folder. After running the same command again I still got an error with the relative paths in MeloTTS.
To fix it I went into MeloTTS and changed:
from MeloTTS.melo.api import TTS -> from .MeloTTS.melo.api import TTS

At the melo package I changed all imports to be .. relative.
After that I tried pip install -r requirements.txt in the MeloTTS repo. I got a error on the cached_path package so I commented it out. Then the installation went OK.
Now I'm getting a different error when running the server that is connected to the MeloTTS:
    from TTS.melotts import MeloTTSHandler
  File "/Users/eden.yavin/Projects/speech-to-speech/TTS/melotts.py", line 1, in <module>
    from .MeloTTS.melo.api import TTS
  File "/Users/eden.yavin/Projects/speech-to-speech/TTS/MeloTTS/melo/api.py", line 13, in <module>
    from . import utils
  File "/Users/eden.yavin/Projects/speech-to-speech/TTS/MeloTTS/melo/utils.py", line 13, in <module>
    from ..melo.text.cleaner import clean_text
  File "/Users/eden.yavin/Projects/speech-to-speech/TTS/MeloTTS/melo/text/cleaner.py", line 1, in <module>
    from . import chinese, japanese, english, chinese_mix, korean, french, spanish
  File "/Users/eden.yavin/Projects/speech-to-speech/TTS/MeloTTS/melo/text/japanese.py", line 367, in <module>
    _TAGGER = MeCab.Tagger()
  File "/Users/eden.yavin/Projects/speech-to-speech/venv/lib/python3.9/site-packages/MeCab/__init__.py", line 139, in __init__
    raise RuntimeError(error_info(rawargs)) from ee
RuntimeError:
----------------------------------------------------------

Failed initializing MeCab. Please see the README for possible solutions:

    https://github.com/SamuraiT/mecab-python3#common-issues

If you are still having trouble, please file an issue here, and include the
ERROR DETAILS below:

    https://github.com/SamuraiT/mecab-python3/issues

issueを英語で書く必要はありません。

------------------- ERROR DETAILS ------------------------
arguments:
default dictionary path: /Users/eden.yavin/Projects/speech-to-speech/venv/lib/python3.9/site-packages/unidic/dicdir
[ifs] no such file or directory: /Users/eden.yavin/Projects/speech-to-speech/venv/lib/python3.9/site-packages/unidic/dicdir/mecabrc
----------------------------------------------------------

Update:

Looking at the mec-python Project, seems like the following command was missing:

python -m unidic download

Did you manage to get it to work?

I need to work on the setup, sorry, I should get there soon

@andimarafioti
I'm having trouble with the
python -m unidic download

For some reason the download gets stuck at 140/520 MB.

Some people are having other problems, you can follow them here: https://github.com/huggingface/speech-to-speech/pull/20 I'm trying to debug it

@andimarafioti
managed to finish the download after restarting the program. Trying again

@andimarafioti
Next error on the schedule:
ImportError: cannot import name 'TextIteratorStreamer' from 'transformers' (/Users/eden.yavin/Projects/speech-to-speech/venv/lib/python3.9/site-packages/transformers/__init__.py)

melotts downgrades the transformer version, just do
pip install -r requirements.txt

I install the requirements again and did git pull. Also updated transformers to 4.43.0

Running the command:
python listen_and_play.py --host localhost --device mps --lm_model_name HuggingFaceTB/SmolLM-360M-Instruct

(Which I don't know its purpuse)
raised the error:
  File "/Users/eden.yavin/Projects/speech-to-speech/listen_and_play.py", line 126, in <module>
    listen_and_play(**vars(listen_and_play_kwargs))
  File "/Users/eden.yavin/Projects/speech-to-speech/listen_and_play.py", line 42, in listen_and_play
    send_socket.connect((host, send_port))
ConnectionRefusedError: [Errno 61] Connection refused

@andimarafioti
Also for some reason the llm used is phi although I used --lm_model_name HuggingFaceTB/SmolLM-360M-Instruct.

@andimarafioti
melo is still raising error if I'm using the --tts melo flag:
  File "/Users/eden.yavin/Projects/speech-to-speech/TTS/melotts.py", line 28, in setup
    self.model = TTS(language=language, device=device)
NameError: name 'TTS' is not defined

Having trouble with the melo though if pass the flag --tts melo

Ok it is still all about the relative paths. Had to change
from melo.text.ko_dictionary import english_dictionary, etc_dictionary -> from ...melo.text.ko_dictionary import english_dictionary, etc_dictionary

Working on doing the same to other imports

Seems that doing that and pip install cached-path did the trick. The response time and voice is a lot better!

(I love that live ticker... @BIGdeadLock 😁)

I think the issue with the relative paths is because you cloned the repo inside of this one and/or didn't install melo.

@andimarafioti
Installing it did not work unfortunately.
What about the lm flag?

I made it work with tts parler by moving from TTS.melotts import MeloTTSHandler to under elif module_kwargs.tts == 'melo': so that can avoid install MeloTTS...

@BIGdeadLock for the lm flag, the smol model doesn't work with MLX-LM so as a quick fix I overwrote it. I now pushed a change to let you choose the Language Model implementation. By default it uses transformers which will work with the SMOL LM. Let me know how it goes!

@ArvinZhuang I love that idea.

So... are we now at a point where macOS should work flawlessly? @andimarafioti

Thanks, will try it now :-)


Power spectra operator

Graphically it is a line graph derived from a single model field.
Basically it Fourier transforms a field to see how it varys in frequency.

If you are plotting a model spectra, are you interested across cycles? I would thing so, as you are interested in the frequency of events. On the other hand you might be looking at whether a spectra changes at different lead times. So both?

branch #215_power_spectra


Feature Implemetation: afl python fuzz() response parameter

I am currently working at a project for my university where i want to create a custom AFL mutator which reacts on a response buffer from my binary.
I looked into the implementation for a way to modify the prototypes and calls to my needs, such that i can add an additional parameter to the python fuzz() definition.
I searched and modified the calls for mutator->afl_custom_fuzz(...) from src/afl-fuzz-one.c  and added an additional buffer that should be converted to a python bytearray in size_t fuzz_py(...) src/afl-fuzz-python.c to add an additional parameter, that somehow gets the response from my binary later.
So I want to add the following parameters: size_t response_buffer_size and u8* response_buffer where response_buf should be another python attribute for fuzz().
For now i just always get an error on execution, saying the following:
 fuzz() missing 1 required positional argument: 'max_size'
because obviously the prototype does not match, if i add another parameter if I add another one.
However i did not find the routine, that is responsible for the function definition in the python wrapper for the def fuzz(), so I always get errors like this:
Can someone help me out on this?
Best,
Christian

Hi @localh0rs7, the function definitions of the python wrappers are located at:
https://github.com/vanhauser-thc/AFLplusplus/blob/783f3b0957094fd04b5a9cde085359c26be1fbb4/include/afl-fuzz.h#L686-L695
Are these what you were looking for?

yes, i already looked at this but did not found the code that defines the exact prototype of the python function for the inserted hooks in afl_fuzz_python. So only modifying them (adding another buffer) and push them to pyargs did not work, because the prototype wants the last argument to be the custom defined  max_size and not the one I added.
So is there another logic I have to care about?

It seems an execution error. Did you check the implementation of your python module? I mean the Python module you pass into AFL++.
If you add extra arguments for the custom mutator, you have to also update your implementation, while developing the python module. Otherwise, your python module will not match the interface you define in AFL++.

Yes, i added the argument to my python module. So far i only get a memory address error if i modify the  py_args:
`
size_t fuzz_py(u8** buf, size_t buf_size, u8* add_buf, size_t add_buf_size, size_t max_size,u8* response_buf, size_t response_buf_size){
[...]
py_args = PyTuple_New(4);
[...]
py_value = PyByteArray_FromStringAndSize(response_buf,response_buf_size);
PyTuple_SetItem(py_args, 3, py_value);
if (!py_value) {
Py_DECREF(py_args);
FATAL("Failed to convert arguments");
}
`

OK, may I take a look at the code snippets of all your modifications and the execution log?

changed prototypes:
https://github.com/vanhauser-thc/AFLplusplus/blob/783f3b0957094fd04b5a9cde085359c26be1fbb4/include/afl-fuzz.h#L687
https://github.com/vanhauser-thc/AFLplusplus/blob/783f3b0957094fd04b5a9cde085359c26be1fbb4/include/afl-fuzz.h#L492
size_t fuzz_py(u8**, size_t, u8*, size_t, size_t, u8*, size_t);

size_t (*afl_custom_fuzz)(u8** buf, size_t buf_size, u8* add_buf,
                            size_t add_buf_size, size_t max_size,  u8* response_buf,
                            size_t response_buf_size);

Implementation:
https://github.com/vanhauser-thc/AFLplusplus/blob/783f3b0957094fd04b5a9cde085359c26be1fbb4/src/afl-fuzz-python.c#L181
py_args = PyTuple_New(4);

https://github.com/vanhauser-thc/AFLplusplus/blob/783f3b0957094fd04b5a9cde085359c26be1fbb4/src/afl-fuzz-python.c#L223
Adding the following lines:

// response buffer
  printf("PyByteArray_FromStringAndSize");
  py_value = PyByteArray_FromStringAndSize(response_buf,response_buf_size);

  PyTuple_SetItem(py_args, 3, py_value);
   if (!py_value) {

    Py_DECREF(py_args);
    FATAL("Failed to convert arguments");
   }

https://github.com/vanhauser-thc/AFLplusplus/blob/783f3b0957094fd04b5a9cde085359c26be1fbb4/src/afl-fuzz-one.c#L1601
replaced by:
# Some random buffer
  response_len = 10;
  response_buf = (u8*)malloc(response_len);
  memset(response_buf,'\0',response_len);

size_t mutated_size = mutator->afl_custom_fuzz(&out_buf, len,
                                                     new_buf, target->len,
                                                     max_seed_size, response_buf, response_len);

The call to   mutator->afl_custom_fuzz will result in a memory address error no matter what data is passed as the last two arguments.

https://github.com/vanhauser-thc/AFLplusplus/blob/783f3b0957094fd04b5a9cde085359c26be1fbb4/src/afl-fuzz-python.c#L218-L226
Did you add the response buffer after Line 223?

I already added this like the checks for the other arguements.
The problem is only the call to mutator->afl_custom_fuzz.
The response buffer is defined in src/afl-fuzz-one directly after the add_buffer (the normal fuzz() paramter). I also did try to insert this one as additional parameter a second time, but it also does not work.

If you add codes at Line 223, py_args would have been destroyed at Line 222. That's probably why you had the error before.
For the new problem, yes, the response buffer has to be freed. I cannot see the reason for now. It would be nice to see the execution log and the backtrace.

I try to figure that out over the next couple of days.
Is there any efficient ways to pass buffers from instrumented binaries directly to afl, e.g over custom desfined shims or similar?
I am yet searching for an efficient way to do this without logfile parsing.

The best way would right now be to patch in another sharedmap or increase the normal map's size reuse parts that one.
alternatively you could patch in more interaction over pipes.

Is there any efficient ways to pass buffers from instrumented binaries directly to afl
See CmpLog, it uses a shmem of several megabytes to log comparisons.

I'm going to close this issue because is not related to the development of AFL++.


Make rails assets overrideable

Right now, we can not override these three assets because we are requiring them like this:
https://github.com/werein/x-editable-rails/tree/master/vendor/assets/javascripts/editable/rails
#= require ./rails/editable_form
#= require ./rails/data_classes
#= require ./rails/error_handling

Sounds legit, merging


Update CONTRIBUTING.md, README.md, and dev-guide.md

Update CONTRIBUTING.md, README.md, and dev-guide.md

Can you merge this?


Compile only hermes exec in release Dockerfile

Unit tests were alse being compiled, which made tests and CI going a bit slower.
With this change, only hermes executable is being compiled.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
748

Relevant Lines:
769

💛  - Coveralls


Update download_wecross.sh & build_wecross.sh

Codecov Report

Merging #118 into release-0.2 will increase coverage by 0.03%.
The diff coverage is n/a.

@@                Coverage Diff                @@
##             release-0.2     #118      +/-   ##
=================================================
+ Coverage          39.58%   39.62%   +0.03%
  Complexity           599      599
=================================================
  Files                140      140
  Lines               4421     4422       +1
  Branches             321      324       +3
=================================================
+ Hits                1750     1752       +2
- Misses              2541     2542       +1
+ Partials             130      128       -2

Impacted Files
Coverage Δ
Complexity Δ

.../wecross/stub/jdchain/JDChainContractResource.java
0% <0%> (ø)
0% <0%> (ø)
:arrow_down:

...java/com/webank/wecross/peer/PeerInfoCallback.java
68.42% <0%> (+5.26%)
3% <0%> (ø)
:arrow_down:

.../java/com/webank/wecross/peer/PeerSeqCallback.java
68.42% <0%> (+5.26%)
3% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2087812...5ccea13. Read the comment docs.


Patches do not apply before cargo update

I am adding feature flags to dependencies that my package depends on. These features are enabled/disabled depending on the features exposed by my package itself.
However, on cargo update, the dependencies fail to resolve, since the dependency itself doesn't expose said feature flags.
Not sure what should be the ideal flow here.

Can you give me more information about your setup like a minimal Cargo.toml that reproduces the problem? Otherwise its hard for me to fully grasp what you are trying to do.

Sure,
Consider the following patch to aperture, which adds feature flags to it
From 8324348c744987da68cc7cc1a2ca5f6a292ff8cd Mon Sep 17 00:00:00 2001
From: Amit Prakash Ambasta<EMAIL_ADDRESS>Date: Fri, 3 Nov 2023 14:02:02 +0530
Subject: [PATCH] feature patch

Signed-off-by: Amit Prakash Ambasta<EMAIL_ADDRESS>---
 Cargo.toml      | 16 +++++++++++-----
 Cargo.toml.orig |  8 +++++++-
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 40210a4..e960738 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -42,11 +42,7 @@ package = "gstreamer-pbutils"

 [dependencies.gst-plugin-gtk4]
 version = "0.11"
-features = [
-    "wayland",
-    "x11egl",
-    "x11glx",
-]
+default-features = false

 [dependencies.gst-video]
 version = "0.21"
@@ -62,3 +58,13 @@ version = "0.4.17"

 [dependencies.once_cell]
 version = "1.17.1"
+
+[features]
+default = [
+    "wayland",
+    "x11egl",
+    "x11glx",
+]
+wayland = ["gst-plugin-gtk4/wayland"]
+x11egl = ["gst-plugin-gtk4/x11egl"]
+x11glx = ["gst-plugin-gtk4/x11glx"]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index e10f45c..5f144d5 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -11,10 +11,16 @@ documentation = "https://gnome.pages.gitlab.gnome.org/snapshot/doc/aperture"
 version = "0.3.2"
 rust-version = "1.70"

+[features]
+default = ["wayland", "x11egl", "x11glx"]
+wayland = ["gst-plugin-gtk4/wayland"]
+x11egl = ["gst-plugin-gtk4/x11egl"]
+x11glx = ["gst-plugin-gtk4/x11glx"]
+
 [dependencies]
 gst = { package = "gstreamer", version = "0.21", features = ["v1_20"] }
 gst-pbutils = { package = "gstreamer-pbutils", version = "0.21" }
-gst-plugin-gtk4 = { version = "0.11", features = ["wayland", "x11egl", "x11glx"] }
+gst-plugin-gtk4 = { version = "0.11", default-features = false }
 gst-video = { package = "gstreamer-video", version = "0.21" }
 gtk = { package = "gtk4", version = "0.7", features = ["gnome_45"] }
 log = "0.4.17"
--
2.42.0

We use this patched aperture in our own crate as
...
[features]
default = ["wayland"]
wayland = ["aperture/wayland"]
x11 = ["aperture/x11egl", "aperture/x11glx"]

[dependencies]
aperture = {package = "aperture", version ="0.3.2", default-features = false}
...

At this point, invoking cargo update will fail due to being unable to satisfy the dependecy aperture, with the feature flags we want to add via the patch.

Hm... ok that is strange and at the moment I cannot really see the problem. This should work without any problems.
Just two more things to make sure those are not the problem. I assume you did setup the patching using something like this in your Cargo.toml:
[package.metadata.patch.aperture]
version = "0.3.2"
patches = [
    "<path-to-aperture-patch-file>"
]

Afterwards you ran cargo patch and then you added something like this to your Cargo.toml:
[patch.crates-io]
aperture = { path = './target/patch/aperture-0.3.2' }

I used build.rs to patch instead of [patch.crates-io]
The issue isn't on using patch this way, but subsequently invoking cargo update

Good to know that you are using build.rs. But even though you do you still need those two entries.
If you did setup your patching according to the documentation then the build.rs only calls the patch binary. The binary needs those two entries in the Cargo.toml otherwise it does not not where the patch is and it will not replace the dependency with the patched one.
Therefore please check whether the [patch.crates-io]/[package.metadata.patch.apterture] entries are correctly setup. If your build.rs is different then what is documented then please go ahead and post it here so that I can take a look


Corrected metadata tag

Corrected all ms.custom metadata tags to ms.custom: seo-marvel-mar2020.
@DaniHalfin

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@scanum - no need to copy edit. I'll assign to myself.
I'll provide an update on our internal channel. Thanks and sorry for the mix up.


Failure to build 1.9.3

Gitea version (or commit ref): 1.9.3
Operating system: ArchLinux (go 1.13)

Description
Running make vendor:
go<EMAIL_ADDRESS>invalid pseudo-version: revision is longer than canonical (6fd6a9bfe14e)

Sadly this is due to an upstream dependency, which prevents 1.9 building with golang 1.13. We have resolved this in 1.10 which will has started its release process.

@techknowlogick when 1.10.x ? because now https://github.com/alpinelinux/aports/pull/10887 fails and im still stuck with 1.8.3!


chore: update dependencies

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 50.77%. Comparing base (b544b87) to head (d6b31b2).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #430      +/-   ##
============================================
+ Coverage     47.57%   50.77%   +3.20%
+ Complexity      425      205     -220
============================================
  Files           192      150      -42
  Lines          2182     1603     -579
  Branches        113      113
============================================
- Hits           1038      814     -224
+ Misses         1106      757     -349
+ Partials         38       32       -6

Flag
Coverage Δ

unittests
50.77% <ø> (+3.20%)
:arrow_up:

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

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


Add default postcode comparison function

Generate a case expression with 3-5 levels:
CASE
WHEN {full_match} THEN 4
WHEN {sector_match} THEN 3
WHEN {district_match} THEN 2
WHEN {area_match} THEN 1
ELSE 0
END

Yeah, needs to be in the form of a SQL case expression

have a look on Slack for a ScalaUDF solution. Or is there an easier way and I am overcomplicating things?

Is that too naive? Wouldn't it be better to convert to a more general geographic indicator (rather than a postal area), like lat/lon, and then compare? With this sort of comparison you might have moved one street but have an entirely different postcode?
There must be a lot of solutions to this already with UK gov codebases.

We have support for distance as the crow flies (not yet in the pypi version, will land in the next release):
https://github.com/moj-analytical-services/splink/blob/d80b0c72a71ebb93dfb2aef76f5f1ceb458f7623/splink/comparison_level_library.py#L228
It can just sometimes be a bit of a faff to join on the geolocation, so this would provide a quickwand dirty solution that would get 80% of the way there

Could build ontop of #1190

Closed by #1230


STATUS_NO_MEMORY: Unable to allocate memory in target process. (Code: 5)

Hello guys,
I am using easyhook to hook some win32 interfaces on user running applications.
I have been sucessfully injecting most of the applications except some that seem to have a kind of memory protection.
The specific error I get is the following:
Exception thrown: 'System.OutOfMemoryException' in EasyHook.dll
STATUS_NO_MEMORY: Unable to allocate memory in target process. (Code: 5)
at EasyHook.NativeAPI.Force(Int32 InErrorCode)
at EasyHook.RemoteHooking.InjectEx(Int32 InHostPID, Int32 InTargetPID, Int32 InWakeUpTID, Int32 InNativeOptions, String InLibraryPath_x86, String InLibraryPath_x64, Boolean InCanBypassWOW64, Boolean InCanCreateService, Boolean InRequireStrongName, Object[] InPassThruArgs)
at EasyHook.RemoteHooking.Inject(Int32 InTargetPID, InjectionOptions InOptions, String InLibraryPath_x86, String InLibraryPath_x64, Object[] InPassThruArgs)
I read in a codeproject question that it can be bypassed using this technique:
http://www.codeproject.com/Questions/714991/Allocate-Memory-in-Target-Process
But I do not want to mess with easyhook libraries.
Is there another way to inject on those applications?
I already tried to mess around with inject options but with no luck.
I use .net 4 binary libraries that are precompiled by you. ( I get the same error with the binaries built by me too).
Any help would be most welcome.
Thanks a lot.
Ilias P.

This really depends upon which application and why you are getting an "ERROR_ACCESS_DENIED".
You may need to provide more details about the target process, is it running in the same session?, is it a desktop app?, is it a process with limited security (e.g. some chrome processes are running in a limited security context that prevent a lot of operations working).

I see the same issue. Happens with the target process Apex Legends game, which is being protected by Easy anti-cheat - unsure if that's the cause for the issue. Otherwise, the process is in the same user session as the caller of EasyHook as well. At the same time, OBS studio attaches its hook just fine for that game.
Any idea on the possible workaround?


How to train without gpu?

I get:
$ python train.py -data data/demo -save_model demo-model
...
Loading train dataset from data/demo.train.1.pt, number of examples: 10000
Traceback (most recent call last):
  File "train.py", line 41, in <module>
    main(opt)
  File "train.py", line 28, in main
    single_main(opt)
  File "/toknas/hugh/git/OpenNMT-Ubiqus/train_single.py", line 120, in main
    opt.valid_steps)
  File "/toknas/hugh/git/OpenNMT-Ubiqus/onmt/trainer.py", line 142, in train
    if (i % self.n_gpu == self.gpu_rank):
ZeroDivisionError: integer division or modulo by zero

We did not intend to support training without GPU but I just pushed a fix
thanks to @se4u

Thanks!


Feature-Request: Listen for incoming calls

Hi!
As I can see from your examples and your profile you're from Germany as I am and use one of the famous AVM Fritz!Boxes. Your Plugin works great for "outgoing" calls, but it would be really nice if you could listen to incoming calls too.
I for example hava a doorbell calling all house-phones via voip/sip, using the Fritz!Box "Rundruf" (call everybody) functionality. Those calls are unluckily not registered in the call monitor, so I can not let HA know someone is at the door.
But if you could make your addon listen to incoming calls, maybe even detecting the caller-id, this would massively improove my experience.
Best
Pascal

Hi Pascal,
I discussed that use-case in the home-assistant community already and I think it's a great idea, but as I personally won't use that I won't implement that.
Non the less, I'm interested how the flow of the incoming call would be. I see 2 possibilities.

Have the incoming call as an event in home-assistant and react on that (e.g. use the existing functionality to call the house telephones)

React on the phone call in the add-on and dial a phone number and even connect the incoming call with the outgoing one to allow talking with the door station.

Option 1 would probably much easier to implement using the Webhook API end-point [0].
If you would like to implement anything like that yourself, I'm open to pull requests.
Regards,
Arne
[0] https://www.home-assistant.io/docs/automation/trigger/#webhook-trigger

Hi Arne,
thank you. None of your use-cases are completely what I would expect. This is, because my doorbell can only ring a phone, but there is no audio-contact. But I can press a number (0 to 9), causing an action at the door (opeing the door...).
So my use-case would be:

Detect an incoming call
Sending an Notification to a receiver via notify, possebly then starting an action on HA

But everything except 1 would not be "your business". If a incoming call would raise an event would really be enougth, getting a caller id would be perfect.
Regards
Pascal

ha-sip will now send an webhook event on incoming calls on the registered phone number. Please test if this is working for you.

I'm trying, but I alredy struggle to add your repository. I just get "Invalid Add-on repository!" when adding. Might be a problem on my side tho.
Logger: homeassistant.components.hassio Source: components/hassio/websocket_api.py:120 Integration: Home Assistant Supervisor ([documentation](https://www.home-assistant.io/integrations/hassio), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+hassio%22)) First occurred: 19:36:07 (1 occurrences) Last logged: 19:36:07 Failed to to call /supervisor/options - Invalid Add-on repository!

I had a similar problem and it was fixed by restarting the supervisor.

Okay, repo is now ok, but the Addon does not show up.

Did you click on the "Add-in Store" button in the right bottom corner?

It works very well.
Thank you for the lightning fast integration!

Thanks for your feed-back! Happy to help.


Update package.json smooch-bot dependency

As paulohenriquesg mentioned & I tested. Sucessfully fixed the issue pointed in an issue thread.
The problem seems to be with a dependency in package.json.
It points to https://github.com/skhavari/smooch-bot.git, and that repository does not exists anymore.
Using the official smooch-bot may solve the problem.
This would mean replace
"smooch-bot": "https://github.com/skhavari/smooch-bot.git",
by
"smooch-bot": "^1.0.0",

-2

Only 1 commit among the 14 submitted is relevant


Resolves #502

Fix: Deprecates 'event.path' usage
Also updates surrounding code for minor efficiencies

Closes #502
@courtneyaschwartz & @lykyd - This will be in the next release. Cheers!


Network module does not updating

Waybar v0.6.6
After restarting netctl-auto network module shows disconnected status until restart waybar
No info about that with --log-lavel trace
ArchLinux with linux 5.1.0

Restarting of iface or reconnecting to wifi will cause too

Does it also do that on master?

I'm also experiencing this on Arch Linux using Sway. I tried the waybar-git package from the AUR and the issue is still there. For me it has gotten to the point where it shows disconnected most of the time. When I restart waybar it show connected for about 20 seconds and then it goes back to disconnected

c06725aa69b46e7eee605e86642679067744c553 5ae5821929ee09726bc9908c09c20424bd3b0793 Should fix that or improve it :)

Yeah, much better now! Haven't had a false disconnect in a while

nice fix :)


fix: restart nucleus if deployment removes a plugin

Issue #, if available:
Description of changes:
If a deployment is about to remove a plugin component, force nucleus restart to unload the plugin's code
Draft PR for discussion and early feedback, fix and test are a little silly, will improve if we decide to take this route
Why is this change necessary:
Without this, subsequent deployment of the same plugin can cause unexpected behavior when nucleus hasn't restarted between the the two deployments
How was this change tested:

[ ] Updated or added new unit tests.
[ ] Updated or added new integration tests.
[ ] Updated or added new end-to-end tests.
[ ] If my code makes a remote network call, it was tested with a proxy.

Any additional information or context required to review the change:
Documentation Checklist:

[ ] Updated the README if applicable.

Compatibility Checklist:

[ ] I confirm that the change is backwards compatible.
[ ] Any modification or deletion of public interfaces does not impact other plugin components.
[ ] For external library version updates, I have reviewed its change logs and Nucleus does not consume
any deprecated method or type.

Refer to Compatibility Guidelines for more information.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

PluginComponentTest.GIVEN_plugin_added_and_removed_WHEN_plugin_added_again_THEN_plugin_is_loaded_into_JVM:255 expected:  but was: com.aws.greengrass.dependency.Context$Value@67301e27

I think this test needs to be removed and replaced with a UAT because now there's going to be a restart


OCI_GetString returns null on implicit conversion of a RAW value when it's longer than 64 bytes

Hello,
I'm using OCI_GetString to implicitly convert various data types to a string, and it returns null for RAW values longer than 64 bytes. Here is a test case.
DB setup:
drop table rawtest;
create table rawtest (id number, val raw(2000));
insert into rawtest
select lvl-1, hextoraw(val) from (
  with l as (select level as lvl from dual connect by level < 1002)
  select lvl, listagg('FF','') within group (order by null) as val
  from l connect by level < lvl and prior lvl = lvl and prior sys_guid() is not null
  group by lvl
) where lvl > 1;
commit;
select * from rawtest order by id;

C code:
#include "ocilib.h"

int main(int argc, char *argv[])
{
    OCI_Connection* cn;
    OCI_Statement* st;
    OCI_Resultset* rs;
    OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT);

    cn = OCI_ConnectionCreate("database", "user", "password", OCI_SESSION_DEFAULT);
    st = OCI_StatementCreate(cn);

    OCI_ExecuteStmt(st, "select * from rawtest");

    rs = OCI_GetResultset(st);

    while (OCI_FetchNext(rs))
    {
        printf("%i - %s\n", OCI_GetInt(rs, 1), OCI_GetString(rs,2));
    }

    OCI_StatementFree(st);
    OCI_ConnectionFree(cn);
    OCI_Cleanup();

    return EXIT_SUCCESS;
}

Results:
1 - FF
2 - FFFF
3 - FFFFFF
.........
62 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
63 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
64 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
65 - (null)
66 - (null)
67 - (null)
68 - (null)

My guess is that the buffer size is calculated incorrectly somewhere in OcilibResultsetGetString. Could you please check when you get a chance?
Thanks!

Hi,
Thanks for reporting the issue :)
I pushed a fix and non regression test for it on v4.7.4 branch.
Regards,
Vincent

Hi Vincent,
Works great 👍  Thank you for fixing it so quickly.
Ilia


fix: disable co2_tracker for API models

When co2_tracker is enabled, it is used for API-based models as well, which can be misleading. This PR introduces a simple check to determine if a model's meta defines API as its framework, and if so, disables co2_tracker for the evaluation run.
Currently, four model families use API as their framework: cohere_models, google_models, openai_models and voyage_models.
This PR relates to the conversation here.
Checklist

[x] Run tests locally to make sure nothing is broken using make test.
[x] Run the formatter to format the code using make lint.

Nice catch!

Thanks! Credit goes to @KennethEnevoldsen tho 😛


Can't Create Function App in Azure - option select loops on Loading...

Hi
I am working on fresh install of Azure Function Extension and recent Azure Core Tools. I can't go through first step, extension loops on Create Function app in Azure select endlessly. That completely locks VS Code UI and it needs to be rebooted.
Azure Functions Core Tools
Core Tools Version:       4.0.5030 Commit hash: N/A  (64-bit)
Function Runtime Version: <IP_ADDRESS>77

Extension
ms-azuretools.vscode-azurefunctions
Azure Functions
v1.10.3

Os
Linux version 6.1.12-arch1-1 (linux@archlinux)

Reproduction steps:

Install Azure Functions Core Tools
Install Azure Functions extension in VS Code
Login to Azure account
Try to execute "Create Function App in Azure"

Recording:

Edit:
The same behavior on macOs 13.0 (22A380).

I found what was wrong, it was pretty obvious. I haven't got any subscription at all on my Azure account. After creating subscription all working as intended. It would be nice to handle this kind of case.

I found what was wrong, it was pretty obvious. I haven't got any subscription at all on my Azure account. After creating subscription all working as intended. It would be nice to handle this kind of case.

I'm glad you found a workaround. A fix for this bug has been merged and we're hoping to release it soon. (https://github.com/microsoft/vscode-azuretools/pull/1400)

This issue has been fixed in the latest release of the Azure Resources extension (v0.6.1).


Upgrade to seneca 3

This builds on top of https://github.com/senecajs/ramanujan/pull/7
In includes update to all seneca related dependencies and upgrade to seneca 3.
Only three major changes where necessary to make the project work:

add seneca-basic (that isn't included by default in seneca 3 but is required by seneca-men-store for generate_id)
add seneca-repl (that was devoted to its own plugin)
start the repl after login initialisation completed (ready event)

This now also contains

https://github.com/senecajs/ramanujan/pull/9
https://github.com/senecajs/ramanujan/pull/7


Product release information for Teams displays

Product release information for Teams displays has been updated with the latest update #1 released build versions.

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@dstrome PR has been copyedited and is ready for final review, could you please check and merge? Thanks!

Changes already applied to topic. Closing PR.


Warn when using FileRedirection operator inside if statement

PR Summary
Closes #878
Rename new PossibleIncorrectUsageOfAssignmentnOperator rule to PossibleIncorrectUsageOfComparisonOperator (therefore it is not breaking because the rule has not shipped yet) because it now also warns when using > unintentionally inside if and elseif statements (e.g if ($a > $){ }).
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets. Please mark anything not applicable to this PR NA.

[x] PR has a meaningful title

[x] Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] User facing documentation needed
[x] Change is not breaking (because the rule is new and has not shipped yet)
[x] Make sure you've added a new test if existing tests do not effectively test the code changed
[x] This PR is ready to merge and is not work in progress

If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

About the renaming of the rule,I think there are two different cases.
To separate these two cases, even if it shares the same code of analysis, would allow a granularity in the configuration.
This causes parsing errors:
if ($a > = $b){ "ok"} else { "nok"}

And this is valid:
if ($a >=){ "ok"} else { "nok"}

This rule can also be applied to 'While' and 'Do' statements.
For the level of the rule, it depends on the level of knowledge of the person.
In my opinion, this writing is reserved for people who know the associated behavior and implicit conversions.
I wonder if this rule will be of any use to them, since here this writing is intentional.
In this case the level 'Warning' will be considered too strict and the level 'Information' would be considered too verbose and useless, the rule will just confirm his intention :-).
For a beginner the level 'Warning' would be useful and the level 'Information' would be too risky if it configures the triggering of the rules on 'Warning'.
And it is easier with PSSA to exlude a rule than to configure its level of criticality.
"Since assignment inside if statements are very rare,"
Yes, but it depends on who :-)
Test with a module triggering 38 times this rule:
$r=Invoke-ScriptAnalyzer -path 'C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\5.1.0'|
    where-object rulename -eq 'PSPossibleIncorrectUsageOfAssignmentOperator'
#------
$_ = ${*}.Data['Checkpoint.Import']
$r = ${*checkpoint}.Result
$file = $b['File']
$log = $b['Log']
$up = $PSCmdlet.SessionState.PSVariable.Get('*')
$f = [System.IO.Directory]::GetFiles($Path, '*.build.ps1')
$_ = $f -match '[\\/]\.build\.ps1$'
$_ = $env:InvokeBuildGetFile
$_ = $PSCmdlet.SessionState.PSVariable.Get('*')
$_ = $PSBoundParameters['Result']
$_ = $p.Name
$_ = ${*}.All[$Name]
$_ = ${*}.All[$Task]
$_ = $PSCmdlet.GetVariableValue(${*n})
$d = $Hash[$f]
$c = $d.C[$n]
$_ = $PSBoundParameters['Variable']
$$ = $PSCmdlet.GetVariableValue($_)
$_ = $PSBoundParameters['Environment']
$_ = $PSBoundParameters['Property']
$t = ${*}.All[$r]
$t = ${*}.All[$r]
$r = ${*}.All[$_]
${private:*i} = $Task.Inputs
${private:*x} = $Task.If
${*}.Q = $BuildTask -eq '?' -or $BuildTask -eq '??'
${**} = ${*}.All
$_ = $_.Error
$w = ${*}.Warnings
$_ = ${*}.P
$root = ${env:ProgramFiles(x86)}
$r = $paths -like '*\Enterprise\*'
$r = $paths -like '*\Professional\*'
$r = $paths -like '*\Community\*'
$r = $r.parameters
$r = $r.parameter
$d = $Hash[$f]
$c = $d.C[$n]

while if ( $a >=) { "ok" } is parsable, it's probably not what you want, because a file named = will be created with the contents of $a

@LaurentDardenne

About the renaming of the rule,I think there are two different cases.
To separate these two cases, even if it shares the same code of analysis, would allow a granularity in the configuration.

The rule is for cases where the user simply forgets the right PowerShell syntax (due to context switching or because he/she is a newbie) and therefore I do not understand why someone would enable/disable only one of them if the rule were to be split into 2 rules.
Parsing errors are OK and by design (they come from the PowerShell parses itself) and are a good signal to raise an early red flag because if a script does not parse then there is no point running the script at all and the error messages of the parses are good as well and even point to the right line where the problem happens. There is no point to catch parsing errors and do our own logic, we would be re-inventing the wheel.

Yes, but it depends on who :-)

"Since assignment inside if statements are very rare,"

The implementation of the rule is clever enough to not warn in scenarios where assignment is intentional.

This rule can also be applied to 'While' and 'Do' statements.

That's a good point. We should consider implementing the rule for those statements as well.
Your 38 examples do not trigger the rule for me (I even tried putting some of the lines in an if statement), but they do trigger PSUseDeclaredVarsMoreThanAssignments correctly, was this a mistake or can you elaborate please? Examples of false positives that repro would be very welcome.

@bergmeister
Can you please give an example/scenario where a split would be needed?
It's more of a personal choice or a question of granularity.
In this discussion nightroman prefers this syntax :
if ($x = <something>) {

When I deliver code to a customer, I prefer it for maintenance / knowledge reasons :
$x = <something>
if ($x) {

For that I would like to have this rule with a level 'warning'.
People using the first, more concise syntax will prefer, I suppose, this rule with an 'information' level.
For this case :
if ($a > $b){ "ok"} else { "nok"}

I assume that the majority of people will consider this case as being of the warning level.
This is what makes me think that splitting these cases into two rules,the both  with a  'warning' level , with could satisfy as many people as possible :
Invoke-ScriptAnalyzer -ExcludeRule 'PSPossibleIncorrectUsageOfAssignmentOperator' -IncludeRule 'PSPossibleIncorrectUsageOfRedirectionOperator'
Invoke-ScriptAnalyzer -IncludeRule 'PSPossibleIncorrectUsageOfAssignmentOperator','PSPossibleIncorrectUsageOfRedirectionOperator'
#or
Invoke-ScriptAnalyzer #default

There is no point to catch parsing errors and do our own logic, we would be re-inventing the wheel.
We are talking about the same thing, but not in the same way :-)
Invoke-ScriptAnalyzer -ScriptDefinition 'if ($a > = $b){ "ok"} else { "nok"}'
# Invoke-ScriptAnalyzer : Parse error in script definition:  Unexpected token '$b' in expression or statement at line 1
# column 12.
# At line:1 char:1
# + Invoke-ScriptAnalyzer -ScriptDefinition 'if ($a > = $b){ "ok"} else { ...
# + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#     + CategoryInfo          : ParserError: (UnexpectedToken:String) [Invoke-ScriptAnalyzer], ParseException
#     + FullyQualifiedErrorId : Parse error in script definition:  Unexpected token '$b' in expression or statement at l
#    ine 1 column 12.,Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCommand

What I wanted to say : it is not necessary to put this case in the tests because PSSA is waiting for a syntactically correct script.
Your 38 examples do not trigger the rule for me
I would check again with a development version posted in Appveyor. so we will be sure to use the same code.
ipmo PSScriptAnalyzer
$r=Invoke-ScriptAnalyzer -path 'C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\5.1.0'|
    where rulename -eq 'PSPossibleIncorrectUsageOfAssignmentOperator'
$r.count
#38
$r[0]|select *
#
# Line                 : 59
# Column               : 7
# Message              : Did you really mean to make an assignment inside an if statement? If you rather meant to check
#                        for equality, use the '-eq'  operator.
# Extent               : $_ = ${*}.Data['Checkpoint.Import']
# RuleName             : PSPossibleIncorrectUsageOfAssignmentOperator
# Severity             : Information
# ScriptName           : Build-Checkpoint.ps1
# ScriptPath           : C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\5.1.0\Build-Checkpoint.ps1
# RuleSuppressionID    :
# SuggestedCorrections :

@LaurentDardenne  I think you are missing a detail: The legitimate  case if ($gotSomething = Get-MeSomething){ } will not trigger the rule and neither will if ($x){}. Only cases like if ($a=$b){} or if ($a>$b){} will, which is the reason why I am thinking of always treating it as a warning because the likelihood that it is an error is extremely high due and this is why I don't see the need for the split because the rule does not trigger false positives.
I do not have anything like if ($a > = $b) in the pester tests that I added because as we both agree, it throws a parser error. You must be referring to the test cases that I wrote in the corresponding issue, you can ignore them now because I wrote them only down to have a big picture of cases where a user might make a mistake.
About your 38 test cases. I build it locally using .\buildCoreClr.ps1 -Framework net451 -Configuration Release -Build; .\buildCoreClr.ps1 -Framework net451 -Configuration PSV3Release -Build; .\buildCoreClr.ps1 -Framework netstandard1.6 -Configuration Release -Build; .\build.ps1 -BuildDocs and then I import the psd1 in the out folder (using Windows PowerShell 5.1 or PowerShell Core) and it does not repro on my dev machine.
How are you building/using the PSSA version of my branch? I personally cannot use the artifacts from AppVeyor because I get this error when importing the psd1:
Import-Module : Could not load file or assembly 'file:///C:\Users\cberg\Downloads\psscriptanalyzer\out\PSScriptAnalyzer
\Microsoft.Windows.PowerShell.ScriptAnalyzer.dll' or one of its dependencies. Operation is not supported. (Exception
from HRESULT: 0x80131515)
At C:\Users\cberg\Downloads\psscriptanalyzer\out\PSScriptAnalyzer\PSScriptAnalyzer.psm1:24 char:17
+ $binaryModule = Import-Module -Name $binaryModulePath -PassThru
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

... this is why I don't see the need for the split...
Ok.
How are you building/using the PSSA version of my branch?
I did not use the latest commited version.
Now, I use the zip file here
I compile it with VS studio 2017( VM in Azure) or with the build script.
cd C:\temp\pssa\out\PSScriptAnalyzer
ipmo .\PSScriptAnalyzer.psd1
Invoke-ScriptAnalyzer -ScriptDefinition 'if ($root = ${env:ProgramFiles(x86)}) {}'
# RuleName                            Severity     ScriptName Line  Message
# --------                            --------     ---------- ----  -------
# PSPossibleIncorrectUsageOfCompariso Information             1     Did you really mean to use the assignment operator
# nOperator                                                         '=' inside an if statement? If you rather meant to
#                                                                   check for equality, use the '-eq'  operator.
# PSUseDeclaredVarsMoreThanAssignment Warning                 1     The variable 'root' is assigned but never used.
# s

Invoke-ScriptAnalyzer -ScriptDefinition 'if ($root = get-nothing) {}'

# RuleName                            Severity     ScriptName Line  Message
# --------                            --------     ---------- ----  -------
# PSUseDeclaredVarsMoreThanAssignment Warning                 1     The variable 'root' is assigned but never used.
# s

Invoke-ScriptAnalyzer -ScriptDefinition 'if ($root > $b) {}'
# RuleName                            Severity     ScriptName Line  Message
# --------                            --------     ---------- ----  -------
# PSPossibleIncorrectUsageOfCompariso Warning                 1     Did you really mean to use the redirection operator
# nOperator                                                         '>'? If you wanted to use an equality comparer then
#                                                                   use the '-gt' (greater than) or '-ge' (greater or
#                                                                   equal) operators.

Invoke-ScriptAnalyzer -ScriptDefinition 'if ($root > get-nothing) {}'
# RuleName                            Severity     ScriptName Line  Message
# --------                            --------     ---------- ----  -------
# PSPossibleIncorrectUsageOfCompariso Warning                 1     Did you really mean to use the redirection operator
# nOperator                                                         '>'?   ...

Invoke-ScriptAnalyzer -ScriptDefinition 'if (get-nothing > $root) {}'
#
# RuleName                            Severity     ScriptName Line  Message
# --------                            --------     ---------- ----  -------
# PSPossibleIncorrectUsageOfAssignmen Warning                 1     Did you really mean to use the redirection operator
# tOperator                                                          '>'?   ...

@LaurentDardenne Thanks for clarifying the repro, very helpful, I can repro now and will take a look at them.

One last remark on the presence of two rules.
In case I want to filter one of the cases for this code :
$sb={
 if ($root > $b) {}
 if ($root = ${env:ProgramFiles(x86)}) {}
}

I have to filter this way :
Invoke-ScriptAnalyzer -ScriptDefinition "$sb"|
 Where {($_.RuleName -eq 'PSPossibleIncorrectUsageOfComparisonOperator') -and ($_.Severity -ne 'Information')}
# RuleName                            Severity     ScriptName Line  Message
# --------                            --------     ---------- ----  -------
# PSPossibleIncorrectUsageOfCompariso Warning                 2     Did you really mean to use the redirection operator
# nOperator                                                         '>'? If you wanted to use an equality comparer then

Until now this was enough :
Invoke-ScriptAnalyzer -ScriptDefinition "$sb" -ExcludeRule 'PSPossibleIncorrectUsageOf_AssignmentOperator'

Finally the deletion of the application of the rule, for one of the two cases, by the attribute SuppressMessage is not possible:
$sb={
function Test{
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSPossibleIncorrectUsageOfComparisonOperator', '')]
[CmdletBinding()]
 param ()
 if ($root > $b) {}
 if ($root = ${env:ProgramFiles(x86)}) {}
 }
}
Invoke-ScriptAnalyzer -ScriptDefinition "$sb"
#nothing

@LaurentDardenne I think I slowly start to understand your point of view and can see now how a split into 2 rules would be beneficial given the possibility of false positives for the assignment case.
I also went through all the samples and I think it is by design that cases of the form if ($a = $variableExperssionOfSomeForm){} trigger the rule, there is no way to be more clever without understanding the surrounding script code outside the if statement (except maybe trying to see if the variable is being used inside the statement block of the if statement as an approval that the assignment was intentional). I will definitely look at the following cases of the form if ($a = InvokeExpressionOfsomeForm)){} and will try to see if I can avoid triggering the rule in those special cases (similar to how I already did it for if ($a = Get-MeSomething){ }):

if ($_a= $PSCmdlet.SessionState.PSVariable.Get('*')){ } and similar
if (${*}.Q = $BuildTask -eq '?' -or $BuildTask -eq '??'){ }
if ($r = $paths -like '*\Enterprise\*'){ }
I think if the redirection operator is used inside an if statement then this must be by accident (since the variable on the left hand side will never get assigned). Can you give an example usage where using the > operator is intentional AND useful?
Thanks for being patient.

I also went through all your example samples
They come from the InvokeBuilder module, we can also consult the chapter 7.11 Assignment operators of language specifications .
Can you give an example usage where using the > operator is intentional AND useful?
No sorry, I never use this write option in an if statement.
I do not know the behavior of such a writing (case of lock on the file or of insufficient rights, with $ErrorActionPreference = 'SilentlyContinue', ...).
But maybe this for the assignment can occur :
 $Resgen="$psScriptRoot\ResGen.exe"
 if ($ResultExec=.$Resgen $Source $Destination 2>&1) {}

It's not written like that in the original code and I wonder if this writing has an interest ...
What do you think about this approach of avoiding false positives?
Sounds good to me. That said, I think the problem here is not in the depth of analysis but the behavior expected by users.
If for
if ( $files = get-childitem )

@JamesWTruher consider that "There is a pattern which is very useful which will cause warnings to appear"
others consider that this:
if ( $A = $B )

is also a very useful pattern (see InvokeBuilder module) and others that it will always be an error.
Consider a trigger level configuration could cover these cases :

No trigger : everything is allowed, we respect the possibilities of the Powershell language. Is identical to the -ExcludeRule parameter.
Trigger for variable assignment only : if ($ A = $ B). Are allowed if ($ files = get-childitem) and derived expressions.
Trigger always : the mere presence of '=' into an If statement triggers the rule.

So we are no longer concerned about the intention it is the user who declares it.
Obviously it would be a global behavior and we could not change the behavior for a portion of code or for the entirety of a file (all except).

To avoid false positives for assignments I refactored the rule to check if variable on LHS is used in statement block and if not, then warn. This should then not leave any false positive cases, therefore there is no need for a rule split any more and the level was bumped to be a warning. @LaurentDardenne Let me know if this works well for you now as well.

@bergmeister
The contain of the Extend.Text property does not appear correctly, we lose the contents of the statement that triggers the error.
The PossibleIncorrectUsageOfComparisonOperator.md file should contain an explicit example :
($ a = $ b -> $ a -eq $ b)

The highlighting of the Extent.Text to be as close as possible to the operator is by design because this is where people should see the squigglies in VsCode.
$w=Invoke-ScriptAnalyzer -ScriptDefinition 'if($a > $b){}'
$w.Extent.Text
> $b
$w=Invoke-ScriptAnalyzer -ScriptDefinition 'if($a > $b){}'
$w.Extent.Text
=
$w=Invoke-ScriptAnalyzer -ScriptDefinition 'if($a == $b){}'
$w.Extent.Text
==

@bergmeister @LaurentDardenne I'm not sure whether we've reached consensus here - I'm looking for a clear signal on this before taking it. Eventually, we'll have a pragma way to exclude a rule from applicability. If we take this now, there may be a small group which will need to exclude this rule. Is that ok?

To summarise from my side (I have also updated the PR summary):

The rule to warn against usage of = inside if statements will now only trigger if the variable being assigned on the LHS is not being used later in the statement block.
I do not foresee any false positive about the warning when using > inside if statements unless a counter example is given
Maybe it is better to enable this new rule not by default? Or try using pre-releases to get early feedback?
I am happy to take any criticism

@bergmeister - we've got merge conflicts now - could you rebase and push?

@imfrancisd has added new ideas in his comments here and here about rather using additional parenthesis as a mechanism to be used as a way of stating that the assignment is intentional. It is good to have new and different ideas but I am not sure how the community would react to this especially because it means that people would need to adapt their scripts first for this implicit rule suppression. Therefore I referenced his comments in here to get other people's opinions.

I think the idea of imfrancisd is to be considered.
I prefer to use 2 parentheses instead of placing attributes.
Into Windows Powershell specification ,  7.1.1 Grouping parentheses
To write to the pipeline the value of any expression containing top-level side effects, enclose that expression in parentheses, as follows:
($a = 1234 * 3.5)		# pipeline gets 4319
As such, the grouping parentheses in this case are not redundant.

The IF statement does not require double parentheses.

First Things First
@LaurentDardenne Thanks! I like the parentheses more than attributes too. Other language communities that have this problem (assignment in if condition) have adopted this coding convention and have formalized it in their analyzers, so I thought PSScriptAnalyzer and the PowerShell community might consider adopting that convention too.
@bergmeister I apologize for not posting my comments here first. I did not know about this pull request and even after I found out about it, it seemed weird that the person who asked for this feature and the person who first showed concerns about this feature were not in the discussion. At least as far as I know.
Ok, now that that's out of the way
My problem with the approach of checking the use of the variable to determine = vs. -eq is that it makes this script okay:
if ($x = $y) {
    do-something -with $x
}

However, that is exactly the kind of script that this rule is supposed to flag.
https://github.com/PowerShell/PSScriptAnalyzer/issues/809#issue-249487289
@jongross4 requested this feature with

When moving from other languages where a simple '=' equal sign can be used both as assignment and operator, a warning should be logged. Other Boolean operations should be flagged too. Examples:
if ($x = $y) {} -- Always true
for ($i = 1; $i > 99; $i++) - alias to out-file

He did not write the body of "if ($x = $y) {}", but in real scripts I bet $x is used inside that if block more often than not.

I posted a twitter poll here to involve more people in the community to comment on whether we rather want to have rather more warnings with possible false positives and catch more cases or only call out cases where we are more sure that it is unintentional.

The community has spoken:

I posted and discussed this also in the PowerShell slack forums (the global and the UK one) and it seems that the additional option of being able to indicate deliberate assignment via extra parenthesis is preferred (most people said that they do not like to litter their code with suppressions and at the moment PSSA does not even support suppression for just one line/statement). Therefore I will attempt to implement this.
From the discussions and poll, the outcome was also to rather ditch the approach of not warning when the LHS variables is referenced in some way. I will revert back to what we originally had but will try to make it not flag when using special syntax that represents statements like [System.IO]::GetTempPath similar to how I already included usage of cmdlets like Get-Foo on the RHS. No exclusions will however apply if the RHS is a variable or variable expression.

@JamesWTruher  @LaurentDardenne @imfrancisd
I added:
-More exceptions for PossibleIncorrectUsageOfAssignmentOperator to also exclude usage of  [NameSpace]::Method() or $b -match $c on the RHS of the if expression. The rule should continue to warn if any kind of variable expression is on the RHS.
-Add optional, implicit clang suppression when extra parenthesis are used as requested by the community
-Add additional PossibleIncorrectUsageOfRedirectionOperator rule to have 2 separate rules since this rule does not have any false positives.
Therefore the PR is again up for review

@bergmeister

-More exceptions for PossibleIncorrectUsageOfAssignmentOperator to also exclude usage of  [NameSpace]::Method() or $b -match $c on the RHS of the if expression. The rule should continue to warn if any kind of variable expression is on the RHS.

Is the exception of -match because it sometimes returns a boolean and sometimes it returns an array?
    #Will this be flagged?
    #Common in loops with index.
    #
    if ($i = $array.Count -1) {}

    #Will this be flagged?
    #Common in functions with multiple switches to configure behavior.
    #
    if ($switch1 = ($switch2 -and $switch3)) {}

I think those lines should be flagged.

@imfrancisd The current exceptions to PossibleIncorrectUsageOfAssignmentOperator are if one of the following asts are present on the right hand side:

CommandAst (a powershell cmdlet/function)
InvokeMemberExpressionAst to include other function calls (.net methods or methods on object)
BinaryExpressionAst (operators, like -match, -and, -)
So yes, your 2 examples would not get flagged due to them being a BinaryExpressionAst. The idea was that anything that is any sort of function or operation/transformation on data gets excluded because it could be by design. But I am happy to remove BinaryExpressionAst from the exclusion list because this case is much less likely to be an assignment by design. Thanks for the feedback. :-)

I do not find this use case in the test file :
Invoke-ScriptAnalyzer -ScriptDefinition 'if ( ($a=$b) ){}'

Thanks @LaurentDardenne for spotting that, I fixed it.  It seems I was unlucky to introduce a regression both in the implementation and test when doing the final refactoring.

@bergmeister
Only those who do nothing make no mistakes ;-)

Should not the second example fail, even if we use () ?
Invoke-ScriptAnalyzer -ScriptDefinition 'if ($_ == $_.Error) {}'
# RuleName                            Severity     ScriptName Line  Message
# --------                            --------     ---------- ----  -------
# PSPossibleIncorrectUsageOfAssignmen Warning                 1     Did you mean to use the assignment operator '='? The
# tOperator                                                         equals operator in PowerShell is 'eq'.

Invoke-ScriptAnalyzer -ScriptDefinition 'if (($_ == $_.Error)) {}'
#no warning

typo in the error message :
...The equals operator in PowerShell is '-eq'.

@LaurentDardenne The clang style extra parenthesis are a way of letting the author state implicitly that assignment is deliberate and by design forPSPossibleIncorrectUsageOfAssignmentOperatorwithout "having to litter the code with suppressions"(that was what people said in the Slack forums, which is understandable, especially since we cannot suppress one line/statement only at the moment).
I changed the warning text to rather use the term equality operator, I just used the other expression because to me it is the equal/equals operator because that's what the -eq stands for.

@bergmeister What do you think about "if ($null = )"?
Shouldn't they always be flagged?
Command : invoke-scriptanalyzer -script 'if ($null = $b) {}'
Output  :
          RuleName                            Severity     ScriptName Line  Message
          --------                            --------     ---------- ----  -------
          PSPossibleIncorrectUsageOfAssignmen Information             1     Did you mean to use the assignment operator '='? The
          tOperator                                                         equality operator in PowerShell is 'eq'.

Command : invoke-scriptanalyzer -script 'if ($null = [string]::Empty) {}'
Output  :
          RuleName                            Severity     ScriptName Line  Message
          --------                            --------     ---------- ----  -------
          PSPossibleIncorrectUsageOfAssignmen Information             1     Did you mean to use the assignment operator '='? The
          tOperator                                                         equality operator in PowerShell is 'eq'.

Command : invoke-scriptanalyzer -script 'if ($null = [string]::Concat($a, $b)) {}'
Output  :

Command : invoke-scriptanalyzer -script 'if ($null = $hashtable.Count) {}'
Output  :
          RuleName                            Severity     ScriptName Line  Message
          --------                            --------     ---------- ----  -------
          PSPossibleIncorrectUsageOfAssignmen Information             1     Did you mean to use the assignment operator '='? The
          tOperator                                                         equality operator in PowerShell is 'eq'.

Command : invoke-scriptanalyzer -script 'if ($null = $hashtable["key"]) {}'
Output  :
          RuleName                            Severity     ScriptName Line  Message
          --------                            --------     ---------- ----  -------
          PSPossibleIncorrectUsageOfAssignmen Information             1     Did you mean to use the assignment operator '='? The
          tOperator                                                         equality operator in PowerShell is 'eq'.

Command : invoke-scriptanalyzer -script 'if ($null = $hashtable.Item("key")) {}'
Output  :

Command : invoke-scriptanalyzer -script 'if ($null = get-childitem) {}'
Output  :

Command : invoke-scriptanalyzer -script 'if ($null = (get-childitem)) {}'
Output  :

Command : invoke-scriptanalyzer -script 'if ($null = $(get-childitem)) {}'
Output  :

Command : invoke-scriptanalyzer -script 'if ($null = @(get-childitem)) {}'
Output  :

@imfrancisd The rule currently does not inspect the LHS of the assignment, only the RHS. But it would be a good suggested improvement because a common (recommended pattern) is to do comparison via $null -eq $foo and using $null on the LHS does not make sense inside an assignment, therefore I will consider this improvement.

@bergmeister

Does it look ready to you now since I would like to finish this PR soon.

I didn't know I had a say in the matter! :-)
Not my place to say. I just wander around GitHub issues from time to time and one day found myself here in pull request land.

@imfrancisd I rather meant ready in terms of whether you are happy with the cases where it warns and where it does not. Everyone in the community can have a say that we will take into account and this PR shows that we can come up with a solution where everyone is more happy. The final decision and technical review will still be by James but we are always open to feedback since we do this for the community (not even Microsoft makes any money with PSScriptAnalyzer)

@JamesWTruher After community feedback I addressed it and implemented additional enhancements for special cases. To me the rule looks very polished now. Can you please re-review and give your opinion?

@JamesWTruher  After community feedback I addressed it and implemented additional enhancements for special cases. To me the rule looks very polished now. Can you please re-review and give your opinion?


Prefill text in Facebook share dialog?

I would remove Facebook (it's not privacy friendly). This could be used if you agree:

  Share on Facebook

There are some advantages for us in using the Facebook-button. We did run some ads on Facebook in order to get traction, and we might do it again in the future if we come up some insightful analysis or visualizations. The Facebook-button helps us target our main audience when running ads.
If it is ok for you, we could add a field in the config, specifying if we want to use the Facebook-button or the self-implemented one?

Yeah, for GDPR we would need consent, and that will be a bigger burden for people to fill in the form. I think that's required in Norway as well, but otherwise a setting would be fine. We probably need a few settings anyway.

Lets just go with the button you created for now, and then we’ll fix the setting and GDPR-settings later 👍