问:
HaplotypeCaller provide variants more than expected
I used HaplotypeCaller for variant calling out of WES picard.sorted.MarkedDup.bam file with GATK 4.2.6.1. HaplotypeCaller standard command line.

Apparently, everything worked well and I received standard .vcf file. But the number of identified variants are too much for WES result. It's close to one million variants for one sample!
Did I perform something wrong?
What solution do you recommend?
Any help would be appreciated.

The command line I used was as follow:

gatk --java-options -Xmx8g HaplotypeCaller \ -R $refFile \ -I ${base}.picard.sorted.markedDup.bam \ --dont-use-soft-clipped-bases -stand-call-conf 20.0 \ --emit-ref-confidence GVCF \ -O ${base}.rrrrealigned.vcf


来源: stackexchange

问:
How to pass url at runtime using curl command which in encoded with ` sign?
I am trying to pass url in curl command using bash script

```<code>URL=www.google.com
response=``curl --location --request GET  **${URL}** | jq . | grep buildVersion | awk '{print $2}' | sed 's/"//' | sed 's/"//' | sed 's/,//'``
echo $URL
</code>```

The command in response variable is encoded with `
Is there a way I can send URL variable at runtime ?

This works fine for me

```<code>response=``curl --location --request GET  www.google.com/data | jq . | grep buildVersion | awk '{print $2}' | sed 's/"//' | sed 's/"//' | sed 's/,//'`
</code>```

Note : URL is sample site

I want to pass url at runtime I tried sending the --url parameter

ContentLicense: CC BY-SA 4.0

Body:
I am trying to pass url in curl command using bash script

URL=www.google.com
response=``curl --location --request GET  **${URL}** | jq . | grep buildVersion | awk '{print $2}' | sed 's/"//' | sed 's/"//' | sed 's/,//'``
echo $URL

The command in response variable is encoded with `
Is there a way I can send URL variable at runtime ?

This works fine for me

response=``curl --location --request GET  www.google.com/data | jq . | grep buildVersion | awk '{print $2}' | sed 's/"//' | sed 's/"//' | sed 's/,//'`

Note : URL is sample site

I want to pass url at runtime I tried sending the --url parameter


问:
CI/CD with GitHub and Plesk
We succesfully use the Plesk / Github integration that deploys our developers pushes from github to our plesk stage web server using the Webhooks to have Plesk get the latest version. That works splendidly.

What we try to establish additionally is auto compile the SCSS source and submit the resulting css to our stage web server. We have added an action to the workflow but how would the compiled products end up on our stage webserver. I'm unsure if the timing in the complete workflow is right. Will the actions be performed before deployment?

This is the yaml:

on:
  push:
    branches:
      - stage

jobs:
  build_css:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout source Git branch
        uses: actions/checkout@v2
        with:
            ref: stage
            fetch-depth: 10
            submodules: true
      - name: Make destination directory for compiled CSS
        run: mkdir -vp /tmp/theme/assets/

      - name: Compile CSS from SCSS files
        uses: gha-utilities/sass-build@v0.4.11
        with:
          source: assets/src/main.scss
          destination: /tmp/theme/assets/

      - name: Move compiled CSS to path within stage branch
        run: mv /tmp/theme/assets assets/
```

Title: CI/CD with GitHub and Plesk


问:
i am getting configuration error after svn checkout .using VS 2022
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: An error occurred creating the configuration section handler for system.web.webPages.razor/host: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 4:
Line 5:
Line 6:
Line 7:
Line 8:

Source File: E:\eSTEM\estem\Coding\src\WebApi\views\web.config    Line: 6

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///E:/eSTEM/estem/Coding/src/WebApi/
LOG: Initial PrivatePath = E:\eSTEM\estem\Coding\src\WebApi\bin
Calling assembly : (Unknown).

LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\eSTEM\estem\Coding\src\WebApi\web.config
LOG: Using host configuration file: C:\Users\Hstpl\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Users/Hstpl/AppData/Local/Temp/Temporary ASP.NET Files/vs/dd21db9b/d3877c96/System.Web.WebPages.Razor.DLL.
LOG: Attempting download of new URL file:///C:/Users/Hstpl/AppData/Local/Temp/Temporary ASP.NET Files/vs/dd21db9b/d3877c96/System.Web.WebPages.Razor/System.Web.WebPages.Razor.DLL.
LOG: Attempting download of new URL file:///E:/eSTEM/estem/Coding/src/WebApi/bin/System.Web.WebPages.Razor.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9037.0

i have tried to run the project


问:
overflow hidden is not working when the input is focused
overflow hidden is not working when the input is focused

i put the classList for body no scroll when the component is opened,

```<code>document.body.classList.add('no-scroll')
</code>```

it is working well, and in this component i made popup as full screen
so the background body is not scrolling.

BUT when the input is focused, the classList is not working. overflow hidden is not working
and the input is not focused classList no-scroll is working again

have no idea for this reason

```<code>--css--
body.no-scroll {
    overflow: hidden !important;
}
</code>```

how to fix this?

Body:
overflow hidden is not working when the input is focused

i put the classList for body no scroll when the component is opened,

document.body.classList.add('no-scroll')

it is working well, and in this component i made popup as full screen
so the background body is not scrolling.

BUT when the input is focused, the classList is not working. overflow hidden is not working
and the input is not focused classList no-scroll is working again

have no idea for this reason

--css--
body.no-scroll {
    overflow: hidden !important;
}

how to fix this?


问:
Swagger restrict file upload types to image
Is there a way in Swagger UI to restric file upload type? For example if I want to allow only images to be uploaded how can I do that ?

Currently I have this in my api.yaml file:

```<code> consumes:
        - multipart/form-data
 content:
             image/*
</code>```

But its not working as expected.

Body:
Is there a way in Swagger UI to restric file upload type? For example if I want to allow only images to be uploaded how can I do that ?

Currently I have this in my api.yaml file:

 consumes:
        - multipart/form-data
 content:
             image/*

But its not working as expected.


问:
How to implement sliding in angular for login like pages
I am trying to implement login page with sliding animation.

As in the above image, in the sign up UI: after clicking on the login link login page contents should come in a way like we slide to right .... after that on login page when I enter email and password and click on login button then some validation will trigger if the validations are passed then it will slide and show the next layout like otp or change/set username

This is how I wamt to implement. I am not using any bootstrap.

How can I achieve this ?


问:
'true' is being shown when SWT Radio Button is clicked while UFT automation testing
We have a dialog, where we use table viewer and in one of the columns, we used a Boolean data which are shown in the form of radio buttons. While running an UFT based automation suite which clicks the radio button and also encounters a confirmation dialog and clicks some other radio button again. In that above process we encounter the issue which is not possible to encounter while testing manually.

I would like to know what the issue might be.
Let me know if there is a way to fix it.


问:
AgGrid-Enable Select All checkbox in header such that all except top three rows are selected while indivisual row selection works for every row?
I have a use case where I want to implement the select all checkbox in the header of Ag Grid React such that it selects all rows except a few rows. But I need the individual selection to work for all rows.

I tried the following but it disables individual selection for particular rows as well.

```<code>const isRowSelectable = useMemo(() => {
const lockedTemplates = ["foo", "bar",];
 return (params) => { return !lockedTemplates.includes(params.data.name);} }, []);
<AgGridReact isRowSelectable={isRowSelectable}>     {/* column definitions ... */} </AgGridReact>
</code>```

Thanks in advance.

Body:
I have a use case where I want to implement the select all checkbox in the header of Ag Grid React such that it selects all rows except a few rows. But I need the individual selection to work for all rows.

I tried the following but it disables individual selection for particular rows as well.

const isRowSelectable = useMemo(() => {
const lockedTemplates = ["foo", "bar",];
 return (params) => { return !lockedTemplates.includes(params.data.name);} }, []);
<AgGridReact isRowSelectable={isRowSelectable}>     {/* column definitions ... */} </AgGridReact>

Thanks in advance.


问:
Vim bind to execute vscode snippet
I was trying to create a vim binding to execute a snippet in vscode

I installed a react snippets extension, and instead of manually writing rafce, accepting the autocomplete and pressing Esc, I wanted to bind <leader>c to do it automatically.

I tried this binding

map <leader>c irafce<Enter><Esc>

And was expecting the Enter to accept the autocomplete, but it only writes the snippet without actually executing the snippet

Thank you in advance!

Title: Vim bind to execute vscode snippet


问:
iOS App has Application binary rpath set, and it's considered a vulnerability
I got the following ticket from my company's security testers:

Description: The binary has Runpath Search Path (@rpath) set. In certain cases an attacker can abuse this feature to run arbitrary executable for code execution and privilege escalation. Remove the compiler option -rpath to remove @rpath. Section "macho"

But this is an issue I never heard of. We are using Carthage for part of our dependencies and others are bundled with the app and used directly.

Current rpath values ar set as follows:


问:
Class 'ActionImageListFragmentToImageDetailsFragment' is not abstract and does not implement abstract member public abstract fun getActionId()
I want to send data between fragments using arguments but I get this error

```<code>e: C:\Users\aziz\StudioProjects\Imageswithbase\app\build\generated\source\navigation-args\debug\com\example\images\ui\ImageListFragmentDirections.kt: (10, 16): Class 'ActionImageListFragmentToImageDetailsFragment' is not abstract and does not implement abstract member public abstract fun getActionId(): Int defined in androidx.navigation.NavDirections
</code>```

when use click card view it suppose to open ImageDetailsFragment and arguments send author and downloadurl to ImageDetailsFragment

ImageGridAdpter

```<code>   override fun onBindViewHolder(holder: ImageViewHolder, position: Int) {
        val images = getItem(position)
        holder.bind(images)

        holder.card.setOnClickListener {
            val action = ImageListFragmentDirections.actionImageListFragmentToImageDetailsFragment(
                 author = images.author, downloadUrl = images.download_url
            )
            holder.itemView.findNavController().navigate(action)
    }
    }
