Add docs with instructions on how to generate urls for modeladmin

Documentation on how to generate URLs within model using url reversing.
Successfully built the docs with these changes and tested all internal links.
Closes #4519

Hi @lb-. Thank you for this! There's some good and useful information here. However, I do feel like the structure is a little inconsistent with what we have already.
In a perfect world, there'd already be a separate API reference in the docs for the various helper classes, but there isn't, and I don't think we should try to fill that gap here. Rather, I think this page would be benefit from shrugging off the structural constraints of existing content, and focus on showing specific, practical examples of how to do this. What do you think?
In regards to quoting primary key values, that should only be necessary when working with strings, that might possibly contain 'tricky' characters. In most cases, it's unnecessary (the helper should probably be a bit more helpful here, and conditionally quote the value itself).

@ababic  - thanks for the feedback, just so I understand correctly, I should do the following:

[ ] remove the content about ensure you wrap any data in ``quote`` to ensure it is safe to use in a URL. and the usage of quote function on the primary key in examples
[ ] Rework the url_helper.get_action_url section to be maybe just show one solid example of getting the edit page for an entity. (then make a note at the end that delete, inspect and choose_parent are also available
[ ] Rework the url_helper.index_url to be a solid example about 'showing a list of all entities for a model' and make a small note that this is a shortcut way to a cached version of url_helper.get_action_url('index')
[ ] Similar with the url_helper.create_ur' section, work with it as an example of how to get a url to 'add' or 'create' a entity via a form
[ ] Remove the **Expected value** specifications
[ ] In each example, show what kind of URL you will get as an output so the examples are clearer

Remove the content about ensure you wrap any data inquoteto ensure it is safe to use in a URL. and the usage of quote function on the primary key in examples

I would start with a simple example, then explain why/when quoting might be necessary -  possibly showing another example using quote(). If the functionality is revised later, then this bit can be rejigged at a later time.

In each example, show what kind of URL you will get as an output so the examples are clearer

Yes, I think some code examples with sample output would be incredibly useful here :)
In general, I would try to steer clear of headings like url_helper.get_action_url() and instead use more informal language like "Getting the list view URL" and "Getting the edit view URL for an object". We can add some more formal API documentation for the helper classes and their methods at a later time.

Thanks, that is really helpful, will get on it soon

@ababic  - round two just updated, would love your feedback, also found a few typos in original and one example that was wrong (the behaviour of 'choose_parent' works slightly differently as originally written).

Thank you @lb-. I'll take a good look at this soon. It might not be for another couple of weeks though, unfortunatey, as I currently have quite a lot on.

@ababic  - great feedback, thank you for taking the time to suggest the changes and explain all of that. I will get onto this soon.

@ababic  - revision updated, take a look when you get the chance.

@ababic - next round up, thanks for pushing to make this awesome, let me know what you think

@ababic  - made those changes, with a few refinements from your comments.
thanks

@ababic  - cool, thanks for picking those up, I have reworked that note section about the url encoding of primary keys, hope it makes a bit more sense now.

@ababic  - thanks for that, fixed up in latest push. let me know if we are good to go :)

LGTM :)

@ababic  - thanks for all the help, really appreciated it.
Merged in https://github.com/wagtail/wagtail/commit/fc21729a243e7ac76ac00b680f9a256c0bacc776

Building the docs now gives me the warning "/vagrant/wagtail/docs/reference/contrib/modeladmin/reversing_urls.rst: WARNING: document isn't included in any toctree" - does this need to be added to an index page?

@gasman sorry, this one's on me. will sort :)

@ababic  - thanks for that - will leave with you
I was not sure where to put the page in the TOC as it was moved to the 'tips and tricks' section


Fix #392: Add blog/feed.rss

I tested locally, discovery and loading the RSS file in a client works.
File copy/pasted from the old website design. My website's own RSS file does more work and sanitization than this, but this is fine for now.

Thanks for bringing this back.  I'm trying to get back into RSS myself...

Thanks for merging 🙂 I noticed it got merged when my feed reader started seeing new posts again.

@rossabaker if you want to get back to RSS, here are some recommendations:

If you're looking for a managed service, Newsblur is the best I've seen;
If you're into self-hosting (which is what I do), FreshRSS is pretty painless via Docker;
If on macOS or iOS, Reeder is a proprietary client that's been well maintained (can connect to FreshRSS or Newsblur, too);
Android doesn't have good options for 3rd party clients, but Newsblur's Android client is decent, and FreshRSS is usable from the browser;

You can also follow Twitter feeds:

Newsblur can do it out of the box;
I self-host, so I use RSS-Bridge;
I also have a "Subscribe to RSS" and "Subscribe to Twitter/RSS" bookmarklets that I wrote myself (nothing much, it's just a piece of JS that opens a popup with the right URLs and form values), since RSS feed discovery can be challenging, and available browser extensions suck;

When going through your RSS feed, it helps if you also have a read-it-later service or system, since you notice that some articles are good, but don't have time for them. I use Pocket, but you can use some sort of TO-DO app as well (e.g., CalDAV / org-mode).

I know that this only affects a small number of people, but for the Dreamwidth users out there, the blog is available as typelevelblog-feed.  (I probably set that up, years ago.)


Can I count to a decimal number

I am doing a real estate application and I need the plugin to count up to 2.5 is this possible. I tried setting data-from="0" data-to="2.5"  but it just counts to 3 any suggestions.

Looking for the same but a bit more difficult.  I have users who use comma as decimal separator.

Wouldn't it be possible to have the possibility that we can hookup an function for the display?  So internally it works with integers (or even better floats) to calculate the timing and number of steps but for display it calls a function with the value param.  That way we could do display things like: $1,431.45 or €14.200,25

Aha!  Found a nice solution.  You can just use the formatter function which works great:
$this.countTo({
                speed: 1500,
                refreshInterval: 25,
                formatter: function (value, options) {
                    return formatPriceCents(value);
                }
})

and in formatPriceCents you can do whatever you want.  Tested it, and it works fine.
BTW @rdoddXL thanks for this great library :-)

Yep, you should be able to format with the formatter callback.  Glad you like the plugin!  @rdoddXL let me know if this solves your issue.

Is there a way to display it like: "1.200,88"?

I've found the answer to my question here: #19

Glad you figured it out!


Upstream fixes

Overview
Behavioral fixes I made to make this work with SoftWing. Changes include:

Adding logic to center the joystick on release.
Adding logic for handling multiple touch pointers.

Testing Done
Most of the testing has been performed as a part of my app that uses this library https://github.com/lucasjodon/SoftWing

These changes will fix issue https://github.com/sparrow007/AndroidJoyStickView/issues/2


RCTFatal + 400 on iOS

I got this error log from my last release app.

Version : 0.21.5
Affected OS : iOS
OS Version  | ?   |
Current behavior
Open app and it  immediately crash. Next open is ok (not crash). Sometime it's happen
Expected behavior

Hey @ntphong1990, #442 may just be the fix you need, as tested in #455.
If you have the time, could you confirm that the PR fixes this for you too?

No feedback provided.

Same issue here using
    "react": "^16.5.0",
    "react-native": "0.55.4",

