Camera Stream freezes on the Android Webview

Environment

Technology
Version

Flutter version
3.0.2

Plugin version
5.7.2+3

Android version
EMUI 12  (Android 11?)

Device information:
huawei p30 lite
Description
On some Android devices the video for the camera-stream doesn't work properly. I noticed this behavioru when using the barcode libraries ZXING and html5-qrcode reader (https://github.com/mebjas/html5-qrcode). This behaviour was noticed on the Huawei P30 lite and the Samsung Galaxy S10. All other Android and iOS devices that I was able to test this on seem to work fine. The scanner works fine in all of the other browsers including chrome on said devices.
Expected behavior:
The expected behaviour is to accept the camera permission and display the camera stream smoothly.
Current behavior:
The current behaviour is that you accept the camera permission. Then the video will start playing and freez right away. The camera freez stops as long as you touch on the screen and will continue freezing once you take your finger of the screen. The actual scan of the barcodes still work fine, only the camera output is not updated at all.
Steps to reproduce
I had been testing this with the html5-qrcode library.
To reproduce this behaviour, you will need one of the devices mentioned above.

Create a new Flutter App using this Plugin
Open "InAppWebView" with the following URL https://scanapp.org/
Enable the camera permission
Open the scanner

https://user-images.githubusercontent.com/58855614/218070184-3e2f5122-d017-4254-bceb-2a1ea3889e90.mp4
Stacktrace/Logcat
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.2, on Microsoft Windows [Version 10.0.19044.2486], locale de-DE)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
X cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.2)
[√] Connected device (4 available)
[√] HTTP Host Availability
I get the following terminal output when opening the camera:
I/CameraManager(21695): open camera: 1, package name: XYZ
E/cr_VideoCapture(21695): CameraDevice.StateCallback onOpened
D/SensorManager(21695): 0x774b5bb0e0 addFd fd=356
I/DecorView: pkgName:XYZ old windowMode:1 new windoMode:1, isFixedSize:false
W/MessageQueue(21695): Handler (android.os.Handler) {b983089} sending message to a Handler on a dead thread
W/MessageQueue(21695): java.lang.IllegalStateException: Handler (android.os.Handler) {b983089} sending message to a Handler on a dead thread
W/MessageQueue(21695): 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:618)
W/MessageQueue(21695): 	at android.os.Handler.enqueueMessage(Handler.java:771)
W/MessageQueue(21695): 	at android.os.Handler.sendMessageAtTime(Handler.java:717)
W/MessageQueue(21695): 	at android.os.Handler.sendMessageDelayed(Handler.java:687)
W/MessageQueue(21695): 	at android.os.Handler.post(Handler.java:416)
W/MessageQueue(21695): 	at android.hardware.camera2.impl.CameraDeviceImpl$CameraHandlerExecutor.execute(CameraDeviceImpl.java:2458)
W/MessageQueue(21695): 	at android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.onClosed(CallbackProxies.java:104)
W/MessageQueue(21695): 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:535)
W/MessageQueue(21695): 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.finalize(CameraCaptureSessionImpl.java:826)
W/MessageQueue(21695): 	at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
W/MessageQueue(21695): 	at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
W/MessageQueue(21695): 	at java.lang.Daemons$Daemon.run(Daemons.java:137)
W/MessageQueue(21695): 	at java.lang.Thread.run(Thread.java:929)
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 46 lines
W/cr_HandleImpl(21695): Handle was not closed.
I/HwViewRootImpl(21695): removeInvalidNode all the node in jank list is out of time
W/XYZ(21695): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 1 line
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 3 lines
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 1 line
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 3 lines
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 92 lines
W/cr_HandleImpl(21695): Handle was not closed.
W/System  (21695): A resource failed to call release.
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 9 lines
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 11 lines
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
I/chatty  (21695): uid=11687(XYZ) FinalizerDaemon identical 1 line
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.
W/cr_HandleImpl(21695): Handle was not closed.

Also, I have been playing around wihh the webview options. Nothing seemed to work here either. I am currently running these configurations:
InAppWebViewGroupOptions options = InAppWebViewGroupOptions(

      crossPlatform: InAppWebViewOptions(
          userAgent                         : '',
          useShouldOverrideUrlLoading       : true,
          useOnLoadResource                 : true,
          useOnDownloadStart                : false,
          mediaPlaybackRequiresUserGesture  : false,
          useShouldInterceptAjaxRequest     : false,
          useShouldInterceptFetchRequest    : false,
          supportZoom                       : false,
          allowUniversalAccessFromFileURLs  : true,
          preferredContentMode              : UserPreferredContentMode.MOBILE,
          clearCache                        : false,
          cacheEnabled                      : false,
          disableHorizontalScroll           : true
      ),

      android: AndroidInAppWebViewOptions(
          useHybridComposition        : true,
          builtInZoomControls         : true,
          useShouldInterceptRequest   : true,
          useOnRenderProcessGone      : false,
          cacheMode                   : AndroidCacheMode.LOAD_DEFAULT,
          hardwareAcceleration        : true
          // networkAvailable
      ),

      ios: IOSInAppWebViewOptions(
          allowsInlineMediaPlayback           : true,
          allowsLinkPreview                   : false,
          allowsBackForwardNavigationGestures : false,
      )

  );

I have found a temporary fix - you need to an animated svg to keep the Android Webview refreshed. Just put it into the background with a width and height of 1px.
https://bugs.chromium.org/p/chromium/issues/detail?id=1401352&q=webview camera&can=2

@alexcgrd  hi can you please share some more info, i have the same problem.
Thanks !

i found another workaround if you install the "qr_code_scanner" package it works normally.
Hope this helps

@mohammedX6 The issue is shown in the video that I posted in the video. Other please have a look at this issue, I think it is related to this problem: https://bugs.chromium.org/p/chromium/issues/detail?id=1401352
@helenooliveiraa That seems to do the job for now, thanks. Hopefully this problem will be fixed soon.


setFullSpan in onBindViewHolder

Sorry for the random issue, but would it be possible to add support for making an item span the width of the screen from inside the adapter? I see you've added a method for header items to do this, but I would like to be able to do this with regular items as well.

I've managed to find a way around my problem using .setSpanSizeLookup on a gridlayoutmanager after passing it to the adapter, but this is still limited by the data method used. Since the position given by the span size lookup is affected by header items, for some usages of the adapter it would be impossible to get the item's type.

Yes I am also looking to achieve the exact same thing.
@afollestad great lib btw!

I've added a method you can override (getRowSpan(int, int, int, int)). But it's not really a good idea to put a method like setFullSpan(boolean) in there. Changing span sizes would require refreshing the entire list, which would be inefficient and causes some issues (I tried it).
I've also fixed some issues for the newer versions of AppCompat.

https://github.com/afollestad/sectioned-recyclerview/releases/tag/0.2.1


Adding basic support for touch force (3D force an iPad pro stylus)

Updated the submodule to use the latest cocos3d 3.4.9
Enabled iPhone support
Added a GestureRecognizer sub-class to capture the force of each touch (where available) to control the line width.

thanks ;]


How to adding an axes in ndarray?

I want to add an axes in a ndarray. for example (3,4,5,5) to (1,3,4,5,5). I don't know the ndarray shape in advance I refer to the reshape api, but can't understand the -4 means.

mx.nd.expand_dims
http://mxnet.incubator.apache.org/api/python/ndarray/ndarray.html#mxnet.ndarray.expand_dims

Thanks @solin319


handlePayment return error

What happened?
Hey guys, when I call handlePayment(order.id) with GOOGLE PAY (stripe) I always receive this type of error. Someone know how fix it? I tried find some info in docs but nothing.

Steps To Reproduce
No response
Is there an existing issue for this?

[X] I have searched the existing issues

Version
Latest stable (generated by CLI)
Which element is affected?
No response
Environment
- OS:
- Node:
- Shopware API:
- Shopware PWA version:

Relevant log output
No response

hi @amin212121. The error comes from API and that is the place I would start debugging. Maybe you can find some clues on why is that in the official documentation of the plugin.
Perhaps there is some missing data passed to the handle payment method.
We can have a look if you provide more details:

Shopware PWA version
Shopware 6 exact version
plugin source and some details

hi @amin212121. The error comes from API and that is the place I would start debugging. Maybe you can find some clues on why is that in the official documentation of the plugin.
Perhaps there is some missing data passed to the handle payment method.
We can have a look if you provide more details:

Shopware PWA version
Shopware 6 exact version
plugin source and some details

@mkucmus

I use my custom front-end solution but with "@shopware-pwa/shopware-6-client" version is ^1.3.0
v<IP_ADDRESS> Stable Version
Stripe Payment Version: 1.8.0

I have read docs of the plugin "Stripe Payment" but there ain't mention any word about "How work with headless solution", here is ref for official docs https://docs.google.com/document/d/1qGa_hcoPBq_XkSmfq4GMLJMkFaQz7-w3jdn5DJilJVo/edit

@mkucmus any update here?

@amin212121 I will check it willingly, but first I have to precise what exactly plugin it is, because I can see the Strip Payment plugin https://store.shopware.com/en/cwb01476m/stripe-payment-plugin.html only for v5.x of Shopware platform.
Could you send me a direct link to the plugin?

Ok, I'm back with some details from my investigation. What I found is:

being on Shopware PWA - you need to implement a frontend component to save/keep credit card data - as a presentation layer only
the frontend component, when you are creating a payment intent (see docs in stripe) receives the unique token that should be used in further step
handlePayment method which is being called after the order is created accepts the additional data, like taken from step above to inform the payment plugin, that the payment process has started (credit card has been checked or money was reserverd) and amount can be captured on the backend -> if does work - show success page.

By default, the Stripe plugin you've provided, does not have any frontend part for PWA which can handle the described flow. so additional parameters are missing.
you can track the required data that can be used in the PWA as well in the standard Storefront to see how it works:

in the picture we can see the endpoint being called after placing an order /finalize-transaction (equivalent of handle-payment used in Shopware PWA). In the payload there are two extra parameters: payment token and intent client token -> I can only guess, but It looks like those things are missing in your project in handle payment request.

I'm closing the issue because the payment plugin is not ready to handle the API calls to manage payment processes.
Additional work on plugin's side is required.


