com.shobhitpuri.custombuttons.GoogleSignInButton cannot be cast to com.google.android.gms.common.SignInButton

I have followed instructions on the mainpage , imported the packages did adjustments to xml file.
Then I have do such things in my java file
view.findViewById(R.id.sign_in_button).setOnClickListener(this);
SignInButton signInButton = (SignInButton) view.findViewById(R.id.sign_in_button);
signInButton.setSize(SignInButton.SIZE_STANDARD);
signInButton.setColorScheme(SignInButton.COLOR_LIGHT);
}
then it give me error by the time I wanna open the page contains this google login button
com.shobhitpuri.custombuttons.GoogleSignInButton cannot be cast to com.google.android.gms.common.SignInButton

@PaulZhangIsing Thanks for opening the issue. Can you please double check your imports, i.e if in the java file you've imported com.google.android.gms.common.SignInButton instead of com.shobhitpuri.custombuttons.GoogleSignInButton ?

Thanks I think I could close this issue. Thanks for the help!!!!!

The GoogleSignInButton can't work with the default SignInButton. why is this?

@Julius26 Thanks for the commend. Can you please explain a bit? When you say that 'can't work', do you mean that GoogleSignInButton cannot be casted to SignInButton. This is because if you see the custom GoogleSignInButton implementation, its parent is AppCompatButton and SignInButton parent is FrameLayout. If you want to case, both can be casted as View for the time being, since they all extend the View class at the end.

Hi @shobhitpuri my app keeps crashing and I double checked all the corrections you mentioned above but it still won't work. This is the error I am getting
Caused by: java.lang.ClassCastException: com.shobhitpuri.custombuttons.GoogleSignInButton cannot be cast to com.google.android.gms.common.SignInButton
Could you please guide me to the solution?
Much appreaciated

@rupakyeware Can you see if below is the issue, else please share the stacktrace and relevant file to help debug further.

@PaulZhangIsing Thanks for opening the issue. Can you please double check your imports on top of your Java file. Can you please check if by mistake you've imported com.google.android.gms.common.SignInButton instead of com.shobhitpuri.custombuttons.GoogleSignInButton ?


TOMEE-4343 - OpenTelemetry 1.0

WIP. see https://lists.apache.org/thread/42nfgbs8h643ypcwg3lgwbvnq2yzvof6

We need to investigate some CI regressions before we can merge :-)


GPU Training