:( any solution

?

@ckOfor this issue has been closed nearly a year, please log a new issue with as much info as you can provide (versions etc)


How to do for multiple permissions for specific function?

@NeedsPermission(Manifest.permission.CAMERA) @NeedsPermission(Manifest.permission.READ_EXTERNAL_STORAGE) void myFunction() {         ...     }
As you can see, I need 2 permissions allowed to call this function.
Please give your advice.
Thanks.

Our annotations accept arrays as their parameter, so you'd specify multiple permissions in the same annotation like so:
@NeedsPermission({Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE})

Thanks.

Thx!

@hotchemi Tried this but not working.


Targets Python 3.5

This step is required before fixing #74. Also, implemented idea to solve NumPy version madness when testing (cc @newlawrence).

Now the builds will take longer unfortunately. I strive for dropping Python 3.3 support by next year as detailed in the wiki https://github.com/poliastro/poliastro/wiki/Python-support-roadmap.


Spanish 150 word list and a suggestion

the Spanish words seems ok  You may run in some isues if the word "Ñ" is used, its an n with a litle ~ on top of it

If you can, please consider the country of Colombia, domain is ".co"

Javier

Hello! Thanks for the suggestion! During the first stages of this project support for non-asci characters were really limited, and i've written anything that causes an exception into an error file. I've re-added them during the second phase, and i'm sure it'll impact the results of regional passwords greatly.
It was also one of the main reasons why i released only very limited (150 lines) for regional ones.
It will be fixed in the next release of regional passwords.
Meanwhile, please enjoy this small list of passwords (ranked by most common to least common) containing "Ñ".
contraseña
asdfghjklñ
españa
CONTRASEÑA
micontraseña
muñeco
muñeca
Contraseña
cariño
pequeño
lacontraseña
niñas123
nuñez
contrasseña
muñequita
tinerfeño1839
Ciñera00
asdfghjklñ123
contraceña
coqueñaloly
mañana
muñecas
muñoz
teextraño
ññññññ
123contraseña
17años
Magariño

About Colombia, I've refrained from adding any country codes for countries that had multiple languages, so i wouldn't taint the language lists.
I've skipped colombia because it said "Spanish, Castillian" in the language and i thought it was two different languages.
I'll re-add Colombia to the spanish list.
Your feedback and suggestions are very much appreciated. I hope next release will be a big change. Cheers!

Great, and just as a trivia issue

The real name of the Spanish language is "Castellano" which comes from the Castilla zone of Spain where it originated, Spain in Spanish is España so thats why .es is used for Spain. So when you found two languages for Colombia, what they tried to do I guess was to put the language in its English translation form and in its original form Castellano, although thew wrote Castillian

The number 1 password you found in Spanish was "contraseña" , translation ?  "password"

Will we be able to run localized passwords depending on the country ? just like you did with the dutch in sample you tweeted ?

I am fluent in Spanish as you may presume so if you need help let me know by emailing me at<EMAIL_ADDRESS>Javier

Thanks for the trivia!
About 3., i really want to make that a thing, but i've hit a brick wall about that part of the service i want to provide.
In another issue, i've given some examples for services i want to give access to everyone:

Most common 1000 passwords containing word "admin"
Most common 1.000.000 passwords matching a certain complexity
Most common 100.000 passwords used by email addresses ending with ".tr"
Most common 1000 passwords used by accounts from @example.com email provider.

I kind of hit a brick wall about the language one because there are fundamentally difficult parts about that.

Leading wildcards such as %.nl is not optimized well.
Bulk processing emails are fast. Bulk processing passwords are fast. But when you want to process credentials (such as "all the passwords used by this kind of emails") it has to run a massive join operation, and it takes a while to get the result.

As a result of this, i've been considering implementing a queue system.
Each user puts their request in a queue. They are processed one by one, and result are emailed back or available to the user after login.
A second queue will also keep track of the query results. It'll insert query results to the front of the queue, while last query at the back gets popped. If a new query is requested and its result is already in the queue, it'll be pushed to the front without inserting, so frequent requests wont be repeated.
I'll have to implement this to see if it could create enough of an impact to make it viable first.
But at the time, it looks like i don't have the time nor funds to make this yet :(
If thats okay with you, i'll contact you once collection 2-5 is processed, and i'm ready to update the regional lists with larger versions.
I'll keep this issue open until then.
Cheers!

3 ideas

Regarding passwords and countries, the first thing is to relate the domain name where password was found and associated passwords.  Example Italian sites all end in .it  which is what  you did with the Irish case,

BUT
many  italian sites are not .it  but are .com so how can you relate language and passwords  ?
You may assume in general terms that you  will go to a site  that its the same language that you speak,( unless youre multilingual like me and I go to english ans sites in spanish)
So if this is the case you can not go just consider the domain of the site because we already saw that there are  italian sites which are in italian language but they are  not .it but .com This means that there will be more sites with lang="it" in it's source code than sites with lang="it" and domain .it
The way I would suggest is by going inside the source code of the site where in the first line you have to declare what language the site is in .  I am sure that if you go to an italian site the source code will probably say it's language is italian, ( lang="it" ) lang="fr" for french sites an so on.
So the relation would be what is the "lang" parameter found in the source code of the website where you found the password. Some lang parameters are double because you have lang=english but english spoken in uk, australia ( en.us, en,uk, en,au, etc)  or in the case of spanish which is spoken in  spain, colombia argentina or mexico  es.es es.co es.ar. es.mx  So the second part of the lang= would give you the most information on the country to where the password is related to.  Of course we assume that the site was designed properly  Also you may find the country parameter but I don't think is a must when designing your site

Regarding lookup functions for words maybe you can take a look at scrabble sites or dictionary sites and using and OSINT   what they use   In these site you can build your search.  How many characters, starting with, ending with, have a string after x amount of words etc.

Going back to one of your tweets I see that you have as language castilian and have .bo  this is for Bolivia that speaks spanish.
See you

many italian sites are not .it but are .com so how can you relate language and passwords ?

So i guess i was a bit ambiguous there, im not filtering the tld's of leaked websites, im filtering tld's of email addresses.
For now, i've only taken top level domain of the email addresses of users to filter the languages.
I know this really decreases the amount of samples i get because im missing a lot of accounts and being unfair for users using .com accounts, .edu accounts and etc.
That being said, its the only quick solution i had for filtering and only having users of a certain language confidently. (for now)
So for example, I'm betting my money on no french users using .de emails, and no german users using .fr emails. If they are using .com, they are not going to get thrown into the dataset, but at least dataset is not tainted.

The way I would suggest is by going inside the source code of the site where in the first line you have to declare what language the site is in . I am sure that if you go to an italian site the source code will probably say it's language is italian, ( lang="it" ) lang="fr" for french sites an so on.

Its a good idea, but there are a lot of multilingual websites with options to change language, and thats going to taint the dataset.

Regarding lookup functions for words maybe you can take a look at scrabble sites or dictionary sites and using and OSINT what they use In these site you can build your search. How many characters, starting with, ending with, have a string after x amount of words etc.

Its a good idea that i've been considering - with small differences. Some alphabetical characters can hint which language that user uses. For example, a password containing "Ñ" can hint towards spanish.
But i don't think i'll take this approach. This will create a bias towards what kind of passwords make it to the dataset, and which wont. If i start filtering on the passwords and not the leak source, email, and other metadata, it might create a problem.

Going back to one of your tweets I see that you have as language castilian and have .bo this is for Bolivia that speaks spanish.

Yup, i've taken a note of it, and im going to merge castillian and spanish together in the next big release.
I've been a bit hasty reading your comment and replying, so please do not hesitate if i missed something or misunderstood something.
Cheers!

Not at all, its nice of you to listen opinions
Regarding what you said about
you mentioned:

For now, i've only taken top level domain of the email addresses of users to filter the languages.

The tld of the email address will work if it has one which is two letters long

Consider also the tld of the compromised site. If the TLD is 2 letters you have the country and all emails associated with these sites you can probably say belong to that country

I thing you will limit very very much your findings because to have an email with a TLD, you need to have paid for a domain and host or unless  your free email account uses one like yahoo that has yahoo.es, .fr , .it etc.  All Gmail accounts which are  the most popular free email service on western world are all .com and  you would loose all those

That's why i mentioned you could filter on the tld of the leaked website and scraping the source code find the language and probably the country of said website to where the email account is coming from Example if you had a leak from the website http://hogarmania.com  how do you know what language was this in_
Looking in the source code, in the first line you will find <html xmlns="https://www.w3.org/1999/xhtml" lang="es">
in this case at least you know it's in Spanish
Or maybe the language is in a metatag that not all have a metatag withth elanguage
look at this one   http://webawards.com.au
Because  the website ends in a 2 letter domain, au , you'll know it belongs to Australia rightaway
BUT
look at their language meta tag it is
See its in English from Australia  "en-AU" you are interested in the country so its here in the metatag and not in the first line where it just said
So if the email was a gmail account and the website was just webawards.com, unless you looked inside the code you would not guess what country the email account was from, this way you can


是否支持kafka source message类型为xml的数据？

Search before asking

[ ] I had searched in the issues and found no similar question.

[ ] I had googled my question but i didn't get any help.

[ ] I had read the documentation: ChunJun doc but it didn't help me.

Description
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

如果不支持，基于框架，有什么好的建议？


Start page – SRS information

Describe the solution you'd like
As a new user
I need to understand how to access the NPD data through ONS
in order to apply for the correct accreditations prior to an application
Scenarios
Given I'm an anonymous user
When I go to the service start page
Then I see a description of the ONS SRS and Accredited Researcher programme
and links to further (external) information

https://www.ons.gov.uk/aboutus/whatwedo/paidservices/virtualmicrodatalaboratoryvml

Blocked: are we keeping this page of just using the guidance CRM?


Implemented checking if network is enabled when searching for hosts

One question: do you have any reason to keep the "Next" button available when there's no network connection? If there's no network the next step won't work either.

Only reason is that with manual configuration the network connection is not required. We might want to add the check at the manual configuration screen as well for the test button. Although, personally I think at that point the user should be aware network is not configured from the previous screen...

BTW: wouldn't "manual" be a better label for the "next" button?

Well, if it can't check the info the user inputs in manual configuration, it won't save it, so there's really no point in going forward. I've removed the next button when there's no network connection.
Regarding the label, maybe you're right, but somehow i feel that, given that you're in a wizard, "next" is more appropriate.


quic: disallow ConnectionBalancer config

ConnectionBalancer isn't currently supported for udp/quic, and implementing it would probably be CPU-inefficient due to packet forwarding between workers. Disallow this config.
This should be done before MVP as it would other invalidate a previously-loadable config.

More details: QUIC traffic shouldn't have connection_balance_config
configured at all: https://github.com/envoyproxy/envoy/blob/ba474ac375418d5529a30a9510a8ff5f0a5ada9a/generated_api_shadow/envoy/config/listener/v3/listener.proto#L256
ListenerImpl::buildSocketOptions() should throw if both connection_balance_config and quic are  configured.


Get rid of the data API

The original typeahead.js code was using the $.data API to store the underlying datum, key and value values. Zepto and jQuery don't react the same way while storing objects (see https://github.com/algolia/autocomplete.js/pull/31).
We should find another way to save those 3 values, avoiding using the data attributes.

Let's remove data once we'll remove the jquery/zepto dep.

once we'll remove the jquery/zepto dep.

:heart:


Use Bearer HTTP auth scheme in get user membership

As described in #13213 the AzureADGraphClient should use the Bearer HTTP authentication scheme when querying Azure Graph API to get a user's group memberships

Can one of the admins verify this patch?

Thanks for your contribution. Looks like the CI failed.

The tests are failing because the token value being passed to getGrantedAuthorities() is a token prefixed by "Bearer" rather than only being the token:
https://github.com/Azure/azure-sdk-for-java/blob/4098541375240ae9c7b89406973cfcabef2e4387/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserPrincipalAzureADGraphTest.java#L97
https://github.com/Azure/azure-sdk-for-java/blob/4098541375240ae9c7b89406973cfcabef2e4387/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserPrincipalAzureADGraphTest.java#
Will fix the tests and get CI to pass

Seems like the macOS java 8 build job timed out with the following error message:
##[error]The agent did not connect within the alloted time of 45 minute(s).
,##[error]The request: 2873172 was abandoned due to an infrastructure failure. Notification of assignment to an agent was never received.

Can someone launch it again from the Azure DevOps pipelines? Thanks

/azp run java - spring - ci

I fixed the breaking tests. Can a code owner please review this?

closes #13215


Fix typo in readme

Wrong name of exported class in ES6 example.

I signed it!

Thanks for the fix!


java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Handler.removeCallbacks(java.lang.Runnable)' on a null object reference

Describe the bug
This is happening on production for us also.
Device: Pixel 6 Android 13
Vonage SDK: 2.26
We see this occur when closing a previous session and creating a new close together. There seems to be no 'good' or recommended way to close a session other than nulling its reference and hoping that the garbage collector collects. That being said we are trying to use the life cycle methods to gracefully close the vonage session.
The main issue seems to be that vonage is attempting to remove something that does not exist or is already stopped.
The fact that I have to jump though so many hoops just to dispose and ensure vonage is not controlling the camera anymore is a bit crazy to me.
FATAL EXCEPTION: main
Process: com.transcarent.app, PID: 550
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Handler.removeCallbacks(java.lang.Runnable)' on a null object reference
	at com.opentok.android.Camera2VideoCapturer.stopDisplayOrientationCache(Unknown Source:4)
	at com.opentok.android.Camera2VideoCapturer.destroy(Unknown Source:11)
	at com.opentok.android.PublisherKit.a(Unknown Source:4)
	at com.opentok.android.PublisherKit.z(Unknown Source:0)
	at com.opentok.android.m0.run(Unknown Source:2)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7918)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