</code>```

ImageDetailsFragment

```<code>    private lateinit var author:String
    private lateinit var download_url:String

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        arguments?.let {
            author = it.getString("author").toString()
            download_url = it.getString("download_url").toString()
        }
    }
</code>```

nag_graph

```<code> <fragment
        android:id="@+id/imageListFragment"
        android:name="com.example.images.ui.ImageListFragment"
        android:label="Images"
        tools:layout="@layout/fragment_image_list">
        <action
            android:id="@+id/action_imageListFragment_to_imageDetailsFragment"
            app:destination="@id/imageDetailsFragment" >

            <argument
                android:name="author"
                app:argType="string" />
            <argument
                android:name="download_url"
                app:argType="string" />

        </action>
    </fragment>

    <fragment
        android:id="@+id/imageDetailsFragment"
        android:name="com.example.images.ui.ImageDetailsFragment"
        android:label="Image"
        tools:layout="@layout/fragment_image_details" />

</code>```

Body:
I want to send data between fragments using arguments but I get this error

e: C:\Users\aziz\StudioProjects\Imageswithbase\app\build\generated\source\navigation-args\debug\com\example\images\ui\ImageListFragmentDirections.kt: (10, 16): Class 'ActionImageListFragmentToImageDetailsFragment' is not abstract and does not implement abstract member public abstract fun getActionId(): Int defined in androidx.navigation.NavDirections

when use click card view it suppose to open ImageDetailsFragment and arguments send author and downloadurl to ImageDetailsFragment

ImageGridAdpter

   override fun onBindViewHolder(holder: ImageViewHolder, position: Int) {
        val images = getItem(position)
        holder.bind(images)

        holder.card.setOnClickListener {
            val action = ImageListFragmentDirections.actionImageListFragmentToImageDetailsFragment(
                 author = images.author, downloadUrl = images.download_url
            )
            holder.itemView.findNavController().navigate(action)
    }
    }

ImageDetailsFragment

    private lateinit var author:String
    private lateinit var download_url:String

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        arguments?.let {
            author = it.getString("author").toString()
            download_url = it.getString("download_url").toString()
        }
    }

nag_graph

 <fragment
        android:id="@+id/imageListFragment"
        android:name="com.example.images.ui.ImageListFragment"
        android:label="Images"
        tools:layout="@layout/fragment_image_list">
        <action
            android:id="@+id/action_imageListFragment_to_imageDetailsFragment"
            app:destination="@id/imageDetailsFragment" >

            <argument
                android:name="author"
                app:argType="string" />
            <argument
                android:name="download_url"
                app:argType="string" />

        </action>
    </fragment>

    <fragment
        android:id="@+id/imageDetailsFragment"
        android:name="com.example.images.ui.ImageDetailsFragment"
        android:label="Image"
        tools:layout="@layout/fragment_image_details" />


问:
google sheets email notification when cell changes
I would like an email sent when a cell value is above a certain amount

I would like an email sent when cell c6 value  is >=4.Heres the script I'm currently using that does not send me an email

```<code>function sheetTracker(){
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var cell = ss.getActiveCell().getA1Notation();

    if(Session.getActiveUser()!='trdforlife@gmail.com' &&
       Number(ss.getActiveCell().getValue())>=4 && cell=='c6'){
        MailApp.sendEmail('yourmail@gmail.com', 'Modification in the spreadsheet',
       'Cell ' + cell + ' has been modified by '+ Session.getActiveUser() +
       ' - new value = ' + ss.getActiveCell().getValue().toString());
    }
}`your text`
</code>```

Body:
I would like an email sent when a cell value is above a certain amount

I would like an email sent when cell c6 value  is >=4.Heres the script I'm currently using that does not send me an email

function sheetTracker(){
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var cell = ss.getActiveCell().getA1Notation();

    if(Session.getActiveUser()!='trdforlife@gmail.com' &&
       Number(ss.getActiveCell().getValue())>=4 && cell=='c6'){
        MailApp.sendEmail('yourmail@gmail.com', 'Modification in the spreadsheet',
       'Cell ' + cell + ' has been modified by '+ Session.getActiveUser() +
       ' - new value = ' + ss.getActiveCell().getValue().toString());
    }
}`your text`


问:
Python MariaDb Hangs when requesting more than a few rows (say 20+), query works fine with limit 10
As described in the headline, tried using lastest mariadb from pypi, and with the latest package from github (https://github.com/mariadb-corporation/mariadb-connector-python)

The query works fine from the script with limit 10, after around that number it starts to just hang when i run curr.execute().

The query (below) runs in milliseconds even with limit 1000 when run in phpmyadmin.

My connect_timeout time in the mariadb.connect params is 30.

```<code>SELECT terms.term_id, terms.name, tax.taxonomy
FROM wp_terms AS terms
INNER JOIN wp_term_taxonomy AS tax
ON terms.term_id = tax.term_id
LIMIT 1000;
</code>```

Is there some timeout config I can't find?

Body:
As described in the headline, tried using lastest mariadb from pypi, and with the latest package from github (https://github.com/mariadb-corporation/mariadb-connector-python)

The query works fine from the script with limit 10, after around that number it starts to just hang when i run curr.execute().

The query (below) runs in milliseconds even with limit 1000 when run in phpmyadmin.

My connect_timeout time in the mariadb.connect params is 30.

SELECT terms.term_id, terms.name, tax.taxonomy
FROM wp_terms AS terms
INNER JOIN wp_term_taxonomy AS tax
ON terms.term_id = tax.term_id
LIMIT 1000;

Is there some timeout config I can't find?


问:
Octopus deploy error "no port showing when running a docker container in VM"?
I am trying to deploy a sample application in VM using 'run docker container' template.

Everything is working fine but no ports are showing up in the container details while I am explicitly mentioning host and container port.


问:
RangeError: offset is out of bounds when trying to render 3d objects in Cypress
I am using Cypress test runner for end to end testing for an Angular application that uses threeJS to render 3d objects in the scene. Everything works fine until I ask for the 3d scene to be rendered, which is giving the error 'RangeError: offset is out of bounds' and the 3d objects are not rendered. Note, this particular error is only showing up when I am using the chrome browser/Electron for Cypress testing. Otherwise it is being rendered on chrome without Cypress.

Using google chrome without Cypress:

I was just wondering what could be the reason for this issue?

I tried debugging using the chrome debugger (no error shown in the console) and everything seems to be working fine. I guess it is exclusively related to Cypress.


问:
Android tabs changing between activities
I have an application with 3 tabs. I have made the xml files to describe the layout and it works perfectly. But I'm stuck at this point. My tabs are A B C. I want when I click on tab A, the tabs B C to be replaced by another tab D. Are there any solutions for this?</p>

```<code><!-- language: java -->
public class AndroidTabLayoutActivity extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        TabHost tabHost = getTabHost();
        TabHost tabHost2 = getTabHost();

        // Tab for Photos
        TabSpec photospec = tabHost.newTabSpec("Photos");
        photospec.setIndicator("Photos", getResources().getDrawable(R.drawable.icon_photos_tab));
        Intent photosIntent = new Intent(this, LoginActivity.class);
        photospec.setContent(photosIntent);

        // Tab for Songs
        TabSpec songspec = tabHost.newTabSpec("Songs");
        // setting Title and Icon for the Tab
        songspec.setIndicator("Songs", getResources().getDrawable(R.drawable.icon_songs_tab));
        Intent songsIntent = new Intent(this, SettingsActivity.class);
        songspec.setContent(songsIntent);

        // Tab for Videos
        TabSpec videospec = tabHost.newTabSpec("Videos");
        videospec.setIndicator("Videos", getResources().getDrawable(R.drawable.icon_videos_tab));
        Intent videosIntent = new Intent(this, AboutActivity.class);
        videospec.setContent(videosIntent);

        // Adding all TabSpec to TabHost
        tabHost.addTab(photospec); // Adding photos tab
        tabHost.addTab(songspec); // Adding songs tab
        tabHost.addTab(videospec); // Adding videos tab
    }
}

<!-- language: xml -->
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"/>
    </LinearLayout>
