Custom comparator bug with SortSlice(), and SortString()

Error Message
panic: runtime error: index out of range [2] with length 2

goroutine 1 [running]:
main.main.func2(0x102d23a, 0x1066eb0)
        .../test.go:29 +0x67
github.com/gonyyi/gosl.SortStrings({0xc000112ee0, 0x3, 0x2}, 0xc000112ea0)
        ...github.com/gonyyi/gosl@v0.5.2/sort.go:43 +0x5e
main.main()
        .../test.go:28 +0x2b9

Affected
This error is triggered when two conditions are met.

Two (2) or less items in the slice
And uses comparator (func(idx1, idx2 int) bool)

This bug affects sort functions below.

SortSlice()
SortString()

Cuase
https://github.com/gonyyi/gosl/blob/7f3f8cc6802ef1755fb9f001b86c1ae6845175e7/sort.go#L14-L18
https://github.com/gonyyi/gosl/blob/7f3f8cc6802ef1755fb9f001b86c1ae6845175e7/sort.go#L41-L45
When a comparator is given, it example the comparator by examing it to avoid a bug.
However, this became a bug itself adversally..

Remove SortSlice() -- SortAny() will replace SortSlice(),.

See #20

https://github.com/gonyyi/gosl/commit/58f36b06475354754801a01304395e2170aa6758
Also removed SortSlice.


Bring more packages to the package manager

Mirror some OSS projects from https://www.scottklement.com/oss.html to GitHub/BitBucket for use with the package manager.
Or please add any of your own.

FTP API done: https://github.com/RelicPackages/FTPAPI

HTTP API done: https://github.com/RelicPackages/HTTPAPI

Bring packages from here: http://www.easy400.net/easy400p/main.html?xmain=2&xlng=en

http://www.tools400.de/English/Freeware/freeware.html

http://www.jcrcmds.com/#top_tag


Add feature query to detect support for aspect-ratio

I think the code is good, but there is one important thing when using it, and that's for me also why I'm not entirely sure if this is good to implement at this point.
When a browser has no support, it will add the before pseudo element. For the supported browsers it won't do this.
In practice this would mean that the content within for a non supported browser, has to be positioned absolute. But for the supported browsers it doesn't.
Aspect Ratio also has functionality to grew (from what I saw) when the content is bigger than the aspect ratio, with the non-supported browsers this never works because the content is absolute.
So I see some issues with this. Just raising this, as i'm curious how to solve it.

I think the code is good, but there is one important thing when using it, and that's for me also why I'm not entirely sure if this is good to implement at this point.
When a browser has no support, it will add the before pseudo element. For the supported browsers it won't do this.
In practice this would mean that the content within for a non supported browser, has to be positioned absolute. But for the supported browsers it doesn't.
Aspect Ratio also has functionality to grew (from what I saw) when the content is bigger than the aspect ratio, with the non-supported browsers this never works because the content is absolute.
So I see some issues with this. Just raising this, as i'm curious how to solve it.

Good point! Will do some more investigation!

Good point! Will do some more investigation!


fix(server): rework server package file inclusion

