问:
Status 500, SPRINGBOOT/IntelliJ why?
I try for a couple of hours now, but I can't make it work every time is status 500.
Here are the files.
I want to fetch from my PHPMyAdmin database but it always status 500.
maybe the versions in the dependencies of pom.xml?
or de application.properties? app.properties don't recognize the props so I have to # suppress inspection "UnusedProperty" on them

```<code>/*UsuarioDataBase.Java*/

@Repository
@Transactional
public class UsuarioDaoImp implements UsuarioDao{

    @PersistenceContext
    EntityManager entityManager;

    @Override
    public List<Usuario> getUsuarios() {
        String query = "FROM Usuario";
        return entityManager.createQuery(query).getResultList();
    }
}

</code>```
```<code>/*usuarioController.Java*/

@RequestMapping(value = "usuarios")
    public List<Usuario> getUsuarios(){
        return usuarioDao.getUsuarios();
    }
</code>```
```<code>
/*the fetch: usuarios.js:*/

$(document).ready(function() {
    cargarUsuarios();
  $('#usuarios').DataTable();
});

async function cargarUsuarios(){
    const request = await fetch('usuarios', {
        method: 'GET',
        headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json'
        }
    });
    const usuarios = await request.json();
</code>```

application.properties:
i have to write the suprpress inspection because the file dont recognize the propperties i dont know why

```<code># GENERAL
server.port=8080
# suppress inspection "UnusedProperty"
spring.datasource.url=jdbc:mysql://localhost/cursojava?useSSL=false
# suppress inspection "UnusedProperty"
spring.datasource.dbname=cursojava
# suppress inspection "UnusedProperty"
spring.datasource.username=root
spring.datasource.password=
# suppress inspection "UnusedProperty"
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
</code>```
```<code>/*pom.xml*/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.1</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.cursojava</groupId>
    <artifactId>curso</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>curso</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>17</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>6.0.2</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.20</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>javax.persistence-api</artifactId>
            <version>2.2</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.19</version>
            <scope>runtime</scope>
        </dependency>
</dependencies>
</code>```

Title: Status 500, SPRINGBOOT/IntelliJ why?

Body:
I try for a couple of hours now, but I can't make it work every time is status 500.
Here are the files.
I want to fetch from my PHPMyAdmin database but it always status 500.
maybe the versions in the dependencies of pom.xml?
or de application.properties? app.properties don't recognize the props so I have to # suppress inspection "UnusedProperty" on them

/*UsuarioDataBase.Java*/

@Repository
@Transactional
public class UsuarioDaoImp implements UsuarioDao{

    @PersistenceContext
    EntityManager entityManager;

    @Override
    public List<Usuario> getUsuarios() {
        String query = "FROM Usuario";
        return entityManager.createQuery(query).getResultList();
    }
}

/*usuarioController.Java*/

@RequestMapping(value = "usuarios")
    public List<Usuario> getUsuarios(){
        return usuarioDao.getUsuarios();
    }

/*the fetch: usuarios.js:*/

$(document).ready(function() {
    cargarUsuarios();
  $('#usuarios').DataTable();
});

async function cargarUsuarios(){
    const request = await fetch('usuarios', {
        method: 'GET',
        headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json'
        }
    });
    const usuarios = await request.json();

application.properties:
i have to write the suprpress inspection because the file dont recognize the propperties i dont know why

# GENERAL
server.port=8080
# suppress inspection "UnusedProperty"
spring.datasource.url=jdbc:mysql://localhost/cursojava?useSSL=false
# suppress inspection "UnusedProperty"
spring.datasource.dbname=cursojava
# suppress inspection "UnusedProperty"
spring.datasource.username=root
spring.datasource.password=
# suppress inspection "UnusedProperty"
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

/*pom.xml*/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.1</version>
        <relativePath/>
    </parent>
    <groupId>com.cursojava</groupId>
    <artifactId>curso</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>curso</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>17</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>6.0.2</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.20</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>javax.persistence-api</artifactId>
            <version>2.2</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.19</version>
            <scope>runtime</scope>
        </dependency>
</dependencies>


来源: stackexchange

问:
Some Spark Jobs failing when executing several with oozie
I have a oozie workflow with 17 concurrent spark actions. They execute the same program but with different input parameters.
The problem is that some of them is successful but another portion of them fails with the following error:

```<code>ERROR org.apache.spark.deploy.yarn.ApplicationMaster - RECEIVED SIGNAL TERM
</code>```

or

```<code>Spark Error : executor.CoarseGrainedExecutorBackend: RECEIVED SIGNAL TERM
</code>```

Here is a snippet of my workflow:

```<code><workflow-app xmlns = "uri:oozie:workflow:0.5" name = "PySpark-Deequ">

   <!--Step 0 - Forking -->

   <start to = "forking" />

   <fork name="forking">
      <path start="eim_t113_ente_cf"/>
      ...
   </fork>

   <!--Step 1 -->

   <action name = "eim_t113_ente_cf">
      <spark xmlns = "uri:oozie:spark-action:0.1">
         <job-tracker>${JOB_TRACKER}</job-tracker>
         <name-node>${NAMENODE}</name-node>
         <job-xml>hive-site.xml</job-xml>
         <master>yarn-cluster</master>
         <name>Prova-Deequ1</name>
         <jar>executeDeequ.py</jar>
         <spark-opts>
                        --driver-memory 8G
                        --num-executors 8
                        --executor-cores 8
                        --executor-memory 8G
                        --conf spark.dynamicAllocation.enabled=false
                        --principal ...
                        --keytab ...
                        --files /etc/hive/conf/hive-site.xml
         </spark-opts>
         <arg>${MONGO_URL}</arg>
         <arg>${MONGO_DB}</arg>
         <arg>${OUTPUT_HIVE_DB}</arg>
         <arg>${DO_CHECKS}</arg>
         <arg>${DO_ANALYZERS}</arg>
         <arg>${CHECKS_MONGO_COLLECTION}</arg>
         <arg>${ANALYZERS_MONGO_COLLECTION}</arg>
         <arg>${HDFS_URL}</arg>
         <arg>${ANALYSIS_RESULT_PATH}</arg>
         <arg>${CHECK_RESULT_PATH}</arg>
         <arg>${CREATE_ANALYZERS_TABLE_QUERY}</arg>
         <arg>${CREATE_CHECKS_TABLE_QUERY}</arg>
         <arg>${HIVE_TABLE_1}</arg>
         <arg>${HIVE_DB_1}</arg>
         <arg>${ORIGIN_1}</arg>
         <arg>${ENTITY_1}</arg>
      </spark>

      <ok to = "joining" />
      <error to = "kill_job" />
   </action>

   ...

   <!--Final Step - Joining -->

   <join name="joining" to = "end"/>

   <kill name = "kill_job">
      <message>Job failed</message>
   </kill>

   <end name = "end" />

</workflow-app>
</code>```

Can anyone help me? I think it is something related to memory management but I was not able to find a solution. I also tried changing resources but it didn't work.
Thank you.

ContentLicense: CC BY-SA 4.0

Body:
I have a oozie workflow with 17 concurrent spark actions. They execute the same program but with different input parameters.
The problem is that some of them is successful but another portion of them fails with the following error:

ERROR org.apache.spark.deploy.yarn.ApplicationMaster - RECEIVED SIGNAL TERM

or

Spark Error : executor.CoarseGrainedExecutorBackend: RECEIVED SIGNAL TERM

Here is a snippet of my workflow:

<workflow-app xmlns = "uri:oozie:workflow:0.5" name = "PySpark-Deequ">

   <start to = "forking" />

   <fork name="forking">
      <path start="eim_t113_ente_cf"/>
      ...
   </fork>

   <action name = "eim_t113_ente_cf">
      <spark xmlns = "uri:oozie:spark-action:0.1">
         <job-tracker>${JOB_TRACKER}</job-tracker>
         <name-node>${NAMENODE}</name-node>
         <job-xml>hive-site.xml</job-xml>
         <master>yarn-cluster</master>
         <name>Prova-Deequ1</name>
         <jar>executeDeequ.py</jar>
         <spark-opts>
                        --driver-memory 8G
                        --num-executors 8
                        --executor-cores 8
                        --executor-memory 8G
                        --conf spark.dynamicAllocation.enabled=false
                        --principal ...
                        --keytab ...
                        --files /etc/hive/conf/hive-site.xml
         </spark-opts>
         <arg>${MONGO_URL}</arg>
         <arg>${MONGO_DB}</arg>
         <arg>${OUTPUT_HIVE_DB}</arg>
         <arg>${DO_CHECKS}</arg>
         <arg>${DO_ANALYZERS}</arg>
         <arg>${CHECKS_MONGO_COLLECTION}</arg>
         <arg>${ANALYZERS_MONGO_COLLECTION}</arg>
         <arg>${HDFS_URL}</arg>
         <arg>${ANALYSIS_RESULT_PATH}</arg>
         <arg>${CHECK_RESULT_PATH}</arg>
         <arg>${CREATE_ANALYZERS_TABLE_QUERY}</arg>
         <arg>${CREATE_CHECKS_TABLE_QUERY}</arg>
         <arg>${HIVE_TABLE_1}</arg>
         <arg>${HIVE_DB_1}</arg>
         <arg>${ORIGIN_1}</arg>
         <arg>${ENTITY_1}</arg>
      </spark>

      <ok to = "joining" />
      <error to = "kill_job" />
   </action>

   ...

   <join name="joining" to = "end"/>

   <kill name = "kill_job">
      <message>Job failed</message>
   </kill>

   <end name = "end" />

</workflow-app>

Can anyone help me? I think it is something related to memory management but I was not able to find a solution. I also tried changing resources but it didn't work.
Thank you.


问:
How to style input type number arrow down and arrow up button for cross browser, with pure css?
I want customize the style of input type number arrow up and down button with pure css. I could not find any solution over internet besides one solution as below.

