问:
trigger intent (UserUttered) from custom action in rasa
I want to trigger an intent from custom action in rasa. My action is like this:

```<code>class ActionTriggerIntent(Action):

def name(self) -> Text:
    return "action_trigger_intent"

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

    dispatcher.utter_message(text="Hello World!")
    evt = UserUttered("hi")
    return [evt]
</code>```

However when i run this, getting error:

```<code>jsonschema.exceptions.ValidationError: {'event': 'user', 'timestamp': None, 'text': 'hi', 'parse_data': None, 'input_channel': None} is not valid under any of the given schemas. Failed to validate Action server response from API, make sure your response from the Action endpoint is valid. For more information about the format visit https://rasa.com/docs/rasa/custom-actions
</code>```

Need some help.

Thanks

Body:
I want to trigger an intent from custom action in rasa. My action is like this:

class ActionTriggerIntent(Action):

def name(self) -> Text:
    return "action_trigger_intent"

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

    dispatcher.utter_message(text="Hello World!")
    evt = UserUttered("hi")
    return [evt]

However when i run this, getting error:

jsonschema.exceptions.ValidationError: {'event': 'user', 'timestamp': None, 'text': 'hi', 'parse_data': None, 'input_channel': None} is not valid under any of the given schemas. Failed to validate Action server response from API, make sure your response from the Action endpoint is valid. For more information about the format visit https://rasa.com/docs/rasa/custom-actions

Need some help.

Thanks


来源: stackexchange

问:
Powershell Remoting from windows to windows on different domain
I want to connect two windows server on different domains using powershell remoting.

I follows step that given in below blog
https://activedirectoryfaq.com/2018/09/import-powershell-sessions-from-computers-in-another-domain/
but it did not work for me. By following this blog, on connection it gives
**
Enter-PSSession : Connecting to remote server  failed with the following error message : WinRM cannot
process the request. The following error occurred while using Kerberos authentication: Cannot find the computer
. Verify that the computer exists on the network and that the name provided is spelled correctly. For
more information, see the about_Remote_Troubleshooting Help topic
**

client server is windows server 2022 machine (powershell version 5.1.20348.1366)
remote server is windows server 2016 machine (powershell version 5.1.14393.1480)

Help me with it.

ContentLicense: CC BY-SA 4.0


问:
Failure in SSIS connection manager
I'm new to SSIS. I have tried to use the ODBC connection manager that was already in the list to extract the source data, but failed with the following error message:
The AcquireConnection method call to the connection manager failed with error code 0xC0014009.

The ODBC connection manager is connected to IBM informix.

I have referred to the existing projects and found that they all used the same connection manager and it works fine.
I have tried the 'Test Connection' and it went well. But when I execute the package, error came out.
What could be the possible reason that I can't use the existing connection manager?

Title: Failure in SSIS connection manager


问:
Ignore rotation when using transform.translate. [Topdown 2D]
This is part of the logic from my movement code:

```<code>transform.Translate(velocity * Time.deltaTime);

velocity.x = Mathf.MoveTowards(velocity.x, runSpeed * moveInputX, changeRatePerSecond * Time.deltaTime);
velocity.y = Mathf.MoveTowards(velocity.y, runSpeed * moveInputY, changeRatePerSecond * Time.deltaTime);
</code>```

When I apply rotation though, the movement gets effected.

Body:
This is part of the logic from my movement code:

transform.Translate(velocity * Time.deltaTime);

velocity.x = Mathf.MoveTowards(velocity.x, runSpeed * moveInputX, changeRatePerSecond * Time.deltaTime);
velocity.y = Mathf.MoveTowards(velocity.y, runSpeed * moveInputY, changeRatePerSecond * Time.deltaTime);

When I apply rotation though, the movement gets effected.


问:
postgreSQL - is there default history table available in postgreSQL?
we have just started to work on the PostgreSQL. is there below SQL history table like functionality available in PostgreSQL?

```<code>CREATE TABLE dbo.Temporal_Table_Demo
(
  [DempID] int NOT NULL PRIMARY KEY CLUSTERED
  , [DepName] nvarchar(100) NOT NULL
  , [DepLocation] varchar(100) NOT NULL
  , [NumOfEmp] int NOT NULL
  , [TimeStart] datetime2 (2) GENERATED ALWAYS AS ROW START
  , [TimeEnd] datetime2 (2) GENERATED ALWAYS AS ROW END
  , PERIOD FOR SYSTEM_TIME (TimeStart, TimeEnd)
 )
 WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.Temporal_Table_Demo_History));
</code>```

Thanks

Body:
we have just started to work on the PostgreSQL. is there below SQL history table like functionality available in PostgreSQL?

CREATE TABLE dbo.Temporal_Table_Demo
(
  [DempID] int NOT NULL PRIMARY KEY CLUSTERED
  , [DepName] nvarchar(100) NOT NULL
  , [DepLocation] varchar(100) NOT NULL
  , [NumOfEmp] int NOT NULL
  , [TimeStart] datetime2 (2) GENERATED ALWAYS AS ROW START
  , [TimeEnd] datetime2 (2) GENERATED ALWAYS AS ROW END
  , PERIOD FOR SYSTEM_TIME (TimeStart, TimeEnd)
 )
 WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.Temporal_Table_Demo_History));

Thanks


问:
Sort By ascending Order for Vb.net File List
I want to order the file list according to the file name in ascending order to merge these all files. This is not only two files. More than 100 files in there
my file names like 0.pdf,1.pdf,2.pdf,3.pdf …etc

This is my VB.NET Code:

```<code>Dim files = Directory.GetFiles(directoryName, "*.*", SearchOption.TopDirectoryOnly).OrderBy(Function(f) New FileInfo(f).FullName)
For Each pdf In files
    Using pdfDoc As PdfSharp.Pdf.PdfDocument = PdfSharp.Pdf.IO.PdfReader.Open(pdf, PdfSharp.Pdf.IO.PdfDocumentOpenMode.Import)

        For i As Integer = 0 To pdfDoc.PageCount - 1
            targetDoc.AddPage(pdfDoc.Pages(i))
        Next
    End Using
Next
targetDoc.Save(directoryName + "\merged.pdf")
</code>```

I tried using
 Dim files = Directory.GetFiles(directoryName, "*.*", SearchOption.TopDirectoryOnly).OrderBy(Function(f) New FileInfo(f).FullName)
but it gives me the wrong output like this 0.pdf,1.pdf,11.pdf,12.pdf,...,2.pdf.21.pdf,22.pdf...etc

Please help me to order these files according to the filename in ascending order. Thank you

Body:
I want to order the file list according to the file name in ascending order to merge these all files. This is not only two files. More than 100 files in there
my file names like 0.pdf,1.pdf,2.pdf,3.pdf …etc

This is my VB.NET Code:

Dim files = Directory.GetFiles(directoryName, "*.*", SearchOption.TopDirectoryOnly).OrderBy(Function(f) New FileInfo(f).FullName)
For Each pdf In files
    Using pdfDoc As PdfSharp.Pdf.PdfDocument = PdfSharp.Pdf.IO.PdfReader.Open(pdf, PdfSharp.Pdf.IO.PdfDocumentOpenMode.Import)

        For i As Integer = 0 To pdfDoc.PageCount - 1
            targetDoc.AddPage(pdfDoc.Pages(i))
        Next
    End Using
Next
targetDoc.Save(directoryName + "\merged.pdf")

I tried using
 Dim files = Directory.GetFiles(directoryName, "*.*", SearchOption.TopDirectoryOnly).OrderBy(Function(f) New FileInfo(f).FullName)
but it gives me the wrong output like this 0.pdf,1.pdf,11.pdf,12.pdf,...,2.pdf.21.pdf,22.pdf...etc

Please help me to order these files according to the filename in ascending order. Thank you


问:
Issue redirecting to the home screen when the server is inactive
I have a project that I created with
asp.net core.
In this project,

```<code>HttpContext.SignInAsync(),
</code>```

I import my user. My problem is that the timeout I gave to delete the cookie in local works properly, but when it starts working on the server, it sends login again within 5 minutes when I do not take action.  When I spoke to the hosting bought server authorities, IIS applications were allowed 5 minutes and if no action was taken, the server would go to sleep. I keep going back to login. How can I extend this period or help if I keep sending requests so that the server does not shut down?

You need ideas or information to solve this problem. They didn't do a try

Login service

```<code>   claims.Add(new Claim(ClaimTypes.NameIdentifier, result.Id.ToString()));

                var claimsIdentity = new ClaimsIdentity(
                    claims, CookieAuthenticationDefaults.AuthenticationScheme);

                var authProperties = new AuthenticationProperties
                {
                    IsPersistent = /*dto.RememberMe*/ true,
                };

              await HttpContext.SignInAsync(
                    CookieAuthenticationDefaults.AuthenticationScheme,
                    new ClaimsPrincipal(claimsIdentity),
                    authProperties);

                return role;
            }
</code>```

Startup.cs

```<code>    services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
            .AddCookie(opt => {
            opt.Cookie.Name = "";
            opt.ExpireTimeSpan = TimeSpan.FromSeconds(99999);
                opt.Cookie.IsEssential = true;
                opt.ReturnUrlParameter = "/Account/SignIn";
                opt.LogoutPath = "/Account/SignIn";
                opt.LoginPath = "/Account/SignIn";
                opt.AccessDeniedPath= "/Account/SignIn";
            });

</code>```

Body:
I have a project that I created with
asp.net core.
In this project,

HttpContext.SignInAsync(),

I import my user. My problem is that the timeout I gave to delete the cookie in local works properly, but when it starts working on the server, it sends login again within 5 minutes when I do not take action.  When I spoke to the hosting bought server authorities, IIS applications were allowed 5 minutes and if no action was taken, the server would go to sleep. I keep going back to login. How can I extend this period or help if I keep sending requests so that the server does not shut down?