</TabHost>
</code>```

Body:
I have an application with 3 tabs. I have made the xml files to describe the layout and it works perfectly. But I'm stuck at this point. My tabs are A B C. I want when I click on tab A, the tabs B C to be replaced by another tab D. Are there any solutions for this?

public class AndroidTabLayoutActivity extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        TabHost tabHost = getTabHost();
        TabHost tabHost2 = getTabHost();

        // Tab for Photos
        TabSpec photospec = tabHost.newTabSpec("Photos");
        photospec.setIndicator("Photos", getResources().getDrawable(R.drawable.icon_photos_tab));
        Intent photosIntent = new Intent(this, LoginActivity.class);
        photospec.setContent(photosIntent);

        // Tab for Songs
        TabSpec songspec = tabHost.newTabSpec("Songs");
        // setting Title and Icon for the Tab
        songspec.setIndicator("Songs", getResources().getDrawable(R.drawable.icon_songs_tab));
        Intent songsIntent = new Intent(this, SettingsActivity.class);
        songspec.setContent(songsIntent);

        // Tab for Videos
        TabSpec videospec = tabHost.newTabSpec("Videos");
        videospec.setIndicator("Videos", getResources().getDrawable(R.drawable.icon_videos_tab));
        Intent videosIntent = new Intent(this, AboutActivity.class);
        videospec.setContent(videosIntent);

        // Adding all TabSpec to TabHost
        tabHost.addTab(photospec); // Adding photos tab
        tabHost.addTab(songspec); // Adding songs tab
        tabHost.addTab(videospec); // Adding videos tab
    }
}

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"/>
    </LinearLayout>
</TabHost>


问:
How to run the acoustic index analysis of M (Median of the amplitude envelope) for multiple files in a folder in rStudio?
I am trying to run a acoustic analysis of M for multiple files in a folder. I tried various ways with loops, but really unexperienced with writing them so struggling. However, that doesn't seem to be the problem, because the error message I'll get the error message:

```<code>"Error in inputw(wave = wave, f = f, channel) :  argument "f" is missing, with no default".
</code>```

When I then define f (which according to the help information is the sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.), so adding "f=48000", I receive the error message: "Error in fft(wave) : non-numeric argument"

When I  run a single file out of the many, I do not have to define f at all. So I am a bit confused.

I understand that it is always more helpful adding your actual script in here, but if anyone can even help me with writing a loop for this that would be much appreciated. As mentioned before, I am very inexperience when it comes to that.

Looking forward to your answers and learn more.

Here is the code I wrote:

```<code>library(seewave) #for the package M
setwd("/Users/fiene123/Desktop/samples Sounds/August27-28_outside_Unit14_1am")
ldf <- list() # creates a list
listcsv <- dir(pattern = "*.wav") # creates the list of all the csv files in the directory
for (k in 1:length(listcsv)){
    ldf[[k]] <- M(listcsv[k], plot = FALSE)
}
</code>```

Body:
I am trying to run a acoustic analysis of M for multiple files in a folder. I tried various ways with loops, but really unexperienced with writing them so struggling. However, that doesn't seem to be the problem, because the error message I'll get the error message:

"Error in inputw(wave = wave, f = f, channel) :  argument "f" is missing, with no default".

When I then define f (which according to the help information is the sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.), so adding "f=48000", I receive the error message: "Error in fft(wave) : non-numeric argument"

When I  run a single file out of the many, I do not have to define f at all. So I am a bit confused.

I understand that it is always more helpful adding your actual script in here, but if anyone can even help me with writing a loop for this that would be much appreciated. As mentioned before, I am very inexperience when it comes to that.

Looking forward to your answers and learn more.

Here is the code I wrote:

library(seewave) #for the package M
setwd("/Users/fiene123/Desktop/samples Sounds/August27-28_outside_Unit14_1am")
ldf <- list() # creates a list
listcsv <- dir(pattern = "*.wav") # creates the list of all the csv files in the directory
for (k in 1:length(listcsv)){
    ldf[[k]] <- M(listcsv[k], plot = FALSE)
}


问:
How can I connect to a Jenkins agent using JDK8 when Jenkins itself uses JDK11?
I'm just getting started with Jenkins, and specifically i'm testing out a project that uses JDK8, and can't be upgraded to JDK11.

Now Jenkins as of July 2022 uses JDK11 internally, and I'm unsure how to get it to talk to an agent that uses JDK8, in order to build my project on said agent.

I'm using this guide, and i'm going down the jnlp route, so i'm spinning up a container per job (it's a freestyle job for now), using the jenkins/jnlp-slave:latest-jdk11 image, which seems to work fine. However when I switch to the jenkins/jnlp-slave:latest image (which uses JDK8), the container is unable to talk to Jenkins and I get this:

```<code>Inbound agent connected from 192.168.1.1/192.168.1.1:52636
java.lang.UnsupportedClassVersionError: hudson/slaves/SlaveComputer$SlaveVersion has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
    at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:453)
</code>```

Which implies Jenkins on JDK11 won't talk to an agent running JNLP JDK8. Now normally i'd know to just upgrade my JDK version, but that won't work here as my project specifically needs to build on JDK8.

How can I best resolve this? Modify the JDK8 docker image to use JDK11 to begin with but then switch on the fly via updating my PATH & JAVA_HOME to JDK8 when it comes to actually building my project?

Ideally i'd like to be able to build projects using either JDK8 or JDK11, depending on the docker image I pick for them.

Body:
I'm just getting started with Jenkins, and specifically i'm testing out a project that uses JDK8, and can't be upgraded to JDK11.

Now Jenkins as of July 2022 uses JDK11 internally, and I'm unsure how to get it to talk to an agent that uses JDK8, in order to build my project on said agent.

I'm using this guide, and i'm going down the jnlp route, so i'm spinning up a container per job (it's a freestyle job for now), using the jenkins/jnlp-slave:latest-jdk11 image, which seems to work fine. However when I switch to the jenkins/jnlp-slave:latest image (which uses JDK8), the container is unable to talk to Jenkins and I get this:

Inbound agent connected from 192.168.1.1/192.168.1.1:52636
java.lang.UnsupportedClassVersionError: hudson/slaves/SlaveComputer$SlaveVersion has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
    at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:453)

Which implies Jenkins on JDK11 won't talk to an agent running JNLP JDK8. Now normally i'd know to just upgrade my JDK version, but that won't work here as my project specifically needs to build on JDK8.

How can I best resolve this? Modify the JDK8 docker image to use JDK11 to begin with but then switch on the fly via updating my PATH & JAVA_HOME to JDK8 when it comes to actually building my project?

Ideally i'd like to be able to build projects using either JDK8 or JDK11, depending on the docker image I pick for them.


问:
Bootstrap+Jquery Styling Checkboxes as Buttongroup, nested hyperlink does not work
I use Bootstrap + jQuery and style Checkboxes as button-group.
Within the group is a ordinary hyperlink, but the link is not clickable...

I tried to use separated spans/divs around the label with data-toggle="buttons" just for the buttons. The hyperlink is working then, but is looks awful.

Before:

```<code>     <div class="input-group"  data-toggle="buttons">
            <label class="input-group-addon btn btn-danger btn-sm">
            <input type="checkbox" ...
</code>```

After:

```<code>     <div class="input-group">
        <span data-toggle="buttons">
            <label class="input-group-addon btn btn-danger btn-sm">
            <input type="checkbox" ...
</code>```

Anyone a better idea how to keep the style, but make the hyperlink clickable?

Second question, when I click the button twice (check -> uncheck), the button still shows the status checked until it looses its focus. How can I change that behaviour to loose the checked status right after the second click?

I have created a fiddle to demonstrate my problem here: https://jsfiddle.net/yg3no6q0/

Body:
I use Bootstrap + jQuery and style Checkboxes as button-group.
Within the group is a ordinary hyperlink, but the link is not clickable...

I tried to use separated spans/divs around the label with data-toggle="buttons" just for the buttons. The hyperlink is working then, but is looks awful.

Before:

            <input type="checkbox" ...

After:

            <input type="checkbox" ...

Anyone a better idea how to keep the style, but make the hyperlink clickable?

Second question, when I click the button twice (check -> uncheck), the button still shows the status checked until it looses its focus. How can I change that behaviour to loose the checked status right after the second click?

I have created a fiddle to demonstrate my problem here: https://jsfiddle.net/yg3no6q0/


问:
How can you export images from an .emd file with hyperspy?
Given a HAADF-STEM Spectrum Image (SI) as .emd (Velox) file, I want to extract all individual HAADF-images from the stack.

I assume there is an easy way with hyperspy, but I am unable to identify it.

My code so far:

```<code>import hyperspy.api as hs
path = r'C:\Users\SI_File.emd'
s = hs.load(path)
</code>```

Body:
Given a HAADF-STEM Spectrum Image (SI) as .emd (Velox) file, I want to extract all individual HAADF-images from the stack.

I assume there is an easy way with hyperspy, but I am unable to identify it.

My code so far:

import hyperspy.api as hs
path = r'C:\Users\SI_File.emd'
s = hs.load(path)


问:
When I start a gateway projcet , nothing happned in my pc ,but it failed launch in k8s pod , any one can help me?

(not good at english , forgive me for  any text grammar/word mistake)

The excption is

```<code>java.lang.IllegalStateException: Failed to introspect Class \[org.springframework.cloud.sleuth.propagation.SleuthTagPropagationAutoConfiguration$TagPropagationConfiguration\] from ClassLoader \[org.springframework.boot.loader.LaunchedURLClassLoader@51684e4a\]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:358)
at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:742)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:741)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:680)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:648)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1614)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:523)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:495)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:620)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:612)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1243)
at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:890)
at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:878)
at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:865)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:803)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:322)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236)
at com.hulk.service.gateway.teacher.HulkTeacherGatewayApplication.main(HulkTeacherGatewayApplication.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.VerifyError: Bad return type
Exception Details:
Location:
org/springframework/cloud/sleuth/propagation/SleuthTagPropagationAutoConfiguration$TagPropagationConfiguration.tagPropagationSpanHandler(Lorg/springframework/cloud/sleuth/autoconfig/SleuthProperties;Lorg/springframework/cloud/sleuth/propagation/SleuthTagPropagationProperties;)Lbrave/handler/SpanHandler; @9: areturn
Reason:
Type 'org/springframework/cloud/sleuth/propagation/TagPropagationFinishedSpanHandler' (current frame, stack\[0\]) is not assignable to 'brave/handler/SpanHandler' (from method signature)
Current Frame:
bci: @9
flags: { }
locals: { 'org/springframework/cloud/sleuth/autoconfig/SleuthProperties', 'org/springframework/cloud/sleuth/propagation/SleuthTagPropagationProperties' }
stack: { 'org/springframework/cloud/sleuth/propagation/TagPropagationFinishedSpanHandler' }
Bytecode:
0x0000000: bb00 0259 2a2b b700 03b0

    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.getDeclaredMethods(Class.java:1975)
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463)
    ... 29 common frames omitted