Dear developers,
Hello there! I hope you're doing well.
I have a quick question regarding the current state of GPU training support in your `matgl`` package.
As of now, does it support GPU training, or is it limited to CPU-related adaptation only?
When using default dgl in matgl, it would fail.
DGLError: [09:37:23] /opt/dgl/src/runtime/c_runtime_api.cc:82: Check failed: allow_missing: Device API cuda is not enabled. Please install the cuda version of dgl.

However, when cu102 dgl is used, it would fail to load split_dataset from dgl.data.utils.
OSError                                   Traceback (most recent call last)
Cell In[1], line 13
     11 import pytorch_lightning as pl
     12 import torch
---> 13 from dgl.data.utils import split_dataset
......

OSError: libcudart.so.10.2: cannot open shared object file: No such file or directory
---------------------------------------------------------------------------

I appreciate any insights you can provide on this matter. Thank you!

Yes GPU is supported. We use it all the time. What the error message suggests is that you have a bad library compiled in your system. This needs to be fixed for any GPU training.

I should add that Google the error message gives a few stack overflow discussions that talks about the error and ways of solving it.

Thank you! It works well now.


Installation Python Spidev fails on Alpine Linux aarch64

I'm trying to install Python Spidev on a RPi 4 Alpine Linux Edge OS.
Using this command pip install spidev for Python Spidev installation fails with this error:
Defaulting to user installation because normal site-packages is not
writeable
Collecting spidev
  Using cached spidev-3.5.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: spidev
  Building wheel for spidev (setup.py) ... error
  error:
subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code:
1

  ╰─> [14 lines of
output]
      /usr/lib/python3.10/site-packages/setuptools/dist.py:717:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions
. Please use the underscore name 'description_file' instead

warnings.warn(
      running bdist_wheel
      running build
      running
build_ext

      building 'spidev' extension
      creating build
      creating build/temp.linux-aarch64-3.10
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3
-Wall -g -g -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
-I/usr/include/python3.10 -c spidev_module
.c -o build/temp.linux-aarch64-3.10/spidev_module.o
      spidev_module.c:33:10: fatal error: linux/spi/spidev.h: No such
file or directory
         33 | #include <linux/spi/spidev.h>
            |          ^~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a
problem with pip.
  ERROR: Failed building wheel for spidev
  Running setup.py clean for spidev
Failed to build spidev
Installing collected packages: spidev
  Running setup.py install for spidev ... error
  error: subprocess-exited-with-error

  × Running setup.py install for spidev did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /usr/lib/python3.10/site-packages/setuptools/dist.py:717:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions
. Please use the underscore name 'description_file' instead
        warnings.warn(
      running install

/usr/lib/python3.10/site-packages/setuptools/command/install.py:34:
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build
and pip and ot
her standards-based tools.
        warnings.warn(
      running build
      running build_ext
      building 'spidev' extension
      creating build
      creating build/temp.linux-aarch64-3.10
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3
-Wall -g -g -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
-I/usr/include/python3.10 -c spidev_module
.c -o build/temp.linux-aarch64-3.10/spidev_module.o
      spidev_module.c:33:10: fatal error: linux/spi/spidev.h: No such
file or directory
         33 | #include <linux/spi/spidev.h>
            |          ^~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a
problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> spidev

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Can you please advise how to fix this issue?
THX
Thomas

You must have the relevant Linux kernel headers installed on your system at build time.
https://pkgs.alpinelinux.org/contents?file=spidev.h&path=&name=&branch=edge

@BANDWBEAR In general, you should open a separate issue instead of tagging on to an unrelated one.  I don't know much about MacOS but I assume that it doesn't have an spidev subsystem implemented (in the kernel or user space) at all (in which case py-spidev can never work at all).  If in-fact it does have an equivalent to Linux's spidev, then possibly you need to install the correct headers, or submit a PR to locate them correctly on MacOS.


clear expired record failed

contract on N3T4:  0x538355b776538a5da0b2a08c139b9900b9c0cbb6

the records are reserved.

comparing the pr: https://github.com/neo-project/non-native-contracts/pull/16/files
                StorageMap recordMap = new(context, Prefix_Record);
                var allrecords = (Iterator<ByteString>)recordMap.Find(tokenKey, FindOptions.KeysOnly);
                foreach (var key in allrecords)
                {
                    recordMap.Delete(key);
                }

with the successful delete record pr:
https://github.com/neo-project/non-native-contracts/pull/16/commits/0ffb08a0914d531970bd6fd90616fba9a8e8becd#diff-d92adeab89009d989ac782ad3056dc68aee0e88547e4f101f95764030d2f0410R231-R239
                StorageMap recordMap = new(context, Prefix_Record);
                var allrecords = (Iterator<RecordState>)recordMap.Find(tokenKey, FindOptions.ValuesOnly | FindOptions.DeserializeValues);
                foreach (var state in allrecords)
                {
                    byte[] recordKey = GetRecordKey(tokenKey, state.Name, state.Type);
                    recordMap.Delete(recordKey);
                }

the delete key are
22222ba85d98fbd8e17076e938c324999e4200be6d392ba85d98fbd8e17076e938c324999e4200be6d3910  (fail)
222ba85d98fbd8e17076e938c324999e4200be6d392ba85d98fbd8e17076e938c324999e4200be6d3910 (success)


virtualbox guest additions grsecurity desktop

Issue description
it .12 version seems not to work with newer kernels and .20 version does not work properly
did anybody try grsecurity with desktop package
it does not seem to work with none except xfce
and then clipboard wont work
in the virtualbox I must say  no cp between host and guest
anybody using it ?
gnome3 crashes kde4 crashes
and kde5 loads but nothing is shown
not sure if I had to do more than enable it
Steps to reproduce
enable grsec and desktop in virtualbox with guest additions on latest nix
Technical details

System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
Nix version: (run nix-env --version)
Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

I'm unclear on what you've done here: are you running virtualbox on a grsec kernel or grsec within virtualbox? Anyway, I'm still waiting on darwin builds to complete to staging can be merged into master. Until then, I'm inclined to say grsec on anything but a headless server is unlikely to be a good experience.

I am trying to run virtual machine that has nixos with grsecurity and desktop like kde4
so hardened desktop inside of a virtual machine

I see, then this is a duplicate of https://github.com/NixOS/nixpkgs/issues/6905

You'll probably need to compile your own kernel, using the grsec autoconfiguration method, with the following options enabled:
GRKERNSEC_CONFIG_AUTO
GRKERNSEC_CONFIG_DESKTOP
GRKERNSEC_CONFIG_VIRT_GUEST
GRKERNSEC_CONFIG_VIRT_VIRTUALBOX

I don't use virtualbox so it's not a priority for me.

Is this enough of a dupe to close this one?


Add constants

Closed #10.

@timrodz could you approve this PR for hacktoberfest tracking please?

It should automatically be approved, I believe!


Itch.io game stop being detected if path is changed and changed back

My itch.io games are no longer detected after changing the itch.io folder path to something else, and changing it back to empty.
Seems the same as #197 where the guy fixed it by deleting a config folder, but I can't find that config folder and even if I did, there has to be a better solution to this problem.
This happened on a steam deck. I tried uninstalling and reinstalling boilr with Discover but that doesn't seem to delete the user data as all the settings such as the steamgrid API key are still there after the reinstall and as a consequence, it doesn't fix the problem.

Thanks for reporting this. I think it might be that it actually tries using the empty string instead of resetting it. I will try to look at it tonight.
I might also add a Readme of where to find the config file, you are not the only one to miss it.

This is solved in version:
https://github.com/PhilipK/BoilR/releases/tag/v.1.4.8


PDF generation is not built, with no errors

Hi,
look at https://readthedocs.org/dashboard/blogbee-docs/, I don't know how to make the PDF to be generated.
The HTML build is ok, but no download is suggested and no PDF generation is done.
edit: this is not available with mkdocs.
Did you plan to add this feature ?

We're working on a solution that would give a lot of sphinx's power to markdown. But to answer your question, no, I don't think mkdocs is targeting PDF output.

Hi @agjohnson, thanks.
Did you have a roadmap for kind of "markdown support" into sphinx ?
Regards,


Only reset drop targets when needed

fix #470

Coverage remained the same at 93.181% when pulling d9d006dc242d0dad70980caafd3f11221bfc1c7a on only_reset_drop_targets_when_needed into 162b1d14d6a082f1acea70f222f26df901768d04 on dev.


Set token widths

Create baseline token widths for page layouts
Need to have set token widths for baseline layouts.
src/size/width.json

This issue is no longer valid per new updates.


signing issue with Version 2.4.1

Today I upgraded in Android Studio to Robotium Recorder 2.4.1 plugin (I've a valid license)
But when I try to record a test with flavor Debug an error appear, ~/Robotium.log.txt show this
/Users/hannes/git/tracks/code/executorproject/gradlew -Dorg.gradle.daemon=true assembleDebugAndroidTest -u -b /Users/hannes/git/tracks/code/executorproject/build.gradle
with error
Keystore was tampered with, or password was incorrect
but this seams not to be the error. When I look to generated (by Robotium) file
/Users/hannes/git/tracks/code/executorproject/build.gradle

  signingConfigs {
     debug {
          storeFile file('/Users/hannes/git/release-key.keystore')
     }

it has no information about password and alias !
In my original build.gradle

signingConfigs {
    debug {
        storePassword "android"
        keyPassword "android"
        keyAlias "androiddebugkey"
    }
    release {
        keyAlias "release"
        storeFile file('/Users/hannes/git/release-key.keystore')
        storePassword 'mypass'
        keyPassword 'mypass'
    }

So I see the bug that Robotium uses for flavor debug the wrong storeFile !
This happen with new version ! Btw, please show us a changelog !

Thanks for reporting this. We have not made any changes that could break
this. Probably this bug has existed for a while. We'll have a look at it.
On Tue, Jun 28, 2016 at 11:34 AM, hannesa2<EMAIL_ADDRESS>wrote:

Today I upgraded in Android Studio to Robotium Recorder 2.4.1 plugin (I've
a valid license)
But when I try to record a test with flavor Debug an error appear,
~/Robotium.log.txt show this
/Users/hannes/git/tracks/code/executorproject/gradlew
-Dorg.gradle.daemon=true assembleDebugAndroidTest -u -b
/Users/hannes/git/tracks/code/executorproject/build.gradle
with error
Keystore was tampered with, or password was incorrect
but this seams not to be the error. When I look to generated (by Robotium)
file
/Users/hannes/git/tracks/code/executorproject/build.gradle
signingConfigs {
debug {
storeFile file('/Users/hannes/git/release-key.keystore')
}
it has no information about password and alias !
In my original build.gradle
signingConfigs {
debug {
storePassword "android"
keyPassword "android"
keyAlias "androiddebugkey"
}
release {
keyAlias "release"
storeFile file('/Users/hannes/git/release-key.keystore')
storePassword 'mypass'
keyPassword 'mypass'
}
So I see the bug that Robotium uses for flavor debug the wrong storeFile
!
This happen with new version ! Btw, please show us a changelog !
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/RobotiumTech/robotium/issues/836, or mute the thread
https://github.com/notifications/unsubscribe/AAKGpfQXhOBXoe30SlqipB_VS3uVQZnbks5qQWkrgaJpZM4JAZkL
.


Improve performance

As mentioned in the PR #51, parsing MediaPlaylist files with MediaPlaylist::from_str is quite slow and this can definitely be improved :)

     Running target/release/deps/parse-0d26cc9e51751f86
Benchmarking parser/throughput: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 25.3s or reduce sample count to 30.
Benchmarking parser/throughput: Collecting 100 samples in estimated 25.304 s (50                                                                                parser/throughput       time:   [4.6647 ms 4.6793 ms 4.6968 ms]
                        thrpt:  [64.794 MiB/s 65.036 MiB/s 65.240 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

An obvious solution would be to use Cows instead of Strings, which could avoid allocations. Note that this would not improve the MediaPlaylist::from_str performance, because the trait expects the struct to take ownership of the data, so one would have to use TryFrom;
pub struct MediaPlaylist<'a> { /* ... */ }

impl<'a> TryFrom<&'a str> for MediaPlaylist<'a> {
    type Error = Error;
    fn try_from(input: &'a str) -> Result<Self, Self::Error> {
        parse_media_playlist(input, &mut MediaPlaylist::builder())
    }
}

One might also consider adding beef (faster and smaller Cow implementation) as an optional dependency.

smallvec could also improve the performance, but I think it would be better to wait for const-generics to stabilize, before depending on it.
All places where it could be used (I think):

[ ] hls_m3u8::types::Codecs
[ ] hls_m3u8::types::KeyFormatVersions
[ ] hls_m3u8::types::Value::Hex

MediaPlaylist

[ ] hls_m3u8::tags::ExtXMap::keys
[ ] hls_m3u8::MediaPlaylist::unknown
[ ] hls_m3u8::MediaSegment::keys

MasterPlaylist:

[ ] hls_m3u8::MasterPlaylist::media
[ ] hls_m3u8::MasterPlaylist::variant_streams
[ ] hls_m3u8::MasterPlaylist::session_data
[ ] hls_m3u8::MasterPlaylist::session_keys
[ ] hls_m3u8::MasterPlaylist::unknown_tags (small note: this field should be called unknown)

but I am not sure if it should be used as a drop-in replacement for Vec or just on things that are known to be used infrequently (for example right now the specs only allow a single DecryptionKey, but they are in a Vec, because the spec indicates that new keys might be added with different identities?)
Why smallvec?
I like that it automatically allocates on the heap, if the size exceeds the array and it is used by the rust compiler and servo so it is quite well-supported.
other crates that I know of:

arrayvec, which would error/panic if the capacity is exceeded.
staticvec
stackvec

Maybe it would be possible to parse tags in parallel? I think that would be really difficult, because the m3u8 file format seems to be designed to be parsed sequentially (some tags depend on the previous or next tag).

Most likely the culprit is the BTreeMap that contains all the MediaSegment, which is quite inefficient with many MediaSegments, so maybe it would be better to use a HashMap and then sort them before writing with fmt::Display?

I made some experimental changes to try and get a speed-up.  I'm afraid I gutted the code and will have broken lots of existing uses cases / tests, so I can share a branch, but not provide a PR yet.

Changing the segments representation from BTreeMap<usize, MediaSegment> to Vec<MediaSegment> was a good win
Changing keys to a SmallVec<[ExtXKey; 1]> also helped
I just commented out code handling description from the EXTINF line.  Not great, but avoids another allocation per segment
Switch to hand-coded builder implementations for the types being exercised, since many of the #[derive(builder)] setter methods seem to clone their arguments (I did not investigate this much to see if there was another way)
And the big one (in terms of lines added) - switched to a nom-based parser for the subset of syntax I'm testing

its a single-pass for the most part (the current hls_m3u8 parser first scans for end-of-line, and having found a line it parses it - so its more like a two-pass process)
The parser is byte-oriented, and defers UTF-8 conversion only for elements like URIs that might actually contain UTF-8 content (all the content likeEXTINF tags are in the ASCII subset of UTF-8 and can I think be safely parsed as bytes)
the parser is 'left factored' - i.e. a rule recognises #EXT and then sub-rules try to recognise e.g. -X-MEDIA-SEQUENCE: suffix (current parser will re-rest the #EXT when attempting to match each tag, unless the optimiser is doing very clever tricks!)

with all that, I see the benchmark go from around 80MB/s to:
Benchmarking parser/throughput: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 5.2s or reduce sample count to 60.
parser/throughput       time:   [1.0120 ms 1.0175 ms 1.0243 ms]
                        thrpt:  [297.09 MiB/s 299.10 MiB/s 300.72 MiB/s]

Will try to push the branch to share work in progress later.

WIP over here https://github.com/dholroyd/hls_m3u8/commit/f601da1e6fb777df26fdadb53f15aabf298aeb80
Benchmarking parser/from_str parser: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 8.9s or reduce sample count to 50.
parser/from_str parser  time:   [1.6824 ms 1.6864 ms 1.6912 ms]
                        thrpt:  [179.94 MiB/s 180.46 MiB/s 180.89 MiB/s]
Found 14 outliers among 100 measurements (14.00%)
  4 (4.00%) high mild
  10 (10.00%) high severe
Benchmarking parser/nom parser: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 5.4s or reduce sample count to 60.
parser/nom parser       time:   [1.0867 ms 1.0916 ms 1.0976 ms]
                        thrpt:  [277.27 MiB/s 278.78 MiB/s 280.03 MiB/s]
Found 16 outliers among 100 measurements (16.00%)
  5 (5.00%) high mild
  11 (11.00%) high severe

It's not intended to be ready to commit yet.  In particular lots of MediaPlaylistBuilder::build() is commented out because I didn't understand it yet (and the switch to Vec<MediaSegment> breaks it).  Sorry - I made a change to the data structure without really understanding it's function!  Could you explain why the sequence numbers are inside MediaSegment and also tracked via the Map key?
I'm not particularly committed to using nom; just a tool I've tried out recently.  The parser only handles a small portion of the syntax that the FromString version covers, that would need loads more work.  This is an opportunity to add 'Span' support though.
I did not yet try your idea to handle uri / description with Cow (or beef) - could well help further.

Sorry - I made a change to the data structure without really understanding it's function!

Do not worry, all help is appreciated 🤗

Could you explain why the sequence numbers are inside MediaSegment and also tracked via the Map key?

A MediaSegment describes a small chunk of the output stream and the player might want to switch to a lower quality stream or higher quality stream. According to the RFC one should not rely on the Duration and instead each segment has a number assigned. The first segment has the discontinuity sequence number and all the following are previous+1. This makes it possible to switch the streams, by fetching the next segment from another VariantStream with the last sequence number+1. (I might be wrong, so maybe it would be better to look at the EXT-X-DISCONTINUITY documentation in the RFC)
I had quite a difficult time writing code that keeps the insertion order of the provided segments vector and that does allow for explicitly numbered segments (the implicitly numbered segments should fill in the free spaces in the vector).
I choose a BTreeMap as a data structure, because you could sort the segments after their number, it does not allow 2 segments with the same number and you can iterate through them in the correct order. The problem is that inserting something into a BTreeMap has a complexity of n log n (see here for a visualization of what this means: https://miro.medium.com/max/1400/1*5ZLci3SuR0zM_QlZOADv8Q.jpeg), which means for our case that the more segments you insert the slower it becomes (a lot slower).
We could replace the BTreeMap with a custom data structure that takes advantage of the fact that the segment numbers are just indexes (number - discontinuity number). I will look into this a bit more later today and write a custom data structure for it.
Simply using a Vec is not an option, because one could insert an element anywhere and all the following elements would be moved,  which destroys the order of the segments.

I'm not particularly committed to using nom

I used it quite a while ago, when you had to use macros for everything, which was quite confusing/difficult for me and I think adding a parsing library would make it more difficult for people to contribute this this library, because they would have to first understand nom.
I would rather use a custom trait (Parser) and some kind of struct that can be used to get tokens from the stream (see #46).
How much did this improve performance?

This is an opportunity to add 'Span' support though.

I would wait with that...This is how I ended up rewriting most of this library, because I had so many ideas that I wanted to apply 😅.

This makes it possible to switch the streams, by fetching the next segment from another VariantStream with the last sequence number+1

My reading of the spec is that,

media-sequence-number increments by 1 for each segment in the Media Manifest
discontinuity-sequence-number increments by 1 for each discontinuity in the Media Manifest

Is that your understanding too?
So, writing out explicitly the per-segment values that are implied by the manifest + spec-rules:

msm
dsn
m3u8

0
0
one.ts

1
0
two.ts

.
.
#EXT-X-DISCONTINUITY

2
1
three.ts

3
1
four.ts

Or with explicit headers,

msm
dsn
m3u8

.
.
#EXT-X-MEDIA-SEQUENCE:100

.
.
#EXT-X-DISCONTINUITY-SEQUENCE:5

100
5
one.ts

101
5
two.ts

.
.
#EXT-X-DISCONTINUITY

102
6
three.ts

103
6
four.ts

Further to my last comment , I also recall that there are not supposed to be any gaps in the sequence of MSN values, but I can't seem to find where this is stated or implied in the spec :fearful:
(And on that point, the 2nd edition spec introduces the X-GAP tag allowing the server to 'fill time' where media is missing, while maintaining the requirement for monotonically increasing MSN.)

My reading of the spec is that,

media-sequence-number increments by 1 for each segment in the Media Manifest
discontinuity-sequence-number increments by 1 for each discontinuity in the Media Manifest

Is that your understanding too?

Yes that is my understanding too. (Note: that I somehow ignored the discontinuity number, which should be inside the MediaSegment as a field (e.g. MediaSegment::discontinuity_number))

Further to my last comment , I also recall that there are not supposed to be any gaps in the sequence of MSN values, but I can't seem to find where this is stated or implied in the spec fearful

Each Media Segment MUST carry the continuation of the encoded
bitstream from the end of the segment with the previous Media
Sequence Number, where values in a series such as timestamps and
Continuity Counters MUST continue uninterrupted.  The only exceptions
are the first Media Segment ever to appear in a Media Playlist and
Media Segments that are explicitly signaled as discontinuities
(Section <IP_ADDRESS>).  Unmarked media discontinuities can trigger
playback errors.

https://tools.ietf.org/html/rfc8216#section-3
The RFC seems to indicate that gaps are allowed?

My quick prototype collection (a wrapper around Vec<Option<T>>) seems to be 17x faster than the BTreeMap:
Benchmarking SortedVec::insert_at: Collecting 10000 samples in estimated 5.0312                                                                                SortedVec::insert_at    time:   [6.6438 ns 6.6571 ns 6.6705 ns]
                        change: [+4.8759% +5.4093% +6.1275%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 1230 outliers among 10000 measurements (12.30%)
  562 (5.62%) high mild
  668 (6.68%) high severe

Benchmarking BTreeMap::insert: Warming up for 3.0000 s
Warning: Unable to complete 10000 samples in 5.0s. You may wish to increase target time to 8.5s or reduce sample count to 5420.
Benchmarking BTreeMap::insert: Collecting 10000 samples in estimated 8.4930 s (5                                                                                BTreeMap::insert        time:   [96.255 ns 96.414 ns 96.581 ns]
                        change: [-3.7088% -3.0317% -2.2841%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 916 outliers among 10000 measurements (9.16%)
  346 (3.46%) low severe
  291 (2.91%) low mild
  87 (0.87%) high mild
  192 (1.92%) high severe

Benchmarking Vec::push: Collecting 10000 samples in estimated 5.3234 s (450M ite                                                                                Vec::push               time:   [5.4963 ns 5.5109 ns 5.5257 ns]
                        change: [+8.6607% +10.698% +12.587%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 736 outliers among 10000 measurements (7.36%)
  373 (3.73%) high mild
  363 (3.63%) high severe

I will make a PR against your fork later today (or tomorrow) :)

Simply using a Vec is not an option, because one could insert an element anywhere and all the following elements would be moved, which destroys the order of the segments.

So I guess I had naively assumed that callers could arrange for segments to be submitted 'in order'.  Sounds like you have more advanced usages in mind?  For me, it seems reasonable to require that insert-order == manifest-order, but I care far more about parsing today than I do about generating :smile:

Further to my last comment , I also recall that there are not supposed to be any gaps in the sequence of MSN values

The RFC seems to indicate that gaps are allowed?

I'm sorry, that earlier "not supposed to be any gaps" statement was just my confusion :)

I think adding a parsing library would make it more difficult for people to contribute this this library, because they would have to first understand nom.
I would rather use a custom trait (Parser) and some kind of struct that can be used to get tokens from the stream

I've not done the latter part, but FWIW I pushed a change to the branch which drops nom, so its 'just' a recursive descent parser in plain old rust now.  Overall structure is the same, but no higher-order functions etc now. NB this parser does still depend on memchr (search for a u8) and lexical-core (parse numbers from &[u8]) crates.  There may be a way to get equivalent performance to memchr using only std, but I didn't dig into that yet.  The use of lexical-core rather than std is on the basis that the std functions would require checked utf8 conversion up front, and I'm betting that skipping this is a win - I've not profiled that change separately yet.
I can take a look at moving to some kind of mutable cursor, rather than threading &[u8] through all parser function inputs/outputs.

Small update from my side:
I just replaced almost all instances of String with Cow<'a, str>, which gave a huge performance boost:
Benchmarking MediaPlaylist::from_str/MediaPlaylist::from_str: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 28.1s or reduce sample count to 20.
                                                                                Benchmarking MediaPlaylist::from_str/MediaPlaylist::from_str: Collecting 100 sam                                                                                MediaPlaylist::from_str/MediaPlaylist::from_str
                        time:   [5.5804 ms 5.5952 ms 5.6146 ms]
                        thrpt:  [54.257 MiB/s 54.444 MiB/s 54.589 MiB/s]
                 change:
                        time:   [-5.6532% -4.4262% -2.9715%] (p = 0.00 < 0.05)
                        thrpt:  [+3.0625% +4.6311% +5.9920%]
                        Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
  6 (6.00%) high mild
  7 (7.00%) high severe

Benchmarking MediaPlaylist::try_from/MediaPlaylist::try_from: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 13.0s or reduce sample count to 40.
                                                                                Benchmarking MediaPlaylist::try_from/MediaPlaylist::try_from: Collecting 100 sam                                                                                MediaPlaylist::try_from/MediaPlaylist::try_from
                        time:   [2.5043 ms 2.5105 ms 2.5175 ms]
                        thrpt:  [121.00 MiB/s 121.34 MiB/s 121.64 MiB/s]
                 change:
                        time:   [+0.2180% +0.9366% +1.6358%] (p = 0.01 < 0.05)
                        thrpt:  [-1.6094% -0.9279% -0.2175%]
                        Change within noise threshold.
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) high mild
  3 (3.00%) high severe

The TryFrom::try_from version is ~44.8% faster than the old implementation.

Nice!
I've made one attempt at moving my parser over to using a custom Cursor type, changing function signatures from approximately
fn foo(input: &[u8]) -> std::result::Result<((&[u8], T), E> {

to
fn foo(input: &mut Cursor) -> std::result::Result<T, E> {

but I was unable to overcome lifetime issues :tired_face:

It would make more sense to change the function signatures to something like this
fn foo(input: &mut Cursor<'a>) -> Result<T, E>;

and the Cursor could be
use std::marker::PhantomData;

struct Cursor<'a, B = &'a [u8]>
where
    B: Buffer
{
    buffer: B,
    _p: PhantomData<&'a str>,
}

trait Buffer {
    fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>;

    // insert methods here required for a parsing?
    // for example:
    fn tag(&mut self, expected: &[u8]) -> Result<(), Error> {
        let mut buffer = Vec::with_capacity(expected.len());
        self.read(&mut buffer)?;
        if buffer == expected {
            Ok(())
        } else {
            unimplemented!("return error here")
        }
    }
}

impl<'a> Buffer for &'a [u8] {
    fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error> {
        unimplemented!()
    }
}

So to demonstrate where I got to, I've extracted out a small portion of the WIP code the shows the problem,
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=405eb072639b4e96fb164ba3a3737d21
error[E0499]: cannot borrow `*input` as mutable more than once at a time
  --> src/main.rs:33:37
   |
28 | fn ext_tag<'a, 'b: 'a>(input: &'b mut Cursor<'a>) -> Result<Tag<'a>, ParseError<'a>> {
   |            -- lifetime `'a` defined here