It should be noted we have also tried to go directly to the capture of the publisher and stop that however stopping that results in a separate error.
Please give us a guaranteed way to COMPLETELY dispose of a session/publisher this is so frustrating.
I believe this error seems to be due to the SDK expecting a callback but because i removed it it is getting null. Is your SDK nullsafe on the java side when running callbacks that can be nulled?
To Reproduce
If you run this code to close the previous sessions references x3-4 times you will run into the error i got.
// Fully connect to a session
// Leave. session

patientPublisher?.setPublisherListener(null)
patientPublisher?.setMuteListener(null)
patientPublisher?.setCameraListener(null)
patientPublisher?.setVideoListener(null)

session?.onPause()
patientPublisher?.onStop()

Expected behavior
The session is closed without throwing errors.
Device (please compete the following information):
Device: Pixel 6 Android 13
Vonage SDK: 2.26
Additional context
Add any other context about the problem here.

@derekpitts28
In a soon to be released v2.26.1 version (between this and the following week), we currectly terminate the camera capturer for all scenarios.
When combining the 2.26.1 version together with the correct way to gracefully terminate a session:
mPublisher.onStop();
mSession.unpublish(mPublisher);
mSession.disconnect();

I attached a video recording to the ticket showing reproducing the scenario with the new fixes:
https://github.com/opentok/opentok-android-sdk-samples/assets/106695857/386057f6-36af-4fee-adbd-85b1282d8d78
I will close the ticket. If for some reason you find these changes do not solve your problem, please re-open it.

Thanks so much @goncalocostamendes !!

@v-kpheng can you please give a feedback to @derekpitts28?

@derekpitts28, 2.26.1 should be out by mid-October.

@goncalocostamendes After we updated to the new 2.26.1 and using the closing code you mentioned above, our testers still found this issue on android Xiaomi API 33. I am wondering if this is a race condition because on average i am not reproducing this on my Pixel 6 but we are seeing it consistently on other devices.
Could we surround these calls with a try catch or add in null safe calls so we don't see stale calls call this? This is completely bricking the app when it happens.
Here is the error again:
digest=============com.transcarent.appjava.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Handler.removeCallbacks(java.lang.Runnable)' on a null object reference
at com.opentok.android.CameraVideoCapturer.stopDisplayOrientationCache(SourceFile:)
at com.opentok.android.CameraVideoCapturer.destroy(SourceFile:XX)
at com.opentok.android.PublisherKit.a(SourceFile:)
at com.opentok.android.PublisherKit.z(SourceFile:)
at com.opentok.android.q.run(R$$SyntheticClass:)
at android.os.Handler.handleCallback(Handler.java:XX)
at android.os.Handler.dispatchMessage(Handler.java:XX)
at android.os.Looper.loopOnce(Looper.java:XX)
at android.os.Looper.loop(Looper.java:XX)
at android.app.ActivityThread.main(ActivityThread.java:XX)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:XX)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:XX)

I believe you said i can reopen this however i do not think i have the ability to do so, please let me know how you want me to proceed when you have a chance, thanks!

Reopening issue @derekpitts28

Any movement on this? @goncalocostamendes @v-kpheng

@goncalocostamendes @v-kpheng Any way I can get this looked at, we have users crashing because of this, thanks!

@derekpitts28 I can now have access to a mobile device with the same model. This bug will be worked on next sprint. I will provide you an update once I have one.
Please provide me the entire content of the function you call to end the session.

Here is the dispose call:
    private fun dispose() {
        try {
            patientPublisher?.onStop()
        } catch (e: Exception) {
            VonagePlugin.logInfo("Dispose session .onStop() error $e")
        }

        try {
            session?.unpublish(patientPublisher)
        } catch (e: Exception) {
            VonagePlugin.logInfo("Dispose session .unpublish() error $e")
        }
        try {
            session?.disconnect()
        } catch (e: Exception) {
            VonagePlugin.logInfo("Dispose session .disconnect() error $e")
        }

        doctorVideoView?.removeVideoFromContainer()
        patientVideoView?.removeVideoFromContainer()

        patientPublisher = null
        doctorSubscriber = null
        session = null
    }

@derekpitts28 I see the issue. There might indeed occur a race on the disposal of the session together with the publisher.
Session.disconnect() is configured to disconnect internally any publisher(s) and subscriber(s).
I would recommend you changing the dispose method to:
`private fun dispose() {
try {
session?.disconnect()
} catch (e: Exception) {
VonagePlugin.logInfo("Dispose session .disconnect() error $e")
}
    doctorVideoView?.removeVideoFromContainer()
    patientVideoView?.removeVideoFromContainer()

}`

As previously mentioned, Session.disconnect() will delete the publisher, which will trigger the callback onStreamDestroyed(). On that callback, the capturer can be safely stopped.
public void onStreamDestroyed(PublisherKit publisher, Stream stream) {     try {             patientPublisher?.onStop()         } catch (e: Exception) {             VonagePlugin.logInfo("Dispose session .onStop() error $e")         } }
Fell free to test it and give me feedback on it.
Furthermore, I am adding a safety check on our SDK which will be released in 2.27.1 (mid January).