You need ideas or information to solve this problem. They didn't do a try

Login service

   claims.Add(new Claim(ClaimTypes.NameIdentifier, result.Id.ToString()));

                var claimsIdentity = new ClaimsIdentity(
                    claims, CookieAuthenticationDefaults.AuthenticationScheme);

                var authProperties = new AuthenticationProperties
                {
                    IsPersistent = /*dto.RememberMe*/ true,
                };

              await HttpContext.SignInAsync(
                    CookieAuthenticationDefaults.AuthenticationScheme,
                    new ClaimsPrincipal(claimsIdentity),
                    authProperties);

                return role;
            }

Startup.cs

    services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
            .AddCookie(opt => {
            opt.Cookie.Name = "";
            opt.ExpireTimeSpan = TimeSpan.FromSeconds(99999);
                opt.Cookie.IsEssential = true;
                opt.ReturnUrlParameter = "/Account/SignIn";
                opt.LogoutPath = "/Account/SignIn";
                opt.LoginPath = "/Account/SignIn";
                opt.AccessDeniedPath= "/Account/SignIn";
            });


问:
Is it possible to use Application.Ontime and then close excel?
Is it possible to schedule a countdown using Applicaton.OnTime and then close excel expecting it to trigger?

I've written this code for testing purposes, which works fine:

Sub AutoRun()
' ---------------------------
' Run code here each schedule
' ---------------------------

' Save the date/time to a variable
' Calculate the time 10 seconds from now
ScheduleTime = Int(Now()) + Time() + TimeValue("00:00:10")

' Print the current time and the scheduled time to the debug window
Debug.Print "Time is now: " & Time() & " - Schedule added at " & ScheduleTime

' Save the scheduled time if cancellation is required
Range("W1").Value = ScheduleTime

' Schedule the AutoRun procedure to run between the scheduled time and up to 30 minutes later
Application.OnTime ScheduleTime, "AutoRun", ScheduleTime + TimeValue("00:30:00")

' This cancels the schedule?
' -----------------
' ThisWorkbook.Saved
' Application.Quit
' ----------------
End Sub
```

But if I add Application.Quit after the schedule it won't start excel and run the schedule again.

I've tried to use ThisWorkbook.Close, the schedule will run but it does not close excel completely.

Googling only seems to find the opposite issue where a schedule will continue to open and run on a workbook even if it's closed.

Body:
Is it possible to schedule a countdown using Applicaton.OnTime and then close excel expecting it to trigger?

I've written this code for testing purposes, which works fine:

Sub AutoRun()
' ---------------------------
' Run code here each schedule
' ---------------------------

' Save the date/time to a variable
' Calculate the time 10 seconds from now
ScheduleTime = Int(Now()) + Time() + TimeValue("00:00:10")

' Print the current time and the scheduled time to the debug window
Debug.Print "Time is now: " & Time() & " - Schedule added at " & ScheduleTime

' Save the scheduled time if cancellation is required
Range("W1").Value = ScheduleTime

' Schedule the AutoRun procedure to run between the scheduled time and up to 30 minutes later
Application.OnTime ScheduleTime, "AutoRun", ScheduleTime + TimeValue("00:30:00")

' This cancels the schedule?
' -----------------
' ThisWorkbook.Saved
' Application.Quit
' ----------------
End Sub

But if I add Application.Quit after the schedule it won't start excel and run the schedule again.

I've tried to use ThisWorkbook.Close, the schedule will run but it does not close excel completely.

Googling only seems to find the opposite issue where a schedule will continue to open and run on a workbook even if it's closed.


问:
GCP - Identify which IAM user executes a Cloud SQL connection in the logs
We would like to identify which IAM user executes a Cloud SQL Proxy connection in the logs.
However, we can see this message:

```<code>  "textPayload": "2022-11-14 10:41:29.849 UTC [358324]: [1-1] db=[unknown],user=[unknown] LOG:  connection received: host=[local]",

</code>```

We have the following flags enabled in the Postgres database:

cloudsql.enable_pgaudit = ON

pgaudit.log = all

log_connections = On

log_disconnections = On

We would like to know what other missing properties we need to set to have that "db" and "user" fields populated properly.

Extra info: https://medium.com/google-cloud/correlate-statement-logs-in-cloudsql-for-postgres-with-connection-sessions-5bae4ade38f5

Thanks.

Body:
We would like to identify which IAM user executes a Cloud SQL Proxy connection in the logs.
However, we can see this message:

  "textPayload": "2022-11-14 10:41:29.849 UTC [358324]: [1-1] db=[unknown],user=[unknown] LOG:  connection received: host=[local]",

We have the following flags enabled in the Postgres database:

cloudsql.enable_pgaudit = ON

pgaudit.log = all

log_connections = On

log_disconnections = On

We would like to know what other missing properties we need to set to have that "db" and "user" fields populated properly.

Extra info: https://medium.com/google-cloud/correlate-statement-logs-in-cloudsql-for-postgres-with-connection-sessions-5bae4ade38f5

Thanks.


问:
How can we set and get the transaction data details for new orders
After placing the order we need to get the transaction details.In the database i'm getting only three order data of old orders, if we hardcode for those three order data in db we get the details in magento backend.
If we place new order we are not getting the data both in db as well as admin backend.

I have created two columns in both db as well as admin backend ie, payment code and transaction amount.added payment code and transaction amount column in db

added payment code and transaction amount columns in admin backend

in admin two columns are created.

Now we have to set and get the data of transaction in the grid.like this we are supposed to get, but i'm getting empty grid,empty grid which i'm getting, could you help to resolve this?


问:
Django download a file with a wrong utf-8 encoder
I trying to make an api to download file from server folder but have some problem with encoder. This is my code:

```<code>@login_required(redirect_field_name="next",login_url='login_form')
def downloadMachineLog(request):
   if(request.method == "GET"):
      fileName = request.GET.get('fileName')
      BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
      filePath = BASE_DIR+"\\reminder\\log\\"+fileName
      file_is_exists = exists(filePath)
      print(filePath)
      if(file_is_exists):
         with open(filePath,'r',encoding='utf-8-sig') as file:
            mime_type,_ = mimetypes.guess_type(filePath)
            response = HttpResponse(file,content_type = mime_type+"charset=utf-8-sig")
            response['Content-Disposition'] = "attachment; filename=%s" % fileName
         return response
      else:
         return HttpResponse("This log is not exists")
   else:
      return HttpResponse("Error")
</code>```

The log file was generated using "utf-8-sig" encode. It can read fine on the server side. But if the file is downloaded from the client side the encode is wrong and shows unexpected text.

I need to download the file and be able to keep the encoder properly. what was I missing?

Body:
I trying to make an api to download file from server folder but have some problem with encoder. This is my code:

@login_required(redirect_field_name="next",login_url='login_form')
def downloadMachineLog(request):
   if(request.method == "GET"):
      fileName = request.GET.get('fileName')
      BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
      filePath = BASE_DIR+"\\reminder\\log\\"+fileName
      file_is_exists = exists(filePath)
      print(filePath)
      if(file_is_exists):
         with open(filePath,'r',encoding='utf-8-sig') as file:
            mime_type,_ = mimetypes.guess_type(filePath)
            response = HttpResponse(file,content_type = mime_type+"charset=utf-8-sig")
            response['Content-Disposition'] = "attachment; filename=%s" % fileName
         return response
      else:
         return HttpResponse("This log is not exists")
   else:
      return HttpResponse("Error")

The log file was generated using "utf-8-sig" encode. It can read fine on the server side. But if the file is downloaded from the client side the encode is wrong and shows unexpected text.

I need to download the file and be able to keep the encoder properly. what was I missing?


问:
How to upload a zip file on fbapp
I was trying to upload a game to
My fb developer but an error occur saying,the game must reference our support SDK and CDN please help

I have try to upload another file but the same error occur

Title: How to upload a zip file on fbapp


问:
Could not write JSON: For input string: "PARENT"; nested exception is com.fasterxml.jackson.databind.JsonMappingException:
Any hint or help would be greatly appreciated it.
I am using Java 17 and jpa with spring boot.

I get the following error:
nested exception is

org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: For input string: "PARENT"; nested exception is com.fasterxml.jackson.databind.JsonMappingException: For input string: "PARENT" (through reference chain: com.bank.account.model.ChoreEntity["createUserId"]->com.bank.account.model.UserEntity["role"]->com.bank.account.model.RoleEntity$HibernateProxy$LSkoyC50["roleName"])

ChoreEntity.java:

```<code>                @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
                @ManyToOne(fetch = FetchType.EAGER, optional = false)
                @JoinColumn(name = "create_user_id", nullable = false)
                @OnDelete(action= OnDeleteAction.CASCADE)
                private UserEntity createUserId;

                @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
                @ManyToOne(fetch = FetchType.EAGER, optional = false)
                @JoinColumn(name = "assign_user_id", nullable = false)
                @OnDelete(action= OnDeleteAction.CASCADE)
                private UserEntity assignUserId;

                Hibernate:
                insert
                into
                chore
                (amount, chore_status_id, create_user_id, name, chore_id)
                values
                (?, ?, ?, ?, ?)