```<code>input[type=number]::-webkit-inner-spin-button {
  width: 40px;
  height: 40px;
}
</code>```

this above code not supported by Mozilla Firefox and it wont have full compatibility to customize the arrow buttons.

I try it

```<code>input[type=number]::-webkit-inner-spin-button {
  width: 40px;
  height: 40px;
}
</code>```

but not full customizable

Body:
I want customize the style of input type number arrow up and down button with pure css. I could not find any solution over internet besides one solution as below.

input[type=number]::-webkit-inner-spin-button {
  width: 40px;
  height: 40px;
}

this above code not supported by Mozilla Firefox and it wont have full compatibility to customize the arrow buttons.

I try it

input[type=number]::-webkit-inner-spin-button {
  width: 40px;
  height: 40px;
}

but not full customizable


问:
How can I get the Html elements in this code to behave as expected?
I have this laravel app where I converted the blade files to vue.js files. I got this to work except that I couldn't get the navigation section on the vue file to display.

This is the code of the blade layout file:

```<code><!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="SmartWealth helps you take charge of your financial well being by making it easy to save and invest towards meeting your life-stage goals.">
    <meta name="keywords" content="smartwealth,finance,personal finance,fintech,investment,save,stock market">
    <meta name="google-site-verification" content="kI2nwnIamrPbcAFSVICnnFmdJQxOZc2b7jvftnChRME" />

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="{{ asset('css/style.css') }}">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:700|Quicksand" rel="stylesheet">
    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
    <link rel="shortcut icon" type="image/x-icon" href="{{ asset('img/favicon.png') }}">

    <title>SmartWealth: {{ $title }}</title>
  </head>
    <body>

        <nav class="navbar navbar-expand-lg navbar-light t-navbar fixed-top">
          <a class="navbar-brand" href="{{ route('index') }}"><img src="{{ asset('img/logo.svg') }}" class="logo"></a>
          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
          </button>
          <div class="collapse navbar-collapse" id="navbarNavDropdown">
            <ul class="navbar-nav ml-auto">
              <li class="nav-item {{ Request::is('/') ? 'active' : '' }}">
                  <a class="nav-link" href="{{ route('index') }}">Home</a>
              </li>
              <li class="nav-item {{ Request::is('howitworks') ? 'active' : '' }}">
                <a class="nav-link" href="{{ route('howitworks') }}">How It Works</a>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="https://app.smartwealthadvisors.com/getstarted">Risk Assessment</a>
              </li>
              <li class="nav-item {{ Request::is('resources') ? 'active' : '' }}">
                <a class="nav-link" href="{{ route('resources') }}">Resources</a>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="https://app.smartwealthadvisors.com">Login</a>
              </li>
            </ul>
          </div>
        </nav>

        @yield('content')

    <footer class="bg-footer">
          <div class="container ptop-m pbtm-s">
            <div class="row">
              <div class="col-lg-3 col-md-6  ptop-s">
                <img src="img/logo-g.svg" style="height: 5rem;">
                <div class="ptop-s">
                  <a href="https://www.facebook.com/Smartwealthng/"><span class="social"><i class="fa fa-facebook-f fa-lg"></i></span></a>
                  <a href="https://twitter.com/smartwealthng"><span class="social"><i class="fa fa-twitter fa-lg"></i></span></a>
                  <a href="https://www.instagram.com/smartwealthng/"><span class="social"><i class="fa fa-instagram fa-lg"></i></span></a>
                  <a href="https://www.linkedin.com/company/smartwealth-advisors"><span class="social"><i class="fa fa-linkedin fa-lg"></i></span></a>
              </div>
              </div>
              <div class="col-lg-3 col-md-6 ptop-s">
                <h4>Company</h4>
                  <li><a href="{{ route('about') }}">About SmartWealth</a></li>
                  <li><a href="{{ route('investmentapproach') }}">Investment Approach</a></li>
                  <li><a href="{{ route('purposefulcapitalism') }}">Purposeful Capitalism</a></li>
                  <li><a href="{{ route('pricing') }}">Pricing</a></li>
              </div>
              <div class="col-lg-3 col-md-6 ptop-s">
                <h4>Legal</h4>
                  <li><a href="{{ route('privacy') }}">Privacy Policy</a></li>
                  <li><a href="{{ route('terms') }}">Terms of Service</a></li>
              </div>
              <div class="col-lg-3 col-md-6 ptop-s">
                <h4>Contact</h4>
                  <li>Plot 19B, Block 3, Crospil Estate, Anansa Road, Calabar, Cross River State.</li>
                  <li>+234 8033587748</li>
                  <p>connect@smartwealthadvisors.com</p>
              </div>
          </div>
          <hr>
          <h6>Disclosure</h6>
          <p>
              SmartWealth is subject to an Investment Advisory Agreement
              (IAA) and designed primarily for long-term investors. Investing involve risks, including the possible loss of your capital. You should
              not enter into any transactions unless you have fully understood all such risks and have independently determined that such
              transactions are appropriate for you. Any discussion of the risks contained herein with respect to any security should not be
              considered to be a disclosure of all risks or complete discussion of the risks which are mentioned. Past performance does not
              guarantee future returns. Historical and expected returns projections are provided for informational and illustrative purposes
              and may not reflect actual future performances.
          </p>
          <p>
              SmartWealth is a web-based service designed to assist clients in achieving discrete financial goals. It is not intended to
              provide comprehensive tax advice or financial planning with respect to every aspect of a client's financial situation and do not
              incorporate specific investments that clients hold elsewhere. You should not construe any of the material contained herein as
              comprehensive business, hedging, legal, regulatory, tax, or accounting advice and you may want to consult your business advisor,
              attorney, and tax and accounting advisors concerning any such contemplated transactions. See Terms of Service for full disclosures.
          </p>
          <p class="ptop-m">
            © Ifriqiya Limited <?php echo date('Y') ?>. All rights reserved.
          </p>
          </div>
        </footer>
    <!-- Scripts -->
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>

</body>
</html>

</code>```

It gives this result

It works for mobile also

This the code after I converted to vue:

```<code><template>
  <div>
    <Head :title="title" />
    <!-- Page Heading -->
    <nav class="navbar navbar-expand-lg navbar-light t-navbar fixed-top">
      <Link class="navbar-brand" :href="route('welcome')">
        <img src="img/logo.svg" class="logo" />
      </Link>
      <button
        class="navbar-toggler"
        type="button"
        data-toggle="collapse"
        data-target="#navbarNavDropdown"
        aria-controls="navbarNavDropdown"
        aria-expanded="false"
        aria-label="Toggle navigation"
      >
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarNavDropdown">
        <ul class="navbar-nav ml-auto">
          <li class="nav-item">
            <Link
              class="nav-link"
              :href="route('welcome')"
              :class="{ active: $page.url === '/' }"
              >Home</Link
            >
          </li>
          <li class="nav-item">
            <Link
              class="nav-link"
              :href="route('howitworks')"
              :class="{ active: $page.url === '/howitworks' }"
              >How It Works</Link
            >
          </li>
          <li class="nav-item">
            <Link class="nav-link" :href="route('register')">Register</Link>
          </li>
          <li class="nav-item">
            <Link
              class="nav-link"
              :href="route('resources')"
              :class="{ active: $page.url === '/resources' }"
              >Resources</Link
            >
          </li>
          <li class="nav-item">
            <Link class="nav-link" :href="route('login')">Login</Link>
          </li>
        </ul>
      </div>
    </nav>

    <!-- Page Content -->
    <main>
      <slot></slot>
    </main>

    <!-- Page Footer -->
    <footer class="bg-footer">
      <div class="container ptop-m pbtm-s">
        <div class="row">
          <div class="col-lg-3 col-md-6 ptop-s">
            <img src="img/logo-g.svg" style="height: 5rem" />
            <div class="ptop-s">
              <a href="https://www.facebook.com/Smartwealthng/"
                ><span class="social"><i class="fa fa-facebook-f fa-lg"></i></span
              ></a>
              <a href="https://twitter.com/smartwealthng"
                ><span class="social"><i class="fa fa-twitter fa-lg"></i></span
              ></a>
              <a href="https://www.instagram.com/smartwealthng/"
                ><span class="social"><i class="fa fa-instagram fa-lg"></i></span
              ></a>
              <a href="https://www.linkedin.com/company/smartwealth-advisors"
                ><span class="social"><i class="fa fa-linkedin fa-lg"></i></span
              ></a>
            </div>
          </div>
          <div class="col-lg-3 col-md-6 ptop-s">
            <h4>Company</h4>
            <li>
              <Link :href="route('about')">About SmartWealth</Link>
            </li>
            <li>
              <Link :href="route('investmentapproach')">Investment Approach</Link>
            </li>
            <li>
              <Link :href="route('purposefulcapitalism')">Purposeful Capitalism</Link>
            </li>
            <li>
              <Link :href="route('pricing')">Pricing</Link>
            </li>
          </div>
          <div class="col-lg-3 col-md-6 ptop-s">
            <h4>Legal</h4>
            <li>
              <Link :href="route('policy')">Privacy Policy</Link>
            </li>
            <li>
              <Link :href="route('terms')">Terms of Service</Link>
            </li>
          </div>
          <div class="col-lg-3 col-md-6 ptop-s">
            <h4>Contact</h4>
            <li>
              Plot 19B, Block 3, Crospil Estate, Anansa Road, Calabar, Cross River State.
            </li>
            <li>+234 8033587748</li>
            <p>connect@smartwealthadvisors.com</p>
          </div>
        </div>
        <hr />
        <h6>Disclosure</h6>
        <p>
          SmartWealth is subject to an Investment Advisory Agreement (IAA) and designed
          primarily for long-term investors. Investing involve risks, including the
          possible loss of your capital. You should not enter into any transactions unless
          you have fully understood all such risks and have independently determined that
          such transactions are appropriate for you. Any discussion of the risks contained
          herein with respect to any security should not be considered to be a disclosure
          of all risks or complete discussion of the risks which are mentioned. Past
          performance does not guarantee future returns. Historical and expected returns
          projections are provided for informational and illustrative purposes and may not
          reflect actual future performances.
        </p>
        <p>
          SmartWealth is a web-based service designed to assist clients in achieving
          discrete financial goals. It is not intended to provide comprehensive tax advice
          or financial planning with respect to every aspect of a client's financial
          situation and do not incorporate specific investments that clients hold
          elsewhere. You should not construe any of the material contained herein as
          comprehensive business, hedging, legal, regulatory, tax, or accounting advice
          and you may want to consult your business advisor, attorney, and tax and
          accounting advisors concerning any such contemplated transactions. See Terms of
          Service for full disclosures.
        </p>
        <p class="ptop-m">
          © Ifriqiya Limited {{ currentYear }}. All rights reserved.
        </p>
      </div>
    </footer>
  </div>
</template>

<script setup>
import { Head, Link } from "@inertiajs/inertia-vue3"
import { computed, onMounted } from "vue"
import "/public/css/styles.css"

defineProps({
  title: String,
  currentYear: String
})

const currentYear = computed(() => {
  return new Date().getFullYear()
})

const scripts = [
  "https://code.jquery.com/jquery-3.3.1.slim.min.js",
  "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js",
  "https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
]

onMounted(() => {
  let index = 0
  function loadNextScript() {
    if (index >= scripts.length) return

    let script = scripts[index]
    let tag = document.createElement("script")
    tag.setAttribute("src", script)
    tag.setAttribute("async", true)
    tag.onload = loadNextScript
    document.head.appendChild(tag)

    index++
  }
  loadNextScript()
})
</script>

<style scoped>
@import "https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css";
@import "https://fonts.googleapis.com/css?family=Open+Sans:700|Quicksand:400";
@import "https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css";
#navbarNavDropdown li a.active {
  color: #3869d4;
}
</style>

</code>```