</code>```

**Here is some my project libs' version:
**

enter image description here

First I think it's vresion problem ,but i have a other gateway project what's lib's version are same is launched . now i have idea what should i do ;

i try search in goolgle to find same error msg, no one else

Body:
(not good at english , forgive me for  any text grammar/word mistake)

The excption is

java.lang.IllegalStateException: Failed to introspect Class \[org.springframework.cloud.sleuth.propagation.SleuthTagPropagationAutoConfiguration$TagPropagationConfiguration\] from ClassLoader \[org.springframework.boot.loader.LaunchedURLClassLoader@51684e4a\]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:358)
at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:742)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:741)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:680)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:648)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1614)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:523)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:495)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:620)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:612)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1243)
at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:890)
at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:878)
at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:865)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:803)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:322)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236)
at com.hulk.service.gateway.teacher.HulkTeacherGatewayApplication.main(HulkTeacherGatewayApplication.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.VerifyError: Bad return type
Exception Details:
Location:
org/springframework/cloud/sleuth/propagation/SleuthTagPropagationAutoConfiguration$TagPropagationConfiguration.tagPropagationSpanHandler(Lorg/springframework/cloud/sleuth/autoconfig/SleuthProperties;Lorg/springframework/cloud/sleuth/propagation/SleuthTagPropagationProperties;)Lbrave/handler/SpanHandler; @9: areturn
Reason:
Type 'org/springframework/cloud/sleuth/propagation/TagPropagationFinishedSpanHandler' (current frame, stack\[0\]) is not assignable to 'brave/handler/SpanHandler' (from method signature)
Current Frame:
bci: @9
flags: { }
locals: { 'org/springframework/cloud/sleuth/autoconfig/SleuthProperties', 'org/springframework/cloud/sleuth/propagation/SleuthTagPropagationProperties' }
stack: { 'org/springframework/cloud/sleuth/propagation/TagPropagationFinishedSpanHandler' }
Bytecode:
0x0000000: bb00 0259 2a2b b700 03b0

    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.getDeclaredMethods(Class.java:1975)
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463)
    ... 29 common frames omitted

**Here is some my project libs' version:
**

enter image description here

First I think it's vresion problem ,but i have a other gateway project what's lib's version are same is launched . now i have idea what should i do ;

i try search in goolgle to find same error msg, no one else


问:
freeswitch mod_xml_curl.c:468 Binding has no url
I am new to freeswitch and want to have a dynamic user directory. For this I want to use mod_xml_curl but when I load it I always get this error.

For information my freeswitch runs in a docker. I tried to run make mod_xml_curl-install and I get an error with make.

I don't know what to do


问:
How to give other users access to a SQLite Database via ODBC in Excel?
I have a Database file I work with in SQLite.

This file is aimed to be shared with other users so that they can access the data in Excel, using "Data"--> "Retrieve data" --> "From other sources" --> "From ODBC".

I've read already many tutorials and forums regarding my problem, but nothing helped already.

An installation of the SQLite ODBC driver from the popular Werner-page, a creation of a new DSN in the "ODBC Data source Admin", and the export of the respective Reg-file was already conducted in different ways (different 32-/64-Bits, System-/User-DSN).

Afterwards, I can open the resulting tables without problem in Excel via ODBC. But the users I shared the Reg-file with were not such successful. They only were able to import my sent Reg-file and select the suitable DSN-file in Excel ODBC. The problem starts when they want to access the data via Windows Authentification, which results in the following error message: Error message in German
In English, it is said in there: "Connection Error: ODBC: ERROR [IM002] [Microsoft][ODBC Driver Manager] The data source name was not found and no default driver was specified"

Can anyone explain the problem? A data source name (DSN) was given as I believe and I don't know how to handle the driver problem.

An authentification via Oracle itself instead of Windows is not an option, since I want to share the data among many people and I cannot expect an extra Oracle-registration from everyone. So, we did not even test the success via this authentification form. But somehow it has to be possible via Windows Login I believe..

Any advice would be appreciated! And please tell me if you need further info.
Thanks.


问:
How to custom tooltip in Spreadjs chart( multi chart types)
I'm use a Spreadjs chart. The tooltip will appear when I hover over a point data, the tooltip will be displayed. However, the tooltip uses the same structure when I hover over a column or any other point. And I want a different background tooltip for each type of chart. Can somebody assist me?
Here is image that can help you. enter image description here
Video for more details: https://drive.google.com/file/d/1u0ubNHcWALMo1taNHKL7BJpgbD1WTSTF/view?usp=share_link

Please help me to find the solutions! Thanks a lot.


问:
Parallax-Problem on resizing Revolution-Slider
I have a full-display revolution-slider with afew of layers on a Webpage. Any time I resize the height of the viewport, the layers moving from the left Side to the center. How can I stop this behavior?

This is my code:
`

```<code>  <div class="rev-slider-mask"></div>
  <!-- main text layer -->
  <div class="tp-caption tp-resizeme sliderMainText"
        id="slide-layer-01"
        data-frames='[{"delay":200,"speed":2000,"frame":"0","from":"y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;","mask":"x:0px;y:[-100%];s:inherit;e:inherit;","to":"o:1;","ease":"Power2.easeInOut"},{"delay":"wait","speed":500,"frame":"999","to":"auto:auto;","ease":"Power3.easeInOut"}]'
        data-type="text"
        data-whitespace="nowrap"
        data-x="['left','left','left','left']" data-hoffset="['70','20','50','30']"
        data-y="['middle','middle','middle','middle']" data-voffset="['50','100','85','120']"
        data-width="auto"
        data-height="auto"
        data-fontsize="['70','60','60','40']"
        data-lineheight="['80','80','80','50']"
        data-letterspacing="['0','0','0','0']"
        data-responsive="off"
        data-responsive_offset="off"
        data-paddingtop="['0','0','0','0']"
        data-paddingbottom="['15','8','8','8']"
        data-paddingright="['0','0','0','0']"
        data-paddingleft="['0','0','0','0']"
        style="text-shadow: 0 0 20px rgba(0,0,0,0.3); font-weight: 700; color:#fff;">Some Text to show!
  </div>
  <!-- btn layer -->
  <div class="tp-caption tp-resizeme btn_1"
        data-actions='[{"event":"click","action":"scrollbelow","offset":"3130px","delay":"","speed":"300","ease":"Linear.easeNone"}]'
        id="slide-layer-03"
        data-x="['left','left','left','left']" data-hoffset="['70','20','50','30']"
        data-y="['middle','middle','middle','middle']" data-voffset="['260','310','282','225']"
        data-whitespace="nowrap"
        data-type="button"
        data-responsive="off"
        data-responsive_offset="off"
        data-frames='[{"delay":1200,"speed":1000,"frame":"0","from":"y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;","mask":"x:0px;y:[-100%];s:inherit;e:inherit;","to":"o:1;","ease":"Power2.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"auto:auto;","ease":"Power3.easeInOut"}]'
        data-textAlign="['center','center','center','center']" style="line-height: 1; padding: 10px 15px; font-size: 16px;font-weight: 600;">Button_Text
  </div>
</li>
</code>```

