问:
Workers in spring batch are failing with "IllegalStateException: AnnotationConfigServletWebServerApplicationContext has been closed already"
Workers are failing after successful processing with exception

{"@timestamp":"2022-12-19T12:45:43.89+05:30","level":"ERROR","thread":"main","logger":"org.springframework.boot.SpringApplication","message":"Application run failed","stack_trace":["java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@2a225dd7 has been closed already","    at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1138)","    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1153)","    at org.springframework.context.event.ApplicationListenerMethodAdapter.getTargetBean(ApplicationListenerMethodAdapter.java:371)","    at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:336)","    at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)","    at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)","    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)","    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)","    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)","    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)","    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)","    at org.springframework.boot.context.event.EventPublishingRunListener.ready(EventPublishingRunListener.java:114)","    at org.springframework.boot.SpringApplicationRunListeners.lambda$ready$6(SpringApplicationRunListeners.java:82)","    at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)","    at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)","    at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114)","    at org.springframework.boot.SpringApplicationRunListeners.ready(SpringApplicationRunListeners.java:82)","    at org.springframework.boot.SpringApplication.run(SpringApplication.java:323)","    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)","    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)","    at com.example.package.ExampleBatchMainA.main(ExampleBatchMainA.java:47)","    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)","    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)","    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)","    at java.base/java.lang.reflect.Method.invoke(Method.java:566)","    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)","    at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)","    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)","    at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)"]}

Spring Boot Version :  2.7.5
spring-cloud-task-core : 2.4.4
Spring-Batch-Core : 4.3.7

workers to exit successfully without the exception.


来源: stackexchange

问:
I want to split a table in to two rows using media query
i want to split this table into 2 rows because its overflowing i want to split it from skill certification deployment matrix with table head and put it below respective employee  name,id row one by one