Page works except the navigation section which is blank:

It doesn't work on mobile either

What can I do to resolve this?

Body:
I have this laravel app where I converted the blade files to vue.js files. I got this to work except that I couldn't get the navigation section on the vue file to display.

This is the code of the blade layout file:

<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="SmartWealth helps you take charge of your financial well being by making it easy to save and invest towards meeting your life-stage goals.">
    <meta name="keywords" content="smartwealth,finance,personal finance,fintech,investment,save,stock market">
    <meta name="google-site-verification" content="kI2nwnIamrPbcAFSVICnnFmdJQxOZc2b7jvftnChRME" />

    <link rel="stylesheet" href="{{ asset('css/style.css') }}">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:700|Quicksand" rel="stylesheet">
    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
    <link rel="shortcut icon" type="image/x-icon" href="{{ asset('img/favicon.png') }}">

    <title>SmartWealth: {{ $title }}</title>

          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">

          </button>

                  Home

                How It Works

                Risk Assessment

                Resources

                Login

        @yield('content')

Company

About SmartWealth

Investment Approach

Purposeful Capitalism

Pricing

Legal

Privacy Policy

Terms of Service

Contact

Plot 19B, Block 3, Crospil Estate, Anansa Road, Calabar, Cross River State.

+234 8033587748

connect@smartwealthadvisors.com

Disclosure

              SmartWealth is subject to an Investment Advisory Agreement
              (IAA) and designed primarily for long-term investors. Investing involve risks, including the possible loss of your capital. You should
              not enter into any transactions unless you have fully understood all such risks and have independently determined that such
              transactions are appropriate for you. Any discussion of the risks contained herein with respect to any security should not be
              considered to be a disclosure of all risks or complete discussion of the risks which are mentioned. Past performance does not
              guarantee future returns. Historical and expected returns projections are provided for informational and illustrative purposes
              and may not reflect actual future performances.

              SmartWealth is a web-based service designed to assist clients in achieving discrete financial goals. It is not intended to
              provide comprehensive tax advice or financial planning with respect to every aspect of a client's financial situation and do not
              incorporate specific investments that clients hold elsewhere. You should not construe any of the material contained herein as
              comprehensive business, hedging, legal, regulatory, tax, or accounting advice and you may want to consult your business advisor,
              attorney, and tax and accounting advisors concerning any such contemplated transactions. See Terms of Service for full disclosures.

            © Ifriqiya Limited <?php echo date('Y') ?>. All rights reserved.

It gives this result

It works for mobile also

This the code after I converted to vue:

<template>

      <Link class="navbar-brand" :href="route('welcome')">

      </Link>
      <button
        class="navbar-toggler"
        type="button"
        data-toggle="collapse"
        data-target="#navbarNavDropdown"
        aria-controls="navbarNavDropdown"
        aria-expanded="false"
        aria-label="Toggle navigation"
      >

      </button>

            <Link
              class="nav-link"
              :href="route('welcome')"
              :class="{ active: $page.url === '/' }"
              >Home</Link
            >

            <Link
              class="nav-link"
              :href="route('howitworks')"
              :class="{ active: $page.url === '/howitworks' }"
              >How It Works</Link
            >

            <Link class="nav-link" :href="route('register')">Register</Link>

            <Link
              class="nav-link"
              :href="route('resources')"
              :class="{ active: $page.url === '/resources' }"
              >Resources</Link
            >

            <Link class="nav-link" :href="route('login')">Login</Link>

      <slot></slot>

Company

              <Link :href="route('about')">About SmartWealth</Link>

              <Link :href="route('investmentapproach')">Investment Approach</Link>

              <Link :href="route('purposefulcapitalism')">Purposeful Capitalism</Link>

              <Link :href="route('pricing')">Pricing</Link>

Legal

              <Link :href="route('policy')">Privacy Policy</Link>

              <Link :href="route('terms')">Terms of Service</Link>

Contact

              Plot 19B, Block 3, Crospil Estate, Anansa Road, Calabar, Cross River State.

+234 8033587748

connect@smartwealthadvisors.com

Disclosure

          SmartWealth is subject to an Investment Advisory Agreement (IAA) and designed
          primarily for long-term investors. Investing involve risks, including the
          possible loss of your capital. You should not enter into any transactions unless
          you have fully understood all such risks and have independently determined that
          such transactions are appropriate for you. Any discussion of the risks contained
          herein with respect to any security should not be considered to be a disclosure
          of all risks or complete discussion of the risks which are mentioned. Past
          performance does not guarantee future returns. Historical and expected returns
          projections are provided for informational and illustrative purposes and may not
          reflect actual future performances.

          SmartWealth is a web-based service designed to assist clients in achieving
          discrete financial goals. It is not intended to provide comprehensive tax advice
          or financial planning with respect to every aspect of a client's financial
          situation and do not incorporate specific investments that clients hold
          elsewhere. You should not construe any of the material contained herein as
          comprehensive business, hedging, legal, regulatory, tax, or accounting advice
          and you may want to consult your business advisor, attorney, and tax and
          accounting advisors concerning any such contemplated transactions. See Terms of
          Service for full disclosures.

          © Ifriqiya Limited {{ currentYear }}. All rights reserved.

</template>

Page works except the navigation section which is blank:

It doesn't work on mobile either

What can I do to resolve this?


问:
Why does my database load fully using expo-file-system in development with Expo Go, but it doesn't fully load using TestFlight?
I'm creating a simple app that uses data in a preloaded database from an assets folder ("../assets/worldEnglishBible.db" (4.8 MB). I'm utilizing expo-sqlite to query the data and expo-file-system to load the database so it can be used by expo-sqlite. The database loads and is fully accessible when tested on the Expo Go app; however, when I create a production build and run it on TestFlight the database fails to load fully (only loads 243 bytes, <1%).

Below is my code to load the database. The deleteDatabaseSQL function is used to for development, to delete the database and re-download it for testing.

```<code>import * as FileSystem from "expo-file-system";
import { Asset } from "expo-asset";

const downloadWEB = async (setDatabaseSize, setConsoleText) => {
  const callback = (downloadProgress) => {
    console.log(downloadProgress.totalBytesWritten);
    setDatabaseSize(downloadProgress.totalBytesWritten);
  };
  //Download WEB database

  const downloadResumableWEB = FileSystem.createDownloadResumable(
    Asset.fromModule(require("../assets/worldEnglishBible.db")).uri,
    FileSystem.documentDirectory + "SQLite/worldEnglishBible.db",
    {},
    callback
  );

  try {
    await FileSystem.makeDirectoryAsync(
      FileSystem.documentDirectory + "SQLite"
    );
    const { uri } = await downloadResumableWEB.downloadAsync();
    console.log("Finished downloading to ", uri);
    setConsoleText("Finished downloading to " + uri);
  } catch (error) {
    console.log(error.message);
    setConsoleText(error.message);
  }
};

const deleteDatabaseSQL = async (setDatabaseSize, setConsoleText) => {
  try {
    await FileSystem.deleteAsync(FileSystem.documentDirectory + "SQLite");
    console.log("database deleted");
    setConsoleText("database deleted");
    setDatabaseSize(0);
  } catch (error) {
    console.log(error.message);
    setConsoleText(error.message);
  } finally {
  }
};

export { downloadWEB, deleteDatabaseSQL };
</code>```

Below is my metro.config.js file

```<code>const { getDefaultConfig } = require("expo/metro-config");

const config = getDefaultConfig(__dirname);

config.resolver.assetExts.push(
  // Adds support for `.db` files for SQLite databases
  "db"
);

module.exports = config;
</code>```

Here is a screenshot from a development screen when my app is loaded on TestFlight. The highlighted portion is an AppContext state variable consoleText, set by setConsoleText.

Screenshot from TestFlight

Thank you!

Body:
I'm creating a simple app that uses data in a preloaded database from an assets folder ("../assets/worldEnglishBible.db" (4.8 MB). I'm utilizing expo-sqlite to query the data and expo-file-system to load the database so it can be used by expo-sqlite. The database loads and is fully accessible when tested on the Expo Go app; however, when I create a production build and run it on TestFlight the database fails to load fully (only loads 243 bytes, <1%).