`

I have searched for parallax-parameters, but I couldn't find any useful ones.

Body:
I have a full-display revolution-slider with afew of layers on a Webpage. Any time I resize the height of the viewport, the layers moving from the left Side to the center. How can I stop this behavior?

This is my code:
`

  <div class="tp-caption tp-resizeme sliderMainText"
        id="slide-layer-01"
        data-frames='[{"delay":200,"speed":2000,"frame":"0","from":"y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;","mask":"x:0px;y:[-100%];s:inherit;e:inherit;","to":"o:1;","ease":"Power2.easeInOut"},{"delay":"wait","speed":500,"frame":"999","to":"auto:auto;","ease":"Power3.easeInOut"}]'
        data-type="text"
        data-whitespace="nowrap"
        data-x="['left','left','left','left']" data-hoffset="['70','20','50','30']"
        data-y="['middle','middle','middle','middle']" data-voffset="['50','100','85','120']"
        data-width="auto"
        data-height="auto"
        data-fontsize="['70','60','60','40']"
        data-lineheight="['80','80','80','50']"
        data-letterspacing="['0','0','0','0']"
        data-responsive="off"
        data-responsive_offset="off"
        data-paddingtop="['0','0','0','0']"
        data-paddingbottom="['15','8','8','8']"
        data-paddingright="['0','0','0','0']"
        data-paddingleft="['0','0','0','0']"
        style="text-shadow: 0 0 20px rgba(0,0,0,0.3); font-weight: 700; color:#fff;">Some Text to show!

  <div class="tp-caption tp-resizeme btn_1"
        data-actions='[{"event":"click","action":"scrollbelow","offset":"3130px","delay":"","speed":"300","ease":"Linear.easeNone"}]'
        id="slide-layer-03"
        data-x="['left','left','left','left']" data-hoffset="['70','20','50','30']"
        data-y="['middle','middle','middle','middle']" data-voffset="['260','310','282','225']"
        data-whitespace="nowrap"
        data-type="button"
        data-responsive="off"
        data-responsive_offset="off"
        data-frames='[{"delay":1200,"speed":1000,"frame":"0","from":"y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;","mask":"x:0px;y:[-100%];s:inherit;e:inherit;","to":"o:1;","ease":"Power2.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"auto:auto;","ease":"Power3.easeInOut"}]'
        data-textAlign="['center','center','center','center']" style="line-height: 1; padding: 10px 15px; font-size: 16px;font-weight: 600;">Button_Text

`

I have searched for parallax-parameters, but I couldn't find any useful ones.


问:
How can I solve the problem of unstable Zed camera point cloud data?
I have been learning the ZED camera API for some time, but when I use the point cloud data from this camera to measure distances, the results are very erratic. I set the mode to standard and quality and the rest are default parameters. I have visited many blogs on the csdn website and other sites such as Knowing, but have not been able to get a better solution. The error reached 6 cm for objects measured at 5 m and 10 cm for objects measured 6 m away. I hope you can help me.</p>


问:
Very dull raster colors on folium map
I have a 4 band image (R,G,B,NIR) and I would like to print it on a folium map, but the result is not the same as what you see on QGIS, the image is very opaque and the colors very dull and I thought stretching the image might help. Can you help me?
I report the code used.
Thanks

```<code>import numpy as np
import folium
import rasterio

with rio.open(raster) as src:
    img = src.read()
    meta = src.meta
    meta['nodata'] = np.nan
    min_lon, min_lat, max_lon, max_lat = src.bounds

meta

{'driver': 'GTiff',
 'dtype': 'float64',
 'nodata': nan,
 'width': 52,
 'height': 28,
 'count': 4,
 'crs': CRS.from_epsg(4326),
 'transform': Affine(0.00011284198076925242, 0.0, 12.026403058,
        0.0, -0.0001128420000000574, 44.289920142)}

bounds_orig = [[min_lat, min_lon], [max_lat, max_lon]]
centerx,centery = (np.average((min_lon,max_lon)),np.average((min_lat,max_lat)))

m = folium.Map(location = [centery,centerx], tiles='OpenStreetMap', zoom_start = 17)

vmin, vmax = np.nanpercentile(img.transpose(1, 2, 0), (10,90))

m.add_child( folium.raster_layers.ImageOverlay(img.transpose(1, 2, 0),name = 'raster',
                                              bounds = bounds_orig,opacity=1,
                                               colormap=[vmin,vmax]))
</code>```

Folium result

QGIS result

Title: Very dull raster colors on folium map

Body:
I have a 4 band image (R,G,B,NIR) and I would like to print it on a folium map, but the result is not the same as what you see on QGIS, the image is very opaque and the colors very dull and I thought stretching the image might help. Can you help me?
I report the code used.
Thanks

import numpy as np
import folium
import rasterio

with rio.open(raster) as src:
    img = src.read()
    meta = src.meta
    meta['nodata'] = np.nan
    min_lon, min_lat, max_lon, max_lat = src.bounds

meta

{'driver': 'GTiff',
 'dtype': 'float64',
 'nodata': nan,
 'width': 52,
 'height': 28,
 'count': 4,
 'crs': CRS.from_epsg(4326),
 'transform': Affine(0.00011284198076925242, 0.0, 12.026403058,
        0.0, -0.0001128420000000574, 44.289920142)}

bounds_orig = [[min_lat, min_lon], [max_lat, max_lon]]
centerx,centery = (np.average((min_lon,max_lon)),np.average((min_lat,max_lat)))

m = folium.Map(location = [centery,centerx], tiles='OpenStreetMap', zoom_start = 17)

vmin, vmax = np.nanpercentile(img.transpose(1, 2, 0), (10,90))

m.add_child( folium.raster_layers.ImageOverlay(img.transpose(1, 2, 0),name = 'raster',
                                              bounds = bounds_orig,opacity=1,
                                               colormap=[vmin,vmax]))

Folium result

QGIS result


问:
How can i get the male female percentage in MSSQL server
This is how my table looks like,Here is 1 is male and 2 is female

```<code>Id  Gender
1     1
2     2
3     2
4     1
</code>```

this is how i expected the answer

code that i tried

```<code>Select
 Pt.Id,
 Pt.Gender,
 sum(case when Gender= 1 then 1 else 0 end) as maleCount,
 sum(case when Gender= 2 then 1 else 0 end) as femalecount

 from Patients Pt
 WHERE Pt.Isactive = 1 and Pt.IsDeleted=0
 Group by Pt.Id,Pt.Gender
</code>```

I want to get the male and female percentage.How can i achieve it

Body:
This is how my table looks like,Here is 1 is male and 2 is female

Id  Gender
1     1
2     2
3     2
4     1

this is how i expected the answer

code that i tried

Select
 Pt.Id,
 Pt.Gender,
 sum(case when Gender= 1 then 1 else 0 end) as maleCount,
 sum(case when Gender= 2 then 1 else 0 end) as femalecount

 from Patients Pt
 WHERE Pt.Isactive = 1 and Pt.IsDeleted=0
 Group by Pt.Id,Pt.Gender

I want to get the male and female percentage.How can i achieve it


问:
Gateway timeout error when opening JupyterLab
i have a cluster in Google Cloud with a static IP set up. This has been working fine more than a year. Recently I noticed that when I start the cluster and try to open JupyterLabs I get a gateway timeout error or "This page isn't working ...dataproc.googleusercontent.com is currently unable to handle this request".

I have scheduled jobs running on this cluster and they run just fine. I have other clusters and when I open those up it's also fine.

I just thinking is there any other fix I could try than just redoing the cluster.

Thanks


问:
v-calendar datepicker span wrapper issue
I am using the v-calendar datepicker and it works well, however when I use a template to create custom html, it wraps the output in a span.  Is there anyway to get rid of this span as it is hard to style as no class is put onto it - and it also makes the html invalid as I have divs in the template

Run the below snippet and inspect the date text - you'll see the span around the template content

new Vue({
  el: "#app",
  data() {
    return {
      singleDate: null,
      dateMasks: {
        input: 'DD/MM/YYYY',
      },
    };
  },
});```
<pre class="snippet-code-css lang-css prettyprint-override"><code>@import url 'https://unpkg.com/v-calendar@2.3.4/lib/v-calendar.min.css';</code>```

  <v-date-picker v-model="singleDate" color="orange" :masks="dateMasks" :disabled-dates="{ weekdays: [1, 7] }">
    <template #default="{ inputValue, togglePopover }">

            Date from
            {{ inputValue }}

    </template>
  </v-date-picker>

```

Body:
I am using the v-calendar datepicker and it works well, however when I use a template to create custom html, it wraps the output in a span.  Is there anyway to get rid of this span as it is hard to style as no class is put onto it - and it also makes the html invalid as I have divs in the template

Run the below snippet and inspect the date text - you'll see the span around the template content

new Vue({
  el: "#app",
  data() {
    return {
      singleDate: null,
      dateMasks: {
        input: 'DD/MM/YYYY',
      },
    };
  },
});

@import url 'https://unpkg.com/v-calendar@2.3.4/lib/v-calendar.min.css';

  <v-date-picker v-model="singleDate" color="orange" :masks="dateMasks" :disabled-dates="{ weekdays: [1, 7] }">
    <template #default="{ inputValue, togglePopover }">

            Date from
            {{ inputValue }}

    </template>
  </v-date-picker>


问:
How to parse CAN bus data
I have a CAN bus charger which broadcasts battery charge level, but I am unable to parse the incoming data.
I use Node.js to capture the data and I receive (for example) following HEX values from the charger:

```<code>09e6000000
f5e5000000
</code>```

Device datasheet states, that this message is 40 bits long. And it contains

```<code>Start bit 0, length 20, factor 0.001 - battery voltage
Start bit 20, length 18, factor 0.001 - charging current
Start bit 38, length 1, factor 1 - fault
Start bit 39, length 1, factor 1 - charging
</code>```

I understand, that I should convert the HEX values to binary, using online calculator I can convert it as follows

```<code>09e6000000 -> 100111100110000000000000000000000000
</code>```

Now if I extract first 20 values, 10011110011000000000 and again, using online calculator to convert it to demical I get 648704

If I take second HEX value and follow same process I get