</code>```

In this posting:
No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor

In the ChoreEntity.java I added based on the above stackoverflow:
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})

In the application.properties file I also added:
spring.jackson.serialization.fail-on-empty-beans=false

This error occur after line 36:

Body:
Any hint or help would be greatly appreciated it.
I am using Java 17 and jpa with spring boot.

I get the following error:
nested exception is

org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: For input string: "PARENT"; nested exception is com.fasterxml.jackson.databind.JsonMappingException: For input string: "PARENT" (through reference chain: com.bank.account.model.ChoreEntity["createUserId"]->com.bank.account.model.UserEntity["role"]->com.bank.account.model.RoleEntity$HibernateProxy$LSkoyC50["roleName"])

ChoreEntity.java:

                @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
                @ManyToOne(fetch = FetchType.EAGER, optional = false)
                @JoinColumn(name = "create_user_id", nullable = false)
                @OnDelete(action= OnDeleteAction.CASCADE)
                private UserEntity createUserId;

                @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
                @ManyToOne(fetch = FetchType.EAGER, optional = false)
                @JoinColumn(name = "assign_user_id", nullable = false)
                @OnDelete(action= OnDeleteAction.CASCADE)
                private UserEntity assignUserId;

                Hibernate:
                insert
                into
                chore
                (amount, chore_status_id, create_user_id, name, chore_id)
                values
                (?, ?, ?, ?, ?)

In this posting:
No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor

In the ChoreEntity.java I added based on the above stackoverflow:
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})

In the application.properties file I also added:
spring.jackson.serialization.fail-on-empty-beans=false

This error occur after line 36:


问:
postgres - parameters set by user are persisted or last just till that user session?
I am using postgres 13.5 and DBeaver for accessing the DB.

From DBeaver from my non-admin user if I set below values -

set random_page_cost = 1;  and

set enable_seqscan = off;

will these values -

reflect for other sessions of my user

reflect for other users sessions

are they changed permanently in the db or

are they just session specific. (this is the case i guess)

Related Q -

Before setting these values i would like to see their current values.

(Note: i know that for random page cost, i could do some thing like select name,setting from pg_settings where name like '%cost';  but i am trying to find if there is an even generic way to know the value(s) of variables, without knowing the table in which they are stored. )

How can I read these values. Is there anything like -
read random_page_cost or display random_page_cost etc.


问:
webaudio gainNode envelope
I have this code

```<code>function readSimpleAudio(){
    if (tableObjet[objActif].file!="" || tableObjet[objActif].file===undefined) {
        source="";
        source=contextAudio.createBufferSource();
        source.buffer = tableObjet[objActif].buffer;
        source.onended = () => {
            sourcEtat=0;
        };
        var typevar=tableObjet[objActif].envType;
        const gainNode = contextAudio.createGain();
        var now = contextAudio.currentTime;
        var nduree=source.buffer.duration*(1/tableObjet[objActif].transposition);
        const waveArray = new Float32Array(5); //                                      selection type enveloppe
        if(typevar==3){ //                                                                CurveAtTime
            for(i=0;i<5;i++){
                waveArray[i] = tableObjet[objActif].gain*tableObjet[objActif].envY[i];
            }
            gainNode.gain.setValueCurveAtTime(waveArray, now, now+nduree);
            console.log("duree",source.buffer.duration,waveArray,nduree);
        }else{
            gainNode.gain.setValueAtTime(tableObjet[objActif].gain*tableObjet[objActif].envY[0],now);
            for(i=1;i<5;i++){
                switch(typevar) {
                    case 1: //                                                               linearRampToValueAtTime
                        gainNode.gain.linearRampToValueAtTime(tableObjet[objActif].gain*tableObjet[objActif].envY[i], now + (nduree*tableObjet[objActif].envX[i]));
                        break;
                    case 2: //                                                               exponentialRampToValueAtTime
                        gainNode.gain.exponentialRampToValueAtTime(tableObjet[objActif].gain*tableObjet[objActif].envY[i], now + (nduree*tableObjet[objActif].envX[i]));
                        break;
                }
                console.log("duree",source.buffer.duration,waveArray,"gain",gainNode.gain.value,"readY",tableObjet[objActif].gain*tableObjet[objActif].envY[i],"readX",nduree*tableObjet[objActif].envX[i]);
            }
        }
        source.connect(gainNode);
        gainNode.connect(contextAudio.destination);
        source.detune.value=tableObjet[objActif].detune;
        source.playbackRate.value=tableObjet[objActif].transposition;
        //source.connect(contextAudio.destination);
        var ndeb=nduree*tableObjet[objActif].debut;
        var nfin=nduree*tableObjet[objActif].fin;
        source.start(0,ndeb,nfin);
        sourcEtat=1;
        console.log("nduree",nduree,tableObjet[objActif].debut,tableObjet[objActif].fin,"ndeb",ndeb,"nfin",nfin);
    }

}

</code>```

which plays an audio source with an envelope. It works properly.

This code should read several audio sources and apply to each its own envelope :

```<code>function readMultiAudio(){
    var posX=parseInt(document.getElementById("barVerticale").style.left);
    var ratioT=(3600/10800);
    var bar=posX*ratioT;
    var startX;
    var dg;
    var dt;
    tableSrc=[];
    var gainNode=[];

    for(i=0;i<tableObjet.length;i++){
        if(tableObjet[i].etat!=0){
            if (tableObjet[i].file!="" || tableObjet[i].file===undefined) {
                if(tableObjet[i].posX>posX){
                    tableSrc[i]=contextAudio.createBufferSource();
                    tableSrc[i].buffer = tableObjet[i].buffer;
                    tableSrc[i].onended = () => {
                        sourcEtat=0;
                    };
                    gainNode[i] = contextAudio.createGain();
                    var now = contextAudio.currentTime;
                    var typevar=tableObjet[i].envType;

                    var nduree=tableSrc[i].buffer.duration*(1/tableObjet[i].transposition);
                    const waveArray = new Float32Array(5);

                    if(typevar==3){
                        for(let j=0;j<5;j++){
                            waveArray[j] = tableObjet[i].gain*tableObjet[i].envY[j];
                        }
                        gainNode[i].gain.setValueCurveAtTime(waveArray, now, now+nduree);
                    }else{
                        dg=tableObjet[i].gain*tableObjet[i].envY[0];
                        gainNode[i].gain.setValueAtTime(dg,now);
                        for(j=1;j<5;j++){
                            dg=tableObjet[i].gain*tableObjet[i].envY[j];
                            dt=now + (nduree*tableObjet[i].envX[j]);
                            switch(typevar) {
                                case 1:
                                    gainNode[i].gain.linearRampToValueAtTime(dg, dt);
                                    console.log("base1",tableObjet[i].gain,"objg",tableObjet[i].envY[j],'gain',dg,'pos',nduree*tableObjet[i].envX[j]);
                                    break;
                                case 2:
                                    gainNode[i].gain.exponentialRampToValueAtTime(dg, dt);
                                    console.log("base2",tableObjet[i].gain,"objg",tableObjet[i].envY[j],'gain',dg,'pos',nduree*tableObjet[i].envX[j]);
                                    break;
                            }

                        }

                    }

                    tableSrc[i].detune.value=tableObjet[i].detune;
                    tableSrc[i].playbackRate.value=tableObjet[i].transposition;
                    tableSrc[i].connect(gainNode[i]);
                    gainNode[i].connect(contextAudio.destination);
                    startX=tableObjet[i].posX*ratioT;

                    var ndeb=nduree*tableObjet[i].debut;
                    var nfin=nduree*tableObjet[i].fin;
                    tableSrc[i].start(now+(startX-bar),ndeb,nfin);

                    sourcEtat=1;
                    console.log(tableObjet[i].fin,tableObjet);
                }
            }
        }
    }
}