Inconsistency with is_match and Python's search in Matching Specific Regex Patterns

What version of regex are you using?
I am using Rust 1.78.0 with the regex crate version 1.10.4.
Describe the bug at a high level.
There is a discrepancy in regex pattern matching between Python's re module and Rust's regex crate. The same regex pattern, when tested in Python, matches all intended strings. However, in Rust, the pattern fails to match these strings.
What are the steps to reproduce the behavior?
Here is a complete Rust program that reproduces the behavior:
use regex::Regex;

fn main() {
    let pattern = "(?:private|group)[_[\\w\\d]*]?_abc1d2345678ef90ab3c4567890defab[_[\\w\\d]*]?";
    let compiled = Regex::new(pattern).unwrap();

    let test_haystacks = vec![
        "private_x9z45678abc12345d6e7890f123ghijk_abc1d2345678ef90ab3c4567890defab",
        "private_x9z45678abc12345d6e7890f123ghijk_abc1d2345678ef90ab3c4567890defab___[[[aaa111]",
        "private[_0f4f790_abc1d2345678ef90ab3c4567890defab",
    ];

    for test_haystack in &test_haystacks {
        match compiled.is_match(test_haystack) {
            true => println!("PASS: {}", test_haystack),
            false => eprintln!("FAIL: {}", test_haystack),
        }
    }
}

