util: portable_atomic_unstable_coerce_unsized cfg option

(with minor CI & documentation updates)
STATUS: PROPOSED - REVIEW REQUESTED
Adapted from Rust std library - this adds automatic casting to Arc as discussed in issue #143 behind portable_atomic_unstable_coerce_unsized cfg option ... of course this would only work with Rust nightly until custom unsized coercions is stabilized ref: https://github.com/rust-lang/rust/issues/18598
MOTIVATION: enable more straight-forward support for rustls on no-std targets without built-in atomics ref: https://github.com/rustls/rustls/issues/2068 (using an internal alias as an easy way to select between alloc::sync::Arc vs portable_atomic_util::Arc as needed) as @brodycj has proposed now in rustls/rustls#2200
P.S. IIRC I think I have seen a lot of the smaller embedded CPU targets more likely to be built with Rust nightly anyways, thinking it would be much more straightforward to add this coercion support than one of the other alternative workaround ideas discussed above.
ALTERNATIVE SOLUTIONS CONSIDERED for https://github.com/rustls/rustls/issues/2068:

use internal aliasing of Arc to alloc::rc::Rc, if needed to support a target with no built-in atomics - I have already tried this solution in https://github.com/rustls/rustls/pull/2088 ... this seems to suffer from multiple forms of API mangling with ugly API trait macros to conditionally include Send & Sync traits depending on using Arc vs Rc
add & support use of utility functions or macros to support multiple casting workarounds - I have started working on this kind of workaround and have found the required API changes to be a bit messy & potentially hard-to-document

I think this proposal should be much, much cleaner & more straightforward than either of the alternative solutions above.
CI TESTING - UPDATED:

added one more step to test with portable_atomic_unstable_coerce_unsized cfg option
skip testing with --cfg portable_atomic_test_outline_atomics_detect_false on arm-linux-androideabi, with note that this was removed due to an apparent issue I encountered between Rust nightly & QEmu in CI testing (note that there seems to be testing of --cfg portable_atomic_test_outline_atomics_detect_false with armv5te among some other targets so I suspect & hope that this should be sufficient to test --cfg portable_atomic_test_outline_atomics_detect_false)

In case we DO need to preserve testing with --cfg portable_atomic_test_outline_atomics_detect_false on arm-linux-androideabi, any pointers that could help me resolve the CI testing issue I encountered would be extremely helpful.

TODO ITEMS - UPDATED:

TODO items are tracked by XXX TODO & XXX @brodycj (TODO) comments.
I would like to raise separate PRs for some TODO improvements as already discussed in the XXX / TODO comments.

I have raised PR #199 to update a test label & think I have been able to resolve all other TODO items required for this proposal.

Is there any plan regarding the stabilization of this feature? I do not want to rely unconditionally on a feature that is forever unstable or expected to change many times in the future.

Is there any plan regarding the stabilization of this feature?

https://github.com/rust-lang/rust/issues/18598 - unfortunately it seems to be held up on what looks like a somewhat theoretical discussion:

Things to consider prior to stabilization

Interaction with pin, see this internals thread and  Pin is unsound due to transitive effects of CoerceUnsized #68015 for details.

Would you be open to adding this behind a new, optional feature?

Would you be open to adding this behind a new, optional feature?

Cargo feature would be a bad idea for unstable ones. cfg like tokio_unstable is okay.

cfg like tokio_unstable is okay.

Makes sense to me. The one thing is that this would make rustls non-atomic-ptr support I proposed in rustls/rustls#2200 a little harder to build, test, and document. Any ideas or pointers you may have would be very much appreciated. (Working with Rust embedded is still pretty new for me.)
/cc @bjoernQ

@taiki-e would you or anyone else have any ideas why this step is failing for arm-linux-androideabi?
      - run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
        env:
          # Note: detect_false cfg is intended to make it easy for portable-atomic developers to
          # test cases such as has_cmpxchg16b == false, has_lse == false,
          # __kuser_helper_version < 5, etc., and is not a public API.
          RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} --cfg portable_atomic_test_outline_atomics_detect_false
          RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg portable_atomic_test_outline_atomics_detect_false
        # powerpc64 is skipped because tested below.
        if: (matrix.target == '' && !contains(matrix.rust, 'i686') || startsWith(matrix.target, 'x86_64')) || startsWith(matrix.target, 'aarch64') && !(contains(matrix.target, '-musl') && matrix.flags == '') || startsWith(matrix.target, 'armv5te') || matrix.target == 'arm-linux-androideabi'

Here is the output where it seems to freeze & fail:
       Running `qemu-arm /home/runner/work/portable-atomic/portable-atomic/target/careful/arm-linux-androideabi/debug/deps/portable_atomic_util-df94732931c39258`
  linker: /home/runner/work/portable-atomic/portable-atomic/target/careful/arm-linux-androideabi/debug/deps/portable_atomic_util-df94732931c39258: unsupported flags DT_FLAGS_1=0x8000001
  WARNING: linker: /home/runner/work/portable-atomic/portable-atomic/target/careful/arm-linux-androideabi/debug/deps/portable_atomic_util-df94732931c39258: unsupported flags DT_FLAGS_1=0x8000001
  Error: The operation was canceled.

From a quick search this looks like some kind of issue with PIE or PIC. This seems to only happen with the changes I proposed in this PR. We could skip this step for arm-linux-androideabi but I think it would be bad practice to skip this without investigating.
I will continue investigating on my end just wanted to see if anyone else may have any ideas or pointers that can help me out.
I am hoping to get this proposal ready for review to unblock my proposal in rustls/rustls#2200.

I now see known test failures that I had injected for cfg portable_atomic_unstable_coerce_unsized option in the 2 most recent CI runs, see this in https://github.com/taiki-e/portable-atomic/actions/runs/11940560422/job/33283563705?pr=195 for example:
failures:

  ---- alloc_tests::test_downcast stdout ----
  thread 'alloc_tests::test_downcast' panicked at portable-atomic-util/tests/arc.rs:687:9:
  assertion `left == right` failed
    left: "-abc"
   right: "abc"
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/ee612c45f00391aff71ec0c52b7fc08fae18c711/library/std/src/panicking.rs:665:5
     1: core::panicking::panic_fmt
               at /rustc/ee612c45f00391aff71ec0c52b7fc08fae18c711/library/core/src/panicking.rs:76:14
     2: core::panicking::assert_failed_inner
     3: core::panicking::assert_failed
               at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:373:5
     4: arc::alloc_tests::test_downcast
               at ./tests/arc.rs:687:9
     5: arc::alloc_tests::test_downcast::{{closure}}
               at ./tests/arc.rs:658:23
     6: core::ops::function::FnOnce::call_once
               at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  error: test failed, to rerun pass `--test arc`
     7: core::ops::function::FnOnce::call_once
               at /rustc/ee612c45f00391aff71ec0c52b7fc08fae18c711/library/core/src/ops/function.rs:250:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  ---- alloc_tests::test_into_from_raw_unsized stdout ----
  thread 'alloc_tests::test_into_from_raw_unsized' panicked at portable-atomic-util/tests/arc.rs:271:9:
  assertion `left == right` failed
    left: "-123"
   right: "123"
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/ee612c45f00391aff71ec0c52b7fc08fae18c711/library/std/src/panicking.rs:665:5
     1: core::panicking::panic_fmt
               at /rustc/ee612c45f00391aff71ec0c52b7fc08fae18c711/library/core/src/panicking.rs:76:14
     2: core::panicking::assert_failed_inner
     3: core::panicking::assert_failed
               at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:373:5
     4: arc::alloc_tests::test_into_from_raw_unsized
               at ./tests/arc.rs:271:9
     5: arc::alloc_tests::test_into_from_raw_unsized::{{closure}}
               at ./tests/arc.rs:249:36
     6: core::ops::function::FnOnce::call_once
               at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
     7: core::ops::function::FnOnce::call_once
               at /rustc/ee612c45f00391aff71ec0c52b7fc08fae18c711/library/core/src/ops/function.rs:250:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  failures:
      alloc_tests::test_downcast
      alloc_tests::test_into_from_raw_unsized

  test result: FAILED. 44 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.17s