</code>```

It reads the audio sources well but does not restore the envelopes. Why? I do not understand

There must be a problem defining the gainNode in the second function but why?

Title: webaudio gainNode envelope

Body:
I have this code

function readSimpleAudio(){
    if (tableObjet[objActif].file!="" || tableObjet[objActif].file===undefined) {
        source="";
        source=contextAudio.createBufferSource();
        source.buffer = tableObjet[objActif].buffer;
        source.onended = () => {
            sourcEtat=0;
        };
        var typevar=tableObjet[objActif].envType;
        const gainNode = contextAudio.createGain();
        var now = contextAudio.currentTime;
        var nduree=source.buffer.duration*(1/tableObjet[objActif].transposition);
        const waveArray = new Float32Array(5); //                                      selection type enveloppe
        if(typevar==3){ //                                                                CurveAtTime
            for(i=0;i<5;i++){
                waveArray[i] = tableObjet[objActif].gain*tableObjet[objActif].envY[i];
            }
            gainNode.gain.setValueCurveAtTime(waveArray, now, now+nduree);
            console.log("duree",source.buffer.duration,waveArray,nduree);
        }else{
            gainNode.gain.setValueAtTime(tableObjet[objActif].gain*tableObjet[objActif].envY[0],now);
            for(i=1;i<5;i++){
                switch(typevar) {
                    case 1: //                                                               linearRampToValueAtTime
                        gainNode.gain.linearRampToValueAtTime(tableObjet[objActif].gain*tableObjet[objActif].envY[i], now + (nduree*tableObjet[objActif].envX[i]));
                        break;
                    case 2: //                                                               exponentialRampToValueAtTime
                        gainNode.gain.exponentialRampToValueAtTime(tableObjet[objActif].gain*tableObjet[objActif].envY[i], now + (nduree*tableObjet[objActif].envX[i]));
                        break;
                }
                console.log("duree",source.buffer.duration,waveArray,"gain",gainNode.gain.value,"readY",tableObjet[objActif].gain*tableObjet[objActif].envY[i],"readX",nduree*tableObjet[objActif].envX[i]);
            }
        }
        source.connect(gainNode);
        gainNode.connect(contextAudio.destination);
        source.detune.value=tableObjet[objActif].detune;
        source.playbackRate.value=tableObjet[objActif].transposition;
        //source.connect(contextAudio.destination);
        var ndeb=nduree*tableObjet[objActif].debut;
        var nfin=nduree*tableObjet[objActif].fin;
        source.start(0,ndeb,nfin);
        sourcEtat=1;
        console.log("nduree",nduree,tableObjet[objActif].debut,tableObjet[objActif].fin,"ndeb",ndeb,"nfin",nfin);
    }

}

which plays an audio source with an envelope. It works properly.

This code should read several audio sources and apply to each its own envelope :

function readMultiAudio(){
    var posX=parseInt(document.getElementById("barVerticale").style.left);
    var ratioT=(3600/10800);
    var bar=posX*ratioT;
    var startX;
    var dg;
    var dt;
    tableSrc=[];
    var gainNode=[];

    for(i=0;i<tableObjet.length;i++){
        if(tableObjet[i].etat!=0){
            if (tableObjet[i].file!="" || tableObjet[i].file===undefined) {
                if(tableObjet[i].posX>posX){
                    tableSrc[i]=contextAudio.createBufferSource();
                    tableSrc[i].buffer = tableObjet[i].buffer;
                    tableSrc[i].onended = () => {
                        sourcEtat=0;
                    };
                    gainNode[i] = contextAudio.createGain();
                    var now = contextAudio.currentTime;
                    var typevar=tableObjet[i].envType;

                    var nduree=tableSrc[i].buffer.duration*(1/tableObjet[i].transposition);
                    const waveArray = new Float32Array(5);

                    if(typevar==3){
                        for(let j=0;j<5;j++){
                            waveArray[j] = tableObjet[i].gain*tableObjet[i].envY[j];
                        }
                        gainNode[i].gain.setValueCurveAtTime(waveArray, now, now+nduree);
                    }else{
                        dg=tableObjet[i].gain*tableObjet[i].envY[0];
                        gainNode[i].gain.setValueAtTime(dg,now);
                        for(j=1;j<5;j++){
                            dg=tableObjet[i].gain*tableObjet[i].envY[j];
                            dt=now + (nduree*tableObjet[i].envX[j]);
                            switch(typevar) {
                                case 1:
                                    gainNode[i].gain.linearRampToValueAtTime(dg, dt);
                                    console.log("base1",tableObjet[i].gain,"objg",tableObjet[i].envY[j],'gain',dg,'pos',nduree*tableObjet[i].envX[j]);
                                    break;
                                case 2:
                                    gainNode[i].gain.exponentialRampToValueAtTime(dg, dt);
                                    console.log("base2",tableObjet[i].gain,"objg",tableObjet[i].envY[j],'gain',dg,'pos',nduree*tableObjet[i].envX[j]);
                                    break;
                            }

                        }

                    }

                    tableSrc[i].detune.value=tableObjet[i].detune;
                    tableSrc[i].playbackRate.value=tableObjet[i].transposition;
                    tableSrc[i].connect(gainNode[i]);
                    gainNode[i].connect(contextAudio.destination);
                    startX=tableObjet[i].posX*ratioT;

                    var ndeb=nduree*tableObjet[i].debut;
                    var nfin=nduree*tableObjet[i].fin;
                    tableSrc[i].start(now+(startX-bar),ndeb,nfin);

                    sourcEtat=1;
                    console.log(tableObjet[i].fin,tableObjet);
                }
            }
        }
    }
}

It reads the audio sources well but does not restore the envelopes. Why? I do not understand

There must be a problem defining the gainNode in the second function but why?


问:
Changing field values with every change in input field value at the same moment by JaQuery
I have a form that contains dynamic fields, and I have two of these fields. I want to collect their values in two different input fields at the bottom of the form, and I want to print the sum of the numbers for the dynamic fields in the two custom fields at the bottom of the form, according to any instantaneous change that occurs in the values of the dynamic fields. I have a jQuery code that collects these Values But if I delete a dynamic field the values don't change as expected, any help I would be indebted to

html code:

```<code>`<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" >

    <title> demo</title>
  </head>
  <body>
    <table style="text-align:center;" id="dynamicAddRemove">
      <tr style="background-color:#007398;color:white;text-align:center;">
        <th class="wd-15p fontColor">الحساب</th>
        <th class="wd-15p fontColor">مدين</th>
        <th class="wd-15p fontColor">دائن</th>
      </tr>
      <tr>
      <td class="td"><select class="form-control select_acount js-example-basic-single" name="account[]"required>
            <option value="">--الحساب--</option>
            </select>
          </td>
        <td class="td"><input type="number" name="debtor[]" id="fname"class="form-control debtor" onkeydown="return event.keyCode !== 69" required></td>
        <td class="td"><input type="number" name="creditor[]" id="james" class="form-control creditor" onkeydown="return event.keyCode !== 69" required></td>
        <td class="td2"><button type="button" name="add" id="add-btn" class="btn btn-success"><i class="fas fa-plus"></i></button></td>
      </tr>
    </table>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.min.js"></script>
  </body>
</html>`
</code>```

jquery code:

```<code>
    <script>
    var i = 0;
          $("#add-btn").click(function() {
            ++i;

            $("#dynamicAddRemove").append('<tr><td class="td">'+product_dd+'</td> <td class="td"><input type="number" name="debtor[' + i + ']" id="fname"class="form-control debtor arabicNumbers" onkeydown="return event.keyCode !== 69" required></td> <td class="td"><input type="number" name="creditor[' + i + ']" id="james" class="form-control creditor arabicNumbers" onkeydown="return event.keyCode !== 69" required></td> <td class="td"><input type="text"  name="description[' + i + ']" class="form-control"  required></td> <td> <input type="text" name="mount[' + i + ']" class="form-control mount" required></td><td class="td2"><button type="button" name="add" class="btn btn-danger remove-tr"><i class="fas fa-trash" ></i></button></td></tr>');
          });
          $(document).on('click', '.remove-tr', function() {
            $(this).parents('tr').remove();
          });
    </script>

<script>
$(document).ready( function() {
    $(document).on("keyup", ".debtor", function() {
        var sum = 0;
        $(".debtor").each(function(){
            sum += +$(this).val();
        });
        $('.sum1').val(sum);
    });
});`
</code>```
```<code>`<script>
$(document).ready( function() {
    $(document).on("keyup", ".debtor", function() {
        var sum = 0;
        $(".debtor").each(function(){
            sum += +$(this).val();
        });
        $('.sum1').val(sum);
    });
});
</script>
<script>
$(document).ready( function() {
    $(document).on("keyup", ".creditor", function() {
        var sum = 0;
        $(".creditor").each(function(){
            sum += +$(this).val();
        });
        $('.sum2').val(sum);
    });
});
</script>`
</code>```

Body:
I have a form that contains dynamic fields, and I have two of these fields. I want to collect their values in two different input fields at the bottom of the form, and I want to print the sum of the numbers for the dynamic fields in the two custom fields at the bottom of the form, according to any instantaneous change that occurs in the values of the dynamic fields. I have a jQuery code that collects these Values But if I delete a dynamic field the values don't change as expected, any help I would be indebted to

html code:

`<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" >

    <title> demo</title>

        الحساب
        مدين
        دائن

      <select class="form-control select_acount js-example-basic-single" name="account[]"required>
            <option value="">--الحساب--</option>
            </select>

        <input type="number" name="debtor[]" id="fname"class="form-control debtor" onkeydown="return event.keyCode !== 69" required>
        <input type="number" name="creditor[]" id="james" class="form-control creditor" onkeydown="return event.keyCode !== 69" required>
        <button type="button" name="add" id="add-btn" class="btn btn-success"></button>

`

jquery code:

`


问:
How to get json decode value from data attribute in jquery
I am working with jquery and right now i am passing "Php array with json encode" in "data attribute" and right now i am trying to get this (json encode) value in jquery, But right now i am getting "new" (after update/new) value instead of existing,How can i do this ? Here is my current code</p>
```<code> echo '<td class=try contenteditable="true" data-id="'.$id.'" data-txt="'.json_encode($col).'">'; //$col is array

   <script>
        $("td").keypress(function(e){
            var id = $(this).attr("data-id")
            var newtxt = $(this).attr("data-txt")
             var oldtext = $(this).text();
                 if(e.which == 13) {
                alert('oldtext is '+oldtext);
            }
     });
    </script>
</code>```

Body:
I am working with jquery and right now i am passing "Php array with json encode" in "data attribute" and right now i am trying to get this (json encode) value in jquery, But right now i am getting "new" (after update/new) value instead of existing,How can i do this ? Here is my current code

 echo ''; //$col is array


问:
Heroku, Error with deployment Agora appbuilder. "Over 5 project limit." But I don't have 5 projects
When I'm trying to deploy project at https://appbuilder.agora.io/ with Heroku it creates a new empty project but then I got this error:
"Over 5 project limit. You have too many Heroku projects. Please delete older projects or upgrade your plan".
Even if I have 0 projects.

I'm even paid for the service, but still not working.

Any help please

Expected to not have any errors


问:
autocomplete textbox is not working in asp.net using select2
when i click on dropdown list data from database display in horizantal manner in one line
with both vertical and horizantal scrollbar

i have installed select2.js from nuget pacakage manager into my project and done coding in asp.net

```<code><link href="Content/css/select2.css" rel="stylesheet" />
    <link href="Content/css/select2.min.css" rel="stylesheet" />
    <script src="Scripts/select2.min.js"></script>

</code>```

$(function () {
$(".select2-container").select2({
placeholder: "Select",
allowClear: true,

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

.select2-container
 {

box-sizing: border-box;
display:block;
margin: 0;
position: relative;
vertical-align: middle;
width: auto !important;

}

</code>```

<asp:DropDownList ID="ddlprocode" runat="server" CssClass="form-control select2-container"  BorderColor="#00ff00" BorderWidth="2"  AutoPostBack="true" OnSelectedIndexChanged="ddlprocode_SelectedIndexChanged" >
</asp:DropDownList>

```<code>

</code>```

enter image description here
i want data must display in vertical with no scrollbar

