Error on block break using sponge 5.0

If you break a block with the preventJobFarming set to true in the jobs config, you will get this error when someone tries to break a block that is in the jobs list.
[22:20:06] [Server thread/TRACE] [Sponge/]: /***********************************************************************************************************************************/
[22:20:06] [Server thread/TRACE] [Sponge/]: /*                                                         Switching Phase                                                         */
[22:20:06] [Server thread/TRACE] [Sponge/]: /***********************************************************************************************************************************/
[22:20:06] [Server thread/TRACE] [Sponge/]: /* Phase incompatibility detected! Attempting to switch to an invalid phase!                                                       */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*   Current Phase : GeneralPhase{}                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*   Current State : UNWINDING                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*   Entering incompatible Phase : PluginPhase{}                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*   Entering incompatible State : BLOCK_WORKER                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /* Current phases :                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*   - Phase: UNWINDING                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     Context:                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: UnwindingContext                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: Source                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: EntityPlayerMP['cartman2000'/140487, l='guestworld', x=-309.65, y=7.00, z=482.38]                             */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: PacketPlayer                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: EntityPlayerMP['cartman2000'/140487, l='guestworld', x=-309.65, y=7.00, z=482.38]                             */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: CapturedBlocks                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: CapturedBlocksSupplier{Captured=1}                                                                            */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: CapturedBlockDropMap                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: BlockItemDropsSupplier{Captured=1}                                                                            */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: CapturedBlockITemDrops                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: BlockItemEntityDropsSupplier{Captured=0}                                                                      */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: CapturedItems                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: CapturedItemsSupplier{Captured=0}                                                                             */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: CapturedEntities                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: CapturedEntitiesSupplier{Captured=0}                                                                          */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: CapturedItemStacks                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: CapturedItemStackSupplier{Captured=0}                                                                         */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: Packet                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: net.minecraft.network.play.client.CPacketPlayerDigging@278b8b79                                               */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: Cursor                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: SpongeItemStackSnapshot{itemType=Item{Name=none}, count=1}                                                    */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: IgnoringCreative                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: false                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: ItemUsed                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: 1xitem.pickaxeDiamond@917                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: CapturedEntityItemDropMap                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: EntityItemDropsSupplier{Captured=0}                                                                           */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*         - Name: CapturedEntityItemDrops                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*           Object: EntityItemEntityDropsSupplier{Captured=0}                                                                     */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: UnwindingState                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: INTERACTION                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: CapturedBlocks                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: CapturedBlocksSupplier{Captured=0}                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: CapturedBlockDropMap                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: BlockItemDropsSupplier{Captured=0}                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: CapturedBlockITemDrops                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: BlockItemEntityDropsSupplier{Captured=0}                                                                          */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: CapturedItems                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: CapturedItemsSupplier{Captured=0}                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: CapturedEntities                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: CapturedEntitiesSupplier{Captured=0}                                                                              */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: CapturedItemStacks                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: CapturedItemStackSupplier{Captured=0}                                                                             */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: CapturedEntityItemDropMap                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: EntityItemDropsSupplier{Captured=0}                                                                               */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     - Name: CapturedEntityItemDrops                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*       Object: EntityItemEntityDropsSupplier{Captured=0}                                                                         */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*   Printing stack trace :                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /* java.lang.Exception: Stack trace                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.tracking.CauseTracker.switchToPhase(CauseTracker.java:141)                                   */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.world.WorldServer.setBlock(WorldServer.java:881)                                                              */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.world.WorldServer.setBlock(WorldServer.java:861)                                                              */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.world.World.setBlock(World.java:331)                                                                          */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.api.world.extent.MutableBlockVolume.setBlockType(MutableBlockVolume.java:92)                              */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.api.world.extent.MutableBlockVolume.setBlockType(MutableBlockVolume.java:76)                              */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.api.world.Location.setBlockType(Location.java:546)                                                        */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     com.erigitic.jobs.TEJobs.onPlayerBlockBreak(TEJobs.java:387)                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.listener.BreakListener_TEJobs_onPlayerBlockBreak39.handle(Unknown Source)                    */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95)                                        */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:210)                                      */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:193)                                      */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:238)                                      */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:223)                                      */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:138)                                                          */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.tracking.phase.function.GeneralFunctions.iterateChangeBlockEvents(GeneralFunctions.java:238) */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.tracking.phase.function.GeneralFunctions.processBlockCaptures(GeneralFunctions.java:167)     */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.tracking.phase.function.PacketFunction.lambda$null$23(PacketFunction.java:421)               */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.tracking.CapturedSupplier.ifPresentAndNotEmpty(CapturedSupplier.java:57)                     */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.tracking.phase.function.PacketFunction.lambda$static$28(PacketFunction.java:420)             */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.tracking.phase.PacketPhase.unwind(PacketPhase.java:776)                                      */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.event.tracking.CauseTracker.completePhase(CauseTracker.java:179)                                   */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:151)                                            */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$0(SourceFile:39)                                          */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13)                                                                 */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)                                                         */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     java.util.concurrent.FutureTask.run(Unknown Source)                                                                         */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.util.Util.func_181617_a(SourceFile:45)                                                                        */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:668)                                                 */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387)                                       */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613)                                                 */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)                                                          */
[22:20:06] [Server thread/TRACE] [Sponge/]: /*     java.lang.Thread.run(Unknown Source)                                                                                */
[22:20:06] [Server thread/TRACE] [Sponge/]: /***********************************************************************************************************************************/

Total Economy is not updated to work with the latest version of Sponge. I am working on this compatibility for the next release of Total Economy.


Support late materialization

Feature Request
Is your feature request related to a problem? Please describe:

For some query like select * from t where a + b <> 0;, we now scan all columns and then do filter, which is heavy and we can do better.
Describe the feature you'd like:

Support late materialization. We can scan column(s) at first to filter out unnecessary data segment, and then just scan the rest columns.
Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

Given this query:
SELECT id, view_count, like_count, dislike_count, title FROM youtube ORDER BY view_count DESC LIMIT 100

The column title is very large, and the query takes a long time:
100 rows in set. Elapsed: 26.280 sec. Processed 4.56 billion rows, 500.52 GB (173.38 million rows/s., 19.05 GB/s.)

It will be much faster to read the view_count column first while keeping track of the data parts and row number in the data part where the records are located, ORDER BY and LIMIT the required number of records, then using the same table snapshot, read the remaining columns.
For example, this query:
SELECT view_count FROM youtube ORDER BY view_count DESC LIMIT 100

Only takes:
100 rows in set. Elapsed: 6.920 sec. Processed 4.56 billion rows, 41.01 GB (658.44 million rows/s., 5.93 GB/s.)

Implementation proposal
Introduce a new column type, ColumnLazy, that will store the reference to the table snapshot to use, the list of data parts, and its main content will be (part num, row num) pairs. Multiple ColumnLazy can share the same content (but represent different delayed columns).


Includes import for Backdrop and Portal

Help docs were missing these necessary imports

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@55f1c80). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             master   #215   +/-   ##
=======================================
  Coverage          ?   100%
=======================================
  Files             ?     29
  Lines             ?    304
  Branches          ?     73
=======================================
  Hits              ?    304
  Misses            ?      0
  Partials          ?      0

Continue to review full report at Codecov.

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

Happy to help. Thanks for the great library.


[BUG] Pinned links look inactive

Description
Pinned links on the links page look like they are inactive and when I was editing them at a glance I accidentally deleted one of them. If they are set to pinned they could still appear as being active I think.
Screenshots