Thanks, let me implement what you mentioned above and see if that fixes this on the devices that were crashing. I will get back to you once I have a result. Thanks again! 🚀

@goncalocostamendes We are running into the same issue on our code base. Following your previous suggestion of not using onStop on the publisher seems to resolve the issue however I have some concerns. We create a publisher before creating a session because we want to give the user a preview of the video before joining the session. This sometimes leads to cases where a session is never created because the user decides to leave the activity without joining the chat, and our code is setup to call publisher.onStop since there is no session to call disconnect on. Do you see any issues with removing this onStop call (my immediate concern would be memory leaks)? Or should we wait for the 2.27.1 release that will address this issue?

@tinder-enginrumelioglu exactly, the session and the capturer are independent from one another. Scenarios such as publisher preview cannot blindly rely on the previous answer, because in such case the callback onStreamDestroyed() will never be triggered. We did not configure the session.disconnected() method to stop the capturer, because there might be use cases where the user does not want to stop the capturer.
In the mentioned scenario Publisher preview, session never created and user leaves activity, removing the call to publisher.onStop from the activity finalizer will lead to leaving the capturer running consuming CPU and the Android LED for the camera capturer will be green (ON), which may lead to privacy concerns by your clients.
Possible suggestions are:

(case you never have more than one publisher) link the capturer publisher.onStop call to the publisher destructor (here you can remove publisher.onStop from onStreamDestroyed());
leave the publisher.onStop call on the activity finalizer, but add a flag to validate if publisher.onStop was already triggered.

@goncalocostamendes Our tester reproduced the error with your recommended change regarding the .disconnect call.
Same error as before:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Handler.removeCallbacks(java.lang.Runnable)' on a null object reference
	at com.opentok.android.Camera2VideoCapturer.stopDisplayOrientationCache(SourceFile:5)
	at com.opentok.android.Camera2VideoCapturer.destroy(SourceFile:12)
	at com.opentok.android.PublisherKit.a(SourceFile:2)
	at com.opentok.android.PublisherKit.z(SourceFile:1)
	at com.opentok.android.q.run(R8$$SyntheticClass:3)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:211)
	at android.os.Looper.loop(Looper.java:300)
	at android.app.ActivityThread.main(ActivityThread.java:8400)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)

@goncalocostamendes just an FYI for your suggestion for (2) above I cannot find a way to verify if onStopped was called it does not look like there is a public getter for isStopped as it is package private for the BaseVideoCapturer.

@tinder-enginrumelioglu @derekpitts28 publisher.onStop can be triggered multiple times. It internally validates if it was already stopped. As such, for the question:

@goncalocostamendes We are running into the same issue on our code base. Following your previous suggestion of not using onStop on the publisher seems to resolve the issue however I have some concerns. We create a publisher before creating a session because we want to give the user a preview of the video before joining the session. This sometimes leads to cases where a session is never created because the user decides to leave the activity without joining the chat, and our code is setup to call publisher.onStop since there is no session to call disconnect on. Do you see any issues with removing this onStop call (my immediate concern would be memory leaks)? Or should we wait for the 2.27.1 release that will address this issue?

You can leave both publisher.onStop calls.

I will close the ticket since it seems the issue was resolved. Please open it if that is not the case.

@goncalocostamendes I don't think this was resolved unless you mean you have a fix for the later release. When trying to call onStop I get all sorts of errors unless you fixed those also. For example the situation where we want to keep the session open but stop the capturer, i call onStop and get a slew of errors:
W/MessageQueue(16897): Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): java.lang.IllegalStateException: Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:560)
W/MessageQueue(16897): 	at android.os.Handler.enqueueMessage(Handler.java:786)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageAtTime(Handler.java:735)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageDelayed(Handler.java:705)
W/MessageQueue(16897): 	at android.os.Handler.post(Handler.java:435)
W/MessageQueue(16897): 	at android.media.ImageReader$HandlerExecutor.execute(ImageReader.java:1155)
W/MessageQueue(16897): 	at android.media.ImageReader.postEventFromNative(ImageReader.java:944)
W/MessageQueue(16897): Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): java.lang.IllegalStateException: Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:560)
W/MessageQueue(16897): 	at android.os.Handler.enqueueMessage(Handler.java:786)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageAtTime(Handler.java:735)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageDelayed(Handler.java:705)
W/MessageQueue(16897): 	at android.os.Handler.post(Handler.java:435)
W/MessageQueue(16897): 	at android.media.ImageReader$HandlerExecutor.execute(ImageReader.java:1155)
W/MessageQueue(16897): 	at android.media.ImageReader.postEventFromNative(ImageReader.java:944)
W/MessageQueue(16897): Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): java.lang.IllegalStateException: Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:560)
W/MessageQueue(16897): 	at android.os.Handler.enqueueMessage(Handler.java:786)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageAtTime(Handler.java:735)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageDelayed(Handler.java:705)
W/MessageQueue(16897): 	at android.os.Handler.post(Handler.java:435)
W/MessageQueue(16897): 	at android.media.ImageReader$HandlerExecutor.execute(ImageReader.java:1155)
W/MessageQueue(16897): 	at android.media.ImageReader.postEventFromNative(ImageReader.java:944)
W/MessageQueue(16897): Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): java.lang.IllegalStateException: Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:560)
W/MessageQueue(16897): 	at android.os.Handler.enqueueMessage(Handler.java:786)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageAtTime(Handler.java:735)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageDelayed(Handler.java:705)
W/MessageQueue(16897): 	at android.os.Handler.post(Handler.java:435)
W/MessageQueue(16897): 	at android.media.ImageReader$HandlerExecutor.execute(ImageReader.java:1155)
W/MessageQueue(16897): 	at android.media.ImageReader.postEventFromNative(ImageReader.java:944)
W/MessageQueue(16897): Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): java.lang.IllegalStateException: Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:560)
W/MessageQueue(16897): 	at android.os.Handler.enqueueMessage(Handler.java:786)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageAtTime(Handler.java:735)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageDelayed(Handler.java:705)
W/MessageQueue(16897): 	at android.os.Handler.post(Handler.java:435)
W/MessageQueue(16897): 	at android.media.ImageReader$HandlerExecutor.execute(ImageReader.java:1155)
W/MessageQueue(16897): 	at android.media.ImageReader.postEventFromNative(ImageReader.java:944)
W/MessageQueue(16897): Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): java.lang.IllegalStateException: Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread
W/MessageQueue(16897): 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:560)
W/MessageQueue(16897): 	at android.os.Handler.enqueueMessage(Handler.java:786)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageAtTime(Handler.java:735)
W/MessageQueue(16897): 	at android.os.Handler.sendMessageDelayed(Handler.java:705)
W/MessageQueue(16897): 	at android.os.Handler.post(Handler.java:435)
W/MessageQueue(16897): 	at android.media.ImageReader$HandlerExecutor.execute(ImageReader.java:1155)
W/MessageQueue(16897): 	at android.media.ImageReader.postEventFromNative(ImageReader.java:944)

@derekpitts28 just an FYI, the first error you mentioned Handler (android.media.ImageReader$ListenerHandler) {982841} sending message to a Handler on a dead thread is can also be caused by some event updating the UI from a background thread. At this moment, from our side, all subscriberListener methods are configured to run on a background thread. We are updating this on 2.27.1

@derekpitts28 regarding your scenario keep the session open but stop the capturer, do you mean simply muting the video? Or unpublishing the publisher?

So in our case we have a session connected but we do not want to publish the users video yet. We only want to show a preview of the users view before they publish their video. If they decided to exit before publishing we need to close the publisher otherwise the capturer stays open and the user video indicator stays on. In almost all usages of onStop the app seems to run into the null object error eventually if not right away. I had my testers go through and use your recommended code for stopping the publisher ie using onStop and in almost all cases it crashes.

@derekpitts28 it seems to me you will need to wait for the 2.27.1 release which provides more safety checks when stopping the capturer and associated threads. In the mean time I will try to replicate that scenario and check if any other improvement can be made

I am running into the same issues that Derek is running into. It should be rather easy to duplicate with the following steps;

Create a Publisher (no need to create a Session)
Render the View from the Publisher
Call Publisher.onStop and stop rendering the View when the activity is destroyed
Observe that the app crashes a few seconds later

+1 It is happening in production with 2.27.0  We start a call but we see black screen

@derekpitts28 @janoonaj @tinder-enginrumelioglu The safest way to stop the camera is, instead of calling directly onStop() method, use PublisherKit.setPublishVideo(boolean publishVideo) which internally will call onStop() method, it will stop publishing video (will send black frames to the subscriber) and will release the capturer. To stop it simply call publisher.setPublishVideo(false)