Body:
when i click on dropdown list data from database display in horizantal manner in one line
with both vertical and horizantal scrollbar

i have installed select2.js from nuget pacakage manager into my project and done coding in asp.net

<link href="Content/css/select2.css" rel="stylesheet" />
    <link href="Content/css/select2.min.css" rel="stylesheet" />

$(function () {
$(".select2-container").select2({
placeholder: "Select",
allowClear: true,

        });
    });

.select2-container
 {

box-sizing: border-box;
display:block;
margin: 0;
position: relative;
vertical-align: middle;
width: auto !important;

}

<asp:DropDownList ID="ddlprocode" runat="server" CssClass="form-control select2-container"  BorderColor="#00ff00" BorderWidth="2"  AutoPostBack="true" OnSelectedIndexChanged="ddlprocode_SelectedIndexChanged" >
</asp:DropDownList>

enter image description here
i want data must display in vertical with no scrollbar


问:
how to extract encoding features from timeseries and reconstruct it
I am trying a regression problem for extracting the features and reconstruct the timeseries.So i want to adopt cnn based encoder-decoder network.

At first I generate a timeseries using the below mentioned code

```<code>from scipy import signal
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 10, 20, endpoint=False)
y = np.cos(-x**2/6.0)
plt.plot(x, y)
plt.show()
</code>```

Then I want to extract encoded features from the latent space using CNN based encoder decoder network for 1d timeseries generated by above code. However, as I am new to this field I am failed to implement CNN based encoder decoder network for 1d data(here y).

I tried the code below but it doesnot do anything

```<code>import tensorflow as tf

input_sig = Input(batch_shape=(1,128,1))
x = Conv1D(8,3, activation='relu', padding='same',dilation_rate=2)(input_sig)
x1 = MaxPooling1D(2)(x)
x2 = Conv1D(4,3, activation='relu', padding='same',dilation_rate=2)(x1)
x3 = MaxPooling1D(2)(x2)
x4 = AveragePooling1D()(x3)
flat = Flatten()(x4)
encoded = Dense(2)(flat)

d1 = Dense(64)(encoded)
d2 = Reshape((16,4))(d1)
d3 = Conv1D(4,1,strides=1, activation='relu', padding='same')(d2)
d4 = UpSampling1D(2)(d3)
d5 = Conv1D(8,1,strides=1, activation='relu', padding='same')(d4)
d6 = UpSampling1D(2)(d5)
d7 = UpSampling1D(2)(d6)
decoded = Conv1D(1,1,strides=1, activation='sigmoid', padding='same')(d7)
model= Model(input_sig, decoded)

model.predict
</code>```

Body:
I am trying a regression problem for extracting the features and reconstruct the timeseries.So i want to adopt cnn based encoder-decoder network.

At first I generate a timeseries using the below mentioned code

from scipy import signal
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 10, 20, endpoint=False)
y = np.cos(-x**2/6.0)
plt.plot(x, y)
plt.show()

Then I want to extract encoded features from the latent space using CNN based encoder decoder network for 1d timeseries generated by above code. However, as I am new to this field I am failed to implement CNN based encoder decoder network for 1d data(here y).

I tried the code below but it doesnot do anything

import tensorflow as tf

input_sig = Input(batch_shape=(1,128,1))
x = Conv1D(8,3, activation='relu', padding='same',dilation_rate=2)(input_sig)
x1 = MaxPooling1D(2)(x)
x2 = Conv1D(4,3, activation='relu', padding='same',dilation_rate=2)(x1)
x3 = MaxPooling1D(2)(x2)
x4 = AveragePooling1D()(x3)
flat = Flatten()(x4)
encoded = Dense(2)(flat)

d1 = Dense(64)(encoded)
d2 = Reshape((16,4))(d1)
d3 = Conv1D(4,1,strides=1, activation='relu', padding='same')(d2)
d4 = UpSampling1D(2)(d3)
d5 = Conv1D(8,1,strides=1, activation='relu', padding='same')(d4)
d6 = UpSampling1D(2)(d5)
d7 = UpSampling1D(2)(d6)
decoded = Conv1D(1,1,strides=1, activation='sigmoid', padding='same')(d7)
model= Model(input_sig, decoded)

model.predict


问:
Draft JS Mention Suggestion dropdown doesn't show up

The openMentionSuggestions value never changes to true and dropdown never shows, what's the problem?


问:
How to direct keyboard input into chrome.exe inside a qt widget?
I integrated chrome.exe into my qt main window using the qt widget, but I found that I can only use the mouse to operate the webpage, but I cannot input the keyboard into the search box in the webpage. Can this be solved?

```<code>    m_pProc = new QProcess(this);
    arguments << "--chrome-frame" << "-kiosk" << "https://map.baidu.com/";
    m_pProc->start(QString::fromStdString(strPath), arguments);
    Sleep(3000);
    WId m_wid = (WId)FindWindow(L"Chrome_WidgetWin_1", NULL);
    QWindow *m_window = QWindow::fromWinId(m_wid);
    QWidget *m_widget = QWidget::createWindowContainer(m_window);
    ui.playLayout->addWidget(m_widget);
    m_widget->setFocus();
    m_widget->setFocusPolicy(Qt::StrongFocus);
    m_widget->grabKeyboard();

</code>```

I tried to set the foucs, but it's not helping. How can I tab some words into the webpage directly?

Body:
I integrated chrome.exe into my qt main window using the qt widget, but I found that I can only use the mouse to operate the webpage, but I cannot input the keyboard into the search box in the webpage. Can this be solved?

    m_pProc = new QProcess(this);
    arguments << "--chrome-frame" << "-kiosk" << "https://map.baidu.com/";
    m_pProc->start(QString::fromStdString(strPath), arguments);
    Sleep(3000);
    WId m_wid = (WId)FindWindow(L"Chrome_WidgetWin_1", NULL);
    QWindow *m_window = QWindow::fromWinId(m_wid);
    QWidget *m_widget = QWidget::createWindowContainer(m_window);
    ui.playLayout->addWidget(m_widget);
    m_widget->setFocus();
    m_widget->setFocusPolicy(Qt::StrongFocus);
    m_widget->grabKeyboard();

I tried to set the foucs, but it's not helping. How can I tab some words into the webpage directly?


问:
Wix-Installing selected .exe on click of radio button
Trying to build a application installer which has two radio button so on click of first radio 1.exe must be installed and click of second radio button 2.exe must be installed this is the basic view of the installerbut there is property binded to radio button group called INSTALLER

```<code><Feature Id='feature_test' Title='Test Features' Level='1'>
            <Feature Id='feature_dir_root1' Level='1'>
                <ComponentRef Id='component_dir_root1' />
                <Condition Level="0">
                        <![CDATA[INSTALLER <> "1"]]>
            </Condition>
            </Feature>
            <Feature Id='feature_dir_root2' Level='1'>
                <ComponentRef Id='component_dir_root2' />
                <Condition Level="0">
                    <![CDATA[INSTALLER <> "2"]]>
                </Condition>
            </Feature>
        </Feature>

<Component Id='component_dir_root1' Guid='A51094B8-552F-49C4-9E5C-36815D471913'>
<File Id='file_readme.txt' Name='readme.txt' DiskId='1' Source='root\readme.txt' />
</Component>
<Component Id='component_dir_root2' Guid='A51094B8-552F-49C4-9E5C-36815D471914'>
<File Id='file_readme2.txt' Name='Bootstrapper.exe' DiskId='1' Source='root\Bootstrapper2.exe' />
</Component>
<Property Id="INSTALLER" Value="1"></Property>

</code>```

Here in the property values is hard coded to 1, so if i click second radio button the 1.exe is installed. if property value is changed to 2 second then 2.exe is installed, no matter of which radio button is clicked, by default it take the radio button value which is is hard coded in property, is there any way to changed the value of property on click of radio button or is there way to install the required .exe's on click of radio button ?
Can anyone suggest please?

Body:
Trying to build a application installer which has two radio button so on click of first radio 1.exe must be installed and click of second radio button 2.exe must be installed this is the basic view of the installerbut there is property binded to radio button group called INSTALLER

<Feature Id='feature_test' Title='Test Features' Level='1'>
            <Feature Id='feature_dir_root1' Level='1'>
                <ComponentRef Id='component_dir_root1' />
                <Condition Level="0">
                        <![CDATA[INSTALLER <> "1"]]>
            </Condition>
            </Feature>
            <Feature Id='feature_dir_root2' Level='1'>
                <ComponentRef Id='component_dir_root2' />
                <Condition Level="0">
                    <![CDATA[INSTALLER <> "2"]]>
                </Condition>
            </Feature>
        </Feature>

<Component Id='component_dir_root1' Guid='A51094B8-552F-49C4-9E5C-36815D471913'>
<File Id='file_readme.txt' Name='readme.txt' DiskId='1' Source='root\readme.txt' />
</Component>
<Component Id='component_dir_root2' Guid='A51094B8-552F-49C4-9E5C-36815D471914'>
<File Id='file_readme2.txt' Name='Bootstrapper.exe' DiskId='1' Source='root\Bootstrapper2.exe' />
</Component>
<Property Id="INSTALLER" Value="1"></Property>

Here in the property values is hard coded to 1, so if i click second radio button the 1.exe is installed. if property value is changed to 2 second then 2.exe is installed, no matter of which radio button is clicked, by default it take the radio button value which is is hard coded in property, is there any way to changed the value of property on click of radio button or is there way to install the required .exe's on click of radio button ?
Can anyone suggest please?


问:
keras_nlp not recognising tensorflow-gpu
I have tensorflow-gpu already installed:

```<code>>  pip list | grep tensorflow
tensorflow-addons             0.19.0
tensorflow-estimator          2.11.0
tensorflow-gpu                2.11.0
tensorflow-io-gcs-filesystem  0.27.0
tensorflow-probability        0.19.0
</code>```