...
31 |     let res = ext_inf(input).map(|(duration, title)| Tag::ExtInf { duration, title });
   |               --------------
   |               |       |
   |               |       first mutable borrow occurs here
   |               argument requires that `*input` is borrowed for `'a`
32 |     if res.is_ok() { return res; }
33 |     let res = ext_program_date_time(input).map(Tag::ExtXProgramDateTime);
   |                                     ^^^^^ second mutable borrow occurs here

As you can see from all the annotations, I've been trying to play lifetime whack-a-mole, and have lost! :wink:
There are probably various strategies that can work around the lifetime issues by using additional types to defer ownership checks to runtime, however the goal of my exercise is to remove runtime costs!

As soon as I posted that last comment, I thought... hmm, those functions look kinda like they want to be instance methods.. :thinking:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=611f33fbdb623986601a26639e6c7e1d
...and indeed this transformation addresses the lifetime issues.  I will try this in the real codebase! :grin:

I believe mutable Cursor now working as of https://github.com/dholroyd/hls_m3u8/blob/bf87883501d16ab307010a978666443c25f3b3d7/src/parser.rs#L206
I'll rebase for your latest updates.

I've rebased my branch on master, gaining the Cow<str> changes too; here are the current standings in the throughput benchmarks,
from_str: ▇▇▇▇▇▇▇▇▇ 65.59
try_from: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 140.44
parser  : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 329.78

(MB per second; more is better)

I just made some benchmarks on MediaPlaylistBuilder::build and it seems like almost no time is spent verifying the input:
Current master branch:
Benchmarking MediaPlaylist::from_str/MediaPlaylist::from_str: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 30.2s or reduce sample count to 20.
                                                                                Benchmarking MediaPlaylist::from_str/MediaPlaylist::from_str: Collecting 100 sam                                                                                MediaPlaylist::from_str/MediaPlaylist::from_str
                        time:   [5.7206 ms 5.7604 ms 5.8021 ms]
                        thrpt:  [52.503 MiB/s 52.883 MiB/s 53.251 MiB/s]
                 change:
                        time:   [+1.8543% +3.5562% +5.2609%] (p = 0.00 < 0.05)
                        thrpt:  [-4.9979% -3.4341% -1.8205%]
                        Performance has regressed.