@goncalocostamendes I believe this does not turn on the camera and the system green light stays on because vonage holds onto the camera object. I don't think this truely, stops/releases the camera and could cause users to think we are still using their camera when we are really not.

@derekpitts28 @janoonaj @tinder-enginrumelioglu The safest way to stop the camera is, instead of calling directly onStop() method, use PublisherKit.setPublishVideo(boolean publishVideo) which internally will call onStop() method, it will stop publishing video (will send black frames to the subscriber) and will release the capturer. To stop it simply call publisher.setPublishVideo(false)

@goncalocostamendes I believe this does not turn on the camera and the system green light stays on because vonage holds onto the camera object. I don't think this truely, stops/releases the camera and could cause users to think we are still using their camera when we are really not.

This is how we do it on our internal app, and I can validate that the onStop() method is called when publisher.setPublishVideo(false) is triggered. In addition, by calling onStop() directly instead of stop publishing video there may occur some errors, since you are trying to publish video that you are no longer capturing/rendering.

Can you verify does publisher.setPublishVideo(false) release the camera ie does the camera green light turn off on newer devices?

@derekpitts28 yes, it turns off the green LED

this worked for me!

@derekpitts28 @janoonaj @tinder-enginrumelioglu The safest way to stop the camera is, instead of calling directly onStop() method, use PublisherKit.setPublishVideo(boolean publishVideo) which internally will call onStop() method, it will stop publishing video (will send black frames to the subscriber) and will release the capturer. To stop it simply call publisher.setPublishVideo(false)

@goncalocostamendes I believe this does not turn on the camera and the system green light stays on because vonage holds onto the camera object. I don't think this truely, stops/releases the camera and could cause users to think we are still using their camera when we are really not.

This is how we do it on our internal app, and I can validate that the onStop() method is called when publisher.setPublishVideo(false) is triggered. In addition, by calling onStop() directly instead of stop publishing video there may occur some errors, since you are trying to publish video that you are no longer capturing/rendering.

can confirm this worked for me. Thanks!


Add Serial number in State/UT Table

Adding serial number/rank in state/UT table would be helpful

How would that be helpful?

Wont be helpful. Especially that we have sorting functionality. Closing.


added rounding of coordinate numbers

According to #60, we can get rounding errors in the coordinate numbers. We now restricti precision of coordinates to 7 digits.
closes #60

pre-commit is fixed in master


Extended ps

Support for listen interval and extened power save configuration from shell.

@krish2718 @rado17 @sachinthegreen

I think we need to start to document those configs more thoroughly. What does "Extended PS" stand for (I'm guessing it's some abbreviaton for power save, but I'd rather know than guess). What's listen interval related to?

Thanks, updated info related to configs.

We can combine all power save parameters to either set_power_save if applicable before/after association or set_power_save_mode if applicable only before association, we can get rid of

set_power_save_timeout
Listen interval
extended PS

Instead keep only below

set_power_save - before/after

on/off

set_power_save_mode (we could even rename this to set_power_save_preassoc to clarify the meaning)

mode
listen_interval
timeout (need to  document the meaning, currently this is too vague)

Will the below be sufficient
- keep listen_interval & timeout configuration separate (as existing now)
And pass the other command rleated to power save as below

set_power_save_mode  legacy/wmm/extended_ps  on/off

As per UMAC team the "timeout" is only preassoc stuff others can be configured at any point of time, though configured value may take effect after connection establishment.

Changes related to this PR now being handled in https://github.com/zephyrproject-rtos/zephyr/pull/57116


Move gha-oidc-tests to a separate workflow that is run repo branches only

Summary
Move gha-oidc-tests to a separate workflow.
Release Note
NONE
Documentation
NONE

I think what you proposed earlier makes the "status" check easier to configure: #113  ? wdyt?

I think having it in a separate file makes it easier to debug and configure.
I spent quite some time fighting with the expression in #113


rustfmt panics on Windows

rustfmt 0.8.3 works fine but when I run rustfmt 0.8.4, I get the following
cargo fmt
thread 'main' panicked at 'failed to emit error: operation not supported by the terminal', C:\Users\epage\.cargo\registry\src\github.com-1ecc6299db9ec823\syntex_errors-0.58.1\src\emitter.rs:1043
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: BaseThreadInitThunk

Given the error is in Syntex, this may be one that can only be solved by upgrading that dependency (and which is a bit problematic).

The odd thing is it doesn't look like the version of Syntex has changed.

Same for me. When i configure a task that calls "cargo fmt" in Visual Studio Code, i get this in the output pane:
running command> cargo fmt
error: file not found for module `core`
 --> \\?\C:\Users\Arnold\sw\rust\cargo-fmt-crash\src\main.rs:1:5
  |
1 | mod core;
  |     ^^^^
  |
  = help: name the file either core.rs or core/mod.rs inside the directory "\\\\?\\C:\\Users\\Arnold\\sw\\rust\\cargo-fmt-crash\\src"

With 2 source files.
// src/main.rs

mod core;
fn main() {
    core::run();
}

// src/core/mod.rs

pub fn run() {
    println!("Hello, world!");
}

When the file src/core/mod.rs is renamed to src/core.rs no error occures.

rustfmt 0.8.4 stopped working on Windows.
cargo.exe fmt -- --write-mode=overwrite
error: file not found for module `game`
  --> \\?\C:\Users\User\PycharmProjects\rust-belt\src\main.rs:12:5
   |
12 | mod game;
   |     ^^^^
   |
   = help: name the file either game.rs or game/mod.rs inside the directory "\\\\?\\C:\\Users\\User\\PycharmProjects\\rust-belt\\src"

And in this case the file is located in game/mod.rs.
The repository used is: https://github.com/johnthagen/rust-belt at 5bf10ea4b0e43ad8a672343f8fd40c1bb1b936e0.

If someone on Windows is using the nightly compiler, could you try using the libsyntax branch of Rustfmt please? It would be good to know if that fixes this (I suspect it will).

I checked out rustfmt and built the branch on Windows.
$ rustup --version
rustup 1.3.0 (124170c 2017-05-09)

$ rustup toolchain list
stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc

$ rustc +nightly --version
rustc 1.19.0-nightly (826d8f385 2017-05-13)

$ cargo +nightly --version
cargo 0.20.0-nightly (cf17c9f71 2017-05-09)

$ cargo +nightly run --bin rustfmt
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target\debug\rustfmt.exe`
error: process didn't exit successfully: `target\debug\rustfmt.exe` (exit code:<PHONE_NUMBER>)

It builds fine on Windows x86-64 but when I try to run I get a error. Am I missing something?

@johnthagen could you post the stacktrace for the error please?

@nrc I tried with set RUST_BACKTRACE=1 and it didn't seem to make a difference. I does pop up the following system error pop ups though in this order. I've never seen anything like this before (but I'm usually using stable on Windows). Maybe it's not even getting to execution and failing at some kind of linking step?

That suggests that it is not able to link against the compiler crates at runtime which it built against. I think you have to set some path variable so that it can find those crates, but I'm not exactly sure how to do that on Windows. I'll try and find out...
Thanks for trying this out!

No problem, feel free to ping me again if I can help out.

It sounds like you need to find the path to the dlls and add this to your PATH variable (or copy the dlls to the working directory of the exe). This path should be the same path as rustc.exe (or something quite close - maybe lib rather than bin), assuming you're not cross compiling or something.

Not cross compiling. Curious, but isn't this something rustup should take care of? For example, I tried running my Piston game on Windows nightly and it worked fine. So the difference comes from rustfmt's dependencies?

I'm not exactly sure, but I think Rustup does not handle dependencies into the compiler unless the program is a Rustup component.

@nrc Doing some more testing on Windows nightly.
TLDR; libsyntax branch appears to fix the problem, and my problems from two days ago seem to have been fixed by updating the nightly compiler.
Testing Setup
rustup toolchain list
stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc

rustc --version
rustc 1.17.0 (56124baa9 2017-04-24)

Master Branch @ 15323fc38b8deb761594daba97ba09728ac6a48e
Invalid Rust code panics rustfmt:
Input
a

fn main() {
    let x = 0;
}

Output
cargo +nightly run --bin  rustfmt -- ..\rust-test\src\main.rs --write-mode=diff
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target\debug\rustfmt.exe ..\rust-test\src\main.rs --write-mode=diff`
thread 'main' panicked at 'failed to emit error: operation not supported by the terminal', C:\Users\User\.cargo\registry\src\github.com-1ecc6299db9ec823\syntex_errors-0.58.1\src\emitter.rs:1043
stack backtrace:
   0: std::sys_common::backtrace::_print
             at C:\projects\rust\src\libstd\sys_common\backtrace.rs:94
   1: std::panicking::default_hook::{{closure}}
             at C:\projects\rust\src\libstd\panicking.rs:354
   2: std::panicking::default_hook
             at C:\projects\rust\src\libstd\panicking.rs:371
   3: std::panicking::rust_panic_with_hook
             at C:\projects\rust\src\libstd\panicking.rs:549
   4: std::panicking::begin_panic<collections::string::String>
             at C:\projects\rust\src\libstd\panicking.rs:511
   5: std::panicking::begin_panic_fmt
             at C:\projects\rust\src\libstd\panicking.rs:495
   6: syntex_errors::emitter::EmitterWriter::emit_messages_default
             at C:\Users\User\.cargo\registry\src\github.com-1ecc6299db9ec823\syntex_errors-0.58.1\src\emitter.rs:1043
   7: syntex_errors::emitter::{{impl}}::emit
             at C:\Users\User\.cargo\registry\src\github.com-1ecc6299db9ec823\syntex_errors-0.58.1\src\emitter.rs:37
   8: syntex_errors::diagnostic_builder::DiagnosticBuilder::emit
             at C:\Users\User\.cargo\registry\src\github.com-1ecc6299db9ec823\syntex_errors-0.58.1\src\diagnostic_builder.rs:98
   9: rustfmt::format_input<std::io::stdio::Stdout>
             at .\src\lib.rs:598
  10: rustfmt::run
             at .\src\lib.rs:655
  11: rustfmt::execute
             at .\src\bin\rustfmt.rs:286
  12: rustfmt::main
             at .\src\bin\rustfmt.rs:299
  13: panic_unwind::__rust_maybe_catch_panic
             at C:\projects\rust\src\libpanic_unwind\lib.rs:98
  14: std::rt::lang_start
             at C:\projects\rust\src\libstd\rt.rs:50
  15: main
  16: __scrt_common_main_seh
             at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253
  17: BaseThreadInitThunk
error: process didn't exit successfully: `target\debug\rustfmt.exe ..\rust-test\src\main.rs --write-mode=diff` (exit code: 101)

libsyntax Branch
Input
a

fn main() {
    let x = 0;
}

Output
Success!
cargo +nightly run --bin rustfmt -- --write-mode diff ..\rust-test\src\main.rs
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target\debug\rustfmt.exe --write-mode diff ..\rust-test\src\main.rs`
error: expected one of `!` or `::`, found `fn`
 --> \\?\C:\Users\User\PycharmProjects\rust-test\src\main.rs:2:1
  |
1 | a
  |  - expected one of `!` or `::` here
2 | fn main() {
  | ^^ unexpected token

error: process didn't exit successfully: `target\debug\rustfmt.exe --write-mode diff ..\rust-test\src\main.rs` (exit code: 2)

Input
mod other;  // file other.rs exists

fn main() {
let x = 0;
}

Output
Works correctly, other than some ? characters displayed on the ends of lines in terminal (characters that cmd.exe doesn't support?
cargo +nightly run --bin rustfmt -- --write-mode diff ..\rust-test\src\main.rs
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target\debug\rustfmt.exe --write-mode diff ..\rust-test\src\main.rs`
Diff in \\?\C:\Users\User\PycharmProjects\rust-test\src\main.rs at line 1:
 mod other;⏎
 ⏎
 fn main() {⏎
-let x = 0;⏎
+    let x = 0;⏎
 }⏎
error: process didn't exit successfully: `target\debug\rustfmt.exe --write-mode diff ..\rust-test\src\main.rs` (exit code: 4)

@johnthagen great, thanks for checking!


tests: inline RunVMIAndExpectLaunchWithIgnoreWarningArg

The reader of tests.RunVMIAndExpectLaunchWithIgnoreWarningArg(vmi, timeout, false) has a tough time guessing what "false" means. Using tests.RunVMIAndExpectLaunch() or tests.RunVMIAndExpectLaunchIgnoreWarnings() directly is clearer.
NONE

Perhaps the failures are from vmi not being the latest version of the objet any more?

 19:44:03: Error from server: error when creating "/home/prow/go/src/github.com/kubevirt/kubevirt/_out/manifests/release/kubevirt-cr.yaml": etcdserver: request timed out

Seems to be an environment-related failure, not do to our code that I touched.

/approve


Adding Controller Framework that is used by Controller and Provisione…

…r as common code
Adding controller basic code that is used by other  packages/repos.
assign @wlan0

The post build step for the previous commit failed: https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/post-container-object-storage-interface-api-push-images/1330951515501760512
2020/11/23 19:09:08 /home/prow/go/src/github.com/kubernetes-sigs/container-object-storage-interface-api/cloudbuild.yaml does not exist

Could you look into it please

@wlan the post trigger logic will be only for builds that need to push built images, this repo does not need one.

/lgtm


animation

Dear,
I would like to know if you could help me to know how can I appear disappear the animation when i click on like button in ionic 3?
thanks in advance!

**you can like this **
when you click button show or hide div
import {Component} from '@angular/core';
@Component({
selector: 'test',
template:  <div  *ngIf = "isShow"></div>                       <button (click)="isShow()">show or hide</button>
})
export class TestComponent {
private isShow = true;
constructor() {}
isShow() {
this.isShow = !this.isShow;
}
}

Thank you so much for your help!
It is not a  but <lottie-animation-view
[options]="lottieConfig"
[width]="300"
[height]="200"
(animCreated)="handleAnimation($event)">

@makan020518

Do you mean this?
TestComponent.ts

import { Component, Input } from '@angular/core';
@Component({
    selector: 'lottie-animation-view',
    template: `<div  *ngIf="isShow">show or hide</div>`
})

export class TestComponent {
    @Input() isShow: boolean = true;
}

TestPage.ts
import {Component} from '@angular/core';

@Component({
     template: ` <lottie-animation-view  [isShow]="isShow"></lottie-animation-view>
                        <button (click)="isShow()">show or hide</button>`
})

export class TestPage {
     private isShow = true;
     constructor() {}

     isShow() {
         this.isShow = !this.isShow;
     }
}

Thanks for your help! @makan020518
@MELAS007 You can also use *ngIf out of lottie-animation-view, and handle the toggle logic in your own component, like the first example makan020518 provided :-)