error: process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo test --tests -v --manifest-path portable-atomic-util/Cargo.toml --features std` (exit status: [101](https://github.com/taiki-e/portable-atomic/actions/runs/11940560422/job/33283563705?pr=195#step:16:102))

I will now remove the - signs that I had injected for cfg portable_atomic_unstable_coerce_unsized option that I had injected into these 2 test cases to move forward with hopefully-green CI builds.

@taiki-e I think this should be ready for another review. As I said above, I still do not understand how I should fix the issue you identified in my updates to portable-atomic-util/build.rs. Considering our difference in location and time zone, I am wondering if it might be easier if I can let you resolve this issue, and take co-author credit for all of these changes.
I did already add your name as co-author given your help with rewording some of the documentation updates that I had proposed.
If everything else looks good, it would help me if you can make the required updates and consider merging this. If you want to make any other minor updates before merging, I would be happy with this as well.
If we merge this, a new release would help me continue with rustls/rustls#2200. Thanks!

Published in portable-atomic-util 0.2.4. Thanks @brodycj!

@taiki-e thanks to you for your part in making & publishing this update - so much appreciated for this now unblocking my work in rustls/rustls#2200 🎉


FontManager.RenderBitmap() access violation exception

Release Type: Github
Version: Master git branch
Platform(s): Windows
Describe the bug
Creating and loading a new project results in Stride crashing at startup.
To Reproduce
Steps to reproduce the behavior:

Create a new project for example, "AnimatedModel" in my example.
Wait for the scene to load
Crash at line 155

var renderingMode = character.AntiAlias == FontAntiAliasMode.Aliased ? RenderMode.Mono : RenderMode.Normal;

inside FontManager.cs
Expected behavior
I expected the scene to load sucessfully...
Log and callstacks
An unhandled exception of type 'System.AccessViolationException' occurred in SharpFont.dll
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Callstack
 	[Managed to Native Transition]
 	SharpFont.dll!SharpFont.GlyphSlot.RenderGlyph(SharpFont.RenderMode mode)	Unknown
	Stride.Graphics.dll!Stride.Graphics.Font.FontManager.RenderBitmap(Stride.Graphics.Font.CharacterSpecification character, SharpFont.Face fontFace) Line 155	C#
 	Stride.Graphics.dll!Stride.Graphics.Font.FontManager.BuildBitmapThread() Line 320	C#
 	Stride.Core.dll!Stride.Core.Diagnostics.SafeAction.Wrap.AnonymousMethod__0() Line 21	C#
 	System.Private.CoreLib.dll!System.Threading.Thread.StartHelper.Callback(object state)	Unknown
 	System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
 	System.Private.CoreLib.dll!System.Threading.Thread.StartCallback()	Unknown

Additional context
In the debugger, FontFace.GlyphCount throws a overflow error. Same with fontFace.StyleFlags

Update 1: I have found out that this issue doesn't exist on the lastest release <IP_ADDRESS>8

With the latest master commits, this seems to happen randomly when modifying UI pages.

can you try in the fontmanager using this as line 144 and try to replicate it?
character.Glyph.XAdvance = fontFace.Glyph.Advance.X.ToSingle() * 64f;
using this stops stride from crashing when adding a UI page to a camera

It's most likely a non deterministic bug. At least I don't understand the circumstances needed to exactly reproduce this issue.
https://github.com/stride3d/stride/issues/1750
Behaviour may be different from each commit. YMMV.

Fixed by #1999 .


Split GWT reflection cache into two generated classes

Not sure if this is the best solution to the issue, but I constantly find myself running into the "too many constants" error while compiling for GWT, so this is a "dumb" solution that splits the collected classes in half and allocates them to separate ReflectionCacheSourceCreator instances. The ReflectionCache class, in turn, proxies to both generated caches while first searching for a class then stores a reference to that cache in the created Type for later invocations.

Very useful! Any change it could be made dynamic? Perhaps extra setting to set number of caches.

Very useful! Any change it could be made dynamic? Perhaps extra setting to set number of caches.

@piotr-j
I don't think it is possible to arbitrarily generate caches due to limitations with GWT deferred binding. As far as I know, a dedicated interface is required for each generated class. In addition, to actually instantiate one of the caches at runtime, a class has to be hard coded into the GWT.create(IReflectionCache2.class); function calls. This would mean that we could make the code a bit more dynamic to support 3 caches, for instance, but the maximum number would need to be set in code by creating that many interfaces in actual source files, which would probably negate the usefulness of such a feature completely, since there shouldn't be much of a performance difference between having three caches and one cache, since the only slight difference in functionality occurs when acquiring a Class. Instead of hashing the class name and using it in an enormous switch statement once, we hash the name n times and use it in n switch statements that are (1/n)th the size (though if it really mattered we could re-use the hash for all of the caches).
GWT Deferred Binding Documentation

@piotr-j
I don't think it is possible to arbitrarily generate caches due to limitations with GWT deferred binding. As far as I know, a dedicated interface is required for each generated class. In addition, to actually instantiate one of the caches at runtime, a class has to be hard coded into the GWT.create(IReflectionCache2.class); function calls. This would mean that we could make the code a bit more dynamic to support 3 caches, for instance, but the maximum number would need to be set in code by creating that many interfaces in actual source files, which would probably negate the usefulness of such a feature completely, since there shouldn't be much of a performance difference between having three caches and one cache, since the only slight difference in functionality occurs when acquiring a Class. Instead of hashing the class name and using it in an enormous switch statement once, we hash the name n times and use it in n switch statements that are (1/n)th the size (though if it really mattered we could re-use the hash for all of the caches).
GWT Deferred Binding Documentation

Ah thats a shame! If there is no significant its probably fine as is. Perhaps make it 3 caches just in case?

Ah thats a shame! If there is no significant its probably fine as is. Perhaps make it 3 caches just in case?

Honestly, I think 2 caches are all that is needed. I just did a test by creating a project with Gdx-liftoff and included every GWT compatible library available. As expected, with a single cache it failed to compile, but with 2 caches, both generated caches were a little under 34000 lines. Since you normally have to reach over 60000 lines, give or take a bit, two should be sufficient.

Honestly, I think 2 caches are all that is needed. I just did a test by creating a project with Gdx-liftoff and included every GWT compatible library available. As expected, with a single cache it failed to compile, but with 2 caches, both generated caches were a little under 34000 lines. Since you normally have to reach over 60000 lines, give or take a bit, two should be sufficient.

It's possible to generate multiple source files from the generator and make it dynamic, such that it only creates multiple files if needed, might not be worth the hassle but certainly possible to do.

It's possible to generate multiple source files from the generator and make it dynamic, such that it only creates multiple files if needed, might not be worth the hassle but certainly possible to do.

That does seem to be the case. I had assumed it wasn't possible because the generate function just returned a single string with the name of the generated class, but looking at the JavaDocs for that function does seem to indicate that it isn't required to do that. It looks like the only way to accomplish something like that would be having the GWT.create function return a factory of some sort to return the different caches.
It does look like it's overkill, though, since two caches should be enough for just about anyone.
Stack Overflow Answer

That does seem to be the case. I had assumed it wasn't possible because the generate function just returned a single string with the name of the generated class, but looking at the JavaDocs for that function does seem to indicate that it isn't required to do that. It looks like the only way to accomplish something like that would be having the GWT.create function return a factory of some sort to return the different caches.
It does look like it's overkill, though, since two caches should be enough for just about anyone.
Stack Overflow Answer

I figured out how to do the dynamic generation and got some working code to do so, so it wouldn't be too difficult to implement if we wanted the functionality. It could be specified via GWT config properties to add any number of caches and equally split the classes between them. Might not be worth the effort, though, since two should be enough and doing it this way probably adds unnecessary complexity. There seems to be dead code in ReflectionCacheSourceCreator class, though, which made it seem a bit more complicated than it was. Or, at the very least, I can't tell what it is supposed to do and removing it seems to have no effect.
Here's an extremely rough test that only serves to demonstrate that the dynamic generation works: https://github.com/TheLogicMaster/libgdx/commit/cf7c5c6984ec4a7c1d335d0370e4b4ae1ad7f4de

I figured out how to do the dynamic generation and got some working code to do so, so it wouldn't be too difficult to implement if we wanted the functionality. It could be specified via GWT config properties to add any number of caches and equally split the classes between them. Might not be worth the effort, though, since two should be enough and doing it this way probably adds unnecessary complexity. There seems to be dead code in ReflectionCacheSourceCreator class, though, which made it seem a bit more complicated than it was. Or, at the very least, I can't tell what it is supposed to do and removing it seems to have no effect.
Here's an extremely rough test that only serves to demonstrate that the dynamic generation works: https://github.com/TheLogicMaster/libgdx/commit/cf7c5c6984ec4a7c1d335d0370e4b4ae1ad7f4de

Yeah, there is dead code in there. I used the createProxy method to test generating multiple files and consuming them before making the last comment. It likely is more complexity than it is worth.

I'm so glad this GWT limitation can be overcome, and without any really hairy code, too. I am not 100% sure if just selecting libraries in liftoff will cause the reflection cache to be expanded in the generated project, but that would make sense because the .gwt.xml files with the include-into-the-reflection-cache instructions probably get evaluated regardless of whether the code is used. I mean, the 3D model parts of libGDX's reflection cache get added even for purely 2D games.

Perhaps the default config for included types could be split?
So it could be in user xml config:
	<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
	<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt_tiled' />
	<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt_2d' />
	<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt_3d' />

Ability to exclude entire folders/packages would be an alternative of sorts, but that is probably harder to do.

I feel like inheriting gwt files like that is a better option than excluding packages, since it allows categorizing the libgdx systems beyond their containing packages and is more elegant. It sounds like the project should be generated with all of the subsystems inherited by default and you remove any ones you don't need to hopefully reduce the build size but still have it build by default. The only negative effect of having additional cache entries, assuming we are going to split it in half, should be an increase in load times. I haven't tested the difference, but the built cache easily exceeds 6MB before being obfuscated, so that could be a real concern. The runtime performance difference of adding more cached entries should be negligible since everything is nicely hashed.

I did a small test to see if minimizing the reflection cache would be beneficial in terms of build size and it looks like it would be a good idea to categorize the includes by subsystem. By removing all of the gdx packages from the cache, around 1.5MB was saved from the build, which could make a substantial difference for load times if Scene2d or 3D isn't needed, for instance.

Splitting the libGDX module file sounds like a good idea, but a quick google search didn't bring anything up on how I would actually go about excluding any modules.  Regardless, I think this discussion is beyond the scope of this PR and should be split into its own issue.
Back to the original PR: are there any opinions on whether or not to merge this?

Merge! Merge! Merge!
I think just the fact that this makes a previously-impossible build failure, and now makes it effortless for users to get building, is great. We can worry about splitting up the GWT modules in libGDX in another commit, since that might be trickier than it seems (some 3D-related code is used even by 2D code, and UIUtils in scene2d.ui is used in other places).

Since there's talk of actually merging it, I cleaned up a copied helper function from when I didn't think splitting it would actually work.

It looks like this PR was half-forgotten in the process of releasing 1.10.0 . Does anyone else want to review? @MrStahlfelge , who uses GWT heavily and is an expert on the topic? I think this is a pretty important step towards mitigating one of the harshest limitations of GWT, effectively "Game scale cannot exceed X", where X is tied to the reflection cache.

So, I can confirm that this does have issues when given a very very large pool of constants. This 2-part pool is actually exhaustible if you just stick whole, large, packages in the reflection cache without rhyme or reason.
I tried adding the latest squidlib and squidlib-util, large libraries, in full to the cache. Of course, this is a terrible idea, but I'm testing.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.2//EN"
        "http://www.gwtproject.org/doctype/2.8.2/gwt-module.dtd">
<module rename-to="html">
    <source path="" />
    <inherits name="com.badlogic.gdx.backends.gdx_backends_gwt" />
    <inherits name="com.github.tommyettinger.demos.TsarDemo" />
    <inherits name="regexodus" />
    <inherits name="squidlib" />
    <inherits name="squidlib-util" />
    <extend-configuration-property name="gdx.reflect.include" value="squidpony.squidmath" />
    <extend-configuration-property name="gdx.reflect.include" value="squidpony.squidgrid" />
    <extend-configuration-property name="gdx.reflect.include" value="squidpony.squidai" />
    <extend-configuration-property name="gdx.reflect.include" value="squidpony.squidgrid.mapping" />
    <extend-configuration-property name="gdx.reflect.include" value="squidpony.squidgrid.mapping.styled" />
    <extend-configuration-property name="gdx.reflect.include" value="squidpony.squidgrid.gui.gdx" />
    <entry-point class="com.github.tommyettinger.demos.gwt.GwtLauncher" />
    <set-configuration-property name="gdx.assetpath" value="../assets" />
    <set-configuration-property name="xsiframe.failIfScriptTag" value="FALSE"/>
    <set-property name="user.agent" value="gecko1_8, safari"/>
    <collapse-property name="user.agent" values="*" />
</module>

On the first dist, I get this:
      Tracing compile failure path for type 'com.badlogic.gwtref.client.IReflectionCache2Generated'
         [ERROR] Errors in 'generated://C12ED3E00A94C3FA603D417F1D3DAC89/com/badlogic/gwtref/client/IReflectionCache2Generated.java'
            [ERROR] Line 7: Too many constants, the constant pool for IReflectionCache2Generated would exceed 65536 entries
   [ERROR] Errors in 'generated://C12ED3E00A94C3FA603D417F1D3DAC89/com/badlogic/gwtref/client/IReflectionCache2Generated.java'
      [ERROR] Line 7: Too many constants, the constant pool for IReflectionCache2Generated would exceed 65536 entries
   Tracing compile failure path for type 'com.badlogic.gwtref.client.IReflectionCache2Generated'
      [ERROR] Errors in 'generated://C12ED3E00A94C3FA603D417F1D3DAC89/com/badlogic/gwtref/client/IReflectionCache2Generated.java'
         [ERROR] Line 7: Too many constants, the constant pool for IReflectionCache2Generated would exceed 65536 entries
   [ERROR] Hint: Check that the type name 'com.badlogic.gwtref.client.IReflectionCache2Generated' is really what you meant
   [ERROR] Hint: Check that your classpath includes all required source roots
   [ERROR] Errors in 'com/badlogic/gwtref/client/ReflectionCache.java'
      [ERROR] Line 23: Rebind result 'com.badlogic.gwtref.client.IReflectionCache2Generated' could not be found

Even weirder, when I set the user-agent as gdx-setup currently does, and re-run dist, I get this bizarre compiler crash:
   [ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
	at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:111)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
	at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
	at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
	at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
	at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
	at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
	at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
	at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:786)
	at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
	at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1401)
	at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)
	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
	at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
	at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
	at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
	at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
	at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
	at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
	at com.google.gwt.dev.Compiler.main(Compiler.java:125)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 0
	at org.objectweb.asm.ClassReader.readClass(Unknown Source)
	at org.objectweb.asm.ClassReader.accept(Unknown Source)
	at org.objectweb.asm.ClassReader.accept(Unknown Source)
	at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:228)
	at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
	at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:165)
	at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:41)
	at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:36)
	at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:100)
	at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:352)
	at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildGeneratedTypes(CompilationStateBuilder.java:638)
	at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.addGeneratedTypes(CompilationStateBuilder.java:228)
	at com.google.gwt.dev.javac.CompilationState.addGeneratedCompilationUnits(CompilationState.java:127)
	at com.google.gwt.dev.javac.StandardGeneratorContext.finish(StandardGeneratorContext.java:551)
	at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:526)
	at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
	at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
	at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
	at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
	... 40 more
      [ERROR] at ReflectionCache.java(23): GWT.create(IReflectionCache2.class)
      [ERROR] at ReflectionCache.java(23): (IReflectionCache) GWT.create(IReflectionCache2.class)
      [ERROR] at ReflectionCache.java(23): static IReflectionCache instance2 = (IReflectionCache) GWT.create(IReflectionCache2.class)
      [ERROR] at ReflectionCache.java(21): {
  Object.$clinit();
  static IReflectionCache instance1 = (IReflectionCache) new IReflectionCacheGenerated();
  static IReflectionCache instance2 = (IReflectionCache) GWT.create(IReflectionCache2.class);
}
      [ERROR] at ReflectionCache.java(21): {
  Object.$clinit();
  static IReflectionCache instance1 = (IReflectionCache) new IReflectionCacheGenerated();
  static IReflectionCache instance2 = (IReflectionCache) GWT.create(IReflectionCache2.class);
}
      [ERROR] at ReflectionCache.java(21): com.badlogic.gwtref.client.ReflectionCache.$clinit()V
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 0

> Task :html:compileGwt FAILED

So, I'm not sure what this means, but it is certainly possible to exhaust both 65536-item caches.

A perspective of a third party lib: https://github.com/junkdog/artemis-odb depends heavily on reflection for configuration.  I personally hit the 65535 limit with gdx+odb jam games fairly often. GDX+odb libs fill a decent part of it, so it easy to blow over the limit by including too much by accident.
Double the cache would fit most games, so why not start with that? It would also help if developers could spot scoping mistakes more easily during compilation. The current reflection cache generation logging could report on scope when the limit is hit for example.
(As a side note, we actually have run a copy of the GDX reflection logic in odb for our non-GDX users. We'd love for the reflection logic to be available as a separate package so our libGDX users save some memory).

All we need is some people actually testing. The only approval here is "just looking through the source here", that's not enough to merge. Given the fact that there were often complaints about the problem, I wonder why no one fired up their IDE to test for nearly 5 months now.

All we need is some people actually testing. The only approval here is "just looking through the source here", that's not enough to merge. Given the fact that there were often complaints about the problem, I wonder why no one fired up their IDE to test for nearly 5 months now.

Hi! Did you see https://github.com/libgdx/libgdx/pull/6386#issuecomment-848655518 ? I actually did test! I found that it is still possible to exhaust the pool. I don't have any games that are pushing the limit of the used reflection pool, so I'm not sure what more you want.

So lang ago, yes, now I remember that this was the reason why this is stalled. I missed it scrolling up because it is not a review.
So, looks like it is not only testing, but actually doing :)

I was wondering why this showed me as a contributor to this PR -- I think I just merged the current commits into the version from March, and I didn't realize that would affect the actual PR. I did that to evaluate what it would take to exhaust the cache, and merging to the current version makes sense for that test, but I need to figure out how my Git configuration is set up so I don't accidentally affect other PRs...

@DaanVanYperen I suggest you make a new PR with your suggestions, looks like @TheLogicMaster is not around at the moment.

I'm happy this got merged! Given that the API doesn't need fixing (see above) I'll save you guys the effort of reviewing a PR that just improves readability.

I was wondering why this showed me as a contributor to this PR -- I think I just merged the current commits into the version from March, and I didn't realize that would affect the actual PR.

Yes, it is because of your merge commit.


Program for minimum Sum of Squares in Java

Language
What language was used for the solution?
I used Java
Challenge
What is the name of the challenge being completed?
Sum of Squares

Uploading the Screenshot for the outputs of some test cases.

Addresses #348

Hi @ericwburden , have changed the code and ran the required test cases. It's running successfully by implementing Dynamic Programming.
Please review and let me know.
Thanks

Kindly let me know if any more changes are required.
Also, merge it to the repo with the 'Hacktober-Accepted' tag if satisfied.
Also thanks for giving me the opportunity to work on it.
Thanks

@divyansh-ag-03 thanks for contributing! We appreciate all solutions and the thought you put into this. You can solve and PR additional challenges and we can add the hacktoberfest-accepted label, even if there is no issue for it on GitHub. If you see any that you'd like to work on, feel free to do so!

Thanks for that @drkennetz, will let you know if I found an issue I can work upon.


Sample Return Codes

Modified samples to return EXIT_SUCCESS OR EXIT_FAILURE instead of 0 or 1. Also fixed incorrect return at the end of main method of basic.cc.

Thanks!
I'm afraid we'll need a CLA (https://cla.developers.google.com/) before we can merge this though.

Sorry for the delay @saran-t. I have completed the CLA, run the check again, and it has passed.


Unable to locate from Hubzilla

Mastodon is able to find them, but I'm unable to locate my federated activity stream or<EMAIL_ADDRESS>from within Hubzilla.

Follow up from Hubzilla dev:
The details are that we weren't recognising "Organization" as a valid actor type.
[master 37a77cc] support pterotype
We'll see if this can be pushed into the next point release.

Great news! I'm going to close this in that case since it sounds like the problem wasn't on our end. Thanks for following up!


can add a tab navigation example

Is your feature request related to a problem? Please describe.
can add a tab navigation example

@seenyea what you mean by tabs? There are variety of ways how it can be implemented using various libraries, such as: react-native-tab-view, @react-navigation/bottom-tabs and so on. What exactly you want?

I mean, a demo of using tabs with react-native-bundle-splitter

@seenyea should it be with @react-navigation/bottom-tabs?
In fact I'm writing right now a lot of snacks/demos, just thinking which of them I should include in final docs.

Closed due to https://github.com/kirillzyusko/react-native-bundle-splitter/issues/23


Add links to pages on player overview

Recent matchs -> matches | Players -> peers | Heroes -> heroes. Might be an overkill since we have the links at the top.

I personally find it fine to just use the top navbar, but if people think this is better, we can do this too.  Maybe get some input from Discord?

Guessing this is a no?  Feel free to submit the pull request anyway so we have a record of the code if we decide we want this later.


stop() not implemented

I'm trying to listen to the "iceconnectionstatechange" event from javascript to know when the connection closes, and I'm getting the event but all the data that comes with the event is: " { isTrusted:false } " every time.
How can I get the  IceConnectionState? or is there any other way to know when the connection is closed?

Oh please, read the WebRTC spec. There is no such a state in the emitted event.


Silent Preload Startup

What feature or improvement do you think would benefit Files?
The newly added background service allows for much quicker app "launches", as all that is then required is to show a window rather than load the entire app ; however, it still requires a manual launch after every cold boot, which takes a bit of time to load.
There is an autostart option, however it seems to open a Files window instance as well.
I wish there were a way to preload the app, so that it still feels as snappy, although without explicitly showing a window, making the replacement of the default file manager seamless and just as fast.
Requirements
Perhaps the default behaviour of the in-app autostart option could be modified accordingly, resulting in a background soft preload that doesn't involve the creation of a window ; this would leave the previous behaviour to the task manager startup entry, which I feel would make for a more consistent experience, inline with other MSWin applications.
Alternatively, yet another field could be added to the settings, which may be clearer to the end user ; although I fear this would clutter the UI a tad too much.
Files Version
<IP_ADDRESS>
Windows Version
10.0.19045.2788
Comments
No response

Thanks for the feedback, we're tracking this feature request in #13510.


Minimum Java 11 - make avaje-inject Java 11+  (from Java 8+)

I'm curious to understand why you're considering making it require a minimum of Java11?

In theory:

We can make in jpms aware / add a module-info.java which increases the required discipline on avaje-inject in terms of dependencies and what is public
I don't really consider Java 9 or Java 10 to be preferred. I think Java 11 is the next target after 8 being somewhat a LTS version
I have a Kubernetes/Docker deployment bias so as I see it Java 11 is an minimum runtime

In reality I'm not sure if this is a great idea yet.  I don't know when libraries should bump up from Java 8 but I think we will have to do it at some point so when ... (personally and for the places I work that would be now).
Hmmm.

From what is an admittedly selfish desire, I would prefer to see that it remain Java8 compatible for now, since we still have several projects that still need to maintain Java8 compatibility unfortunately.
For JPMS compatibility, I think it may be possible to use the moditect-maven-plugin to generate the module-info.class file without fulling moving everything to Java9+ (although I've not fully investigated this particular Maven plugin to confirm).
It's also not especially difficult to build a multi-release jar in order to add Java9+ features. I've done it for the JSch fork to add support for new crypto algorithms that are available in Java11 & Java15, while keeping the base jar file fully Java8 compatible. It involved adding a few extra execution sequences for maven-compiler-plugin & maven-resources-plugin, and then having the maven-jar-plugin add the multi-release attribute to the manifest.
But I understand if you want to avoid adding these sorts of complexities and decide to move to purely requiring Java11+.

PR for JPMS compatibility via moditech-maven-plugin ... https://github.com/avaje/avaje-inject/pull/59

For myself with JPMS we need to explicitly register the BeanContextFactory (which is kind of nice) with a provides clause like:
module junk {
  requires javax.inject;
  requires org.slf4j;
  requires transitive io.avaje.inject;

  provides io.avaje.inject.core.BeanContextFactory with org.example._di$Factory;
}

... with jpms developers need to know about and find the BeanContextFactory interface. My gut says it would be nicer if BeanContextFactory was in the io.avaje.inject package. Hmmm.

... with jpms developers need to know about and find the BeanContextFactory interface. My gut says it would be nicer if BeanContextFactory was in the io.avaje.inject package (and perhaps the generated _di$Factory should instead be called _di$BeanContextFactory. Hmmm.

I think you may be right that it would be better for BeanContextFactory to be in io.avaje.inject. Then I think you wouldn't need to export the io.avaje.inject.core package.

wouldn't need to export the io.avaje.inject.core package

There are things in core used by the generated code like BeanLifeCycle, Builder etc.  So those need to be in an exported package.
I think the options are something like:

move BeanContextFactory to io.avaje.inject (it references Builder interface which is in core but maybe that is ok)
rename io.avaje.inject.core to say io.avaje.inject.spi   (Is spi a better package name? ... more expected?)
move everything in core into io.avaje.inject  (I don't like that option, core has code the generated code needs but otherwise is "detail")

Hmmm.

I think the options are something like:

move BeanContextFactory to io.avaje.inject (it references Builder interface which is in core but maybe that is ok)
rename io.avaje.inject.core to say io.avaje.inject.spi   (Is spi a better package name? ... more expected?)
move everything in core into io.avaje.inject  (I don't like that option, core has code the generated code needs but otherwise is "detail")

Hmmm.

Hmm, it may be more hassle than it's worth to move BeanContextFactory now that I look more closely.
It appears that DependencyMeta, BuilderFactory & Builder would also need to be moved, since it looks like they are by the generator as well (both directly and in the code it generates in consumers).

more hassle than it's worth to move BeanContextFactory now that I look more closely

I think the same.
I'm probably leaning toward renaming core package to spi - mostly as a gut feel really with "core" sounding a bit too implementation orientated to me. It hasn't mattered in classpath world but once people are explicitly putting the provides clause in module-info core doesn't look right to me.

I'm probably leaning toward renaming core package to spi - mostly as a gut feel really with "core" sounding a bit too implementation orientated to me. It hasn't mattered in classpath world but once people are explicitly putting the provides clause in module-info core doesn't look right to me.

I think that sounds good to me.

Ok, lets call this bit done :)


feat: Allow disabling validations by comments inside the rule expresion.

We are generating some of our Prometheus rules by jsonnet, which outputs JSON, making it impossible to generate the disable_validations comment for a particular rule.
This PR allows using the comment inside the rules' expr as long as it is on its own line within the expression. See the Prometheus docs.
I also fixed a little bugs in the handling of the YAML comment: It is now possible to have comment lines that follow the disable_validations line.
Plus a few typos in the README.

Looks good, thanks! :rocket:


create the wallet page in the user profile.

currently we don't have user wallet page(frontend).

@cb7chaitanya can i work on that.

I can help as well!

Pushing a template page for you guys to start working on

Pushing a template page for you guys to start working on

Thank you man! Can you assign me

@cb7chaitanya I have almost created the template.

I just have to add some of the buttons and footer the template is almost ready. @cb7chaitanya

@ameeetgaikwad would you like to work on withdraw and swap frontend

@Ameerjafar i would love to join

@Ameerjafar Yes I would!

I don't have figma file i just using tailwind css @ameeetgaikwad

@Ameerjafar alright! Will design it accordingly.
can you just elaborate more on it? Where should i create the component? On which page?
I've something like this on my mind. I would change the colors according to the tipilink color scheme.

@Ameerjafar alright! Will design it accordingly.
can you just elaborate more on it? Where should i create the component? On which page?
I've something like this on my mind. I would change the colors according to the tipilink color scheme.

@cb7chaitanya where should i add this component? In which page?

Refer to this #32 @ameeetgaikwad

@ameeetgaikwad can you make the wallet page responsive if I push the wallet page code.

@Ameerjafar he man sure! Let me know when done!


Add explicit [Exposed] + default dictionary value

Required after heycam/webidl#423 and heycam/webidl#750. (Found from web-platform-tests/wpt#18382)

Marked as non substantive for IPR from ash-nazg.

@saschanaz - Thanks for updating the IDL! :) while this is probably non-substantive, it'd still be better if you could join the WICG and link your GH account to your W3C one

Marked as  substantive for IPR from ash-nazg.


Added comic 832 to the list of large comics

I just found another large comic.

Nice. When i started adding this feature, I just used the large comic list from explainxkcd (http://www.explainxkcd.com/wiki/index.php/Category:Large_drawings), seems like it is pretty incomplete.

I resized the image so that it's smaller than 4096x4096 and mirrored it on imgur, so that it can be displayed in android.

I am a bit confused. Why does the image have to be smaller than 4096x4096?
I tested the application with the unscaled version of the image and it didn't seem to cause any problems.

It gave me this error on my device:
´´´
12-25 11:24:50.986 926-957/de.tap.easy_xkcd W/OpenGLRenderer: Bitmap too large to be uploaded into a texture (2040x4614, max=4096x4096)
´´´

That's weird. I'm not getting any errors. Everything seems to work just fine.
Perhaps this is somehow related to your device?

I've just tested this on a few devices.
I don't get any errors on devices running Android 6.0 or 5.0, but I get an java.lang.OutOfMemoryError on devices running Android 4.1.
However, there is still no error form the OpenGLRenderer.

As far as I can tell, this doesn't seem to be affecting all devices.
Perhaps we should simply surround the relevant code with a try/catch block.

Happens on my Nexus 5x, Nexus 5 and Nexus 7. I don't think try/catch would work, since the app does not actually crash - the ImageView just stays blank and the error message appears in the log.


Review date

Describe the feature you'd like
Being able to configure a time and/or date that a page requires a review. For example, creating a page and choosing "Review in 6 months". Then 6 months later the user would get an email asking them to review the page again in case something has changed.
Describe the benefits this would bring to existing BookStack users
It would be possible to do proper documentation cleanup. Often documentation is not kept up to date or forgotten. However if the creator is reminded to confirm that the article is still relevant, then it would limit the amount of stale articles.
Can the goal of this request already be achieved via other means?
Possibly. But i am not sure how it would be done.
Have you searched for an existing open/closed issue?

[X] I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?
Under 3 months
Additional context
No response

Hi @jnantg,
A formal/focused review/status workflow has been requested in #473.
If you just need a searchable indicator (instead of a different workflow) then you could use tags for this, as described in my comment here: https://github.com/BookStackApp/BookStack/issues/439#issuecomment-1306913346
Otherwise, I wouldn't look to add specific functionality for what is an external process, and can likely be achieved (or helped) using in-platform features like tags.


MangaDemon: Update to new site structure

Closes #4770
Checklist:

[x] Updated extVersionCode value in build.gradle for individual extensions
[ ] Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
[x] Referenced all related issues in the PR body (e.g. "Closes #xyz")
[ ] Added the isNsfw = true flag in build.gradle when appropriate
[x] Have not changed source names
[ ] Have explicitly kept the id if a source's name or language were changed
[x] Have tested the modifications by compiling and running the extension through Android Studio
[ ] Have removed web_hi_res_512.png when adding a new extension

Users will have to migrate


🐛 [Cloud_Firestore] App crashes when running add or set offline

Description
I'm developing an app that needs to work online and offline. Online is working perfectly. However, when it's offline and I go to execute a add or set, it generates an error. The strange thing is that after the error it doesn't catch. It just stops the app on the screen
Sample project
    final ref = FirebaseFirestore.instance.collection('devices');     final map = deviceDto.toMap();     if (deviceDto.id.isEmpty) {       await ref.add(map);     } else {       await ref.doc(deviceDto.id).set(map);     }
Generated error
Stream closed with status: Status{code=UNAVAILABLE, description=Unable to resolve host firestore.googleapis.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
Flutter doctor
[!] Flutter (Channel stable, 3.16.5, on Microsoft Windows [versÆo 10.0.22621.2861], locale pt-BR)
• Flutter version 3.16.5 on channel stable at C:\Users\Usuario.puro\envs\vgcj\flutter
! Warning: flutter on your path resolves to C:\Users\Usuario.puro\envs\stable\flutter\bin\flutter, which is not inside your current Flutter SDK checkout at
C:\Users\Usuario.puro\envs\vgcj\flutter. Consider adding C:\Users\Usuario.puro\envs\vgcj\flutter\bin to the front of your path.
! Warning: dart on your path resolves to C:\Users\Usuario.puro\envs\stable\flutter\bin\dart, which is not inside your current Flutter SDK checkout at
C:\Users\Usuario.puro\envs\vgcj\flutter. Consider adding C:\Users\Usuario.puro\envs\vgcj\flutter\bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 78666c8dc5 (3 weeks ago), 2023-12-19 16:14:14 -0800
• Engine revision 3f3e560236
• Dart version 3.2.3
• DevTools version 2.28.4
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\Usuario\AppData\Local\Android\sdk
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.3)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.8.34330.188
✗ Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[✓] Android Studio (version 2022.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
[✓] VS Code (version 1.85.0)
• VS Code at C:\Users\Usuario\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.74.0
[✓] Connected device (3 available)
• Windows (desktop) • windows • windows-x64    • Microsoft Windows [versÆo 10.0.22621.2861]
• Chrome (web)      • chrome  • web-javascript • Google Chrome 120.0.6099.200
• Edge (web)        • edge    • web-javascript • Microsoft Edge 120.0.2210.121
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 3 categories.
Flutter dependencies
cloud_firestore: ^4.14.0

@rafaelterada
Based on this answer, I'll go ahead and close this as not an issue with plugin.


faes

Type:

[ ] Bug
[ ] Enhancement
[ ] Feature Request
[ ] Question

zplug --version:
zsh --version:
uname -a:

wanted to check the template. Closing.


Red Border remains on textbox even after data is exists

I have added Required validation on TextBox. Issue is that Red Border remains on textbox always even after data is exists when I open filled window with data in edit mode,
I have added below code to get validation on textbox.
TextBox:
<TextBox HorizontalAlignment="Stretch" Grid.Column="1"
                        VerticalAlignment="Center" Text="{Binding ConstantName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, ValidatesOnDataErrors=True}" />''

Property:
[Required(ErrorMessage = @"Enter Constant Name")]
        public string ConstantName
        {
            get { return _constantName; }
            set
            {
                if (value == _constantName) return;
                _constantName = value;
                OnPropertyChanged("ConstantName");
            }
        }

Style:
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource MetroTextBox}">
        <Setter Property="Margin" Value="5"></Setter>
        <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
        <Style.Triggers >
            <Trigger Property="Validation.HasError" Value="true">
                <Setter Property="ToolTip"
                            Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" />
            </Trigger>
        </Style.Triggers>
    </Style>

Please help me to resolve this issue

I'm fighting exactly same problem right now :/
What I've noticed is, that if I remove whole text from textbox, and start typing again it starts to work fine.

@ifourdharmesh With which version get you this issue?

I am using latest Metro UI version for .net framework 4.5. I have downloded from nuget also tried from Git.

I think it's the same as here https://github.com/MahApps/MahApps.Metro/issues/2536


TcpBuilder::connect should use SocketAddr instead of ToSocketAddrs.

If ToSocketAddrs are resolved to multiple addresses, then in case of failure
connect will be used multiple times with the same socket. This is incorrect.
After first failed connect the state of socket is unspecified and socket should
not be reused.
Additionally, if socket is in non-blocking mode, then the connect can return
EINPROGRESS. Connection will not be aborted, and further calls to connect will
fail with EALREADY, because connection request is already in progress.

Hm yeah with TcpBuilder the story here isn't great, but this is also part of the state transition from TcpBuilder -> TcpStream, so the error would also need to carry that payload unfortunately :(

Currently the internal socket is consumed and converted to a TcpStream only
if connect succeeds. So you could actually check for EINPROGRESS and still call
to_tcp_stream after receiving an error from connect. Not saying this is the
best way to proceed, but it is currently possible.
I was mostly concerned with different thing, i.e., exposing an API that uses
connect syscall multiple times with the same socket, all because of
ToSocketAddrs used as an argument to TcpBuilder.

I suppose if we could go back I'd want to rethink a good portion of this crate. I feel like TcpBuilder never ended up pulling its own weight and I'd prefer to keep all the methods as low-level as possible (e.g. remove ToSocketAddrs).

net2 is deprecated and under sustaining maintenance now, accepting only bugfixes and patches to enable new rust platforms.


feat(eslint): introduce eslint-plugin-jest [BREAKING]

Deploy preview ready!
Built with commit 65e610bfcecc9fb4af31bb2d2362962fa1b4a10d
https://deploy-preview-339--mcs-lite-ui.netlify.com

Deploy preview ready!
Built with commit 65e610bfcecc9fb4af31bb2d2362962fa1b4a10d
https://deploy-preview-339--mcs-lite-introduction.netlify.com

Deploy preview ready!
Built with commit fe85f8376cb2a114af7557ee0165400e45a666fb
https://deploy-preview-339--mcs-lite-ui.netlify.com

Deploy preview ready!
Built with commit fe85f8376cb2a114af7557ee0165400e45a666fb
https://deploy-preview-339--mcs-lite-introduction.netlify.com


cmake: sync pkg-config --cflags with meson

$ git clone https://github.com/hyprwm/hyprland-plugins
$ meson setup /tmp/hyprbars_build hyprland-plugins/hyprbars
$ meson compile -C /tmp/hyprbars_build
c++ -Ilibhyprbars.so.p -I. -Ihyprland-plugins/hyprbars -I/usr/local/include -I/usr/local/include/hyprland/protocols -I/usr/local/include/pixman-1 -I/usr/local/include/libdrm -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++2b -fPIC -MD -MQ libhyprbars.so.p/main.cpp.o -MF libhyprbars.so.p/main.cpp.o.d -o libhyprbars.so.p/main.cpp.o -c hyprland-plugins/hyprbars/main.cpp
hyprland-plugins/hyprbars/main.cpp:6:10: fatal error: 'src/Compositor.hpp' file not found
#include <src/Compositor.hpp>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.

Is that how it's done in cmake? Paths should always start with <hyprland/..., just like any other program's headers.

Can you please remove the /hyprland in the first CFlag on this line instead?

Hyprland headers require wlroots headers, which I'm currently installing under /usr/include/hyprland/wlr in my aur package. (Otherwise it falls back to the system wlroots headers, which are not necessarily compatible or even exist). Should I move those to /usr/include/hyprland/protocols/wlr instead?


Overriding of bean RabbitListenerAnnotationBeanPostProcessor is broken

Bug report
We are upgrading our application from  Springboot 2.1.3 to  Springboot 2.1.4 release, which uses spring-amqp 2.1.5.RELEASE
Found that with new release , overriding of bean  RabbitListenerAnnotationBeanPostProcessor does not work.
We do have the property spring.main.allow-bean-definition-overriding=true that enables bean overriding.
Following is the sample code. postProcessAfterInitialization never gets called.
@Configuration
@Import(RabbitAutoConfiguration.class)
public class DemoConfig {

    @Bean(name = RabbitListenerConfigUtils.RABBIT_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
    @Primary
    public RabbitListenerAnnotationBeanPostProcessor rabbitListenerAnnotationProcessor() {
        return new CustomRabbitAnnotationListener();
    }

    public class CustomRabbitAnnotationListener extends RabbitListenerAnnotationBeanPostProcessor {

        @Override
        public Object postProcessAfterInitialization(final Object bean, final String beanName) {
            super.postProcessAfterInitialization(bean, beanName);
            System.out.println("Processing Bean: " + bean.getClass());
            return bean;
        }
    }
}

Has been fixed via https://github.com/spring-projects/spring-amqp/issues/914.
Is going to be released for the next Spring AMQP 2.1.6 and, therefore, for  Spring Boot 2.1.5

Okay. Thanks!!

@artembilan  @garyrussell  The code I posted above still does not work (no beans gets processed)  in 2.1.5 release. Could you please take a look?  Thanks!!
Same code executed with 2.1.3 Springboot works and prints out the bean class info.

@artembilan Can we please re-open this issue?
Please let me know if you want me to create a new issue.

I don't see reason to reopen or create a new one yet.
Please, share with us the project which exhibits the problem.
Although I really would like to see there Spring AMQP 2.1.6, which has the fix for this issue.
Thanks for understanding.

Here it is
demo.zip

What is your goal?
What you would like to achieve?
I have a couple concerns regarding your code:

Why do we need spring.main.allow-bean-definition-overriding=true? It is really an anti-pattern to do that. Something is wrong with your configuration...
What is the point to have an @Import(RabbitAutoConfiguration.class) if it is triggered by Spring Boot auto-configuration anyway? Isn't this something wrong from your configuration perspective?

When I remove it starts to work a bit further.
We still fail because there is no RabbitListenerConfigUtils.RABBIT_LISTENER_ENDPOINT_REGISTRY_BEAN_NAME bean definition in the configuration. And that's because this bean can be available only when we pass the condition:
@Configuration
@EnableRabbit
@ConditionalOnMissingBean(
			name = RabbitListenerConfigUtils.RABBIT_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
protected static class EnableRabbitConfiguration {

}

Since you declare your own CustomRabbitAnnotationListener, that condition doesn't match and we don't have a RabbitListenerConfigUtils.RABBIT_LISTENER_ENDPOINT_REGISTRY_BEAN_NAME bean.
Therefore together with the CustomRabbitAnnotationListener, you need also declare a bean for the RabbitListenerEndpointRegistry:
    @Bean(name = RabbitListenerConfigUtils.RABBIT_LISTENER_ENDPOINT_REGISTRY_BEAN_NAME)
    public RabbitListenerEndpointRegistry rabbitListenerEndpointRegistry() {
        return new RabbitListenerEndpointRegistry();
    }

Also I have removed a @Primary from the CustomRabbitAnnotationListener as well, since there is not going to be more than one beans for this type and name.
So, the fix works and your project need adjustments to meet Spring Boot requirements.
Thanks for understanding!

@artembilan
Thanks so much for the response. Your pointers helped.
In our framework, we override some of the configuration provided by the auto configuration.

That's OK, it really a typical use-case in the enterprise, but it doesn't mean that you need to import auto-configuration classes manually.
And yes: sometime just a single bean is not enough to override...


unable to open: DLL Failed while opening anaconda(x64bit) PY3.7.6

WINDOWS 10
INSTALLED ANACONDA in "c:\ProgramData\Anaconda3"
installed Microsoft VS 2017 comm, 2019 comm
insatll anaconda 64bit pyhton 3.7.6
(Python3.dll and Python37.dll already there)
BUT ON RUNNING ANYTHING I GET THIS ERR
like anaconda-navigator

like spyder

paths:

But I can run JUPYTER NOTEBOOK

This is not related to this repository in any way. Your error comes from PyQt5.QtSvg, not from opencv-python.


Missing changelogs for 1.0.0+?

We're on v0.55 but yarn upgrade is saying that 1.0.4 is the latest. Looking at the releases tab, I don't see any entries for 1.0 and I don't see a CHANGELOG.md file or anything. 1.0 has at least one change and breaks for us so I wanted to be sure I'm not missing where the upgrade notes are posted?
I get warnings about disablePointerEventsDuringResize which appears to have been removed or renamed.

A changelog can be found here:
https://github.com/bvaughn/react-resizable-panels/blob/main/packages/react-resizable-panels/CHANGELOG.md
The disablePointerEventsDuringResize prop was unintentionally removed in 0.0.56, as it was kind of an edge case prop and that version was a major rewrite. Sorry for missing it.

@bvaughn if it was unintentionally removed, will it be restored? Or is the expectation that we implement that functionality ourselves.

I don't think I intentionally removed it, just that it got removed as part of a major refactor when I was still in the pre-1.0 stage. I don't really have a need for it, so I wasn't planning on re-adding it.


tutorial fails with latest release 1.1.2 because of wrong encoding for python3

Running the tutorial with python3, I get:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/bin/t2t-datagen", line 41, in
from tensor2tensor.data_generators import all_problems  # pylint: disable=unused-import
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensor2tensor/data_generators/all_problems.py", line 22, in
from tensor2tensor.data_generators import algorithmic
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensor2tensor/data_generators/algorithmic.py", line 27, in
from tensor2tensor.data_generators import generator_utils as utils
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensor2tensor/data_generators/generator_utils.py", line 35, in
from tensor2tensor.data_generators import text_encoder
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensor2tensor/data_generators/text_encoder.py", line 56
_UNESCAPE_REGEX = re.compile(ur"\u|\\|\([0-9]+);")
This can be fixed by removing the u in front of the regexp. Python3 does not support it.
Note that there is another spot with the same problem:
from tensor2tensor.data_generators import text_encoder

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensor2tensor/data_generators/text_encoder.py", line 222
c if c in alphabet and c != u"\n" else ur"%d;" % ord(c)
Remove u in front of ur"%d will solve this.

Fixed in 1.1.3! Sorry about that.

Of course please reopen if you see any other problem in 1.1.3!

running the tutorial t2t-trainer i got the following
Traceback (most recent call last):
File "t2t-trainer", line 82, in
tf.app.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "t2t-trainer", line 78, in main
schedule=FLAGS.schedule)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensor2tensor\utils\trainer_utils.py", line 284, in run
exp.train_and_evaluate()
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\experiment.py", line 495, in train_and_evaluate
self.train(delay_secs=0)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\experiment.py", line 275, in train
hooks=self._train_monitors + extra_hooks)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\experiment.py", line 665, in _call_train
monitors=hooks)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 289, in new_func
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 455, in fit
loss = self._train_model(input_fn=input_fn, hooks=hooks)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 955, in _train_model
model_fn_ops = self._get_train_ops(features, labels)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1162, in _get_train_ops
return self._call_model_fn(features, labels, model_fn_lib.ModeKeys.TRAIN)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1133, in _call_model_fn
model_fn_results = self._model_fn(features, labels, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensor2tensor\utils\model_builder.py", line 218, in model_fn
len(my_hp.problems) - 1)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensor2tensor\utils\input_fn_builder.py", line 200, in cond_on_index
return fn(cur_idx)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensor2tensor\utils\model_builder.py", line 198, in nth_model
for loss_key, loss_value in losses_dict.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

This was a python3 problem, already corrected in PR #210. We're in the process of adding automated tests for python3, that should prevent it from happening again. I'm closing this as it's already solved on master (will make a release tomorrow). Thanks for reporting!

ah i saw the merge request, i thought it is already updated. so it will be fixed if i pull the master again tomorrow? thanks!

Should be fixed if you pull the master now :). (Just remember to do pip install -e . in your pulled repo and/or pip uninstall tensor2tensor so your python will use your downloaded repo and not the pip release which wasn't updated yet.)

that will require administrator privilege i assume?
Exception:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_uninstall.py", line 117, in remove
pth.remove()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_uninstall.py", line 183, in remove
with open(self.file, 'wb') as fh:
PermissionError: [Errno 13] Permission denied: 'c:\programdata\anaconda3\lib\site-packages\easy-install.pth'

thanks i think i got it running now !!


Add typing to StorageStreamDownloader.readall

Description
The title is self explanatory
All SDK Contribution checklist:

[X] The pull request does not introduce [breaking changes]
[ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
[X] I have read the contribution guidelines.

General Guidelines and Best Practices

[X] Title of the pull request is clear and informative.
[X] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

My bad, duplicate of #22963


giggabyte

pprof has this case statement:
 case "gb", "gbyte", "giggabyte":
https://github.com/golang/go/blob/master/src/cmd/pprof/internal/report/report.go#L1534
How many bytes go in a gigga?

@rsc, are we allowed to modify pprof in our tree, or is there an upstream we should fix first and then pull down?


Replace ICO assets with lossless optimized variants

Replaces PNGs within ICO assets with optimized variants sans embedded text/metadata sections and recompressed streams (Zopfli). This process does not affect image quality in any way.
Saved bytes: 113,023 (~110.37KB, about ~5KB per new project/item template)
Related loose PNG effort: https://github.com/microsoft/ProjectReunion/pull/523

Tip: In the future, might be cleaner to squash/rebase the PR instead of having to merge in from main.

Note: PNG/ICO compression removes about 1MB from the 75MB VSIX, so not essential for 0.5 Preview.


Android rectangle detection

When document itself is having two rectangle, Detecting only one and cropping that only. I want to detect full document.

@RohitRastogi94 If I understand correctly, the document contains rectangles. So the package is detecting the rectangle inside of the document, instead of the document itself?
Is this on iOS, Android, or both?

@humphreyja Yes, Document contains multiple rectangles. currently I am only trying in Android.

@humphreyja any update on this one?

@RohitRastogi94 Ok I've ran into this before too. I think the algorithm should be looking for the largest rectangle in the image, instead of the smallest.
You can try to remove this conditional and see if that helps. If so, I'll probably update the package with this change.
https://github.com/HarvestProfit/react-native-rectangle-scanner/blob/master/android/src/main/java/com/rectanglescanner/helpers/ImageProcessor.java#L167

On ios it works pretty well, recognizes rectangles fast, on other hand on android it barely recognizes the same items.

@glodzl I've been experimenting with this a little bit. The main difference between this is camera quality as well as software quality. On iOS, Apple has given us an API to use that finds rectangles in the image. On Android, we have to do all of that ourselves using OpenCV (this is why the package is so large). It involves applying filters to the image and finding all the borders in the image. It's really interesting stuff. But the outcome is a bit finicky sometimes. As this code is the same as all the other open source android scanners out there, I'd love to see how I can improve it. This basically just comes down to 2 potential changes:

Changing the filters on the image to get better edge detection
Changing the function that selects the correct rectangle out of the list that was detected in the image.

The above pull request looks at the last one. For the first one, I'm thinking it need to determine a "brightness" level of the image and adjust the contrast to fit that brightness level before matching rectangles. Either that, or we generate a list of potential rectangles from a low light image and a high light image before selecting the best one (usually the largest rectangle).
Given our quarantine status here in the U.S., I'll probably be looking into this more over the next few days because there's nothing better to do 😂

Hi @humphreyja I'm trying to find a solution for this issue now.
Have you found anything?
I gave a try to Genius Scan and the edge cropping works perfect. Hopefully we'll get something like that

@cagv24 I've been experimenting with pr #33. So far, I've added a better way in increase the contrast of the image before detection. But I've found that that doesn't work either. The problem is the findContours function. With the canny image filter, it needs a solid boundary around the entire rectangle in order for it to detect it.
I've been trying to figure out how to use the hough lines functionality with openCV as next steps. Hough lines will fill in the gaps and do a much more accurate detection though, I'm not sure how to select which lines map to the rectangle yet. I assume this is how Grizzle Labs/Genius Scan is doing it.

@humphreyja I'm checking right now this question/answer on StackOverflow opencv-android-create-new-image-using-the-edges-of-the-largest-contour , that guy says he can find the biggest rectangle with that implementation (maybe we should take a look).
Notes:
He applies the canny filter before the gaussian blur.
And the RETR_TYPE is RETR_LIST instead of RETR_TREE
I'm doing some tests with that approach and for now, it seems good.

@cagv24 Canny before the blur is actually not a bad idea haha. That could help fill in the missing holes. I didn't have much success with changing the RETR_TYPE flag. Tree will store the hierarchy of the contours (which maybe we don't need). Let me know how your tests go. I feel that swapping just the blur around may be a good incremental improvement to this without needing to implement any more complex algorithms.

I build a notebook colab to be able to tests with grapichs step by step the rentangle detection and I can say that's pretty easy to find the largest rectangle on an image, but in real time (camera) is not like that. I implemented the same algorithm on java with no success.
Following are the images I used to test the python code:

After working with a friend (@Luifersuarez) we could figure out this problem. The filters we apply now are the followings:
Imgproc.cvtColor(resizedImage, grayImage, Imgproc.COLOR_RGBA2GRAY, 4);
Imgproc.GaussianBlur(grayImage, grayImage, new Size(5, 5), 0)
Imgproc.threshold(grayImage, grayImage,127, 255, Imgproc.THRESH_BINARY|Imgproc.THRESH_OTSU)
The THRESH__OTSU is what did the trick.
Then in the findContours method we used the Retrieval Type RETR_EXTERNAL
And the last step is the algorithm to find the biggest area (it's an extra step maybe is no necessary because the filters do very well their job so there is only one contour).  This is the code:
        MatOfPoint  biggestCountour = null;
        Double maxArea = 0.0;
        for (MatOfPoint contour: contours) {
            Double area = Imgproc.contourArea(contour);
            if (area > size.area() / 5) { //This is useful to make user taking photos closer
                MatOfPoint2f contour2f = new MatOfPoint2f(contour.toArray());
                Double peri = Imgproc.arcLength(contour2f, true);
                MatOfPoint2f approx = new MatOfPoint2f();
                Imgproc.approxPolyDP(contour2f, approx, 0.02 * peri, true);
                if (area > maxArea && approx.total() == 4) {
                    biggestCountour = contour;
                    maxArea = area;
                }
            }
        }

        if (biggestCountour != null) {
            Point[] points = biggestCountour.toArray();

            Point[] foundPoints = sortPoints(points);
            return new Quadrilateral(biggestCountour, foundPoints, new Size(srcSize.width, srcSize.height));
        }

@humphreyja now that this seems to be fixed could you please show me to the algorithm that takes the picture automatically. I would like to speed up its velocity.

@cagv24 Awesome work on this! I'm going to need a few days before I can demo this and create a PR, I'm hoping to get this out in the next release (I've been shooting for a new release every 2 weeks or so).
One question, what is the background for detection? Wood table tops can sometimes mess this up due to the grain in the wood for example.

I tested it with a red, blue and black background. The only background we should avoid is a white one (or similar) maybe we can add some code to handle these cases.

Here's an example with a receipt on it. Yeah I'd be interested in that. I've been thinking about better ways to test this, so having some tools to make sure we are actually improving the detection is important.

For this image in particular I had to apply an erosion with a 9x9 kernel to delete this little black lines in the table. This is the result

However I don't know if we should worry about backgrounds like this.

@humphreyja Hi man, I hope you're well. I just want to ask you where I could send you the link to the google collab notebook?

@cagv24 Staying healthy, thanks! You can send the link to my email<EMAIL_ADDRESS>

I've just sent you the invitation on google drive. Please let me know if you can access the folder.

Yep I got it! *causally just going to remove email address from feed here haha

Hey guys, I'm so glad I found this library – thanks for the great work, @humphreyja! And thanks for this great contribution @cagv24!
Any chances this is gonna be merged/released soon? Is there anything I can help with?

Hi @buzinas, I've found some issues related to the image background, for instance, a document over a glass and other irregular backgrounds. Dropbox has written a blog where they talk about how to implement edge detection. They are using the Hough Transform instead of Canny, as @humphreyja mentioned before.
This is the blog Fast and Accurate Document Detection for Scanning
I tried Dropbox's app and I think it works very well.
What we can try now is to implement this approach and see how it goes.

Yeah, Dropbox is by far the best document scanner I've ever played with. When I was looking for scanners a few months ago, I read all their blog posts. That said, aren't the changes suggested by you any better than the one we have on master right now? If so, it would still be worth it to make the change while we don't come up with something even better. What are your thoughts?

For document scanning related tasks I think it's better, however, this is not a robust solution yet. let's wait for @humphreyja to check that approach. You could modify the library as well including those changes on the ImageProcessor.java file and test them.

@buzinas I think you are right that it is a bit better. With my experimentation in pr #33 has shown that without something like the Hough Transform, the canny based algorithms all have their limitations in certain conditions. So I believe that the hough transform is most likely the best route to go. Seeing as there is a bit of a time element with this, I think it'd be better use of all of our efforts to implement the hough transform algorithm and call it good, rather than needing to come back to this later to implement the better solution. That's really why I haven't merged anything in yet.

Thanks for the answers, guys! I'm currently finishing other parts of the app I'm building, but I'll try to help making this right when I get to this.

Hi, guys. How is it going with the Hough Transform approach?

Hey, Guys any updates on the approach?
Thanks a lot for this amazing library.

Hi, I'm sorry I've been so busy with other projects, so I couldn't work on this.

I have as well. Although, my current project will eventually intersect with this package at which time I will definitely be looking to improve on this. I can't give a date as to when that will be. The current implementation works pretty well but definitely not the best it could be! (Also, part of me really hopes Android will just release a new API similar to Apple for this. It would make everything waaaay easier).

Hi, I actually don't need rectangle rectangle detection. But i needed black and white and greyscale filters with camera and could not find any library for it except for this one. But this library does not have focusing feature. Also i do not need rectangle detection. opencCv is increasing my apk size too. can u guys please suggest any other library or anything else i could do? Please

@mohity777 yeah this package only does auto focus at the moment. We've talked about adding the ability to handle custom focusing on touch at some point. As for your concern with rectangle detection. You could simply clone this package and just remove the rectangle detection controller. I built the class/subclass structure so that all of the rectangle specific stuff is handled in that subclass and can be removed or changed to work for another package.

Any updates?

Is it possible to perform multiple rectangle detection (there are multiple rectangles in the same image)?


[Accessibility] Some thoughts on error in line audio cue

CC @meganrogge
With today's insider update, no longer able to precisely identify the starting and ending point of an error via Left/RightArrows because you will hear error audio cues in the whole columns instead of the specific error columns.

Column-by-column (Left/RightArrow) navigation: previous behavior is ideal. Error audio cue needs to be played only on the error-causing columns instead of the whole columns.

Line-by-line (Up/DownArrow) navigation: current behavior is good. If there is an error in the currently focused line (even though current column focus is not at the error column position), error audio cue needs to be played.

I now understand that 1. and 2. may not be addressed altogether because VSCode does not know whether users have approached the current cursor position via "line-by-line" or "column-by-column" navigation. In any event that you need to take only one method, 1. (the previous approach) is more logical and robust.
System Info
Version: 1.76.0-insider (system setup)
Commit: 720985f2c68cadb5e375d9ec671476c548f61769
Date: 2023-02-24T06:18:04.880Z
Electron: 19.1.10
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: Yes

@jooyoungseo, we only play the audio cue when 1) the line changes and there's an error on the line or 2) when the column changes and there's an error at the current column position.
Can you pls indicate a scenario you've encountered where the behavior is not ideal/unexpected?

related https://github.com/microsoft/vscode/issues/175348

Here's how it works currently:

Left/right arrow navigation plays the error audio cue when within an error range
when right arrow is used on the last column of the line and the line it jumps to contains an error
Up /down arrow navigation plays an audio cue when it lands on an error line

@meganrogge

when the column changes and there's an error at the current
column position.

As far as I tested with today's insiders, I hear audio cue outside the error range in any column position when I use Left/RightArrows as long as the line contains an error. This is unexpected.

That is unexpected and I cannot reproduce on mac. I'll try windows

works for me on windows. here's an example that works for me - where the error is just problem
// commenting on this line
const x = problem

found a way to reproduce the issue

repro:
insert import { IConfiguration Service } from 'vs/platform/configuration/common/configuration'; and navigate via left and right arrow keys. you should only hear the error for the underlined section IE IConfiguration Service


Efficient influence function constructed from influence_fn errors if called multiple times

chirho.robust.ops.influence_fn at https://github.com/BasisResearch/chirho/blob/staging-robust/chirho/robust/ops.py#L18 return a function for approximating the efficient influence function at a collection of data points. If the returned function is called multiple times it results in the following (somewhat opaque) error:
RuntimeError: !at::functionalization::impl::isFunctionalTensor(base_) INTERNAL ASSERT FAILED at "/Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/FunctionalStorageImpl.cpp":101, please report a bug to PyTorch.

For example, this error can be seen in the current tests by adding multiple calls to the generated function as follows:
https://github.com/BasisResearch/chirho/blob/sw-multiple-eif/tests/robust/test_ops.py#L80

@agrawalraj , this is now somewhat blocking #484 , as (our version of) TMLE involves evaluating the influence function on test_points, and then evaluating the influence function on samples drawn from the model and guide. I could come up with a workaround that only evaluated the influence function once by batching these two datasets into a single call, hence why I say "somewhat" blocking.

I'm using torch==2.0.1

I believe that is consistent with the (implied) requirements of ChiRho via Pyro.
https://github.com/pyro-ppl/pyro/blob/dev/setup.py#L105

You're right, but I think the easiest short-term fix for this would just be to add a torch>=2.1.0 requirement specifically for chirho.robust.

When I upgrade torch to 2.1 I still get the same error. I made this "dummy" PR #494  to test this in a fresh environment with the bumped versions. Hopefully this tells us if/where the problem is.

It looks like this error doesn't appear in the CI builds even with torch==2.0.1. I'll see if I can reproduce the error another way...

Closing as not reproducible


add dynamic dependencies

FYI this will break mass app new for CLIs until https://github.com/massdriver-cloud/massdriver-cli/pull/81 is merged and released. We've decided that's OK because no one is using this part of the CLI yet.

No love for the kubernetes-job? :)

No love for the kubernetes-job? :)

@WillBeebe was this amore recent addition? I'll add to this PR

Thanks for grabbing that


Site is detected as Other

@BlazDT commented on Thu May 31 2018
https://github.com/AdguardTeam/AdguardFilters/issues/17300
Open https://dronedj.com/ and the site gets detected as "Other" instead of "HTML" and therefore any rules except $replace and url block rules are not applied, please check and fix.
In Extension the site works fine. AdGuard certificate is shown in Chrome browser.

@adbuker commented on Thu May 31 2018
@BlazDT , this site has broken Content-Type header - https://uploads.adguard.com/buker_cqe6s.png, so AdGuard cannot detect site's Content-Type properly. In such cases, we forcibly set Content-Type as 'Other'

Rare issue


Restructure app

Divide to model, update, view
Add router
Add 404 page

@amitaibu I think this one is ready.

Tests are passing locally:

And screenshot of how does it look:

Lets remove the footer, and it should be good to go.

Merged and published:
gcm && gl && npm version minor && git push --tags && git push && npm publish ./
gcm = git checkout master
gl = git pull

@DavidHernandez what is your npm username?

@amitaibu my npm username is davidhernandez

Access granted on npm. You can use the above command https://github.com/Gizra/generator-elmlang/pull/35#issuecomment-250929344 whenever you release stuff.


Support for SASS-based workflow

Hi guys,
I'm trying to catch up with this new version and I'm a bit scared that you have included the stylesheets into this repo. This causes a lot of problems with the LESS->SASS conversion that was working for versions 1-2-3. Is there any reason behind not having them separately as before?

ping @jeff-phillips-18?
Can we hope to get the packages separately as before?
It makes no sense for us to invest in LESS esp. if/when patternly 5 is going to use SASS.

What kinds of problems does this cause? The only real difference is that we distribute the less files now which I would think you could ignore.

On Jun 1, 2017, at 10:50 AM, Martin Povolny<EMAIL_ADDRESS>wrote:
ping @jeff-phillips-18 https://github.com/jeff-phillips-18?
Can we hope to get the packages separately as before?
It makes no sense for us to invest in LESS esp. if/when patternly 5 is going to use SASS.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/patternfly/angular-patternfly/issues/473#issuecomment-305517493, or mute the thread https://github.com/notifications/unsubscribe-auth/ALGEdEkCE3asSbZlsE7mgLTijGFVPQBMks5r_s_PgaJpZM4Nracy.

@jeff-phillips-18 aren't those LESS files bundled into the components? What stylesheets should we use then? Will be there a non-angular (patternfly) version with the CSS files as before?

The angular patternfly specific css can be found in dist/styles/angular-patternfly.css
This should be similar to what was in 3.x.  Changing to less internally allows the css to be generated with values from patternfly variables. If those values are an issue now, then the were likely an issue before and applications were overriding them.


update docs

fixes https://github.com/Azure/azure-sdk-for-js/issues/26451

@HarshaNalluru Could you help review the pr?

/check-enforcer override


chore(github-template): update issue template

Coverage remained the same at 89.979% when pulling f5e296b832238669f5e0592dfd40a326e6a32f2f on daern91-patch-1 into 63b40b063f5baa54cc412b12d83ad0f0c56fc086 on master.


Develop e2e test for operator

Bug description
Please see this issue thread: https://github.com/istio/istio/issues/21063#issuecomment-585378472
Expected behavior
Steps to reproduce the bug
Version (include the output of istioctl version --remote and kubectl version and helm version if you used Helm)
How was Istio installed?
Environment where bug was observed (cloud vendor, OS, etc)

cc @dgn

closing in favor of a different contributor to reimplement this work: https://github.com/istio/istio/issues/21468


Crash on wrong method request

Parse error: HPE_INVALID_METHOD Invalid method encountered
Segmentation fault (core dumped)

We need add error handling on parse of http headers


Error when  training: ValueError: setting an array element with a sequence.

I was running test-object-detector in bin.
It gives me following error:
Training a Linear SVM Classifier
Traceback (most recent call last):
File "../object-detector/train-classifier.py", line 48, in
clf.fit(list(np.array(fds)), labels)
File "/usr/local/lib/python2.7/dist-packages/sklearn/svm/base.py", line 151, in fit
X, y = check_X_y(X, y, dtype=np.float64, order='C', accept_sparse='csr')
File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 521, in check_X_y
ensure_min_features, warn_on_dtype, estimator)
File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 382, in check_array
array = np.array(array, dtype=dtype, order=order, copy=copy)
ValueError: setting an array element with a sequence.
Please fix this issue.

Hi,
hog function returns 2 values, so you have to change the line 45 and 55 of extract-features.py with this line
fd,hogimage = hog(im, orientations, pixels_per_cell, cells_per_block, visualize, normalize)

@kantajit did your code work with this solution ?

Yes, that worked.

@akane999 I did the same thing as you said corresponding to the same issue. But I got the error shown as below:
Traceback (most recent call last):
File "../object-detector/extract-features.py", line 58, in
fd,hogimage = hog(im, orientations, pixels_per_cell, cells_per_block, visualize, normalize)
ValueError: too many values to unpack
If I change back, it game me the previous error again. Any advise? thanks

Please check the dimensions of your data, this error means that an argument that should be a single value is an array, so It will not work.
So check the dimensions.

De: azureway<EMAIL_ADDRESS>Enviado: lunes, 28 de agosto de 2017 02:16 a. m.
Para: bikz05/object-detector
CC: akane999; Mention
Asunto: Re: [bikz05/object-detector] Error when training: ValueError: setting an array element with a sequence. (#10)
@akane999https://github.com/akane999 I did the same thing as you said corresponding to the same issue. But I got the error shown as below:
Traceback (most recent call last):
File "../object-detector/extract-features.py", line 58, in
fd,hogimage = hog(im, orientations, pixels_per_cell, cells_per_block, visualize, normalize)
ValueError: too many values to unpack
If I change back, it game me the previous error again. Any advise? thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/bikz05/object-detector/issues/10#issuecomment-325244456, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKOqjYtQOhZp2TgpsmAgdBeBbax3HWBzks5sciMLgaJpZM4MJmg3.


Workflow shall work on arm based deployment

ref: https://theappsmith.slack.com/archives/C05QG0J87UL/p1712548282721399


Handle location permission in example on Android

This PR adds permission handler to check location permission before scanning on Android. To achieve this, I have added permission handler plugin. But there are more changes here.
BleDevice
I found this class having some unused subclasses, methods and fields. I removed all the unused stuff, so it's now much simpler and easier to understand. For example, _isConnected was always false and never used, ConnectedBleDevice was exactly the same as BleDevice and DisconnectedBleDevice class had only different toString() method and never used _devicesInConnectingProcess list. I have also changed constructor. I found it simpler to create BleDevice from ScanResult instead of 3 different args that all come from one place.
Visual Studio Code and Windows
Some of the changes are just formatting done by Visual Studio Code by itself. I have also added launch.json file to run the example in VSC without opening native projects. There are some little changes in Android project that I had to make in order to compile it in Windows. You will find newer version of Gradle, and enabled useAndroidX and enableJetifier flags.
Permission Handler
I implemented location permission check in Devices BLoC. It's one async method that is running just before scanning: _checkPermissions(). If the user will not grand location permission on app start, he will have a second chance by using pull to refresh.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


mn cli option should be features

Good catch!

Good catch!

Indeed. Great to have your 👀 on this project @burtbeckwith !