Found 16 outliers among 100 measurements (16.00%)
  8 (8.00%) high mild
  8 (8.00%) high severe

Benchmarking MediaPlaylist::try_from/MediaPlaylist::try_from: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 12.9s or reduce sample count to 40.
                                                                                Benchmarking MediaPlaylist::try_from/MediaPlaylist::try_from: Collecting 100 sam                                                                                MediaPlaylist::try_from/MediaPlaylist::try_from
                        time:   [2.5498 ms 2.5571 ms 2.5655 ms]
                        thrpt:  [118.74 MiB/s 119.13 MiB/s 119.47 MiB/s]
                 change:
                        time:   [-6.6711% -5.3264% -4.0808%] (p = 0.00 < 0.05)
                        thrpt:  [+4.2544% +5.6261% +7.1480%]
                        Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
  2 (2.00%) high mild
  2 (2.00%) high severe

Benchmarking MediaPlaylistBuilder/MediaPlaylistBuilder::build: Warming up for 3.                                                                                Benchmarking MediaPlaylistBuilder/MediaPlaylistBuilder::build: Collecting 100 sa                                                                                MediaPlaylistBuilder/MediaPlaylistBuilder::build
                        time:   [623.68 us 647.98 us 677.56 us]
                        change: [+4.7927% +7.0447% +9.8695%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
  5 (5.00%) high mild
  3 (3.00%) high severe

Without MediaPlaylistBuilder::validate:
Benchmarking MediaPlaylist::from_str/MediaPlaylist::from_str: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 31.7s or reduce sample count to 20.
                                                                                Benchmarking MediaPlaylist::from_str/MediaPlaylist::from_str: Collecting 100 sam                                                                                MediaPlaylist::from_str/MediaPlaylist::from_str
                        time:   [5.6478 ms 5.6973 ms 5.7631 ms]
                        thrpt:  [52.859 MiB/s 53.468 MiB/s 53.937 MiB/s]
                 change:
                        time:   [+5.4297% +7.0603% +8.8352%] (p = 0.00 < 0.05)
                        thrpt:  [-8.1179% -6.5947% -5.1501%]
                        Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe

Benchmarking MediaPlaylist::try_from/MediaPlaylist::try_from: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 16.1s or reduce sample count to 30.
                                                                                Benchmarking MediaPlaylist::try_from/MediaPlaylist::try_from: Collecting 100 sam                                                                                MediaPlaylist::try_from/MediaPlaylist::try_from
                        time:   [2.5807 ms 2.6233 ms 2.6721 ms]
                        thrpt:  [114.01 MiB/s 116.13 MiB/s 118.04 MiB/s]
                 change:
                        time:   [+1.8487% +3.5593% +5.4648%] (p = 0.00 < 0.05)
                        thrpt:  [-5.1817% -3.4370% -1.8151%]
                        Performance has regressed.
Found 15 outliers among 100 measurements (15.00%)
  8 (8.00%) high mild
  7 (7.00%) high severe

Benchmarking MediaPlaylistBuilder/MediaPlaylistBuilder::build: Warming up for 3.                                                                                Benchmarking MediaPlaylistBuilder/MediaPlaylistBuilder::build: Collecting 100 sa                                                                                MediaPlaylistBuilder/MediaPlaylistBuilder::build
                        time:   [566.60 us 568.95 us 572.01 us]
Found 4 outliers among 100 measurements (4.00%)
  2 (2.00%) high mild
  2 (2.00%) high severe

Without any kind of build verification:
Benchmarking MediaPlaylist::from_str/MediaPlaylist::from_str: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 27.9s or reduce sample count to 20.
                                                                                Benchmarking MediaPlaylist::from_str/MediaPlaylist::from_str: Collecting 100 sam                                                                                MediaPlaylist::from_str/MediaPlaylist::from_str
                        time:   [5.5241 ms 5.5325 ms 5.5415 ms]
                        thrpt:  [54.972 MiB/s 55.062 MiB/s 55.145 MiB/s]
                 change:
                        time:   [-8.4850% -6.9115% -5.4253%] (p = 0.00 < 0.05)
                        thrpt:  [+5.7365% +7.4246% +9.2717%]
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  6 (6.00%) high mild
  4 (4.00%) high severe

Benchmarking MediaPlaylist::try_from/MediaPlaylist::try_from: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 12.7s or reduce sample count to 40.
                                                                                Benchmarking MediaPlaylist::try_from/MediaPlaylist::try_from: Collecting 100 sam                                                                                MediaPlaylist::try_from/MediaPlaylist::try_from
                        time:   [2.4998 ms 2.5062 ms 2.5129 ms]
                        thrpt:  [121.23 MiB/s 121.55 MiB/s 121.86 MiB/s]
                 change:
                        time:   [-2.5795% -1.8418% -1.0523%] (p = 0.00 < 0.05)
                        thrpt:  [+1.0635% +1.8764% +2.6478%]
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  7 (7.00%) high mild
  1 (1.00%) high severe

Benchmarking MediaPlaylistBuilder/MediaPlaylistBuilder::build: Warming up for 3.                                                                                Benchmarking MediaPlaylistBuilder/MediaPlaylistBuilder::build: Collecting 100 sa                                                                                MediaPlaylistBuilder/MediaPlaylistBuilder::build
                        time:   [571.44 us 589.05 us 608.32 us]
                        change: [-11.326% -7.9614% -4.7652%] (p = 0.00 < 0.05)
                        Performance has improved.

as can be seen only a few MBs can be gained from skipping the builder.

Yup, I think it's fair to say that validation isn't the biggest concern, I can see it's about 2-3% of this cargo flamegraph profile on master...

...much more significant on master is the amount of time spent in segments() (35-40% of runtime), where all the items collected in the Vec get moved into the StableVec instance.  One of the changes in my branch is to have the parsing process directly construct the StableVec representation, so that this work can be avoided:
https://github.com/dholroyd/hls_m3u8/blob/58f354cb06af952037aec385b00aa2bbb6ccfe27/src/parser.rs#L205
For avoidance of doubt, I want to manifests validated - this is one of my goals in using this crate - it's just that my priority in the short term is iterating on performance.  My branch shouldn't be merged without validation working just as well as now, and all other tidy-ups etc being applied.

FWIW, on my branch the main offender (according to linux perf) now seems to be memmove...
+   29.90%  throughput  libc-2.30.so       [.] __memmove_avx_unaligned_erms
+    4.88%  throughput  [kernel.kallsyms]  [k] prepare_exit_to_usermode
+    4.37%  throughput  throughput         [.] core::slice::memchr::memchr
+    4.07%  throughput  throughput         [.] hls_m3u8::media_playlist::parse_media_playlist
+    3.62%  throughput  throughput         [.] <alloc::vec::Vec<T> as core::clone::Clone>::clone
+    2.73%  throughput  [kernel.kallsyms]  [k] native_irq_return_iret
+    2.70%  throughput  [kernel.kallsyms]  [k] clear_page_erms
+    2.57%  throughput  throughput         [.] core::str::<impl str>::trim
+    2.32%  throughput  throughput         [.] core::num::dec2flt::dec2flt
+    2.29%  throughput  throughput         [.] hls_m3u8::media_playlist::MediaPlaylistBuilder::build
+    2.13%  throughput  [kernel.kallsyms]  [k] sync_regs
+    2.08%  throughput  [kernel.kallsyms]  [k] error_entry
+    2.05%  throughput  [kernel.kallsyms]  [k] swapgs_restore_regs_and_return_to_usermode
+    1.83%  throughput  throughput         [.] <hls_m3u8::line::Lines as core::iter::traits::iterator::Iterator>::next
+    1.63%  throughput  throughput         [.] <hls_m3u8::line::Tag as core::convert::TryFrom<&str>>::try_from
+    1.61%  throughput  throughput         [.] <hls_m3u8::tags::media_segment::inf::ExtInf as core::convert::TryFrom<&str>>::try_from
+    1.60%  throughput  throughput         [.] <stable_vec::core::bitvec::BitVecCore<T> as core::clone::Clone>::clone
+    1.40%  throughput  throughput         [.] hls_m3u8::media_playlist::MediaPlaylistBuilder::segments
+    1.26%  throughput  throughput         [.] hls_m3u8::media_segment::MediaSegmentBuilder::build
+    1.18%  throughput  throughput         [.] core::str::SplitInternal<P>::next

Looking at the flamegraph, this cost seems to be spread out across a number of functions, and with no obvious 'explicit' data movement that I can tie it to.  I am guessing that this must be due to the remaining uses of intermediate representations that need to be copied to arrive at the final MediaSegment value in the vec.
I would like to see if there's a way to arrange things that will convince rustc to optimise more of these moves away / construct the final value in-place.  Not sure how, but seems worth a try!

I've added a couple of additional commits to my branch:
Originally, I had copied the Line and Tags types into the parser (with slightly different signatures to those in master) to decouple the 'parser' from the 'builders'.  Turns out that wrapping the intermediate values from the parser into these types was the largest source of the memmov() cost showing up in profiling.  https://github.com/dholroyd/hls_m3u8/commit/da1a53bfb5ae4b55f0ac40854aed2bd3548e9132 removes these types and has the parser call methods on the builder directly.  This gives me around a 100% increase in throughtput in the benchmark, vs the performance of the parser-perf branch before this change.
Next, https://github.com/dholroyd/hls_m3u8/commit/c855f48ee132f8833a304ca2872bf79d48fbfaf0  alters MediaSegment so that all fields are optional (i.e. including the mandatory fields representing the URI and EXINF values :scream:).  Then, we can have our in-progress segment list end with an 'all-None' MediaSegment, and fill-in attributes of this segment as they are discovered.  On top of the last change, this one gives an additional throughput increase of around 19%.
Current benchmark standings:
from_str: ▇▇▇▇ 63.58
try_from: ▇▇▇▇▇▇▇▇▇▇ 138.08
parser  : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 641.73
(MB per second; more is better)

Wow that is amazing 😍

https://github.com/dholroyd/hls_m3u8/commit/21b7fdcb733f25c8232ec570a95712efb9925449 puts some restrictions on the format of floating point numbers when parsing the duration value from every EXTINF tag - another 10% or so throughput (and stops us accepting things like 123.0E+77, that the HLS spec does not allow anyway).

On my branch right now, the costly activities that stand out in the profile are:

24% - parsing EXTINF duration into f64
15% - pushing new segments onto the StableVec
10% - UTF-8 checks on URI values
6%  - DATERANGE parsing
6% - Dropping the StableVec once we are done with a parsed MediaManifest instance

I see maybe one more major win for my usage, which to start tracking state across multiple subsequent reloads of a live manifest, and to avoid the full parsing pipeline for sections of the manifest that are unchanged.  Note that all segments are expected to be the same from one reload to the next except that 1) one (or more) segment is added onto the end, 2) one (of more) old segments may be removed from the start.  For a very long manifest, the vast majority of segments will be the same, so this might be a profitable strategy (less so for very small live manifests, I expect).  I think this is better tacked as a follow-up ticket / PR though.