What is the actual behavior?
The actual output of the Rust program indicates failures where the regex pattern does not match the test strings. For example:
FAIL: private_x9z45678abc12345d6e7890f123ghijk_abc1d2345678ef90ab3c4567890defab
FAIL: private_x9z45678abc12345d6e7890f123ghijk_abc1d2345678ef90ab3c4567890defab___[[[aaa111]
FAIL: private[_0f4f790_abc1d2345678ef90ab3c4567890defab

What is the expected behavior?
I expect the Rust program's output to match the behavior observed in Python, where all provided test strings successfully match the regex pattern.
Additional Context
Below is the corresponding Python code that behaves as expected with the same regex pattern:
import re
compiled = re.compile('(?:private|group)[_[\\w\\d]*]?_abc1d2345678ef90ab3c4567890defab[_[\\w\\d]*]?')
assert compiled.search('private_x9z45678abc12345d6e7890f123ghijk_abc1d2345678ef90ab3c4567890defab')
assert compiled.search('private_x9z45678abc12345d6e7890f123ghijk_abc1d2345678ef90ab3c4567890defab___[[[aaa111]')
assert compiled.search('private[_0f4f790_abc1d2345678ef90ab3c4567890defab')

This can also be seen working as expected on https://regexr.com/

Good find! Even linking to the RegEx standard showing that it works using the documented reference 👍

Hope we can get this fixed soon 🔜🤞

Your regex is kinda messed up. Specifically, this part (which is repeated):
[_[\w\d]*]?

Python regexes don't support nested character classes unlike the regex crate. And because Python's regex engine follows the tradition of context dependent escaping rules, meta characters like ] are treated literally when used in a context in which they cannot possibly have any special significance. But, as can be seen in this case, it makes the regex quite deceptive. Here's a better way to write the same part of the pattern:
[_\[\w\d]*\]?

And indeed, using that with the regex crate produces the desired result:
use regex::Regex;

fn main() {
    let pattern = r"(?:private|group)[_\[\w\d]*\]?_abc1d2345678ef90ab3c4567890defab[_\[\w\d]*\]?";
    let compiled = Regex::new(pattern).unwrap();

    let test_haystacks = vec![
        "private_x9z45678abc12345d6e7890f123ghijk_abc1d2345678ef90ab3c4567890defab",
        "private_x9z45678abc12345d6e7890f123ghijk_abc1d2345678ef90ab3c4567890defab___[[[aaa111]",
        "private[_0f4f790_abc1d2345678ef90ab3c4567890defab",
    ];

    for test_haystack in &test_haystacks {
        match compiled.is_match(test_haystack) {
            true => println!("PASS: {}", test_haystack),
            false => eprintln!("FAIL: {}", test_haystack),
        }
    }
}

(I also switched to using raw strings via r"..." so that you don't need to do double escaping.)

Good find! Even linking to the RegEx standard showing that it works using the documented reference 👍

This isn't a bug and there is no requirement that this crate matches Python's regex engine in all cases. There's also no regex standard at play here (governing either Python's or Rust's regex engine).

Hi @BurntSushi 👋
I don't consider this issue invalid.
I'm not in a position to change the un-compiled regular expressions as they are provided by end users, and if they're compilable, which they are, they are expected to be searchable.
Do you have any particular guidance toward a solution for compatibility?

I don't know what you mean by your assertion that they are "compatible."
There is literally an unbounded number of ways in which Python regexes are different than Rust regexes. And this generally applies to all pairs of regex engines unless they very strictly follow a standard. (Of which, generally speaking, only two are prevalent: POSIX and ECMA. Neither Python's regex engine nor Rust's regex engine follow either one.)

I don't consider this issue invalid.

I want to be clear here that this issue is definitively invalid within the scope of this project. That doesn't mean you don't have a problem. You might have a problem on your end where you have a pile of regexes that worked with one regex engine and need to use them, unchanged, with some other regex engine. But that isn't really a problem I can help with and is in general not a problem that can be easily solved for any two regex engines. (Unless your patterns happen to incidentally behave the same, or as I mentioned above, the regex engines strictly adhere to an existing standard.)

Do you have any particular guidance toward a solution for compatibility?

Well... of course not. Because I don't really know the structure of the problem you're trying to solve. All that's been presented to me here is a regex that works one way in Python and a seeming request to have it work the same way in Rust. But that will definitively not happen. As far as solving your problem in a different way, I don't know because I don't know what problem you're trying to solve. If, for example, these regexes are provided by end users and you've promised that the regex syntax is equivalent to whatever Python supports, then you need to use a regex engine with the goal of compatibility with Python's regex engine. (Of which, I believe only one exists. The re module in Python's standard library. The third party regex Python package on PyPI might also have enough compatibility to work for you.)


What does this log mean?

I scheduled a job at 20:23 (GMT 5:30 included).
int jobId = DailyJob.schedule(new JobRequest.Builder(XXXXX_DAILY_JOB_TAG), 0, TimeUnit.HOURS.toMillis(20));
I am trying to schedule a daily job from midnight 00:01 am to 20:00 (8:00 pm).
I notice the following log:
06-27 20:23:25.693 8855-8855/com.xxxxx D/JobProxy26: Schedule one-off jobInfo success, request{id=17, tag=xxxxx_daily_job, transient=false}, start 03:36:35, end 23:36:35 (from now), reschedule count 0
What specifically is this log trying to tell me? (start 03:36:35, end 23:36:35 (from now))?
Am I scheduling the daily job correctly?
Thank-you

I have figured it.


Support building for macOS on Apple Silicon

Add Makefile support for building for macOS on the Apple Sillicon (ARMv8) architecture

Sorry about the delay @SocMinarch! Thanks for the contribution.


Update to a pre-release upstream using the Plugin Framework

Upstream version: f3a69cbc0904
On top of https://github.com/pulumi/pulumi-random/pull/263
This is the second attempt to update Random to the latest-greatest pre-release version utilizing the Plugin Framework. The previous attempt had to be rolled back because of https://github.com/pulumi/pulumi-random/issues/258, but this is now fixed in pf/tfbridge and covered by test in #263.

Trust but verify 🙂

The "keepers" breaking change is unfortunate.

This is the same breaking change we've accepted before. This is an upstream breaking change. I think that programs that use strings there should still be fine.


[RFE] remove internal commands from command palette

All of the commands used to clear, focus and display items in the view are showing up in the command palette.  This is not good since these commands are context sensitive and cannot be initiated by the command palette.

added "when" clauses to the package.json to filter these commands from the command palette


Possible to add pac7302 drivers?

If I have this right, the driver is supported upstream (https://github.com/instantinfrastructure/linux-yocto-3.10/blob/master/Documentation/video4linux/gspca.txt#L267-L283). I'm trying to just play around with an old Genius webcam that is only supported by the pac7302 driver.
Alternatively, is there a guide on how to build the modules and test them out before submitting issues/pull requests?
Thanks for all these modules!

If that's available in that kernel version, it should be fairly easy to add, I'll check this out.
Generally, the Edison's BSP build guide is the instruction, it describes the steps necessary to setup the build env, which is the biggest thing. And then it has a section about adding/modifying recipes. I've also described the process in my blog at alextgalileo.altervista.org, for Galileo, but it's ver similar for Edison.

I've added pac7302 module to the repo, enjoy :smiley:

Thanks for the efforts!
On Mon, Apr 11, 2016 at 10:28 PM Alex T<EMAIL_ADDRESS>wrote:

Closed #3 https://github.com/alext-mkrs/meta-alext-edison/issues/3.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/alext-mkrs/meta-alext-edison/issues/3#event-623091381


WIP! break change plugin response in v3

Related: https://github.com/capacitor-community/admob/issues/42
fix:

[ ] Between iOS and Android response is difference.
[ ] Some response has type any
[ ] There is a meaningless response. : { value: boolean }
[ ] Align response types ( need window event? )

onAdSize is remove, because this is not native API name. (Added in the middle of v1 to prevent catastrophic changes)

Follow https://github.com/capacitor-community/admob/blob/feat/v3_scheme/README_AUTO.md

Thinking not common method:
iOS Only

adViewDidReceiveAd
adView:didFailToReceiveAdWithError
adViewWillPresentScreen
adViewWillDismissScreen
adViewDidDismissScreen

Android Only

onAdLeftApplication
onRewardedVideoCompleted

AdMob v8's break changes is too big...Many api is removed and replaced.
This big change should be made with a big change in Capacitor, so I'll get these changes now.

We should update Android's sdk to 20.0.0.

https://developers.google.com/admob/android/migration


add funcotator annotations

Funcotator has slightly different annotations to snpsift, includes GO terms
https://gatk.broadinstitute.org/hc/en-us/articles/360037224432-Funcotator

this issue is resolved in PR: https://github.com/ohsu-cedar-comp-hub/WGS-nextflow-workflow/pull/85


Data Structure Writeup

APIs and JSON

In VSCode, show Python API code definition for request and response using GET, POST, UPDATE methods. Discuss algorithmic condition used to direct request to appropriate Python method based on request method.
In VSCode, show algorithmic conditions used to validate data on a POST condition.
In Postman, show URL request and Body requirements for GET, POST, and UPDATE methods.
In Postman, show the JSON response data for 200 success conditions on GET, POST, and UPDATE methods.
In Postman, show the JSON response for error for 400 when missing body on a POST request.
In Postman, show the JSON response for error for 404 when providing an unknown user ID to a UPDATE request.
Blog JavaScript API fetch code and formatting code to display JSON.

        <form action="javascript:createPost()" id="postButton">

Post Your Message

            <textarea id="message" placeholder="Type your post..."></textarea>
            <button id="postButton">Post</button>
        </form>

Posts

            <input type="text" id="searchInput" oninput="searchPosts()" placeholder="Search posts...">

In Chrome inspect, show response of JSON objects from fetch of GET, POST, and UPDATE methods.
In the Chrome browser, show a demo (GET) of obtaining an Array of JSON objects that are formatted into the browsers screen.
In JavaScript code, describe fetch and method that obtained the Array of JSON objects.
In JavaScript code, show code that performs iteration and formatting of data into HTML.
In the Chrome browser, show a demo (POST or UPDATE) gathering and sending input and receiving a response that show update. Repeat this demo showing both success and failure.
In JavaScript code, show and describe code that handles success. Describe how code shows success to the user in the Chrome Browser screen.
In JavaScript code, show and describe code that handles failure. Describe how the code shows failure to the user in the Chrome Browser screen.

Optional/Extra, Algorithm Analysis
🔗 Link to ML Project Blog

Show algorithms and preparation of data for analysis. This includes cleaning, encoding, and one-hot encoding.

function calculateSurvival() {
    // Extract data from AI model
    extractData()
        .then((AIData) => {
            // Prepare passenger data
            const passengerData = {
                name: document.getElementById("name").value,
                pclass: parseInt(getCheckedCheckboxValue("pclass")),
                sex: AIData[0],
                age: AIData[1],
                sibsp: parseInt(document.getElementById("sibsp").value),
                parch: parseInt(document.getElementById("parch").value),
                fare: parseFloat(document.getElementById("fare").value),
                embarked: getCheckedCheckboxValue("embarked"),
                alone: document.getElementById("alone").value === "true" ? true : false,
            };

            // Prepare body for POST request
            const body = {
                passenger: passengerData,
            };

            // Options for the POST request
            const post_options = {
                method: "POST",
                cache: "no-cache",
                body: JSON.stringify(body),
                headers: {
                    "Content-Type": "application/json",
                    "Access-Control-Allow-Origin": "include",
                },
            };

            // Send POST request to server
            fetch(url, post_options)
                .then((response) => {
                    if (!response.ok) {
                        const errorMsg = response.status;
                        console.log(errorMsg);
                        return;
                    }
                    return response.json();
                })
                .then((data) => {
                    // Update UI with survival data
                    const h1 = document.getElementById("survival");
                    h1.textContent = data[0];
                })
                .catch((err) => {
                    // Handle errors
                    console.error(err);
                });
        })
        .catch((err) => {
            // Handle errors from AI data extraction
            console.error(err);
        });
}

# data extraction
data = information[0]  # get the first element
age = data["age"]  # age extraction

bothGenders = data["gender"]  # get both gender confidence rates
woman = bothGenders["Woman"]  # woman confidence
man = bothGenders["Man"]  # man confidence

# based on the probabilities, find which is larger and return that
gender = None
if woman > man:
    gender = "Female"
elif woman < man:
    gender = "Male"

# the order is very important (must be gender THEN age)
returnData = [gender, age]  # create a list and send it

return returnData  # return

Show algorithms and preparation for predictions.

def load_model(url="https://github.com/serengil/deepface_models/releases/download/v1.0/age_model_weights.h5") -> Model:
    """
    Construct age model, download its weights and load
    Returns:
        model (Model)
    """

    # Construct base model
    model = VGGFace.base_model()

    # Add layers for age prediction
    classes = 101
    base_model_output = Sequential()
    base_model_output = Convolution2D(classes, (1, 1), name="predictions")(model.layers[-4].output)
    base_model_output = Flatten()(base_model_output)
    base_model_output = Activation("softmax")(base_model_output)

    # Construct age model
    age_model = Model(inputs=model.input, outputs=base_model_output)

    # Load weights
    home = folder_utils.get_deepface_home()

    if os.path.isfile(home + "/.deepface/weights/age_model_weights.h5") != True:
        logger.info("age_model_weights.h5 will be downloaded...")

        output = home + "/.deepface/weights/age_model_weights.h5"
        gdown.download(url, output, quiet=False)

    age_model.load_weights(home + "/.deepface/weights/age_model_weights.h5")

    return age_model

Discuss concepts and understanding of Linear Regression algorithms.

Linear regression is a method used to model the relationship between a dependent variable and one or more independent variables by fitting a linear equation to observed data. In data preparation, cleaning involves handling missing values and outliers, while encoding categorical variables ensures compatibility with the model. One-hot encoding, for example, is used when dealing with categorical data. In the provided code snippets, data extraction and encoding are essential steps for preparing data for analysis, such as extracting gender and age information from a dataset. Linear regression models aim to find the best-fitting line that describes the relationship between variables, facilitating predictions based on this linear relationship.

Discuss concepts and understanding of Decision Tree analysis algorithms.

Decision trees are hierarchical structures used for both classification and regression tasks, where each internal node represents a decision based on a feature, and each leaf node represents a prediction or outcome. Data preparation involves similar steps to linear regression, focusing on cleaning and preprocessing. However, decision tree algorithms are capable of handling categorical variables inherently without needing explicit encoding. In the provided example, the decision-making process based on confidence rates for gender can be likened to a decision tree node making splits based on certain conditions. Decision tree analysis simplifies complex decision-making processes into a series of if-else conditions, providing clear paths for predictions.

Collections

From VSCode using SQLite3 Editor, show your unique collection/table in database, display rows and columns in the table of the SQLite database.
From VSCode model, show your unique code that was created to initialize table and create test data.


Proposal: Relax type to arrays in types.d.ts

Hello,
I was curious if community would be open to relax type strictness in the types.d.ts file.
Instead of
declare type vec2 = [number, number] | Float32Array;

I propose to use
interface IndexedCollection {
    readonly length: number;
    [n: number]: number;
}
declare type vec2 = [number, number] | IndexedCollection;

Main motivation behind this is that it is possible to to change matrix type to be, say Float64Array or anything else that looks like an array via setMatrixArrayType(), and current type definitions do not reflect this accurately.
If you are open to this suggestion I'd be happy to send a pull request.

I'm all for it. After all, WebGL also accepts other typed arrays. So, yes, please do open a PR.


Project Text box in Project Master

https://tracker.micro-labs.in/project-tracker
Make the Project a Text box (instead of dropdown) that can accept 128 characters.
Make it Mandatory.
Increase the size of the text box.

Done


Revert renaming Data Science to Data Mart

reverting Data Science rename
a new Data Mart will be created after this.

Reverts #5018.


Expanding integration tests

When running cargo expand --lib --tests integration tests (located in the tests folder) are not epanded. I have confirmed the the same tests as unit tests (located in src/lib.rs) are expanded properly.
Is there a way to include the integration tests in the expansion?

cargo expand can only expand one target at a time. You have to pass the name of the integration test as in cargo expand --test foo.

That results in the error no test target named '<test_name>'.
Do I have to qualify the test in some way? e.g. cargo expand --test my_integration_tests::test_name?

I also tried specifiying the test target in my Cargo.toml as described in [Issue #40] (https://github.com/dtolnay/cargo-expand/issues/40#issuecomment-456214949) but it did not resolve the issue.

Sounds like you're putting the name of the function, not the name of the integration test target.
It's cargo expand --test my_integration_tests.

Ah, yes that was the issue. Thank you for the clarification.


Upgrade 0.9.6 to 0.9.9 Problem

I'm in the process of upgrading a cluster provision with kube-aws 0.9.6 to 0.9.9. My first hope in the upgrade process was from 0.9.6 to 0.9.8. This seemed to go fine. I'm having some issues getting to 0.9.9. It seems to be related to authentication issues with kube-proxy.
The environment:
17:43 $ kubectl version Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.3", GitCommit:"f0efb3cb883751c5ffdbe6d515f3cb4fbe7b7acd", GitTreeState:"clean", BuildDate:"2017-11-09T07:26:41Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"8+", GitVersion:"v1.8.4+coreos.0", GitCommit:"4292f9682595afddbb4f8b1483673449c74f9619", GitTreeState:"clean", BuildDate:"2017-11-21T17:22:25Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
After running kube-aws render stack, and  kube-aws render credentials I ran kube-aws upgrade s3://...
After completing the upgrade the kube-dns and kube-dashboard pods failed. After checking a few things I noticed the following errors kube-proxy.
kubectl logs kube-proxy-x5p88  --namespace kube-system
I0216 01:20:58.562798       1 feature_gate.go:156] feature gates: map[] time="2018-02-16T01:20:58Z" level=warning msg="Running modprobe ip_vs failed with message: modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.19-coreos/modules.dep.bin', error: exit status 1" W0216 01:20:58.570929       1 server_others.go:268] Flag proxy-mode="" unknown, assuming iptables proxy I0216 01:20:58.572403       1 server_others.go:122] Using iptables Proxier. W0216 01:20:58.682921       1 server.go:580] Failed to retrieve node info: Unauthorized W0216 01:20:58.683033       1 proxier.go:468] invalid nodeIP, initializing kube-proxy with <IP_ADDRESS> as nodeIP I0216 01:20:58.683125       1 server_others.go:157] Tearing down inactive rules. I0216 01:20:58.722011       1 conntrack.go:98] Set sysctl 'net/netfilter/nf_conntrack_max' to 131072 I0216 01:20:58.722150       1 conntrack.go:52] Setting nf_conntrack_max to 131072 I0216 01:20:58.722277       1 conntrack.go:98] Set sysctl 'net/netfilter/nf_conntrack_tcp_timeout_established' to 86400 I0216 01:20:58.722342       1 conntrack.go:98] Set sysctl 'net/netfilter/nf_conntrack_tcp_timeout_close_wait' to 3600 I0216 01:20:58.722565       1 config.go:102] Starting endpoints config controller I0216 01:20:58.722600       1 controller_utils.go:1041] Waiting for caches to sync for endpoints config controller I0216 01:20:58.722650       1 config.go:202] Starting service config controller I0216 01:20:58.722741       1 controller_utils.go:1041] Waiting for caches to sync for service config controller E0216 01:20:58.724826       1 event.go:200] Server rejected event '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"ip-10-143-13-40.aue1.central1.cc.1513a9acbce3a724", GenerateName:"", Namespace:"default", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{sec:0, nsec:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, InvolvedObject:v1.ObjectReference{Kind:"Node", Namespace:"", Name:"ip-10-143-13-40.aue1...", UID:"ip-10-143-13-40.aue1...", APIVersion:"", ResourceVersion:"", FieldPath:""}, Reason:"Starting", Message:"Starting kube-proxy.", Source:v1.EventSource{Component:"kube-proxy", Host:"ip-10-143-13-40.aue1..."}, FirstTimestamp:v1.Time{Time:time.Time{sec:63654340858, nsec:722494244, loc:(*time.Location)(0x9e22280)}}, LastTimestamp:v1.Time{Time:time.Time{sec:63654340858, nsec:722494244, loc:(*time.Location)(0x9e22280)}}, Count:1, Type:"Normal"}': 'Unauthorized' (will not retry!) E0216 01:20:58.725339       1 reflector.go:205] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:73: Failed to list *api.Endpoints: Unauthorized
Output from kube-dns:
kubectl logs kube-proxy-x5p88  --namespace kube-system
I0216 01:54:58.433213       1 dns.go:48] version: 1.14.6-3-gc36cb11 I0216 01:54:58.433907       1 server.go:69] Using configuration read from directory: /kube-dns-config with period 10s I0216 01:54:58.433943       1 server.go:112] FLAG: --alsologtostderr="false" I0216 01:54:58.433957       1 server.go:112] FLAG: --config-dir="/kube-dns-config" I0216 01:54:58.433962       1 server.go:112] FLAG: --config-map="" I0216 01:54:58.433966       1 server.go:112] FLAG: --config-map-namespace="kube-system" I0216 01:54:58.433969       1 server.go:112] FLAG: --config-period="10s" I0216 01:54:58.433976       1 server.go:112] FLAG: --dns-bind-address="<IP_ADDRESS>" I0216 01:54:58.433979       1 server.go:112] FLAG: --dns-port="10053" I0216 01:54:58.433985       1 server.go:112] FLAG: --domain="cluster.local."  I0216 01:54:59.434644       1 dns.go:173] Waiting for services and endpoints to be initialized from apiserver...
I'm not sure whether this is related to messed up service accounts or certs or something else.