The run of npm pack was not picking up ./out/** subfolders. The files property has now been changed to include the entire folder.
Fixes #558.

@SocketSecurity ignore<EMAIL_ADDRESS>


Feature Request: usage with nvim-notify

It could be awesome to have a notification when adding a package or update it, through https://github.com/rcarriga/nvim-notify.
As far as I understand, you can use vim.notify to handle it.

I think this would better be served with a pre-post hook of some sort, because at the same time it will spawn a new notification for each plugin, and if you end up installing or syncing (or what have you) like 20 plugins, you'll have a lot of clout on the window and loose information.

I'm working on improving the output messages. I can use vim.notify since that's part of neovim since 0.5. That rework probably also includes defaulting the verbose option to false, meaning messages like Paq [n/n] (up-to-date) foo won't show up, hopefully reducing the "spamminess".

I think this would better be served with a pre-post hook of some sort for someone to wire it up themselves.

Yes, that's how vim.notify works. If a users wants to use the linked plugin they can do that, otherwise the default handler will just print a message, same as it has always worked.
I should note that the linked repo has a bunch of extra features that wouldn't be supported because they're not part of the vim.notify spec.
<rant>
that plugin assumes gui colors, dark backgrounds, and uses unicode private use area characters (nerdfonts probably) by default, which is just… not great, and makes me even more averse to supporting it.
</rant>

Paq now has support vim.notify.
It also defaults to verbose=false. so trivial messages like (up-to-date) foo won't show up unless the user opts in.


Relicense to Apache 2.0

The previous license of this code was BSD, which is a broadly
permissive license not dissimilar to Apache 2.0. This change
is mainly for consistency. It also grants a patent license,
in case it matters.

Pull Request Test Coverage Report for Build 433

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 78.314%

Totals

Change from base Build 431:
0.0%

Covered Lines:
1290

Relevant Lines:
1578

💛  - Coveralls


Raindrop.io update - adds Detail view

Description
Adds Detail view to Raindrop.io extension.
Screencast
Here's an example on this ticket: https://github.com/raycast/extensions/issues/2203#issuecomment-1179096742
Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Hi @danielsequeira !
Ah yes, didn't noticed about this change!
Just added screenshots and also changelog!
BTW, it would be great to implement something (probably same @raycastbot) that let creator know their extensions are outdated (missing metadata, or similar).

Hi @lardissone,
Thank you so much for the changes, I just did another check and suggested two more tiny changes. After that we should be good to merge it.
Also thank you for the suggestion, definitely something that could help a lot. I will share it internally.


Adding basic JSCS rules

Can this also rely on the node-style-guide preset? I believe it is maintained by jscs and in their core, right?

@phated Yeah, sorry. Submitted "node-style-guide" preset as #2. I was just using the slimmed down version of the rules since I think most of the other rules conflicted with existing ESLint rules (or XO rules).
Feel free to merge one, and close the other. Or close both. Or whatever.


⚠ Bofrost.es has degraded performance

In 2dc6159, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1622 ms

Resolved: Bofrost.es performance has improved in bc177f2 after 6 minutes.


Store original las/welly curve in Trace object

Look at the pull request before merging, please, comment on it, and tell me how you think we can improve your pull request w/ this new feature.

Apply changes


[don't merge] Revert "Make the new bridge the default"

Testing if tests change

@facebook-github-bot shípit

Got me scared, Felix :)

I reverted everything that could be involved

fixed in #8539


Simplify symbol resolution work for BTL files

Because BTL files support reading from an offset into the file, symbol resolution gets complicated since it needs process state information.
This complicated code actually doesn't work in the case where the cpu time is spent inside the process of interest but is in kernel code because our support code which logs symbolic information in the sidecar database can only do so for user-mode modules.
Also additional testing revealed that when we're looking for symbolic resolution in BTL files, i.e. we're doing an investigation that'll need stacks it is often time acceptable that we iterate the whole file in search for process state information. However, we don't want to lose the focusing on a specific part of the file (one of the key benefits of BTL) so the compromise is that we iterate the whole file (in search for info needed for symbolic resolution) but only do analysis of events within the time range requested.

cc @LakshanF @brianrob


loading model on kaggle 2xT4

I am getting suddenly the fsspec version related error "TypeError: expected string or bytes-like object".I have previously installed and trained mistral models on kaggle. But currently when loading the model , I am getting this error

@ml-maddi Did you manage to use our new Kaggle install method? Our notebooks got updated, so maybe that's the issue: https://www.kaggle.com/code/danielhanchen/kaggle-mistral-7b-unsloth-notebook
Essentially change the install instructions to:
%%capture
!pip install -U xformers --index-url https://download.pytorch.org/whl/cu121
!pip install "unsloth[kaggle-new] @ git+https://github.com/unslothai/unsloth.git"

import os
os.environ["WANDB_DISABLED"] = "true"

yeah, I used that specifically. The issue is with the "datasets" library version, the latest version 2.18.0 seems to have issue with fsspec, downgrading the version to 2.17.1 got it working again.

@ml-maddi OOH interesting! I'll investigate the datasets issue!


Adding eosDAC

Website: https://eosdac.io
Token Address listed here: https://eosdac.io/tokens/
Github: https://github.com/eosdac/

Hello. Is there something we can do to request a review? Thank you!

@lukestokes
Please obtain a 'NEUTRAL' or higher reputation on Etherscan by adding an official link there
https://etherscan.io/token/0x7e9e431a0B8c4D532C745B1043c7FA29a48D4fBa

Closing this due to inactivity, feel free to reopen. In addition we implemented a new feature called watchAsset I recommend you to use it, with this you could suggest your users to track your token.


Switch ingredients to english?

Avoids "sallad" vs "salad" confusion and would make the language in the labs more consistent

fixat genom Oskars pull request.


Pagination buttons are empty

Overview of the problem
Using the supplied example code for tables, the pagination  next and previous buttons are empty.  They work but no icon is displayed
Oruga version: [X.X.X]
Vuejs version: [X.X.X]
OS/Browser:
Description

Steps to reproduce

Expected behavior

Actual behavior

Are you importing fontawesome or MDI ?

Just did and it fixed the problem.
Thanks for replying so quickly.
-George Pipkin
On Thu, Oct 29, 2020 at 11:42 AM Walter Tommasi<EMAIL_ADDRESS>wrote:

Are you importing fontawesome or MDI ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/oruga-ui/oruga/issues/59#issuecomment-718838929, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AACOUFQALMXF4GCZT7LFANDSNGEN7ANCNFSM4TD4Q5UQ
.


create new scripts and add new test

What does this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

What are the relevant tickets?

Screenshots

Questions

Checklist

[ ] I added the necessary documentation, if appropriate.
[ ] I added tests to prove that my fix is effective or my feature works.
[ ] I reviewed existing Pull Requests before submitting mine.

not longer needed


fix: Tests

Closes #
Description of the changes

Checklist

[x] I didn't over-scope my PR
[x] My PR title matches the commit convention
[x] I did not include breaking changes
[x] I made my own code-review before requesting one

I included unit tests that cover my changes

[x] 👍 yes
[ ] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help

I added/updated the documentation about my changes

[ ] 📜 README.md
[ ] 📕 docs/*.md
[ ] 📓 docs.lenra.io
[x] 🙅 no documentation needed

Technical highlight/advice

:tada: This PR is included in version 1.0.0-alpha.4 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Draft v10 package template

Here's an initial take on a v10 package template using a similar setup as we did for the v8.
There's still work to do around testing with nuget outputs and including C# code but this is a good start.

Hi couple of changes, not sure - can just add them to the branch?
. template.json for Package2 needs its default ids updating.
e.g
  "sourceName": "UmbracoPackage.1",
  "defaultName": "UmbracoPackage1",

become
  "sourceName": "UmbracoPackage.2",
  "defaultName": "UmbracoPackage2",


Output summary at the end of test run

When you run multiple test suites with a lot of tests, you sometimes have one test failure only. But finding that can take a lot of time as it requires diving through 5k lines of history output.
It would be nice to have a summary at the end of the test run. This should allow to quickly jump to any failed test.

Gather test suite name and test case name in IncError(), save info in a global wave
Output summary in Test End hook

What do you think about the following output?
  Leaving test suite "Proc0"
  Test finished with 2 errors
    in Assertion "CHECK_EQUAL_VAR(a, b)" failed in line 25, procedure "Proc0"
    in Assertion "CHECK_EQUAL_VAR(a, b)" failed in line 32, procedure "Proc0"
  End of test "Unnamed"

@Garados007 Suppose one has multiple test suites where in each of them a test case fails. How can I see in your above example which test case failed in which test suite? I don't think the module name is important for the test case.

At the moment I am not doing much fancy magic behind the scene. The first part (Assertion "CHECK_EQUAL_VAR(a, b)" failed in line 25, procedure "Proc0") is just a part of the output for every assertion. This contains, the assertion method, the line number and the procedure file. The second part function mymodule#FailedTest is the name of the test case which consists of the module and method name.
The output might be misleading but its the same output that will be printed for every assertion if they occur. I just reuse it and keep it for the end of the test run.
I can also reorganize the information like so if you want:
Assertion "CHECK_EQUAL_VAR(a, b)" failed in mymodule#FailedTest (Proc0.ipf, line 25)


Feature/update libraries and agp

Updates libraries to their latest versions
Updates AGP to 8.1.4
Updates Kotlin to 1.9.20
Updates Gradle to 8.4
Fixed some warnings in the code & updated README file.

updated ktlint rules for compose & ran spotless with the new ruleset.

updated ktlint rules for compose & ran spotless with the new ruleset.

LGTM! 🚢


Fix documentation for WaveBox

In particular, there was a place where I copied and pasted the documentation for Dekamoji, so I fixed it.

Codecov Report
All modified lines are covered by tests :white_check_mark:
:loudspeaker: Thoughts on this report? Let us know!.


Keep getting 401 Unauthorized

Hi,
First, thank you for this gem.
I tried to make it work in my app, with no chance. I have an old User model working with Devise and classical database_authenticable. Now I need a new type of user, SupplierUser, which I need them to use the kind of authentication this gem provide. But I keep getting 401 Unauthorized with this model.
I tried the debug, but at one point in Warden, I don't understand what is happening. Everything (Rails, Devise, etc) is up to date. I don't do anything fancy with Devise, very classical User.
Here is the relevant part of the code in routes.rb
  root :to => redirect('/users/sign_in')
  devise_for :users
  get '/users/sign_out' => 'devise/sessions#destroy'
  resources :users, :controller => "users"

  devise_for :supplier_users, controllers: { sessions: "devise/passwordless/sessions" }
  devise_scope :supplier_user do
    get "/supplier_users/magic_link",
      to: "devise/passwordless/magic_links#show",
      as: "supplier_users_magic_link"
  end
  resources :supplier_users

The devise views are scoped.
Sorry for the lack of information, I really don't know what else I could give.
Thank you for your help :-)

Hi, and did you run the install generator that adds the magic link and
sessions controllers?
On Tue, Dec 7, 2021 at 12:01 PM Teddy Valente @.***>
wrote:

Hi,
First, thank you for this gem.
I tried to make it work in my app, with no chance. I have an old User
model working with Devise and classical database_authenticable. Now I need
a new type of user, SupplierUser, which I need them to use the kind of
authentication this gem provide. But I keep getting 401 Unauthorized with
this model.
I tried the debug, but at one point in Warden, I don't understand what is
happening. Everything (Rails, Devise, etc) is up to date. I don't do
anything fancy with Devise, very classical User.
Here is the relevant part of the code in routes.rb
root :to => redirect('/users/sign_in')
devise_for :users
get '/users/sign_out' => 'devise/sessions#destroy'
resources :users, :controller => "users"
devise_for :supplier_users, controllers: { sessions: "devise/passwordless/sessions" }
devise_scope :supplier_user do
get "/supplier_users/magic_link",
to: "devise/passwordless/magic_links#show",
as: "supplier_users_magic_link"
end
resources :supplier_users
The devise views are scoped.
Sorry for the lack of information, I really don't know what else I could
give.
Thank you for your help :-)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/abevoelker/devise-passwordless/issues/12, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABFO474JBHLWMRQ2Z3S3BDUPZDW5ANCNFSM5JR3UKEQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Thank you for your answer. This morning, with clear eyes and full heart, I find what the problem was. Idid everything good, the gem's doc is pretty clear.
My problem was with Devise configuration. The authentication_keys was set on :username. Obviously, with this gem, you need to set on :email. It can be set per model, so you don't have to change your existing model, like devise :magic_link_authenticatable, :rememberable, authentication_keys: [:email]

Ah, interesting - thank you for sharing the solution to your problem. I confess I had forgotten that config option until now.
Another option for you, if you wanted to keep your :username param to allow magic links generated via username, I think you could override find_for_magic_link_authentication in your model to do a username lookup, in the same way this Devise wiki guide suggests overriding find_for_database_authentication for the database authenticatable strategy.
Apologies if the 401 Unauthorized made it difficult for you to debug. I've run into the same problem, and as you discovered it's being raised from deep within Warden and I'm not sure how to coax it into providing a better error than that at the moment.

Thank you for your feedback. I thought of override this method. But in my use case, and more generally for this type of authentication mecanism, I think it is better to use email as authentication key as it is a lot easier for the user to remind his email address.
Also, I think the 401 coming from Warden is fine. I wanted to put my "solution" here for other developer who might have the same problem.
Again, thank you for this gem :-)


Training example using "ParallelFusedMLP" and "ParallelMHA" with 8cards.

Is tensor parallelism being considered for this project? Any examples of training?
Expect the combination of ZeroRedundancyOptimizer to work.

We have some internal training runs that use those for tensor parallel. You can also use Megatron-LM if you want tensor parallel. And PyTorch 2.0 has an experimental implementation of tensor parallel now.

We have some internal training runs that use those for tensor parallel. We have a test showing how to construct a GPT model with tensor parallel and perform a forward and backward pass. It doesn't have the full training code though.
You can use Megatron-LM if you want tensor parallel. And PyTorch 2.0 has an experimental implementation of tensor parallel now.

thanks, it's helpful!


Seamless authentication via Telegram

Hi guys! I would like to know, is it possible to use requestUrlAuth  method for realization Telegram seamless Authenticate via
node-telegram-bot-api ?

i believe you're looking for this
https://core.telegram.org/bots/api#loginurl


Filter markdown in push notifications

Is your feature request related to a problem? Please describe.
Any markdown that is included in a push notification will be displayed raw on clients.
So any link (or any other markdown feature) like [link text](https://stacker.news/) will be shown as is.
Describe the solution you'd like
Filter markdown in push notifications
Describe alternatives you've considered
Additional context

Project which had to solve the same problem: https://github.com/RocketChat/Rocket.Chat/pull/9995/files#diff-3b563da47bb14ac6102c649119eb288b072288a630dcf06acdfcbd1243625db7
we could also parse markdown to properly include images in push notifications

just fyi: we do this already for search and SEO description tags


Move /tests/ dir to /oauth2client/tests/

Moving /tests/ directory to /oauth2client/tests/.
Resolved issue #454
Updated version of PR #468
Used git mv tests/ oauth2client/tests/ in one commit, then updated file references in the other commit.

Whenever I'm in doubt, I look towards other packages. It seems like neither requests nor urllib3 package their tests inside their modules. Why should we do it here?

Sorry, let me take that comment over to the issue.

I'm fine with it either way, I'm just trying to help out and clean up open PRs.  Personally, I think it may be cleaner to keep the tests separate.


Using decode_batch for multiple rounds

Hello,
As written in the documentation (https://pymatching.readthedocs.io/en/latest/api.html#pymatching.matching.Matching.decode_batch), you can use the decode_batch function in pymatching by providing the number of shots and the syndrome as input. However, for each shot, you need to measure the syndrome multiple times, as many as the distance (for example, for distance-3, you measure the syndrome 3 times or 3*d times). Is it possible to give multiple rounds of measurement results of the syndromes as input to the decoder? If yes, how?
Here is an example:
These are the results from the 1st shot:
x_syndrome_1st_round = [0, 0, 0, 1, 1, 1]
x_syndrome_2nd_round = [1, 1, 0, 1, 1, 1]
x_syndrome_3rd_round = [1, 1, 1, 0, 1, 0]
For the 2nd shot:
x_syndrome_1st_round = [1, 0, 0, 1, 1, 1]
x_syndrome_2nd_round = [1, 0, 0, 1, 1, 1]
x_syndrome_3rd_round = [1, 0, 0, 0, 1, 0], and so on...
Then, the list can be:
decoded = matching.decode_batch(
  np.array(
     [[[0, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0]],[[1, 0, 0, 1, 1, 1], [1, 0, 0, 1, 1, 1], [1, 0, 0, 0, 1, 0]]])
)

Am I correct? If not, how can I decode multiple rounds of syndrome measurements in pymatching?

If you want to use a 2D array to store multiple rounds of syndrome data then I'd recommend iterating over the shots and using matching.decode for each shot, instead of matching.decode_batch for the batch of shots. matching.decode_batch assumes that each shot is a 1D array (i.e. a row of the shots array) and does not support each shot being a 2D array.
Alternatively, you can flatten each shot into a 1D array. E.g. if each shot is a 2D array syndrome of dimensions (num_stabilisers, num_rounds) then matching.decode(syndrome) is completely equivalent to matching.decode(syndrome.flatten(order="F")). So you can use matching.decode_batch(shots) where shots[i,:] is the syndrome syndrome.flatten(order="F") of shot i.
But the 2D syndrome functionality was added to an early version of pymatching as a helper method for handling simple phenomenological noise, and before stim was released. I'd recommend using stim to construct a circuit of multiple rounds for the code you're simulating (you can use it to simulate phenomenological noise but also much more complex noise models). When you sample from stim it will output a batch of shots as a 2D array, where each row is a syndrome of detector measurements across all rounds of the circuit. You can then use pymatching.Matching.decode_batch to decode this batch of syndrome data.


Companion is always at [medium] in about:performance in Firefox

Thank you for noticing this.
I made a quick check and it is caused by setInterval running in the background page.
Companion is polling IPFS API every 3 seconds to refresh the peer count displayed on browser action badge and detect IPFS node going online/offline. IIRC we use setInterval instead of browser.alarms because Chrome hardcoded min interval to be 1 minute.
We could increase IPFS API poll interval but it would impact UX around online/offline detection.
Potential mitigation:

Remove peer count from browser badge to hide the fact we refresh state
Pick bigger polling interval (10s? 30s?) in 'idle' mode (when browser action UI is hidden)
Poll API every 2s when browser action UI is visible

Thoughts?

What is the use-case for seeing the peer count? What decisions are
companion users making that is based on seeing that number change?
On Sun, May 19, 2019 at 1:27 PM Marcin Rataj<EMAIL_ADDRESS>wrote:

Thank you for noticing this.
I made a quick check and it is caused by setInterval running in the
background page.
Companion is polling IPFS API every 3 seconds to refresh the peer count
displayed on browser action badge and detect IPFS node going
online/offline. IIRC we use setInterval instead of browser.alarms
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/alarms
because Chrome hardcoded min interval to be 1 minute.
We could increase IPFS API poll interval but it would impact UX around
online/offline detection.
Potential mitigation:

Remove peer count from browser badge to hide the fact we refresh
state
Pick bigger polling interval (10s? 30s?) in 'idle' mode (when
browser action UI is hidden)
Poll API every 2s when browser action UI is visible

Thoughts?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ipfs-shipyard/ipfs-companion/issues/721?email_source=notifications&email_token=AAAMHNZHKMCW6E2U6YKD7Q3PWGZ35A5CNFSM4HNYQCNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVXJ5YI#issuecomment-493788897,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAMHNY5ENIQTTHPG45DYSDPWGZ35ANCNFSM4HNYQCNA
.

It is an indicator of connectivity health:

0 - no peers, means we are still connecting to the swarm or that there is a network issue
> 0 - number of connected peers, mostly a vanity number
(the goal of adding it to browser action badge was to highlight participation in p2p network)
-1  - internal value (never shown in UI) indicating API is offline (ipfs icon and UI is greyed out)

User does not do much with this, but IPFS Companion makes various decisions based on peering state. Peer count >= 0 means API is online, which in turn enables features that require access to API (quick upload) or Gateway ("Automatic Mode" enables/disables redirect to local node based on connectivity state).

In that case, the mitigation sounds good. The decision state is "connected"
or not, and that's conveyed in a reasonable enough way even at every 30s
(for now).
When the stack as a whole is faster, maybe there's argument for
near-real-time updates... but at that point we'll likely have a better way
of getting this information than polling.
I like the idea of using peer cont to hint at participation level for good
feels, but it doesn't trump battery life.
Network requests on an interval are basically a "perfect storm" wrt battery
consumption.  Do we not have any other options?
A couple of other thoughts, but maybe pre-optimizing:

Trigger peer update when any part of Companion is interacted with, or we
detect webui being opened, etc? Maybe would reduce the (already small, even
with the mitigation) chance that connection state is out of sync.

Instead of our own timer, use idle interval callbacks so that we never
eat battery without reason:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/idle
.

On Mon, May 20, 2019 at 3:10 PM Marcin Rataj<EMAIL_ADDRESS>wrote:

It is an indicator of connectivity health:

0 - no peers, means we are still connecting to the swarm or that
there is a network issue

0 - number of connected peers, mostly a vanity number
(the goal of adding it to browser action badge was to highlight
participation in p2p network)

-1 - internal value (never shown in UI) indicating API is offline
(ipfs icon and UI is greyed out)

User does not do much with this, but IPFS Companion makes various
decisions based on peering state. Peer count >= 0 means API is online,
which in turn enables features that require access to API (quick upload) or
Gateway ("Automatic Mode" enables/disables redirect to local node based on
connectivity state).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ipfs-shipyard/ipfs-companion/issues/721?email_source=notifications&email_token=AAAMHN7FR5ICEA5QSHN4FHTPWMOVLA5CNFSM4HNYQCNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV2GWAA#issuecomment-494168832,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAMHNYXY5D3672XCGKDKN3PWMOVLANCNFSM4HNYQCNA
.

I've been thinking about "triggering peer update when any part of Companion is interacted with" and we may be able to make it pretty "lazy":

remove peer count from badge

(ux decision)
add unique icons for -1 and 0 states
OR
repurpose browser action icon to indicate if current page is hosted on IPFS

keep a timestamp of the last peer count check
poll 'close realtime' (eg. every 3s) when browser action or other part of UI that requires API is open
stop polling when mentioned UIs are hidden (or do it once a minute+ via alarm)
use requests for IPFS resources as hints to do the check

when IPFS resource is detected in webRequest.onBeforeRequest check if timestamp of last refresh is within some threshold before deciding if request should be redirected to local gateway

if peer count value is too old, perform peer count update

respect IdleState from browser.idle (we already run update only in active state, but we could decrease default idle threshold from 60s to a lower value)

Nice to have: Some instrumentation so we can check different before/after these changes.

Here because I just hit the same issue.

Of note, I'm seeing this with "all ipfs integrations" set to off.
I'm a big plus 1 of removing the peer count from the badge. I think we should generally reduce the prominence of how many peers you are connected to; it's doesn't tell you if you're going to have a good time finding the content you want. Zero peers means you are going to have a bad time, so we could special case that, but... for companion, I think it's way more interesting to focus the badge on "hey! this page comes in IPFS flavour", when we lazily check for a dnslink after letting the http request have a go... #710

Related: Firefox 76 will ship with a new profiler marker to include information about the webRequest blocking handlers registered by extensions (Bug 1625006).


Properly handle the Promise returned by .play()

Background
In modern browsers, the HTMLMediaElement.play() method is not always synchronous. According to MDN:

The HTMLMediaElement.play() method attempts to begin playback of the media and returns a Promise which is fulfilled when the playback has been successfully started, and which is rejected if playback fails to begin for any reason (such as permission issues or other problems).

It seems that "permission issues" cover mobile/recent desktop browser decisions to ignore autoplay. Google has published an article about this here which points to this example page. Running that example on an iPhone indeed reports a permissions issue in the output.
In fact, the "permissions" issue for autoplay is no longer limited to mobile contexts. Safari now disables autoplay functionality on the Desktop by default as well. Opening Google's example page in Safari shows this error:

Attempting to play automatically...
The play() Promise rejected!
Use the Play button instead.
{"code":35,"name":"NotAllowedError","message":"The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.","line":124,"column":47,"sourceURL":"https://googlechrome.github.io/samples/play-return-promise/"}

Google has also published a document that goes into greater detail about the causes of this. Of particular interest is this note:

Note: Calling video.pause() isn't the only way to interrupt a video. You can entirely reset the video playback state, including the buffer, with video.load() and video.src = ''.

(Note that the same applies for audio.)
In APlayer
Currently, APlayer does not attempt to capture the returned Promise. This is the latest from time of writing:
https://github.com/MoePlayer/APlayer/blob/81002c0bf93425884bd565147ad3c2b85762ca44/src/APlayer.js#L738-L745
Proper handling of the <audio> element requires handling the Promise. It is exceptionally simple to cause exceptions with the <audio> API (see: #155).
In fact, the basic Demo Page shows this in the console directly after the APlayer version report:

[Error] Unhandled Promise Rejection: NotAllowedError (DOM Exception 35): The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

I have created a JSFiddle that shows a range of ways to deal with the HTMLMediaElement API. Try each of the four buttons and check the JavaScript console and output block. Please also take a look at the implementation of the best() function. It shows a unified way to handle the API in environments that return Promises and undefined.
I would highly recommend that the APlayer codebase be updated to properly handle Promises. This may also require holding a reference to the most recent Promise returned by the HTMLMediaElement.play() function (as well as a "playPending" boolean?) so that you can chain other calls (pause(), load(), etc.) off of it.

Done. https://github.com/MoePlayer/APlayer/commit/c9e7f8aa1101da00b1e4042fddd4b58d6a73a305

@DIYgod Thanks for working on this! Unfortunately, the referenced commit (c9e7f8a) gets the ball rolling but does not actually resolve this issue. The JSFiddle example had local Promise handling in order to keep things as tight as possible. The minimal example shows play() and pause() being called in the same function context. In practice, this would be extremely rare - more likely is that some APlayer user has some logic that call's APlayer's play() and pause() methods in some sequence of function calls. If you don't call pause() in a context that is chained off the play() call, then you will see DOMExceptions arise. The catch statement in the AudioPlayer.play() setup may trap those, but it's not how the underlying system was intended to work and there's no guarantee what state the player will be in when its done (I think). In other words, a call to pause() while play() is still processing may trigger an exception but result in the call to pause() being ignored.
Effectively, you want to keep chaining off the initial call, rather than recreating the Promise chain each time you call APlayer.play(). (Something like this, except across function boundaries...) This ends up working even with the best method mentioned in a previous comment because you can "insert" Promises into chains by returning them in the promise chain itself.
In a player context (like APlayer), you will need to keep track of the most recent Promise in the chain - specifically, one for each Audio element. Then you can wrap calls to audio.play(), audio.pause(), and audio.src = with Promise chaining logic. Therefore, you might want to set things up like this:
In APlayer.initAudio():
// Start the promise chain with a resolved promise. Removes the
//  need to check for _playedPromise being undefined.
this.audio._playedPromise = Promise.resolve();

In APlayer.play()
this.audio._playedPromise = this._playedPromise.then(() => {
    return Promise.resolve(this.audio.play());
})
.catch(() => {
    this.pause();
});

In APlayer.pause()
this.audio._playedPromise = this._playedPromise.then(() => {
    this.audio.pause();
    this.timer.disable('progress');
})
.catch(()=>{});

In APlayer.setMusic()
this.audio._playedPromise = this._playedPromise.then(() => {
    this.audio.currentTime = 0;
    this.audio.src = this.music.url;
})
.catch(()=>{});

Note a few things about this:

We ensure that a catch is defined for each of these. Even if the onRejected callback is a no-op, adding it will ensure that we can chain in the event that a rogue exception or unexpected rejection occurs.

The examples above only capture some of the logic that you may want to place within the Promise chain. Specifically, does it make sense to adjust the boolean APlayer.paused flag if the audio.pause() call is delayed (i.e. it's "pending" in the Promise chain), while the audio element wraps up some internal work resulting from a previous play call? It may make sense to do the external state adjustment stuff as part of the Promise chain as well because you might get into a broken state if something rejects (your state was updated to be "paused" but an exception earlier in the chain skipped over the then() that contained the actual audio.pause() statement).
With this in mind, you may want to push just about everything in play() into a then() after the call to this.audio.play() and before the catch(). That way, if something breaks and the audio element doesn't actually get to play, your state hasn't been prematurely updated to look like it's playing.
The same would go for pause() and setMusic(). The difference is that you could probably wrap the contents of those entire functions in the then definitions I proposed up above, rather than break things up as with play(). This is because the only Audio element API that can return a Promise is Audio.play().

Does this make sense?

Thanks, I have fix catch() and put everything in play pause setAudio as part of the Promise chain. cf5972879a27459445aaf730f7777c9400667881
And in this version, one player has only one audio element, so I have only one Promise chain per player.

@DIYgod Aaaaalmost there! There is still an oddity with how this.playedPromise is set from within calls to play(). Basically, the promise chain can currently branch, which could lead to potentially unforeseen consequences (potentially calls happening out-of-order if your luck was really bad).
I wrote a whole bunch about how to resolve this last issue in a comment to the commit you referenced. Please take a look and let me know if you have any questions!

btw you don't really need to include the Promise polyfill in this project, you can just leave that to the users. i.e. You can maintain a cleaner and smaller codebase while allowing users to use polyfills themselves for compatibility with old browsers.

@ericdrobinson You are right, I fix playedPromise overwritten in your first way(https://github.com/MoePlayer/APlayer/commit/cf5972879a27459445aaf730f7777c9400667881#r27989819) in fb4211a0b050a065f1ecc3e5eb37b97f0bd96ffc.
Does this make sense?

btw you don't really need to include the Promise polyfill in this project, you can just leave that to the users. i.e. You can maintain a cleaner and smaller codebase while allowing users to use polyfills themselves for compatibility with old browsers.

@egoist Good point. It might be best to create a New Issue about removing the polyfill and adding instructions for users who wish to support legacy IE/Edge to the README.md.

@DIYgod Looks great! Thanks so much for all the work in getting this sorted out!!

@ericdrobinson You're welcome! And thank you, too.
However, I want to keep polyfill to make this player easier to use, I think most users still need it as promise's compatibility is not good enough.

@ericdrobinson Glad to see it's finally resolved. Gonna keep up with it.

@ericdrobinson I encountered some new problems with audio.play() Promise.
When network is poor or somehow fetching media source is really slow, the audio.play() Promise stays pending. Since player.pause() waits for audio.play() Promise to resolve, pause seems broken in users' view in this situation.
Any ideas?

@SevenOutman Hmm... interesting. Is this something that is simple to reproduce?
I think it would be helpful to get more information before attempting a fix. Specifically:

Does this happen in the play call alone or will it happen when setting src= as well?

A call to play has to first load the audio before it can play. Setting the src property also [theoretically?] triggers the loading process. It would be useful to narrow this down to be as specific as possible (e.g. to be able to say: "it is the loading that causes the pause").

In what environment(s) does this occur? Specific browsers? All browsers?
If you can test this reliably, does skipping the promise chain here result in the browser throwing the Exceptions outlined in the initial post? If so, what Exception is thrown and what's the message?

Improve Messaging?
In the short term, the correct action may be to adjust the UI for the user. Specifically, when the user hits the play button, then switch the Play icon to an animated loading spinner that gets replaced by either the Pause (⏸) or Play (▶) button when the Promise resolves or rejects. I would also suggest providing an event API to APlayer implementers for when a load error/timeout occurs (likely what is causing this new issue). That way they might be able to provide the user with a helpful message of something like "Couldn't load the file." Instead of silently failing...
Allow the User to Stop the System
The promise is tied to the state of a specific Audio element. One way to handle this would be to:

Call stop on the current audio to add the "Stop" call to the promise chain. (This may not strictly be necessary, but it should help in case something keeps the Audio element alive in the background...)
Replace the Audio Element with a new one and restart the Promise chain.

Note that this is what might be necessary if someone clicks the "Skip" button while a song in a playlist is stuck loading and the user gets impatient and requests playback of another song in the playlist (that theoretically might not have the same loading problem).
You might also attempt to message the situation to the user while allowing interactivity. You could easily add a loading spinner in a location separate from the Play/Pause button and then let the user press Play/Pause while leaving the loading spinner until the initial play Promise is handled. This would require adding a new state management system to the code; one that distinguishes between Current State and Desired State. The current state is reflected by the loading spinner (or the actual song loaded), while the UI is the "Desired" state. For 99.9% of the time those two states would match. For the other 0.1% of the time, the UI would effectively act as a "Target" for the Current state.
Before any complex implementations occur, however, I'd suggest getting a bit more information on exactly where/when this occurs. I mention "complex" because adding the loading spinner should be a pretty straightforward way to mitigate the issue in the short-term (if not long-term).

@ericdrobinson
Condition
This occurred when I was writing vue-aplayer's demo page as testing is out with Chrome. Songs for the two players on top are stored in Google Cloud Storage. For some reasons, connecting Google service is not so stable from China (where I am located), thus the issue occurred.
Reproduciton
I think slowing down the connection to media source is likely to reproduce the problem.
Here are steps I reproduces it on APlayer's demo page

Visit the demo page in Chrome, and open Chrome DevTools.
In 'network' tab, add a custom network throttling profile with minimum download speed and great latency. Then apply this profile.

Click the second song in the playlist (first one is preloaded before you apply the network profile), and in your network inspector you can see requests are pending.

Now player's thumbnail shows pause button. Try clicking it, it won't work while the requests are still pending. The progress bar shows loading, but still not good experience when user clicks on a button and see nothing happens.

Theoretically this can occur on any browser that supports audio.play() Promise.
Key points
The tricky part is, when user clicks on pause button, player doesn't know whether the song has successfully started to play(it simply relies on Promise's resolve()). Maybe audio.play() Promise should be handled in some other approach, e.g. when player.pause() is called before it resolves, abandon the Promise directly, and player.play() returns a (custom) rejected Promise.

@SevenOutman First, I'm seeing lots of 403 (Forbidden) errors when attempting to play certain songs, including all of the playlist songs (with the exception of the first). Only the first two songs will play, currently. Perhaps test out the page in a Private Browsing mode (e.g. Chrome's Incognito Window)?
Define the Goal
Your issue is specifically a UX related one and is summed up in step 4 of your Reproduction section:

Now player's thumbnail shows pause button. Try clicking it, it won't work while the requests are still pending. The progress bar shows loading, but still not good experience if user clicks a button and see nothing happens.

The goal here is to reduce frustration. Currently, the player looks like it's playing but it isn't. It's actually still loading. As such, the correct thing to do is to either put the Pause button into a disabled state or add a loading UI. That will inform the user that the player is currently busy.
That said, there is another potential issue: switching between songs in playlists. In high-latency scenarios, the user may want to jump to a different song if one takes too long to load. Even if the target song would be quick-to-load, the Promise chain would wait on the currently loading one (if I'm reading the source correctly). To properly message this using a UI state adjustment as in the previous paragraph, the entire list would need to be put into a disabled state (to message the disabling of "click response").
That all said, let's take a deeper look at what we're dealing with in the Promise chain to determine a good solution.
What the Play Promise Means
According to Google:

The Promise won’t fulfill until playback has actually started, meaning the code inside the then() will not execute until the media is playing.

This is important because it isn't necessarily tied to loading. It simply says "Now successfully in 'playing' state." Google's article provides the following non-loading example:

There are contexts in which a web browser may decide to delay the start of playback—for instance, desktop Chrome will not begin playback of a  until the tab is visible.

I mention this because it helps answer the question I posed earlier about whether or not this occurs as part of the loading process. It appears to be specific to when playback actually begins.
All of this boils down to:

Promise Resolves: audio is playing.
Promise Rejects: audio did not (or could not) play and a reason is provided.

Thinking this over, there are three options for how to handle this:

Update the UI to better inform the user as to what the status is (add a loading visual state).
Change the promise flow to allow forcing a promise rejection.
Add a system to replace the audio element (and thus the promise).

Let's take a look at each of these below:
Option 1: Explicitly Message the Loading State
If the audio is not playing, it is very likely loading. This is most likely the state that you happened upon in your testing.  The audio element is trying to play music but it hasn't finished loading. The simplest solution would be to disable the pause button or replace it with UI that indicates "Busy Loading..."
What does it mean for the user to press the pause button in this case? Perhaps that once loading finishes, it should not play? This would require allowing the UI to flow without requiring synchronization with the state of the Promise chain - it would require viewing the UI state as the desired state and the promise chain as the actual state. This would require some extra work to get moving.
Option 2: Allow Forcing Promise Rejection
If the audio is slowly loading and the user is tired of waiting, then perhaps the correct thing to do is to intentionally cause the exception to occur (but catch it) and break the chain. This would enable, for example, immediately jumping between songs in a playlist - it would unfreeze the user from having to wait to try to play other songs. To enable this, the Promise handling would need to be adjusted such that scheduled functions could be made aware of the fact that a break is expected - likely through a property on the player itself that indicates this.
Another naive approach is possible here. This would involve saying "I don't really care about the Promise stuff" and simply doing something equivalent to the following:
// Swallow any exceptions between call to play() and when audio starts playing.
Promise.resolve(this.audio.play()).catch(()=>{});

You could catch Exceptions and turn them into an APlayer error event, but this might not be strictly necessary. I personally have no idea if this might cause issues for how browsers handle playback state changing now or in the future.
Option 3: Replace the Audio Element
This option mostly handles the playlist scenario. It would effectively replace the audio element when switching songs - an operation which would also require replacing the Promise Chain. This reduces the problem to handling the situation of a single audio file being an issue.
Because changing the source (src) is one of the ways of causing an exception to arise in the Promise chain, there doesn't appear to be a "clean" way to interrupt the asynchronous process started by play(). It seems that the assumption for HTML5 is that each audio file in a webpage would have its own audio element. That said, breaking the chain in this way (Option 2) may not be such a terrible thing.
Moving Forward
How this is handled will require input from @DIYgod. Answering the following questions will help determine the implementation:

Should the UI always show the current player state or the desired player state.
Does it make sense to add a disabled state to the buttons? (e.g. grey-out the button; replace it with loading spinner; ...)
In situations of high-latency, should the user be able to switch between songs in a list?

It might also be really helpful to get some insight from someone who has a deeper understanding of what's going on behind the scenes with Audio Playback promises and whether forcing a promise rejection is an okay approach or if it should be avoided. It seems that @beaufortfrancois might be a good person to ask given that he authored the Google article describing fixes for the Promise Exception...

@ericdrobinson I think when user want to switch songs, he should be guaranteed able to. So I personally prefer Option 2 for Vue-APlayer, and would probably add it into next patch update.

我遇到的是一样的问题吗
IOS 微信中和 safari 中播放报错：NotAllowedError (DOM Exception 35): The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
安卓中报错：NotAllowedError: play() can only be initiated by a user gesture.

@li9269391 不是，你遇到的是另一个问题

@SevenOutman 谢谢，我并没有设置自动播放，知道原因了，插件本身用了 promise-polyfill 和我的 webpack 配置构建冲突影响

@ericdrobinson Do you mind giving a quick summary of the root issue? Thread is quite long and I'm happy when I can ;)

I agree with @SevenOutman , option 2 is also my want.
For better experience and less waiting, interrupting the pending play promise is obviously better than waiting for promise resolving when users don't want to play it anymore.
In this way, when pausing or switching audio, UI should make change immediately, and the pending play promise should be interrupted immediately.
So my answer is that the UI always show the desired player state, and user operation shouldn't be forbidden.
Implementation
I think we shouldn't do anything, including handling the play promise, just let the play promise interrupted naturally. It unfortunately returns the original implementation.
I don't find this kind of interrupting has obvious harm, but I'm not sure.
So my implementation just like the follows:
play () {
    // ...
    const playedPromise = audio.play();
    if (playedPromise) {
        playedPromise.catch(() => {
            player.pause();
        });
    }
}
pause () {
    // ...
    audio.pause();
}
switchAudio () {
    // ...
    audio.src = '...';
}

@beaufortfrancois

Do you mind giving a quick summary of the root issue?

APlayer is a custom HTML5 music player (demo). As such it allows the user to play/pause songs and skip around between tracks in a playlist. The current version of APlayer features a single audio element per player instance. The player instance interacts with the audio element in order to provide audio playback from the browser context: the player instance provides the UI/UX while the audio element provides the underlying playback capabilities.
In recent versions of Chrome (and most other browsers), the audio element's play() call began returning Promises. Under certain circumstances, of which you are aware, the Promises can reject and result in errors in the console.
The examples provided in the various Google Developer articles (including the one you wrote) seem to suggest that the "proper" way to pause an audio element is to chain it off the play promise. This is all well and good for simple use cases, but the player case is a bit more complex. Presently, all calls from the player instance in APlayer that interact with the audio element chain off of the play promise. It works fine generally, but we've hit a snag: imagine a playlist where songs come from disparate servers. One server may have high latency and delay the playback of the song. An impatient user may wish to skip to the next song. If everything is promise-based, then the user will have to wait for the slow server to return enough data to play so that the promise may resolve and the chain can continue.
This suggests that the correct thing to do in this case is to tell the audio element to immediately change its source and break the promise chain (cause the exception/error that forces it to reject). This seems like a valid approach but there's a bit of hesitation: what if the promise approach was implemented to help protect the audio element from breaking? There is very little written about the promise returned and what is going on internally with the audio element's state.
So the questions we'd like an insider's view on are:
Is it possible that the audio element's underlying systems will get into a broken/unusable state? Or is it totally fine to cause the promise to reject in this manner and simply handle the rejection case?

@DIYgod That makes sense. The one thing I would suggest is that you don't call pause() in the rejection handler. In the two cases [that we know of] that cause the promise to reject, the audio will either already be paused or start loading another song.

@ericdrobinson Agreed.

@ericdrobinson Actually, pause() is in order to handle NotAllowedError which caused by forbidden autoplay in some mobile browsers, but you are right, I need to judge error.name before pause(), like the follows:
play () {
    // ...
    const playedPromise = audio.play();
    if (playedPromise) {
        playedPromise.catch((e) => {
            if (e.name === 'NotAllowedError') {
                player.pause();
            }
        });
    }
}

@DIYgod It may be worthwhile to do that for the two "common" (or expected?) Exception names. Specifically:

NotAllowedError - The user agent (browser) or operating system doesn't allow playback of media in the current context or situation. This may happen, for example, if the browser requires the user to explicitly start media playback by clicking a "play" button.
NotSupportedError - The media source (which may be specified as a MediaStream, MediaSource, Blob, or File, for example) doesn't represent a supported media format.

Both of those seem like legitimate reasons to call pause() and ensure that the UI updates to correctly reflect the state of the audio element.
That said, it may be worthwhile separating the UI update logic from the call to audio.pause(). This would allow you to call that code separately. Something like:
setUIPaused () {
    // Adjust buttons and other settings to show pause state.
    // ...
}

pause () {
    this.audio.pause();
    this.setUIPaused();
}

play () {
    // ...
    const playedPromise = audio.play();
    if (playedPromise) {
        playedPromise.catch((e) => {
            if (e.name === 'NotAllowedError') {
                // Already "paused" - just set the UI.
                player.setUIPaused();
            }
        });
    }
}

@ericdrobinson Agree, I have improved it in 5c9456b650768d73d50749241b7325f1d7458d53 .


Extension Request🤞👀

Source name
Showboxmovies
Source link
https://www.showboxmovies.net/
Source language
English
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a title with source name.
[X] I have checked that the extension does not already exist on the website extensions list or the app.
[X] I have checked that the extension does not already exist by searching the GitHub repository and verified it does not appear in the code base.
[X] I will fill out all of the requested information in this form.

It's a mirror of sflix, which already exists as an extension.


"discord.utils API" down Error

Summary
discord.py-self Doesn't work.
Reproduction Steps

Coded the script today
Runned
And got error

Code
import sys
sys.path.insert(0, 'discord.py-self')
sys.path.insert(0, 'discord.py-self-embed')

import discord
from discord.ext import commands
import json

with open('config.json', 'r') as file:
    config = json.load(file)

token = config['TOKEN']
prefix = config['PREFIX']

bot = commands.Bot(command_prefix=".", self_bot=True, help_command=None)

@bot.command()
async def ping(ctx):
    await ctx.send(f"Pong! {round(bot.latency * 1000 / 1000)}ms")

bot.run(token)

Expected Results
It should stay like nothing and when i type .ping to discord it should say "Pong! (ping)ms."
Actual Results
2023-11-13 19:36:19 INFO     discord.client Logging in using static token.
2023-11-13 19:36:20 WARNING  discord.utils Info API down. Falling back to manual fetching...
Traceback (most recent call last):
File "C:\ode\python\HALFBOT\main.py", line 21, in
bot.run(token)
File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\client.py", line 938, in run    asyncio.run(runner())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\client.py", line 927, in runner
await self.start(token, reconnect=reconnect)
File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\client.py", line 857, in start
await self.login(token)
File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\client.py", line 698, in login
data = await state.http.static_login(token.strip())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\http.py", line 991, in static_login
await self.startup()
File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\http.py", line 562, in startup
self.super_properties, self.encoded_super_properties = sp, _ = await utils._get_info(session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\utils.py", line 1446, in _get_info
bn = await _get_build_number(session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\utils.py", line 1478, in get_build_number
return int(build_file[build_index : build_index + 6])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'ER_V2'
System Information

Python v3.11.6-final
discord.py-self v2.0.0-final
aiohttp v3.7.4.post0
system info: Windows 11 22H2

Checklist

[x] I have searched the open issues for duplicates.
[X] I have shared the entire traceback.
[X] I am using a user token (and it isn't visible in the code).

Additional Information
No response

I got this now too when just trying to run a simple bot (just has on_ready)

I know it's not ideal but I added this to my bot's file for a quickfix:
...
import discord

async def fix_get_build(*args, **kw):
  return 244594
discord.utils._get_build_number = fix_get_build

...

Apparently the library on pypi is outdated so running pip install git+https://github.com/dolfies/discord.py-self.git fixes it.

Apparently the library on pypi is outdated so running pip install git+https://github.com/dolfies/discord.py-self.git fixes it.

This worked for me as well

Apparently the library on pypi is outdated so running pip install git+https://github.com/dolfies/discord.py-self.git fixes it.

i did both, now it shows this:
2023-11-16 16:38:28 INFO     discord.client Logging in using static token.
2023-11-16 16:38:29 WARNING  discord.utils Info API down. Falling back to manual fetching...
2023-11-16 16:38:30 INFO     discord.http Found user agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36, build number 244594.
2023-11-16 16:38:33 INFO     discord.gateway Connected to Gateway (Session ID: fdac0a18bf515ce6938447479eb40c90).
2023-11-16 16:38:33 WARNING  discord.state Member list scraping failed for<PHONE_NUMBER>928352859 (Failed to automatically choose channels; please specify them manually).
2023-11-16 16:38:33 WARNING  discord.gateway Gateway is ratelimited, waiting 56.91 seconds.

Ok, i removed discord.py-self and did
pip install git+https://github.com/dolfies/discord.py-self.git
then added that
import discord

async def fix_get_build(*args, **kw):
  return 244594
discord.utils._get_build_number = fix_get_build

and now it %100 works.

This has been fixed in the latest commit. API should be back soonish for old builds.


Export Common Duration Metrics

Title: Export Common Duration Metrics
Description:
With https://github.com/envoyproxy/envoy/pull/33240 we got the ability to export various commonly used durations via access logs (thank you!!!). However, it would be great if there was a way to also export these as metrics so they can be ingested by Prometheus.
I don't have a specific design in mind right now, but anything that would pre-aggregate these durations would help immensely in ensuring we can easily alert on the performance of downstream, upstream and envoy itself.

@wbpcode about the specific data, @jmarantz as a stats expert

It's not easy to provide a feature like this in our core stats system. Dynamic and flexible stats means additional memory, additional complexity. (And I think it's complex enough)
But the good news is our stats is extendable. I am okay if we do it in an optional filter (or logger? @kyessenov )

I filed #30619 which replicates the Istio design with high cardinality metrics so you can do break downs by upstream/downstream paths easily. The general problem is that doing all of this in Envoy would push its stats subsystem beyond its design capabilities, so you still need to run a collector or some stats engine to hold the aggregate data. I'd recommend using delta aggregation temporality as well to flush metrics which Envoy doesn't directly support it.

To be clear, what I am mostly looking for is to have specific metrics available for the kind of deltas that #33240 enables, for example:
ds_rx_duration: '%COMMON_DURATION(DS_RX_BEG:DS_RX_END:ms)%',  // Total duration in milliseconds of the request from the start time to the last byte of the request received from the downstream.
routing_duration: '%COMMON_DURATION(DS_RX_END:US_TX_BEG:ms)%',  // Total duration in milliseconds of the request from the last byte of the request received from the downstream to the first byte of the response sent to the upstream.
us_tx_duration: '%COMMON_DURATION(US_TX_BEG:US_TX_END:ms)%',  // Total duration in milliseconds of the request from the first byte of the response sent to the upstream to the last byte of the response sent to the downstream.
us_rx_duration: '%COMMON_DURATION(US_RX_BEG:US_RX_END:ms)%',  // Total duration in milliseconds of the request from the last byte of the response received from the upstream to the first byte of the response sent to the downstream.
ds_tx_duration: '%COMMON_DURATION(DS_TX_BEG:DS_TX_END:ms)%',  // Total duration in milliseconds of the request from the first byte of the response sent to the downstream to the last byte of the response sent to the downstream.

We currently expose these in access logs, but aggregating these into metrics is quite an expensive process if all we are after is some aggregates per cluster / method / status.
These metrics do not need the same granularity (read: cardinality) as the access logs, an aggregation by upstream cluster, HTTP method and HTTP status would already be a very useful start.
I do like the idea of this being added as an optional filter, too. The metrics could be created dynamically and if the set of potential attributes is limited, cardinality should not be a big problem.


Trip Wire drawing issue

Currently, MIL-STD-2525 and APP-6 disagree on how to draw a trip wire (https://github.com/Esri/joint-military-symbology-xml/issues/525).
Regardless, ArcGIS draws it a third way:

The variable line should be the horizontal line on the "t", not the vertical one.
FYI @lfunkhouser

@joebayles Please update the issue, providing the 2525 and APP6 ways to render as well as the recommended way to implement.

It's in the link in the description, but here you go:
MIL-STD-2525D

APP-6D

There is a disparity between the draw rules for a trip wire between the two standards. The US Army will investigate which is the proper one, and submit change proposals to one/both standards.
It should also be mentioned that mines in the example are not intended to be a part of the symbol, and are an example. As is the norm with examples vs. templates, it will be removed from the template, and grayed out in the example.

Since there seems to be an error/disagreement in how this should be displayed, is there a recommendation for one of these in the meantime or is this just on hold until that is decided?
If the issue that we are not following the point ordering then that is because I don't think that has been implemented in Pro yet (#255).

@csmore agreed. The committee is going to decide on what it should be, so suggest we hang in the meantime.
The real question is, should we make whatever change we need to make retroactively.

@joebayles was anything decided about this?  With the anchor point drawing that we are currently implementing we have supported for the 2525Bc2/2525Cdrawing with the 3 anchor points.
From 2525Dc1
Anchor Points: This symbol requires two anchor points. Points 1 and 2 define the length and orientation of the straight line (trip wire) portion of the symbol.
Size/Shape: Points 1 and 2 determine the length and orientation of the line drawn from the physical mine to the end of the trip wire. The distance between the line connecting points 1 and 2 is the length of the trip wire connected to the mine.
Orientation: Orientation is determined by the anchor points.
I am unclear how to supported the 2 anchor point drawing in 2525D.  How is the length of the feature determined?  Is point 1 supposed to be at the intersection where the two lines cross?
Also, is the line circled in blue part of the trip wire symbol?  It wasn't included in Bc2/C.  If so how is the length determined?

From Bc2


Feature/UI connectionless

Add frontend implementation for invitation with attachment (a.k.a. issuing credential with not yet connected partner)
Use typings for all services
Refactoring
Move Schema Settings to sidebar ("Schemas")

Looks very good, except for two things

the lamejs dependency, see comment
If i click the trash icon in the connection dropdown I see the following in the console:

vue.runtime.esm.js:619 [Vue warn]: Error in callback for watcher "partner": "TypeError: Cannot read properties of null (reading 'id')"

found in

---> <CredentialManagement> at src/views/issuer/CredentialManagement.vue
       <VMain>
         <VApp>
           <App> at src/App.vue
             <Root>

If this is merged we can also close: #608

Fixed dropdown delete button issue

Looks very good, except for two things

the lamejs dependency, see comment
If i click the trash icon in the connection dropdown I see the following in the console:

vue.runtime.esm.js:619 [Vue warn]: Error in callback for watcher "partner": "TypeError: Cannot read properties of null (reading 'id')"

found in

---> <CredentialManagement> at src/views/issuer/CredentialManagement.vue
       <VMain>
         <VApp>
           <App> at src/App.vue
             <Root>

If this is merged we can also close: #608

Fixed dropdown delete


sbcl: 2.2.6 -> 2.2.9 (and add 2.2.8 too)

Description of changes
SBCL has released two new versions since 2.2.6, which is currently latest in
nixpkgs: 2.2.8 and 2.2.9. This patch adds both, and sets 2.2.9 as the default
‘sbcl’.
This supersedes #188131, which added only 2.2.8. I've cherry-picked that commit, rebased onto staging, added a patch for 2.2.9, and created this new PR.
N.B.: This is unrelated to the work in #193870, which purely updated the bootstrap compiler to 2.2.9, used to build the actual released compilers. That PR didn't allow end users to actually SBCL 2.2.9. This one does.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[x] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

@ofborg build lispPackages

Are there any known issues with 2.2.9 or should we just skip 2.2.8? I think we keep old versions mostly in the «ouch, why doesn't this work on a newer version» situations, and SBCL tries to have these more rarely than every release.

@ofborg build lispPackages.stumpwm

Are there any known issues with 2.2.9 or should we just skip 2.2.8? I think we keep old versions mostly in the «ouch, why doesn't this work on a newer version» situations, and SBCL tries to have these more rarely than every release.

I'm happy to only introduce 2.2.9, people using nixpkgs master by definition currently aren't using 2.2.7 nor 2.2.8 so that's fine. I'll remove them.
Now that I have your attention, what do you think of refactoring this code to look more like scala and have a 2.x.nix file that unifies all versions, with a versionmap inside, like scala?
I'll do it in a separate PR. It would also make it easier (potentially) to use a custom sbcl if someone really needed to.

Are there any known issues with 2.2.9 or should we just skip 2.2.8? I think we keep old versions mostly in the «ouch, why doesn't this work on a newer version» situations, and SBCL tries to have these more rarely than every release.

I'm happy to only introduce 2.2.9, people using nixpkgs master by definition currently aren't using 2.2.7 nor 2.2.8 so that's fine. I'll remove them.
Now that I have your attention, what do you think of refactoring this code to look more like scala and have a 2.x.nix file that unifies all versions, with a versionmap inside, like scala?
I'll do it in a separate PR. It would also make it easier (potentially) to use a custom sbcl if someone really needed to.

Yeah, it's also that re-checking what are the current problems and should we drop all the old versions takes noticeably more time than updating, so it got a bit out of hand. I guess if it simplifies overriding (and presumably yields zero rebuilds), it's good…

I've created a separate branch for refactoring into a single 2.x.nix file. I'll leave this PR clean to just introduce a new version (2.2.9).

It does look like a Quicklisp bump might be needed due to sb-unix:unix-select being dropped…


Reference to mattes/migrate in bin/compile should use the new repo

github.com/mattes/migrate migrated to https://github.com/golang-migrate/migrate
References are here: https://github.com/Scalingo/go-buildpack/blob/master/bin/compile#L162-L172

Why is it a bug, is something broken somewhere?
Upstream buildpack from heroku is still on mattes/migrate


Fix CI

Description
In https://github.com/opensearch-project/OpenSearch/pull/8035 some classes were moved from core to common-utils without renaming or changing hierarchy. In ml-commons in https://github.com/opensearch-project/ml-commons/pull/993 a new dependency was added to keep things up to date, but the same dependency should be added in SQL plugin as well.
This fix adds:

common-utils dependency to :opensearch
updates mockito version in plugin (:opensearch-sql-plugin) to avoid conflicts between 5.2.0 and 5.4.0 versions. 5.4.0 comes from upstream.

Execution failed for task ':opensearch-sql-plugin:compileTestJava'.
> Could not resolve all dependencies for configuration ':opensearch-sql-plugin:testCompileClasspath'.
   > Conflict(s) found for the following module(s):
       - org.mockito:mockito-core between versions 5.4.0 and 5.2.0
     Run with:
         --scan or
         :opensearch-sql-plugin:dependencyInsight --configuration testCompileClasspath --dependency org.mockito:mockito-core
     to get more insight on how to solve the conflict.

Issues Resolved
https://github.com/opensearch-project/sql/pull/1753
Check List

[ ] New functionality includes testing.

[ ] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

common-utils

Nothing got moved to common-utils. By common-utilsare you referring to this  https://github.com/opensearch-project/common-utils?
I am trying to understand the root cause of the CI issue and how did the current PR changes fixed.


How indexing new folder?

Hi all,
sometimes I need create new folders from nextcloud files without passing the app,
but lespas app don't see these folders .
There is a procedure to indexing new folders?

Create new folder under lespas/ folder, then copy photos into it. Or symlink your existing folder under lespas/

Create new folder under lespas/ folder, then copy photos into it. Or symlink your existing folder under lespas/
This is the method that I use,but the folders aren't noto display into lespas app ..into these folders there aren't files *.json

Create new folder under lespas/ folder, then copy photos into it. Or symlink your existing folder under lespas/

Did you put any picture files in the newly created folder? Empty folder will not be synced.
You can also goto the setting screen, scoll down to Sync section, then click the Sync Status menu item and see the result of the last sync. You could also launch resync there.

Could be subfolder problem?
I have sync mobile photos with nextcloud app and it create main folders "2022" and some sub folders (one per month):01. 02. 03 and so on

Thank you @scubajeff
The problem was nested directory..


Input Tag Having Spaces (only) Validation Not Worked In Latest Version

As I mentioned above(title) , if we create an input tag with required =true and fill up input tag only with spaces and hit submit button, its not showing validate message, it validates the input tag in this case which is totally wrong.
So I have figured out from older version that you have missed $.trim(value)
methods: {
	// http://jqueryvalidation.org/required-method/
	required: function( value, element, param ) {
		// check if dependency is met
		if ( !this.depend( param, element ) ) {
			return "dependency-mismatch";
		}
		if ( element.nodeName.toLowerCase() === "select" ) {
			// could be an array for select-multiple or a string, both are fine this way
			var val = $( element ).val();
			return val && val.length > 0;
		}
		if ( this.checkable( element ) ) {
			return this.getLength( value, element ) > 0;
		}
		return $.trim( value ).length > 0; 0;**_
	},

Duplicate of #1886

Maybe we should add a prominent note into the readme/upgrade/changelog @Arkni ?

Yeah, we should only add it to the section Reporting issues and contributing code as it's already mentioned in the changelog of v1.14.0.

@staabm
See #2028


added the solution for the problem Bmail Computer Network from CodeForces in CPP(Link to the problem: https://codeforces.com/problemset/problem/1057/A Problem Number: 1057A)

Link to the problem: https://codeforces.com/problemset/problem/1057/A
Problem Number: 1057A

Please mention the link to the question in the PR comment as well as the Number of the problem (for Ex: 334B)

Yes, Done.

Only Problem Number to be mentioned in PR heading. Both Link and Problem number should be mentioned in PR Comment.

Accepted


add specific downsamle function for 1:3 and 1:4

add specific C functions for 1:3 and 1:4
add corresponding asm functions for 1:3 and 1:4.

please check the failing tests and merge these commits into one, then commit again.

thanks@huili2 , I have modified the UT and submitted Code Review


[Request] Project Red Electrotine support

It seems that universal cable cannot link to and power blocks such as the auto-crafting bench from Project Red. I would like to see this feature implemented.

Mekanism cables only transfer tesla, rf and eu

While I'm not sure if it was clear, the point of this issue is a request to see it implemented. I'll update OP to reflect that.

I don't see Project Red support being implemented for the universal cables, due to the fact of Aidan focusing on Minecraft 1.10, and Project Red has not yet been updated for 1.10 or anything past 1.7.10 for that matter.

Ehrm... Sorry to necro this, but ProjectRed is already 1.10.2

Well, at the moment Aiden is MIA.  He's busy with school, so Mekanism hasn't been publicly updated in months.

explains a few things... Still, doesn't means he wouldn't come back later! ='3 he will do, or consider it, whenever he gets free enough to read this ticket.

Hmm. Wonder if he can't appoint someone to take over public updates while he's busy.

I would be willing to help out with that, although I am busy with another mod at the moment.
Mekanism is one of my favourite mods, and I would love to see it updated.

I'd be totally behind helping getting more frequent updates. Mekanism is definitely my favorite mod

I'm going to pass on this; we are now supporting EU, RF, Forge Energy and Tesla which I believe is plenty to account for the majority of other mod integration.


search engine clouseau not working with couchdb version 3.2.1 and 3.2.2 (working with version 3.2.0)

Description
my Search Index in couchdb 3.2.0 is working correct, but in version 3.2.1 and 3.2.2 it is not working any more.
Steps to Reproduce
clouseau integration see https://docs.couchdb.org/en/stable/install/search.html
clouseau version i used is 2.21.0 https://github.com/cloudant-labs/clouseau/releases/tag/2.21.0
create a search index on a database
Expected Behaviour
search with te search index and returns results
Your Environment
single node couchdb setup
Working environment
{"couchdb":"Welcome","version":"3.2.0","git_sha":"efb409bba","uuid":"6aeec5c8581fff8477eb52da44bbcff3","features":["search","access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
Not Working environment {"couchdb":"Welcome","version":"3.2.1","git_sha":"efb409bba","uuid":"6aeec5c8581fff8477eb52da44bbcff3","features":["search","access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
/etc/clouseau.ini
[clouseau]
<EMAIL_ADDRESS>cookie=testing
dir=/var/lib/clouseau
max_indexes_open=500
/opt/couchdb/etc/local.d/test.ini
[admins]
admin =
[couchdb]
uuid =
file_compression = none
single_node = true
[couch_httpd_auth]
secret =
[chttpd]
bind_address = <IP_ADDRESS>
port = 5984
[cluster]
n = 1

CouchDB version used to test is: 3.2.0, 3.2.1 and 3.2.2

Errors that i see with couchdb version 3.2.1 and 3.2.2 is the following:
{{nocatch,{<<"TypeError">>,{[]}}},[{couch_os_process,prompt,2,[{file,"src/couch_os_process.erl"},{line,59}]},{couch_query_servers,proc_prompt,2,[{file,"src/couch_query_servers.erl"},{line,536}]},{dreyfus_index_updater,update_or_delete_index,4,[{file,"src/dreyfus_index_updater.erl"},{line,141}]},{dreyfus_index_updater,load_docs,2,[{file,"src/dreyfus_index_updater.erl"},{line,80}]},{couch_bt_engine,drop_reductions,4,[{file,"src/couch_bt_engine.erl"},{line,1177}]},{couch_btree,stream_kv_node2,8,[{file,"src/couch_btree.erl"},{line,851}]},{couch_btree,stream_kp_node,7,[{file,"src/couch_btree.erl"},{line,778}]},{couch_btree,fold,4,[{file,"src/couch_btree.erl"},{line,224}]}]}

Hurray, Got it working! (CouchDB - v3.3.2 and Clouseau - v2.21.6)
What I have done to fix this
clouseau folder
remove file:  slf4j-api-1.7.32.jar
add files: slf4j-api-2.0.7.jar, slf4j-simple-2.0.7.jar (download from https://download.jar-download.com/cache_jars/org.slf4j/slf4j-simple/2.0.7/jar_files.zip)
change in file clouseau.ini
cookie=monster
(change monster to we can get cookie value from \etc\vm.args setcookie's value)

I have forked the clouseau-docker repository and applied those changes (see the update-clouseau-2.21.6 branch).
I built a Docker image from it,  hence a change to the values.yaml should make the text search work with CouchDB 3.3.2 using this Helm chart.
The stanza to change in the values.yaml is:
searchImage:
  repository: docker.io/lmorandini/couchdb-search
  tag: 0.2.1
  pullPolicy: IfNotPresent


Radio buttons not working...clicking on them does not do anything

This is the relevant html div. I have formatted part of it to make it readable. If I comment out the materialize css script in my html file, everything works fine. However, with materialize script included the radio buttons do not respond to clicks.

1.   If you earn 1000GD per month, your total profit in the game will be:

     <form action="#">
         <input type="radio" name="q1" value="1" id="q_1_1">5,000GD

         <input type="radio" name="q1" value="2" id="q_1_2">10,000GD

        <input type="radio" name="q1" value="3" id="q_1_3">12,000GD

        <input type="radio" name="q1" value="4" id="q_1_4">15,000GD

    </form>

2.   How often can you change the price?

<form action="#"><input type="radio" name="q2" value="1" id="q_2_1">Once a month
<input type="radio" name="q2" value="2" id="q_2_2">Once every 6 months
<input type="radio" name="q2" value="3" id="q_2_3">Once a year
</form>

3.   You must change the price every month.
<form action="#"><input type="radio" name="q3" value="1" id="q_3_1">False. I can, but I don't have to change the price every month. I can continue
    with the same price I chose in the previous month.
<input type="radio" name="q3" value="2" id="q_3_2">True, I have to change the price once a month.
</form>

The labels should have an attribute for pointing to the id of the radio it belongs.
<input type="radio" name="q1" value="1" id="q_1_1">5,000GD

Thank Nohinn. That works!
However, I would like to point out that the "for" attribute is not necessary for radio buttons to be clickable when not using materialize.

Please also check closed issues before opening a new one

Make the radio button static (apply style position=static). It will work

nothing work..
http://<IP_ADDRESS>:82/20170817/contact.php

Its working if you remove classes 'input-field col m6 s12' from your parent div. If u r doing like this.

Département des ventes

Support Technique

Renseignements généraux

5,000GD

Thank you @gunjan008. Removing the input-field class from the parent div works. This happened to me for both radio buttons and select tag.

thanks @gunjan008 removing class of parent div works like a charm.

please use the below video link to resolve the issue
https://youtu.be/-AO5unPo0Rw

please use the below video link to resolve the issue
https://youtu.be/-AO5unPo0Rw

This guy is advertising his youtube video here. block like this guy.

I have same problem, on parent class I had lineheight, when removed it worked
I am not sure abt the relationship between lineheight and radio button :(

.input-field label implements pointer-events: none . Setting it to pointer-events: inherit or removing it seems to work in this case


nixos/overlayfs: add a switch to disable prefixing with /sysroot for initrd mounts

Description of changes

This enables mounting paths from the initrd into the real root with the overlayfs abstraction, which can be useful in some cases, e.g. to create an overlay in the real root without a visible upper-/workdir in the real root.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[x] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@ofborg eval

@msanft Are you still interested in this? I kept telling myself I was going to use this in a particular thing I had in mind as a way to battle test it, but I don't think that's going to happen, so I'm generally happy with it as is. What do you think?

What do you think?

I'd love to get this, @ElvishJerricco! It'd be very helpful for a lot of our use-cases. I'm also happy with it as-is, and we already tested it in practice too.


aishell recipe: change with K2,use lhotse to prepare,reduce recipe code,add mmi

from #79

change with K2
use lhotse to prepare data
reduce recipe code
train with mmi (and reduce max_frames to fix "CUDA out of memory", test with NVIDIA V100)

WER on aishell test with latest k2, 2021-01-22T09:34:07.114861199Z 2021-01-22 17:34:07,114 INFO [decode.py:227] %WER 13.95% [14611 / 104765, 367 ins, 472 del, 13772 sub ]

WER on aishell test with latest k2, 2021-01-22T09:34:07.114861199Z 2021-01-22 17:34:07,114 INFO [decode.py:227] %WER 13.95% [14611 / 104765, 367 ins, 472 del, 13772 sub ]

Thank you! I work in Guangzhou.

Thank you! I work in Guangzhou.

@pingfengluo
Sorry, there are conflicts now. Could you resolve them?

@pingfengluo
Sorry, there are conflicts now. Could you resolve them?

@pingfengluo
Sorry, there are conflicts now. Could you resolve them?

OK. solved.

@pingfengluo
Sorry, there are conflicts now. Could you resolve them?

OK. solved.

@csukuangfj conflicts solved.

@csukuangfj conflicts solved.

OK.Changed with latest K2. @csukuangfj Thank you!

OK.Changed with latest K2. @csukuangfj Thank you!

Great!
Fangjun, you can merge if you think it's OK.
On Fri, Jan 22, 2021 at 11:22 PM pingfengluo<EMAIL_ADDRESS>wrote:

OK.Changed with latest K2. @csukuangfj https://github.com/csukuangfj
Thank you!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/k2-fsa/snowfall/pull/81#issuecomment-765480375, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAZFLO3DSWGQRHTZNS2QQQDS3GJ37ANCNFSM4WOBUVWQ
.

Great!
Fangjun, you can merge if you think it's OK.
On Fri, Jan 22, 2021 at 11:22 PM pingfengluo<EMAIL_ADDRESS>wrote:

OK.Changed with latest K2. @csukuangfj https://github.com/csukuangfj
Thank you!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/k2-fsa/snowfall/pull/81#issuecomment-765480375, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAZFLO3DSWGQRHTZNS2QQQDS3GJ37ANCNFSM4WOBUVWQ
.

Have updated and testet. Aishell CER is slightly better, 13.89 vs 13.95 （with latest K2）. @csukuangfj
2021-01-23T10:45:40.407788169Z 2021-01-23 18:45:40,407 INFO [ctc_decode.py:229] %WER 13.89% [14547 / 104765, 482 ins, 404 del, 13661 sub ]

Have updated and testet. Aishell CER is slightly better, 13.89 vs 13.95 （with latest K2）. @csukuangfj
2021-01-23T10:45:40.407788169Z 2021-01-23 18:45:40,407 INFO [ctc_decode.py:229] %WER 13.89% [14547 / 104765, 482 ins, 404 del, 13661 sub ]

Have updated and testet. Aishell CER is slightly better, 13.89 vs 13.95 （with latest K2）. @csukuangfj
2021-01-23T10:45:40.407788169Z 2021-01-23 18:45:40,407 INFO [ctc_decode.py:229] %WER 13.89% [14547 / 104765, 482 ins, 404 del, 13661 sub ]

Have updated and testet. Aishell CER is slightly better, 13.89 vs 13.95 （with latest K2）. @csukuangfj
2021-01-23T10:45:40.407788169Z 2021-01-23 18:45:40,407 INFO [ctc_decode.py:229] %WER 13.89% [14547 / 104765, 482 ins, 404 del, 13661 sub ]

From https://github.com/k2-fsa/snowfall/pull/78#issuecomment-765128253

Can we start putting the WERs at the top of the training scripts?
(mentioning which decode script we used, and when, who ran it,
what changed if there are multiple WERs listed, etc.)?

@pingfengluo
Could you create a file snowfall/egs/aishell/asr/simple_v1/RESULTS and note down your results in it?
For example, like the following one from kaldi
https://github.com/kaldi-asr/kaldi/blob/master/egs/wsj/s5/RESULTS

From https://github.com/k2-fsa/snowfall/pull/78#issuecomment-765128253

Can we start putting the WERs at the top of the training scripts?
(mentioning which decode script we used, and when, who ran it,
what changed if there are multiple WERs listed, etc.)?

@pingfengluo
Could you create a file snowfall/egs/aishell/asr/simple_v1/RESULTS and note down your results in it?
For example, like the following one from kaldi
https://github.com/kaldi-asr/kaldi/blob/master/egs/wsj/s5/RESULTS

Is it fine if format of  RESULT file as below? @csukuangfj
# This result was obtained by Pingfeng Luo in 2021.01.23, after a rewrite of run.sh file.
# To see results from the scripts ctc_train.py and mmi_bigram_train.py, look at the top of those files, we don't put those in the RESULTS file.
#
# CTC result:
%WER 13.89% [14547 / 104765, 482 ins, 404 del, 13661 sub ] exp-lstm-adam-ctc

# Other result:

Is it fine if format of  RESULT file as below? @csukuangfj
# This result was obtained by Pingfeng Luo in 2021.01.23, after a rewrite of run.sh file.
# To see results from the scripts ctc_train.py and mmi_bigram_train.py, look at the top of those files, we don't put those in the RESULTS file.
#
# CTC result:
%WER 13.89% [14547 / 104765, 482 ins, 404 del, 13661 sub ] exp-lstm-adam-ctc

# Other result:

Or you just write one RESULT file and put the results in it, and  i will make other PR to update when i have new results?

Or you just write one RESULT file and put the results in it, and  i will make other PR to update when i have new results?

Yes, I think the format is OK.

Yes, I think the format is OK.

Yes, only one RESULT is fine.
On Sat, Jan 23, 2021 at 11:15 PM pingfengluo<EMAIL_ADDRESS>wrote:

Or you just write one RESULT file and put the results in it, and i will
make other PR to update when i have new results?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/k2-fsa/snowfall/pull/81#issuecomment-766094454, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABIKIPCR5VO5J2VLM57MID3S3LRYZANCNFSM4WOBUVWQ
.

Yes, only one RESULT is fine.
On Sat, Jan 23, 2021 at 11:15 PM pingfengluo<EMAIL_ADDRESS>wrote:

Or you just write one RESULT file and put the results in it, and i will
make other PR to update when i have new results?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/k2-fsa/snowfall/pull/81#issuecomment-766094454, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABIKIPCR5VO5J2VLM57MID3S3LRYZANCNFSM4WOBUVWQ
.

Yes, only one RESULT is fine.
…
On Sat, Jan 23, 2021 at 11:15 PM pingfengluo @.***> wrote: Or you just write one RESULT file and put the results in it, and i will make other PR to update when i have new results? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#81 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKIPCR5VO5J2VLM57MID3S3LRYZANCNFSM4WOBUVWQ .
OK. I have noted a initial result in RESULT file and it will be updated when setup changes.

Yes, only one RESULT is fine.
…
On Sat, Jan 23, 2021 at 11:15 PM pingfengluo @.***> wrote: Or you just write one RESULT file and put the results in it, and i will make other PR to update when i have new results? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#81 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKIPCR5VO5J2VLM57MID3S3LRYZANCNFSM4WOBUVWQ .
OK. I have noted a initial result in RESULT file and it will be updated when setup changes.

Thanks! Merging.

Thanks! Merging.


Update deps in advance of code.google.com shutdown

Currently get warnings when getting goproxy_html.
warning: code.google.com is shutting down; import path code.google.com/p/go-charset/charset will stop working
warning: code.google.com is shutting down; import path code.google.com/p/go-charset/data will stop working

The author of go-charset has already moved to github, as evidenced by this commit:
https://github.com/rogpeppe/go-charset/commit/e9ff06f347d3f5d0013d59ed83754f0e88de10d4

Great catch. Wouldn't have noticed it, since I've got these long time ago.


update packages

Thanks, I've updated the branch anyway to get it in for other things I need to update :wink:


Add new function to get a firstOrDefault

Hi, I am currently using the datastore, and have ran into an issue when trying to sort my login flow.
The api returns a user object which gets stored in the store.  However I need to use this in various places in  my app, and the only way i can see to access this is to use find('users' , 'xx') but I don't know what the id is.  I could store the id on the $rootscope or in some other service but that doses't feel right.  The other option is i could add this method
{
key: "firstOrDefault",
value: function firstOrDefault(type) {
if (!this.graph[type]) return null;
return this.graph[type];
}
Example usage
var user = store.firstOrDefault('users');
Would appreciate if you have any other suggestions how i might handle this.
Rob

In your case I'd suggest holding a reference to the user object, that I would encapsulate inside a service/factory (as it seems you're using angular). So something like
angular.module('myCoolApp').factory('authenticationService', function(dataService) {
  var user = null;

  return {
    login: function() {
      // do stuff
      var payload = authenticate(); // basically, get the response from the server for your authentication
      user = dataService.syncRecord(payload);
      // do stuff
    }
  };
});

Closing this for now, feel free to keep commenting/reopen if needed.


Tutorial videos?

Looks like Twitch deleted the videos, any chance you can re-upload them somewhere else? i've heard wonders about them
Thank you!

Did you ever find this? Thanks

The videos are in the Resources channel in Discord discord.gg/8Wk9Hp6UyV