```<code>f5e5000000 -> 1111010111100101000000000000000000000000 -> 11110101111001010000 -> 1007184
</code>```

Something is terribly wrong, since these two HEX values should have been around 59.000. What I am doing wrong?

Title: How to parse CAN bus data

Body:
I have a CAN bus charger which broadcasts battery charge level, but I am unable to parse the incoming data.
I use Node.js to capture the data and I receive (for example) following HEX values from the charger:

09e6000000
f5e5000000

Device datasheet states, that this message is 40 bits long. And it contains

Start bit 0, length 20, factor 0.001 - battery voltage
Start bit 20, length 18, factor 0.001 - charging current
Start bit 38, length 1, factor 1 - fault
Start bit 39, length 1, factor 1 - charging

I understand, that I should convert the HEX values to binary, using online calculator I can convert it as follows

09e6000000 -> 100111100110000000000000000000000000

Now if I extract first 20 values, 10011110011000000000 and again, using online calculator to convert it to demical I get 648704

If I take second HEX value and follow same process I get

f5e5000000 -> 1111010111100101000000000000000000000000 -> 11110101111001010000 -> 1007184

Something is terribly wrong, since these two HEX values should have been around 59.000. What I am doing wrong?


问:
Yaml repeat block
This is my first time using yaml. I want to create a conatiner group in azure using yaml file:

```<code>apiVersion: 2019-12-01
location: eastus
name: myContainerGroup
properties:
  containers:
  - name: aci-tutorial-app
    properties:
      image: mcr.microsoft.com/azuredocs/aci-helloworld:latest
      resources:
        requests:
          cpu: 1
          memoryInGb: 1.5
      ports:
      - port: 80
      - port: 8080
  - name: aci-tutorial-sidecar
    properties:
      image: mcr.microsoft.com/azuredocs/aci-tutorial-sidecar
      resources:
        requests:
          cpu: 1
          memoryInGb: 1.5
  osType: Linux
  ipAddress:
    type: Public
    ports:
    - protocol: tcp
      port: 80
    - protocol: tcp
      port: 8080
tags: {exampleTag: tutorial}
type: Microsoft.ContainerInstance/containerGroups
</code>```

But i want that if var=3  then yaml is going to create 3 blocks of aci

```<code> - name: aci-tutorial-sidecar
    properties:
      image: mcr.microsoft.com/azuredocs/aci-tutorial-sidecar
      resources:
        requests:
          cpu: 1
          memoryInGb: 1.5
</code>```

Thanks.

Title: Yaml repeat block

Body:
This is my first time using yaml. I want to create a conatiner group in azure using yaml file:

apiVersion: 2019-12-01
location: eastus
name: myContainerGroup
properties:
  containers:
  - name: aci-tutorial-app
    properties:
      image: mcr.microsoft.com/azuredocs/aci-helloworld:latest
      resources:
        requests:
          cpu: 1
          memoryInGb: 1.5
      ports:
      - port: 80
      - port: 8080
  - name: aci-tutorial-sidecar
    properties:
      image: mcr.microsoft.com/azuredocs/aci-tutorial-sidecar
      resources:
        requests:
          cpu: 1
          memoryInGb: 1.5
  osType: Linux
  ipAddress:
    type: Public
    ports:
    - protocol: tcp
      port: 80
    - protocol: tcp
      port: 8080
tags: {exampleTag: tutorial}
type: Microsoft.ContainerInstance/containerGroups

But i want that if var=3  then yaml is going to create 3 blocks of aci

 - name: aci-tutorial-sidecar
    properties:
      image: mcr.microsoft.com/azuredocs/aci-tutorial-sidecar
      resources:
        requests:
          cpu: 1
          memoryInGb: 1.5

Thanks.


问:
FullCalendar - Changing the URL of Google Events
I've got a FullCalendar instance with multiple Google calendars displaying correctly on my site.

I'm able to disable the click action on the events to stop people from clicking through to the Google calendar link, but I was wondering if I'm able to change that link to something else? Ideally if someone clicked on an event, they'd be taken to a section lower down the page.

No matter what I seem to do though, I can't seem to change the default away from being the Google calendar link, I've tried adding a url option, that hasn't worked and I've tried a couple of the suggestions from here, but can't seem to make it work. Any ideas?


问:
How to exclude upstream packages from a private GitHub NuGet package feed
I'm using the GitHub Package to host some private NuGet packages.

I notice the feed includes upstream packages (e.g. Newtonsoft.Json, EntityFramework) in my private feed. How do I exclude them?

On Azure Artifacts, as shown in this link, we can turn it off through setting But how do we do the samethe  for GitHub package feed?


问:
Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true
I'm troubleshooting performance because of users complaining of low FPS & I seem to be getting this warning and any attempts to trace it leads me to HERE's built-in functions.

I think I understand what it means, and perhaps it's not the root of the problem, but it's my only lead.
Other than that the project is applying everything from HERE's 'Best Practices' doc.

Also, any tips that can help improve performance are GREATLY appreciated.

Thanks!


问:
how to compare difference between datetime column field and current datetime with specific amount of seconds in sqlalchemy python
In MySql database, I have a column "created_at" with datatype as datetime.
I want to check whether the difference between a created_at value and current datetime(datetime.datetime.utcnow()) is greater than 60sec.

I could not get difference between them as the created_at value is a sqlalchemy object and current datetime is a datetime.datetime typed value.

I want to implement it using sqlalchemy with python.


问:
How to realtime search in encrypted NoSQL database?
I am currently working on an EHR-similar project with my database being realtime database on Firebase. I have important data such as patient information encrypted before pushing it into the database, but then I have a page where the doctor will search through patients, it’s ofcourse a massive mistake to pull all patients, decrypt them, and then search through then with my code.
I have found some solution such as Acra search and more, but I’m not sure if there’s a best-practice approach for what I’m looking for (p.s. I need to search in between records, for example if I search by name and the patient is John, I want it to show John if I just type “hn”, and to also be able to search by a variety of data, phone/email/name/..etc)</p>


问:
IllegalArgumentException when using createPendingIntent() method
I'm trying to show push notifications in Android 12 but I'm getting this error:

```<code>IllegalArgumentException Targeting S+ requires that one of FLAG_INMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
</code>```

To show notifications I'm doing this:

```<code>val contentIntent = NavDeepLinkBuilder(this).apply{
   setComponentName(MainActivity::class.java)
   setGraph(R.navigation.nav_graph)
   setDestination(R.id.dialog_custom)
   setArguments(arguments)}.createPendingIntent()

val notification = NotificationCompat.Builder(this, channelId).apply{
   setSmallIcon(R.drawable.ic_icon_notification)
   setContentTitle(...)
   setContentText(...)
   setStyle(...)
   setContentIntent(contentIntent)
   setAutoCancel(true)}.build()
</code>```

How can I fix this error? I tried to add PendingIntent.FLAG_IMMUTABLE in createPendingIntent() arguments but it's not possible. Any idea?

Edit:  I'm using version 2.5.1 of Navigation library so, I should have this changes applied in my version https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0-alpha04

Edit 2:

This is the stacktrace:

```<code>   Fatal Exception: java.lang.IllegalArgumentException: com.example.myapplication: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
       at android.app.PendingIntent.checkFlags(PendingIntent.java:378)
       at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:461)
       at android.app.PendingIntent.getActivity(PendingIntent.java:447)
       at android.app.PendingIntent.getActivity(PendingIntent.java:411)
       at com.google.firebase.messaging.CommonNotificationBuilder.createContentIntent(com.google.firebase:firebase-messaging@@20.3.0:125)
       at com.google.firebase.messaging.CommonNotificationBuilder.createNotificationInfo(com.google.firebase:firebase-messaging@@20.3.0:27)
       at com.google.firebase.messaging.CommonNotificationBuilder.createNotificationInfo(com.google.firebase:firebase-messaging@@20.3.0:9)
       at com.google.firebase.messaging.DisplayNotification.handleNotification(com.google.firebase:firebase-messaging@@20.3.0:27)
       at com.google.firebase.messaging.FirebaseMessagingService.dispatchMessage(com.google.firebase:firebase-messaging@@20.3.0:65)
       at com.google.firebase.messaging.FirebaseMessagingService.passMessageIntentToSdk(com.google.firebase:firebase-messaging@@20.3.0:44)
       at com.google.firebase.messaging.FirebaseMessagingService.handleMessageIntent(com.google.firebase:firebase-messaging@@20.3.0:27)
       at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(com.google.firebase:firebase-messaging@@20.3.0:17)
       at com.google.firebase.messaging.EnhancedIntentService.lambda$processIntent$0$EnhancedIntentService(com.google.firebase:firebase-messaging@@20.3.0:43)
       at com.google.firebase.messaging.EnhancedIntentService$$Lambda$0.run(:6)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.0.0:2)
       at java.lang.Thread.run(Thread.java:920)
</code>```

Body:
I'm trying to show push notifications in Android 12 but I'm getting this error:

IllegalArgumentException Targeting S+ requires that one of FLAG_INMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

To show notifications I'm doing this:

val contentIntent = NavDeepLinkBuilder(this).apply{
   setComponentName(MainActivity::class.java)
   setGraph(R.navigation.nav_graph)
   setDestination(R.id.dialog_custom)
   setArguments(arguments)}.createPendingIntent()