I managed to get things working with the help of the following ticket:
https://github.com/kubernetes-incubator/kube-aws/issues/1057
I deleted the default token and and the same with the service account tokens and restarted the pods.


Add support and tests for URLComponents.percentEncodedQueryItems

rdar://59439703 (URLComponents.percentEncodedQueryItems missing on linux)

part 2 of #2936

@swift-ci test

@spevans thanks for helping get this in, its much appreciated!

@swift-ci test and merge


Add FlexBuffers to serde ecosystem list

Add FlexBuffers to serde ecosystem list

Hi @dtolnay, I updated the Flexbuffers documentation to point at our serde example. Did you have something more in mind for Serde documentation? If so, could you provide more details or an example?


Document header ordering caveats.

Resolves #3096.

This looks great. Thanks @Lukasa

@Lukasa can you supply details how to change headers in Session object? Tried requests.Session.headers = headers, but it doesn't work (no effect)

@0x3c3e, please consult the documentation for Session. The code you’ve supplied is modifying the Session class, not an instance of Session which is likely your problem. Further questions about usage should directed towards StackOverflow as per our project policies. Thanks!


The mod won't work with numerous tries

Issue.LOG
settings.txt
Hello. This is a very cool mod but unfortunately, It won't work for me.  I have done all your instructions.
1:d3d11.dll (fsr file) + enb file renamed to d3d11_enb.dll both located inside GTAV Root folder ( Mine is from epic games )
2: I have executed the dbgview test and its missing all the line you have mentioned
RTX3090 STIX OC - RYZEN 9 5950X - G.SKILLS 32GB TRIDENTZ NEO (F4-4000C18D-32GTZN)  - X570 TUF GAMING - WINDOWS 10 PRO
Thanks in advance

I have found my issue. I forgot to modify printdebug = true . Anyhow. The test passed but I am not sure to see any difference from the old ingame settings when i toggle from 0.5x , 0.667x. 0.75x.0.833x.

The difference is quite a lot, you will notice that the original game looks blurry, to check the difference you can remove the ";" of the configuration to be able to activate and deactivate it with "F3".

Issue.LOG
settings.txt
Hello. This is a very cool mod but unfortunately, It won't work for me. I have done all your instructions.
1:d3d11.dll (fsr file) + enb file renamed to d3d11_enb.dll both located inside GTAV Root folder ( Mine is from epic games )
2: I have executed the dbgview test and its missing all the line you have mentioned
RTX3090 STIX OC - RYZEN 9 5950X - G.SKILLS 32GB TRIDENTZ NEO (F4-4000C18D-32GTZN) - X570 TUF GAMING - WINDOWS 10 PRO
Thanks in advance

Idem, it only work in one computer with GTX 1070.

Everything works, install compatibility with Windows 7, and everything will work fine

Я нашел свою проблему. Я забыл изменить printdebug = true . Кое-как. Тест прошел, но я не уверен, что увижу какую-либо разницу со старыми внутриигровыми настройками, когда я переключаюсь с 0.5x, 0.667x. 0,75х.0,833х. Проблема.LOG

Everything works, install compatibility with Windows 7, and everything will work fine


Use explicit count modifiers

The construction {1,} in regular expressions is only supported by Oniguruma (which is used by TextMate and Sublime Text). However, GitHub is using a PCRE-based engine for regular expressions.
This is a known issue that we've been fixing in many grammars. Unfortunately, it doesn't seem to be source of the bug you reporter in github/linguist#2753.
There is also an issue on line 304. I'm not sure what was the expected behavior, so I left it as is.