Below is my code to load the database. The deleteDatabaseSQL function is used to for development, to delete the database and re-download it for testing.

import * as FileSystem from "expo-file-system";
import { Asset } from "expo-asset";

const downloadWEB = async (setDatabaseSize, setConsoleText) => {
  const callback = (downloadProgress) => {
    console.log(downloadProgress.totalBytesWritten);
    setDatabaseSize(downloadProgress.totalBytesWritten);
  };
  //Download WEB database

  const downloadResumableWEB = FileSystem.createDownloadResumable(
    Asset.fromModule(require("../assets/worldEnglishBible.db")).uri,
    FileSystem.documentDirectory + "SQLite/worldEnglishBible.db",
    {},
    callback
  );

  try {
    await FileSystem.makeDirectoryAsync(
      FileSystem.documentDirectory + "SQLite"
    );
    const { uri } = await downloadResumableWEB.downloadAsync();
    console.log("Finished downloading to ", uri);
    setConsoleText("Finished downloading to " + uri);
  } catch (error) {
    console.log(error.message);
    setConsoleText(error.message);
  }
};

const deleteDatabaseSQL = async (setDatabaseSize, setConsoleText) => {
  try {
    await FileSystem.deleteAsync(FileSystem.documentDirectory + "SQLite");
    console.log("database deleted");
    setConsoleText("database deleted");
    setDatabaseSize(0);
  } catch (error) {
    console.log(error.message);
    setConsoleText(error.message);
  } finally {
  }
};

export { downloadWEB, deleteDatabaseSQL };

Below is my metro.config.js file

const { getDefaultConfig } = require("expo/metro-config");

const config = getDefaultConfig(__dirname);

config.resolver.assetExts.push(
  // Adds support for `.db` files for SQLite databases
  "db"
);

module.exports = config;

Here is a screenshot from a development screen when my app is loaded on TestFlight. The highlighted portion is an AppContext state variable consoleText, set by setConsoleText.

Screenshot from TestFlight

Thank you!


问:
How to fetch NEW CODE COVERAGE % along with respective dates using SonarQube WEB API?
I am trying to fetch NEW CODE COVERAGE METRIC via Sonarqube WEB API but unable to find any endpoint which directly gives me the new code coverage along with its respective date.

I have tried metrics API but no luck. It doesnt give dates.


问:
Force NSPopover resizing with animation
I have an NSPopover that I want to resize with animation. In my case, setContentSize works, but without animation (apple says that animation is not guaranteed).

I'm investigating the use of NSViewAnimation. With this approach, the popover does resize with animation, but this requires setting the popover (window) frame origin, not just its size.

Here lies the problem, I need to know the edge to which the popover is "attached" to its positionRect because this edge should not move during resizing.

To this end, have set a rather inelegant method that involves comparing the position of the popover to that of the view to which it is attached in screen space, but I'd like to know if there is a more elegant solution to reach my goal (suggestions in obj-c are preferred, I'm already old.)

Title: Force NSPopover resizing with animation


问:
Reusing Message in the same package in multiple files
Is there a way to reuse protobuf structs across multiple proto files?

in the client.proto  file I have the following

```<code>message SingleOperation {
  string command = 1;
}

message ClientBatch {
  string unique_id = 1;
  repeated SingleOperation requests = 2;
  int64 sender = 3;
}
</code>```

Then in network.proto  file, I have the following

```<code>message MemPool {
  int32 sender = 1;
  string unique_id = 2;
  SingleOperation op = 3;
}

</code>```

In the network.proto file, I need to reuse the SingleOperation message.

However, I do not see an option to do this.

Does protobuff support some sort of packaging to support struct reuse?

Body:
Is there a way to reuse protobuf structs across multiple proto files?

in the client.proto  file I have the following

message SingleOperation {
  string command = 1;
}

message ClientBatch {
  string unique_id = 1;
  repeated SingleOperation requests = 2;
  int64 sender = 3;
}

Then in network.proto  file, I have the following

message MemPool {
  int32 sender = 1;
  string unique_id = 2;
  SingleOperation op = 3;
}

In the network.proto file, I need to reuse the SingleOperation message.

However, I do not see an option to do this.

Does protobuff support some sort of packaging to support struct reuse?


问:
Material Ui CardMedia Component is not loading my picture
I am trying to load a picture using Material UI card component. Everything seems to load except for the actual picture. I have tried all possible ways and other suggestions from the net but no luck.

Here is my code.
I've tried the imageURL, path i even copied the path exactly from the folder structure to see if i wrote it wrong.

```<code>import Card from '@mui/material/Card';
import CardMedia from '@mui/material/CardMedia';
import { Button, CardActionArea, CardActions } from '@mui/material';

function DisplayProjectCard(props) {
    return (
    <Card elevation={0}
            sx={{ maxWidth: 645,
            backgroundColor: "transparent", p:4 }}>
            <CardActionArea>
            <CardMedia
                component="img"
                title="My Next Promo App landing page"
                height="240"
                width="440"
                image="src/static/images/MyNextPromoApp.png"
                alt="Home page of My Next Promo App"

        />
            </CardActionArea>
        <CardActions sx={{
            justifyContent:'center'
            }}>
        <Button size="small" color="primary">
            View
        </Button> |
        <Button size="small" color="primary">
            Github
        </Button>
        </CardActions>
    </Card>
    );
}
export default DisplayProjectCard```

```

Body:
I am trying to load a picture using Material UI card component. Everything seems to load except for the actual picture. I have tried all possible ways and other suggestions from the net but no luck.

Here is my code.
I've tried the imageURL, path i even copied the path exactly from the folder structure to see if i wrote it wrong.

import Card from '@mui/material/Card';
import CardMedia from '@mui/material/CardMedia';
import { Button, CardActionArea, CardActions } from '@mui/material';

function DisplayProjectCard(props) {
    return (
    <Card elevation={0}
            sx={{ maxWidth: 645,
            backgroundColor: "transparent", p:4 }}>
            <CardActionArea>
            <CardMedia
                component="img"
                title="My Next Promo App landing page"
                height="240"
                width="440"
                image="src/static/images/MyNextPromoApp.png"
                alt="Home page of My Next Promo App"

        />
            </CardActionArea>
        <CardActions sx={{
            justifyContent:'center'
            }}>
        <Button size="small" color="primary">
            View
        </Button> |
        <Button size="small" color="primary">
            Github
        </Button>
        </CardActions>
    </Card>
    );
}
export default DisplayProjectCard```


问:
Using datepicker in cell editor with aggrid in streamlit app
I'm working on a streamlit app, where i have some datas to manage with streamlit-aggrid, and specialy a date column.

I would like to edit this date column, with a date picker as a popup.

I tried to use a custom cell editor :

```<code>DatePicker = JsCode(
    """
class DatePicker {
  init(params) {
      const template = '
              <input type="date" data-input style="width: 100%" />
                <a class="fa fa-times">Cliquez pour modifier la date</a>
                  ';

      this.params = params;
      this.eGui = document.createElement('div');
      this.eGui.classList.add('ag-input');
      this.eGui.style.height = '100%';
      this.eGui.innerHTML = template;

      this.eInput = this.eGui.querySelector('input');

      this.picker = flatpickr(this.eGui, {
        onChange: this.onDateChanged.bind(this),
        dateFormat: 'd-m-Y',
        wrap: true,
        defaultDate: this.params.value,
      });

      this.picker.calendarContainer.classList.add('ag-custom-component-popup');

      this.date = this.params.value;
    }

    getGui() {
      return this.eGui;
    }

    onDateChanged(selectedDates) {
      this.date = selectedDates[0] || this.params.value;
      this.params.onDateChanged();
    }

    getValue() {
        return this.eInput.value;
      }
  }
"""
)

gb.configure_column(
                            "Terminé le",
                            cellEditor=DatePicker2,
                            cellEditorPopup=True,
                            editable=True,
                        )
</code>```

It’s working actualy. But 3 clicks are needed instead of a double, because of the inner html raw.

Body:
I'm working on a streamlit app, where i have some datas to manage with streamlit-aggrid, and specialy a date column.

I would like to edit this date column, with a date picker as a popup.

I tried to use a custom cell editor :

DatePicker = JsCode(
    """
class DatePicker {
  init(params) {
      const template = '
              <input type="date" data-input style="width: 100%" />
                Cliquez pour modifier la date
                  ';

      this.params = params;
      this.eGui = document.createElement('div');
      this.eGui.classList.add('ag-input');
      this.eGui.style.height = '100%';
      this.eGui.innerHTML = template;

      this.eInput = this.eGui.querySelector('input');

      this.picker = flatpickr(this.eGui, {
        onChange: this.onDateChanged.bind(this),
        dateFormat: 'd-m-Y',
        wrap: true,
        defaultDate: this.params.value,
      });

      this.picker.calendarContainer.classList.add('ag-custom-component-popup');

      this.date = this.params.value;
    }

    getGui() {
      return this.eGui;
    }

    onDateChanged(selectedDates) {
      this.date = selectedDates[0] || this.params.value;
      this.params.onDateChanged();
    }

    getValue() {
        return this.eInput.value;
      }
  }
"""
)

gb.configure_column(
                            "Terminé le",
                            cellEditor=DatePicker2,
                            cellEditorPopup=True,
                            editable=True,
                        )

It’s working actualy. But 3 clicks are needed instead of a double, because of the inner html raw.


问:
Reading values from adc in dspic33e
Im having some issue trying to consfigure and read ADC's in pic33 from RE* pins. Can anyone give me an example on how to configure and read an adc value from pin RE0 (RP80).</p>

Title: Reading values from adc in dspic33e


问:
weird object Error on some of my pages while using a reusable component (TS/REACT)
my error is this

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of reusableButton.

only get it on some pages.. cant seem to understand why yet...