I'd like to work towards getting master achieving the same level of performance as my experimental branch.  I think at least the following problems make the work on my branch unsuitable for merging right now:

The parser there only handles a tiny subset of HLS tags that are handled by master
There's a different interface to my parser (to enable comparative benchmarks vs. existing parser)
The code is not tested by any of the existing unit tests
The existing validation logic is being skipped
Error handling in some spots is missing (println!() etc.)

If these were addressed, would a PR using the design in https://github.com/dholroyd/hls_m3u8/tree/parser-perf be accepted?  I'd like to address design concerns before writing lots more code.

I would prefer if you could integrate your improvements into the existing types, by for example having a TryFrom<&[u8]> or TryFrom<Cursor> implementation and the MediaSegment fields that are required should not be optional. The rest seems to be fine :)

It might make sense to create a new trait for this e.g.
trait ParseFrom {
    type Error;

    fn try_from_cursor(_: &mut Cursor) -> Result<Self, Self::Error>;
}

impl<T: ParseFrom> TryFrom<&[u8]> for T {
    // ...
}

Maybe something like this would be better
pub enum Poll<T> {
    Ready(T),
    Pending
}

trait Parser {
    type Error;

    fn parse<R: Read>(_: R) -> Poll<Result<Self, Self::Error>>;
}

I think currently it would be better to not expose your parser to the user, so it can be changed in the future.


How to make comments not indented?

Support question

How to make comments not indented?
code:
<?php

declare(strict_types=1);

function test(bool $a)
{
// test-1
    if ($a) {
        return 1;
    } else {
        return 0;
    }
// test-2
}

fix in 3.4.0:
<?php

declare(strict_types=1);

function test(bool $a)
{
    // test-1
    if ($a) {
        return 1;
    } else {
        return 0;
    }
    // test-2
}

expected:
<?php

declare(strict_types=1);

function test(bool $a)
{
// test-1
    if ($a) {
        return 1;
    } else {
        return 0;
    }
// test-2
}

Hi,
This change is done by the braces rule, so if you don't want this change to happen you would have to disable that rule.
The style with the not-indent comments is not something we actively (going to) support.
If you want more details I about what is going on I suggest to run the tool with -vvv to get all the details about applied rules.
Thanks for your question, good luck!


Handling of 403 Forbidden

The docs on Authentication state that:

Upon receiving a 403 response, the admin app shows the Login page.

This is wrong isn't it?
My understanding has always been:

Anon tries to access restricted page

Is user authenticated?  No?  => 401 Unauthorized  (should be: Unauthenticated)

User logs in as 'John'
John tries to access restricted page

Is user authenticated?  Yes, as 'John'
Does 'John' have permissions?  No? => 403 Forbidden  (meaning: Unauthorized)

Sending to a login page is only sensible if the user is not logged in yet. If 403 is returned, it means the user is logged in, but still not allowed access. He should first log out and then log in as a different user.

By default, if you provided an authClient a failed fetch will redirect to the login page.
However, you can customize it easily. See Catching Authentication Errors On The API.

My point was more that 403 effectively means 'you are logged in but do not have permission', so an error page might be more appropriate then a login page. But thanks anyway!

I agree with @Download . In my case, there is not loginPage and I would like to show a pop-up / custom page saying user is not entitled. Is that possible ?

Everything is possible, since it's your authClient that conveys the logout logic.

I did promise.reject(redirect to...). But it always goes to my login page and not to custom redirected page. Any sample.please ?

Whenever you reject a promise in the authClient, it goes to the login page. If you want to add a custom redirection in reaction to a custom event, you'll have to add a custom saga.

OK thanks, I commented on an already asked question on SO - https://stackoverflow.com/a/47527414/763026
Could you please answer that ?
How and where do you define this custom action ? Also in the sample link, where is definition for BITCOIN_RATE_RECEIVED i.e. how is this action being registered with Admin app ?

StackOverflow is the right place to ask "How To" questions, please don't cross-post here.

OK, may be 2nd part is !How to" but could please clarify this (related to your earlier response) ?
Redirection in reaction to a custom event
I am not reacting to custom event. I am reacting to AUTH_ERROR and this type is a valid type in authClient. So, in AUTH_ERROR I want to redirect to custom page. How is the custom event related here  to 'AUTH_ERROR' type ? I am sorry - I am not very clear.

You can't have a side effect in the authClient. The only way is to react to actions in a custom saga. AUTH_ERROR isn't an action, it's an auth verb. The action you should react to is FETCH_ERROR.
This is definitely a "how to" question, so please go to SO for further details.

@fzaninotto
My original issue still stands however:

Upon receiving a 403 response, the admin app shows the Login page.

This is simply wrong/unexpected behaviour.
Redirect to login page is expected upon 401 response:

10.4.2 401 Unauthorized
The request requires user authentication.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2

The meaning of 403 is that access is simply denied for the current credentials:

10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4
(emphasis mine)

I've already answered that: handling of HTTP error codes is done by the authClient, therefore it's on your side. Admin-on-rest lets you do whatever you want. See e.g.
https://github.com/marmelab/admin-on-rest/blob/05ecacddfe2efbb492d6d096d5d25ad11e9d9084/example/authClient.js#L38-L41
There is no instance of 401 or 403 in the admin-on-rest code.

I see this behavior with the default auth client.

Thanks a lot, much appreciated!


"Large" Data Table Error

Datasets deemed "too large" by DataTable are not properly loaded into application. Issue appears to be kubernetes releated (shinyproxy or ingress-nginx).

This is an issue the kubernetes team is fixing

data.table package version appears to be the issue. Version 1.16.2 appears to work


Manage Control (IP restriction/Rate limiting) throws error when user delete existing config and add new config of the same scope

Step 1: Mark login to the portal
Step 2: Click on Consumer ID from Consumer Page
Step 3: Click on Edit button in Product table
Step 4: Set IP restriction/rate limiting config for Service or Route scope by click on Apply button (Do not click on Save button)
Step 5: Delete the applied Control by click on trash bin symbol
Step 6 : Set another IP restriction/rate limiting config of the same scope and click on Apply button
Step 7: Click on Save button
Actual Result : Manage Control (IP restriction/Rate limiting) throws error user delete existing config and add new config of the same scope

This is a low priority issue. Users are unlikely to undertake this action and the error is reasonable for the moment.


Not working for Bombay-10

terra_sdk version: latest
Python version: 3.7
Operating System: Linux

Description
I am trying to fetch the total supply to test the API.
Working fine for tequila-0004.
When I change testnet to Bombay-10 it give me 501.
What I Did

import asyncio
from terra_sdk.client.lcd import AsyncLCDClient

async def main():

	terra = AsyncLCDClient("https://bombay-lcd.terra.dev","bombay-9")
	total_supply = await terra.supply.total()
	print(total_supply)
	#await terra.session.close # you must close the session

asyncio.get_event_loop().run_until_complete(main())

@hanjukim

supply.total() has moved bank.total() for 1.0


Lost editor contents on upgrade

VSCode Version: 1.11.0 and the one before that
OS Version: 10.12.4

Steps to Reproduce:

open new window, paste text in new editor, don't save it
quit and start vscode => text remains
upgrade => text is gone :(

I can reproduce.
@Tyriar fyi

This is a regression from https://github.com/Microsoft/vscode/commit/36731c60e277509b55e5f2eeaf44003e31663ad6

The good news is that I was able to find back my contents by grepping for a string I knew under Library/Application Support/Code :)

@wmertens that was lucky, when I tested it the backups are gone after a restart. So as long as you are not restarting, the backups are probably untouched.

We are about to release 1.11.1 with a fix...

We released 1.11.1 with a fix. Again very sorry for this serious regression, I added steps to our smoke test to verify updates better in the future so that this does not happen again.

And thank you for such a quick turnaround!
On Thu, Apr 6, 2017, 5:58 PM Benjamin Pasero<EMAIL_ADDRESS>wrote:

We released 1.11.1 with a fix. Again very sorry for this serious
regression, I added steps to our smoke test
https://github.com/Microsoft/vscode/wiki/Smoke-Test to verify updates
better in the future so that this does not happen again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/23999#issuecomment-292220584,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADWlu3APkwl5dYHAeN3MKRJS-i5jFlmks5rtQujgaJpZM4M1MPt
.

Thanks for the quick fix!
A tip for anyone using macOS that lost data and it's already gone. If you have Time Machine backups, restore ~/Library/Application Support/Code/Backups from before you updated and use ripgrep to find it 😄 (thanks @wmertens for the idea).

Good work

Thank you!


Always create webjobs-blobtrigger-poison queue in BlobTrigger

When a BlobTrigger fails to process a blob change, it creates a message in a storage queue named webjobs-blobtrigger-poison. This queue is created the first time a message is put in it. We want to monitor the poison queue for errors, but our monitoring fails for new Function Apps where no errors have occurred yet, because the queue does not exist.
Repro steps
Deploy a Function App with a BlobTrigger.
Expected behavior
The webjobs-blobtrigger-poison queue should exist.
Actual behavior
The webjobs-blobtrigger-poison queue does not exist, and is only created later when an error occurs.
Known workarounds
We will change our monitoring to report success when the webjobs-blobtrigger-poison queue does not exist. This adds a risk that if our monitoring is configured to look for the queue in the wrong place, we will not notice since an incorrect monitor configuration is indistinguishable from when no errors have occurred yet. Alternatively we could create the queue ourselves, but that gives the same risk that we may accidentally create the queue in the wrong location, and when an error later occurs, it will be written to a different webjobs-blobtrigger-poison queue than the one we monitor.
Related information
https://github.com/Azure/azure-webjobs-sdk/blob/dev/src/Microsoft.Azure.WebJobs.Extensions.Storage/Queues/StorageQueueExtensions.cs

//cc: @seanmcc-msft, @amnguye


Reference Points in Deformable Attention

Hello,
I was trying to re-implement the code such that it can be ONNX compatible, I have a doubt about about the references points:

Why is the padding area included in the computation of reference points? is there any practical reason? I would like to exclude those eventually https://github.com/fundamentalvision/Deformable-DETR/blob/11169a60c33333af00a4849f1808023eba96a931/models/ops/modules/ms_deform_attn.py#L81
Can valid ratio be excluded from the computation of reference points?  as described here? https://github.com/fundamentalvision/Deformable-DETR/issues/36#issue-782561963
It can give nans if the padding is not done on the bottom right corner, and at the same it seems unnecessary as of today. However it can be useful if we want the refence points in the padding area to be excluded.

Thanks for your time!

Hey, were you able to convert it into ONNX format ?


idempotent batch delta ingestion

give user the option to specify the segments for dataSource inputSpec,
so that they can do "idempotent" delta ingestion.
Fixes #2099

@gianm I added a new coordinator endpoint to get list of used segments given a dataSource and list of intervals which looks like..
POST /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments

body - [interval1, interval2,...]

I don't like it being a POST api but can't think of a cleaner way of getting list of intervals in a GET based api. thoughts?

@himanshug I think POST is ok, it makes it a lot easier to deal with potentially large intervals lists that are too big for the url.

@himanshug this looks good to me, one issue remaining is that users could accidentally lose ingested data if the following happens,

process A starts a delta ingestion using this method, it fails
process B updates that interval with some new data
process A starts a delta ingestion using this method, it succeeds, wiping away data from (2)

or even,

process A reads list of segments
process B updates data for that interval
process A submits delta ingest job, wiping away data from (2)

This could be addressed using overlord locking, by having the hadoop task check on start that the segments in the ingestion spec actually correspond to the currently-used segments. Then the retry would be both idempotent and safe (it would protect against the race above).
if you prefer not to do this now, then I think this PR could go through as-is (since the method in this PR works OK if there is some external locking on the user's side) but we should file an issue to fix this for the case where the is no external locking.

@gianm added the check to be safe as well as idempotent.

awesome @himanshug, will take a look.

@himanshug looks good, had a couple comments.

@gianm all comments addressed

awesome :+1:


VSCode - Seem unable to get perltidy to trigger

Good day,
I managed to configure everything as I would like with critic and perlimports, the only issue I face is with perltidy, even though I can use it from command line with no issue and I have a fairly standard ~/.perltidyrc ( I even tried removing it just incase ).
But no matter what I do, be it saving the file or looking for perltidy in the 'power menu'(sp? - ctrl shift p) I cannot get perltidy to trigger, I checked for any extensions that could possible be interfering and can find nothing.
My config has the following:

    "perlnavigator.enableWarnings": true,
    "perlnavigator.perlcriticEnabled": true,
    "perlnavigator.perlcriticProfile": "~/.perlcriticrc",
    "perlnavigator.perltidyEnabled": true,
    "perlnavigator.perltidyProfile": "~/.perltidyrc",
    "perlnavigator.perlimportsLintEnabled": true,
    "perlnavigator.perlimportsTidyEnabled": true,
    "perlnavigator.perlimportsProfile": "~/.perlimports.toml"

Is anyone able to offer any insight?

Closing for now, but feel free to re-open if I misunderstood.


it's necessary to add an api of change offset for partitionconsumer

Problem Description
it's necessary to add an api of change offset for partitionconsumer

Can you not just close the partitionconsumer and start a new one with the new offset?

i think it's convenient to set offset directly

It would be convenient initially but it becomes unfortunately complicated because of the asynchronous nature of consuming. There may already be messages buffered for the old offset or requests already in flight to the server, so you would still have to write a bunch of code to handle the old messages, check offset values, and figure out when the first message at the new offset was actually consumed. Shutting down and recreating the partition-consumer is actually fairly inexpensive in most cases, and provides a very clean well-defined break between the old offset and the new one.

@eapache  you are right, and i will change my code with a different way


Translate content length limitation

In source code will pass token via the following url:
https://translate.google.com/translate_a/single? + querystring.stringify(data);
As i know the query string in URL has the length limit, so what's translation content length limit for this api?

the limitation should be clearly stated.


fix(spark): output columns of expand relation

Fix the logic for deriving whether each output column of the expand relation is nullable or not.
If one or more of the projections can assign null to the column, then it must be defined as nullable.

@andrew-coleman ah this has a conflict in the tests it enables, mind merging/rebasing main in? :)


Warn users on using statistics functions without weights

Fixes #69

Codecov Report

Merging #74 into master will increase coverage by 0.89%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage   84.95%   85.85%   +0.89%
==========================================
  Files           9        9
  Lines         472      502      +30
==========================================
+ Hits          401      431      +30
  Misses         71       71

Impacted Files
Coverage Δ

esmlab/statistics.py
97.11% <100%> (+1.16%)
:arrow_up:

Continue to review full report at Codecov.

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

Codecov Report

Merging #74 into master will increase coverage by 0.89%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage   84.95%   85.85%   +0.89%
==========================================
  Files           9        9
  Lines         472      502      +30
==========================================
+ Hits          401      431      +30
  Misses         71       71

Impacted Files
Coverage Δ

esmlab/statistics.py
97.11% <100%> (+1.16%)
:arrow_up:

Continue to review full report at Codecov.

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

@andersy005, do you need any help pushing this over the line?

Thank you, @matt-long! I am planning to take another stab at it later today and will let you know how it goes

Thank you, @matt-long for reviewing this!


Godot4: Orthographic camera3d returns different depth result in shader from Godot3

Godot version
4.0-beta1
System information
Linux
Issue description
I'm porting a silhouette shader from Godot 3 to 4 and I may have found a regression.
The shader works as expected if the camera is using a perspective projection but not if I change to an orthoganal one.
In Godot 3.5 it works in both modes.
Godot 3 shader
void fragment( ){
  float depth = texture(DEPTH_TEXTURE, SCREEN_UV).x;
  vec3 ndc = vec3(SCREEN_UV, depth) * 2.0 - 1.0;
  vec4 view = INV_PROJECTION_MATRIX * vec4(ndc, 1.0);
  view.xyz /= view.w;
  float linear_depth = -view.z;

  float vz = -VERTEX.z;

  ALBEDO = color.rgb;
  ALPHA = color.a * float( vz > linear_depth + bias);
}

Godot 4 shader
void fragment( ){
  float depth = texture(DEPTH_TEXTURE, SCREEN_UV).x;
  vec3 ndc = vec3(SCREEN_UV * 2.0 - 1.0, depth);
  vec4 view = INV_PROJECTION_MATRIX * vec4(ndc, 1.0);
  view.xyz /= view.w;
  float linear_depth = -view.z;

  float vz = -VERTEX.z;

  ALBEDO = color.rgb;
  ALPHA = color.a * float( vz > linear_depth + bias);
}

Steps to reproduce
I uploaded a zip file with 2 sample projects, one for Godot 3 and one for Godot 4.
If you run the project, by pressing ENTER you will toggle between the 2 camera modes.
You can also view this from the editor, by changing the projection.
Minimal reproduction project
GodotoShaderIssue.zip
Godot 3.5 Orthographic projection - working as expected

Godot 3.5 Perspective projection - working as expected

Godot 4 Orthographic projection - NOT working

Godot 4 Perspective projection - working as expected

This is probably not a bug. The DEPTH value's range was changed to conform to the Vulkan specification: https://github.com/godotengine/godot/issues/61065#issuecomment-1127098250

This is probably not a bug. The depth value's range was changed in 4.0 to conform to the Vulkan specification: #61065 (comment)

It is taking into account the new value range, I followed the doc.
This in Godot3 vec3 ndc = vec3(SCREEN_UV, depth) * 2.0 - 1.0;  was changed in this vec3 ndc = vec3(SCREEN_UV * 2.0 - 1.0, depth);  in Godot 4.
For convenience I added the 2 shaders in the description above.

Don't know how much it helps to add to this, but I'm seeing the same behavior.  I'm trying to replicate the volumetric clouds shader from a Sebastien Lague video, and while I get results with a perspective Camera3D, I get no results with an Orthographic Camera3D.

I think this is the same issue as https://github.com/godotengine/godot/issues/68878
@linnal try changing INV_PROJECTION_MATRIX to inverse(PROJECTION_MATRIX)

Could this also be the reason why the Proximity Fade and Linear Scene Depth visual shader nodes don't work when using an orthographic camera in Godot 4 rc 2?

Definitely a duplicate, can we close this in favor of https://github.com/godotengine/godot/issues/68878?


Bug: [DebugBar] 4.5.0 TypeError: str_contains(): Argument #1 ($haystack) must be of type string, null given

PHP Version
8.2
CodeIgniter4 Version
4.5.0
CodeIgniter4 Installation Method
Composer (as dependency to an existing project)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
apache
Database
Mysql 8
What happened?
When defining a custom filter in app/Config/Filters.php with specific URI patterns and using the codeigniter4/shield package for authentication, the Debug Toolbar throws a TypeError if the filter triggers a redirect. This issue seems to arise from how the Debug Toolbar processes responses, particularly when a controller or filter returns a non-standard response or null.

Steps to Reproduce

In app/Config/Filters.php, define a before filter rule for specific paths, excluding some with a regex pattern, as shown below:
public array $filters = [  'session' => [      'before' => [          '^myadminendpoint(?!/login|/register|/auth/a/)([a-zA-Z0-9/-]+)?$',      ]  ] ];
Ensure the before filter (e.g., session filter from codeigniter4/shield) is configured to return a redirect under certain conditions.
Access a URL that matches the filter's criteria and triggers the redirect.

Expected Output
The application should redirect to the specified location without any errors, even with the Debug Toolbar enabled.
Anything else?
Workaround
Temporarily removing the Debug Toolbar from the $globals and $required arrays in the after filters configuration resolves the issue.

Try #8727

When will this be online in master for download / update?

It will done when it done.
You can use develop branch while wait for new release https://codeigniter.com/user_guide/installation/installing_composer.html#latest-dev and help us give more feedback in case of any regression.


Default config.QUANT_ID and config.PROTEIN_ID not used on import

Describe the bug
Somehow the default values defined for config.QUANT_ID and config.PROTEIN_ID are not set when importing directlfq as module.
The result is a rather confusing pandas error None of [None, None] are in the columns for users.
It can be mitigated by calling lfqconfig.set_global_protein_and_ion_id(protein_id = 'protein', quant_id = 'ion') before.
To Reproduce
Steps to reproduce the behavior:

import direct LFQ
call directLFQ on a dataframe with default columns protein and ion.