@makan020518 Thank you Very much !


[BUG] include path is ambiguous

Describe the bug
In examples, the include path is fixedmath.
https://github.com/arturbac/fixed_math/blob/v2.0.0/examples/brief-usage.cc#L5-L6
But the include path is fixed_math.
https://github.com/arturbac/fixed_math/blob/master/fixed_lib/CMakeLists.txt#L25-L30
Which is valid?
I think fixedmath is valid because common.h includes <fixedmath/detail/type_traits.h>.
https://github.com/arturbac/fixed_math/blob/v2.0.0/fixed_lib/include/fixedmath/detail/common.h#L8
Build info:

OS: Fedora Linux 40
gcc 14.2.1
libstdc++ 14.2.1

Yes, looks like You are right.
I use it by CPM dependency so I do not need to install and did not now about this.
Will asap fix it.


except ModuleNotFoundError or ImportError not working

pylexique version: 1.5.0
Python version: 3.10
Operating System: Ubuntu 22.04

Description
except ModuleNotFoundError or ImportError: is incorrect syntax in pylexique/pylexique.py.
What I Did
from pylexique import Lexique383

and I have a utils.py file in my project.
Getting error
     19 try:
---> 20     from utils import logger
     21 except ModuleNotFoundError or ImportError:
     22     from .utils import logger
ImportError: cannot import name 'logger' from 'utils' (/personal_path/utils.py)

The correct except syntax seems to be except (ModuleNotFoundError, ImportError):.

Fixed with PR #105


feat: Add Zookeeper Plugin

Proposed Change

Added a logging plugin for apache zookeeper
Tested using the file located here: https://github.com/observIQ/log-library/blob/master/library/hbase/zookeeper.log
Example Log:

LogRecord #32
ObservedTimestamp: 2022-06-16 19:53:47.538867 +0000 UTC
Timestamp: 1970-01-01 00:00:00 +0000 UTC
Severity:
Body: 2020-12-09 20:38:42,979 INFO  [main] server.ZooKeeperServer: Server environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Attributes:
     -> log.file.name: STRING(zookeeper.txt)
Trace ID:
Span ID:
Flags: 0

Checklist

[X] Changes are tested
[ ] CI has passed

@BinaryFissionGames and @dmikolay

That example parse doesn't look like it's working right; I'd expect to see the severity + timestamp parsed, and also a few attributes on the LogRecord like message and source.

I ran into this when working on ops agent. If the node is part of a cluster it'll have the myid:[0-9]+ before the severity. If it's not that field will be missing. We'll likely need a router unless we want to get extra clever with our regexes.
Here's what I did in ops-agent https://github.com/GoogleCloudPlatform/ops-agent/blob/master/apps/zookeeper.go#L76-L120