my component 'reusableButton' is such

```<code>import { ReactSVGElement } from "react";

interface reusableButtonProps {
  type: string;
  text: string;
  variant: string; //reference css page
  onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
  id?: string;
  hasLeftIcon: boolean;
  LeftIcon?: ReactSVGElement;
  hasRightIcon: boolean;
  RightIcon?: ReactSVGElement;
}
export default function reusableButton({
 id,
 variant,
 onClick,
 hasLeftIcon,
 LeftIcon,
 hasRightIcon,
 RightIcon,
 text,
 type
}: reusableButtonProps) {
   return (
    <button onClick={onClick} id={`${id}`} type={type} className={`${variant}`}>
    {hasLeftIcon && <LeftIcon />}
    {text} {hasRightIcon && <RightIcon />}
   </button>
 );
}
</code>```

most of the pages we use have class components wrapping the layouts then function components for ux heres is profile wehre this button one is failing

```<code>export default function Profile() {

  return (
    <SectionLayout hero={false}>
    <Breadcrumb
    pageName={"Your Account"}

   />
   <div className="">
    <div className="">
      <form method="POST" onSubmit={formik.handleSubmit}>
        <div className="">
          <h1 className="contents">
            Welcome, <br className="flex sm:hidden" />
            {saving && <Spinner text={"Saving..."} />}
            {loading && <Spinner text={"Loading..."} />}
            {!toggleEdit ? (
              <>
                 {firstName} {lastName}
              </>
            ) : (
              <>
                <TextInput
                  additionalClasses="capitalize "
                  onChange={formik.handleChange}
                  id={"_firstName"}
                  type={"text"}
                  defaultValue={firstName}
                /
              </>
            )}
          </h1>
          <span className="block">
            <UserLocation forProfile={true} />
          </span>
        </div>
        <div className="w-full flex mt-10 md:absolute md:bottom-0">
          {!toggleEdit ? (
            <ReusableButton
              text={"edit account info"}
              variant={"btn-primary"}
              type={"button"}
              onClick={() => setToggleEdit(true)}
              hasLeftIcon={false}
              hasRightIcon={true}
              RightIcon={
                <ChevronRightIcon className="mb-[.05rem] xl:mb-px w-5 h-5 xl:w-6 xl:h-6
                font-default" />
              }
            />
          ) : (
            <ReusableButton
              text={"Save"}
              type={"submit"}
              variant={"btn-primary"}
              hasLeftIcon={false}
              hasRightIcon={true}
              RightIcon={
                <ChevronRightIcon className=" mb-[.05rem] xl:mb-px w-5 h-5 xl:w-6 xl:h-6
                font-default" />
              }
             />
            )}
           </div>
         </form>
       </div>
      </div>
     </SectionLayout>
    );
   }
</code>```

sectionlayout is a class component but even taking it out i still get the error using the reusable button only when i need the Icon

Body:
my error is this

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of reusableButton.

only get it on some pages.. cant seem to understand why yet...

my component 'reusableButton' is such

import { ReactSVGElement } from "react";

interface reusableButtonProps {
  type: string;
  text: string;
  variant: string; //reference css page
  onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
  id?: string;
  hasLeftIcon: boolean;
  LeftIcon?: ReactSVGElement;
  hasRightIcon: boolean;
  RightIcon?: ReactSVGElement;
}
export default function reusableButton({
 id,
 variant,
 onClick,
 hasLeftIcon,
 LeftIcon,
 hasRightIcon,
 RightIcon,
 text,
 type
}: reusableButtonProps) {
   return (
    <button onClick={onClick} id={`${id}`} type={type} className={`${variant}`}>
    {hasLeftIcon && <LeftIcon />}
    {text} {hasRightIcon && <RightIcon />}
   </button>
 );
}

most of the pages we use have class components wrapping the layouts then function components for ux heres is profile wehre this button one is failing

export default function Profile() {

  return (
    <SectionLayout hero={false}>
    <Breadcrumb
    pageName={"Your Account"}

   />

      <form method="POST" onSubmit={formik.handleSubmit}>

            Welcome,

            {saving && <Spinner text={"Saving..."} />}
            {loading && <Spinner text={"Loading..."} />}
            {!toggleEdit ? (
              <>
                 {firstName} {lastName}
              </>
            ) : (
              <>
                <TextInput
                  additionalClasses="capitalize "
                  onChange={formik.handleChange}
                  id={"_firstName"}
                  type={"text"}
                  defaultValue={firstName}
                /
              </>
            )}

            <UserLocation forProfile={true} />

          {!toggleEdit ? (
            <ReusableButton
              text={"edit account info"}
              variant={"btn-primary"}
              type={"button"}
              onClick={() => setToggleEdit(true)}
              hasLeftIcon={false}
              hasRightIcon={true}
              RightIcon={
                <ChevronRightIcon className="mb-[.05rem] xl:mb-px w-5 h-5 xl:w-6 xl:h-6
                font-default" />
              }
            />
          ) : (
            <ReusableButton
              text={"Save"}
              type={"submit"}
              variant={"btn-primary"}
              hasLeftIcon={false}
              hasRightIcon={true}
              RightIcon={
                <ChevronRightIcon className=" mb-[.05rem] xl:mb-px w-5 h-5 xl:w-6 xl:h-6
                font-default" />
              }
             />
            )}

         </form>

     </SectionLayout>
    );
   }

sectionlayout is a class component but even taking it out i still get the error using the reusable button only when i need the Icon


问:
C# Topshelf fails to execute a powershell file
After installing the service (.exe) and starting it, the powershell file in the code will be executed. There are also no error messages.

My Steps:

cd C:\Users\USER_XY\source\repos\ServiceApp\ServiceApp\bin\Debug\net6.0

.\ScriptAsService.exe install -servicename "MyService123" -displayname "My Service123" -description "This is my service123."

start the service (right click, start)

the start.txt and stop.txt will be generated but the powershell script will not be executed.

Here the c# code:

```<code>using Topshelf;

public class App
{
    static void Main(string[] args)
    {
        var exitCode = HostFactory.Run(x =>
        {
            x.Service<ScriptAsService>(s =>
            {
                s.ConstructUsing(service => new ScriptAsService());
                s.WhenStarted(service => service.Start());
                s.WhenStopped(service => service.Stop());
            });

            x.RunAsLocalSystem();
        });
    }
}

public class ScriptAsService
{
    private String _scriptfile = @"C:\Users\USER_XY\source\repos\ServiceApp\ServiceApp\bin\Debug\net6.0\myscript.ps1";

    public void Start()
    {
        File.WriteAllText("start.txt", "service started --> start scriptfile=" + _scriptfile);

        ProcessStartInfo process_start_info = new ProcessStartInfo();
        process_start_info.FileName = "powershell.exe";
        process_start_info.Arguments = this._scriptfile;
        Process process = new Process();
        process.StartInfo = process_start_info;
        process.Start();

        process.WaitForExit();
    }

    public void Stop()
    {
        File.WriteAllText("stop.txt", "service stopped");
    }
}

</code>```

And here the powershell code (myscript.ps1):

```<code>$counter = 0
while (1)
{
  Add-Content info22.txt -Value "content = $counter"
  $counter++
  Start-Sleep -s 15
}
</code>```

I except the info22.txt file. This file will be created by the powershell script.

Body:
After installing the service (.exe) and starting it, the powershell file in the code will be executed. There are also no error messages.

My Steps:

cd C:\Users\USER_XY\source\repos\ServiceApp\ServiceApp\bin\Debug\net6.0

.\ScriptAsService.exe install -servicename "MyService123" -displayname "My Service123" -description "This is my service123."

start the service (right click, start)

the start.txt and stop.txt will be generated but the powershell script will not be executed.

Here the c# code:

using Topshelf;

public class App
{
    static void Main(string[] args)
    {
        var exitCode = HostFactory.Run(x =>
        {
            x.Service


问:
Angular material drag drop feature customization
We have implemented drag and drop using Angular material 9. But we need some more customization there. How can we replace an item instead of shifting it?


问:
Not updateable record set
I have a set of records linked (1 to many) to another table. The data tables are called tblJobs and tblTasks.  I want to show 1) whose task is next 2) all the people who are involved in the tasks and 3) how many are done out of the total, and have this display for each Job.
As soon as I create a query that is aggregated (maybe there is a better way) I can no longer amend the main job data. If I try and create a subform with this info, I can't add subforms to continuous records in a form.
I'm doing all this in Access VBA.  Here's an example of data seen on form:

```<code>tblJob
Company Name: Smiths
Date Start: 01/01/2023
Data finished: Null
Job Completed: Null (Boolean)

tblTask

Task No: 1
Task: Write email
Who: Bob
Completed: Null (Boolean)

Task No: 2
Task: Create Contacts
Who: Fred
Completed: Null
</code>```

So here I would want to show with the job data that Bob is next, the job involves Bob and Fred and 0 out of 2 task are completed.
Hope that makes sense and many thanks in advance.

I've tried all the data in one record but it locks the data.
Also tried subforms but the screen then only can show one job at a time (no longer Continuous). Currently I am able to show taks completed by placing a subform in a header of a separate form that only appears using OnCurrent. This only shows the data one record at a time. If there is a way to bring this to the main form, that would be great so all records can be seen at once. Let's start a conversation!

Title: Not updateable record set

Body:
I have a set of records linked (1 to many) to another table. The data tables are called tblJobs and tblTasks.  I want to show 1) whose task is next 2) all the people who are involved in the tasks and 3) how many are done out of the total, and have this display for each Job.
As soon as I create a query that is aggregated (maybe there is a better way) I can no longer amend the main job data. If I try and create a subform with this info, I can't add subforms to continuous records in a form.
I'm doing all this in Access VBA.  Here's an example of data seen on form:

tblJob
Company Name: Smiths
Date Start: 01/01/2023
Data finished: Null
Job Completed: Null (Boolean)

tblTask