Thanks, I really appreciate your help, that's very cool.
The issue on line 304 (  [(]{1,]}   ) is a mistake made because of auto completion of brackets.
So I should replace it with [(]+ if I understand.

So I should replace it with [(]+ if I understand.

Yes, I think.


GPU memory for training/testing

Hello,
Could you tell me how much GPU memory is needed for training/testing, I only have 6G GPU memory, I'm guessing there isn't enough GPU memory for training/testing.
Best.
Xu.

Hello Xu,
Thank you for your interest in our Diffree.
For training with a batch size of 16, each GPU requires approximately 40 GB of memory. The GPU memory requirement is closely related to the batch size you choose. For inference, unfortunately, 6 GB of GPU memory is still insufficient. You would need around 16 GB of GPU memory to run inference smoothly.
Please let me know if you have any other questions.
Best regards,
Lirui


Certificates with explicit ECC curve encodings are allowed in verification chain

Certificates with explicit ECC curve encodings are allowed in verification chain but they should be rejected according to the RFC 5480, section 2.1.1.
We should reject them at least with the X509_V_FLAG_X509_STRICT.

I think this issue is on the verge of being a security flaw. See:
https://blog.trendmicro.com/trendlabs-security-intelligence/an-in-depth-technical-analysis-of-curveball-cve-2020-0601/
A similar issue in MS Crypto API allows malware to be installed via signature bypass.

The crucial difference here is that although OpenSSL also uses hash to compare certificates, the hash computation does not cover just the public key but the whole certificate which includes the ECC curve parameters. This means a forged certificate with explicit ECC curve parameters does not match a legitimate root EC cert.
So no, this is IMO not a security flaw.

While it's possible that OpenSSL implements it without issues, explicit EC parameters are nonetheless still error-prone and not a great idea. FWIW, BoringSSL has not allowed explicit EC encodings in public keys[*] (and thus X.509 certificates) since December 2015 and it seems to have been fine. Most other implementations I've seen correctly reject it. I think OpenSSL should follow suit.
[*] We sadly, do still support the explicit EC encoding in private keys because sadly older OpenSSL (prior to 86f300d38540ead85543aee0cb30c32145931744) used the non-compliant encoding by default. It's possible that can be retired now too, since most other implementations reject them there too. I haven't tried. Getting it out of public keys appears to be quite safe though.

Duplicate of #12139


Complete tests for 100% coverage and bump release for 1.0.0

Codecov Report

Merging #5 into master will increase coverage by 3.13%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master        #5      +/-   ##
===========================================
+ Coverage   96.86%   100.00%   +3.13%
===========================================
  Files           5         5
  Lines         223       262      +39
===========================================
+ Hits          216       262      +46
+ Misses          7         0       -7

Flag
Coverage Δ

#tests
100.00% <100.00%> (+3.13%)
:arrow_up:

Impacted Files
Coverage Δ

pyrmq/consumer.py
100.00% <100.00%> (+3.27%)
:arrow_up:

pyrmq/publisher.py
100.00% <100.00%> (+3.89%)
:arrow_up:

pyrmq/tests/test_consumer.py
100.00% <100.00%> (+4.34%)
:arrow_up:

pyrmq/tests/test_publisher.py
100.00% <100.00%> (ø)

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 a024ecf...e48dfc0. Read the comment docs.


Getting job workpath in jsx script

Hi, I am running the nexrender-cli on Mac. I am running a jsx that is defined in job's assets. In that jsx I need to manipulate the template file before it is rendered. In order to open it I need to get the current job's workpath (including the randomly generated folder name) in my jsx script. For some reason providing a relative path in the script doesn't work. For example if I try to open ./project.aep or project.aep the file path is converted to /template.aep which is obviously not correct.
I tried using File($.fileName).path, however it returns /Applications/Adobe%20After%20Effects%202021/Scripts/Startup instead of something lile ~/Projects/temp/5ArUtUeOp9b8KPTTIMDM8. I searched through the documentation and code, but couldn't find a way to get the jobs absolute workpath in jsx. Please help.

OK, after some more thinking I found an easy way to get the workpath in jsx:
var projectFile = app.project.file;
if (projectFile.exists) {
  var workpath = projectFile.path
}

That is a very nice finding! Hopefully, other people will agree with me! 😄

My finding may be obvious for someone who has more experience with jsx, but I'm very new to it :)


Fix test

Similar to #89, I think (test= nil a) was a typo.

Actually, rather than submit separate PRs for this, #69, and #92, I'll just submit a single PR with everything to make it easier to merge, since you already indicated you wanted these.


+tck #362 wait for request signal in 209, and new additional tests

Another cleanup to things found in #362
Now we test both cases, not waiting for request and waiting for it explicitly.
Simplified setup a bit as well for existing tests in 209, while problem was pointed out about 210

Note from other PR:

We (attempt to) cover both cases now, without explicitly waiting for the request which could mean we issue before the request happens, and with explicitly waiting, which means it always is after the request signal. We use the TCK infra to force a request be made.

@ktoso this  fails the build:
 java.lang.ClassCastException: org.reactivestreams.tck.SubscriberWhiteboxVerification$BlackboxSubscriberProxy cannot be cast to org.reactivestreams.tck.support.SyncTriggeredDemandSubscriber

Ping @ktoso

Will get to this during my day

Pushed the fix, thanks for the reminders @viktorklang !


:sparkles: Make providers return a builtin config so engine can look at updated locations

Some providers can mutate the original location given in init config. For example, for binaries, java provider decompiles and uses the new decompiled path. This PR adds a way for providers to communicate updated locations back to the engine so builtin provider can be configured correctly without the user having to do it.

LGTM, Just a note run API tests with not-merged PR from go-konveyor-tests could be done adding "API tests PR: XYZ" to PR description (details https://github.com/konveyor/ci/blob/main/.github/workflows/global-ci.yml#L150)


fix(oss version): updating oss version used for 2.21.1

The title of this Pull Request needs to be changed to match the format:
<type>(<scope>): <subject>

See more details here: https://www.spinnaker.io/community/contributing/submitting/#commit-message-conventions
Some common examples are:
feat(armory.io): add docs.armory.io
fix(parser): grammar and spelling
style(loadingPage): made it super pretty!
refactor(helpMessages): changed order to make more sense


Memory Leak - Large PDF

I am seeing a memory leak when viewing large PDF files in terms of page count. Using an Apollo 17 Flight Plan PDF memory allocation continues to grow as the user scrolls the document and GC does not clear allocations. Inspecting the hprof it appears this is occurring in native code. I inspected the caching mechanism of the library and it appears to work as intended further indicating this is related to native code holding references it shouldn't. I tested this against 2.7.0, 2.8.2, and 3.0.0-beta.4 finding the same result on each version.
Profiler visualization and hprof dump

I created a branch with the mentioned PDF replacing the sample here
https://github.com/ToxicBakery/AndroidPdfViewer/tree/feature/memory-leak-large-pdf
Alternately you can get the PDF yourself from the Nasa website here
https://www.hq.nasa.gov/alsj/a17/A17_FlightPlan.pdf

Bit late to the party but adding onto what xybean suggested, I found that you can also use a queue system which will automatically truncate opened pages once they've reached a certain amount which is particularly helpful on devices with low memory.
After several attempts including that of adjusting values within the Constants.java file regarding caching limits with no discernible effects, I did the following:

I forked PdfiumAndroid and added the closePage() function as suggested by xybean. You can find an example on his github page.

From there, forked the AndroidPDFViewer project by barteksc and added a const variable MAX_PAGES to the PdfFile class. I found that 10 pages gave me acceptable results of around 178mbs at peak memory usage, never going further. My document was relatively graphic intensive being lecture slides and notes, but your mileage may vary with different PDFs. Different pages with different content will yield different memory requirements hence, you'll have to play with this.

Declare an integer queue: Queue OpenedPageQueue within the PdfFile class. Within the constructor, declare the queue as a LinkedList type: this.OpenedPageQueue = new LinkedList();

Finally, within the openPage() function inside the PdfFile Class, add the queue truncation logic.

Mine went something like this:
`public boolean openPage(int pageIndex) throws PageRenderingException {
int docPage = documentPage(pageIndex);
if (docPage < 0) {
return false;
}
    synchronized (lock) {
        if (openedPages.indexOfKey(docPage) < 0) {
            try {
                pdfiumCore.openPage(pdfDocument, docPage);
                openedPages.put(docPage, true);

                // Memory management
                OpenedPageQueue.add(pageIndex);
                if(OpenedPageQueue != null)
                {
                    if(OpenedPageQueue.size() > MAX_PAGES)
                    {
                        int oldPage = OpenedPageQueue.poll();
                        pdfiumCore.closePage(this.pdfDocument, oldPage);
                        openedPages.delete(oldPage);
                    }
                }

                return true;
            } catch (Exception e) {
                openedPages.put(docPage, false);
                throw new PageRenderingException(pageIndex, e);
            }
        }
        return false;
    }
}`

It feels a bit hacky to me but it gets the job done nevertheless. I haven't had any issues with leaks using this and rendering seems to be okay albeit a bit slow. Hope this helps anyone who's ran into the same issue.

@HaiYoAshCrow Hi, i can't find the function "closePage" on his github page.Can you tell me where? Thank you!

@yuquan23459 See: https://github.com/xybean/PdfiumAndroid/blob/master/src/main/java/com/shockwave/pdfium/PdfiumCore.java
Do a text search for closePage(PdfDocument doc, int pageIndex).

@HaiYoAshCrow Thank you first! I have forked PdfiumAndroid from xybean,but no maven.properties in projects.Then AndroidStudio will report error!

@yuquan23459  It's my personal file used for maven repository, so I haven't upload it. You just need to delete the code.

@yuquan23459 I used barteksc's pdfium and referenced the pdfium subproject in my own project alongside the AndroidPdfViewer as modules. I had issues with the maven plugin which was resolved by adding classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' to the pdfium's build.gradle.
My pdfium's build gradle is as follows with modifications for :
buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.2'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
    }
}

apply plugin: 'com.android.library'

ext {
    bintrayRepo = 'maven'
    bintrayName = 'pdfium-android'

    publishedGroupId = 'com.github.barteksc'
    libraryName = 'PdfiumAndroid'
    artifact = 'pdfium-android'

    libraryDescription = 'Fork of library for rendering PDFs on Android\'s Surface or Bitmap'

    siteUrl = 'https://github.com/barteksc/PdfiumAndroid'
    gitUrl = 'https://github.com/barteksc/PdfiumAndroid.git'

    libraryVersion = '1.8.2'

    developerId = 'barteksc'
    developerName = 'Bartosz Schiller'
    developerEmail =<EMAIL_ADDRESS>
    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 25
        versionCode 1
        versionName "1.8.2"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    sourceSets{
        main {
            jni.srcDirs = []
            jniLibs.srcDir 'src/main/libs'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:25.3.1'
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

@xybean I annotate some code in build.gradle, now the build.gradle like this:
buildscript {
repositories {
jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.3.2'
}

}
apply plugin: 'com.android.library'
// ext {
//     GROUP = 'com.egeio.preview'
//     VERSION = '1.0.2-SNAPSHOT'
//     TEST = false
//     TEST_REPO = '../repo'
//     Properties properties = new Properties()
//     properties.load(project.rootProject.file('maven.properties').newDataInputStream())
//     RELEASE_URL = properties.getProperty("RELEASE_URL")
//     SNAPSHOT_URL = properties.getProperty("SNAPSHOT_URL")
//     USER_NAME = properties.getProperty("USER_NAME")
//     PASSWORD = properties.getProperty("PASSWORD")
// }
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
    minSdkVersion 9
    targetSdkVersion 25
    versionCode 1
    versionName "1.8.2"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

sourceSets {
    main {
        jni.srcDirs = []
        jniLibs.srcDir 'src/main/libs'
    }
}

}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:25.3.1'
}
// apply from: 'maven.gradle'
But now it will failed when i open the pdf，the log is：
03-16 16:04:20.209 5790-8186/com.example.wyq.docopenctl E/art: No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2)
03-16 16:04:20.286 5790-5790/com.example.wyq.docopenctl E/PDFView: load pdf error
java.lang.UnsatisfiedLinkError: No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2)
at com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(Native Method)
at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:139)
at com.github.barteksc.pdfviewer.source.FileSource.createDocument(FileSource.java:38)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:49)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:25)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
03-16 16:04:22.328 2707-2707/com.android.phone E/CarrierConfigLoader: Failed to get package version for: com.android.carrierconfig
03-16 16:04:32.165 2707-10519/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: No UICC
03-16 16:04:32.287 2707-32248/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: ICC ID is null or empty.
03-16 16:04:32.295 2707-29496/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: ICC ID is null or empty.
03-16 16:04:32.317 2707-3336/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: ICC ID is null or empty.
03-16 16:04:32.323 2707-2707/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: ICC ID is null or empty.
03-16 16:04:32.335 2707-2707/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: ICC ID is null or empty.
03-16 16:04:32.341 2707-2707/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: ICC ID is null or empty.
03-16 16:04:32.352 2707-2707/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: ICC ID is null or empty.
03-16 16:04:32.381 2707-2707/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getIccId: ICC ID is null or empty.

@HaiYoAshCrow Hi，you mean you used barteksc's pdfium as module and add the closePage method in it.Not use xybean's pdfium as module？

@yuquan23459 Yeah, that's what I meant. Sorry I wasn't too clear. You'll need to reference the subproject since the main project is as a whole, the sample and the library project.

@yuquan23459  If you copy the .so file to your own project, you should copy relevant java files without changing their package name.I guess that you have changed the package name of java files.