After adding a router and making regex changes, here's a new example of the plugin at work
This line in the test file:
2022-01-31 17:51:45,451 [myid:1] - INFO  [NIOWorkerThread-3:NIOServerCnxn@514] - Processing mntr command from /0:0:0:0:0:0:0:1:50284

Produced this example log:
LogRecord #0
ObservedTimestamp: 2022-06-20 19:23:17.086837 +0000 UTC
Timestamp: 2022-01-31 22:51:45.451 +0000 UTC
Severity: Info
Body: 2022-01-31 17:51:45,451 [myid:1] - INFO  [NIOWorkerThread-3:NIOServerCnxn@514] - Processing mntr command from /0:0:0:0:0:0:0:1:50284
Attributes:
     -> log.file.name: STRING(zookeeper.txt)
     -> thread: STRING(NIOWorkerThread-3)
     -> message: STRING(Processing mntr command from /0:0:0:0:0:0:0:1:50284)
     -> zookeeper_severity: STRING(INFO)
     -> source: STRING(NIOServerCnxn)
     -> line: STRING(514)
     -> timestamp: STRING(2022-01-31 17:51:45,451)
     -> myid: STRING(1)
     -> log_type: STRING(zookeeper)
Trace ID:
Span ID:
Flags: 0


Update annotation for graphql.rbi parse

Added new annotations for last graphql version:https://github.com/rmosolgo/graphql-ruby/blob/master/lib/graphql.rb
Type of Change

[ ] Add RBI for a new gem
[x] Modify RBI for an existing gem
[ ] Other:

Changes

Gem name: graphql
Gem version: 2.3.2
Gem source: https://github.com/rmosolgo/graphql-ruby/blob/v2.3.2/lib/graphql.rb#L45
Gem API doc: https://graphql-ruby.org/api-doc/2.3.2/
Tapioca version: 0.14
Sorbet version: 0.5.11268

I have signed the CLA!


2 dimensional observation spaces in gyms throw error in genomes.py line 601 - setting an array element with a sequence.

Below is a simple OpenAI environment with a 2d observation space.  If you try to run this in NEvoPy the genome class throws a ValueError: setting an array element with a sequence.  You can duplicate this by using any of the trading environments from gym-anytrading, or with the below bare-bones environment.  I think this is related to the fact that reset is returning a n dimensional observation space but that is just a guess.
import gym
from gym import spaces
import numpy as np

class xCartPoleEnv(gym.Env):
  metadata = {
    'render.modes': ['human', 'rgb_array'],
    'video.frames_per_second': 50
  }

  def __init__(self):
    self.action_space = spaces.Discrete(2)
    # ==== NOTE THE 10x2 observation space here
    self.observation_space = spaces.Box(low=-np.inf, high=np.inf, shape=(10,2), dtype=np.float32)

 def step(self, action):
    self.state = np.zeros((10, 2))
    reward = 1.0
    done = True
    return self.state, reward, done, {}

  def reset(self):
    self.state = np.zeros((10, 2))
    return self.state

  def render(self, mode='human'):
    print('render')

  def close(self):
    print('close')

nevopy-issue.zip
This is a google Colab notebook with barebones code to duplicate issue.

Ok, I know what's the issue. You're trying to feed 2D inputs to NEAT genomes, which support only 1D inputs. The environment you're using probably outputs observations with recurrent networks in mind.
That said, you've two options: used fixed-topology genomes instead, which support recurrent layers; flatten the inputs before feeding them to the genomes.
Here is the fixed version of your code (flattening the inputs):
nevopy_forex.zip
The best genome was able to achieve a reward of 1600 within 20 epochs.

Thank you for your help - I am understanding this a little better now!
On Thu, Mar 18, 2021 at 6:32 PM Gabriel Nogueira @.***>
wrote:

Closed #13 https://github.com/Talendar/nevopy/issues/13.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Talendar/nevopy/issues/13#event-4478985695, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AGJPXEGCCZXQGRMKJTJMNPTTEJ5P3ANCNFSM4ZM4SABQ
.


[Chats] The chat header and 'Back' button disappear after tapping on the input field

Environment: Android <IP_ADDRESS>, OnePlus 7
Reproducible: always
Build found: 1.0.150
Preconditions

App is opened and logged in.
User is joined to at least 1 journey.

Steps to reproduce

Choose 'ALL' rides.
Tap on any ride.
Click on 'MESSAGE TO ALL' button.
Tap on input field.

Actual result
The chat header and 'Back' button disappear after tapping on the input field.
Expected result
The chat header and 'Back' button is present at the top of the screen after tapping on the input field.
User story and test case links
User story #45
Labels to be added
"Bug" ("bug"), Priority ("pri: ")

https://user-images.githubusercontent.com/82941067/117870777-3a284e00-b2a5-11eb-8781-0dd85d408976.mp4

Bug is not reproduced on v.1.0.285 - fixed


Run in noiseless environment

As a sanity check, we should perform and end to end run setting the saved background to all 0s.

related to #67. Roughly, running by artificially lowering the PSD will achieve this.


BUG: fix swagger in dev

the latest build wasn't deploying correct in dev because of a bug that looked like a swagger config thing. something recent may have conflicted with swagger. uncomment the lines in the application.yml file and watch ECS container's logs to get a read on the error(s).

@daniel-leod, could you please describe what was the solution for this bug?

@Rhuan288souza The solution was to remove an extra indentation on the infra/dev/cf-server/application.yml file.


Remove Itanium (IA64) support

I also removed some of the VMS IA64 targets, which is redundant since the VMS stuff is being removed piecemeal, but c'est la vie.
Checklist
Thank you for your contribution. Please answer the following:

[X] I acknowledge that I am authorized to submit this code under
the terms of the Apache License
[ ] All new public APIs are documented
[ ] All new public functions have tests
[ ] All new public functions have fuzzing tests

Had to fix the conflicts after #151 was merged.  All I did was the rebase, needs another approval.


Tag for release 4.2.1

Please create a tag for whatever was released as v4.2.1 on NuGet. I assume it is commit 3e2d27a50a4ccca52fc6d151f7fa10d3e232583a.

There is still no v4.2.1 tag. Why did you close this?


ERROR: error code 1 Object Detection Nvidia Digits training custom model using custom dataset

@dusty-nv  Basically I am trying to locate objects using Dectnet with the help of your guide well it gives same error over and over again. I worked with image classification previously it didn't cause any issues. This is the detailed error
Iteration 2124 (1.68974 iter/s, 5.32627s/9 iter), loss = 14.3181
Train net output #0: loss_bbox = 1.77657 (* 2 = 3.55315 loss)
Train net output #1: loss_coverage = 35.0513 (* 1 = 35.0513 loss)
Iteration 2124, lr = 1.89462e-05
Iteration 2133 (1.68658 iter/s, 5.33624s/9 iter), loss = 8.62086
Train net output #0: loss_bbox = 1.21403 (* 2 = 2.42807 loss)
Train net output #1: loss_coverage = 7.49041 (* 1 = 7.49041 loss)
Iteration 2133, lr = 1.89239e-05
Iteration 2142 (1.68812 iter/s, 5.33138s/9 iter), loss = 70.7058
Train net output #0: loss_bbox = 1.93409 (* 2 = 3.86817 loss)
Train net output #1: loss_coverage = 6.00068 (* 1 = 6.00068 loss)
Iteration 2142, lr = 1.89017e-05
Iteration 2151 (1.69077 iter/s, 5.32302s/9 iter), loss = 52.4534
Train net output #0: loss_bbox = 0.888928 (* 2 = 1.77786 loss)
Train net output #1: loss_coverage = 8.80742 (* 1 = 8.80742 loss)
Iteration 2151, lr = 1.88795e-05
Iteration 2156, Testing net (#0)
Ignoring source layer train_data
Ignoring source layer train_label
Ignoring source layer train_transform
Checked caffe_output.log
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in type, file /home/om/hd/infra/build_opencv/opencv/modules/core/src/matrix.cpp, line 2034
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in type, file /home/om/hd/infra/build_opencv/opencv/modules/core/src/matrix.cpp, line 2034
Traceback (most recent call last):
File "/home/userprofile/caffe/python/caffe/layers/detectnet/clustering.py", line 133, in forward
bbox = cluster(self, data0, bottom[1].data)
File "/home/userprofile/caffe/python/caffe/layers/detectnet/clustering.py", line 227, in cluster
boxes_cur_image = vote_boxes(propose_boxes, propose_cvgs, mask, self)
File "/home/userprofile/caffe/python/caffe/layers/detectnet/clustering.py", line 193, in vote_boxes
self.gridbox_rect_eps)
cv2.error: /home/om/hd/infra/build_opencv/opencv/modules/core/src/matrix.cpp:2034: error: (-213) Unknown/unsupported array type in function type
I applied Batch size: 1 and Batch accumulation: 4
I tried to look it up on google couldn't find any relevant results which I could follow. Could please take a look? and it would be great if you could guide me through this. thanks and cheers