val notification = NotificationCompat.Builder(this, channelId).apply{
   setSmallIcon(R.drawable.ic_icon_notification)
   setContentTitle(...)
   setContentText(...)
   setStyle(...)
   setContentIntent(contentIntent)
   setAutoCancel(true)}.build()

How can I fix this error? I tried to add PendingIntent.FLAG_IMMUTABLE in createPendingIntent() arguments but it's not possible. Any idea?

Edit:  I'm using version 2.5.1 of Navigation library so, I should have this changes applied in my version https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0-alpha04

Edit 2:

This is the stacktrace:

   Fatal Exception: java.lang.IllegalArgumentException: com.example.myapplication: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
       at android.app.PendingIntent.checkFlags(PendingIntent.java:378)
       at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:461)
       at android.app.PendingIntent.getActivity(PendingIntent.java:447)
       at android.app.PendingIntent.getActivity(PendingIntent.java:411)
       at com.google.firebase.messaging.CommonNotificationBuilder.createContentIntent(com.google.firebase:firebase-messaging@@20.3.0:125)
       at com.google.firebase.messaging.CommonNotificationBuilder.createNotificationInfo(com.google.firebase:firebase-messaging@@20.3.0:27)
       at com.google.firebase.messaging.CommonNotificationBuilder.createNotificationInfo(com.google.firebase:firebase-messaging@@20.3.0:9)
       at com.google.firebase.messaging.DisplayNotification.handleNotification(com.google.firebase:firebase-messaging@@20.3.0:27)
       at com.google.firebase.messaging.FirebaseMessagingService.dispatchMessage(com.google.firebase:firebase-messaging@@20.3.0:65)
       at com.google.firebase.messaging.FirebaseMessagingService.passMessageIntentToSdk(com.google.firebase:firebase-messaging@@20.3.0:44)
       at com.google.firebase.messaging.FirebaseMessagingService.handleMessageIntent(com.google.firebase:firebase-messaging@@20.3.0:27)
       at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(com.google.firebase:firebase-messaging@@20.3.0:17)
       at com.google.firebase.messaging.EnhancedIntentService.lambda$processIntent$0$EnhancedIntentService(com.google.firebase:firebase-messaging@@20.3.0:43)
       at com.google.firebase.messaging.EnhancedIntentService$$Lambda$0.run(:6)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.0.0:2)
       at java.lang.Thread.run(Thread.java:920)


问:
Post Request with Enum and composite key
I'm working on an exercise where i have to create CRUD operations.
I have a User table, a Role table and a UserRole table where i have the primary keys of those two entities.
I also have a RoleEnum with roles that have to be assigned to the User.
The problem that i'm gettin is that every time I insert a new user is a 200ok response but the role returns null and so it doesn't add it to the UserRole table as well.
I need help in solving the problem.

User Entity

```<code>@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "utente")
public class Utente implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long matricola;
    @Column(nullable = false)
    private String nome;
    @Column(nullable = false)
    private String cognome;
    @Column(nullable = false)
    private String email;
    @Column(name = "ruoloUtente", nullable = false)
    @OneToMany(mappedBy = "matricolaUtente")
    @JsonIgnore
    private List<UtenteRuolo> ruoloUtente;
}
</code>```

Role Entity

```<code>@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ruolo")
public class Ruolo implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    @Column(name = "tipo_ruolo")
    private String nome;
    @Column(name = "utente_ruolo")
    @OneToMany(mappedBy = "nomeRuolo")
    private Set<UtenteRuolo> utenteRuolo;
}
</code>```

UserRole class

```<code>@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "utente_ruolo")
public class UtenteRuolo implements Serializable {
    @EmbeddedId
    private UtenteRuoloId utenteRuoloId;
    @ManyToOne
    @MapsId("matricola")
    @JoinColumn(name = "matricola_utente", nullable = false)
    private Utente matricolaUtente;
    @ManyToOne
    @MapsId("id")
    @JoinColumn(name = "nome_ruolo", nullable = false)
    private Ruolo nomeRuolo;
}
</code>```

UserRoleId class

```<code>@Embeddable
@Data
@EqualsAndHashCode
@AllArgsConstructor
@NoArgsConstructor
public class UtenteRuoloId implements Serializable {
    @Column(name = "matricola")
    private Long matricola;
    @Column(name = "id")
    private Long id;
}

</code>```

RoleEnum class

```<code>public enum RuoliEnum {
    @JsonProperty
    REFERENTE("REFERENTE"),
    CONSULTATORE("CONSULTATORE"),
    APPROVATORE("APPROVATORE");

    @JsonProperty
    private String value;

    RuoliEnum(String value) { this.value = value; }

    @JsonCreator
    public static RuoliEnum fromValue(String text) {
        for (RuoliEnum ruoli: RuoliEnum.values()) {
            if (String.valueOf(ruoli.value).equalsIgnoreCase(text.trim())) {
                return ruoli;
            }
        }
        return null;
    }
}
</code>```

I also have all DTO's and the UserDTO has the RoleEnum instead of the List of class UserRole.

UserService

```<code>@Service
public class UtenteService {
    @Autowired
    private UtenteRepository utenteRepository;
    @Autowired
    private UtenteMap utenteMap;

    public UtenteDto addUtente(UtenteDto utente) {
        Utente u = utenteMap.fromDtoToModel(utente);
        if(u != null) {
           return utenteMap.fromModelToDto(utenteRepository.save(u));
        }
        return null;
    }
</code>```

UserController

```<code>@RestController
@RequestMapping("utente")
public class UtenteController {
    @Autowired
    private UtenteService utenteService;

    @PostMapping("/addUtente")
    public ResponseEntity addUtente(@Nullable @RequestBody UtenteDto utente) {
        if(utente != null) {
            return ResponseEntity.ok(utenteService.addUtente(utente));
        } else {
            return ResponseEntity.badRequest().body("utente non inserito correttamente");
        }
    }
</code>```

this is a postman insert example:

```<code>{
    "matricola" : 11,
    "nome" : "aaa",
    "cognome" : "bb",
    "email" : "eee@mail.com",
    "ruolo" : "APPROVATORE"
}
</code>```

and this is the postman response with 200ok status:

```<code>{
    "matricola": 11,
    "nome": "aaa",
    "cognome": "bb",
    "email": "eee@mail.com",
    "ruolo": null
}
</code>```

the code doesn't tell me about any kind of error and i need to keep the UserRole table because it's required for this kind of exercise.

I tried everything I could but since I never worked like this with enums and this kind of table relations I don't know what's missing to complete it.

Body:
I'm working on an exercise where i have to create CRUD operations.
I have a User table, a Role table and a UserRole table where i have the primary keys of those two entities.
I also have a RoleEnum with roles that have to be assigned to the User.
The problem that i'm gettin is that every time I insert a new user is a 200ok response but the role returns null and so it doesn't add it to the UserRole table as well.
I need help in solving the problem.

User Entity

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "utente")
public class Utente implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long matricola;
    @Column(nullable = false)
    private String nome;
    @Column(nullable = false)
    private String cognome;
    @Column(nullable = false)
    private String email;
    @Column(name = "ruoloUtente", nullable = false)
    @OneToMany(mappedBy = "matricolaUtente")
    @JsonIgnore
    private List<UtenteRuolo> ruoloUtente;
}

Role Entity

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ruolo")
public class Ruolo implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    @Column(name = "tipo_ruolo")
    private String nome;
    @Column(name = "utente_ruolo")
    @OneToMany(mappedBy = "nomeRuolo")
    private Set<UtenteRuolo> utenteRuolo;
}

UserRole class

@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "utente_ruolo")
public class UtenteRuolo implements Serializable {
    @EmbeddedId
    private UtenteRuoloId utenteRuoloId;
    @ManyToOne
    @MapsId("matricola")
    @JoinColumn(name = "matricola_utente", nullable = false)
    private Utente matricolaUtente;
    @ManyToOne
    @MapsId("id")
    @JoinColumn(name = "nome_ruolo", nullable = false)
    private Ruolo nomeRuolo;
}

UserRoleId class

@Embeddable
@Data
@EqualsAndHashCode
@AllArgsConstructor
@NoArgsConstructor
public class UtenteRuoloId implements Serializable {
    @Column(name = "matricola")
    private Long matricola;
    @Column(name = "id")
    private Long id;
}

RoleEnum class

public enum RuoliEnum {
    @JsonProperty
    REFERENTE("REFERENTE"),
    CONSULTATORE("CONSULTATORE"),
    APPROVATORE("APPROVATORE");

    @JsonProperty
    private String value;

    RuoliEnum(String value) { this.value = value; }

    @JsonCreator
    public static RuoliEnum fromValue(String text) {
        for (RuoliEnum ruoli: RuoliEnum.values()) {
            if (String.valueOf(ruoli.value).equalsIgnoreCase(text.trim())) {
                return ruoli;
            }
        }
        return null;
    }
}

I also have all DTO's and the UserDTO has the RoleEnum instead of the List of class UserRole.

UserService

@Service
public class UtenteService {
    @Autowired
    private UtenteRepository utenteRepository;
    @Autowired
    private UtenteMap utenteMap;