@HaiYoAshCrow Hi,i am import the barteksc's pdfium project as module to the AndroidPdfViewer  but load failed!The log is:
03-19 10:16:03.279 6939-6939/? E/com.shockwave.pdfium.PdfiumCore: Native libraries failed to load - java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.github.barteksc.sample-2/base.apk"],nativeLibraryDirectories=[/data/app/com.github.barteksc.sample-2/lib/arm, /system/lib, /vendor/lib]]] couldn't find "libmodpng.so"
03-19 10:16:03.344 6939-6959/? E/art: No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2)
03-19 10:16:03.413 6939-6939/? E/PDFView: load pdf error
java.lang.UnsatisfiedLinkError: No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2)
at com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(Native Method)
at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:133)
at com.github.barteksc.pdfviewer.source.FileSource.createDocument(FileSource.java:38)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:49)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:25)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
And the Sample's gradle is：
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
provided 'org.androidannotations:androidannotations:4.0.0'
compile 'org.androidannotations:androidannotations-api:4.0.0'
compile project(':android-pdf-viewer')
},
the android-pdf-viewer's gradle is:
dependencies {
compile project(':PdfiumAndroid')
}
help,thank you!

@yuquan23459 Once you've included the project as a module, you'll need to run ndk-build as per instructions within pdfiumAndroid. Navigate to your {PDFIUM MODULE PATH}/src/main/jni and run ndk-build from the command line. Note that you're going to have to have NDK tools setup: https://developer.android.com/ndk/guides/index.html.

Have you already solved it，help,thank you

https://developer.android.com/ndk/guides/index.html. this not open

@ToxicBakery Android uses Garbage Collector, when items are removed from cache it doesn't mean that they will be removed from memory immediately

Great knowledge of android. But it crashes after few pages. Please try to found the leak into library. Or at least use LRUCache or WeakReference or something else.

@HaiYoAshCrow @xybean It's cool! My pdf is 400MB big, and when scrolling the pages, the memory rocketed up to 200MB and shut down. But after using your tips, it just goes at best up to 80MB in my Glaxy Note 4. Thank you all!

How can i solve it???

Scroll big pdf, crash!!!

Help....

Hi @Yazon2006 @HaiYoAshCrow @xybean , I have followed the above steps.

I forked PdfiumAndroid from barteksc and added the closePage() function
I imported this (PdfiumAndroid) as a module in AndroidPDFViewer and did necessary changes.
From there, forked the AndroidPDFViewer project by barteksc and did necessary changes.
Then i imported the above (AndroidPDFViewer) as a module in my project.