However, when I tried to install keras_nlp, it still tries to install the cpu version of tensorflow:

```<code>>  pip install keras_nlp
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting keras_nlp
  Downloading keras_nlp-0.4.0-py3-none-any.whl (337 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 337.5/337.5 kB 5.8 MB/s eta 0:00:00
Requirement already satisfied: absl-py in /home/steven/anaconda3/envs/tf/lib/python3.10/site-packages (from keras_nlp) (1.3.0)
Requirement already satisfied: packaging in /home/steven/anaconda3/envs/tf/lib/python3.10/site-packages (from keras_nlp) (21.3)
Collecting tensorflow
  Downloading tensorflow-2.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (588.3 MB)
     ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.5/588.3 MB 7.8 MB/s eta 0:01:14
ERROR: Operation cancelled by user
</code>```

Any idea why?

Body:
I have tensorflow-gpu already installed:

>  pip list | grep tensorflow
tensorflow-addons             0.19.0
tensorflow-estimator          2.11.0
tensorflow-gpu                2.11.0
tensorflow-io-gcs-filesystem  0.27.0
tensorflow-probability        0.19.0

However, when I tried to install keras_nlp, it still tries to install the cpu version of tensorflow:

>  pip install keras_nlp
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting keras_nlp
  Downloading keras_nlp-0.4.0-py3-none-any.whl (337 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 337.5/337.5 kB 5.8 MB/s eta 0:00:00
Requirement already satisfied: absl-py in /home/steven/anaconda3/envs/tf/lib/python3.10/site-packages (from keras_nlp) (1.3.0)
Requirement already satisfied: packaging in /home/steven/anaconda3/envs/tf/lib/python3.10/site-packages (from keras_nlp) (21.3)
Collecting tensorflow
  Downloading tensorflow-2.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (588.3 MB)
     ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.5/588.3 MB 7.8 MB/s eta 0:01:14
ERROR: Operation cancelled by user

Any idea why?


问:
scala.Some(value) got deserialized into Some(null) if deserialized by using another scala version
I am trying to deserialize an object stream with Scala 2.12.6 which has serialized using scala 2.11.11

Please check below case class which has optional fields.

```<code>@SerialVersionUID(123467891598L)
case class Initialiser(externalPID: Option[String], user: Option[String])
</code>```

which I am serializing using scala 2.11.11 with values as follows

```<code>Initialiser(Option("Test"), Option("Test"))
</code>```

then deserialized it with scala 2.12.6 where I am getting the following result

```<code>Initialiser(Some(null), Some(null))
</code>```

I am losing the data during this process. I have used Akka SerializationExtension for this process

Does anyone have any idea how to resolve this issue? I found the following details at the Scala bug tracker where it's mentioned that it's not supporting binary compatibility.

Is it possible to resolve these issues using any third-party library like Boopickle?

Body:
I am trying to deserialize an object stream with Scala 2.12.6 which has serialized using scala 2.11.11

Please check below case class which has optional fields.

@SerialVersionUID(123467891598L)
case class Initialiser(externalPID: Option[String], user: Option[String])

which I am serializing using scala 2.11.11 with values as follows

Initialiser(Option("Test"), Option("Test"))

then deserialized it with scala 2.12.6 where I am getting the following result

Initialiser(Some(null), Some(null))

I am losing the data during this process. I have used Akka SerializationExtension for this process

Does anyone have any idea how to resolve this issue? I found the following details at the Scala bug tracker where it's mentioned that it's not supporting binary compatibility.

Is it possible to resolve these issues using any third-party library like Boopickle?


问:
Typescript Generics extending never
The Deep Readonly challenge of the TypeScript challenges repo has a very popular solution here:

type DeepReadonly<T> = keyof T extends never
  ? T
  : { readonly [k in keyof T]: DeepReadonly<T[k]> };

// Usage
type DeepResult = DeepReadonly<{ hello: 'world' }>
//   ^? type DeepResult = { readonly hello: 'world'; }
```
<p>Now, I'm fully aware of the solution's flaws as listed here but I just can't figure out how it works for the simple case scenario:</p>
<pre class="lang-js prettyprint-override"><code>type DeepResult2 = DeepReadonly<'world'>;
//   ^? type DeepResult2 = "world"
</code>```

I mean how is this even possible? keyof 'world' extends never ? should return { readonly [k in keyof T]: DeepReadonly<T[k]> } and not T (world in this case).

What am I missing here? Thanks!

Title: Typescript Generics extending never

Body:
The Deep Readonly challenge of the TypeScript challenges repo has a very popular solution here:

type DeepReadonly<T> = keyof T extends never
  ? T
  : { readonly [k in keyof T]: DeepReadonly<T[k]> };

// Usage
type DeepResult = DeepReadonly<{ hello: 'world' }>
//   ^? type DeepResult = { readonly hello: 'world'; }

Now, I'm fully aware of the solution's flaws as listed here but I just can't figure out how it works for the simple case scenario:

type DeepResult2 = DeepReadonly<'world'>;
//   ^? type DeepResult2 = "world"

I mean how is this even possible? keyof 'world' extends never ? should return { readonly [k in keyof T]: DeepReadonly<T[k]> } and not T (world in this case).

What am I missing here? Thanks!


问:
Is my custom hook interference each other?
Here is my custom hook:

```<code>import { useEffect, useReducer } from 'react';
import { useNavigate } from 'react-router-dom';
import axios from "axios";
let reducer = (state, action) => {
    let result = { ...state };
    switch (action.type) {
        case "updateData":
            result.data = action.data;
            result.isLoading = false;
            break;
        case "updateError":
            result.error = action.error;
            result.isLoading = false;
            break;
        default:
            break;
    }
    return result;
}
export function useAxios(data, method, url, header, responseType) {
    const [itemList, updateItemList] = useReducer(reducer, { data: undefined, error: undefined, isLoading: true });
    const navigate = useNavigate();
    useEffect(() => {
        let fetchData = async () => {
            axios.interceptors.response.use(
                (response) => {
                    return response.data;
                },
                (error) => {
                    let errorObj = {};
                    switch (true) {
                        case (error.response !== undefined):
                            switch (error.response.status) {
                                case 401:
                                    alert(error.response.data);
                                    navigate("/login");
                                    break;
                                case 404:
                                    errorObj = {
                                        message: error.message,
                                        status: 404
                                    };
                                    break;
                                default:
                                    errorObj = {
                                        message: error.response.data,
                                        status: error.response.status
                                    };
                                    break;
                            }
                            break;
                        case (error.request !== undefined):
                            errorObj = error.request;
                            break;
                        default:
                            errorObj = { message: error.message }
                            break
                    }
                    updateItemList({ "error": errorObj, type: "updateError" });
                }
            );
            let requestObj = { "method": method, "url": url }
            if (method.toLowerCase() === "get") {
                requestObj.params = data;
            } else {
                requestObj.data = data;
            }
            if (responseType) {
                requestObj["responseType"] = responseType;
            }
            if (header) {
                requestObj["headers"] = header;
            }
            let result = await axios(requestObj);
            updateItemList({ "data": result, type: "updateData" });
        }
        fetchData();
    }, []);
    return {
        isLoading:itemList.isLoading,
        data:itemList.data,
        error:itemList.error
    };
}
</code>```

I have another custom hook that uses the useAxios.

```<code>export function useCallTreeListViewer() {
    const [itemList, updateItemList] = useReducer(reducer,
        {
            error: null,
            isLoading: true,
            keyword: '',
            refList: {},
            supportedSystemList: [],
            supportedSystemSearchResult: null,
            sortByFieldName: "systemName",
            sortingMethod: "asc",
            wxInfoList: [],
            wxInfoSearchResult: null
        });
    let supportedSystemList = useAxios(null, "get", "/publicAPI/getActiveSupportedSystemList");
    let wxInfoList = useAxios(null, "get", "/publicAPI/getActiveWxInfoList");
    useEffect(() => {
        console.log(supportedSystemList,wxInfoList);

    }, [
        supportedSystemList.isLoading,
        wxInfoList.isLoading])
....................
</code>```

The expected result:

{isLoading: false, data: Array(84), error: undefined} {isLoading: false, data: Array(3), error: undefined}

Unfortunately, the actual result is as below:

{isLoading: false, data: Array(84), error: undefined} {isLoading: false, data: undefined, error: undefined}

And I have checked the network console, it shows that the API "/publicAPI/getActiveWxInfoList" has return correct data.

After I change the code as below:

```<code>export function useCallTreeListViewer() {
    const [itemList, updateItemList] = useReducer(reducer,
        {
            error: null,
            isLoading: true,
            keyword: '',
            refList: {},
            supportedSystemList: [],
            supportedSystemSearchResult: null,
            sortByFieldName: "systemName",
            sortingMethod: "asc",
            wxInfoList: [],
            wxInfoSearchResult: null
        });

    let wxInfoList = useAxios(null, "get", "/publicAPI/getActiveWxInfoList");
    useEffect(() => {
        console.log(wxInfoList);
    }, [
        supportedSystemList.isLoading,
        wxInfoList.isLoading])
....................
</code>```

The expected result and the actual result are the same:

{isLoading: false, data: Array(3), error: undefined}

Would you tell me what's going on?

Body:
Here is my custom hook:

import { useEffect, useReducer } from 'react';
import { useNavigate } from 'react-router-dom';
import axios from "axios";
let reducer = (state, action) => {
    let result = { ...state };
    switch (action.type) {
        case "updateData":
            result.data = action.data;
            result.isLoading = false;
            break;
        case "updateError":
            result.error = action.error;
            result.isLoading = false;
            break;
        default:
            break;
    }
    return result;
}
export function useAxios(data, method, url, header, responseType) {
    const [itemList, updateItemList] = useReducer(reducer, { data: undefined, error: undefined, isLoading: true });
    const navigate = useNavigate();
    useEffect(() => {
        let fetchData = async () => {
            axios.interceptors.response.use(
                (response) => {
                    return response.data;
                },
                (error) => {
                    let errorObj = {};
                    switch (true) {
                        case (error.response !== undefined):
                            switch (error.response.status) {
                                case 401:
                                    alert(error.response.data);
                                    navigate("/login");
                                    break;
                                case 404:
                                    errorObj = {
                                        message: error.message,
                                        status: 404
                                    };
                                    break;
                                default:
                                    errorObj = {
                                        message: error.response.data,
                                        status: error.response.status
                                    };
                                    break;
                            }
                            break;
                        case (error.request !== undefined):
                            errorObj = error.request;
                            break;
                        default:
                            errorObj = { message: error.message }
                            break
                    }
                    updateItemList({ "error": errorObj, type: "updateError" });
                }
            );
            let requestObj = { "method": method, "url": url }
            if (method.toLowerCase() === "get") {
                requestObj.params = data;
            } else {
                requestObj.data = data;
            }
            if (responseType) {
                requestObj["responseType"] = responseType;
            }
            if (header) {
                requestObj["headers"] = header;
            }
            let result = await axios(requestObj);
            updateItemList({ "data": result, type: "updateData" });
        }
        fetchData();
    }, []);
    return {
        isLoading:itemList.isLoading,
        data:itemList.data,
        error:itemList.error
    };
}

I have another custom hook that uses the useAxios.

export function useCallTreeListViewer() {
    const [itemList, updateItemList] = useReducer(reducer,
        {
            error: null,
            isLoading: true,
            keyword: '',
            refList: {},
            supportedSystemList: [],
            supportedSystemSearchResult: null,
            sortByFieldName: "systemName",
            sortingMethod: "asc",
            wxInfoList: [],
            wxInfoSearchResult: null
        });
    let supportedSystemList = useAxios(null, "get", "/publicAPI/getActiveSupportedSystemList");
    let wxInfoList = useAxios(null, "get", "/publicAPI/getActiveWxInfoList");
    useEffect(() => {
        console.log(supportedSystemList,wxInfoList);

    }, [
        supportedSystemList.isLoading,
        wxInfoList.isLoading])
....................

The expected result:

{isLoading: false, data: Array(84), error: undefined} {isLoading: false, data: Array(3), error: undefined}

Unfortunately, the actual result is as below:

{isLoading: false, data: Array(84), error: undefined} {isLoading: false, data: undefined, error: undefined}

And I have checked the network console, it shows that the API "/publicAPI/getActiveWxInfoList" has return correct data.

After I change the code as below:

export function useCallTreeListViewer() {
    const [itemList, updateItemList] = useReducer(reducer,
        {
            error: null,
            isLoading: true,
            keyword: '',
            refList: {},
            supportedSystemList: [],
            supportedSystemSearchResult: null,
            sortByFieldName: "systemName",
            sortingMethod: "asc",
            wxInfoList: [],
            wxInfoSearchResult: null
        });

    let wxInfoList = useAxios(null, "get", "/publicAPI/getActiveWxInfoList");
    useEffect(() => {
        console.log(wxInfoList);
    }, [
        supportedSystemList.isLoading,
        wxInfoList.isLoading])
....................

The expected result and the actual result are the same:

{isLoading: false, data: Array(3), error: undefined}

Would you tell me what's going on?


问:
In mat-select, when trying to display index, it does not open
I want to give 10 options, they represent how many days to a delivery, but i want to display the number of days, not the date, so i did this:

```<code>         <div fxLayout="row" fxLayoutGap="30px">

          <mat-form-field fxFlex="30">

             <mat-select [(value)]="apply.data_invio"  placeholder="Data Invio">

               <mat-option *ngFor="let d of dateInvio; index as i" [value]="d">{{i}}</mat-option>

             </mat-select>

           </mat-form-field>

         </div>

</code>```

this is the list:

```<code>0
:
Fri Dec 30 2022 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
1
:
Sat Dec 31 2022 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
2
:
Sun Jan 01 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
3
:
Mon Jan 02 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
4
:
Tue Jan 03 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
5
:
Wed Jan 04 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
6
:
Thu Jan 05 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
7
:
Fri Jan 06 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
8
:
Sat Jan 07 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
9
:
Sun Jan 08 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
</code>```

(I still need to format it)

When i try to open the options, it just doesn't, i know that it's clickable because i can see the animation, but it just stays still, what can i do?

Body:
I want to give 10 options, they represent how many days to a delivery, but i want to display the number of days, not the date, so i did this:

          <mat-form-field fxFlex="30">

             <mat-select [(value)]="apply.data_invio"  placeholder="Data Invio">

               <mat-option *ngFor="let d of dateInvio; index as i" [value]="d">{{i}}</mat-option>

             </mat-select>

           </mat-form-field>

this is the list:

0
:
Fri Dec 30 2022 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
1
:
Sat Dec 31 2022 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
2
:
Sun Jan 01 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
3
:
Mon Jan 02 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
4
:
Tue Jan 03 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
5
:
Wed Jan 04 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
6
:
Thu Jan 05 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
7
:
Fri Jan 06 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
8
:
Sat Jan 07 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}
9
:
Sun Jan 08 2023 09:10:57 GMT+0100 (Ora standard dell’Europa centrale) {}

(I still need to format it)

When i try to open the options, it just doesn't, i know that it's clickable because i can see the animation, but it just stays still, what can i do?


问:
react pagination posting field values from page one only
I have added a react pagination in my react application. in there I have some data along with checkboxes ( which are by default selected ). When I click on final submit button without making any change ( without selecting or deselecting checkboxes as all are by default selected ), it is submitting values of checkboxes from page 1 only and not from other pages.

For Ex.

Page 1 contains

checkbox1
checkbox2
checkbox3

Page 2 contains

checkbox 4
checkbox 5

On final submit button on the form I want to submit values of all the checkboxes which are selected.

I tried below code

```<code>let selectedItems = [];
const allCheckboxes = document.getElementsByName('items');
for( let i = 0; i < allCheckboxes.length; i++) {
    if(allCheckboxes[i].checked) {
        selectedItems.push( allCheckboxes[i].value );
    } }
</code>```

on printing selectedItems..I am getting values which are present on page 1 of pagination

Any help is appreciated.
Thanks in advance

Body:
I have added a react pagination in my react application. in there I have some data along with checkboxes ( which are by default selected ). When I click on final submit button without making any change ( without selecting or deselecting checkboxes as all are by default selected ), it is submitting values of checkboxes from page 1 only and not from other pages.

For Ex.

Page 1 contains

checkbox1
checkbox2
checkbox3

Page 2 contains

checkbox 4
checkbox 5

On final submit button on the form I want to submit values of all the checkboxes which are selected.

I tried below code

let selectedItems = [];
const allCheckboxes = document.getElementsByName('items');
for( let i = 0; i < allCheckboxes.length; i++) {
    if(allCheckboxes[i].checked) {
        selectedItems.push( allCheckboxes[i].value );
    } }

on printing selectedItems..I am getting values which are present on page 1 of pagination

Any help is appreciated.
Thanks in advance


问:
PageSpeed Insights Crashing in Chrome
Issue:
Pagespeed Insights has basically become unusable.  Switching from Mobile to Desktop crashes the site 9/10 times with "Not enough memory to open this page."

This is not a new issue, it has been this way for 6 months to a year.  I just kept expecting someone must know about the problem and they would fix it.  Nope!

screen shot

Chrome Version 108.0.5359.125 (Official Build) (64-bit)
Windows 10 (64-bit)
32G RAM

Steps to Reproduce:

Open pagespeed.web.dev.

Enter page to test and click Analyze.

Results load defaulted to Mobile tab

Click Desktop

Click back to Mobile

Bam, it hangs, and eventually prompts to "Wait" for the hung tab, ending in the "Out of Memory" error in the attached screen shot.  I have 32G of memory, half of which is unused, it shouldn't be out of memory.  I can reliably reproduce it with any site, just by switching from Mobile to Desktop a couple times.  Earlier it happened when I tried to expand one of the suggestions.

When it crashes, it causes all tabs from pagespeed.web.dev to crash at the same time.

Issue happens in Chrome and Brave, including incognito windows.

Issue does not happen in Firefox or Edge.

It happens to every site you test, including web.dev itself.

It happens even with all extensions disabled

Title: PageSpeed Insights Crashing in Chrome


问:
Create boxplots for each DataFrame in a dictionnary
So I have a dictionnary with 52 dataframes inside it. I'm trying to create a boxplot for each DataFrame but I'm noticing that my loop, somehow, puts the 52 boxplots on the same "file" and not even side by side it's just smashed together. What I want is 52 different boxplots.

Here is what I'm working with :

```<code>for key, df in dfs.items():
  df.boxplot(column='Total Induced emissions intensity (tCO2e/M€)', return_type='axes');

</code>```

The result I would want is one boxplot per dataframe, I don't want the boxplots to be side by side on the same plot though. It would ideally be independent plots for each dataframe.

It's something I can get by doing it manually as you can see below but I have 52 DataFrames and the number is increasing so it's not an option.

```<code>dfs['Water'].boxplot(column='Total Induced emissions intensity (tCO2e/M€)', return_type='axes');
dfs['Aerospace'].boxplot(column='Total Induced emissions intensity (tCO2e/M€)', return_type='axes');

</code>```

Thank's

Body:
So I have a dictionnary with 52 dataframes inside it. I'm trying to create a boxplot for each DataFrame but I'm noticing that my loop, somehow, puts the 52 boxplots on the same "file" and not even side by side it's just smashed together. What I want is 52 different boxplots.

Here is what I'm working with :

for key, df in dfs.items():
  df.boxplot(column='Total Induced emissions intensity (tCO2e/M€)', return_type='axes');

The result I would want is one boxplot per dataframe, I don't want the boxplots to be side by side on the same plot though. It would ideally be independent plots for each dataframe.

It's something I can get by doing it manually as you can see below but I have 52 DataFrames and the number is increasing so it's not an option.

dfs['Water'].boxplot(column='Total Induced emissions intensity (tCO2e/M€)', return_type='axes');
dfs['Aerospace'].boxplot(column='Total Induced emissions intensity (tCO2e/M€)', return_type='axes');

Thank's


问:
Jenkins Pipeline Running Cucumber tests get error response 500
I created a Pipeline project at Jenkins.

I use Jenkinsfile for integrating my project with jenkins.

And also I use Selenium Grid 4 (run with docker, and using http://localhost:4444/ui from Jenkins with SeleniumGrid plugin)
When i run my tests, it returns error;

run 1: could not start a new session. response code 500. message: error forwarding the new session empty pool of vm for setup capabilities {browsername: chrome, goog:chromeoptions: {args: [--disable-dev-shm-usage], extensions: []}, unexpectedalertbehaviour: ignore, unhandledpromptbehavior: ignore} host info: host: '68fd9726dd2f', ip: '172.18.0.2' build info: version: '4.6.0', revision: '79f1c02ae20' system info: os.name: 'linux', os.arch: 'amd64', os.version: '5.15.0-1029-azure', java.version: '11.0.17' driver info: org.openqa.selenium.remote.remotewebdriver command: [null, newsession {capabilities=[capabilities {browsername: chrome, goog:chromeoptions: {args: [--disable-dev-shm-usage], extensions: []}, unexpectedalertbehaviour: ignore, unhandledpromptbehavior: ignore}], desiredcapabilities=capabilities {browsername: chrome, goog:chromeoptions: {args: [--disable-dev-shm-usage], extensions: []}, unexpectedalertbehaviour: ignore, unhandledpromptbehavior: ignore}}] capabilities {} run 2: null

Jenkins Error:

Webdriver.java

```<code>public static RemoteWebDriver SeleniumGrid() {

    MutableCapabilities capabilities = new MutableCapabilities();
    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR,
            UnexpectedAlertBehaviour.IGNORE);
    capabilities.setCapability("browserName", "Chrome");
    capabilities.setCapability("browserVersion", "latest");
    chromeOptions.addArguments("--disable-dev-shm-usage");
    chromeOptions.addArguments("--disable-gpu");
    capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);

    try {

        driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), chromeOptions);
        driver.setFileDetector(new LocalFileDetector());
    } catch (MalformedURLException e) {
        throw new RuntimeException(e);
    }
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

    return driver;

}
</code>```

Jenkinsfile

```<code>pipeline {
  agent any
  tools {
      maven 'Maven'
    }
  stages {
    stage('Run Tests') {
      steps {
        sh "mvn clean test"
      }
      post {
        always {
          junit '**/surefire-reports/*.xml'
          cucumber buildStatus: 'null', customCssFiles: '', customJsFiles: '', failedFeaturesNumber: -1, failedScenariosNumber: -1, failedStepsNumber: -1, fileIncludePattern: 'target/cucumber.json', pendingStepsNumber: -1, skippedStepsNumber: -1, sortingMethod: 'ALPHABETICAL', undefinedStepsNumber: -1
        }
      }
    }
  }
}
</code>```

what should i do in my configuration to fix this problem.

Body:
I created a Pipeline project at Jenkins.

I use Jenkinsfile for integrating my project with jenkins.

And also I use Selenium Grid 4 (run with docker, and using http://localhost:4444/ui from Jenkins with SeleniumGrid plugin)
When i run my tests, it returns error;

run 1: could not start a new session. response code 500. message: error forwarding the new session empty pool of vm for setup capabilities {browsername: chrome, goog:chromeoptions: {args: [--disable-dev-shm-usage], extensions: []}, unexpectedalertbehaviour: ignore, unhandledpromptbehavior: ignore} host info: host: '68fd9726dd2f', ip: '172.18.0.2' build info: version: '4.6.0', revision: '79f1c02ae20' system info: os.name: 'linux', os.arch: 'amd64', os.version: '5.15.0-1029-azure', java.version: '11.0.17' driver info: org.openqa.selenium.remote.remotewebdriver command: [null, newsession {capabilities=[capabilities {browsername: chrome, goog:chromeoptions: {args: [--disable-dev-shm-usage], extensions: []}, unexpectedalertbehaviour: ignore, unhandledpromptbehavior: ignore}], desiredcapabilities=capabilities {browsername: chrome, goog:chromeoptions: {args: [--disable-dev-shm-usage], extensions: []}, unexpectedalertbehaviour: ignore, unhandledpromptbehavior: ignore}}] capabilities {} run 2: null

Jenkins Error:

Webdriver.java

public static RemoteWebDriver SeleniumGrid() {

    MutableCapabilities capabilities = new MutableCapabilities();
    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR,
            UnexpectedAlertBehaviour.IGNORE);
    capabilities.setCapability("browserName", "Chrome");
    capabilities.setCapability("browserVersion", "latest");
    chromeOptions.addArguments("--disable-dev-shm-usage");
    chromeOptions.addArguments("--disable-gpu");
    capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);

    try {

        driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), chromeOptions);
        driver.setFileDetector(new LocalFileDetector());
    } catch (MalformedURLException e) {
        throw new RuntimeException(e);
    }
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

    return driver;

}