    public UtenteDto addUtente(UtenteDto utente) {
        Utente u = utenteMap.fromDtoToModel(utente);
        if(u != null) {
           return utenteMap.fromModelToDto(utenteRepository.save(u));
        }
        return null;
    }

UserController

@RestController
@RequestMapping("utente")
public class UtenteController {
    @Autowired
    private UtenteService utenteService;

    @PostMapping("/addUtente")
    public ResponseEntity addUtente(@Nullable @RequestBody UtenteDto utente) {
        if(utente != null) {
            return ResponseEntity.ok(utenteService.addUtente(utente));
        } else {
            return ResponseEntity.badRequest().body("utente non inserito correttamente");
        }
    }

this is a postman insert example:

{
    "matricola" : 11,
    "nome" : "aaa",
    "cognome" : "bb",
    "email" : "eee@mail.com",
    "ruolo" : "APPROVATORE"
}

and this is the postman response with 200ok status:

{
    "matricola": 11,
    "nome": "aaa",
    "cognome": "bb",
    "email": "eee@mail.com",
    "ruolo": null
}

the code doesn't tell me about any kind of error and i need to keep the UserRole table because it's required for this kind of exercise.

I tried everything I could but since I never worked like this with enums and this kind of table relations I don't know what's missing to complete it.


问:
SimpleXLSXGen: generated excel file is showing to be corrupted
I am trying to generate an excel file in PHP using the SimpleXLSXGen library. This is my code:

```<code><?php
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    header('Content-Type: text/plain; charset=utf-8');

    require __DIR__.'/vendor/shuchkin/simplexlsxgen/src/SimpleXLSXGen.php';
    use \Shuchkin\SimpleXLSXGen as SimpleXLSXGen;

    $arr = array();

    /*some logic here to populate my array*/

    $xlsx = new SimpleXLSXGen;
    $xlsx::fromArray($arr)
        ->setDefaultFont('Courier New')
        ->setDefaultFontSize(12)
        ->saveAs("..files/file.xlsx");
?>
</code>```

This code used to work before, but now when I execute it, I keep getting a corrupted excel file generated. Everytime I open the file, it keeps showing:

Excel cannot open the file 'file.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file

I have also debugged the $arr that I am pushing into my excel file, and it has the correct values. So why is the generated excel file showing to be corrupted?

Body:
I am trying to generate an excel file in PHP using the SimpleXLSXGen library. This is my code:

<?php
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    header('Content-Type: text/plain; charset=utf-8');

    require __DIR__.'/vendor/shuchkin/simplexlsxgen/src/SimpleXLSXGen.php';
    use \Shuchkin\SimpleXLSXGen as SimpleXLSXGen;

    $arr = array();

    /*some logic here to populate my array*/

    $xlsx = new SimpleXLSXGen;
    $xlsx::fromArray($arr)
        ->setDefaultFont('Courier New')
        ->setDefaultFontSize(12)
        ->saveAs("..files/file.xlsx");
?>

This code used to work before, but now when I execute it, I keep getting a corrupted excel file generated. Everytime I open the file, it keeps showing:

Excel cannot open the file 'file.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file

I have also debugged the $arr that I am pushing into my excel file, and it has the correct values. So why is the generated excel file showing to be corrupted?


问:
Expose JBOSS Webservices only via CA Authentication
I'm currently trying to fix in issue in our JBOSS Deployment with different SOAP Endpoints, we trying to close the Webservice Interface over https(port 8443) to only allow it via CA Authentication (port 8444).

We are Using JBOSS 7.4.7 and JDK 11

Here are the JBOSS Standalone Configurations:

```<code><socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="https" port="8443"/>
    <socket-binding name="httpsca" port="8444"/>
</socket-binding-group>
[...]
<subsystem xmlns="urn:jboss:domain:undertow:12.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
    <buffer-cache name="default"/>
    <server name="default-server">
        <https-listener name="https" socket-binding="https" max-post-size="0" secure="true" ssl-context="ssl"/>
        <https-listener name="httpsca" socket-binding="httpsca" max-post-size="0" secure="true" ssl-context="sslca"/>
    </server>
[...]
<subsystem xmlns="urn:jboss:domain:webservices:2.0" statistics-enabled="${wildfly.webservices.statistics-enabled:${wildfly.statistics-enabled:false}}">
    <modify-wsdl-address>true</modify-wsdl-address>
    <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
    <wsdl-port>8444</wsdl-port>
    <wsdl-secure-port>8444</wsdl-secure-port>
    <endpoint-config name="Standard-Endpoint-Config"/>
    <endpoint-config name="Recording-Endpoint-Config"/>
    <client-config name="Standard-Client-Config"/>
</subsystem>
</code>```
```<code><tls>
    <key-stores>
        <key-store name="test">
            <credential-reference clear-text="****"/>
            <implementation type="JKS"/>
            <file path="ssl_keystore.jks" relative-to="jboss.server.config.dir"/>
        </key-store>
        <key-store name="test-trusted">
            <credential-reference clear-text="****"/>
            <implementation type="JKS"/>
            <file path="ssl_truststore.jks" relative-to="jboss.server.config.dir"/>
        </key-store>
    </key-stores>
    <key-managers>
        <key-manager name="serverssl" key-store="test">
            <credential-reference clear-text="****"/>
        </key-manager>
    </key-managers>
    <trust-managers>
        <trust-manager name="serverssl-ca" key-store="test-trusted"/>
    </trust-managers>
    <server-ssl-contexts>
        <server-ssl-context name="test-ssl" cipher-suite-filter="TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_256_GCM_SHA384" cipher-suite-names="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" protocols="TLSv1.2 TLSv1.3" key-manager="serverssl"/>
        <server-ssl-context name="test-sslca" cipher-suite-filter="TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_256_GCM_SHA384" cipher-suite-names="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" protocols="TLSv1.2 TLSv1.3" need-client-auth="true" key-manager="serverssl" trust-manager="serverssl-ca"/>
    </server-ssl-contexts>
</tls>
</code>```

We are having trouble setting only one Port for the WSDL Endpoint.

1. If I don't set <wsdl-secure-port>, then the JBOSS throws an error because it trys to create a http endpoint which is not active at all.It also occurs if I only set the <wsdl-secure-port> and not the <wsdl-port>.

Are we doing something wrong or is that a bug from JBOSS ?

Thanks for any help and tips in advice.

Body:
I'm currently trying to fix in issue in our JBOSS Deployment with different SOAP Endpoints, we trying to close the Webservice Interface over https(port 8443) to only allow it via CA Authentication (port 8444).

We are Using JBOSS 7.4.7 and JDK 11

Here are the JBOSS Standalone Configurations:

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="https" port="8443"/>
    <socket-binding name="httpsca" port="8444"/>
</socket-binding-group>
[...]
<subsystem xmlns="urn:jboss:domain:undertow:12.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
    <buffer-cache name="default"/>
    <server name="default-server">
        <https-listener name="https" socket-binding="https" max-post-size="0" secure="true" ssl-context="ssl"/>
        <https-listener name="httpsca" socket-binding="httpsca" max-post-size="0" secure="true" ssl-context="sslca"/>
    </server>
[...]
<subsystem xmlns="urn:jboss:domain:webservices:2.0" statistics-enabled="${wildfly.webservices.statistics-enabled:${wildfly.statistics-enabled:false}}">
    <modify-wsdl-address>true</modify-wsdl-address>
    <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
    <wsdl-port>8444</wsdl-port>
    <wsdl-secure-port>8444</wsdl-secure-port>
    <endpoint-config name="Standard-Endpoint-Config"/>
    <endpoint-config name="Recording-Endpoint-Config"/>
    <client-config name="Standard-Client-Config"/>
</subsystem>

<tls>
    <key-stores>
        <key-store name="test">
            <credential-reference clear-text="****"/>
            <implementation type="JKS"/>
            <file path="ssl_keystore.jks" relative-to="jboss.server.config.dir"/>
        </key-store>
        <key-store name="test-trusted">
            <credential-reference clear-text="****"/>
            <implementation type="JKS"/>
            <file path="ssl_truststore.jks" relative-to="jboss.server.config.dir"/>
        </key-store>
    </key-stores>
    <key-managers>
        <key-manager name="serverssl" key-store="test">
            <credential-reference clear-text="****"/>
        </key-manager>
    </key-managers>
    <trust-managers>
        <trust-manager name="serverssl-ca" key-store="test-trusted"/>
    </trust-managers>
    <server-ssl-contexts>
        <server-ssl-context name="test-ssl" cipher-suite-filter="TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_256_GCM_SHA384" cipher-suite-names="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" protocols="TLSv1.2 TLSv1.3" key-manager="serverssl"/>
        <server-ssl-context name="test-sslca" cipher-suite-filter="TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_256_GCM_SHA384" cipher-suite-names="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" protocols="TLSv1.2 TLSv1.3" need-client-auth="true" key-manager="serverssl" trust-manager="serverssl-ca"/>
    </server-ssl-contexts>
</tls>

We are having trouble setting only one Port for the WSDL Endpoint.

1. If I don't set <wsdl-secure-port>, then the JBOSS throws an error because it trys to create a http endpoint which is not active at all.It also occurs if I only set the <wsdl-secure-port> and not the <wsdl-port>.

Are we doing something wrong or is that a bug from JBOSS ?

Thanks for any help and tips in advice.