Task No: 1
Task: Write email
Who: Bob
Completed: Null (Boolean)

Task No: 2
Task: Create Contacts
Who: Fred
Completed: Null

So here I would want to show with the job data that Bob is next, the job involves Bob and Fred and 0 out of 2 task are completed.
Hope that makes sense and many thanks in advance.

I've tried all the data in one record but it locks the data.
Also tried subforms but the screen then only can show one job at a time (no longer Continuous). Currently I am able to show taks completed by placing a subform in a header of a separate form that only appears using OnCurrent. This only shows the data one record at a time. If there is a way to bring this to the main form, that would be great so all records can be seen at once. Let's start a conversation!


问:
interpretable long-term monthly forecast with little data
I have rather challenging problem to tackle and would like to know how the community would approach it.

I have 3 years of monthly data in which the variable I want to predict doesn't seem to behave like a time series judging by a lack of autocorrelation. I would like to train a model that uses other time series (x1,x2,...) to predict y with a 12-month horizon. Also, i need the model to be interpretable to better understand the predictions of the model.

My initial thoughts are to use a simple model (e.g., linear regression, decision trees) and use a direct multi-step approach. Moreover, instead of creating lagged versions of the features, i'll only create one aggregation per feature to have better interpretability. This way i only have 1 feature that gives me info about x1, another about x2, and so on.

What do think about these thoughts? how would set the Cross Validation strategy?

Given all these constraints i'mnot expecting a super model, just one that's useful.

Validation or rejection of my thoughts along with reasons.
A good approach to tackle the problem.


问:
eConnect (gp2010) - Insert a different taAnalyticsDistribution per taPopRcptLineInsert
Error:
aaTrxDimCode is the same on all the taPopRcptLineInsert.

Cause:
It would appear that the details of all the taAnalyticsDistribution are given to each of the articles, instead of one for each. This happens at the end of the xml, on taAnalyticsDistribution.

Objective:
Each taPopRcptLineInsert gets an individual taAnalyticsDistribution. I want this specifically for the aaTrxDimCode. Each taPopRcptLineInsert has a different (not unique) aaTrxDimCode.

Example:

```<code><taPopRcptLineInsert_Items>
            <taPopRcptLineInsert>
                <POPTYPE>3</POPTYPE>
                <POPRCTNM>1234</POPRCTNM>
                <ITEMNMBR>CONCEPT 1</ITEMNMBR>
                <ITEMDESC>CONCEPT 1</ITEMDESC>
                <TAXDTLID>TAX PLAN 1</TAXDTLID>
                <VENDORID>ABCD</VENDORID>
                <RCPTLNNM>16384</RCPTLNNM>
                <VNDITNUM>CONCEPT 1</VNDITNUM>
                <VNDITDSC>CONCEPT 1</VNDITDSC>
                <LOCNCODE>73993</LOCNCODE>
                <INVINDX>0</INVINDX>
                <UOFM>PZ</UOFM>
                <UNITCOST>52</UNITCOST>
                <EXTDCOST>156</EXTDCOST>
                <NONINVEN>0</NONINVEN>
                <QTYSHPPD>3</QTYSHPPD>
                <QTYINVCD>3</QTYINVCD>
                <TAXAMNT>24.96</TAXAMNT>
                <Purchase_IV_Item_Taxable>1</Purchase_IV_Item_Taxable>
                <Purchase_Site_Tax_Schedu>TAX PLAN 1</Purchase_Site_Tax_Schedu>
                <AUTOCOST>0</AUTOCOST>
            </taPopRcptLineInsert>
        </taPopRcptLineInsert_Items>
        <taPopRcptLineTaxInsert_Items>
            <taPopRcptLineTaxInsert>
                <VENDORID>ABCD</VENDORID>
                <POPRCTNM>1234</POPRCTNM>
                <TAXDTLID>TAX PLAN 1</TAXDTLID>
                <TAXTYPE>0</TAXTYPE>
                <TAXAMNT>24.96</TAXAMNT>
                <TAXPURCH>156</TAXPURCH>
                <TOTPURCH>156</TOTPURCH>
                <RCPTLNNM>16384</RCPTLNNM>
            </taPopRcptLineTaxInsert>
        </taPopRcptLineTaxInsert_Items>
        <taAnalyticsDistribution_Items>
            <taAnalyticsDistribution>
                <DOCNMBR>1234</DOCNMBR>
                <DOCTYPE>3</DOCTYPE>
                <ACTINDX>2065</ACTINDX>
                <ACTNUMST>5-50-004-00001</ACTNUMST>
                <aaTrxDim>SUCURSAL</aaTrxDim>
                **<aaTrxDimCode>73993</aaTrxDimCode>**
                **<aaSubLedgerAssignID>1</aaSubLedgerAssignID>**
            </taAnalyticsDistribution>
        </taAnalyticsDistribution_Items>

        <taPopRcptLineInsert_Items>
            <taPopRcptLineInsert>
                <POPTYPE>3</POPTYPE>
                <POPRCTNM>1234</POPRCTNM>
                <ITEMNMBR>CONCEPT 1</ITEMNMBR>
                <ITEMDESC>CONCEPT 1</ITEMDESC>
                <TAXDTLID>TAX PLAN 1</TAXDTLID>
                <VENDORID>ABCD</VENDORID>
                <RCPTLNNM>32768</RCPTLNNM>
                <VNDITNUM>CONCEPT 1</VNDITNUM>
                <VNDITDSC>CONCEPT 1</VNDITDSC>
                <LOCNCODE>70267</LOCNCODE>
                <INVINDX>0</INVINDX>
                <UOFM>PZ</UOFM>
                <UNITCOST>52</UNITCOST>
                <EXTDCOST>156</EXTDCOST>
                <NONINVEN>0</NONINVEN>
                <QTYSHPPD>3</QTYSHPPD>
                <QTYINVCD>3</QTYINVCD>
                <TAXAMNT>24.96</TAXAMNT>
                <Purchase_IV_Item_Taxable>1</Purchase_IV_Item_Taxable>
                <Purchase_Item_Tax_Schedu>TAX PLAN 1</Purchase_Item_Tax_Schedu>
                <Purchase_Site_Tax_Schedu>TAX PLAN 1</Purchase_Site_Tax_Schedu>
                <AUTOCOST>0</AUTOCOST>
            </taPopRcptLineInsert>
        </taPopRcptLineInsert_Items>
        <taPopRcptLineTaxInsert_Items>
            <taPopRcptLineTaxInsert>
                <VENDORID>ABCD</VENDORID>
                <POPRCTNM>1234</POPRCTNM>
                <TAXDTLID>TAX PLAN 1</TAXDTLID>
                <TAXTYPE>0</TAXTYPE>
                <TAXAMNT>24.96</TAXAMNT>
                <TAXPURCH>156</TAXPURCH>
                <TOTPURCH>156</TOTPURCH>
                <RCPTLNNM>32768</RCPTLNNM>
            </taPopRcptLineTaxInsert>
        </taPopRcptLineTaxInsert_Items>
        <taAnalyticsDistribution_Items>
            <taAnalyticsDistribution>
                <DOCNMBR>1234</DOCNMBR>
                <DOCTYPE>3</DOCTYPE>
                <ACTINDX>2065</ACTINDX>
                <ACTNUMST>5-50-004-00001</ACTNUMST>
                <aaTrxDim>SUCURSAL</aaTrxDim>
                **<aaTrxDimCode>70267</aaTrxDimCode>**
                **<aaSubLedgerAssignID>2</aaSubLedgerAssignID>**
            </taAnalyticsDistribution>
        </taAnalyticsDistribution_Items>

        <taPopRcptHdrInsert>
            <POPRCTNM>1234</POPRCTNM>
            <POPTYPE>3</POPTYPE>
            <VNDDOCNM>1234</VNDDOCNM>
            <receiptdate>05/01/2023</receiptdate>
            <BACHNUMB>PRUEBA 1N-1</BACHNUMB>
            <VENDORID>ABCD</VENDORID>
            <SUBTOTAL>312</SUBTOTAL>
            <TAXAMNT>49.92</TAXAMNT>
            <TAXSCHID>TAX PLAN 2</TAXSCHID>
            <USER2ENT>sa</USER2ENT>
            <WITHHAMT>0</WITHHAMT>
            <AUTOCOST>0</AUTOCOST>
            <CREATEDIST>1</CREATEDIST>
            <REFRENCE>1234</REFRENCE>
        </taPopRcptHdrInsert>
</code>```

I know this is kind-of ancient tech, but it's what I have to deal with. I've been trying to come up with a solution but I could really use some help.

Best regards.

Nothing that tackled the problem itself. Just misinterpretations on my end.

Body:
Error:
aaTrxDimCode is the same on all the taPopRcptLineInsert.

Cause:
It would appear that the details of all the taAnalyticsDistribution are given to each of the articles, instead of one for each. This happens at the end of the xml, on taAnalyticsDistribution.

Objective:
Each taPopRcptLineInsert gets an individual taAnalyticsDistribution. I want this specifically for the aaTrxDimCode. Each taPopRcptLineInsert has a different (not unique) aaTrxDimCode.

Example:

<taPopRcptLineInsert_Items>
            <taPopRcptLineInsert>
                <POPTYPE>3</POPTYPE>
                <POPRCTNM>1234</POPRCTNM>
                <ITEMNMBR>CONCEPT 1</ITEMNMBR>
                <ITEMDESC>CONCEPT 1</ITEMDESC>
                <TAXDTLID>TAX PLAN 1</TAXDTLID>
                <VENDORID>ABCD</VENDORID>
                <RCPTLNNM>16384</RCPTLNNM>
                <VNDITNUM>CONCEPT 1</VNDITNUM>
                <VNDITDSC>CONCEPT 1</VNDITDSC>
                <LOCNCODE>73993</LOCNCODE>
                <INVINDX>0</INVINDX>
                <UOFM>PZ</UOFM>
                <UNITCOST>52</UNITCOST>
                <EXTDCOST>156</EXTDCOST>
                <NONINVEN>0</NONINVEN>
                <QTYSHPPD>3</QTYSHPPD>
                <QTYINVCD>3</QTYINVCD>
                <TAXAMNT>24.96</TAXAMNT>
                <Purchase_IV_Item_Taxable>1</Purchase_IV_Item_Taxable>
                <Purchase_Site_Tax_Schedu>TAX PLAN 1</Purchase_Site_Tax_Schedu>
                <AUTOCOST>0</AUTOCOST>
            </taPopRcptLineInsert>
        </taPopRcptLineInsert_Items>
        <taPopRcptLineTaxInsert_Items>
            <taPopRcptLineTaxInsert>
                <VENDORID>ABCD</VENDORID>
                <POPRCTNM>1234</POPRCTNM>
                <TAXDTLID>TAX PLAN 1</TAXDTLID>
                <TAXTYPE>0</TAXTYPE>
                <TAXAMNT>24.96</TAXAMNT>
                <TAXPURCH>156</TAXPURCH>
                <TOTPURCH>156</TOTPURCH>
                <RCPTLNNM>16384</RCPTLNNM>
            </taPopRcptLineTaxInsert>
        </taPopRcptLineTaxInsert_Items>
        <taAnalyticsDistribution_Items>
            <taAnalyticsDistribution>
                <DOCNMBR>1234</DOCNMBR>
                <DOCTYPE>3</DOCTYPE>
                <ACTINDX>2065</ACTINDX>
                <ACTNUMST>5-50-004-00001</ACTNUMST>
                <aaTrxDim>SUCURSAL</aaTrxDim>
                **<aaTrxDimCode>73993</aaTrxDimCode>**
                **<aaSubLedgerAssignID>1</aaSubLedgerAssignID>**
            </taAnalyticsDistribution>
        </taAnalyticsDistribution_Items>

        <taPopRcptLineInsert_Items>
            <taPopRcptLineInsert>
                <POPTYPE>3</POPTYPE>
                <POPRCTNM>1234</POPRCTNM>
                <ITEMNMBR>CONCEPT 1</ITEMNMBR>
                <ITEMDESC>CONCEPT 1</ITEMDESC>
                <TAXDTLID>TAX PLAN 1</TAXDTLID>
                <VENDORID>ABCD</VENDORID>
                <RCPTLNNM>32768</RCPTLNNM>
                <VNDITNUM>CONCEPT 1</VNDITNUM>
                <VNDITDSC>CONCEPT 1</VNDITDSC>
                <LOCNCODE>70267</LOCNCODE>
                <INVINDX>0</INVINDX>
                <UOFM>PZ</UOFM>
                <UNITCOST>52</UNITCOST>
                <EXTDCOST>156</EXTDCOST>
                <NONINVEN>0</NONINVEN>
                <QTYSHPPD>3</QTYSHPPD>
                <QTYINVCD>3</QTYINVCD>
                <TAXAMNT>24.96</TAXAMNT>
                <Purchase_IV_Item_Taxable>1</Purchase_IV_Item_Taxable>
                <Purchase_Item_Tax_Schedu>TAX PLAN 1</Purchase_Item_Tax_Schedu>
                <Purchase_Site_Tax_Schedu>TAX PLAN 1</Purchase_Site_Tax_Schedu>
                <AUTOCOST>0</AUTOCOST>
            </taPopRcptLineInsert>
        </taPopRcptLineInsert_Items>
        <taPopRcptLineTaxInsert_Items>
            <taPopRcptLineTaxInsert>
                <VENDORID>ABCD</VENDORID>
                <POPRCTNM>1234</POPRCTNM>
                <TAXDTLID>TAX PLAN 1</TAXDTLID>
                <TAXTYPE>0</TAXTYPE>
                <TAXAMNT>24.96</TAXAMNT>
                <TAXPURCH>156</TAXPURCH>
                <TOTPURCH>156</TOTPURCH>
                <RCPTLNNM>32768</RCPTLNNM>
            </taPopRcptLineTaxInsert>
        </taPopRcptLineTaxInsert_Items>
        <taAnalyticsDistribution_Items>
            <taAnalyticsDistribution>
                <DOCNMBR>1234</DOCNMBR>
                <DOCTYPE>3</DOCTYPE>
                <ACTINDX>2065</ACTINDX>
                <ACTNUMST>5-50-004-00001</ACTNUMST>
                <aaTrxDim>SUCURSAL</aaTrxDim>
                **<aaTrxDimCode>70267</aaTrxDimCode>**
                **<aaSubLedgerAssignID>2</aaSubLedgerAssignID>**
            </taAnalyticsDistribution>
        </taAnalyticsDistribution_Items>

        <taPopRcptHdrInsert>
            <POPRCTNM>1234</POPRCTNM>
            <POPTYPE>3</POPTYPE>
            <VNDDOCNM>1234</VNDDOCNM>
            <receiptdate>05/01/2023</receiptdate>
            <BACHNUMB>PRUEBA 1N-1</BACHNUMB>
            <VENDORID>ABCD</VENDORID>
            <SUBTOTAL>312</SUBTOTAL>
            <TAXAMNT>49.92</TAXAMNT>
            <TAXSCHID>TAX PLAN 2</TAXSCHID>
            <USER2ENT>sa</USER2ENT>
            <WITHHAMT>0</WITHHAMT>
            <AUTOCOST>0</AUTOCOST>
            <CREATEDIST>1</CREATEDIST>
            <REFRENCE>1234</REFRENCE>
        </taPopRcptHdrInsert>

I know this is kind-of ancient tech, but it's what I have to deal with. I've been trying to come up with a solution but I could really use some help.

Best regards.

Nothing that tackled the problem itself. Just misinterpretations on my end.


问:
rShiny ggplot as svg
I'm trying to server a ggplot as an svg in rShiny. This SVG has hyperlinks embedded into the y-axis labels.

I figured out that plotOutput won't cut it, so i'm using imageOutput/renderImage.

```<code>renderImage({
            d = dataForHeatmap()
            p = ggplot(d,aes(x=x,y=y,fill=some_fill)) + geom_tile(colour="white", linewidth=0.25)
            width  <- session$clientData$output_heatData_width
            height <- session$clientData$output_heatData_height
            ratio = width/height

            tf1 <- tempfile(fileext = ".svg")
            ggsave( tf1 , p, width=7*ratio,height=7)

            xml <- read_xml(tf1)
            xml %>%
              xml_find_all(xpath="//d1:text") %>%
              keep(xml_text(.) %in% names(links)) %>%
              xml_add_parent("a", "xlink:href" = "https://www.youtube.com/watch?v=j8PxqgliIno", target = "_blank")
            write_xml(xml, tf2 <- tempfile(fileext = ".svg"))

            return(list(src = normalizePath(tf2), width = width, height = height, contentType = "image/svg+xml", alt="Histogram"))

    }, deleteFile = TRUE)
</code>```

This does the trick of serving the svg, but the links are not clickable. The issue seems to be the fact that the svg gets served in an "img" tag (this post).

I could go the suggested way, but i'm also using the click, dblclick and hover features of the imageOutput. I'd basically have to fully reimplement all of this for the uiOutput?

Is there a better way to achieve this?

Playing around with the content type returned did not do much. There is supposed to be a way to get renderImage to return a div instead of an img tag, but i was unable to do that.

Title: rShiny ggplot as svg

Body:
I'm trying to server a ggplot as an svg in rShiny. This SVG has hyperlinks embedded into the y-axis labels.

I figured out that plotOutput won't cut it, so i'm using imageOutput/renderImage.

renderImage({
            d = dataForHeatmap()
            p = ggplot(d,aes(x=x,y=y,fill=some_fill)) + geom_tile(colour="white", linewidth=0.25)
            width  <- session$clientData$output_heatData_width
            height <- session$clientData$output_heatData_height
            ratio = width/height

            tf1 <- tempfile(fileext = ".svg")
            ggsave( tf1 , p, width=7*ratio,height=7)

            xml <- read_xml(tf1)
            xml %>%
              xml_find_all(xpath="//d1:text") %>%
              keep(xml_text(.) %in% names(links)) %>%
              xml_add_parent("a", "xlink:href" = "https://www.youtube.com/watch?v=j8PxqgliIno", target = "_blank")
            write_xml(xml, tf2 <- tempfile(fileext = ".svg"))

            return(list(src = normalizePath(tf2), width = width, height = height, contentType = "image/svg+xml", alt="Histogram"))

    }, deleteFile = TRUE)

This does the trick of serving the svg, but the links are not clickable. The issue seems to be the fact that the svg gets served in an "img" tag (this post).

I could go the suggested way, but i'm also using the click, dblclick and hover features of the imageOutput. I'd basically have to fully reimplement all of this for the uiOutput?

Is there a better way to achieve this?

Playing around with the content type returned did not do much. There is supposed to be a way to get renderImage to return a div instead of an img tag, but i was unable to do that.


问:
How to replace the string in special characters '' using sed
I want to replace the string present in between '' with $lusername. Please suggest.

```<code>  CREATE USER "MIKEALEX" IDENTIFIED GLOBALLY AS 'cn=mike\, alex (tns-ns),cn=users,dc=dcam,dc=dob,dc=com'
      DEFAULT TABLESPACE "USERS"
      TEMPORARY TABLESPACE "TEMP"
      PROFILE "DBA_USER_PROFILE_SSO";
</code>```

My output should look like as below

```<code>CREATE USER "MIKEALEX" IDENTIFIED GLOBALLY AS $lusername
      DEFAULT TABLESPACE "USERS"
      TEMPORARY TABLESPACE "TEMP"
      PROFILE "DBA_USER_PROFILE_SSO";
</code>```