Jenkinsfile

pipeline {
  agent any
  tools {
      maven 'Maven'
    }
  stages {
    stage('Run Tests') {
      steps {
        sh "mvn clean test"
      }
      post {
        always {
          junit '**/surefire-reports/*.xml'
          cucumber buildStatus: 'null', customCssFiles: '', customJsFiles: '', failedFeaturesNumber: -1, failedScenariosNumber: -1, failedStepsNumber: -1, fileIncludePattern: 'target/cucumber.json', pendingStepsNumber: -1, skippedStepsNumber: -1, sortingMethod: 'ALPHABETICAL', undefinedStepsNumber: -1
        }
      }
    }
  }
}

what should i do in my configuration to fix this problem.


问:
This question seems stupid but is that a calader form that i may include in my vba form? thx
Seems there was such a function in microsoft office 2013 32-bit version(Microsoft Date and Time Picker Control 6.0 (SP6)), but it seems that we cannot find it in office 365 now, is there an other alternative?

idk i scroll the whole addtional tools. Is it a must i did the form from scratch which is time consuming>_<?


问:
swiftui save image with mask
I have a picture with a drawn mask everything will display as it should.

```<code>var imageView: some View {
        Image(uiImage: newImage)
            .resizable()
            .scaledToFit()
            .reverseMask({
                DrawShape(drawingPath: drawing)
                        .stroke(lineWidth: 5) // define stroke width
                        .foregroundColor(.blue)

            })
    }
</code>```