This is a sketch of what it could look like (I'm sure it could be way better).
Additional information
No response

Pinned and disabled are independent, so a link can be disabled from the main link list but still be pinned to the top of your profile

hey i would love to work on it

hey i would love to work on it

Please read the contributing guide, from the labels this is not ready for development yet, we are still discussing possible solutions - you can learn more about our labels here https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md

Maybe a solution would be if the link is disabled do not show pinned tag as it's not a relevant tag unless the link is enabled. wdyt?

Anything that makes them not look inactive at a glance should be fine.

Anything that makes them not look inactive at a glance should be fine.

But if they are disabled, they are inactive? correct?  Or are you saying there is a bug and those pinned links are actually active?

Yeah these are the active pinned links. The Disabled badge still shows up (my dodgy sketch tries to explain that but I didn't know how to word it).

Uploading chrome_r0pxUnn3Cu.mp4…
I grabbed a quick video to show what I mean.

I want to work on it

The disabled only affects the main links list but the link can still be pinned - they are independent. Maybe we need to display this better?

I want to work on it

@Sahilll15 This issue does not have the label ready for dev because there is still no solution. Please read the contributing guide, from the labels this is not ready for development yet, we are still discussing possible solutions - you can learn more about our labels here https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md

How about adding a new section above the links called "Socials"
It will be all icons that currently have pinned toggled ON
CLicking on an icon will open the edit for that link
It could live here where i have the red box in the below SS (not bordered like this- just to show the space)

I think Eddie is right. Pinned links shouldn't show Enabled or Disabled and they should only show if they are pinned or not pinned.
These could potentially be displayed on the page differently too (as pinned icons rather than the same as a link).

Great discussion 👍  thought/challenge, if we displayed them separated, then an enabled link that is also pinned, will be duplicated - but they are the same link in the DB, so any updates would effect both, which could be confusing 🤔

@eddiejaoude That makes sense.
Perhaps for now we go back to @loftwah original thought is that the main confusion is "pinned" is a dimmed color and therefore looks inactive. So maybe for now a simple style update to make sure the inactive state isn't being applied to the pinned label and we can think on a way to make this more clear in the future?

yes good idea 👍

okay, updated the OP to add the approved approach for htis issue! Maybe the folks helping with your redesign will have an idea for this area too

May I get this issue assigned?

May I get this issue assigned?

@akkshitgupta as you were the first to request this once the labels changed, I had assigned this to you.

I have fixed the pinned links UI on the profile. If a link disabled then pin icon won't be there on the UI as you can see in the video, i.e, a pin icon would be there only if the link is pinned and enabled as well.
https://github.com/EddieHubCommunity/LinkFree/assets/96991785/3fc9ea13-f94e-45fb-8b03-0056d5b01766
NOTE: I observed that the pinned link is listed on the profile even if it is disabled in this video. I tried to fix it but I could not reproduce the bug. I am not able to find the origin of data object in UserProfile.js file.

some code from UserProfile.js

Thank you @akkshitgupta but this will break many profiles, enabled and pinned are separate, it is how we deal with links and socials in the json but only use a single url

You mean to say the pinned link/socials must be there on the profiles irrespective of the link enabled or disabled? Is it okay to show the pinned icon/tag only if the link is enabled?


Issue installing on Alpine Linux 0.7.3 -> current (0.7.5)

High level description:
JPype1 (0.7.3 -> current) is unable to install correctly on Alpine Linux
Steps to reproduce:

docker run --rm -it --entrypoint=sh alpine:latest
apk add python3-dev gcc build-base
pip3 install JPype1

Expected Result

Installation Success

Actual Result

Install fails due to alpine's musl libc not including mallinfo (which is used in your jp_gc.cpp). mallinfo is apparently a GNU glibc addition and thus not in alpine's implementation.

Thanks for the bug report.   Do you know of a suitable replacement for mallinfo on that system?  This particular code is for triggering the Java GC whenever the Python has exceeded a certain memory allocation (implying java is holding resources).   Unfortunately, Python does not have any internal memory tracking so I have to fall back to system tools.
Also how do I recognize if the installation is alpine so that I can trigger an alternative.

Unfortunately I don't know enough about this off the top of my head to really comment. It looks like a fairly common problem that lots of different libraries people have run into.

I'm not really sure when I'll have time to dig any deeper, just figured I would open the bug report as others could be effected.
Thanks for the quick response!!

I did some poking as well.  The most common response is "just comment it out as it is just for auditing information."
Unfortunately, that is not the case with JPype.    I guess the long term solution would be to try to twist the arms on Python folks to see about adding something that helps in collecting statistics on the total memory that Python has out.   They have trace facility but they delete the memory before they call tracer so there is no way to find out how big the freed memory was.   So I could track how much was allocated and not how much was being freed which wasn't very useful for coupling garbage collectors.
So lets start with the short term solution.  If you can research some DEFINE that is unique to that system that I can test on then I can add logic to disable the GC linker on that system.   We ran without it for years so it would be a fairly minor defect.

That seems like a reasonable approach, sounds good.

@dm-ion I have create a PR to test your issue.  I don't know enough to get a working JDK on alpine, but i was able to get everything to compile.  Please give it a test so that I can merge it.

Oh dang, awesome! I think I should have time to give it a test in the next couple of days.
FYI to get a working JDK it is sufficient to type apk --update add openjdk8

Hey @Thrameos this compiles and runs on alpine no problem.
I haven't reviewed your code at all (and I'm not sure I'd have the time to do it justice), so not sure if it actually doesn't want you want.
Steps:

docker run --rm -it --entrypoint=sh alpine:latest
apk add python3-dev gcc build-base py3-pip openjdk8
pip3 install --upgrade pip setuptools
Pull source, apply patch from merge request
python3 setup.py build
python3 setup.py install
Run python apps that require JPype1 to function (In my case JayDeBeApi)

Unfortunately my docker image does not appear to be working while following your detailed instructions.  I always fail when building as it can't find javac.  So I set JAVA_HOME to the openjdk8 installation, but then I get the following:
/io # python3 test.py
Error occurred during initialization of VM
Unable to load native library: Error loading shared library libjvm.so: No such file or directory (needed by /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libjava.so)

But given that your image is working, there is a specific script required to test this issue.   Here is an example I ran on another linux machine (not alpine) run from the root directory of JPype after a build in place.
$ PYTHONPATH=. python project/utility/testMemoryExh.py

created= 1   destroyed= 0   delta= 1   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 1001   destroyed= 0   delta= 1001   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 2001   destroyed= 0   delta= 2001   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 3001   destroyed= 0   delta= 3001   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 4001   destroyed= 0   delta= 4001   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 5001   destroyed= 545   delta= 4456   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 6001   destroyed= 4675   delta= 1326   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 7001   destroyed= 4675   delta= 2326   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 8001   destroyed= 4675   delta= 3326   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 9001   destroyed= 4675   delta= 4326   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 10001   destroyed= 4675   delta= 5326   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 11001   destroyed= 4675   delta= 6326   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 12001   destroyed= 4686   delta= 7315   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 3
created= 13001   destroyed= 11947   delta= 1054   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 3
created= 14001   destroyed= 11947   delta= 2054   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 3

This important point here is the destroyed column.  If GC is running properly then it will trigger objects to be destroyed at semi-regular intervals.  If it fails then Python will exhaust memory as Java is holding pointers to Python memory but because Java only is counting its memory towards the memory total and the pointers are small.
If you can perform that test successfully then it is working correctly.

Hah oops I forgot that I added java home and modified the path manually...
I can give your test a try

Alright so I revised my steps above (I had some things in my base alpine image I was using) and then ran the following:
pip3 install numpy jedi pytest
PYTHONPATH=. python3 project/utility/testMemoryExh.py
and this doesn't work to launch the tests. I get TypeError: Class jpype.common.Fixture is not found
I'm sure I'm missing something really obvious to get this test running. I can probably debug it / go through code / doc to see how to do it tomorrow, unless you're gracious enough to tell me what I'm doing wrong :D

Sorry.  Before the test can be run the harness needs to be build.  I thought that you had gotten the test harness built but I see you missed that step.
To create the harness use:
   python3 setup.py test_java

It should create test/classes with the harness classes.   You may need to adjust the build script (setupext/test_java.py) as I have not tested it on your configuration.

created= 1   destroyed= 0   delta= 1   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 1
created= 1001   destroyed= 11   delta= 990   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 2001   destroyed= 11   delta= 1990   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 2
created= 3001   destroyed= 76   delta= 2925   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 4
created= 4001   destroyed= 2924   delta= 1077   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 4
created= 5001   destroyed= 2924   delta= 2077   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 4
created= 6001   destroyed= 3231   delta= 2770   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 7001   destroyed= 5747   delta= 1254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 8001   destroyed= 5747   delta= 2254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 9001   destroyed= 5747   delta= 3254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 10001   destroyed= 5747   delta= 4254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 11001   destroyed= 5747   delta= 5254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 12001   destroyed= 5747   delta= 6254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 13001   destroyed= 5747   delta= 7254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 14001   destroyed= 5747   delta= 8254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 15001   destroyed= 5747   delta= 9254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 16001   destroyed= 5747   delta= 10254   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 5
created= 17001   destroyed= 6579   delta= 10422   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 18001   destroyed= 16349   delta= 1652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 19001   destroyed= 16349   delta= 2652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 20001   destroyed= 16349   delta= 3652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 21001   destroyed= 16349   delta= 4652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 22001   destroyed= 16349   delta= 5652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 23001   destroyed= 16349   delta= 6652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 24001   destroyed= 16349   delta= 7652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 25001   destroyed= 16349   delta= 8652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 26001   destroyed= 16349   delta= 9652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 27001   destroyed= 16349   delta= 10652   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 6
created= 28001   destroyed= 17544   delta= 10457   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 29001   destroyed= 27192   delta= 1809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 30001   destroyed= 27192   delta= 2809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 31001   destroyed= 27192   delta= 3809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 32001   destroyed= 27192   delta= 4809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 33001   destroyed= 27192   delta= 5809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 34001   destroyed= 27192   delta= 6809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 35001   destroyed= 27192   delta= 7809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 36001   destroyed= 27192   delta= 8809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 37001   destroyed= 27192   delta= 9809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 38001   destroyed= 27192   delta= 10809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8
created= 39001   destroyed= 27192   delta= 11809   current=<PHONE_NUMBER>   min=<PHONE_NUMBER>   max=<PHONE_NUMBER>   triggered= 8

Looks good to me.  I will start the review process to have it included in the next release.  Thanks again for the bug report taking the time to follow through.

No worries, glad I could help. Thanks for doing 90% of the work! :D


Add a mechanism for cleanly supporting interface files

Currently deploy.js and publish.js automatically try to deploy and publish any .sol files they can find.  However interface files do not need to be deployed, and attempting to do so results in this error:
NomicLabsHardhatPluginError: You are trying to create a contract
factory for the contract YourInterface, which is abstract and
can't be deployed.

So add a mechanism for skipping deployment and publishing, and make it easy to do this by adding interface files to hardhat.config.js.  Later we may want to consider automatically detecting interface files, but this is a simple solution for now.

/cc @jamespfarrell

Good man Adam!

Hey thanks! This introduces some complexity into the core branch. I think you can achieve the same outcome (no warnings during publish + deploy) by putting interfaces in a folder within contracts? This is also bit more legible for the user. What do you think?

Interesting idea, I'll try it.

@aspiers did @azf20 suggestion work? If yes, I'll close this PR.
Also, we recently updated Scaffold-eth to work with Hardhat Deploy, so probably things are a bit different now.

Yeah, probably no longer valid due to the migration to Hardhat.


Fixing Padding and Speeding up Z score calling

Change the zero padding to be normally distributed (the other approach led to too high z scores) and also skip calculating z scores for values of read count less than 5.   Co-authored with @jeacasc

I will push this through - we no longer calcualte the z score for values whose read count < 5.  So some of the tests are complaining.  Pushing this through so Jenny can use the code for a time sensitive project.


Fixes the issue with the autoloader #1815

In order to properly use the autoloader, we do not want to delegate anonymous? to the instance.
This should fix most remaining issues with the autoloader in master: https://github.com/ruby-grape/grape/issues/1815
Sorry for the lack of specs. It's really hard to reproduce without setting up a new project.
This was tested using: https://github.com/myxoh/testing-grape/commits/master
(If you run rspec it crashes, when you add this commit, it stops crashing)

Merging, thanks. Consider some spec options:

You could try writing a spec into spec/integration, these use their own Gemfile's.
You could write a spec that says "does not delegate anonymous? to the instance" and add a link to the issue, so that someone doesn't accidentally remove it.


Archive this repo & workspace

after merging https://github.com/opensafely/tpp-database-schema/issues/185

[x] verify results are functioning correctly in new repo / workspace
[ ] archive repo
[ ] archive workspace
[ ] ...?

Verified the results in airlock & they look as expected.


Update proc macro2

Update to the latest version of proc_macro2, quote and syn.

looks like the new rustfmt has different ideas regarding the style and there is something quite fishy going on windows and x86 but it is unrelated to this set.

Unfortunately we're hit by a slew of bugs here:

First the x86 tests seem to be failing I believe because mergefunc was recently landed. These are presumably duplicates with other functions being generated so they're merged and the disassembly is no longer showing us precisely which instruction is being used.
Next proc-macro2 is buggy on nightly, causing the verify-x86 builder to build
I think rustfmt with nightly needs to be run again?

I also don't know what's going on yet with Windows, that's just Linux :(

Ok Windows looks back to "normal", I think this PR is now purely blocked on figuring out mergefunc

Ok I've pushed a commit that will hopefully thwart mergefunc, let's see how it pans out.

Alright, all green now!


[SPARK-47412][SQL] Add Collation Support for LPad/RPad.

Add collation support for LPAD and RPAD
What changes were proposed in this pull request?

Add collation support for LPAD and RPAD
Why are the changes needed?

Does this PR introduce any user-facing change?

Yes
How was this patch tested?

Unit tests and spark-shell
Was this patch authored or co-authored using generative AI tooling?

No.

@uros-db  please review this one, too.

@uros-db made all changes requested. including making the test cases more spicy, as requested 🌶
Please review.

@uros-db Done: I added tests for implicit cast. Note that since I follow the pattern for  tests for Contains/StartsWith/EndsWith, the part of the test that validates behavior of implicit cast, uses checkAnswer but does not check type... For predicates such as  Contains/StartsWith/EndsWith, this makes good sense, as if the cast was not correct, the result would be a different boolean value then expected.
For testing not predicate functions, the pattern makes less sense to me and might benefit for the addition of checking the return type, in my opinion. This would be a departure from the pattern. Let me know what you prefer.

@uros-db addressed the latest requested fixes accordingly. please re-review.

small changes in casting

@uros-db done

Lotfan barsihay lam ra shoro konid
ShahrzadMahro
در تاریخ دوشنبه ۱۵ آوریل ۲۰۲۴، ۱۳:۴۱ Gideon Potok @.***>
نوشت:

@uros-db https://github.com/uros-db please review this one, too.
—
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/46041#issuecomment-2056451989, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ANEZZRCAXVPESRR4BQ52XQTY5ORU5AVCNFSM6AAAAABGGDLKUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJWGQ2TCOJYHE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

U;Sh(7700077)SQL HARMAN 04#G)
ShahrzadMahro
در تاریخ دوشنبه ۲۲ آوریل ۲۰۲۴، ۰۱:۲۴ Gideon Potok @.***>
نوشت:

@.**** commented on this pull request.
In
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala
https://github.com/apache/spark/pull/46041#discussion_r1573929256:

case stringRPad: StringRPad =>

 val Seq(str, pad) = collateToSingleType(Seq(stringRPad.str, stringRPad.pad))

 stringRPad.withNewChildren(Seq(str, stringRPad.len, pad))

case stringLPad: StringLPad =>

 val Seq(str, pad) = collateToSingleType(Seq(stringLPad.str, stringLPad.pad))

 stringLPad.withNewChildren(Seq(str, stringLPad.len, pad))

@uros-db https://github.com/uros-db done. please re-review.
—
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/46041#discussion_r1573929256, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ANEZZRCQABGMZCVIUQIHFWDY6QYQ7AVCNFSM6AAAAABGGDLKUSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMJTGUZDQOJSGY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

can you resolve merge conflicts? thanks!


Add trigger to check_worker_active to check if new nodes are active

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

New or Affected Resource(s)

Potential Terraform Configuration

# Copy-paste any Terraform configurations for how the requested feature may be used.

References

Closed in #184


Line break doesn't work with bullet list or check boxes

When I was playing with the example app, I noticed that the line break key doesn't work in bullet lists and check boxes.
I have attached a video showing the issue.
https://github.com/superlistapp/super_editor/assets/63902683/bd7d7896-47b5-4c7b-b648-8e646a6adbc5

It seems this is a duplicate of https://github.com/superlistapp/super_editor/issues/1157

I'm closing this as it is already fixed.

I'm closing this as it is already fixed.


AUD V4.1 - /updatedocsv4

Drop Menu V14 based system
Support all existing infrastructure in V3
Replicate ProfileV2 look-alike
Dynamic Calling

This is insane, but is just a start

Demo Testing Dynamic Commands / Dynamic Calling soon
[To be done today] Support all existing infrastructure in V3

Patched in Replicate ProfileV2 look-alike https://github.com/TRENATTI/Szeebe/commit/48f6ae2782c3c26795bc1d2eb8f276ddabc8546e
Patched in Drop Menu V14 based system https://github.com/TRENATTI/Szeebe/commit/48f6ae2782c3c26795bc1d2eb8f276ddabc8546e

[To be done today/tomorrow] Support all existing infrastructure in V3
Demo Testing Dynamic Commands / Dynamic Calling soon: Patched for getGroup- https://github.com/TRENATTI/alapha-universe-docs/commit/5a82411eaa603e7757fe1df452e5e1c48f4c7ad7#diff-359d7596dfff1f2f67c17f3a8a4da715fbc1e509fb00a9a4ab12f9f0047ceb8a

Patched - Support all existing infrastructure in V3 - https://github.com/TRENATTI/alapha-universe-docs/commit/6876450dee743c4311f31eaffbf755cfe4167c02 https://github.com/TRENATTI/alapha-universe-docs/commit/6e112043f1f094c6805c20de45ad7978f3f22f79 https://github.com/TRENATTI/alapha-universe-docs/commit/6d6900d1db5c6fb9482ac350dd3b3f8e9dbb3dca


A better method to simulate HID-Keyboard and HID-Mouse for Android device

https://github.com/torvalds/linux/blob/master/samples/uhid/uhid-example.c
We can utilize the Linux uhid API to create a HID input device, and having ADB permission is sufficient to achieve this.
This method doesn't require an actual USB wire to be connected to the Android device, and allows the HID keyboard and mouse functionality to coexist with other features of scrcpy.
However, this method requires scrcpy to load an ELF file, as the uhid API must be called in JNI.

https://github.com/WuDi-ZhanShen/Android-Gyroscope-MC
We can refer to the Android-Gyroscope-MC project on GitHub. The project launches a dex file using the "app_process" command, and then creates a HID device using a JNI function.

Thank you for the suggestion and pointers :+1:
This would solve two major problems with HID over AOA:

it may only work over USB
on Windows, it is not (easily) possible to run both adb over USB and HID

However, it could not completely replace HID over AOA either: the latter allows to send HID events even when USB debugging is disabled (which is not possible with UHID, since it requires to execute app_process, so it could not be used for --otg). Therefore, that would be an additional feature (--hid-method={aoa,uhid}).

However, this method requires scrcpy to load an ELF file, as the uhid API must be called in JNI.

That's annoying :/ I'd like to keep scrcpy as simple as possible, but adding a native part would require the Android NDK to build, and either we support only x86, either we need to generate .so for multiple arch…
However, that would also to support #2130 (which also requires native code).

Thank you for the suggestion and pointers 👍
This would solve two major problems with HID over AOA:

it may only work over USB
on Windows, it is not (easily) possible to run both adb over USB and HID

However, it could not completely replace HID over AOA either: the latter allows to send HID events even when USB debugging is disabled (which is not possible with UHID, since it requires to execute app_process, so it could not be used for --otg). Therefore, that would be an additional feature (--hid-method={aoa,uhid}).

However, this method requires scrcpy to load an ELF file, as the uhid API must be called in JNI.

That's annoying :/ I'd like to keep scrcpy as simple as possible, but adding a native part would require the Android NDK to build, and either we support only x86, either we need to generate .so for multiple arch…
However, that would also to support #2130 (which also requires native code).

I have seen #2130, which mentions the use of the uinput API to simulate input devices, but fails to open "/dev/uinput" on some devices. Indeed, uinput is not available on quite a few Android phones, and I have encountered the same problem and am not sure why. However, uhid should theoretically be supported on any Android phone, as Bluetooth input devices such as controllers, keyboards, mice, and even headphones require registration through uhid. So far, I have not encountered any Android devices that do not support uhid.
Creating devices with uinput requires the use of ioctl, and similar operations are also required for uhid. This must be done using native code, as both uinput and uhid need to interact with the Linux kernel. I have also tried to find ways to implement uinput or uhid in pure Java, but without success.

I found Android system already has a JNI wrapper for uhid, I wonder can we use it directly so no native code needs to be build.
https://cs.android.com/android/platform/superproject/+/master:frameworks/base/cmds/hid/src/com/android/commands/hid/Device.java;l=68-87;drc=f532c911262bc97bea7d419ce14c6dc151d0d3a5
    static {
        System.loadLibrary("hidcommand_jni");
    }

    private static native long nativeOpenDevice(
            String name,
            int id,
            int vid,
            int pid,
            int bus,
            byte[] descriptor,
            DeviceCallback callback);

    private static native void nativeSendReport(long ptr, byte[] data);

    private static native void nativeSendGetFeatureReportReply(long ptr, int id, byte[] data);

    private static native void nativeSendSetReportReply(long ptr, int id, boolean success);

    private static native void nativeCloseDevice(long ptr);

I mean you can load libhidcommand_jni.so and call JNI methods like it does, no need for reflection. This code is in the hid command, which injects hid events from a file or stdin, not in Android framework.

I mean maybe you can load libhidcommand_jni.so and call JNI methods like it does, no need for reflection. This code is in the hid command, which injects hid events from a file or stdin for testing, not in Android framework.

I'm not sure if we can directly call these JNI functions, since they are limited to being called only by a specific Java class who create these JNI functions, not who load the library.

Sorry I'm not familiar with Java and JNI, can you give your own package and class the same name as the JNI library is looking for, so those native methods get registered on your code (because hid.jar is not loaded in normal execution)?

Sorry I'm not familiar with Java and JNI, can you give your own package and class the same name as the JNI library is looking for, so those native methods get registered on your code (because hid.jar is not loaded in normal execution)?

https://github.com/WuDi-ZhanShen/AndroidUHidPureJava
The method you suggested works fine !!

Thank you for the suggestion and pointers 👍
This would solve two major problems with HID over AOA:

it may only work over USB
on Windows, it is not (easily) possible to run both adb over USB and HID

However, it could not completely replace HID over AOA either: the latter allows to send HID events even when USB debugging is disabled (which is not possible with UHID, since it requires to execute app_process, so it could not be used for --otg). Therefore, that would be an additional feature (--hid-method={aoa,uhid}).

However, this method requires scrcpy to load an ELF file, as the uhid API must be called in JNI.

That's annoying :/ I'd like to keep scrcpy as simple as possible, but adding a native part would require the Android NDK to build, and either we support only x86, either we need to generate .so for multiple arch…
However, that would also to support #2130 (which also requires native code).

Thanks to yume-chan's method, I was able to successfully create uhid mouse and keyboard using pure Java. Please check out my project at:
https://github.com/WuDi-ZhanShen/AndroidUHidPureJava

Thank you for the suggestion and pointers 👍
This would solve two major problems with HID over AOA:

it may only work over USB
on Windows, it is not (easily) possible to run both adb over USB and HID

However, it could not completely replace HID over AOA either: the latter allows to send HID events even when USB debugging is disabled (which is not possible with UHID, since it requires to execute app_process, so it could not be used for --otg). Therefore, that would be an additional feature (--hid-method={aoa,uhid}).

However, this method requires scrcpy to load an ELF file, as the uhid API must be called in JNI.

That's annoying :/ I'd like to keep scrcpy as simple as possible, but adding a native part would require the Android NDK to build, and either we support only x86, either we need to generate .so for multiple arch…
However, that would also to support #2130 (which also requires native code).

Thanks to yume-chan's method, I was able to successfully create uhid mouse and keyboard using pure Java. Please check out my project at:
https://github.com/WuDi-ZhanShen/AndroidUHidPureJava

Does that mean it's also possible to support game controllers?

Thank you for the suggestion and pointers 👍
This would solve two major problems with HID over AOA:

it may only work over USB
on Windows, it is not (easily) possible to run both adb over USB and HID

However, it could not completely replace HID over AOA either: the latter allows to send HID events even when USB debugging is disabled (which is not possible with UHID, since it requires to execute app_process, so it could not be used for --otg). Therefore, that would be an additional feature (--hid-method={aoa,uhid}).

However, this method requires scrcpy to load an ELF file, as the uhid API must be called in JNI.

That's annoying :/ I'd like to keep scrcpy as simple as possible, but adding a native part would require the Android NDK to build, and either we support only x86, either we need to generate .so for multiple arch…
However, that would also to support #2130 (which also requires native code).

Thanks to yume-chan's method, I was able to successfully create uhid mouse and keyboard using pure Java. Please check out my project at:
https://github.com/WuDi-ZhanShen/AndroidUHidPureJava

Does that mean it's also possible to support game controllers?

Yes, It does. It also supports hid touchScreen or any hid input devices.

In fact, the native API has changed multiple times, even the nativeOpenDevice method had changed twice.
  // 6
  private static native long nativeOpenDevice(String name, int id, int vid, int pid,
          byte[] descriptor, MessageQueue queue, DeviceCallback callback);
  private static native void nativeSendReport(long ptr, byte[] data);
  private static native void nativeCloseDevice(long ptr);

  // 9
  private static native long nativeOpenDevice(String name, int id, int vid, int pid,
          byte[] descriptor, DeviceCallback callback);

  // 11
  private static native long nativeOpenDevice(String name, int id, int vid, int pid, int bus,
          byte[] descriptor, DeviceCallback callback);

I haven't tested, but Google says I can list all overloads in a class, and the native code will register to one of them based on signature. Then I just need to call the correct overload based on system version (or try each one and catch the runtime error).

IIRC, HID touchscreen needs to send some feature reports, which is only supported in Android 10 and later.

In fact, the native API has changed multiple times, even the nativeOpenDevice method had changed twice.
  // 6
  private static native long nativeOpenDevice(String name, int id, int vid, int pid,
          byte[] descriptor, MessageQueue queue, DeviceCallback callback);

  // 9
  private static native long nativeOpenDevice(String name, int id, int vid, int pid,
          byte[] descriptor, DeviceCallback callback);

  // 11
  private static native long nativeOpenDevice(String name, int id, int vid, int pid, int bus,
          byte[] descriptor, DeviceCallback callback);

I haven't tested, but Google says I can list all overloads in a class, and the native code will register to one of them based on signature. Then I just need to call the correct overload based on system version (or try each one and catch the runtime error).
IIRC, HID touchscreen needs to send some feature reports, which is only supported in Android 10 and later.

I think what Google says is right. And I only test the uhid touchscreen function on Android12 and Android11.

@WuDi-ZhanShen Do you want to create a PR for Scrcpy to add uhid mouse and keyboard support? If not, I will try to do that.
My plan is integrating all libhidcommand_jni methods into Scrcpy control message protocol, then let the client generates all descriptors and reports. So I can reuse the existing AoA HID emulation code, and it's easier for other clients to add more device types.
The --hid-keyboard and --hid-mouse options will become --keyboard-inject=disable/api/aoa/uhid and --mouse-inject=disable/api/aoa/uhid. The shorthands will still use -K and -M, but with the same option values.
The disable option value is added to support OTG mode usage. --otg will imply --keyboard-inject=aoa and --mouse-inject=aoa, but users can disable one of them using --otg --keyboard-inject=disable. I think it's more reasonable than current situation where --otg and --otg -KM does the same thing, but --otg -K only enables the keyboard. The disable option value will also work in non-OTG mode. Using api or uhid option values in OTG mode will result an error.
I don't know if there are any advantages of using uhid touchscreen emulation for touch inputs than Android API event injection, so touch events will continue to use API based injection.
Game controller support will be added later, with only disable/aoa/uhid option values.

@WuDi-ZhanShen Do you want to create a PR for Scrcpy to add uhid mouse and keyboard support? If not, I will try to do that.
My plan is integrating all libhidcommand_jni methods into Scrcpy control message protocol, then let the client generates all descriptors and reports. So I can reuse the existing AoA HID emulation code, and it's easier for other clients to add more device types.
The --hid-keyboard and --hid-mouse options will become --keyboard-inject=disable/api/aoa/uhid and --mouse-inject=disable/api/aoa/uhid. The shorthands will still use -K and -M, but with the same option values.
The disable option value is added to support OTG mode usage. --otg will imply --keyboard-inject=aoa and --mouse-inject=aoa, but users can disable one of them using --otg --keyboard-inject=disable. I think it's more reasonable than current situation where --otg and --otg -KM does the same thing, but --otg -K only enables the keyboard. The disable option value will also work in non-OTG mode. Using api or uhid option values in OTG mode will result an error.
I don't know if there are any advantages of using uhid touchscreen emulation for touch inputs than Android API event injection, so touch events will continue to use API based injection.
Game controller support will be added later, with only disable/aoa/uhid option values.

Of course, this is mainly your credit. You provided this valuable idea to implement the uhid-pure-java feature, and I just did simple verification. So I think the PR should be created by you.

Actually, uhid only needs open, read and write. It doesn't use ioctl at all.
However, due to an unknown reason, adb forward tcp:0 dev:/dev/uhid doesn't work (it works with other files on the filesystem), nor does adb shell nc -f /dev/uhid. So I have to write some code to forward it to the client. But at least I don't need any native code nor libhidcommand_jni.so.
I made a POC using Kotlin on Android end and JavaScript on client end. The Android end is extremely simple (the socket listening part is omitted):
import android.system.Os
import android.system.OsConstants
import java.io.InputStream
import java.io.OutputStream
import kotlin.concurrent.thread

class UHid {
    companion object {
        private const val MESSAGE_OPEN = 0;
        private const val MESSAGE_WRITE = 1;
        private const val MESSAGE_ERROR = 2;
        private const val MESSAGE_READ = 3;
        private const val MESSAGE_CLOSE = 4;

        private fun writeInt32(writer: OutputStream, value: Int) {
            writer.write(value)
            writer.write(value shr 8)
            writer.write(value shr 16)
            writer.write(value shr 24)
        }

        private fun readInt32(reader: InputStream): Int {
            return reader.read() or (reader.read() shl 8) or (reader.read() shl 16) or (reader.read() shl 24)
        }

        fun openUHid(input: InputStream, output: OutputStream) {
            val fd = Os.open("/dev/uhid", OsConstants.O_RDWR, 0)
            writeInt32(output, MESSAGE_OPEN)

            thread {
                try {
                    while (true) {
                        when (readInt32(input)) {
                            MESSAGE_WRITE -> {
                                val size = readInt32(input)
                                val data = ByteArray(size)
                                input.read(data)
                                Os.write(fd, data, 0, data.size)
                            }
                            MESSAGE_CLOSE -> {
                                Os.close(fd)
                                break
                            }
                        }
                    }
                } catch (e: Throwable) {
                    e.printStackTrace()
                    try {
                        Os.close(fd)
                    } catch (e: Throwable) {
                        // Ignore
                    }
                    try {
                        writeInt32(output, MESSAGE_ERROR)
                    } catch (e: Throwable) {
                        // Ignore
                    }
                }
            }

            val buffer = ByteArray(8 * 1024)
            try {
                while (true) {
                    val read = Os.read(fd, buffer, 0, buffer.size)
                    writeInt32(output, MESSAGE_READ)
                    writeInt32(output, read)
                    output.write(buffer, 0, read)
                }
            } catch (e: Throwable) {
                e.printStackTrace()
                try {
                    Os.close(fd)
                } catch (e: Throwable) {
                    // Ignore
                }
                try {
                    writeInt32(output, MESSAGE_ERROR)
                } catch (e: Throwable) {
                    // Ignore
                }
            }
        }
    }
}

The client end needs to implement uhid protocol, and emulate HID devices. I have successfully created a keyboard and a gamepad.
Because uhid supports output reports, the keyboard can detect capslock state on Android side (can be used to support syncing capslock status), and gamepad rumble also works (on Android 12+).

Awesome :+1:
Maybe the next "big" feature (after audio, camera, turn_screen_off on Android 14…).
Thank you for all your research work :heart:

Actually, uhid only needs open, read and write. It doesn't use ioctl at all.
However, due to an unknown reason, adb forward tcp:0 dev:/dev/uhid doesn't work (it works with other files on the filesystem), nor does adb shell nc -f /dev/uhid. So I have to write some code to forward it to the client. But at least I don't need any native code nor libhidcommand_jni.so.
I made a POC using Kotlin on Android end and JavaScript on client end. The Android end is extremely simple (the socket listening part is omitted):
import android.system.Os
import android.system.OsConstants
import java.io.InputStream
import java.io.OutputStream
import kotlin.concurrent.thread

class UHid {
    companion object {
        private const val MESSAGE_OPEN = 0;
        private const val MESSAGE_WRITE = 1;
        private const val MESSAGE_ERROR = 2;
        private const val MESSAGE_READ = 3;
        private const val MESSAGE_CLOSE = 4;

        private fun writeInt32(writer: OutputStream, value: Int) {
            writer.write(value)
            writer.write(value shr 8)
            writer.write(value shr 16)
            writer.write(value shr 24)
        }

        private fun readInt32(reader: InputStream): Int {
            return reader.read() or (reader.read() shl 8) or (reader.read() shl 16) or (reader.read() shl 24)
        }

        fun openUHid(input: InputStream, output: OutputStream) {
            val fd = Os.open("/dev/uhid", OsConstants.O_RDWR, 0)
            writeInt32(output, MESSAGE_OPEN)

            thread {
                try {
                    while (true) {
                        when (readInt32(input)) {
                            MESSAGE_WRITE -> {
                                val size = readInt32(input)
                                val data = ByteArray(size)
                                input.read(data)
                                Os.write(fd, data, 0, data.size)
                            }
                            MESSAGE_CLOSE -> {
                                Os.close(fd)
                                break
                            }
                        }
                    }
                } catch (e: Throwable) {
                    e.printStackTrace()
                    try {
                        Os.close(fd)
                    } catch (e: Throwable) {
                        // Ignore
                    }
                    try {
                        writeInt32(output, MESSAGE_ERROR)
                    } catch (e: Throwable) {
                        // Ignore
                    }
                }
            }

            val buffer = ByteArray(8 * 1024)
            try {
                while (true) {
                    val read = Os.read(fd, buffer, 0, buffer.size)
                    writeInt32(output, MESSAGE_READ)
                    writeInt32(output, read)
                    output.write(buffer, 0, read)
                }
            } catch (e: Throwable) {
                e.printStackTrace()
                try {
                    Os.close(fd)
                } catch (e: Throwable) {
                    // Ignore
                }
                try {
                    writeInt32(output, MESSAGE_ERROR)
                } catch (e: Throwable) {
                    // Ignore
                }
            }
        }
    }
}

The client end needs to implement uhid protocol, and emulate HID devices. I have successfully created a keyboard and a gamepad.
Because uhid supports output reports, the keyboard can detect capslock state on Android side (can be used to support syncing capslock status), and gamepad rumble also works (on Android 12+).

Hi!
Could I kindly request you to show the client end of the POC

Could I kindly request you to show the client end of the POC

The client side is in an internal project.
You can refer the on-going PR #4473

Superseded y #4473 I guess, released in scrcpy 2.4.


How to specify rotation period when creating a new KMS key?

I'm trying to enable automate key rotation using the SDK. This is what I tried so far:
var key = new CryptoKey
{
    Purpose = "ENCRYPT_DECRYPT",
    VersionTemplate = new CryptoKeyVersionTemplate
    {
         ProtectionLevel = mProtectionLevel,
    },
    NextRotationTime = DateTime.UtcNow.Add(mRotationPeriod),
    RotationPeriod = Duration.FromTimeSpan(mRotationPeriod)
};

var request = cryptoKeys.Create(key, keyringId);
request.CryptoKeyId = safeId;
await request.ExecuteAsync();

The problem is with RotationPeriod, I can't figure what I should put there.
When I tried something that is not Google.Protobuf.WellKnownTypes.Duration, I got this exception:
Google.GoogleApiException : Google.Apis.Requests.RequestError
Invalid value at 'crypto_key.rotation_period' (type.googleapis.com/google.protobuf.Duration),  [400]
Errors [
	Message[Invalid value at 'crypto_key.rotation_period' (type.googleapis.com/google.protobuf.Duration), ] Location[ - ] Reason[badRequest] Domain[global]
]

When I tried using the duration I got this exception:
Google.GoogleApiException : Google.Apis.Requests.RequestError
Invalid JSON payload received. Unknown name "seconds" at 'crypto_key.rotation_period': Cannot find field.
Invalid JSON payload received. Unknown name "nanos" at 'crypto_key.rotation_period': Cannot find field. [400]
Errors [
	Message[Invalid JSON payload received. Unknown name "seconds" at 'crypto_key.rotation_period': Cannot find field.
Invalid JSON payload received. Unknown name "nanos" at 'crypto_key.rotation_period': Cannot find field.] Location[ - ] Reason[badRequest] Domain[global]
]

What am I missing? How can I specify the period?

Apologies - somehow I missed seeing this before.
I'm not quite sure how you've got that code to compile - NextRotationTime should be a Timestamp, and there's no implicit conversion from DateTime. There also shouldn't be any JSON payload at all... could you clarify how you're calling this, exactly? If you can provide a short but complete program demonstrating the problem, that would be even better.

(If you're using the Google.Apis.CloudKMS.v1 package, this would make a bit more sense - I'd recommend the Google.Cloud.Kms.V1 package instead.)

This is what I'd expect the code to look like in Google.Cloud.Kms.V1:
TimeSpan rotationPeriod = TimeSpan.FromDays(90);
var key = new CryptoKey
{
    Purpose = CryptoKey.Types.CryptoKeyPurpose.EncryptDecrypt,
    VersionTemplate = new CryptoKeyVersionTemplate
    {
        ProtectionLevel = ProtectionLevel.Software
    },
    NextRotationTime = (DateTime.UtcNow + rotationPeriod).ToTimestamp(),
    RotationPeriod = Duration.FromTimeSpan(rotationPeriod)
};

Thanks, I just did a quick refactor and moved everything to the new package. Working as expected!


match arms collapse for issue #339

Few things

we had a test case that violated this anyway, changed that case assuming this is the desired behaviour
functionalised nop-block-collapsing because if,fn, struct, loop etc. might want the same treatment
this code only executes for match arms, the above constructs could use same idea, but currently dont, implementing it for all (i.e. in Block.rewrite) causes many test-cases to fail.

Outstanding:

vertical whitespace issues.  Awaiting what to do about vertical whitespace,
cant format:

a => {

    //some comment

}

to
a => {
    //some comment
}

as expected, without some policy on vertical whitespace, which will be global, not just match arms

re the outstanding thing about comments - that is desired, although can be another PR. I believe we do that already in some places, in particular for comments outside a match arm, we do this. Probably some code that can be borrowed there.

Thanks for the PR! I think the overall approach here is good (I'd originally thought we'd look at the block itself and check for no statements, but handling this as text works much better). Just a few minor comments to address.

Made changes,
Current version does not handle trailing comments intelligently:
a => {
}//trailing comment
b => {}

becomes
a => {}
//trailing comment
b => {}

Hardly desirable.
Unrealistic to solve now, because there needs to be a unified way of handling comments
pathological comment case:
/*A*/let/*B*/var/*C*/:/*D*/u8/*E*/=/*F*/5/*G*/;/*H*/ // I

rustfmt deletes most of them.
If you want nop-block-collapsing then this code will do 'for now'
Otherwise can suspend work here until we handle comments properly
wonder if @locks ran into this trouble...
Also travis failure seems unrelated to my changes

Also travis failure seems unrelated to my changes

Yeah, looks like we need a rustup

Comments have basically been a sore spot for rustfmt for a while. There is no good way to handle all comments since they are not represented in the AST at all. Since the work with the HIR landed, I think there is potential to fix this in the compiler, but I don't know of any plans to.
So, our current handling of comments is totally ad hoc. We try to handle them well wherever they are likely to occur and don't worry to much about perfection. I feel like formatting
a => {
}//trailing comment

to
a => {} //trailing comment

shouldn't be difficult, but I haven't looked at the new code yet.

You might need to rebase in order to pass tests now that we're up to date with rustc

r+ with the nit addressed and the formatting fix for the test

gimme a minute to collapse these all to 1 commit?

Awesome, thanks for the PR and making all the changes!


Added all test scripts for github, docker stats & deltas

@PreedhiVivek
I checked this pull request. I can see he didnt follow the spacing standards of Qxf2. when we run the requirements.txt files it's throwing some error. I couldnt run the test_stream_common_funtions for any of the directory(docker_deltas,docker_stats,github_stats,github_deltas). Maybe I need little help to run these files. Please let me know.
If I have any errors while running do I need to fix those issues and push again?

@PreedhiVivek @Annapooraniqxf2 There were a couple of issues wrt package dependencies that were not added to the requirments.txt file and also some unwanted files like conf files were being imported which was not used in some of the tests.. I have fixed those up and have made tests running on the same branch - qelo-41-test-scripts-github-docker
Docker delats and Docker stats tests
Errors -

ERROR: Invalid requirement: 'requests 2.24.0' (from line 1 of requirements.txt)
requests 2.24.0
ImportError: No module named mock
no module named boto3
no module named moto

Resolved it by adding those modules to the requirements.txt file
Test outputs

Github delta and Github stats tests
Errors -

=================================== ERRORS ====================================
_________________ ERROR collecting tests/test_github_stats.py _________________
tests\test_github_stats.py:12: in
import conf
conf.py:7: in
TOKEN = os.environ["ACCESS_KEY"]
..\venv-qxf2-lambda\lib\os.py:678: in getitem
raise KeyError(key) from None
E   KeyError: 'ACCESS_KEY'
___________ ERROR collecting tests/test_streams_common_functions.py ___________
tests\test_streams_common_functions.py:13: in
import conf
conf.py:7: in
TOKEN = os.environ["ACCESS_KEY"]
..\venv-qxf2-lambda\lib\os.py:678: in getitem
raise KeyError(key) from None
E   KeyError: 'ACCESS_KEY'
=========================== short test summary info ===========================
ERROR tests/test_github_stats.py - KeyError: 'ACCESS_KEY'
ERROR tests/test_streams_common_functions.py - KeyError: 'ACCESS_KEY'
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!
============================== 2 errors in 3.97s ==============================

Resolved the first error by removing 'import conf' from test files and also removed  the variable 'TOKEN' from the conf.py file since it was only used in stream_common_functions.py test, so just making a change in stream_common_functions.py as
github_obj = Github(os.environ["ACCESS_KEY"]) resolved issue

no module named github - Resolved by adding PyGithub to requirements.txt file

Total list of files changed -

Pending
When we run tests from the root directory there are 6 errors -

Yes @Annapooraniqxf2  and @rohanj-qxf2 This PR is a combined one of the other two PR's Hence those two PR's can e removed.
The code should be placed under qxf2-lambdas/qelo/<> where <> would be either store_github_stats or store_github_deltas etc accordingly

@Annapooraniqxf2 I have improved the pylint ratings for the tests now, can you check and review now

@Annapooraniqxf2 I have improved the pylint ratings for the tests now, can you check and review now

@rohanj-qxf2
I checked it and I can see the huge difference. Shall we merge this into master now ?

@Annapooraniqxf2 THIS PR is open, can you merge it if it looks good?

Yes sure will merge.

@PreedhiVivek
Shall I merge this fix into master or do you need to check anything else?

@Annapooraniqxf2  and @rohanj-qxf2 ,
There are currently four separate lambdas (one per functionality) running in PROD everyday.
Hence, we will need to keep the code base as well into four separate folders under qxf2-lambdas/qelo/ namely,
store_github_stats
store_github_deltas
store_docker_stats
store_docker_deltas
containing the relevant scripts, and test scripts under a new tests folder under qxf2-lambdas/qelo/
As there isn't any GitHub action defined at the moment for these four lambdas, this PR merge wouln't be auto-deployed  to the respective PROD lambdas, which is safe.

@Annapooraniqxf2 and @rohanj-qxf2 ,
There are currently four separate lambdas (one per functionality) running in PROD everyday.
Hence, we will need to keep the code base as well into four separate folders under qxf2-lambdas/qelo/ namely,
store_github_stats
store_github_deltas
store_docker_stats
store_docker_deltas
containing the relevant scripts, and test scripts under a new /store_<respective_lambda>/ folder under qxf2-lambdas/qelo/tests folder.
As there isn't any GitHub action defined at the moment for these four lambdas, this PR merge wouln't be auto-deployed to the respective PROD lambdas, which is safe.

So @PreedhiVivek Shall We merge into master? or do I need to do the changes like change the name with store_ and merge it.

@Annapooraniqxf2 Please ensure all scripts of this PR are placed under  qxf2-lambdas/qelo/ folder and go ahead with the merge.
Renaming of folders can be ignored.

Closing this PR since it is obsolete.


Feature request: Node power control

Currently there is a power control for VMs and LXC but that functionality is missing for nodes themself.
As some of my servers in the cluster are not running all the times (energy prices in Europe) it would be great to have the controls for start/shutdown/reboot for nodes too.
In a cluster the nodes can be started with proxmox internal wake on lan via the API.

Internal WOL: https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/wakeonlan
Getting the MAC for WOL: https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/config
Reboot/Shutdown: https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/status - Switch to POST

At the moment I don't have the time to invest in these improvements, but I'm happy to merge them if you want to contribute.

@Munsio I've added partial implementation in #38 but I didn't include the wakeup/start. Wake on lan can be don with HAS https://www.home-assistant.io/integrations/wake_on_lan/

Released version 1.7.1 with changes.


Inhaling Tritium/Plasma insta-crits you.

Screenshots
https://github.com/space-wizards/space-station-14/assets/106132477/66f0b442-14c9-4919-9b11-74daf0aa243a

Duplicate of #13671?

Yeah, it's needed looking at for a long time.


Update snabbdom fork and depend on our released npm version

Do you happen to know what the maintenance mode for mainline snabbdom is?
Do they make major changes to the codebase and functionality regularly, or do they just make fixes and add minor features here and there? The repo seems rather active.
If so maybe we could accumulate our required changes into a series of git .patch files and apply them automatically to mainline snabbdom.

Working with a patch file and automatically using mainline snabbdom would be awesome! I remember that we have removed some parts of the API to make it smaller and also removed some unnessecarry code paths. Apart from that we made some changes in the diffing, notably making patching more efficient when VNode are reused so we can remove the need for diffing whole subtrees that we know will anyway be the same.
I really need to look into the changes of snabbdom in more detail, but afaik it is mostly small changes or updates.


flutter/test/engine/canvas_test.dart is flakey on travis

Looks like @Hixie  just enabled this test with https://github.com/flutter/flutter/commit/edac70a5dd50e09c4ccf1332c7c8cf12b5a902ba
https://travis-ci.org/flutter/flutter/builds/109004109
+flutter test
00:13 +20 -1: /home/travis/build/flutter/flutter/packages/flutter/test/engine/canvas_test.dart: matrix access should work
  Expected: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
    Actual: [
    5.996862383271912e-39,
    0.0,
    0.0,
    5.996862383271912e-39,
    0.0,
    5.996862383271912e-39,
    0.0,
    0.0,
    0.0,
    0.0,
    1.0,
    0.0,
    5.996862383271912e-39,
    0.0,
    0.0,
    5.996862383271912e-39
  ]
     Which: was <5.996862383271912e-39> instead of <1.0> at location [0]

We believe this is obsolete.


[Support Request]: Downscale PDF Output

Attempted Debugging

[X] I have read the debugging page

Searched GitHub Issues

[X] I have searched GitHub for the issue.

Describe the Scenario
I am curious if there is a way to "downscale" the PDF output to kind of shrink the overall output sizing. I use Obsidian and have been moving things over to Bookstack but haven't found a way to do this in Bookstack similar to Obsidian. The PDF output title and fonts are a little large and would like to figure out a way to shrink them just a bit; nothing crazy. Have been trying to search Reddit, Google and Github but haven't really turned anything up. Appreciate any insight!
Exact BookStack Version
v21.12.5
Log Content
NA
PHP Version
No response
Hosting Environment
Ubuntu 20.04

Hi @esmoyer,
No direct way to be able to do this. You could technically alter things via styles in the "Custom HTML Head Content"  setting but I don't think we provide a way to just target PDF exports right now.
You could use the visual theme system to override the template file that contains PDF-specific CSS conditions:
https://github.com/BookStackApp/BookStack/blob/2d074caf72e7d1ccd9728ad944593ac09f18b7f8/resources/views/common/export-styles.blade.php.  That's probably the best way right now without editing core app files.

@ssddanbrown appreciate the quick response! I'm just getting started out with it so will have to play around. So from what I'm understanding the size that's in the document is what gets output to the PDF? I wasn't sure if the output was driven by something else. Thanks for the suggestions!

@esmoyer Yeah, It's all HTML/CSS driven as per the standard web view, then this gets converted to PDF.
Lines 8 to 59 in the linked export-styles.blade.php file are styles specific to PDF export. You could override and tweak your version of that file (Using the vial theme system) to add styles just for the PDF export if desired.


Domains and pools are global, rather than per-design? (Recreating same design causes error.)

It appears that domains and pools are being stored globally in some way, rather than being connected to a particular design.
This means that, when creating a new design that has domains with the same names as an old design, some properties of the domains in the old design will be carried over to the new.  In particular, pools will be, which means that setting a pool will fail.  As a minimal example:
import nuad.constraints as nc

s = nc.Strand(["a", "b*"], name="test")
des = nc.Design([s])
poolA = nc.DomainPool("test", 10)
des.domains_by_name["a"].pool = poolA  # Works

s = nc.Strand(["a", "b*"], name="test")
des = nc.Design([s])
poolB = nc.DomainPool("test", 10)
des.domains_by_name["a"].pool = poolB  # Causes ValueError because pool is already poolA.

Yes, this is by design, although maybe there's a better way to do it.
When you use the Strand constructor with the domain_names parameter (which is the first positional parameter, so it's being used in your example), it looks up a global variable _domains_interned:
https://github.com/UC-Davis-molecular-computing/nuad/blob/01e28ffa0efa5bd226b697176413077cde94f400/nuad/constraints.py#L1758
https://github.com/UC-Davis-molecular-computing/nuad/blob/01e28ffa0efa5bd226b697176413077cde94f400/nuad/constraints.py#L2082-L2087
that stores Domain objects to see if any of them has that domain name and reuses the same Domain object if so.
Ideally you are correct that this would be stored in the Design object rather than globally, but it would have to be redesigned to avoid using the Strand constructor, which may be called before there is even a Design object.
Perhaps one fix is to replace the Strand constructor with a method Design.add_strand(), which takes the same arguments as the current Strand constructor?


Tell users what migrations were actually performed instead of what was considered

Command
update
Description
Currently ng update does  a good job of telling you which migrations the CLI is attempting to apply, but you don't know which migrations actually were  applied.
Describe the solution you'd like
I'd love it if the migrations reports / logs actually logged what changes were made.  Example console output before:
UPDATE angular.json (3617 bytes)
  Migration completed.

▸ Remove 'showCircularDependencies' option from browser and server builders.
  Migration completed.

▸ Replace 'defaultCollection' option in workspace configuration with 'schematicCollections'.
  Migration completed.

▸ Update Angular packages 'dependencies' and 'devDependencies' version prefix to '^' instead of '~'.

Example after:
UPDATE angular.json (3617 bytes)
  Migration completed - no changes made.

▸ Remove 'showCircularDependencies' option from browser and server builders.
  Migration completed - no changes made.

▸ Replace 'defaultCollection' option in workspace configuration with 'schematicCollections'.
  Migration completed - 3 updates made.

▸ Update Angular packages 'dependencies' and 'devDependencies' version prefix to '^' instead of '~'.
Migration completed - 15 updates made.

Describe alternatives you've considered
No response

❤


If a relu layer can be shared by more than one convolution layers in mxnet

If a relu layer can be shared by more than one convolution layers in mxnet.

relu layer doesn't have and parameter, so sharing it doesn't make sense. Please create a new one each time

@sandeep-krishnamurthy  Please close this issue, as this is already answered.


scatter function

If I wanted to contribute to this project by adding the 'scatter' function, can you provide some advice for getting started?

you can take a look in previous pull requests e.g.
https://github.com/lava/matplotlib-cpp/pull/14/files
https://github.com/lava/matplotlib-cpp/pull/22/files
code might have changed slightly since the pull requests have been made so make sure that after identifying the right parts you look into the latest code

I just added the scatter function. #74

I am trying to pass arguments like "s=10", can you please tell me how to pass it ?


[SATURN-1889] A11y: Landing Page, Top Menu and Sign-In Button

This PR addresses accessibility challenges with the unauthenticated landing page that users first encounter.
Moved GDPR Cookie Banner to the top
The way the banner overlapped the content at the bottom of the page is consistent with how many sites do it. However, it results in a sub-optimal user experience for mouse users, keyboard users, and screen reader users, each for different reasons. Since users must agree to accept cookies before they can use the site, I will argue that it really should be presented first.
Fixed Google Sign-In button
Incomprehensibly, the Sign In with Google button, rendered by Google's SDK, is not accessible at all. It is a collection of <div> elements without any semantics indicating it's a button, which is not focusable and doesn't respond to the enter or spacebar keys. Fortunately, I found a way to wrap it into a semantic button element and pass down the keypress event to trigger the click.
Added list roles to the main menu
Menu bars are often presented to screenreader users as bulleted lists. This PR adds some roles to make this work.
Cleaned up Terra logo alt text for concision
The alt text for the Terra or brand logo at the top and bottom of the page included the word "logo". However, this is extraneous and unhelpful to a screen reader user. It is sufficient to just display the title itself.
Added h1 and h2 to the landing page
The Terra UI has very few hierarchical headers, and any that it has are inconsistent. The landing page previously had on <h2> tag but no <h1>. This PR adds a primary header and some additional secondary headers in appropriate places t to the landing and sign-In pages (which use the same Hero component) without changing the styling or anything else. A header hierarchy should be added to other pages as well, but that will be handled in subsequent PRs.
Defined fallback background colors for landing page regions
The aXe automated tool could not determine the background colors for the regions on the homepage because background images are used. This is a false-positive: in fact the color contrast is fine.
To attempt to resolve this I added equivalent background colors to the two sections that were identified: the main section (hexagon background), and the Covid callout (virus illustration).  Unfortunately it did not resolve the aXe false positive. However, if you go into the Dev Console and disable the background-image rule in the 2 sections, then rerun aXe, it now will see the colors and stop complaining.

The decision to move the GDPR cookie banner to the top of the page should probably get a review from the UX team. I'm happy to explain my reasoning for moving it to the top, but would also be happy to brainstorm other alternatives, if that would be preferred. The main thing is that whatever placement/markup is chosen needs to work for visual, keyboard-only and screen-reader users, which the previous placement did not.

The tests cannot run in @andrewmarcus's fork.  In order to get the tests to run before merging to dev, I am creating a new branch in in this repo that we can merge @andrewmarcus's code into and then we can merge from that branch into dev.


Use base module version code and name

Gradle uses app version information that the base module provides, helps
manage version across app for dynamic features. They will use versions from app module in this case

Interesting! I always thought each module manages its own version.
@Davidodari Any resources on the same?

Interesting! I always thought each module manages its own version.
@Davidodari Any resources on the same?

From the docs under The base module build configuration:App Versioning
https://developer.android.com/studio/projects/dynamic-delivery/configure-base
The version code from the base module is what will be used for all generated apks from the bundle so you can just omit these properties from your dynamic module's build.gradle file.

Thanks


Adding support for slave controllers.

A slave controller can connect to attester through socket.io, then it can request slave ids that can be included in the url of the slaves so that the slave controller can be notified when its slaves are connected, disconnected and idle.
This pull request is a first step to be able to implement attester-launcher.

@divdavem Sounds fine to me. You can merge

@benouat Thank you for your review


MLDB-1247 logging process revamp

Tornado based 'logger':

Reads lines from stdin
keeps a buffer of 1024 lines in memory
writes every lines to stdout (flush after every write)
The content of the buffer can be queried over HTTP at <IP_ADDRESS>:HTTP_LISTEN_PORT/logs/mldb
the last 'n' logs lines can be fetched by passing ?n=number_of_lines (ex: <IP_ADDRESS>:HTTP_LISTEN_PORT/logs/mldb?n=32)
Root privileges are dropped on start

There some more work to be done in there, namely regarding the logging of the http server which goes to stderr and adding a route to listen for log lines in realtime.
Should be fast enough for our use.


Error in the install process.

Hi,  was walking thru the tutorial and came across this:
$ python3 -m pip install -r requirements.txt
Collecting yarl==1.4.2
  Using cached yarl-1.4.2.tar.gz (163 kB)
Collecting multidict==4.7.3
  Using cached multidict-4.7.3.tar.gz (50 kB)
Collecting graphviz>=0.14
  Using cached graphviz-0.16-py2.py3-none-any.whl (19 kB)
Collecting icecream>=1.2
  Using cached icecream-2.1.0-py2.py3-none-any.whl (8.0 kB)
Collecting jupyterlab>=3.0
  Using cached jupyterlab-3.0.12-py3-none-any.whl (8.3 MB)
Collecting matplotlib>=3.3
  Using cached matplotlib-3.3.4-cp36-cp36m-macosx_10_9_x86_64.whl (8.5 MB)
**ERROR: Could not find a version that satisfies the requirement numpy>=1.20
ERROR: No matching distribution found for numpy>=1.20**

Due to security vulnerabilities, numpy has a later release which is urged.


[SECURITY] Clarify maintainer change in README / on GitHub / on foundryvtt.com

You should probably clearly state that Beneos took over development/maintainership of this module, otherwise this might look like a hostile take-over or a security issue.
You might want to state it in the README.md, with a link to the new URL, and additionally maybe set the GitHub repo to archived, and switch off the issue tracker and PRs. You might also say that on the module description on foundryvtt.com, and change the Project URL to the new location as well.

Done


Enhancement - Performance Optimisation - Delete Graph List

Feature Request
Root Cause

React took huge amount of time to perform discreteUpdates during data changes.
deleteGraphList requires to perform looping on every single graphList to form graphFlatten.

Proposed Solution

To prevent the delete graph requires to perform looping and merging on every graph list. With the metadata.ids and metadata.groupEdge.fields setup in #179 and dictionary data types setup in #184  , we will use the nodeIds, edgeIds and groupEdgeIds to perform removal from the graphFlatten.

This operation reduce the time complexity from O(n + e + nf + ef)^2 to O(1) + O(nf + ef)^2.

function deleteGraphList (index)

    // obtain stores data
    Set graphList to state.graphList;
    Set graphFlatten to state.graphFlatten;

    // obtain specific graph and remove graphData from graph list
    Set graphData to graphList[index];
    Call graphList.splice(index, 1);

    Set nodeIdsForRemoval to graphData.metadata.ids.node
    Set edgeIdsForRemoval to graphData.metadata.ids.edge and graphData.metadata.groupEdge.fields.key

    // Remove all nodes and edges of specific graph
    Call graphFlatten.graphNodeEntity.removeAll(nodeIdsForRemoval)
    Call graphFlatten.graphEdgeEntity.removeAll(edgeIdsForRemoval)

    // update all
    Set state.graphFlatten = graphFlatten
    Set state.nodeSelection
    Set state.edgeSelection

end function

As the #184 is not implemented, we do not have nodeIds and edgeIds to perform insertion, update and deletion on the graphFlatten.
In this issue, we will perform the same strategy outlined in comments.


Add download link

Please add the download link to Google play to the readme. And maybe add apk file to the releases to this GitHub repository.

we will add it in the next readme