i got the following error.
Plugin with id 'com.github.dcendents.android-maven' not found.
Here is android-pdf-viewer build.gradle
apply plugin: 'com.android.library'
ext {
bintrayRepo = 'maven'
bintrayName = 'android-pdf-viewer'
publishedGroupId = 'com.github.barteksc'
libraryName = 'AndroidPdfViewer'
artifact = 'android-pdf-viewer'

libraryDescription = 'Android view for displaying PDFs rendered with PdfiumAndroid'

siteUrl = 'https://github.com/barteksc/AndroidPdfViewer'
gitUrl = 'https://github.com/barteksc/AndroidPdfViewer.git'

libraryVersion = '3.2.0-beta.1'

developerId = 'barteksc'
developerName = 'Bartosz Schiller'
developerEmail =<EMAIL_ADDRESS>
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]

}
android {
compileSdkVersion 28
defaultConfig {
    minSdkVersion 14
    targetSdkVersion 28
    versionCode 1
    versionName "3.2.0-beta.1"
}

}
dependencies {
implementation 'com.android.support:support-compat:28.0.0'
//api 'com.github.barteksc:pdfium-android:1.9.0'
implementation project(path:':PdfiumAndroid')
}
apply from: 'bintray.gradle'
Here is the PdfiumAndroid build.gradle
buildscript {
repositories {
jcenter()
google()
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
}
}
dependencies {
    classpath 'com.android.tools.build:gradle:4.0.0'
    classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}

}
apply plugin: 'com.android.library'
ext {
bintrayRepo = 'maven'
bintrayName = 'pdfium-android'
publishedGroupId = 'com.github.barteksc'
libraryName = 'PdfiumAndroid'
artifact = 'pdfium-android'

libraryDescription = 'Fork of library for rendering PDFs on Android\'s Surface or Bitmap'

siteUrl = 'https://github.com/barteksc/PdfiumAndroid'
gitUrl = 'https://github.com/barteksc/PdfiumAndroid.git'

libraryVersion = '1.9.0'

developerId = 'barteksc'
developerName = 'Bartosz Schiller'
developerEmail =<EMAIL_ADDRESS>
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]

}
android {
compileSdkVersion 26
defaultConfig {
    minSdkVersion 14
    targetSdkVersion 26
    versionCode 1
    versionName "1.9.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

sourceSets{
    main {
        jni.srcDirs = []
        jniLibs.srcDir 'src/main/libs'
    }
}

}
repositories {
google()
jcenter()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:support-v4:26.1.0'
}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
Please help.
Thanks

Do you want to publish an artifact on maven?
вт, 23 июн. 2020 г., 21:48 kayesn786<EMAIL_ADDRESS>
Hi @Yazon2006 https://github.com/Yazon2006 @HaiYoAshCrow
https://github.com/HaiYoAshCrow @xybean https://github.com/xybean , I
have followed the above steps.

I forked PdfiumAndroid from barteksc and added the closePage()
function
I imported this (PdfiumAndroid) as a module in AndroidPDFViewer and
did necessary changes.
From there, forked the AndroidPDFViewer project by barteksc and did
necessary changes.
Then i imported the above (AndroidPDFViewer) as a module in my
project.

i got the following error.
Plugin with id 'com.github.dcendents.android-maven' not found.
Here is android-pdf-viewer build.gradle
apply plugin: 'com.android.library'
ext {
bintrayRepo = 'maven'
bintrayName = 'android-pdf-viewer'
publishedGroupId = 'com.github.barteksc'
libraryName = 'AndroidPdfViewer'
artifact = 'android-pdf-viewer'
libraryDescription = 'Android view for displaying PDFs rendered with PdfiumAndroid'
siteUrl = 'https://github.com/barteksc/AndroidPdfViewer'
gitUrl = 'https://github.com/barteksc/AndroidPdfViewer.git'
libraryVersion = '3.2.0-beta.1'
developerId = 'barteksc'
developerName = 'Bartosz Schiller'
developerEmail =<EMAIL_ADDRESS>licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "3.2.0-beta.1"
}
}
dependencies {
implementation 'com.android.support:support-compat:28.0.0'
//api 'com.github.barteksc:pdfium-android:1.9.0'
implementation project(path:':PdfiumAndroid')
}
apply from: 'bintray.gradle'
Here is the PdfiumAndroid build.gradle
buildscript {
repositories {
jcenter()
google()
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
}
apply plugin: 'com.android.library'
ext {
bintrayRepo = 'maven'
bintrayName = 'pdfium-android'
publishedGroupId = 'com.github.barteksc'
libraryName = 'PdfiumAndroid'
artifact = 'pdfium-android'
libraryDescription = 'Fork of library for rendering PDFs on Android's Surface or Bitmap'
siteUrl = 'https://github.com/barteksc/PdfiumAndroid'
gitUrl = 'https://github.com/barteksc/PdfiumAndroid.git'
libraryVersion = '1.9.0'
developerId = 'barteksc'
developerName = 'Bartosz Schiller'
developerEmail =<EMAIL_ADDRESS>licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
android {
compileSdkVersion 26
defaultConfig {
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.9.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets{
main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/libs'
}
}
}
repositories {
google()
jcenter()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:support-v4:26.1.0'
}
apply from: '
https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: '
https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
Please help.
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/barteksc/AndroidPdfViewer/issues/495#issuecomment-648348527,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA4IJ6WV6C4XWO3YHG3TJ7LRYD2JVANCNFSM4EKDUUEQ
.

No, I am not publishing any artifacts to maven,
Do i have to remove those lines of code then?

Yeah, I guess you can just remove this plugin
ср, 24 июн. 2020 г., 08:50 kayesn786<EMAIL_ADDRESS>
No, I am not publishing any artifacts to maven,
Do i have to remove those lines of code then?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/barteksc/AndroidPdfViewer/issues/495#issuecomment-648605143,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA4IJ6WXBCXA3CBNUC6RMBTRYGHZLANCNFSM4EKDUUEQ
.

Hi,
Here is build.glradle of PdfiumAndroid after few modification
buildscript {
repositories {
jcenter()
google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:4.0.0'
    //classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
   // classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}

}
apply plugin: 'com.android.library'
/*ext {
bintrayRepo = 'maven'
bintrayName = 'pdfium-android'
publishedGroupId = 'com.github.barteksc'
libraryName = 'PdfiumAndroid'
artifact = 'pdfium-android'

libraryDescription = 'Fork of library for rendering PDFs on Android\'s Surface or Bitmap'

siteUrl = 'https://github.com/barteksc/PdfiumAndroid'
gitUrl = 'https://github.com/barteksc/PdfiumAndroid.git'

libraryVersion = '1.9.0'

developerId = 'barteksc'
developerName = 'Bartosz Schiller'
developerEmail =<EMAIL_ADDRESS>
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]

}*/
android {
compileSdkVersion 26
defaultConfig {
    minSdkVersion 14
    targetSdkVersion 26
    versionCode 1
    versionName "1.9.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

sourceSets{
    main {
        jni.srcDirs = []
        jniLibs.srcDir 'src/main/libs'
    }
}

}
repositories {
google()
jcenter()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
}
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
Now the project gets build without any error, but PDF doesn't show up. It just shows empty fragment.
I have migrated the AndroidPDFViewer-master to Androidx.
And i have removed everything from bintray.gradle in android-pdf-viewer
Thanks

@Yazon2006 , Thanks a lot.
The issue is resolved. After following all the steps (including NDK building), the memory consumption has drastically reduced to 200Mb from 900Mb.

Awesome! I'm glad for you)
чт, 25 июн. 2020 г., 22:15 kayesn786<EMAIL_ADDRESS>
@Yazon2006 https://github.com/Yazon2006 , Thanks a lot.
The issue is resolved. After following all the steps (including NDK
building), the memory consumption has drastically reduced to 200Mb from
900Mb.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/barteksc/AndroidPdfViewer/issues/495#issuecomment-649767575,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA4IJ6V37QCJLPL3UJVXTH3RYOO4LANCNFSM4EKDUUEQ
.

nice work!

谢谢    祝你天天开心哈

Perfect solution thank you !! @HaiYoAshCrow

谢谢    祝你天天开心哈

I tried the solution not working inside viewpager adapter, how to use this in adapter in which page index is always 0 since each adapter has its own pdfview instance

谢谢    祝你天天开心哈

Did anyone ever solve this? Really need some help to fix this problem

谢谢    祝你天天开心哈

Is anyone able to make a fork of both of these (AndroidPdfViewer and Pdfium) with the required changes?
I'm trying to replace the current version of this repo, that is being used in a Flutter package, and keep getting the problem where it can't find nativeOpenDocument method.
I've tried everything suggested here and more but must be missing something or doing it wrong.


Anyway to off the segmentation and just do the jyutping char by char?

The speed is a bit slow, and I am just looking for jyutping, may be the most frequent jyuping of the character? Thanks

Hello, I imagine you're referring to the characters_to_jyutping function? There's no way to turn off word segmentation done as part of this function, since there's ambiguity (like the 蛋 example in the linked docs) and getting the (hopefully correct) word segmentation is the right way to resolve it; using straight-up char+jyutping frequency would be suboptimal.
The slowness is due to how the data is parsed and loaded the first time you call characters_to_jyutping (working on mitigating this issue soon...), though the data is cached in a given Python session, and any subsequent characters_to_jyutpingcalls should be much faster.
Let me know if you have other questions!

Hello, I imagine you're referring to the characters_to_jyutping function? There's no way to turn off word segmentation done as part of this function, since there's ambiguity (like the 蛋 example in the linked docs) and getting the (hopefully correct) word segmentation is the right way to resolve it; using straight-up char+jyutping frequency would be suboptimal.
The slowness is due to how the data is parsed and loaded the first time you call characters_to_jyutping (working on mitigating this issue soon...), though the data is cached in a given Python session, and any subsequent characters_to_jyutpingcalls should be much faster.
Let me know if you have other questions!


Bower doesn't have version 0.0.16 available?

Is the current release 0.0.15 or 0.0.16? As 0.0.15 doesn't seem to be compatible with > ember 1.1. There seems to be very little information on versioning here on the repo.
0.0.16 is not available in bower. Is this a case of a missing version tag, or is 0.0.16 not yet released?

I bumped into this as well. I'm pretty sure it's because there's no git tag for 0.0.16

@ebryn Can you tag 0.0.16?

Just assuming this isn't relevant anymore.


Make it possible to set a reminder for turning exposure logging back on when turning it off

Current Implementation
Currently, the app does not offer the feature to get a reminder to reactivate exposure logging when turning exposure logging off.
Suggested Enhancement
Add the option to select a time when the app should remind you to reactivate exposure logging.
Here is an example how the French app, "TousAntiCovid" has implemented this:

Expected Benefits
Users who turn exposure logging off don't forget to turn it back on, because the app reminds them to do so.

Internal Tracking ID: EXPOSUREAPP-11150

Thanks for your suggestion @Ein-Tim.
Internal Tracking ID: EXPOSUREAPP-11150

Corona-Warn-App Open Source Team

As the CWA project went into ramp-down mode, I don't expect this feature to be implemented. I'm therefore closing this issue.


We are looking into building a small app that reads ultrasound cines (basically dicom files)

          Thank you for contributing an issue! 🙏

Welcome to the ITK community! 🤗👋☀
We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜
Also, please check existing open issues and consider discussion on the ITK Discourse. 📖
Originally posted by @github-actions[bot] in https://github.com/InsightSoftwareConsortium/ITK/issues/4129#issuecomment-1651332254

That's answer is really useless. just waste of time.please be more professional。I can't find any usefull infomation from the ITK Discourse. 📖 or existing open issues

Duplicate of #4129.

Duplicate of #4129.

yes,but didnt get any useful advice


Move puppet-module-collectd to puppet-community

@daenney @nibalizer  ping, how do?
https://puppet.community/
https://github.com/puppet-community
@nightfly19  any objections?

make it so

https://puppet.community/docs.html

Moved


Updated to allow for multiple bundles to stood up with standalone.

Can now pass in a comma separated list to have multiple bundles given back from the standalone plugin.

@theganyo Have time to take a peek?


Fix disappearing relationship lines in Tree when item is out of view

Closes #49080. Tested both the editor trees and a project scene.

Thanks!


feat: utreexo accumulator interface

[x] issue #32
[ ] follows contribution guide
[ ] code change includes tests

I guess scripts should be modified to generate blocks with correct witness field type as well?


Added Swedish language and some link fixes for #18.

Changed the Ticket link to discord invite because if you were not in the discord it would say you dont have permission to access it.  Please lmk if something needs to be changed.

My exams are coming up so this pull request will most likely only be out at the end of next month as I'd like to add other new features to the update as well.


refactor(report): simplify XSLT computation of code coverage status

This pull request refactors the XSLT code that computes code coverage status based on the trace data produced by the Java trace listener. The goal is to make rules like "use trace data", "use child data", "use parent data", or element-specific logic more apparent and easier to maintain.
Between now and the next XSpec release, we plan to change some of the logic in this XSLT code in ways that will change the expected coverage reports. This pull request excludes any such changes -- even bug fixes. In other words, this pull request is pure refactoring.

Locally, I checked that this refactoring does not change the Saxon 12.5 coverage reports in the test/end-to-end/cases-coverage directory. That is, I generated all the expected results with Saxon 12.5 and this repo's master branch, then added the commits from this PR, and then confirmed that the coverage tests pass.

FYI: Although test/end-to-end/cases/custom-coverage-report.xspec tests the ability to generate a custom coverage report, using an XSLT stylesheet that imports coverage-report.xsl, I don't see that ability documented in the wiki. I conclude that refactoring coverage-report.xsl does not affect users and should not be documented as if it were a breaking change.


Quote marks inside string breaking columns

Hi! I'm just starting out with this library and running into an issue when parsing the following line when utilising cp.readSDfile()
2,,9.5,OFF,,,"After ""Bring out your dead""",,,,,
I would expect it to output as:
2 |  | 9.5 | OFF |  |  | After "Bring out your dead" |  |  |  |  |
Instead it is parsing as:
2 |  | 9.5 | OFF |  |  | After  | Bring out your dead |  |  |  |
This then breaks the remainder of the operation on later rows, offsetting columns.
For context, this file is saved from Excel, and is expected to be end-user-edited in excel before exporting to CSV to load on the ESP32. It is reasonable to assume the user will replicate this issue when writing spoken quotes in a cell.
The row in Excel shows as:

Hello, would it be possible to post here the exact file you used? And possibly the code?
I tried the following example and it worked as expected:
#include <CSV_Parser.h>

void setup() {
  Serial.begin(115200);
  delay(5000);

  char * csv_str = "to_ignore,my_strings,my_numbers\n"
                   ",hello,5\n"
                   ",world,10\n"
                   ",\"After \"\"Bring out your dead\"\"\",15\n";

  CSV_Parser cp(csv_str, /*format*/ "-sL");

  cp.print();
}

void loop() {
}

It printed:
CSV_Parser content:
rows_count = 3, cols_count = 3
   Header:
       -  | my_strings | my_numbers
   Types:
      - | char* | int32_t
   Values:
      - | hello | 5
      - | world | 10
      - | After "Bring out your dead" | 15
Memory occupied by values themselves = 46
sizeof(CSV_Parser) = 44

Thanks for taking a look at this! Using the example reading_from_sd_card sketch and this file:
spamalotv5.csv

What format string did you use? I'm just trying to use the same scenario to recreate the issue.

What format string did you use? I'm just trying to use the same scenario to recreate the issue.

I just set them all to strings to test:
CSV_Parser cp(/col formats/ "ssssssssssss", /has_header/ true, /delimiter/ ',');

Sorry about it but there is a bug when supplying text character by character, I will try to fix it.

I just created the 1.3.0 release where this issue should be fixed. It may take some time before it's available through Arduino library manager, but you could copy CSV_Parser.cpp directly from this repository and put it in the Arduino libraries "CSV_Parser" folder.
Btw this part was introduced in the CSV_Parser.cpp to address the issue:
    if (!whole_csv_supplied && !strpbrk(next_quote + 1, delim_chars)) {
      s = next_quote + 1;
      continue;
    }
    ending_quote_found = true;

Before that change, the code assumed the ending quote was found even if it wasn't followed by delimiter or "\n" or "\r". This check makes sure that's not the case.
Thank you for reporting this. I hope this change does not break anything else.

Btw that csv file appears to be large, if you run out of memory, you may consider parsing it row by row:
https://github.com/michalmonday/CSV-Parser-for-Arduino/blob/master/examples/parsing_row_by_row_sd_card/parsing_row_by_row_sd_card.ino

Thanks so much! I've just tested it and it is working perfectly for me now.


Add OnChange handler to the TextInput widget

This PR adds an onChange option to the TextInput widget. This is an event handler similar to the existing OnSubmit, it is called whenever a character is inserted or deleted from the TextInput's text content.
Rudimentary tests have been written and an example of it's usage is given in textinputdemo.go.

One more request, can you please give me an explicit permission to merge this code into the master branch when releasing the next version? I will need that to bypass the CLA check at that point.

I give you explicit permission to merge this code into the master branch and do whatever you want with it.

I apologize for the delay, I did not notice the comments were already addressed. I will look at this in the next few days.


Added terms for protein decrotonylase activity. Fixes #22351

Remember most of those RHEAs are warnings that the link doesn't exist yet  Those don't cause a failure.

H

I see RHEA:10164 IS in RHEA, but the link in the error log goes to 'not found' (and has nothing to do with this enry I think.

As for square brackets around the protein part, I think that's fine.
Parentheses (round brackets, curves), square brackets, and braces (curly brackets) are used in chemical nomenclature to set off parts of a name dealing with specific structural features in order to convey the structure of a compound as clearly as possible.
see https://www.acdlabs.com/iupac/nomenclature/93/r93_61.htm
parentheses to form subgroups of atoms within a molecule.
braces (brackets) are often used for nesting  eg TiCl2[(CH3)2PCH2CH2P(Ch3)2]2 (in a pub, all numbers subscripted).

And I found BIochemcial NOmenclature and related Documents, 2nd ed 1992 on my shelf
Page 331' Parentheses and square brackets in Chemical formulae (1981)
Use parentheses in a formulae for side chains (CH3, etc.), and square brackets for condensed chains (eg, protein: so you don't have to write out the entire chain!).

There are a couple of pending RHEAs. What is the SOP? Should I wait and rerun checks? @hdrabkin Thanks.
RHEA:69172
RHEA:69176
RHEA:69332

Hi @raymond91125
We now have it set up that you can put the RHEAs in. The PR script will check that those RHEAs are not pubic yet, but will not fail the pull request; those will appear as warnings. Those RHEAs will NOT appear in the public files but will still appear in go-edit.obo. When the RHEA becomes public, the ids will show up in go, go-basic, etc.
Note, however: if you use a RHEA as a definition reference make sure there is also a PMID so the public definition will have a reference.


Always cleanup after a build.

Signed-off-by: dblock<EMAIL_ADDRESS>Description
Another build failed because it was missing $TOKEN, which was changed previously in https://github.com/opensearch-project/opensearch-build/pull/1101. The logs also contain that commit. The only explanation is that the change was not picked up from vars, meaning the library was loaded and not replaced. Attempting to clean the workspace every time to fix that.
Check List

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

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

Codecov Report

Merging #1104 (f0a5160) into main (ce07fe6) will decrease coverage by 10.97%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##               main    #1104       +/-   ##
=============================================
- Coverage     93.02%   82.05%   -10.98%
  Complexity        9        9
=============================================
  Files            97        8       -89
  Lines          2424       39     -2385
  Branches          4        4
=============================================
- Hits           2255       32     -2223
+ Misses          164        2      -162
  Partials          5        5

Impacted Files
Coverage Δ

src/system/config_file.py

src/ci_workflow/ci_check_list_source.py

src/test_workflow/test_component.py

src/test_workflow/integ_test/integ_test_suite.py

src/build_workflow/build_args.py

src/manifests_workflow/component.py

src/system/zip_file.py

src/manifests/manifest.py

src/ci_workflow/ci_check_gradle_dependencies.py

.../assemble_workflow/bundle_opensearch_dashboards.py

... and 79 more

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 ce07fe6...f0a5160. Read the comment docs.

Even if we do that I see this log [WS-CLEANUP] Deferred wipeout is disabled by the job configuration... looks like we need to enable it from job config?

Deferred wipeout

Apparently.


[build] Run integration tests for each building.

The CI tests passed, and I manually checked all unit tests and ITCase has been checked


Data Factory: ARMTemplateForFactory and ARMTemplateParametersForFactory cannot handle brackets in trigger values

If your trigger parameters in Azure Data Factory contains JSON with "[", the first representation of every JSON property is replaced by a double "[[". Below is an example of a trigger. Note that the SourceTableName and TableName contains brackets.
{     "name": "PackData_NY",     "properties": {         "annotations": [],         "runtimeState": "Started",         "pipelines": [             {                 "pipelineReference": {                     "referenceName": "PackDataSync_NY",                     "type": "PipelineReference"                 },                 "parameters": {                     "tableList": [                         {                             "SourceTableName": "[data].[HourByHour]",                             "TableName": "[NY].[HourByHour]",                             "WaterMarkColumn": "Changed",                             "TableType": "DataTypeHourByHour",                             "StoredProcedureNameForMergeOperation": "Update_NY_HourByHour"                         },                         {                             "SourceTableName": "[data].[HourByHourExtendedStopReason]",                             "TableName": "[NY].[HourByHourExtendedStopReason]",                             "WaterMarkColumn": "ChangedAt",                             "TableType": "DataTypeHourByHourExtendedStopReason",                             "StoredProcedureNameForMergeOperation": "Update_NY_HourByHourExtendedStopReason"                         }                     ]                 }             }         ],         "type": "ScheduleTrigger",         "typeProperties": {             "recurrence": {                 "frequency": "Hour",                 "interval": 1,                 "startTime": "2020-05-19T11:30:00.000Z",                 "timeZone": "UTC"             }         }     } }
When you publish the Data Factory that trigger parameter is transformed into the follwoing in ARMTemplateForFactory.json and ARMTemplateParametersForFactory.json (note the double brackets in SourceTableName and TableName):
"PackData_NY_properties_PackDataSync_NY_parameters_tableList": { 			"value": [ 				{ 					"SourceTableName": "[[data].[HourByHour]", 					"TableName": "[[NY].[HourByHour]", 					"WaterMarkColumn": "Changed", 					"TableType": "DataTypeHourByHour", 					"StoredProcedureNameForMergeOperation": "Update_NY_HourByHour" 				}, 				{ 					"SourceTableName": "[[data].[HourByHourExtendedStopReason]", 					"TableName": "[[NY].[HourByHourExtendedStopReason]", 					"WaterMarkColumn": "ChangedAt", 					"TableType": "DataTypeHourByHourExtendedStopReason", 					"StoredProcedureNameForMergeOperation": "Update_NY_HourByHourExtendedStopReason" 				} 			] 		}
Naturally that breaks the logic driven by this parameter.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 89177180-caeb-e2e1-5614-60719f593672
Version Independent ID: a3352be5-2343-ae87-38d0-32312a62d2b1
Content: Create schedule triggers in Azure Data Factory - Azure Data Factory
Content Source: articles/data-factory/how-to-create-schedule-trigger.md
Service: data-factory
GitHub Login: @djpmsft
Microsoft Alias: daperlov

@kimlundjohansen, Thanks for leveraging Azure docs feedback channel to raise this question. Could you please share the Azure documentation for which this feedback is applicable to?

Sure. https://github.com/Microsoft/azure-docs/blob/master/articles/data-factory/how-to-create-schedule-trigger.md

@kimlundjohansen : I am able to repro the issue . I am reaching out to the internal team and get more help on this . I will update you on this .

Thanks. I can also add that my additional findings revel that:

The Azure Data Factory deployment task needs a leading and trailing bracket in the trigger json properties because it strips them away if present.

So the current output:
"PackData_NY_properties_PackDataSync_NY_parameters_tableList": { "value": [ { "SourceTableName": "[[data].[HourByHour]", "TableName": "[[NY].[HourByHour]", "WaterMarkColumn": "Changed", "TableType": "DataTypeHourByHour", "StoredProcedureNameForMergeOperation": "Update_NY_HourByHour" }, { "SourceTableName": "[[data].[HourByHourExtendedStopReason]", "TableName": "[[NY].[HourByHourExtendedStopReason]", "WaterMarkColumn": "ChangedAt", "TableType": "DataTypeHourByHourExtendedStopReason", "StoredProcedureNameForMergeOperation": "Update_NY_HourByHourExtendedStopReason" } ] }
Needs to be:
"PackData_NY_properties_PackDataSync_NY_parameters_tableList": { "value": [ { "SourceTableName": "[[data].[HourByHour]]", "TableName": "[[NY].[HourByHour]]", "WaterMarkColumn": "Changed", "TableType": "DataTypeHourByHour", "StoredProcedureNameForMergeOperation": "Update_NY_HourByHour" }, { "SourceTableName": "[[data].[HourByHourExtendedStopReason]]", "TableName": "[[NY].[HourByHourExtendedStopReason]]", "WaterMarkColumn": "ChangedAt", "TableType": "DataTypeHourByHourExtendedStopReason", "StoredProcedureNameForMergeOperation": "Update_NY_HourByHourExtendedStopReason" } ] }
If you use the Azure Data Factory deployment task.

@kimlundjohansen  . Just heard back from the ADF team and they are still working on finding more on this . As per them  the reason of why we are generating the extra [ in the arm template is because ARM template expressions start with [, so we need to escape them

Hey @kimlundjohansen ,
This is actually an expected behavior to escape a bracket in ARM. ADF utilizes it in a variety of places including table names. Any time a property has '[]' in it, you must have two open brackets for the ARM template to work properly

It might be expected but it breaks the pipeline functionality. We have discovered that we need to alter the two files in order to make everything work.
A deployment step before the ARM Template deployment with this logic will fix the issue.
$armtemplate = Get-Content ./ARMTemplateForFactory.json -Raw
$armtemplate -replace '("(?:SourceTableName|TableName)": "[[[^]]].[[^]]])(?!])', '$1]' `
| Out-File ./ARMTemplateForFactory.json
(Get-Content -path ./ARMTemplateParametersForFactory.json -Raw).Replace('[[','[') | Out-File ARMTemplateParametersForFactory.json

Closing as there seems to be no open items. Feel free to keep commenting
#please-close

Closing as there seems to be no open items. Feel free to keep commenting
#please-close

So the issue is fixed?

The behavior is expected. This is an ARM requirement that is independent of the Azure Data Factory team. Unfortunately we have no control over it


the l21shrink has a wrong condition

elif norm[i] < -epsilon should remove

You are right. That condition will never happen.
Thanks.

fixed.


2.0 bordered table fix for rowspan

I've changed the bordering for .bordered-table, so it uses border-top instead of border-bottom. That way, using rowspan will work as expected.

Could you please tell me what I should do so lessc will parse @version and @date?

I noticed the Makefile and used make to rebuild. I did need to change the makefile to work on linux. See #788

See http://jasny.github.com/bootstrap/base-css.html#tables

Made this change manually for the .bordered-table stuff. I didn't need the first-child stuff yet and I removed the bottom-border completely as I changed this at the core table level.
Thanks for the fix—you rock :).


tests: fix scheduler test in pdctl

What problem does this PR solve?
Fix the ci failed case.
What is changed and how it works?
Release note
no need
Check List
Tests

Unit test

Side effects

Possible performance regression
Increased code complexity
Breaking backward compatibility

Related changes

PR to update pingcap/docs/pingcap/docs-cn:
PR to update pingcap/tidb-ansible:
Need to cherry-pick to the release branch

/run-all-tests


Deploy packr on heroku?

Trying to deploy my go application with packr onto heroku. By default i believe heroku is using "go build" to build the binary. Is there a way to tell it to use packr build???

This is really a Heroku question. But here are a few suggestions, other than ask them.
You could use a custom build pack, or build the bin locally, or deploy to Heroku with docker.