Body:
I want to replace the string present in between '' with $lusername. Please suggest.

  CREATE USER "MIKEALEX" IDENTIFIED GLOBALLY AS 'cn=mike\, alex (tns-ns),cn=users,dc=dcam,dc=dob,dc=com'
      DEFAULT TABLESPACE "USERS"
      TEMPORARY TABLESPACE "TEMP"
      PROFILE "DBA_USER_PROFILE_SSO";

My output should look like as below

CREATE USER "MIKEALEX" IDENTIFIED GLOBALLY AS $lusername
      DEFAULT TABLESPACE "USERS"
      TEMPORARY TABLESPACE "TEMP"
      PROFILE "DBA_USER_PROFILE_SSO";


问:
min height for empty div
I dont know how setup min. height for empty div in conditional rednering.

My code:

```<code>  <div className="text-sm">
            <div className="flex justify-between pb-1">
              <div className="flex">
                {label === "new" ? (
                  <>
                    <BiSpa size="1.2rem" className="my-auto" />
                    <p className="pl-1 my-auto">new product</p>
                  </>
                ) : (
                  <div className="min-height-fit"></div>
                )}
              </div>
            </div>
          </div>
</code>```

If props doesn't have label, will render empty div, but without 0 px.
I want this same heighjt like div with label.

Below my problem in browser:
https://i.imgur.com/xfFAfSh.png

Title: min height for empty div

Body:
I dont know how setup min. height for empty div in conditional rednering.

My code:

                {label === "new" ? (
                  <>
                    <BiSpa size="1.2rem" className="my-auto" />

new product

                  </>
                ) : (

                )}

If props doesn't have label, will render empty div, but without 0 px.
I want this same heighjt like div with label.

Below my problem in browser:
https://i.imgur.com/xfFAfSh.png


问:
Impersonation without requesting the password
Current Status:

I am trying to use impersonation in ASP.NET Core MVC 3.1 and windows domain\user credentials.

Unfortunately, the method below is impersonating using identity from the application pool.

Target:

I need to stream the audio using the identity of the domain\user
hitting the method.

The user will be prompted by the browser to login into the windows domain ONLY ONCE in the main page

Impersonation needs to work without requesting the password, ever again

Code

```<code>public Task<IActionResult> StreamAudioLive(string path)
{

    WindowsIdentity.RunImpersonated(((WindowsIdentity)HttpContext.User.Identity).AccessToken, () =>
    {
        var fs = new FileStream(path, FileMode.Open, FileAccess.Read);

        return new FileStreamResult(fs, "audio/mp3")
        {
            EnableRangeProcessing = true,
        };
    });

    return null;
}
</code>```

Body:
Current Status:

I am trying to use impersonation in ASP.NET Core MVC 3.1 and windows domain\user credentials.

Unfortunately, the method below is impersonating using identity from the application pool.

Target:

I need to stream the audio using the identity of the domain\user
hitting the method.

The user will be prompted by the browser to login into the windows domain ONLY ONCE in the main page

Impersonation needs to work without requesting the password, ever again

Code

public Task<IActionResult> StreamAudioLive(string path)
{

    WindowsIdentity.RunImpersonated(((WindowsIdentity)HttpContext.User.Identity).AccessToken, () =>
    {
        var fs = new FileStream(path, FileMode.Open, FileAccess.Read);

        return new FileStreamResult(fs, "audio/mp3")
        {
            EnableRangeProcessing = true,
        };
    });

    return null;
}


问:
ipywidgets combobox: append custom data to options
The dropdown widget supports options made of tuples, containing one value to be displayed and one hidden value. The following example shows a list of three cities as displayed name and their locations as hidden information:

```<code>import ipywidgets as widgets
from IPython.display import display

d = widgets.Dropdown(
    options=[('London', [51, -0.2]), ('Berlin', [52, 13]), ('Paris', [48,2])],
    description='City:'
)

def o(values):
    print(f"jump to lat {values.new[0]} lon {values.new[1]}")

d.observe(o, names='value')
display(d)
</code>```

leading to

Considering a large number of options, a combobox would simplify the selection process. Unfortunately, this widget seems to support only simple options, with no hidden values. So it's possible to do something like this:

```<code>c = widgets.Combobox(
    options=['London','Berlin','Paris'],
    description='City:'
)

display(c)
</code>```

How can one easily achive the same functionality as shown with the dropdown, using a combobox?

As

```<code>c = widgets.Combobox(
    options=[('London', [51, -0.2]), ('Berlin', [52, 13]), ('Paris', [48,2])],
    description='City:'
)

</code>```

doesn't work, I implemented an options catalogue as an own object. The names will be displayed as combobox items. After picking on item, the catalogue will be queried to produce the desired output:

```<code>import ipywidgets as widgets
from IPython.display import display

#define options to be displayed
#consisting of citynames and their coordinates
options = [
    ['London', [51, -0.2]],
    ['Berlin', [52, 13]],
    ['Paris', [48,2]]
]

#create a combobox with empty options
c = widgets.Combobox(
    options=[],
    description='City:'
)

#create a tuple of options, which will only
#contain the city name
combo_options= []
for o in options:
    combo_options.append(o[0])
c.options = combo_options

#called function, which filters the options,
#based on the choosen cityname and prints
#thier locations
def co(values):
    for o in options:
        if o[0] == values.new:
            print(f"jump to lat {o[1][0]} lon {o[1][1]}")
            break

#append function and show combobox
c.observe(co, names='value')
display(d)
</code>```

Body:
The dropdown widget supports options made of tuples, containing one value to be displayed and one hidden value. The following example shows a list of three cities as displayed name and their locations as hidden information:

import ipywidgets as widgets
from IPython.display import display

d = widgets.Dropdown(
    options=[('London', [51, -0.2]), ('Berlin', [52, 13]), ('Paris', [48,2])],
    description='City:'
)

def o(values):
    print(f"jump to lat {values.new[0]} lon {values.new[1]}")

d.observe(o, names='value')
display(d)

leading to

Considering a large number of options, a combobox would simplify the selection process. Unfortunately, this widget seems to support only simple options, with no hidden values. So it's possible to do something like this:

c = widgets.Combobox(
    options=['London','Berlin','Paris'],
    description='City:'
)

display(c)

How can one easily achive the same functionality as shown with the dropdown, using a combobox?

As

c = widgets.Combobox(
    options=[('London', [51, -0.2]), ('Berlin', [52, 13]), ('Paris', [48,2])],
    description='City:'
)

doesn't work, I implemented an options catalogue as an own object. The names will be displayed as combobox items. After picking on item, the catalogue will be queried to produce the desired output:

import ipywidgets as widgets
from IPython.display import display

#define options to be displayed
#consisting of citynames and their coordinates
options = [
    ['London', [51, -0.2]],
    ['Berlin', [52, 13]],
    ['Paris', [48,2]]
]

#create a combobox with empty options
c = widgets.Combobox(
    options=[],
    description='City:'
)

#create a tuple of options, which will only
#contain the city name
combo_options= []
for o in options:
    combo_options.append(o[0])
c.options = combo_options

#called function, which filters the options,
#based on the choosen cityname and prints
#thier locations
def co(values):
    for o in options:
        if o[0] == values.new:
            print(f"jump to lat {o[1][0]} lon {o[1][1]}")
            break

#append function and show combobox
c.observe(co, names='value')
display(d)


问:
Partially initialized results in Hibernates StandardRowReader
I am trying to find out, why some attributes of my result are always null, despite the fact that they really hold data in the DB. Imagine something like this.

```<code>@Embeddable public class Address{
    public String zip;
    public String road;
    ...
    @Convert(converter = MyCustomConverter.class)
    public Boolean validated;
}

@Entity public class Person {
    @Embedded public Address address;
    ...
}
</code>```

I spend 3 Days debugging the internals of hibernate. This is what I found so far.

org.hibernate.sql.results.internal.StandardRowReader.readRow() calls coordinateInitializers().

There is one Initializer per attribute.

In case of my @Embeddable Address it calls AbstractEmbeddableInitializer.initializeInstance() which stores a completely initialized instance of Address including all its fieldvalues in AbstractEmbeddableInitializer.compositeInstance.

After that (in StandardRowReader.readRow()) EntityAssembler.assemble() is called which in turn calls EntityResultInitializer.resolveInstance() which returns a partially initialized instance of Person.

Partially means: Person.address.zip is null, Person.address.road is null, all the others are null,

except Person.address.validated which is correctly initialized with true

Now I would expect hibernate to call AbstractEmbeddableInitializer.getCompositeInstance() and use it's result to fill the empty fields in the Person instance, but this never happens. and I don't see why. Instead it just returns the incomplete Person and considers itself done.

I am using Hibernate 6.1.5. Could anybody please tell my, why this is happening?

Body:
I am trying to find out, why some attributes of my result are always null, despite the fact that they really hold data in the DB. Imagine something like this.

@Embeddable public class Address{
    public String zip;
    public String road;
    ...
    @Convert(converter = MyCustomConverter.class)
    public Boolean validated;
}

@Entity public class Person {
    @Embedded public Address address;
    ...
}

I spend 3 Days debugging the internals of hibernate. This is what I found so far.

org.hibernate.sql.results.internal.StandardRowReader.readRow() calls coordinateInitializers().

There is one Initializer per attribute.

In case of my @Embeddable Address it calls AbstractEmbeddableInitializer.initializeInstance() which stores a completely initialized instance of Address including all its fieldvalues in AbstractEmbeddableInitializer.compositeInstance.

After that (in StandardRowReader.readRow()) EntityAssembler.assemble() is called which in turn calls EntityResultInitializer.resolveInstance() which returns a partially initialized instance of Person.

Partially means: Person.address.zip is null, Person.address.road is null, all the others are null,

except Person.address.validated which is correctly initialized with true

Now I would expect hibernate to call AbstractEmbeddableInitializer.getCompositeInstance() and use it's result to fill the empty fields in the Person instance, but this never happens. and I don't see why. Instead it just returns the incomplete Person and considers itself done.

I am using Hibernate 6.1.5. Could anybody please tell my, why this is happening?