Logs
Traceback (most recent call last):
  File "d:\alphadia\alphadia\planning.py", line 274, in run
    output.build(workflow_folder_list, base_spec_lib)
  File "d:\alphadia\alphadia\outputtransform.py", line 365, in build
    _ = self.build_protein_table(folder_list, psm_df=psm_df, save=True)
  File "d:\alphadia\alphadia\outputtransform.py", line 571, in build_protein_table
    protein_df = qb.lfq(
  File "d:\alphadia\alphadia\outputtransform.py", line 269, in lfq
    lfq_df = lfqutils.index_and_log_transform_input_df(intensity_df)
  File "D:\Maria\anaconda\envs\alpha\lib\site-packages\directlfq\utils.py", line 323, in index_and_log_transform_input_df
    data_df = data_df.set_index([config.PROTEIN_ID, config.QUANT_ID])
  File "D:\Maria\anaconda\envs\alpha\lib\site-packages\pandas\core\frame.py", line 5859, in set_index
    raise KeyError(f"None of {missing} are in the columns")
KeyError: 'None of [None, None] are in the columns'
0:00:57.756267 ERROR: Output failed with error 'None of [None, None] are in the columns'
'None of [None, None] are in the columns'

Version (please complete the following information):

Installation Type Pip on windows
directLFQ 0.2.13

Zerwas Schorschä, thanks for the feedback! Should be fixed in the new version.


fix: use crate version for user agent

Uses the version from Cargo.toml to determine the default User-Agent version

@ajhunyady I will get some tests on this before asking for review!

bors r+

bors r+

bors r+

bors r+


Enhancing the footer section

The footer section can be improved with, the company logo with a tag line on left side and on the right side we can have a latest type section which lists the link of most recent events and hackathons about to happen, the company section and the social section
@J-Harsh could you please assign it to me under GSSOC23

Hey, can you elaborate on what you mean by "type" section?
Your idea seems neat, just explain it a bit more and I will assign it to you

Okay so we can add a Latest Section which would have links to the next Most recent according to date, events, hackathons
This could redirect to the page where there would be detailed description about these

Ok, I am assigning you this issue under the gssoc'23. Good luck working

I 'll be adding the PR to this issue by today, sorry if it took time, my college exams are ongoing

#233 fixes this, @J-Harsh could you please review it


Fix helm create sample chart appVersion: with quotes

This PR updates helm create command for the sample chart and adds quotes to the version appVersion: "1.16.0"
As there are many docker tags which do not follow semver, so in YAML it is float, for example appVersion: 14.0 it will the helm lint, adding quotes appVersion: "14.0" it makes the string and helm lint will not fail for the chart.
The conclusion is that not wrapping it in quotes can lead to issues in some cases. That by doing it by default it can help people avoid those.

/assign @mattfarina

needs another maintainer's approval before this can be merged as per our contribution policy.

👍


Create an Envoy PR for the extauth module

The Envoy extauth module (as demonstrated) works; it's time to get it into the Envoy core.

https://github.com/envoyproxy/envoy/pull/2621


Update StructureMap to <IP_ADDRESS>

Various bugs in StructureMap have been fixed.
From the release notes:
"Fixes for open generics convention resolution, child containers and policies,
naming conflicts between setters and ctor arguments"
Link: https://github.com/structuremap/structuremap/issues?q=is%3Aissue+milestone%3A3.1.5+is%3Aclosed
Took extra care to include the project files so that a commit like 05d8c2c74f4d6e0f24405e83e17b1afff7c18dfd is not needed.

Thanks :ok_hand:


Vagrant Repo/Directory Name

There's not much you can do about this besides changing the meta name to chef-golang... but.. If the meta name does not match the directory name while using Vagrant, Chef complains that the template file does not exist in template/default/golang.sh.erb  (it looks in /golang/templates/default/ for some reason)
This can be easily fixed by simply renaming the directory after cloning, but it's an annoying bug to have to troubleshoot and I bet I'm not the only one who's had to do so.  Perhaps adding a warning in the README would suffice.

The repo name now matches the cookbook name, thanks to its change in ownership. Closing this out.


SDK code generation

I'm working on a new feature for the SDK; leveraging Netbeans code generator API to help with some of the boiler plate code. Currently it generates a Savable class and the read and write methods with all the fields in the class, I'm also working on a generator for ActionListenerInterface with accompanying methods.
This is part of a more long term plan that we'll see if I get to implementing fully.
The question is where this goes. It's "core" stuff, but I'm a bit reluctant to add more features to the main SDK. If anything, it feels like it should be split up more. I currently have it in a plugin of its own, but the classes are self contained, so they can be moved around easily.

Maybe they fit into jme3-codepalette? That's those drag-and-drop code snippets you can use and while being more sophisticated, this issue falls into a similar category, I think.
Certainly a good decision to not keep it in jme3-core, actually the core is probably too bloated already anyway, nbm/osgi especially provide tools for a nice modularity, so we can build on that.
And as a side-effect: the less dependency on "gde-core", the easier you can build nbms even in their own repository without having to build the whole SDK first

Reopening this now that there is something meatier to discuss. I made an initial plugin for this here: https://github.com/neph1/HoolockCodeGenerator
And I'm wondering if I should push it to jme3-codepalette instead, or if 3rd party plugins are working in the SDK again?
Using jme3-codepalette would ensure uptake since it would take a long time for people to discover user made plugins again. At the same time, would it make sense to keep it outside the sdk altogether? (for maintenance purposes).
Will the SDK ever move towards more CI with modular updates of separate nbm's?

In general you can build SDK plugins, I have a few repositories on my github (i.e. directx-support, jme3-ai?, etc), the problem with those, however, was that if they don't depend on netbeans itself but the SDK, it was more difficult, because you had to git clone the sdk and build it first so you can build modules in-place (i.e. as a regular module as a subfolder of the sdk suite thing).
If you have a look at https://github.com/jMonkeyEngine/sdk-update-center and specifically the foo and foo-xml branch, there we have a github hosted plugin repository, the knowledge is just not very common (and especially the nightly branch is also dangerous, it would upgrade your sdk version from 3.3 to 3.4 to 3.5, but not upgrade netbeans itself.
We would need to find a process on how to integrate third-party modules into that (or even if we'd clone that repository), the only technical difficulty is, that they are added as a release to the repo (or be hosted somewhere else, but that's not good, it may disappear etc).
I'd see somehow submitting a PR containing a nbm or something, but then how do we establish trust? If repositories were canonical, we could also pull and build them (difficulty here being they need to be of the same form and we'd somehow need to be able to merge XMLs or something).
But then now that we have our hetzner box, we could also just host our nbm and have some small git bot or something to not need github (but I think it doesn't matter much)


How to do face effects

Is it possible to use it to automatically do facial effects such as making nose smaller or eyes bigger (no mouse clicks)? How can we do that with good quality like filters we see on Instagram or Snapchat?
Any tips or samples would be appreciated.

Sure, checkout the old branch here: https://github.com/wysaid/android-gpuimage-plus/tree/face_features
I did not previously find a suitable open-source library for face landmark recognition, and the functionality of the one I have chosen is not as accurate either.

Sure, checkout the old branch here: https://github.com/wysaid/android-gpuimage-plus/tree/face_features
I did not previously find a suitable open-source library for face landmark recognition, and the functionality of the one I have chosen is not as accurate either.

So it's deprecated for now.

Why don't you update that Branch? I think an automatic filter would be more desirable than click based

I didn't find a suitable open-source library for face landmark detection at that time. However, if you know any, could you please recommend a few to me?

Yes, google ML kit looks good. I played with it a bit. It has both face landmark detection and face mesh. I just don't know how to use them for facial effects and warping.

Looks good, I'll give it a try, but it won't be so fast. You can also try providing a PR for this feature.

I don't have much to contribute but sure. I'll stay tuned. This a lovely feature and let's do it!

try MediaPie


Format-Table with centered calculated property misaligns the column label

This is a regression from Windows PowerShell.
Steps to reproduce
[pscustomobject] @{ one = 1 } |
  Format-Table @{ l='one'; e='one'; width=10; alignment='center' }

Expected behavior

   one
   ---
    1

Actual behavior

one
   ---
    1

Note how the column header (one) is misaligned.
Environment data

PowerShell Core v6.2.0-preview.2 on macOS 10.14.1
PowerShell Core v6.2.0-preview.2 on Ubuntu 18.04.1 LTS
PowerShell Core v6.2.0-preview.2 on Microsoft Windows 10 Pro (64-bit; Version 1803, OS Build: 17134.407)

/cc @SteveL-MSFT In our discussion about escapes I just meant that we will fix such problems endlessly.


Multiple=true not reactively updated on client while removing all values

Hello,
I have an issue with multiple=trueon a select field. I need to remove the multiple values on the server manually:

Schema:

"teamIds": {
      type: [String],
      optional: true,
      autoform: {
        multiple: true,
        noselect: true,
        options: function () {
          return [{value:"val",label:"label"}, {value:"val2",label:"label2"}];
        },
        placeholder: "schemaLabel"
      },

On server method:

      // hack to remove teamIds
      if(modif.$unset && modif.$unset.teamIds === ''){
        delete modif.$unset.teamIds;
        modif.$set.teamIds = [];
      }

Without this hack, the client doesn't remove the values, even the server side saved it correctly. Only on page reload the behaviour is correct.
Any thoughts on this? Thanks!

I haven't seen this bug. Please provide a full reproduction in the form of a cloneable repo or MeteorPad.


CORE-4697: Prevent consumers auto creating topics even if the setting is set in the brokers

The auto create topics configuration needs to be set on the broker for this to happen. However, if this is set then the consumers in Corda will currently auto create topics. All our deployment options should be creating topics up front, so this change should act as an extra guard to prevent auto creation if a mistake is made when setting up the broker.

I thought this was a server side config for this that should be set on the brokers rather than client side?
auto.create.topics.enable

I thought there was a server side config for this that should be set on the brokers rather than client side? auto.create.topics.enable

It turns out both exist. If you set that to true then the consumers will only auto-create topics if you also have the consumer side config set to true. My argument is that we never want to do auto creation so turning both off is safest.


flutter_localization uses dart:html unsupported for building for web with --wasm

The in version 3.22 introduced web assembly compile feature does no longer support dart:HTML. flutter_localisation still depends on that package for web and the build command therefore fails with the following error:
Flutter 3.22.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b0850beeb2 (3 weeks ago) • 2024-07-16 21:43:41 -0700
Engine • revision 235db911ba
Tools • Dart 3.4.4 • DevTools 2.34.3

Target dart2wasm failed: ProcessException: Process exited abnormally with exit code 64:
*NOTE*: Compilation to WasmGC is experimental.
The support may change, or be removed, with no advance notice.

../../.pub-cache/hosted/pub.dev/flutter_localization-0.2.1/lib/flutter_localization_web.dart:5:8: Error: Dart library 'dart:html' is not available on this platform.
import 'dart:html' as html show window;
       ^
Context: The unavailable library 'dart:html' is imported through these packages:

    web_plugin_registrant.dart => package:flutter_localization => dart:html

Detailed import paths for (some of) the these imports:

    main.dart => web_plugin_registrant.dart => package:flutter_localization/flutter_localization_web.dart => dart:html

../../.pub-cache/hosted/pub.dev/flutter_localization-0.2.1/lib/flutter_localization_web.dart:23:26: Error: Undefined name 'window'.
    final version = html.window.navigator.userAgent;
                         ^^^^^^
  Command: /usr/bin/flutter/bin/cache/dart-sdk/bin/dart compile wasm --packages=.dart_tool/package_config.json --extra-compiler-option=--dart-sdk=/usr/bin/flutter/bin/cache/dart-sdk
  --extra-compiler-option=--platform=/usr/bin/flutter/bin/cache/flutter_web_sdk/kernel/dart2wasm_platform.dill --extra-compiler-option=--delete-tostring-package-uri=dart:ui
  --extra-compiler-option=--delete-tostring-package-uri=package:flutter --extra-compiler-option=--import-shared-memory --extra-compiler-option=--shared-memory-max-pages=32768 -Ddart.vm.product=true
  -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/235db911ba279722f5e685f38b0ed30fa7e8570a/ -DFLUTTER_WEB_AUTO_DETECT=false -DFLUTTER_WEB_USE_SKIA=false -DFLUTTER_WEB_USE_SKWASM=true
  --extra-compiler-option=--depfile=/home/sebastian/StudioProjects/tsvcoach_app/.dart_tool/flutter_build/9b1a33ccdfb365d646fd0a03d6abbb77/dart2wasm.d -O4 --no-name-section -o
  /home/sebastian/StudioProjects/tsvcoach_app/.dart_tool/flutter_build/9b1a33ccdfb365d646fd0a03d6abbb77/main.dart.wasm
  /home/sebastian/StudioProjects/tsvcoach_app/.dart_tool/flutter_build/9b1a33ccdfb365d646fd0a03d6abbb77/main.dart
#0      RunResult.throwException (package:flutter_tools/src/base/process.dart:125:5)
#1      _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:321:19)
<asynchronous suspension>
#2      Dart2WasmTarget.build (package:flutter_tools/src/build_system/targets/web.dart:329:5)
<asynchronous suspension>
#3      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:875:9)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart:524:21)
<asynchronous suspension>
#5      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32)
<asynchronous suspension>
#6      Future.wait.<anonymous closure> (dart:async/future.dart:524:21)
<asynchronous suspension>
#7      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32)
<asynchronous suspension>
#8      FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:642:16)
<asynchronous suspension>
#9      WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:92:34)
<asynchronous suspension>
#10     BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:230:5)
<asynchronous suspension>
#11     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1394:27)
<asynchronous suspension>
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#13     CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#14     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:372:9)
<asynchronous suspension>
#15     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#16     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:308:5)
<asynchronous suspension>
#17     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)
<asynchronous suspension>
#18     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#19     main (package:flutter_tools/executable.dart:93:3)
<asynchronous suspension>

Compiling lib/main.dart for the Web...

@skiunke Thank you for reporting, and sorry for being late replying. I will check and fix the issue soon.


[avx][avx2][fma] Gate high-power-draw instructions behind additional cargo features

256-bit multiplies as well as all 512-bit ops draw more power and so clock down the core. Thus, we should potentially limit them behind a cargo feature so that you opt into them.
Also 512-bit multiplies are an additional level beyond that, so they can be separated again.

We'd want them to be off by default, so this'll be breaking, but not that breaking since people can just flip on the flag when they go to the next version if they still need it..

Upon thinking more, it's probably easier for the crate to have no features at all. A crate that wraps safe_arch could choose to make this exclusion, if desired.


Add Bluesky links for Foundation, Asset Store and Conference

@coppolaemilio I don't have the rights to merge myself.


⚠ Bofrost.de has degraded performance

In 7591f0a, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1974 ms

Resolved: Bofrost.de performance has improved in 30fd11f after 21 minutes.


GitHub Codespaces Feedback: client app is damaged and can't be opened.

Description
Steps to reproduce
Impact
Additional context
OS Version: 13.0.1
OS Architecture: aarch64
IDE Version: 2022.2.4
Plugin Version: <IP_ADDRESS>6
Plugin path: /Users/yoda/Library/Application Support/JetBrains/Toolbox/apps/Gateway/ch-0/222.4459.11/JetBrains Gateway.app.plugins/github-codespaces-gateway
Plugin ID: com.github.codespaces.jetbrains.gateway

Hey @IRus, sorry for the friction. There's currently a known issue with ventura that's causing this problem, please check out the instructions here to work around it.

@thomas-sickert I figure out that I'm actually using stable version of Gateway, updated to EAP and now it works fine with Codespaces.


Option to disable link styling

I really like using this extension to paste formatted text into Discord, but Discord unfortunately doesn't support links [like this](https://example.com). It just shows that without formatting and makes the https://example.com part clickable.
So an option to either disable link styling entirely and only copy the link's text (so the above example would look like this) or an option to remove the brackets but still have the URL in parentheses like this (https://example.com) would be much appreciated!

Agreed. I have similar use case with Slack. Allow me think how I can implement your request.

Hey @zebzorb I just released v0.15.0 which implements new setting "Disable link styling." Hope this helps your use case. Open an issue if you find any problem. Thanks!

Hey, thanks so much! Works great.


clientv3/integration: rename partition tests

To be consistent with TestBalancerUnderShutdown*
https://github.com/coreos/etcd/pull/8758

lgtm


tcp_server example, read till the end

Read data till would block or closed connection with extendable vector.

Thanks.


Internal bug: item_relative = item.relative_to(root_absolute)

Running  check-cmake 0.5.1 by check-cmake --recurse . on ubuntu 24.04 from a venv triggered an exception:
*************

You appear to have triggered an internal bug!
Please file an issue at github.com/marzer/check-cmake/issues
Many thanks!

*************

Traceback (most recent call last):
  File "/home/me/project/venv/lib/python3.12/site-packages/check_cmake/main.py", line 240, in main_impl
    check_directory(args.root)
  File "/home/me/project/venv/lib/python3.12/site-packages/check_cmake/main.py", line 169, in check_directory
    check_directory(item)
  File "/home/me/project/venv/lib/python3.12/site-packages/check_cmake/main.py", line 169, in check_directory
    check_directory(item)
  File "/home/me/project/venv/lib/python3.12/site-packages/check_cmake/main.py", line 116, in check_directory
    item_relative = item.relative_to(root_absolute)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/pathlib.py", line 682, in relative_to
    raise ValueError(f"{str(self)!r} is not in the subpath of {str(other)!r}")
ValueError: '/usr/bin/python3.12' is not in the subpath of '/home/me/project/'

Hmmm, interesting 🤔 . Thanks for the report, I'll look into it.


no 'thres2' in MGCSampleStat function of Matlab code

Hi, I tried your new matlab code for MGC, but it gave me the error as follows:
Undefined function or variable 'thres2'.
Error in MGCSampleStat (line 55)
if mean(mean(R))>=thres2 % proceed only when the region
area is sufficiently large
Error in MGCPermutationTest (line 36)
statMGC=MGCSampleStat(localCorr); % sample MGC for
the observed data

thanks! it is fixed now.


Not exactly spase solution of l1-penalized least-squares

I am trying to solve some least-squares problems regularized by convex non-smooth penalties (such as l1-matrix i.e LASSO, or nuclear norm). Although the LASSO solution of a least-squares problem is supposed to be exactly sparse, i.e the solution vector (or matrix in my case) entails components which are exactly zero, I noticed that the LASSO solution returned by the CVXR solver is not exactly sparse. In other words, some components of the solution are very small (~10^-15), but not exactly 0, and the relevant ones much bigger (~10^-1).
I noticed the issue with the generated data used for the tutorial on ElasticNet on CVRX website, where one can see that in the table1 (LASSO-path), the "almost zero components" of the solutions have been rounded to 3 digits.
Is there a way to get an exact sparse solution with CVXR ?
To get an exact sparse solution, I did as in the CVXR ElasticNet tutorial i.e I rounded the components of the returned solution to 2 or 3 digits. However, it is a pretty empirical approach isn't it ? In practice, it is not possible to know whether the true non-zero components of the solution are order 10^1, 10^0,... hence it is hard to threshold the digits of the true zero components of the solution (and not really in the spirit of LASSO-like problems).
NOTE
I know that I could solve the problem outside CVXR, with proximal methods, and the solution would result exactly sparse but for some convex penaIties it is hard for me to compute the proximal operators analytically. I would like to experiment different convex penalties quickly on my problem, and that's why I decided to learn to use CVXR.
Thanks !

The solvers all deal with doubles and so anything ~1e-15 is effectively zero. So you can set a zero threshold and force the solution components that are this small in absolute value to be zero upon return from CVXR.
But the larger point is that this is solver behavior. Some solvers like glmnet use active sets, where the coefficients for variables not in the active set are directly set to zero. Other solvers, of course, work differently.
The natural follow-up is then: can a solver like glmnet be used with CVXR? Yes, in the experiments we have done. But no promises yet.


Fix default trait processing

I was processing the default trait incorrectly. Clients should only use the default trait when the required trait is also present. In any other situation the default trait is a server only trait.
Related Code Generator commit is 461c2fe33a31eb8ee703fc4ed80601f56835c7d3

It is reverting changes made earlier that were never released so it isn't an issue


Ignore the rest of the Chameleon snippet when it's already on the page.

Just a small change for a customer who recently turned us on via Segment (but had already integrated us directly in the past).

Not entirely sure what this change is, but generally we recommend people don't install a tool both outside  and within segment.

@f2prateek I completely agree, however we can't always control what a user does and does not do. This is especially true when we change their user interface or present things to their users -- we can't afford to get anything wrong.
The change is simply to not override the actual implementation of some basic functions (identify, track, etc) when Chameleon is already on the page.
Furthermore in situations when customers will eventually install via Segment we allow them to preview Chameleon with a Chrome Extension. In the time after the snippet is enabled with Segment and when they remove the extension then we'd see problems as well.

c.root is a reference to the "root" dom node that we add to the page when Chameleon is download -- it's a simple check to see if we should proceed with adding Chameleon to the page or if we should not.

Mind rebasing? Sorry about that!

@sperand-io @f2prateek rebased and tests passing and ready to go.

@sperand-io ping, just bringing this back up on your list -- it's important to our customers to have this merged in. Thanks

@ndhoule @sperand-io @stevenmiller888 I'm not sure what I can do to move this along -- its a small change that is currently impacting our (and your) paying customers!!


Default compare to last save

Now that mysql takes forever to query, maybe default to comparing against the last save.

Implemented