When I try to save image to photo image, photo saved without mask

Convert view to image

```<code>extension View {
    func asImage() -> UIImage {
        let controller = UIHostingController(rootView: self)

        // locate far out of screen
        controller.view.frame = CGRect(x: 0, y: CGFloat(Int.max), width: 1, height: 1)
        UIApplication.shared.windows.first!.rootViewController?.view.addSubview(controller.view)

        let size = controller.view.intrinsicContentSize //controller.sizeThatFits(in: UIScreen.main.bounds.size)
        controller.view.bounds = CGRect(origin: .zero, size: size)
        controller.view.backgroundColor = UIColor.systemBackground
        controller.view.sizeToFit()

        //let image = controller.view.asImage()
        let image = UIImage(view: controller.view)
        controller.view.removeFromSuperview()
        return image
    }
}
</code>```

Save image

```<code>UIImageWriteToSavedPhotosAlbum( imageView.asImage(), nil, nil, nil)
</code>```

I want to save image with mask but save without mask

Title: swiftui save image with mask

Body:
I have a picture with a drawn mask everything will display as it should.

var imageView: some View {
        Image(uiImage: newImage)
            .resizable()
            .scaledToFit()
            .reverseMask({
                DrawShape(drawingPath: drawing)
                        .stroke(lineWidth: 5) // define stroke width
                        .foregroundColor(.blue)

            })
    }

When I try to save image to photo image, photo saved without mask

Convert view to image

extension View {
    func asImage() -> UIImage {
        let controller = UIHostingController(rootView: self)

        // locate far out of screen
        controller.view.frame = CGRect(x: 0, y: CGFloat(Int.max), width: 1, height: 1)
        UIApplication.shared.windows.first!.rootViewController?.view.addSubview(controller.view)

        let size = controller.view.intrinsicContentSize //controller.sizeThatFits(in: UIScreen.main.bounds.size)
        controller.view.bounds = CGRect(origin: .zero, size: size)
        controller.view.backgroundColor = UIColor.systemBackground
        controller.view.sizeToFit()

        //let image = controller.view.asImage()
        let image = UIImage(view: controller.view)
        controller.view.removeFromSuperview()
        return image
    }
}

Save image

UIImageWriteToSavedPhotosAlbum( imageView.asImage(), nil, nil, nil)

I want to save image with mask but save without mask


问:
how to implement a swap fee or buy/sell tax on dex (eg. pancakeswap) in ERC20 Token?
is it possible to write a smart contract for ERC20 token in solidity, which implements a buy/sell tax such as 3% when buying/selling on a dex such as pancakeswap automated market maker?

say for example,
when a holder of ERC20 token goes to pancakeswap AMM and swaps his ERC20 token for USDT, a 3% tax is applied and taken from the users amount and sent to a special address.