ssue fixed I was having 2 python versions one was 2.7 and second was 3.0 and both the python versions were being called for same file or different file( not sure) and both the python version were having different python-opencv version so whenever a default version of python was called it was expecting any one pyhton-opencv version call while there were 2 so they were clashing. So just make sure you have single python version and single opencv version which is set to default automatically or manually. Doesn't matter if you have 2 python version but there should be one python-opencv version which could be used by both python versions. Also before making any changes just refer your Makefile.config or Makefile.config.example from where actual build directory was generated. After removing pyhton version or pyhton-opencv version you don't need to reinstall everything just continue with your work. But just check both python versions are calling specific/same pyhton-opencv version. or you could check pyhton version is having pyhton-opencv version.


Condition being disregarded leading to wrong output

Describe the bug
A condition based upon the contents of a global byte array (initially within an undefined memory block, but recently joined with its predecessor to make one contiguous area, as the array spanned both areas when loaded into Ghidra) is being treated as having a value of 0 when interpreted by the decompiler, even if the mutability is changed from normal to volatile - normal should work.  This is leading to incorrect C code.  I.e. instead of
      if (false) {
         aVkStates_2_1001c128[vk] = aVkStates_2_1001c128[vk] | KEYSTATE_Held;
      }

or nothing (if option Eliminate unreachable code is on), we should see
      if (g_aVkStates_1_100197f0[vk] < 0) {
         aVkStates_2_1001c128[vk] = aVkStates_2_1001c128[vk] | KEYSTATE_Held;
      }

(edited the condition to be <)
the assembly that is corresponding to if (false) { is
                             LAB_10007c99                                    XREF[2]:     10007c5f(j), 10007c7c(j)
    10007c99 8b 45 fc     020           MOV        EAX,dword ptr [EBP + vk]
    10007c9c 33 c9        020           XOR        ECX,ECX
    10007c9e 8a 88 f0     020           MOV        CL,byte ptr [EAX + aVkStates_1_100197f0]
             97 01 10
    10007ca4 85 c9        020           TEST       ECX,ECX
    10007ca6 0f 8d 17     020           JGE        LAB_10007cc3
             00 00 00

To Reproduce
Steps to reproduce the behavior:

Load in the enclosed function (from the Decompile:Panels Debug Function Decompilation menu)
Search down the decompiled code to find the output above
Compare the assembly with the C code and you'll see the condition is missing

Expected behavior
The enclosing guard condition should not be deemed superfluous and should appear in the reproduced C code.
Screenshots
N/A
Attachments
dd25hook_FUN_10007bb7.zip
Environment (please complete the following information):

OS: Windows 11
Java Version: 17.0,3.1
Ghidra Version: 11.1.DEV
Ghidra Origin: locally built

Additional context
This is a 32-bit DLL compiled with MSVC 4.1/4.2 compiler.

This could be a red herring, but I'm unsure.  Because of what the TEST/JGE is guarding, I can't believe it to be unreachable.  If it were, surely the compiler would have eliminated it?

The decompiler's analysis looks valid to me.  The TEST / JGE branches if ECX is greater than or equal to zero, which is always true because the XOR ECX,ECX clears the sign bit and the MOV CL,byte ptr [...] doesn't alter it.

@caheckman I came to the same conclusion, but .... I wonder if there's some undocumented thing going on that, back in the day, treated that prticular MOV opcode as a signed one, or that the particular segment definition ensured the TEST just used CL or something else wierd?  Because of the assembly and what it's doing, I can't believe the original developers would have missed that, and surely the compiler would've removed that code entirely during optimisation if it was unreachable???  What do you think?

Closing because there doesn't seem to be a problem with Ghidra.  The conversation can continue in the "closed" state.


Missing bootstrap css

http://<IP_ADDRESS>:5000/static/css/bootstrap.min.css is missing,
it looks like it isn't in the git repo but is linked to from the main page:

If you want to install lwp from git you should execute fab build_assets to download and build minified js. You also need a recent version of nodejs installed


Video v1b2

Regenerates GAPIC with the latest code generator to fix bug where overview page is blank

Unfortunately, this branch is not producing the desired output for me:
$ cat jsondoc/google/cloud/videointelligence.json
{"id":"google/cloud/videointelligence","name":"Videointelligence","title":["Google","Cloud","Videointelligence"],"description":"","source":"google-cloud-video_intelligence/lib/google/cloud/video_intelligence/v1beta1/doc/google/cloud/videointelligence/v1beta1/video_intelligence.rb#L17","resources":[],"examples":[],"methods":[]}

It appears that the docs are being shadowed by one or more instances of the module that are undocumented. I will attempt to debug this today and report back.

The current culprit is the undocumented declaration of module Videointelligence in lib/google/cloud/video_intelligence/v1beta1/doc/google/cloud/videointelligence/v1beta1/video_intelligence.rb. Because this instance is processed last by YARD and the gcloud-jsondoc tool, it overwrites all previous output for the module. As you have probably noticed by now, the output of YARD and the gcloud-jsondoc is NOT mapped to the filepaths of the inputs. It reduces all inputs to the same output paths, which are simply the namespace paths.
I can think of several solutions:

Duplicate the docs across all declarations of the module or class in YARD's path(s).
Modify the gcloud-jsondoc tool to not overwrite output with a non-empty description with output with an empty description.
Completely change the gcloud-jsondoc tool to generate output paths based on input files, not namespaces.

The last option would offer much more control and hopefully solve any issues related to documenting  multiple versions in the same package. However, I am somewhat doubtful it would be compatible with the Angular app, and in any case it would be a lot of work.

I can think of several solutions:

Duplicate the docs across all declarations of the module or class in YARD's path(s).

Unfortunately, that's not possible because of fundamental restrictions in how the GAPIC code generator handles versioning. We can copy overview.rb on a per-version basis, but we can't insert v1beta2 docs into the v1beta1/video_intelligence.rb file, and we need the method sample to be for v1beta2. :(
(That's why I introduced overview.rb instead of reusing doc/.../video_intelligence.rb.)

Modify the gcloud-jsondoc tool to not overwrite output with a non-empty description using output with an empty description.

That would be great.

Completely change the gcloud-jsondoc tool to generate output paths based on input file paths, not namespaces.

That would also be great, but if the cost is likely to be high, #2 seems like the best option.

I'll work on solution 2 today.

We pushed an update to the gcloud-jsondoc tool that simply excludes the blank output from the module Google::Cloud::Videointelligence, preventing it from overwriting the desired output from Google::Cloud::VideoIntelligence (capital "I") in the file jsondoc/google/cloud/videointelligence.json. In the longer term, we should pursue changing  Videointelligence to VideoIntelligence.

Thanks, @quartzmo. Tracking changes to the proto namespace here: https://github.com/googleapis/artman/issues/288.

@quartzmo Once the docs build successfully, could you create a new release and modify the README to mark this client as beta?

Yes, will do.


Canonicalize path to waf file

This ensures that the command will always call the correct script
Reference: https://doc.rust-lang.org/1.41.0/std/process/struct.Command.html#platform-specific-behavior

Thanks!


Unable to run Unit Tests

I'm trying to run a unit tests with no luck, after that I looked to the project.json seems there is a lot of changes in unit tests such as "testRunner": "xunit" it's long time for me to use the unit tests. i don't know if there's a way to run them, what I tried are dnx test and dotnet test with no luck
FYI when I ran the latest command i got this error Could not resolve coreclr path

Does running build succeed?

 What does running build.cmd from the repo root look like?

And remember to run git clean -xdf first.

I already restore the dependencies of the test project, but I want to know when shall i execute build.cmd?
Now I 'll follow these steps:

git clean -xdf
Remove dnx packages
Remove dnu cache
Run ```build.cmd'``

and I will give you the result

That sounds about right. FYI - all our repos now use dotnet-cli to build. Consequently it'll use %UserProfile%/.nuget/packages as the packages dir on your machine and %LocalAppData%/nuget/v3-cache as the HTTP cache.

Fetching the latest source updates and running the build.cmd solve the issue with dotnet test, i think dnx test is gone Am i right?
Please let me know when shall i run build.cmd because I suffered many times from such things

Thanks @pranavkm

Another related question, how can i run the tests in vs (netstandardapp1.5), because i'm getting an error

You can't run them in VS until the new tooling comes out.

I expect that :smile: , thanks a lot