[enter image description here](https://i.stack.imgur.com/xBpob.jpg[enter image description here](https://i.stack.imgur.com/DLq1y.jpg))

front-end code

```<code><div class="col-md-12 mg-b-15">
        <div class="annual-training-plan sdm-box skill-certification">
            <div class="row">
                <div class="sdm-title col-md-6">
                    <h3>Skill Certification & Deployment Matrix</h3>
                </div>
                <div class="demo-table col-md-6">
                    <table>
                        <tr>
                            <td>
                                <span class="foo blue"> </span>
                            </td>
                            <td>
                                <span>  Plan</span>
                            </td>
                            <td>
                                <span class="foo yellow"> </span>
                            </td>
                            <td>
                                <span>  Recertification</span>
                            </td>

                            <td>
                                <span class="foo green"> </span>
                            </td>
                            <td>
                                <span>  Certified</span>
                            </td>
                            <td>
                                <span class="foo gray"> </span>
                            </td>
                            <td>
                                <span>  No Plan</span>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>

            <div class="matrix-graph">
                <table id="deploymentMatrixTbl" class="table-striped">
                    <thead>
                        <tr>
                            <th scope="col" class="wd-20p emp-detail">Employee Name</th>

                            <th scope="col" class="wd-15p emp-detail">Employee Id</th>
                            <th scope="col" class="wd-15p emp-detail">Department</th>

                            <th scope="col" class="wd-7p emp-detail"> Role</th>
                            <th scope="col" class="wd-90p emp-detail"><span>Skill Certification & Deployment Matrix</span></th>
                        </tr>
                    </thead>

                    <tbody>
                        <tr><td colspan="4">No data available.</td></tr>

                    </tbody>
                </table>

            </div>
        </div>

  [1]: https://i.stack.imgur.com/ux5Ff.jpg
</code>```

ContentLicense: CC BY-SA 4.0

Body:
i want to split this table into 2 rows because its overflowing i want to split it from skill certification deployment matrix with table head and put it below respective employee  name,id row one by one

[enter image description here](https://i.stack.imgur.com/xBpob.jpg[enter image description here](https://i.stack.imgur.com/DLq1y.jpg))

front-end code

Skill Certification & Deployment Matrix

                                  Plan

                                  Recertification

                                  Certified

                                  No Plan

                            Employee Name

                            Employee Id
                            Department

                             Role
                            Skill Certification & Deployment Matrix

No data available.

  [1]: https://i.stack.imgur.com/ux5Ff.jpg


问:
Handling Nextjs pages and API update
I have a website made in Nextjs with also some custom API. I also have an Apollo Server running for graphql. My question is more focused on NextJS, but I have the same doubts about any kind of services that running online.

When I need to change a small portion of code of my API or change some CSS files or just some js line of my website, everytime I need to re-build the project, stop the Next.js service and start it again. So:

It's not better if I use another server that handle only the API (perhaps a basic node server), so, when I want to do some small fix on the API I don't need to re-build (and then stop) the entire site?

How I can avoid to block my website anytime I need to change something?

Title: Handling Nextjs pages and API update


问:
load stimulus controller from own bundle
stimulus_boostrap.js

```<code>import { startStimulusApp } from '@symfony/stimulus-bridge';

export const app = startStimulusApp(require.context(
    '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
    true,
    /\.(j|t)sx?$/
));
</code>```

controllers.json

```<code>{
    "controllers": {
        "@my/ux-datatable-js": {
            "datatable": {
                "enabled": true,
                "fetch": "eager"
            }
        }
    },
    "entrypoints": []
}
</code>```

packages.json

```<code>  "@my/ux-datatable-js": "file:./../../vendor/my/ux-datatable-js/assets",
</code>```

in vendor/my/ux-datatable-js/assets/packages.json

```<code>{
    "name": "@my/ux-datatable-js",
    "description": "List datatable provided.",
    "main": "dist/controller.js",
    "module": "dist/controller.js",
    "version": "1.0.0",
    "license": "MIT",
    "symfony": {
        "controllers": {
            "datatable": {
                "main": "dist/controller.js",
                "webpackMode": "eager",
                "fetch": "eager",
                "enabled": true
            }
        }
    },
    "peerDependencies": {
        "@hotwired/stimulus": "^3.0.0"
    },
    "devDependencies": {
        "@hotwired/stimulus": "^3.0.0"
    }
}
</code>```

in controller.js

```<code>import { Controller } from '@hotwired/stimulus';

export default class extends Controller {

    connect() {

        alert('ok');
        console.log('vendor js controller');

    }

}
</code>```

when i add some error is json - i get error so files are included.

in body

```<code><div data-controller="datatable" >

</code>```

no errors but controllers is not fired why ?
can I get all registered controllers ?

Body:
stimulus_boostrap.js

import { startStimulusApp } from '@symfony/stimulus-bridge';

export const app = startStimulusApp(require.context(
    '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
    true,
    /\.(j|t)sx?$/
));

controllers.json

{
    "controllers": {
        "@my/ux-datatable-js": {
            "datatable": {
                "enabled": true,
                "fetch": "eager"
            }
        }
    },
    "entrypoints": []
}

packages.json

  "@my/ux-datatable-js": "file:./../../vendor/my/ux-datatable-js/assets",

in vendor/my/ux-datatable-js/assets/packages.json

{
    "name": "@my/ux-datatable-js",
    "description": "List datatable provided.",
    "main": "dist/controller.js",
    "module": "dist/controller.js",
    "version": "1.0.0",
    "license": "MIT",
    "symfony": {
        "controllers": {
            "datatable": {
                "main": "dist/controller.js",
                "webpackMode": "eager",
                "fetch": "eager",
                "enabled": true
            }
        }
    },
    "peerDependencies": {
        "@hotwired/stimulus": "^3.0.0"
    },
    "devDependencies": {
        "@hotwired/stimulus": "^3.0.0"
    }
}

in controller.js

import { Controller } from '@hotwired/stimulus';

export default class extends Controller {

    connect() {

        alert('ok');
        console.log('vendor js controller');

    }

}

when i add some error is json - i get error so files are included.

in body

no errors but controllers is not fired why ?
can I get all registered controllers ?


问:
Android Emulator Screen keeps going up
I am using Android studio's emulator, when i have lots of data in one screen then emulator keeps on going to top of the page when i am editing my textViews, buttons etc.
Emulator 4 api 31

I tried looking for fixes in emulator but finds none.

Title: Android Emulator Screen keeps going up


问:
Reuse keypoints for real time stitching
Using OpenCV's stitcher class, I can get a decent output from my two input images captured from two cameras. I'm wondering if I can reuse the keypoints (or homography matrix?) to skip that step and show live video output of the stitched inputs.

This is what I have so far for a single image:

```<code>import cv2

left = cv2.imread('left.png', 1)
right = cv2.imread('right.png', 1)
images = [left, right]
input_images = cv2.hconcat([left, right])

imStitcher = cv2.Stitcher_create()

error, stitched_img = imStitcher.stitch(images)

if not error:
    cv2.imshow('stitched', stitched_img)
    cv2.imshow('input images', input_images)
    cv2.waitKey(0)

else:
    print('could not stitch')
</code>```

How would I go about extracting the keypoints in order to use them again in a loop? Any help appreciated.

Input images

Stitched image

Title: Reuse keypoints for real time stitching

Body:
Using OpenCV's stitcher class, I can get a decent output from my two input images captured from two cameras. I'm wondering if I can reuse the keypoints (or homography matrix?) to skip that step and show live video output of the stitched inputs.

This is what I have so far for a single image:

import cv2

left = cv2.imread('left.png', 1)
right = cv2.imread('right.png', 1)
images = [left, right]
input_images = cv2.hconcat([left, right])

imStitcher = cv2.Stitcher_create()

error, stitched_img = imStitcher.stitch(images)

if not error:
    cv2.imshow('stitched', stitched_img)
    cv2.imshow('input images', input_images)
    cv2.waitKey(0)

else:
    print('could not stitch')

How would I go about extracting the keypoints in order to use them again in a loop? Any help appreciated.

Input images

Stitched image


问:
api-maintenance@heroku.com: Detach DATABASE (@ref:postgresql-contoured-49024)
I am new to Heroku and have deployed an application recently. It worked for a week before breaking. The issue lies on something related to Heroku. I see the following activity in Heroku.

```<code>api-maintenance@heroku.com: Detach DATABASE (@ref:postgresql-contoured-49024)
</code>```

Now when I access the application online I see:

We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

When I check the logs I see:

F, [2022-12-19T11:51:30.936244 #4] FATAL -- :
[bd4b4e41-9fc7-4d3d-b47b-f935f763a398]
2022-12-19T11:51:30.936316+00:00 app[web.1]:
[bd4b4e41-9fc7-4d3d-b47b-f935f763a398]
ActiveRecord::ConnectionNotEstablished (connection to server on socket
"/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory

It seems Heroku ran some sort of routine that screwed up the database. Can someone please advise on what I should do to get the app up and running again?

Thanks.

Body:
I am new to Heroku and have deployed an application recently. It worked for a week before breaking. The issue lies on something related to Heroku. I see the following activity in Heroku.

api-maintenance@heroku.com: Detach DATABASE (@ref:postgresql-contoured-49024)

Now when I access the application online I see:

We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

When I check the logs I see:

F, [2022-12-19T11:51:30.936244 #4] FATAL -- :
[bd4b4e41-9fc7-4d3d-b47b-f935f763a398]
2022-12-19T11:51:30.936316+00:00 app[web.1]:
[bd4b4e41-9fc7-4d3d-b47b-f935f763a398]
ActiveRecord::ConnectionNotEstablished (connection to server on socket
"/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory

It seems Heroku ran some sort of routine that screwed up the database. Can someone please advise on what I should do to get the app up and running again?

Thanks.


问:
How to disable transitive dependencies in flutter/dart
If I am creating a package(P1) that depends on other packages(p2 and p3) to be used by other app(A1). How can I stop app(A1) from accessing transitive dependencies(p2 and p3)?

```<code>   A
   |
   |
   P1
   /\
  /  \
p2    p3
</code>```

In android(gradle) we can selectively expose dependent packages by making use implementation and api.

in build.gradle of p1

```<code>implementation p2
api p3
</code>```

in build.gradle of A1

```<code>implementation p1
</code>```

This will make p3 available for use in A1 but p2 will not be available for use.

Is there a way to have a control on transitive dependencies in dart?

Body:
If I am creating a package(P1) that depends on other packages(p2 and p3) to be used by other app(A1). How can I stop app(A1) from accessing transitive dependencies(p2 and p3)?

   A
   |
   |
   P1
   /\
  /  \
p2    p3

In android(gradle) we can selectively expose dependent packages by making use implementation and api.

in build.gradle of p1

implementation p2
api p3

in build.gradle of A1

implementation p1

This will make p3 available for use in A1 but p2 will not be available for use.

Is there a way to have a control on transitive dependencies in dart?


问:
Why does my page actualize on the anchor?
When i clicked on this button that i created 1 it makes me go there 2 and that is what i want. But it's what comes after that that is the unwanted result.

When i actualized the page, it will makes me go there again, i can understand why since the url will not change there since it was " [...]index.html#nom " and it will become the same after actualizing  the page after i clicked on the button. But when i do something else, like clicking on the button " Accueil " the url will be this [index.html] but it will not make me go at the start of the page but there 3 when i want to be there 4.

So my question is this. Why when i actualize my page without clicking the button or clicking " Accueil"  or clicking "Accueil" or the other "Accueil" in the three others pages [à propos ; Tarifs ; Portfolio] that is supposed to make me go at the start of the page " [...]index.html " it will make me go to " Voir mon portfolio " (seen in image 3).

I tried to understand why it doesn't work. But if i understand correctly.

If i use a href"#nom"> TEST . When a id="nom" was created before. When i clicked on the " TEST " it will makes me go at the same page, but at the id where it was located in the page. So in my case it works. But when i clicked on other things that's supposed to make me go at the start of the " Accueil" page. it just makes me go at another location.

I tried to use another ID with another anchor just to make the " Accueil  " of the page accueil; à propos ; tarifs ; portfolio makes me go to the same anchor located at the start of the page so it  will works out. But again, the url will change and it will be this " [...]index.html#haut ". So there go another problem. If i just actualize my page without the #haut it will make go at the location of image4 and if have already clicked on the button ( seen in image 1) then i need to click on the " Accueil" at the top... to go at the top of the page. So it kinds of lost his meaning.

While doing what i'm doing will makes it work. It doesn't work on some cases :

1 : If i'm going to the index page the first time, the url will be " [...] index.html " so it will makes me go at the location of image4.

2 : If i'm clicking on the button seen in image1, the url will change to " [...] index.html#nom ", and if i actualize the page it will makes me go there again. So if i want to go at the start of my page i need to go at the start by scrolling and clicking on Accueil, but it's not that great (since i don't need to click on accueil since i'm already at the start of the page).

I tried looking on the internet, but it only gave me explanation of the anchor and id and it doesn't seem like i did something wrong here so i don't really know.

```<code><body>
    <header>
         <nav>
             <img src="logo.png" alt="Logo Robbie Lens"  id="haut">
             <div>
                 <a href="index.html#haut">Accueil</a>
                 <a href="À propos - Robbie Lens Photographie.html">À propos</a>
                 <a href="tarif.html">Tarif</a>
                 <a href="portfolio.html">Portfolio</a>
              </div>
         </nav>
    </header>
    <main>
        <section class="accueil-introduction">
            <div>
                <h1>Robbie Lens Photographie</h1>
                <p>
                    Où <em>professionalisme</em> s’allie avec <em>passion</em>. Depuis
                    plus de 5 ans maintenant, j’exerce mon métier avec la passion
                    qui m’anime : capturer l’essence de chaque instant.
                 </p>
                <a href="index.html#nom" class="cta">UN PROJET ? ÉCRIVEZ-MOI</a>
            </div>
            <img src="robbie-lens.png" alt="Portrait avec effet de la photographe Robbie Lens" >
        </section>
        <section class="accueil-photos">
            <h2>Mon dernier projet</h2>
            <div>
                <img src="element-1.png" alt="Twelve apostles - Australie" >
                <img src="element-2.png" alt="Wai-O-Tapu - Nouvelle-Zélande" >
                <img src="element-3.png" alt="Parc National d’Abel Tasman - Nouvelle-Zélande" >
            </div>
            <div>
                <img src="element-4.png" alt="Lac Rotorua - Nouvelle-Zélande" >
                <img src="element-5.png" alt="Milford Sound - Nouvelle-Zélande" >
                <img src="element-6.png" alt="Lac Wanaka - Nouvelle-Zélande" >
            </div>
        <div>
            <a href="portfolio.html" class="cta">VOIR MON PORTFOLIO</a>
        </div>
        </section>
        <section>
            <h2 class="tortue" >Parlons de votre projet</h2>
            <form method="get" action="#">
                <div class="form-nom-email">
                    <div class="form-column">
                    <label for="nom">nom</label>
                    <input type="text" name="nom" id="nom" required autofocus>
                    <label for="email">e-mail</label>
                    <input type="email" name="email" id="email" required >
                    </div>
                    <div class="form-column">
                    <label for="message">Votre message</label><br>
                    <textarea name="message" id="message" cols="40" rows="4"></textarea               required>
                    <input type="submit" value="ENVOYER" class="cta">
                    </div>
                </div>
            </form>
        </section>
    </main>
    <footer>
        <img src="logo.png" alt="Logo Robbie Lens" >
        <div>
            <a target="_blank" href="https://twitter.com/" class="lien-icone">
                <img src="twitter.png" alt="Logo Twitter" >
            </a>
            <a target="_blank" href="https://www.instagram.com/" class="lien-icone">
                <img src="instagram.png" alt="Logo Instagram" >
            </a>
        </div>
    </footer>
</body>
</code>```

Thanks for your answer and if the question was already made and answered i'm sorry.

Have a nice day.

Body:
When i clicked on this button that i created 1 it makes me go there 2 and that is what i want. But it's what comes after that that is the unwanted result.

When i actualized the page, it will makes me go there again, i can understand why since the url will not change there since it was " [...]index.html#nom " and it will become the same after actualizing  the page after i clicked on the button. But when i do something else, like clicking on the button " Accueil " the url will be this [index.html] but it will not make me go at the start of the page but there 3 when i want to be there 4.

So my question is this. Why when i actualize my page without clicking the button or clicking " Accueil"  or clicking "Accueil" or the other "Accueil" in the three others pages [à propos ; Tarifs ; Portfolio] that is supposed to make me go at the start of the page " [...]index.html " it will make me go to " Voir mon portfolio " (seen in image 3).

I tried to understand why it doesn't work. But if i understand correctly.

If i use a  TEST . When a id="nom" was created before. When i clicked on the " TEST " it will makes me go at the same page, but at the id where it was located in the page. So in my case it works. But when i clicked on other things that's supposed to make me go at the start of the " Accueil" page. it just makes me go at another location.

I tried to use another ID with another anchor just to make the " Accueil  " of the page accueil; à propos ; tarifs ; portfolio makes me go to the same anchor located at the start of the page so it  will works out. But again, the url will change and it will be this " [...]index.html#haut ". So there go another problem. If i just actualize my page without the #haut it will make go at the location of image4 and if have already clicked on the button ( seen in image 1) then i need to click on the " Accueil" at the top... to go at the top of the page. So it kinds of lost his meaning.

While doing what i'm doing will makes it work. It doesn't work on some cases :

1 : If i'm going to the index page the first time, the url will be " [...] index.html " so it will makes me go at the location of image4.

2 : If i'm clicking on the button seen in image1, the url will change to " [...] index.html#nom ", and if i actualize the page it will makes me go there again. So if i want to go at the start of my page i need to go at the start by scrolling and clicking on Accueil, but it's not that great (since i don't need to click on accueil since i'm already at the start of the page).

I tried looking on the internet, but it only gave me explanation of the anchor and id and it doesn't seem like i did something wrong here so i don't really know.

                 Accueil
                 À propos
                 Tarif
                 Portfolio

Robbie Lens Photographie

                    Où professionalisme s’allie avec passion. Depuis
                    plus de 5 ans maintenant, j’exerce mon métier avec la passion
                    qui m’anime : capturer l’essence de chaque instant.

                UN PROJET ? ÉCRIVEZ-MOI

Mon dernier projet

            VOIR MON PORTFOLIO

Parlons de votre projet

            <form method="get" action="#">

                    nom
                    <input type="text" name="nom" id="nom" required autofocus>
                    e-mail
                    <input type="email" name="email" id="email" required >

                    Votre message

                    <textarea name="message" id="message" cols="40" rows="4"></textarea               required>
                    <input type="submit" value="ENVOYER" class="cta">

            </form>

Thanks for your answer and if the question was already made and answered i'm sorry.

Have a nice day.


问:
Some strings are not translating in dokan pro using loco translate

As you can see, i struggle only with few words and can't find a way through. I need help, if you know how to make this translate work. Thank you


问:
Unable to add phantomjs in my docker, getting error - npm ERR! `user` is not a valid npm option
I am trying to add phantomjs in my docker file to generate html - pdf.
Below is my dockerfile

Dockerfile

```<code>FROM node:alpine
WORKDIR /
COPY package*.json ./

# Add support for https on wget
RUN apk update && apk add --no-cache wget && apk --no-cache add openssl wget && apk add ca-certificates && update-ca-certificates

# Add phantomjs
RUN wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz" | tar xz -C / \
    && npm config set user 0 \
    && npm install -g phantomjs-prebuilt

# Add fonts required by phantomjs to render html correctly
RUN apk add --update ttf-dejavu ttf-droid ttf-freefont ttf-liberation && rm -rf /var/cache/apk/*

RUN npm install --production
copy . /
RUN npm run build
EXPOSE 8080
cmd ["npm", "run", "start:prod"]
</code>```

But when I try to run it. it gives me below error.

```<code>npm ERR! `user` is not a valid npm option

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-12-19T11_55_55_953Z-debug-0.log
The command '/bin/sh -c wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz" | tar xz -C /   && npm config set user 0   && npm install -g phantomjs-prebuilt' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1

</code>```

This seemed to work fine a few days back. But all of sudden this stopped working and started giving me this error.

This seemed to work fine a few days back. But all of sudden this stopped working and started giving me this error.

Body:
I am trying to add phantomjs in my docker file to generate html - pdf.
Below is my dockerfile

Dockerfile

FROM node:alpine
WORKDIR /
COPY package*.json ./

# Add support for https on wget
RUN apk update && apk add --no-cache wget && apk --no-cache add openssl wget && apk add ca-certificates && update-ca-certificates

# Add phantomjs
RUN wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz" | tar xz -C / \
    && npm config set user 0 \
    && npm install -g phantomjs-prebuilt

# Add fonts required by phantomjs to render html correctly
RUN apk add --update ttf-dejavu ttf-droid ttf-freefont ttf-liberation && rm -rf /var/cache/apk/*

RUN npm install --production
copy . /
RUN npm run build
EXPOSE 8080
cmd ["npm", "run", "start:prod"]

But when I try to run it. it gives me below error.

npm ERR! `user` is not a valid npm option

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-12-19T11_55_55_953Z-debug-0.log
The command '/bin/sh -c wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz" | tar xz -C /   && npm config set user 0   && npm install -g phantomjs-prebuilt' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1

This seemed to work fine a few days back. But all of sudden this stopped working and started giving me this error.

This seemed to work fine a few days back. But all of sudden this stopped working and started giving me this error.


问:
style input to hug content size in html+css (no js)
I'm coding in blazor, so I'd favor solutions based on html-css and not js. I want my input field to hug its content. not have a fixed width in pixels.
This is how it looks like, notice the amount of empty space at the right of "Odri"

This is how I want it to look like:

Notice how the edit box wraps around the content and the width space is used by the last item (via flex-grow :1)

I achieved this behavior using "cotenteditable" on a div or a span, but this is undesirable because div or spans do not have attached methods like @onedit, @onfocusout and other useful stuff that blazor has for inputs or textarea

Note: I will need similar tools for text area in the near future, so... extra points for solutions that work also for textarea

This is my code so far:

```<code><div class="d-flex">
 <input @bind=Player.Name @onfocusout=StoreChangesToDB>   <!--This is input that needs to shrink-->
 <div> - @Player.Profession |</div>
 <div class="littleText flex-grow-1">@Player.Motivation</div>
</div>
</code>```

Body:
I'm coding in blazor, so I'd favor solutions based on html-css and not js. I want my input field to hug its content. not have a fixed width in pixels.
This is how it looks like, notice the amount of empty space at the right of "Odri"

This is how I want it to look like:

Notice how the edit box wraps around the content and the width space is used by the last item (via flex-grow :1)

I achieved this behavior using "cotenteditable" on a div or a span, but this is undesirable because div or spans do not have attached methods like @onedit, @onfocusout and other useful stuff that blazor has for inputs or textarea

Note: I will need similar tools for text area in the near future, so... extra points for solutions that work also for textarea

This is my code so far:

 <input @bind=Player.Name @onfocusout=StoreChangesToDB>

 - @Player.Profession |

@Player.Motivation


问:
New interface for each element of menu bar in java
I have created a menu bar where i have 5 items:

Now what i want to do is, for each items, when i click one of them, an interface dedicated for that item will be open under the menu bar in java, as shown in this example:

How can i do this in java? Thank you so much for your helps.
Here is my java code:

```<code>public class MainView extends Div {

    public MainView() {
        MenuBar menuBar = new MenuBar();
        Text selected = new Text("");
        ComponentEventListener<ClickEvent<MenuItem>> listener = e -> selected
                .setText(e.getSource().getText());
        Div message = new Div(new Text("Clicked item: "), selected);

        menuBar.addItem("Administrateur", listener);
        menuBar.addItem("Utilisateur", listener);
        MenuItem share = menuBar.addItem("Article");
        MenuItem move = menuBar.addItem("Fournisseur");
        menuBar.addItem("Catégorie", listener);
        add(menuBar, message);
    }

}
</code>```

Create an interface for each element of menu bar in java.

Body:
I have created a menu bar where i have 5 items:

Now what i want to do is, for each items, when i click one of them, an interface dedicated for that item will be open under the menu bar in java, as shown in this example:

How can i do this in java? Thank you so much for your helps.
Here is my java code:

public class MainView extends Div {

    public MainView() {
        MenuBar menuBar = new MenuBar();
        Text selected = new Text("");
        ComponentEventListener<ClickEvent<MenuItem>> listener = e -> selected
                .setText(e.getSource().getText());
        Div message = new Div(new Text("Clicked item: "), selected);

        menuBar.addItem("Administrateur", listener);
        menuBar.addItem("Utilisateur", listener);
        MenuItem share = menuBar.addItem("Article");
        MenuItem move = menuBar.addItem("Fournisseur");
        menuBar.addItem("Catégorie", listener);
        add(menuBar, message);
    }

}

Create an interface for each element of menu bar in java.


问:
Unknown attribute despite having initialized it
I am completely new to rails and I ran into a problem while I try to define an association between models. To be specific, I am trying to create a relationship between task and category but It ran into the error when I try to connect them category.tasks << task1.
The Error:

```<code>C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activemodel-7.0.4/lib/active_model/attribute.rb:211:in `with_value_from_database': can't write unknown attribute `category_id` (ActiveModel::MissingAttributeError)

          raise ActiveModel::MissingAttributeError, "can't write unknown attribute `#{name}`"
          ^^^^^
</code>```

task1 attribute:

```<code>t.string :name
t.text :description
t.integer :position
t.boolean :completed
t.timestamps
</code>```

category attribute:

```<code>t.string :name
t.timestamps
</code>```

the pre-set the connection between task and catogory

```<code>class AddCategoryIdtoTask < ActiveRecord::Migration[7.0]
  def change
    add_column(:tasks, :category_id, :integer, index:true)
  end
end
</code>```
```<code>class Task < ApplicationRecord
    belongs_to :category, optional: true
end
</code>```
```<code>class Category < ApplicationRecord
    has_many :tasks
end
</code>```

When I appendix task1 into category.tasks , would it not update the category_id to match?
I hope some passerby could look into this error that I feel like I am obviously missing something

Body:
I am completely new to rails and I ran into a problem while I try to define an association between models. To be specific, I am trying to create a relationship between task and category but It ran into the error when I try to connect them category.tasks << task1.
The Error:

C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activemodel-7.0.4/lib/active_model/attribute.rb:211:in `with_value_from_database': can't write unknown attribute `category_id` (ActiveModel::MissingAttributeError)

          raise ActiveModel::MissingAttributeError, "can't write unknown attribute `#{name}`"
          ^^^^^

task1 attribute:

t.string :name
t.text :description
t.integer :position
t.boolean :completed
t.timestamps

category attribute:

t.string :name
t.timestamps

the pre-set the connection between task and catogory

class AddCategoryIdtoTask < ActiveRecord::Migration[7.0]
  def change
    add_column(:tasks, :category_id, :integer, index:true)
  end
end

class Task < ApplicationRecord
    belongs_to :category, optional: true
end

class Category < ApplicationRecord
    has_many :tasks
end

When I appendix task1 into category.tasks , would it not update the category_id to match?
I hope some passerby could look into this error that I feel like I am obviously missing something


问:
Cannot resolve action even though it exist Rider 2022.3 .NET 6.0
I have a function in Controller:
[HttpPost] public async Task<IActionResult> LoadMetalAsync

And I was trying to get the action URL in MVC-view using IUrlHelper:
action="@Url.Action( "LoadMetalAsync", "MetalGrid")"

But I have a Resharper Error "Cannot resolve action".

It isn't stopping build process, but this error clog the console

And if I replace LoadMetalAsync (in  URL.Action) to LoadMetal - all will Okay, but I haven't any LoadMetal function on project.


问:
how do you split a table vertically in Rmarkdown
I have a long dataframe which is printed as a table in Rmarkdown (html). I would like to split the table in half and display the two parts of the table vertically side by side. Is there a way I can do this?
One of the columns of the dataframe also includes pictures.</p>


问:
How do I find the Cache Block Address when I am given Memory Block Address and the Number of Blocks and they type of Associate Cache?
So I have been given the following:

Memory Block Address as 462 (in decimals)

Direct Mapped Cache

22 Blocks

The question is to find the Cache Block Address.

My teacher gave the equation: Cache Block Address = Memory Block Address % No. of Blocks

When I use this equation I get Cache Block Address = 462%4 = 2

But the answer given is 231 which I am assuming is obtained by 462/log2(4)

Can someone help me with this. I am a bit confused


问:
javascript in django template not working
I'm new in Django, im create product page in Django in product card i add increment decrement add to cart button, but add to cart button work on first product card so,what can i do?

I'm added add to card increment and decrement button using JavaScript why JavaScript only apply on one card product in Django. so, how to resolve when ever i use looping in Django my JavaScript not working or shown in console btn varriable already declared.

```<code>{% for i in productskey %}
<div class="col-sm-4">
   <div class="product-image-wrapper" style="border:1px solid #ddd ;">
      <div class="single-products">
         <div class="productinfo text-center">
            <a href="{% url 'prodetail' i.id %}">
            <img src=" {{i.productImage.url}} " alt="" style="width:255px; height:255px"/>
            </a>
            <h2>₹{{i.productPrice}}</h2>
            <p>{{i.productName}}</p>
            <div class="btn">
               <button class="mainusbtn">-</button>
               <button class="mainbtn" class="btn btn-default" class="fa fa-shopping-cart">ADD TO CART</button>
               <button class="plusbtn">+</button>
            </div>
            <!-- <a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a> -->
         </div>
         <!-- <div class="product-overlay">
            <div class="overlay-content">
                <h2>$56</h2>
                <p>Easy Polo Black Edition</p>
                <a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
            </div>
            </div> -->
      </div>
      <!-- <div class="choose">
         <ul class="nav nav-pills nav-justified">
            <li><a href=""><i class="fa fa-plus-square"></i>Add to wishlist</a></li>
            <li><a href=""><i class="fa fa-plus-square"></i>Add to compare</a></li>
         </ul>
         </div> -->
   </div>
   <!-- </a> -->
</div>
<script>
   let btn = document.querySelector('.mainbtn');
   let pbtn = document.querySelector('.plusbtn');
   let mbtn = document.querySelector('.mainusbtn');

   btn.addEventListener("click", () => {
       if (btn.innerText == 'ADD TO CART') {
           btn.innerText = 1;
           pbtn.style.display = 'inline-block';
           mbtn.style.display = 'inline-block';
       }
   })

   mbtn.addEventListener("click", () => {
       if (btn.innerText == 5) {
           pbtn.style.display = 'inline-block';
       }
       if (btn.innerText < 2) {
           btn.innerText = 'ADD TO CART';
           pbtn.style.display = 'none';
           mbtn.style.display = 'none';
       } else {
           btn.innerText = btn.innerText - 1;
       }
   })

   pbtn.addEventListener("click", () => {
       btn.innerText = +(btn.innerText) + +1;

       // if(btn.innerText == 5){
       //     pbtn.style.display = 'none';
       // }
   })
</script>
</code>```

Body:
I'm new in Django, im create product page in Django in product card i add increment decrement add to cart button, but add to cart button work on first product card so,what can i do?

I'm added add to card increment and decrement button using JavaScript why JavaScript only apply on one card product in Django. so, how to resolve when ever i use looping in Django my JavaScript not working or shown in console btn varriable already declared.

{% for i in productskey %}

₹{{i.productPrice}}

{{i.productName}}

               <button class="mainusbtn">-</button>
               <button class="mainbtn" class="btn btn-default" class="fa fa-shopping-cart">ADD TO CART</button>
               <button class="plusbtn">+</button>


问:
How to connect sqlite with mysql database using ionic framework?
now I'm working on hybrid mobile application with SQLite. This application just only retrieve the data from database. The data come from MYSQL database, but I want to store the large amount of data into local storage which is SQLite so when the user don't have the internet, they can retrieve the data from local storage. So,is there a way to connect mysql db and sqlite? I have been following the tutorial from this site

but I do not know how to connect sqlite with mysql db. So,anyone can help me to solve my problem ?


问:
Redis Connection Failed
So I have a redis code like this

```<code> public class RedisConnectorHelper
    {
        static RedisConnectorHelper()
        {
            RedisConnectorHelper.lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
             {

                 string redisServer = WebConfigurationManager.AppSettings["RedisServer"];
                 if (redisServer == null)
                 {
                     redisServer = "localhost";
                 }
                 return ConnectionMultiplexer.Connect(redisServer+ ",allowAdmin=true,abortConnect=false,ssl=True,");
             }, System.Threading.LazyThreadSafetyMode.PublicationOnly);
        }
</code>```

Here is the part where the caching has been implemented,

```<code>      public List<Division> GetDivisons()
        {
                  if (CacheManager.Instance.IsDataSaved(CacheKey.Divisions))
                  {
                      return CacheManager.Instance.GetData<List<Division>>(CacheKey.Divisions);
                  }

                  else
                  {
                      CacheManager.Instance.SaveData<List<Division>>(CacheKey.Divisions, _notebookEntities.Divisions.ToList(), 30, ExpiryTimeUnit.Minutes);
                      return _notebookEntities.Divisions.ToList();
              }
        }
</code>```

And the unit testing part,

```<code>
   [Test]
        public void GetDivisons()
        {
            var result = _notebookService.GetDivisons();
            Assert.NotNull(result);
        }
</code>```

but as soon as I uncomment the unit test which is shown below,the exception (shown below) occurs and the azure pipeline build fails, but passes as soon as I comment the unit test.

Here is the Exception,

StackExchange.Redis.RedisConnectionException : It was not possible to connect to the redis server(s). Error connecting right now. To allow this multiplexer to continue retrying until it's able to connect, use abortConnect=false in your connection string or AbortOnConnectFail=false; in your code.   at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(ConfigurationOptions configuration, TextWriter log, Nullable`1 serverType, EndPointCollection endpoints)
at StackExchange.Redis.ConnectionMultiplexer.Connect(ConfigurationOptions configuration, TextWriter log)
at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log)

Is there any way to figure out what is the cause of it. i have tried with abortConnect=true & false and also with ssl=true but nothing works, as soon as I set to abortConnect= true I get a RedisTimeOutException

Title: Redis Connection Failed

Body:
So I have a redis code like this

 public class RedisConnectorHelper
    {
        static RedisConnectorHelper()
        {
            RedisConnectorHelper.lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
             {

                 string redisServer = WebConfigurationManager.AppSettings["RedisServer"];
                 if (redisServer == null)
                 {
                     redisServer = "localhost";
                 }
                 return ConnectionMultiplexer.Connect(redisServer+ ",allowAdmin=true,abortConnect=false,ssl=True,");
             }, System.Threading.LazyThreadSafetyMode.PublicationOnly);
        }

Here is the part where the caching has been implemented,

      public List<Division> GetDivisons()
        {
                  if (CacheManager.Instance.IsDataSaved(CacheKey.Divisions))
                  {
                      return CacheManager.Instance.GetData<List<Division>>(CacheKey.Divisions);
                  }

                  else
                  {
                      CacheManager.Instance.SaveData<List<Division>>(CacheKey.Divisions, _notebookEntities.Divisions.ToList(), 30, ExpiryTimeUnit.Minutes);
                      return _notebookEntities.Divisions.ToList();
              }
        }

And the unit testing part,

   [Test]
        public void GetDivisons()
        {
            var result = _notebookService.GetDivisons();
            Assert.NotNull(result);
        }

but as soon as I uncomment the unit test which is shown below,the exception (shown below) occurs and the azure pipeline build fails, but passes as soon as I comment the unit test.

Here is the Exception,

StackExchange.Redis.RedisConnectionException : It was not possible to connect to the redis server(s). Error connecting right now. To allow this multiplexer to continue retrying until it's able to connect, use abortConnect=false in your connection string or AbortOnConnectFail=false; in your code.   at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(ConfigurationOptions configuration, TextWriter log, Nullable`1 serverType, EndPointCollection endpoints)
at StackExchange.Redis.ConnectionMultiplexer.Connect(ConfigurationOptions configuration, TextWriter log)
at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log)

Is there any way to figure out what is the cause of it. i have tried with abortConnect=true & false and also with ssl=true but nothing works, as soon as I set to abortConnect= true I get a RedisTimeOutException


问:
Android CPU architecture distribution in 2022 (armeabi-v7a vs arm64-v8a)
Is there any official information about the architecture usage in 2022 on Android devices?
I have an app which supports armeabi-v7a and arm64-v8a.
I want to drop the support of armeabi-v7a and support only 64-bit devices (arm64-v8a). But I can't find any information about what share of all devices are using 32-bit.

Everything I found was too old (3+ years).

PS1: Nowadays, x86 and x86_64 are very rarely used, that's why I don't mention them.
PS2: Information from 2021 would also be very helpful.

```<code>ndk {
    abiFilters "armeabi-v7a", "arm64-v8a"
}
</code>```

Body:
Is there any official information about the architecture usage in 2022 on Android devices?
I have an app which supports armeabi-v7a and arm64-v8a.
I want to drop the support of armeabi-v7a and support only 64-bit devices (arm64-v8a). But I can't find any information about what share of all devices are using 32-bit.

Everything I found was too old (3+ years).

PS1: Nowadays, x86 and x86_64 are very rarely used, that's why I don't mention them.
PS2: Information from 2021 would also be very helpful.

ndk {
    abiFilters "armeabi-v7a", "arm64-v8a"
}


问:
How do I configure the log4net RemotingAppender?
How to configure remotingAppender to write logs files per day in a remote server?</p>

ContentLicense: CC BY-SA 3.0


问:
Nextjs Error: Text content does not match server-rendered HTML
This code is displays two keyboards and allows the user to click the one they prefer.
However it gives an error: "Error: Text content does not match server-rendered HTML.". I believe that this has to do with how I am changing which image is rendered but I don't know how to fix it

```<code>import Head from 'next/head'
import Image from 'next/image'
import Link from 'next/link'
import { Inter } from '@next/font/google'
import React, { useState } from 'react'

const inter = Inter({ subsets: ['latin'] })
const keebs: {name: string, votes: number, id: number}[]= [{name: "Hineybeige", votes: 0, id: 0}, {name: "Vamp", votes: 0, id: 1}, {name: "Fright Club Volume 1", votes: 0, id: 2}, {name: "Tenshi", votes: 0, id: 3}, {name: "Lilac on Black", votes: 0, id: 4}, {name: "Handarbeige", votes: 0, id: 5}, {name: "Darling", votes: 0, id: 6}, {name:"Olivia++", votes: 0, id: 7}]
let keyboard1 = keebs[Math.floor(Math.random()*8)]
  let keyboard2 = keebs[Math.floor(Math.random()*8)]
  while (keyboard1.name === keyboard2.name) {
    keyboard2 = keebs[Math.floor(Math.random()*8)]
  }

export default function Home() {

  const [src1, setSrc1] = useState("/" + keyboard1.name + ".jpg")
  const [src2, setSrc2] = useState("/" + keyboard2.name + ".jpg")

  const handleSubmit = (id: number) => {
    if (id === 1) {
      keebs[keyboard1.id].votes += 1
    }
    else if (id === 2) {
      keebs[keyboard2.id].votes += 1
    }

    keyboard1 = keebs[Math.floor(Math.random()*8)]
    keyboard2 = keebs[Math.floor(Math.random()*8)]
    while (keyboard1.name === keyboard2.name) {
      keyboard2 = keebs[Math.floor(Math.random()*8)]
    }

    setSrc1("/" + keyboard1.name + ".jpg")
    setSrc2("/" + keyboard2.name + ".jpg")
  }

  return (
    <>
      <Head>
        <title>Keycap Vote</title>
        <meta name="description" content="Generated by create next ap" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="icon" href="/favicon.ico" />
      </Head>
      <main className="flex min-h-screen flex-col items-center bg-gradient-to-b from-[#2e026d] to-[#15162c]">
        <div className="container flex flex-col items-center gap-12 px-4 py-16 ">
          <h1 className="text-5xl font-extrabold tracking-tight text-white sm:text-[5rem]">
            Keycap <span className="text-[hsl(280,100%,70%)]">Vote</span> App
          </h1>
        </div>
        <Link href="/api/auth/login">Login</Link>

        <div className="grid grid-cols-2 gap-4 sm:grid-cols-2 md:gap-8">
        <h1 className="text-2xl font-extrabold tracking-tight text-white sm:text-[3rem] container flex flex-col items-center">{keyboard1.name}</h1>
        <h1 className="text-2xl font-extrabold tracking-tight text-white sm:text-[3rem] container flex flex-col items-center">{keyboard2.name}</h1>

          <button onClick={() => handleSubmit(1)} className="flex max-w-md flex-col gap-4 rounded-xl bg-white/10 p-4 text-white hover:bg-white/20">
            <div className="relative aspect-video h-64 max-w-[18rem]"><Image src={"/" + keyboard1.name + ".jpg"} alt="Keyboard1" layout="fill" className="rounded-xl" /></div>
          </button>

          <button onClick={() => handleSubmit(2)} className="flex max-w-md flex-col gap-4 rounded-xl bg-white/10 p-4 text-white hover:bg-white/20">
            <div className="relative aspect-video h-64 max-w-[18rem]"><Image src={"/" + keyboard2.name + ".jpg"} alt="Keyboard2" layout="fill" className="rounded-xl" /></div>
          </button>

          <h1 className="text-5xl font-extrabold tracking-tight text-white sm:text-[3rem] container flex flex-col items-center">{keyboard1.votes}</h1>
          <h1 className="text-5xl font-extrabold tracking-tight text-white sm:text-[3rem] container flex flex-col items-center">{keyboard2.votes}</h1>
        </div>

      </main>
    </>
  )
};
</code>```

I also don't know what the usestate src1 and src2 are doing, but if I remove them it doesn't work

Body:
This code is displays two keyboards and allows the user to click the one they prefer.
However it gives an error: "Error: Text content does not match server-rendered HTML.". I believe that this has to do with how I am changing which image is rendered but I don't know how to fix it

import Head from 'next/head'
import Image from 'next/image'
import Link from 'next/link'
import { Inter } from '@next/font/google'
import React, { useState } from 'react'

const inter = Inter({ subsets: ['latin'] })
const keebs: {name: string, votes: number, id: number}[]= [{name: "Hineybeige", votes: 0, id: 0}, {name: "Vamp", votes: 0, id: 1}, {name: "Fright Club Volume 1", votes: 0, id: 2}, {name: "Tenshi", votes: 0, id: 3}, {name: "Lilac on Black", votes: 0, id: 4}, {name: "Handarbeige", votes: 0, id: 5}, {name: "Darling", votes: 0, id: 6}, {name:"Olivia++", votes: 0, id: 7}]
let keyboard1 = keebs[Math.floor(Math.random()*8)]
  let keyboard2 = keebs[Math.floor(Math.random()*8)]
  while (keyboard1.name === keyboard2.name) {
    keyboard2 = keebs[Math.floor(Math.random()*8)]
  }

export default function Home() {

  const [src1, setSrc1] = useState("/" + keyboard1.name + ".jpg")
  const [src2, setSrc2] = useState("/" + keyboard2.name + ".jpg")

  const handleSubmit = (id: number) => {
    if (id === 1) {
      keebs[keyboard1.id].votes += 1
    }
    else if (id === 2) {
      keebs[keyboard2.id].votes += 1
    }

    keyboard1 = keebs[Math.floor(Math.random()*8)]
    keyboard2 = keebs[Math.floor(Math.random()*8)]
    while (keyboard1.name === keyboard2.name) {
      keyboard2 = keebs[Math.floor(Math.random()*8)]
    }

    setSrc1("/" + keyboard1.name + ".jpg")
    setSrc2("/" + keyboard2.name + ".jpg")
  }

  return (
    <>

        <title>Keycap Vote</title>
        <meta name="description" content="Generated by create next ap" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="icon" href="/favicon.ico" />

            Keycap Vote App

        <Link href="/api/auth/login">Login</Link>

{keyboard1.name}

{keyboard2.name}

          <button onClick={() => handleSubmit(1)} className="flex max-w-md flex-col gap-4 rounded-xl bg-white/10 p-4 text-white hover:bg-white/20">

<Image src={"/" + keyboard1.name + ".jpg"} alt="Keyboard1" layout="fill" className="rounded-xl" />

          </button>

          <button onClick={() => handleSubmit(2)} className="flex max-w-md flex-col gap-4 rounded-xl bg-white/10 p-4 text-white hover:bg-white/20">

<Image src={"/" + keyboard2.name + ".jpg"} alt="Keyboard2" layout="fill" className="rounded-xl" />

          </button>

{keyboard1.votes}

{keyboard2.votes}

    </>
  )
};

I also don't know what the usestate src1 and src2 are doing, but if I remove them it doesn't work


问:
CDK: How to use method to assign some value to member of object?
I have a class which create codepipeline project, since code pipeline project needs actions so I am trying to use the process of making action as a method in my class, however I get error as cannot read undefined properties.

Also if I dont use this method and try to use codebuildaction in my stack file it gives cyclic resource error.

my class definition

```<code>export class codeBuildProject extends cdk.Stack {
    public readonly project: codebuild.PipelineProject;
    public readonly action: codepipeline_actions.CodeBuildAction

    constructor(scope: Construct, id: string, props?: PipelineCodeBuildprops) {

        super(scope, id, props);

        this.project = new codebuild.PipelineProject(this, 'codebuild-project', {
            projectName: props!.projectName,
            description: props!.description, // a Bucket used as a source in CodePipeline must be versioned
            environment: {
                computeType: ComputeType.SMALL,
                buildImage: LinuxBuildImage.AMAZON_LINUX_2_4
            },
            buildSpec: props!.buildspec,
            role: props?.role
        });
    }

    createCodeBuildAction(actionName: string, input: cdk.aws_codepipeline.Artifact): codepipeline_actions.CodeBuildAction {
        this.action = new codepipeline_actions.CodeBuildAction({
            actionName: actionName,
            project: this.project,
            input: input
        });
       return this.action
    }
}
</code>```

my stack file

```<code>const TfDeploy = new codeBuildProject(this, 'tf-deploy', {
      projectName: 'tf-cicd-deploy',
      description: 'Deploy stage for pipeline',
      buildspec: codebuild.BuildSpec.fromObject(yaml.parse(fs.readFileSync('buildspec/apply-buildspec.yml', 'utf8'))),
      role: TfDeployRole
    })

    const TfDeployAction = TfDeploy.createCodeBuildAction('Deploy', sourceOutput)
</code>```

Body:
I have a class which create codepipeline project, since code pipeline project needs actions so I am trying to use the process of making action as a method in my class, however I get error as cannot read undefined properties.

Also if I dont use this method and try to use codebuildaction in my stack file it gives cyclic resource error.

my class definition

export class codeBuildProject extends cdk.Stack {
    public readonly project: codebuild.PipelineProject;
    public readonly action: codepipeline_actions.CodeBuildAction

    constructor(scope: Construct, id: string, props?: PipelineCodeBuildprops) {

        super(scope, id, props);

        this.project = new codebuild.PipelineProject(this, 'codebuild-project', {
            projectName: props!.projectName,
            description: props!.description, // a Bucket used as a source in CodePipeline must be versioned
            environment: {
                computeType: ComputeType.SMALL,
                buildImage: LinuxBuildImage.AMAZON_LINUX_2_4
            },
            buildSpec: props!.buildspec,
            role: props?.role
        });
    }

    createCodeBuildAction(actionName: string, input: cdk.aws_codepipeline.Artifact): codepipeline_actions.CodeBuildAction {
        this.action = new codepipeline_actions.CodeBuildAction({
            actionName: actionName,
            project: this.project,
            input: input
        });
       return this.action
    }
}

my stack file

const TfDeploy = new codeBuildProject(this, 'tf-deploy', {
      projectName: 'tf-cicd-deploy',
      description: 'Deploy stage for pipeline',
      buildspec: codebuild.BuildSpec.fromObject(yaml.parse(fs.readFileSync('buildspec/apply-buildspec.yml', 'utf8'))),
      role: TfDeployRole
    })

    const TfDeployAction = TfDeploy.createCodeBuildAction('Deploy', sourceOutput)


问:
Google Data Studio inserted images lost when duplicating report
I have recently inserted some images into a google data studio report using both image from computer and by url (on a public domain) as graphics to make it more visually appealing.

When we duplicate the report, all of the data sources are ok but the report looses the images. It looses them even if they are hosted on a public web server accessing by https://

When I click on the image, it shows the image url in the property tab, but on clicking the button with the url it asks to upload from computer.

Is there a way to have images in the report and be able to duplicate whilst not loosing the linkage or do i need to replace the images every time.

We have tried

Uploaded image from computer
hosted image on https:// publicly accessible domain
used embeded url object to images on https:// publicly accessible domain


问:
this website will not display properly and the text is a problem
So I have a school project due and my website will not display my text properly. Does anybody know the problem?

Here is the code

body {
  background-image: image();
}

* {
  box-sizing: border-box;
}

header {
  background-color: navy;
  padding: 34px;
}

.homestyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.concertstyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.sportstyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.Receptenstyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.Contactstyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.foto_zwolle {
  width: 150px;
  float: right;
}

.knopanimatie a::after {
  content: '';
  width: 0%;
  height: 2px;
  background: #fff;
  margin: auto;
  transition: 0.5s;
  display: block;
}

.knopanimatie a:hover::after {
  width: 100%;
}

.footer {
  color: white;
  font-family: 'Prompt', sans-serif;
  background-color: rgb(21, 108, 179);
  text-align: center;
  padding: 10px;
}

html,
body {
  height: 100%;
  margin: 0;
}

.wrapper {
  min-height: 0%;
  /* Equal to height of footer */
  /* But also accounting for potential margin-bottom of last child */
  margin-bottom: 0px;
  z-index: 10;
}

.sticky {
  top: 0;
  padding: 0px;
  font-size: 20px;
}

.grid-container {
  display: grid;
  grid-template-areas: 'header header header' 'zwolle zwolle zwolle' 'tekstlinks tekstmidden tekstrechts ' 'footer footer footer';
  gap: 10px;
  padding: 10px;
}

.tekstlinks {
  grid-area: tekstlinks;
  height: 100px;
  width: 360px;
  padding: 30px;
  padding-top: 0px;
  font-family: 'Prompt', sans-serif;
  display: inline-block;
}

.tekstmidden {
  grid-area: tekstmidden;
  height: 100px;
  display: inline-block;
  width: 360px;
  padding: 30px;
  padding-top: 0px;
  font-family: 'Prompt', sans-serif;
}

.zwolle {
  grid-area: zwolle;
  font-family: 'Prompt', sans-serif;
  padding: 30px;
}

.tekstrechts {
  grid-area: tekstrechts;
  font-family: 'Prompt', sans-serif;
  height: 100px;
  width: 360px;
  padding: 30px;
  padding-top: 0px;
  display: inline-block;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="stylejustin.css">
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Prompt:ital,wght@1,100&display=swap" rel="stylesheet">
  <title> Document </title>
</head>
<img class="foto_zwolle" src="logo_rechtop_klein.png" alt="tekst">

<body>
  <header>
    <div class="knopanimatie">
       Home
       Concerten
       Sport
       Recepten
       Contact
    </div>
  </header>
  <div class="grid-container">
    <div class="zwolle">
      <h1> Nieuws uit Zwolle </h1>
    </div>
    <div class="tekstlinks">
      <p> sapien et ligula ullamcorper. In aliquam sem fringilla ut morbius.</p>
    </div>
    <div class="tekstmidden">
      <img src="/mainPags/Zwolle+op+hoogte.jpg" width="250px" style="z-index: 20;">
      <p>
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
      </p>
      </p>
      <div class="tekstrechts">
        <p>
          In aliquam sem fringilla ut morbius.</p>
      </div>
    </div>
  </div>
  <div class="wrapper">

    <div class="push"></div>
  </div>
  <div class="sticky">
    <footer class="footer">
      <h3> Footer </h3>
      <p>Footerinfo</p>
      <p> infovanfooter </p>
    </footer>
  </div>

</body>

</html>

``````

Please note that some of this has been written in dutch, so don't pay attention to it. That is just my main language.

I tried messing with the padding, margin and even the gridbox but nothing helped. Please help me.

Body:
So I have a school project due and my website will not display my text properly. Does anybody know the problem?

Here is the code

body {
  background-image: image();
}

* {
  box-sizing: border-box;
}

header {
  background-color: navy;
  padding: 34px;
}

.homestyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.concertstyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.sportstyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.Receptenstyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.Contactstyle {
  margin: 5px;
  text-decoration: none;
  color: white;
  font-family: 'Prompt', sans-serif;
  float: left;
}

.foto_zwolle {
  width: 150px;
  float: right;
}

.knopanimatie a::after {
  content: '';
  width: 0%;
  height: 2px;
  background: #fff;
  margin: auto;
  transition: 0.5s;
  display: block;
}

.knopanimatie a:hover::after {
  width: 100%;
}

.footer {
  color: white;
  font-family: 'Prompt', sans-serif;
  background-color: rgb(21, 108, 179);
  text-align: center;
  padding: 10px;
}

html,
body {
  height: 100%;
  margin: 0;
}

.wrapper {
  min-height: 0%;
  /* Equal to height of footer */
  /* But also accounting for potential margin-bottom of last child */
  margin-bottom: 0px;
  z-index: 10;
}

.sticky {
  top: 0;
  padding: 0px;
  font-size: 20px;
}

.grid-container {
  display: grid;
  grid-template-areas: 'header header header' 'zwolle zwolle zwolle' 'tekstlinks tekstmidden tekstrechts ' 'footer footer footer';
  gap: 10px;
  padding: 10px;
}

.tekstlinks {
  grid-area: tekstlinks;
  height: 100px;
  width: 360px;
  padding: 30px;
  padding-top: 0px;
  font-family: 'Prompt', sans-serif;
  display: inline-block;
}

.tekstmidden {
  grid-area: tekstmidden;
  height: 100px;
  display: inline-block;
  width: 360px;
  padding: 30px;
  padding-top: 0px;
  font-family: 'Prompt', sans-serif;
}

.zwolle {
  grid-area: zwolle;
  font-family: 'Prompt', sans-serif;
  padding: 30px;
}

.tekstrechts {
  grid-area: tekstrechts;
  font-family: 'Prompt', sans-serif;
  height: 100px;
  width: 360px;
  padding: 30px;
  padding-top: 0px;
  display: inline-block;
}

  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="stylejustin.css">
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Prompt:ital,wght@1,100&display=swap" rel="stylesheet">
  <title> Document </title>

       Home
       Concerten
       Sport
       Recepten
       Contact

 Nieuws uit Zwolle

 sapien et ligula ullamcorper. In aliquam sem fringilla ut morbius.

        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

          In aliquam sem fringilla ut morbius.

 Footer

Footerinfo

 infovanfooter

```

Please note that some of this has been written in dutch, so don't pay attention to it. That is just my main language.

I tried messing with the padding, margin and even the gridbox but nothing helped. Please help me.


问:
Why wildcards doest work properly in logstash
im using this file input to read logs from

logpath/sisi/$STAGE

logpath/sisigeo/$STAGE

```<code>  file {
    path => "@@@logpath@@@/sis*/@@@stage@@@/monitoring/*.log"
</code>```

The wildcard

sisi*

doesnt work. so im using

sis*

instead.

My understanding of wildcard (*) is none or more characters are following (bash like), but in logstash this is not true, bug or feature or something else ?

Body:
im using this file input to read logs from

logpath/sisi/$STAGE

logpath/sisigeo/$STAGE

  file {
    path => "@@@logpath@@@/sis*/@@@stage@@@/monitoring/*.log"

The wildcard

sisi*

doesnt work. so im using

sis*

instead.

My understanding of wildcard (*) is none or more characters are following (bash like), but in logstash this is not true, bug or feature or something else ?


问:
GOT package: RequestError: The body option must be a stream.Readable, string or Buffer
I am getting this error while trying to hit the POST and PUT APIs using GOT package in Node.Js (for external API calling).

I am using Got@11.8.6 with Node.js version 16.18.1 in Windows 10 OS.

Code Snippet

```<code>const gotObject = { method: 'POST', json: true, body: reqBodyObj, headers: reqHeader, };
const apiResponse = await got(microserviceUrl, gotObject);
</code>```

Error Stack

```<code>2022-12-19T11:38:44.708Z - error: [D:\Projects\NodeJs\gateway\src\services\microservice.ts] callService  at Request._destroy (D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:1386:21) at _destroy (node:internal/streams/destroy:102:25) at Request.destroy (node:internal/streams/destroy:64:5) at D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:354:26 at processTicksAndRejections (node:internal/process/task_queues:96:5) at Request._finalizeBody (D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:726:23)        at D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:333:28 at new Request (D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:357:11) at makeRequest (D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\as-promise\index.js:35:29)
</code>```

Body:
I am getting this error while trying to hit the POST and PUT APIs using GOT package in Node.Js (for external API calling).

I am using Got@11.8.6 with Node.js version 16.18.1 in Windows 10 OS.

Code Snippet

const gotObject = { method: 'POST', json: true, body: reqBodyObj, headers: reqHeader, };
const apiResponse = await got(microserviceUrl, gotObject);

Error Stack

2022-12-19T11:38:44.708Z - error: [D:\Projects\NodeJs\gateway\src\services\microservice.ts] callService  at Request._destroy (D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:1386:21) at _destroy (node:internal/streams/destroy:102:25) at Request.destroy (node:internal/streams/destroy:64:5) at D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:354:26 at processTicksAndRejections (node:internal/process/task_queues:96:5) at Request._finalizeBody (D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:726:23)        at D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:333:28 at new Request (D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\core\index.js:357:11) at makeRequest (D:\Projects\NodeJs\node-api-gateway\node_modules\got\dist\source\as-promise\index.js:35:29)


问:
Changing tagline from
 to
 in wordpress
On my website (woocommerce) I noticed that my tagline (site description, appears in the header on all pages) is a
 tag. I noticed that by doing 'inspect' in google. This is a problem because my website is therefore not properly indexed and the snippet is not right on google search.
How can I change the tagline to H1? Is there a function I can write in the functions.php file?

I tried to change it in the settings of my theme but there isn't anything possible on that side.

Title: Changing tagline from <p> to <h1> in wordpress


问:
DSpace 7 embedding java script code in untyped-item.component.html
I know bootstrap but I don't know angular. The system (DSpace 7) I am dealing with was completely rebuilt using "angular". The problem is that I don't know how to embed the java script, because when I add the code directly to untyped-item.component.html, nothing is displayed.

JavaScript

```<code><!-- AddToAny BEGIN -->
<div class="a2a_kit a2a_kit_size_32 a2a_default_style">
<a class="a2a_dd" href="https://www.addtoany.com/share"></a>
<a class="a2a_button_facebook"></a>
<a class="a2a_button_twitter"></a>
<a class="a2a_button_email"></a>
</div>
<script async src="https://static.addtoany.com/menu/page.js"></script>
<!-- AddToAny END -->
</code>```

untyped-item.component.html:

```<code><div class="row" *ngIf="iiifEnabled">
  <div class="col-12">
    <ds-mirador-viewer id="iiif-viewer"
                   [object]="object"
                   [searchable]="iiifSearchEnabled"
                   [query]="iiifQuery$ | async">
    </ds-mirador-viewer>
  </div>
</div>
<div class="d-flex flex-row">
  <ds-item-page-title-field [item]="object" class="mr-auto">
  </ds-item-page-title-field>
  <div class="pl-2 space-children-mr">
    <ds-dso-page-version-button (newVersionEvent)="onCreateNewVersion()" [dso]="object"
                                [tooltipMsgCreate]="'item.page.version.create'"
                                [tooltipMsgHasDraft]="'item.page.version.hasDraft'"></ds-dso-page-version-button>
    <ds-dso-page-edit-button [pageRoute]="itemPageRoute" [dso]="object" [tooltipMsg]="'item.page.edit'"></ds-dso-page-edit-button>
  </div>
</div>
<div class="row">
  <div class="col-xs-12 col-md-4">
    <ng-container *ngIf="!mediaViewer.image">
      <ds-metadata-field-wrapper [hideIfNoTextContent]="false">
        <ds-thumbnail [thumbnail]="object?.thumbnail | async"></ds-thumbnail>
      </ds-metadata-field-wrapper>
    </ng-container>
    <ng-container *ngIf="mediaViewer.image">
      <ds-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-media-viewer>
    </ng-container>
    <span>**JAVA SCRIPT HERE**</span>
<ds-themed-item-page-file-section [item]="object"></ds-themed-item-page-file-section>
    <ds-item-page-date-field [item]="object"></ds-item-page-date-field>
    <ds-metadata-representation-list class="ds-item-page-mixed-author-field"
      [parentItem]="object"
      [itemType]="'Person'"
      [metadataFields]="['dc.contributor.author', 'dc.creator']"
      [label]="'relationships.isAuthorOf' | translate">
    </ds-metadata-representation-list>
    <ds-generic-item-page-field [item]="object"
      [fields]="['journal.title']"
      [label]="'item.page.journal-title'">
    </ds-generic-item-page-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['journal.identifier.issn']"
      [label]="'item.page.journal-issn'">
    </ds-generic-item-page-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['journalvolume.identifier.name']"
      [label]="'item.page.volume-title'">
    </ds-generic-item-page-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['dc.publisher']"
      [label]="'item.page.publisher'">
    </ds-generic-item-page-field>
  </div>
  <div class="col-xs-12 col-md-6">
    <ds-item-page-abstract-field [item]="object"></ds-item-page-abstract-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['dc.description']"
      [label]="'item.page.description'">
    </ds-generic-item-page-field>

    <ds-generic-item-page-field [item]="object"
      [fields]="['dc.subject']"
      [separator]="','"
      [label]="'item.page.subject'">
    </ds-generic-item-page-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['dc.identifier.citation']"
      [label]="'item.page.citation'">
    </ds-generic-item-page-field>
    <ds-item-page-uri-field [item]="object"
      [fields]="['dc.identifier.uri']"
      [label]="'item.page.uri'">
    </ds-item-page-uri-field>
    <ds-item-page-collections [item]="object"></ds-item-page-collections>
    <div>
      <a class="btn btn-outline-primary" [routerLink]="[itemPageRoute + '/full']" role="button">
        <i class="fas fa-info-circle"></i> {{"item.page.link.full" | translate}}
      </a>
    </div>
  </div>
</div>
</code>```

untyped-item.component.ts:

```<code>
        import { ChangeDetectionStrategy, Component } from '@angular/core';
    import { Item } from '../../../../core/shared/item.model';
    import { ViewMode } from '../../../../core/shared/view-mode.model';
    import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator';
    import { VersionedItemComponent } from '../versioned-item/versioned-item.component';

    /**
     * Component that represents a publication Item page
     */

    @listableObjectComponent(Item, ViewMode.StandalonePage)
    @Component({
      selector: 'ds-untyped-item',
      styleUrls: ['./untyped-item.component.scss'],
      templateUrl: './untyped-item.component.html',
      changeDetection: ChangeDetectionStrategy.OnPush,
    })
    export class UntypedItemComponent extends VersionedItemComponent {

    }
</code>```

What should I add to the file untyped-item.component.ts to make the javascript display?

Thanks,

Karol

Body:
I know bootstrap but I don't know angular. The system (DSpace 7) I am dealing with was completely rebuilt using "angular". The problem is that I don't know how to embed the java script, because when I add the code directly to untyped-item.component.html, nothing is displayed.

JavaScript

untyped-item.component.html:

    <ds-mirador-viewer id="iiif-viewer"
                   [object]="object"
                   [searchable]="iiifSearchEnabled"
                   [query]="iiifQuery$ | async">
    </ds-mirador-viewer>

  <ds-item-page-title-field [item]="object" class="mr-auto">
  </ds-item-page-title-field>

    <ds-dso-page-version-button (newVersionEvent)="onCreateNewVersion()" [dso]="object"
                                [tooltipMsgCreate]="'item.page.version.create'"
                                [tooltipMsgHasDraft]="'item.page.version.hasDraft'"></ds-dso-page-version-button>
    <ds-dso-page-edit-button [pageRoute]="itemPageRoute" [dso]="object" [tooltipMsg]="'item.page.edit'"></ds-dso-page-edit-button>

    <ng-container *ngIf="!mediaViewer.image">
      <ds-metadata-field-wrapper [hideIfNoTextContent]="false">
        <ds-thumbnail [thumbnail]="object?.thumbnail | async"></ds-thumbnail>
      </ds-metadata-field-wrapper>
    </ng-container>
    <ng-container *ngIf="mediaViewer.image">
      <ds-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-media-viewer>
    </ng-container>
    **JAVA SCRIPT HERE**
<ds-themed-item-page-file-section [item]="object"></ds-themed-item-page-file-section>
    <ds-item-page-date-field [item]="object"></ds-item-page-date-field>
    <ds-metadata-representation-list class="ds-item-page-mixed-author-field"
      [parentItem]="object"
      [itemType]="'Person'"
      [metadataFields]="['dc.contributor.author', 'dc.creator']"
      [label]="'relationships.isAuthorOf' | translate">
    </ds-metadata-representation-list>
    <ds-generic-item-page-field [item]="object"
      [fields]="['journal.title']"
      [label]="'item.page.journal-title'">
    </ds-generic-item-page-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['journal.identifier.issn']"
      [label]="'item.page.journal-issn'">
    </ds-generic-item-page-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['journalvolume.identifier.name']"
      [label]="'item.page.volume-title'">
    </ds-generic-item-page-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['dc.publisher']"
      [label]="'item.page.publisher'">
    </ds-generic-item-page-field>

    <ds-item-page-abstract-field [item]="object"></ds-item-page-abstract-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['dc.description']"
      [label]="'item.page.description'">
    </ds-generic-item-page-field>

    <ds-generic-item-page-field [item]="object"
      [fields]="['dc.subject']"
      [separator]="','"
      [label]="'item.page.subject'">
    </ds-generic-item-page-field>
    <ds-generic-item-page-field [item]="object"
      [fields]="['dc.identifier.citation']"
      [label]="'item.page.citation'">
    </ds-generic-item-page-field>
    <ds-item-page-uri-field [item]="object"
      [fields]="['dc.identifier.uri']"
      [label]="'item.page.uri'">
    </ds-item-page-uri-field>
    <ds-item-page-collections [item]="object"></ds-item-page-collections>

         {{"item.page.link.full" | translate}}

untyped-item.component.ts:

        import { ChangeDetectionStrategy, Component } from '@angular/core';
    import { Item } from '../../../../core/shared/item.model';
    import { ViewMode } from '../../../../core/shared/view-mode.model';
    import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator';
    import { VersionedItemComponent } from '../versioned-item/versioned-item.component';

    /**
     * Component that represents a publication Item page
     */

    @listableObjectComponent(Item, ViewMode.StandalonePage)
    @Component({
      selector: 'ds-untyped-item',
      styleUrls: ['./untyped-item.component.scss'],
      templateUrl: './untyped-item.component.html',
      changeDetection: ChangeDetectionStrategy.OnPush,
    })
    export class UntypedItemComponent extends VersionedItemComponent {

    }

What should I add to the file untyped-item.component.ts to make the javascript display?

Thanks,

Karol


问:
Detect if Expedited is OutOfQuota for WorkManager Android
When use WorkManager with one of these:

```<code>.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)
.setExpedited(OutOfQuotaPolicy.DROP_WORK_REQUEST)
</code>```

At this time, I want to detect if the device could not run as expedited. Is it possible to Try-catch or any other ways to detect when OutOfQuota?

Thank you.

Body:
When use WorkManager with one of these:

.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)
.setExpedited(OutOfQuotaPolicy.DROP_WORK_REQUEST)

At this time, I want to detect if the device could not run as expedited. Is it possible to Try-catch or any other ways to detect when OutOfQuota?

Thank you.