问:
I lose microseconds when Timestamp passes through my IRestResponseTransformer in Java SpringBoot
i will try to be more clear as possible. My project uses 2 containers to execute a service and get data from my DB2 . The first container passes input data through an IRestRequestTransformer that convert my data to be readable by the second container. The second container execute a query on my DB2 and extract the data I need. This data returns to the first container through an IRestResponseTransformer. In my case the data i'm trying to get is a Timestamp with microseconds precision that for example will be "2022-09-23 11.25.52.660135" . I can see that this Timestamp is correct when the query is executed on the second container :

but when it passes through the IRestResponseTransformer it gets cut and on my first container i only get "2022-09-23 11.25.52.660" without microseconds:

The model of the table contains the mapping of all the columns with getter and setter like this :

```<code>@Column(name = "TIMESTAMP_INS_B03")
private Timestamp timestampB03;

public Timestamp getTimestampInsB03() {
        return timestampInsB03;
    }

    public void setTimestampInsB03(Timestamp timestampInsB03) {
        this.timestampInsB03 = timestampInsB03;
    }

</code>```

I work with json and I wonder if exist an annotation like JsonFormat to specify that I need to keep microseconds or something similar. If you need more informations tell me and I will answer.

Body:
i will try to be more clear as possible. My project uses 2 containers to execute a service and get data from my DB2 . The first container passes input data through an IRestRequestTransformer that convert my data to be readable by the second container. The second container execute a query on my DB2 and extract the data I need. This data returns to the first container through an IRestResponseTransformer. In my case the data i'm trying to get is a Timestamp with microseconds precision that for example will be "2022-09-23 11.25.52.660135" . I can see that this Timestamp is correct when the query is executed on the second container :

but when it passes through the IRestResponseTransformer it gets cut and on my first container i only get "2022-09-23 11.25.52.660" without microseconds:

The model of the table contains the mapping of all the columns with getter and setter like this :

@Column(name = "TIMESTAMP_INS_B03")
private Timestamp timestampB03;

public Timestamp getTimestampInsB03() {
        return timestampInsB03;
    }

    public void setTimestampInsB03(Timestamp timestampInsB03) {
        this.timestampInsB03 = timestampInsB03;
    }

I work with json and I wonder if exist an annotation like JsonFormat to specify that I need to keep microseconds or something similar. If you need more informations tell me and I will answer.


来源: stackexchange

问:
In GitHub: How to sync automatically one repo, into a folder in another repo?
I have reviewed the answer to other questions that resemble mine, but non of them seemed to be addressing exactly the same point. So I could find an answer to my question somewhere else.

I have a project on Overleaf, which I am currently syncing with a personal repo in GitHub.

I have a second repo, which I am sharing with collaborators, where inside-- there is one relevant folder.

I wish to sync my original repo directly with that folder, so that when I push/pull everything will sync in my personal repo and the folder in the other one.

I would appreciate an help with how to do that.
If possible, please explain me how this can be done from the GitHib website?

Note that overleaf did not allow me to sync a new project directly to an existing folder in another repo, hence my question.
Thanks!

ContentLicense: CC BY-SA 4.0


问:
CLang compiled application uses gccmain.c instead of main.cpp from the project when statically linked
I run into a highly infuriating issue with the CMake project. I am running a self-build CLang (15.0.5) version of the Qt 6.4.2 application that builds, runs, and does things as it is meant to.

That is until I try to link my other library (which is wanted to separate from my code, as it is Matlab generated snippet). I use ExternalProject_Add to import this project from another repo (I will not share it as it is confidential), and I use this CMake to include it into my code:

```<code>include( LibAlgo )

add_library( algo STATIC hey.cpp )

add_dependencies( algo ${EXTERNAL_DEPENDENCIES} )
target_link_libraries( algo PRIVATE ${PRIVATE_EXTERNAL_LIBRARIES} )
target_include_directories( algo PRIVATE ${PRIVATE_EXTERNAL_INCLUDE_DIRS} )
</code>```

To get some context:

EXTERNAL_DEPENDENCIES -> Returns three values; none other than LibAlgo_lib is problematic (I did exclude them all from making sure)
PRIVATE_EXTERNAL_LIBRARIES -> Contains ONLY LibAlgo_lib
PRIVATE_EXTERNAL_INCLUDE_DIRS -> Contains ONLY path to LibAlgo_lib

When I run the above code, for some untold reasons, I can't see my application window; it just returns 0 and moves on. I could not catch it in any debug breakpoint in IDE, so annoyed, I used console debugger, stepped into it and asked debugger to tell me what kind of main I was using... The result annoyed me even more:

C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/gccmain.c

What the flying heck is this? How did he decide that I should link and use it as main?! I am dumbstruck by it. But hey, I am a developer, not a loser, so I look for solutions or workarounds. I found that version underneath works flawlessly (except I need to copy the DLL to the install folder, which adds another step - suboptimal).

```<code>include( LibAlgo )

add_library( algo SHARED hey.cpp ) # Look at modifier, here is SHARED!

add_dependencies( algo ${EXTERNAL_DEPENDENCIES} )
target_link_libraries( algo PRIVATE ${PRIVATE_EXTERNAL_LIBRARIES} )
target_include_directories( algo PRIVATE ${PRIVATE_EXTERNAL_INCLUDE_DIRS} )
</code>```

And now, surprisingly, the code works flawlessly. Most people would likely give up at this point, but I was dead set on finding the reason behind this behavior, so I investigated deeper. Funnily enough - I found a solution for static linking.

When I changed add_executable( <NAME> WIN32 ) to add_executable( <NAME> ), it worked. But it's something I can not use, as it causes application after deploying an open terminal window, which is suboptimal even more than *.dll issue...

The question I want to ask is:

Does anyone know what causes this extremely peculiar behavior of using crt/gccmain.c instead of main.cpp from inside of add_executable? Why do given two workarounds work?

Body:
I run into a highly infuriating issue with the CMake project. I am running a self-build CLang (15.0.5) version of the Qt 6.4.2 application that builds, runs, and does things as it is meant to.

That is until I try to link my other library (which is wanted to separate from my code, as it is Matlab generated snippet). I use ExternalProject_Add to import this project from another repo (I will not share it as it is confidential), and I use this CMake to include it into my code:

include( LibAlgo )

add_library( algo STATIC hey.cpp )

add_dependencies( algo ${EXTERNAL_DEPENDENCIES} )
target_link_libraries( algo PRIVATE ${PRIVATE_EXTERNAL_LIBRARIES} )
target_include_directories( algo PRIVATE ${PRIVATE_EXTERNAL_INCLUDE_DIRS} )

To get some context:

EXTERNAL_DEPENDENCIES -> Returns three values; none other than LibAlgo_lib is problematic (I did exclude them all from making sure)
PRIVATE_EXTERNAL_LIBRARIES -> Contains ONLY LibAlgo_lib
PRIVATE_EXTERNAL_INCLUDE_DIRS -> Contains ONLY path to LibAlgo_lib

When I run the above code, for some untold reasons, I can't see my application window; it just returns 0 and moves on. I could not catch it in any debug breakpoint in IDE, so annoyed, I used console debugger, stepped into it and asked debugger to tell me what kind of main I was using... The result annoyed me even more:

C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/gccmain.c

What the flying heck is this? How did he decide that I should link and use it as main?! I am dumbstruck by it. But hey, I am a developer, not a loser, so I look for solutions or workarounds. I found that version underneath works flawlessly (except I need to copy the DLL to the install folder, which adds another step - suboptimal).

include( LibAlgo )

add_library( algo SHARED hey.cpp ) # Look at modifier, here is SHARED!

add_dependencies( algo ${EXTERNAL_DEPENDENCIES} )
target_link_libraries( algo PRIVATE ${PRIVATE_EXTERNAL_LIBRARIES} )
target_include_directories( algo PRIVATE ${PRIVATE_EXTERNAL_INCLUDE_DIRS} )

And now, surprisingly, the code works flawlessly. Most people would likely give up at this point, but I was dead set on finding the reason behind this behavior, so I investigated deeper. Funnily enough - I found a solution for static linking.

When I changed add_executable( <NAME> WIN32 ) to add_executable( <NAME> ), it worked. But it's something I can not use, as it causes application after deploying an open terminal window, which is suboptimal even more than *.dll issue...

The question I want to ask is:

Does anyone know what causes this extremely peculiar behavior of using crt/gccmain.c instead of main.cpp from inside of add_executable? Why do given two workarounds work?


问:
Unable to Navigate to the profile screen in the AuthStateChange callback as shown in docs
I am using firebase_ui_auth package for authentication in my first Flutter app using the code below. I am only using phone authentication provider. The problem I am facing is after I enter the OTP and click verify AuthStateChangeAction callback is triggered, inside this callback I want to navigate to the profile screen so I use the below line of code as mentioned in the documentation.

Navigator.pushReplacementNamed(context, '/profile');

But the above line doesn't takes me to the profile screen, instead after I enter the OTP and click verify it takes me again to the sign-in screen. So, I took a Codementor session and he changed the line in the AuthStateChangeAction callback to the below line.

```<code>WidgetsBinding.instance.addPersistentFrameCallback((timeStamp) {
                  Navigator.pushReplacementNamed(context, '/profile');
                });
</code>```

This takes me to the profile screen(expected behaviour) after I enter the OTP and click Verify button. But now in the logs, I am getting the below error.

Another exception was thrown: Looking up a deactivated widget's ancestor is unsafe.

So, I wanted to know answers to below questions?

what does using WidgetsBinding.instance.addPersistentFrameCallback do?

How does it affect the screen stack of my app?

Why deactivated widget's ancestor exception is raised?

Why am I not navigated to the profile screen when I don't use WidgetsBinding?

Is it fine to use WidgetsBinding for navigating to other screens?

What is the best practice for navigation to the profile screen?

Body:
I am using firebase_ui_auth package for authentication in my first Flutter app using the code below. I am only using phone authentication provider. The problem I am facing is after I enter the OTP and click verify AuthStateChangeAction callback is triggered, inside this callback I want to navigate to the profile screen so I use the below line of code as mentioned in the documentation.

Navigator.pushReplacementNamed(context, '/profile');

But the above line doesn't takes me to the profile screen, instead after I enter the OTP and click verify it takes me again to the sign-in screen. So, I took a Codementor session and he changed the line in the AuthStateChangeAction callback to the below line.

WidgetsBinding.instance.addPersistentFrameCallback((timeStamp) {
                  Navigator.pushReplacementNamed(context, '/profile');
                });

This takes me to the profile screen(expected behaviour) after I enter the OTP and click Verify button. But now in the logs, I am getting the below error.

Another exception was thrown: Looking up a deactivated widget's ancestor is unsafe.

So, I wanted to know answers to below questions?

what does using WidgetsBinding.instance.addPersistentFrameCallback do?

How does it affect the screen stack of my app?

Why deactivated widget's ancestor exception is raised?

Why am I not navigated to the profile screen when I don't use WidgetsBinding?

Is it fine to use WidgetsBinding for navigating to other screens?

What is the best practice for navigation to the profile screen?


Title: R: Plot convex hull with geom_raster

Body:
I'm using the code below to plot the given graph:

ggplot() + geom_raster(aes(x=X, y=Y, fill=temp), df, show.legend = F)

This is what the data looks like:

                  X             Y       temp
     1:         0.012          0.016 0.001467175
     2:         0.012          0.018 0.001543842
     3:         0.014          0.018 0.001711704
     4:         0.012          0.020 0.001621719
     5:         0.014          0.020 0.001801149
    ---
371011:         1.618          2.000 0.727286814
371012:         1.620          2.000 0.727429577
371013:         1.622          2.000 0.727548676
371014:         1.624          2.000 0.727639502
371015:         1.626          2.000 0.727697465

However, I would like the spiky parts to be removed and only the convex hull plotted. I've tried using slice(chull(X,Y)) but that gives me an empty plot. Could anyone help?


问:
How to install private Python package from an AWS S3 repository using Poetry?
I'm using Poetry 1.3.2, created a virtual env with Python 3.8 and now trying to install the dependencies of my project via poetry install.

The project has a private dependency which is stored in an AWS S3 bucket repository, so I added the address of this channel via poetry source add --secondary my-conda-repo s3://my-conda-repo/my-key (the credentials are in my ~/.aws/credentials).

In pyproject.toml I configured my private dependency as

```<code>[tool.poetry.dependencies]
my-utils = { version = "5.0.1", source = "INTERNAL" }
</code>```

When I run poetry install I get an error:

```<code>  • Installing my-utils (5.0.1): Pending...
  • Installing my-utils (5.0.1): Failed

  RuntimeError

  Unable to find installation candidates for my-utils (5.0.1)
</code>```

How can I configure Poetry to read from my S3 repository?

Body:
I'm using Poetry 1.3.2, created a virtual env with Python 3.8 and now trying to install the dependencies of my project via poetry install.

The project has a private dependency which is stored in an AWS S3 bucket repository, so I added the address of this channel via poetry source add --secondary my-conda-repo s3://my-conda-repo/my-key (the credentials are in my ~/.aws/credentials).

In pyproject.toml I configured my private dependency as

[tool.poetry.dependencies]
my-utils = { version = "5.0.1", source = "INTERNAL" }

When I run poetry install I get an error:

  • Installing my-utils (5.0.1): Pending...
  • Installing my-utils (5.0.1): Failed

  RuntimeError

  Unable to find installation candidates for my-utils (5.0.1)

How can I configure Poetry to read from my S3 repository?


问:
converting Java Script to PowerShell
I am trying to translate the following to PowerShell to include in a PowerShell script that will make an API call.  The API use JWT signing.  The following is from a pre-request script the vendor is using in Postman.  Everything works perfect in Postman.  If I use the JWT created by the pre-request script in my PowerShell script it works.  The problem is with the JWT signing section of my PowerShell code.

```<code> // Create JWT
 var unsignedRequest = base64object(jwtHeader) + "." + base64object(jwtPayload);

 // Decode the use_base64_key
 var key = CryptoJS.enc.Base64.parse(pm.variables.get("use_base64_key"));

 // Sign the JWT
 var signatureHash = CryptoJS.HmacSHA256(unsignedRequest, key);
 var signature = CryptoJS.enc.Base64.stringify(signatureHash);
 var signature = removeIllegalCharacters(signature);
</code>```

I've tried using some samples from JWT.io.  I think my specific issue is not being able to replicate this section.

```<code> Decode the use_base64_key
 var key = CryptoJS.enc.Base64.parse(pm.variables.get("use_base64_key"));
</code>```

The key we are provided is base64 and according to the vendor it has to be decoded first.  As I understand the above section, this decodes the base64 to a wordarray.  This is part I think PS script is missing.

Edit to add code suggested by boxdog-
The error I get from the request is 403 forbidden.  Meaning the request could not be verified.

```<code># VARIABLES
$Algorithm="HS256"
$ContentType="application/json"
$SecretKey=""
$use_base64_key=""
$org_alias=""

# PRE-REQ
Add-Type -AssemblyName System.Security

# FUNCTIONS
Function Get-HMACSHA512 {
    param(
         [Parameter(Mandatory=$true)][String]$data
        ,[Parameter(Mandatory=$true)][String]$key
    )
    $hmacsha = New-Object System.Security.Cryptography.HMACSHA256
    $hmacsha.key = [Text.Encoding]::UTF8.GetBytes($key)
    $bytesToSign = [Text.Encoding]::UTF8.GetBytes($data)
    $sign = $hmacsha.ComputeHash($bytesToSign)
    return $sign
}

Function Get-StringFromByte {
    param(
        [Parameter(Mandatory=$true)][byte[]]$byteArray
    )
    $stringBuilder = ""
    $byteArray | ForEach { $stringBuilder += $_.ToString("x2") }
    return $stringBuilder
}

Function Get-Base64UrlEncodeFromString {
    param(
         [Parameter(Mandatory=$true)][String]$inputString
    )
    $inputBytes = [Text.Encoding]::UTF8.GetBytes($inputString)
    # Special "url-safe" base64 encode.
    $base64 = [System.Convert]::ToBase64String($inputBytes,[Base64FormattingOptions]::None).Replace('+', '-').Replace('/', '_').Replace("=", "")
    return $base64
}

Function Get-Base64UrlEncodeFromByteArray {
    param(
         [Parameter(Mandatory=$true)][byte[]]$byteArray
    )
    # Special "url-safe" base64 encode.
    $base64 = [System.Convert]::ToBase64String($byteArray,[Base64FormattingOptions]::None).Replace('+', '-').Replace('/', '_').Replace("=", "")
    return $base64
}

Function Get-Base64FromString {
    param(
         [Parameter(Mandatory=$true)][String]$inputString
    )
    $inputBytes = [Text.Encoding]::UTF8.GetBytes($inputString)
    # Special "url-safe" base64 encode.
    $base64 = [System.Convert]::ToBase64String($inputBytes,[Base64FormattingOptions]::None)
    return $base64
}

Function Get-Base64FromByteArray {
    param(
         [Parameter(Mandatory=$true)][byte[]]$byteArray
    )
    $base64 = [System.Convert]::ToBase64String($byteArray,[Base64FormattingOptions]::None)
    return $base64
}

Function Check-Base64 {
# Add missing "=" at the end and check url-safe encodings
    param(
         [Parameter(Mandatory=$true)][String]$inputString
    )
    #$input
    $encoded = $inputString.Replace('-','+').Replace('_','/')
    $d = $encoded.Length % 4
    if ( $d -ne 0 ) {
        $encoded  = $encoded.TrimEnd('=')
        if ( $d % 2 -gt 0 ) {
            $encoded += '='
        } else {
            $encoded += '=='
        }
    }
    return $encoded
}

Function Create-JWT {
    param(
          [Parameter(Mandatory=$true)][System.Collections.Specialized.OrderedDictionary]$headers
         ,[Parameter(Mandatory=$true)][System.Collections.Specialized.OrderedDictionary]$payload
         ,[Parameter(Mandatory=$true)][string]$secret
    )
    $headersJson = $headers | ConvertTo-Json
    $payloadJson = $payload | ConvertTo-Json
    $headersEncoded = Get-Base64UrlEncodeFromString -inputString $headersJson #[System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($headersJson),[Base64FormattingOptions]::None)
    $payloadEncoded = Get-Base64UrlEncodeFromString -inputString $payloadJson #[System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($payloadJson),[Base64FormattingOptions]::None)
    $content = "$( $headersEncoded ).$( $payloadEncoded )"
    $signatureByte = Get-HMACSHA512 -data $content -key $secret
    $signature = Get-Base64UrlEncodeFromByteArray -byteArray $signatureByte
    $jwt = "$( $headersEncoded ).$( $payloadEncoded ).$( $signature )"
    return $jwt
}

# MAIN CODE
# Get Username to verify
$username = read-host "Enter username in UPN format (i.e. SmithJ@google.com) -->"

#Get-user API call

#Header
$headers=[ordered]@{alg=$Algorithm; org_alias= $org_alias; token=$SecretKey}

#Payload
$payload=[ordered]@{reqHeader = [ordered]@{
  locale='en';
  orgAlias=$org_alias;
  secretKey=$SecretKey;
  timestamp=((get-date).ToUniversalTime());
  version='4.9'}
  reqBody = [ordered]@{
  getSameDeviceUsers = "true";
  userName = $username
    }
 }

# Create JWT
$secret = $secretkey
$jwt = Create-JWT -headers $headers -payload $payload -secret $use_base64_key

#sending request
$RESTheader = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$RESTheader.Add("Content-Type", "application/json")
$apiresponse = Invoke-RestMethod -Uri 'https://idpxnyl3m.pingidentity.com/pingid/rest/4/getuserdetails/do' -Method 'POST' -Headers $RESTheader -Body $JWT
</code>```

Title: converting Java Script to PowerShell

Body:
I am trying to translate the following to PowerShell to include in a PowerShell script that will make an API call.  The API use JWT signing.  The following is from a pre-request script the vendor is using in Postman.  Everything works perfect in Postman.  If I use the JWT created by the pre-request script in my PowerShell script it works.  The problem is with the JWT signing section of my PowerShell code.

 // Create JWT
 var unsignedRequest = base64object(jwtHeader) + "." + base64object(jwtPayload);

 // Decode the use_base64_key
 var key = CryptoJS.enc.Base64.parse(pm.variables.get("use_base64_key"));

 // Sign the JWT
 var signatureHash = CryptoJS.HmacSHA256(unsignedRequest, key);
 var signature = CryptoJS.enc.Base64.stringify(signatureHash);
 var signature = removeIllegalCharacters(signature);

I've tried using some samples from JWT.io.  I think my specific issue is not being able to replicate this section.

 Decode the use_base64_key
 var key = CryptoJS.enc.Base64.parse(pm.variables.get("use_base64_key"));

The key we are provided is base64 and according to the vendor it has to be decoded first.  As I understand the above section, this decodes the base64 to a wordarray.  This is part I think PS script is missing.

Edit to add code suggested by boxdog-
The error I get from the request is 403 forbidden.  Meaning the request could not be verified.

# VARIABLES
$Algorithm="HS256"
$ContentType="application/json"
$SecretKey=""
$use_base64_key=""
$org_alias=""

# PRE-REQ
Add-Type -AssemblyName System.Security

# FUNCTIONS
Function Get-HMACSHA512 {
    param(
         [Parameter(Mandatory=$true)][String]$data
        ,[Parameter(Mandatory=$true)][String]$key
    )
    $hmacsha = New-Object System.Security.Cryptography.HMACSHA256
    $hmacsha.key = [Text.Encoding]::UTF8.GetBytes($key)
    $bytesToSign = [Text.Encoding]::UTF8.GetBytes($data)
    $sign = $hmacsha.ComputeHash($bytesToSign)
    return $sign
}

Function Get-StringFromByte {
    param(
        [Parameter(Mandatory=$true)][byte[]]$byteArray
    )
    $stringBuilder = ""
    $byteArray | ForEach { $stringBuilder += $_.ToString("x2") }
    return $stringBuilder
}

Function Get-Base64UrlEncodeFromString {
    param(
         [Parameter(Mandatory=$true)][String]$inputString
    )
    $inputBytes = [Text.Encoding]::UTF8.GetBytes($inputString)
    # Special "url-safe" base64 encode.
    $base64 = [System.Convert]::ToBase64String($inputBytes,[Base64FormattingOptions]::None).Replace('+', '-').Replace('/', '_').Replace("=", "")
    return $base64
}

Function Get-Base64UrlEncodeFromByteArray {
    param(
         [Parameter(Mandatory=$true)][byte[]]$byteArray
    )
    # Special "url-safe" base64 encode.
    $base64 = [System.Convert]::ToBase64String($byteArray,[Base64FormattingOptions]::None).Replace('+', '-').Replace('/', '_').Replace("=", "")
    return $base64
}

Function Get-Base64FromString {
    param(
         [Parameter(Mandatory=$true)][String]$inputString
    )
    $inputBytes = [Text.Encoding]::UTF8.GetBytes($inputString)
    # Special "url-safe" base64 encode.
    $base64 = [System.Convert]::ToBase64String($inputBytes,[Base64FormattingOptions]::None)
    return $base64
}

Function Get-Base64FromByteArray {
    param(
         [Parameter(Mandatory=$true)][byte[]]$byteArray
    )
    $base64 = [System.Convert]::ToBase64String($byteArray,[Base64FormattingOptions]::None)
    return $base64
}

Function Check-Base64 {
# Add missing "=" at the end and check url-safe encodings
    param(
         [Parameter(Mandatory=$true)][String]$inputString
    )
    #$input
    $encoded = $inputString.Replace('-','+').Replace('_','/')
    $d = $encoded.Length % 4
    if ( $d -ne 0 ) {
        $encoded  = $encoded.TrimEnd('=')
        if ( $d % 2 -gt 0 ) {
            $encoded += '='
        } else {
            $encoded += '=='
        }
    }
    return $encoded
}

Function Create-JWT {
    param(
          [Parameter(Mandatory=$true)][System.Collections.Specialized.OrderedDictionary]$headers
         ,[Parameter(Mandatory=$true)][System.Collections.Specialized.OrderedDictionary]$payload
         ,[Parameter(Mandatory=$true)][string]$secret
    )
    $headersJson = $headers | ConvertTo-Json
    $payloadJson = $payload | ConvertTo-Json
    $headersEncoded = Get-Base64UrlEncodeFromString -inputString $headersJson #[System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($headersJson),[Base64FormattingOptions]::None)
    $payloadEncoded = Get-Base64UrlEncodeFromString -inputString $payloadJson #[System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($payloadJson),[Base64FormattingOptions]::None)
    $content = "$( $headersEncoded ).$( $payloadEncoded )"
    $signatureByte = Get-HMACSHA512 -data $content -key $secret
    $signature = Get-Base64UrlEncodeFromByteArray -byteArray $signatureByte
    $jwt = "$( $headersEncoded ).$( $payloadEncoded ).$( $signature )"
    return $jwt
}

# MAIN CODE
# Get Username to verify
$username = read-host "Enter username in UPN format (i.e. SmithJ@google.com) -->"

#Get-user API call

#Header
$headers=[ordered]@{alg=$Algorithm; org_alias= $org_alias; token=$SecretKey}

#Payload
$payload=[ordered]@{reqHeader = [ordered]@{
  locale='en';
  orgAlias=$org_alias;
  secretKey=$SecretKey;
  timestamp=((get-date).ToUniversalTime());
  version='4.9'}
  reqBody = [ordered]@{
  getSameDeviceUsers = "true";
  userName = $username
    }
 }

# Create JWT
$secret = $secretkey
$jwt = Create-JWT -headers $headers -payload $payload -secret $use_base64_key

#sending request
$RESTheader = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$RESTheader.Add("Content-Type", "application/json")
$apiresponse = Invoke-RestMethod -Uri 'https://idpxnyl3m.pingidentity.com/pingid/rest/4/getuserdetails/do' -Method 'POST' -Headers $RESTheader -Body $JWT


问:
How to merge two 2D Splines on orthogonal planes into one 3D Spline in python
I need to create a 3D Spline (or NURBS, both would be possible as I can convert these internally) based on two 2D Splines (or NURBS). The two base Splines are on orthogonal planes in a 3D space.
Let's say, for simplicity, spline A is on the XY-Plane, spline B on the YZ-Plane.
Both splines start and end on the same Y coordinate but do not share any points in between.

Image above: Two 2D Splines; Black on XY, blue on YZ. Shared Y coordinate for start and end point, different control points

How can I calculate the resulting 3D spline that is a merge of the two 2D splines?

Purple spline is the resulting 3D Spline.

If allways two spline control points of the 2D splines share the same Y coordinate, it is simple, the new point is the compound of the two old points, where

the new X cooridnate is the XY-Plane's spline X coordinate

the new Y cooridnate is any Y coordinate as they are the same

the new Z coordinate is the YZ-Plane's spline Z coordinate

If the spline control points do not share a common Y coordinate, it seems more difficult. Is there a library I can use to achieve that?

Hope I made my problem somewhat clear.


问:
DNS Check Successful, can't enforce HTTPS in Github Pages
I'm deploying a website through Github pages. I've done this before but not enough to consider myself professional.

When I go to Github pages in my repository, I add the web address of my custom domain, and for a few seconds it performs a DNS check. When it says successful, I try to click the checkbox but the box is still grayed out.

When I refresh the page it goes back to doing a DNS check and then after a couple of seconds it says DNS check was successful.

I've checked with my DNS registrar and I've created an "A" record with the IP addresses for my site on Github pages and a CNAME record as well.

I tried removing the custom domain and adding it again and that's when it started to go through the DNS check  and then success cycle every time I loaded the page, but it still won't unblock the Enforce HTTPS box.


问:
This action won't work on multiple selections with Excel exported from Crystal Reports
I have several workbooks that I exported from Crystal Reports.  Any time I try to copy and paste anything, even a single cell, I get "This action won't work with multiple selections."  I can't even add a new sheet to one of these workbooks.  This happens if I am trying to copy a single cell, a group of cells, or an entire sheet.  I do not have sheets grouped, and the workbooks I am using only have a single sheet in each.

Microsoft 365 Apps for enterprise

I tried copying the sheet to a new blank workbook, that worked for one but not another.


问:
PullUp Resistor on Raspberry Pi not working all the time
I have a Raspberry Pi 3 that uses a Python script to check if a relay has switched.
However, it says at irregular intervals (between 5 seconds and 1 minute) that the relay has switched, although in reality it has not switched. I connected it to the 3.3V pin and to a GPIO pin (26).

Do I need a resistor between the components? I thought I didn't need one because I have the internal pull-up resistor. I also tried different GPIO pins but it didn't work.

Thanks

The code:

```<code>import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)

GPIO.setup(26, GPIO.IN, pull_up_down=GPIO.PUD_UP)

while True:
    if GPIO.input(26) == GPIO.LOW:
        print("yes")

    time.sleep(0.01)
</code>```

Body:
I have a Raspberry Pi 3 that uses a Python script to check if a relay has switched.
However, it says at irregular intervals (between 5 seconds and 1 minute) that the relay has switched, although in reality it has not switched. I connected it to the 3.3V pin and to a GPIO pin (26).

Do I need a resistor between the components? I thought I didn't need one because I have the internal pull-up resistor. I also tried different GPIO pins but it didn't work.

Thanks

The code:

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)

GPIO.setup(26, GPIO.IN, pull_up_down=GPIO.PUD_UP)

while True:
    if GPIO.input(26) == GPIO.LOW:
        print("yes")

    time.sleep(0.01)


问:
How to extract all of the binary files recursively
I have a .docx file that contains .pptx file that contains images.
I'm trying to figure out how to extract all of the binary files recursively, so
I will be able to get the .pptx but most importantly its images.
I saw there's "/unpack" endpoint but it does not work recursively, which means it extracts only the child documents of the original file.
Any ideas how to get that job done by only using the Tika server?</p>


问:
using Flutter/dart, what's a better way to display a dot for everyday of the year which color of the dots can be changed depending on data
I'm new to flutter/dart and have currently made this, but on the backend it looks like a mess. I figured there has to be a better way to do it.
I also was wondering what would the best way to change the color or each dot specifically.
just looking for some general advice and perhaps an article or two to read or a yt vid.
Thank you.pic of front end

right now im using a gridview but with 365/366 dots, one for each day, the code looks a bit messy and im not sure how i would change each dot independently. for example if i had an array 365 long full of bool's an each day corresponded to a dot. green if true, grey of false. how would i efficiently code that?
Thanks againpic of code

heres a small snippet of the code

```                      Expanded(
                    child: GridView.count(
                      physics: const NeverScrollableScrollPhysics(),
                      childAspectRatio: (1.4 / 1),
                      padding: const EdgeInsets.only(right: 10, left: 10),
                      crossAxisCount: 13,
                      children: [
                        const Center(child: Text('')),
                        Center(
                            child: Text('J',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('F',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('M',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('A',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('M',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('J',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('J',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('A',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('S',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('O',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('N',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('D',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('1',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('2',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('3',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('4',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('5',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('6',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('7',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('8',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
```

Body:
I'm new to flutter/dart and have currently made this, but on the backend it looks like a mess. I figured there has to be a better way to do it.
I also was wondering what would the best way to change the color or each dot specifically.
just looking for some general advice and perhaps an article or two to read or a yt vid.
Thank you.pic of front end

right now im using a gridview but with 365/366 dots, one for each day, the code looks a bit messy and im not sure how i would change each dot independently. for example if i had an array 365 long full of bool's an each day corresponded to a dot. green if true, grey of false. how would i efficiently code that?
Thanks againpic of code

heres a small snippet of the code

                      Expanded(
                    child: GridView.count(
                      physics: const NeverScrollableScrollPhysics(),
                      childAspectRatio: (1.4 / 1),
                      padding: const EdgeInsets.only(right: 10, left: 10),
                      crossAxisCount: 13,
                      children: [
                        const Center(child: Text('')),
                        Center(
                            child: Text('J',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('F',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('M',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('A',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('M',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('J',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('J',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('A',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('S',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('O',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('N',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('D',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Center(
                            child: Text('1',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('2',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('3',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('4',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('5',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('6',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('7',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Center(
                            child: Text('8',
                                style: TextStyle(
                                    color: AppColors.textColLightGrey))),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),
                        Icon(
                          Icons.circle,
                          color: AppColors.pixelNotDone,
                          size: 15,
                        ),


问:
angular read FormGroup elementrs from injected component return void values
i have an angular component with a FormGroup defined as:

```<code>public serverForm: FormGroup = this.formBuilder.group({
    address: [''],
    port: [''],
    wait: ['']
  });
</code>```

and i compile the data from an http request as follows:

```<code> ngOnInit()
  {
   [...]
    this.wifiservice.checkServerSts().subscribe(data =>
      {
        this.serverForm.get("address")?.setValue(data.serverAddress);
        this.serverForm.get("port")?.setValue(data.serverPort);
        this.serverForm.get("wait")?.setValue(data.wait);
      }
      );
    [...]
}
</code>```

I have signed the componed with @Injectable annotation and added to providers into app.module.ts,
now in my service.ts i import the AppComponent module and access to serverForm fields:

```<code>constructor(private http: HttpClient, private appComponent: AppComponent) { }
[...]
createSensor(name: String)
  {
    let address = this.appComponent.serverForm.get("address")?.value;
    let port = this.appComponent.serverForm.get("port")?.value;
    console.log("http://" + address + ":" + port);
    if (address != "" && port != "")
    {
      let url = "http://" + address + ":" + port + this.createSensorUrl;
      return this.http.post(url, {name: name});
    }
    return  throwError(() => new Error('address or port not compiled'));
  }
</code>```

but also with data compiled in the form, in console i read

```<code>http://:
main.js:1 ERROR Error: address or port not compiled
    at main.js:1:131453
    at e.r [as _subscribe] (main.js:1:131403)
    at e._trySubscribe (main.js:1:4854)
    at main.js:1:4799
    at Fo (main.js:1:2598)
    at e.subscribe (main.js:1:4713)
    at So.onCreate (main.js:1:172937)
    at main.js:1:169938
    at Hh (main.js:1:66934)
    at i (main.js:1:67083)
</code>```

so i can't read values from the FormGroup... Any ideas?
the service is actually called by a second component.

Body:
i have an angular component with a FormGroup defined as:

public serverForm: FormGroup = this.formBuilder.group({
    address: [''],
    port: [''],
    wait: ['']
  });

and i compile the data from an http request as follows:

 ngOnInit()
  {
   [...]
    this.wifiservice.checkServerSts().subscribe(data =>
      {
        this.serverForm.get("address")?.setValue(data.serverAddress);
        this.serverForm.get("port")?.setValue(data.serverPort);
        this.serverForm.get("wait")?.setValue(data.wait);
      }
      );
    [...]
}

I have signed the componed with @Injectable annotation and added to providers into app.module.ts,
now in my service.ts i import the AppComponent module and access to serverForm fields:

constructor(private http: HttpClient, private appComponent: AppComponent) { }
[...]
createSensor(name: String)
  {
    let address = this.appComponent.serverForm.get("address")?.value;
    let port = this.appComponent.serverForm.get("port")?.value;
    console.log("http://" + address + ":" + port);
    if (address != "" && port != "")
    {
      let url = "http://" + address + ":" + port + this.createSensorUrl;
      return this.http.post(url, {name: name});
    }
    return  throwError(() => new Error('address or port not compiled'));
  }

but also with data compiled in the form, in console i read

http://:
main.js:1 ERROR Error: address or port not compiled
    at main.js:1:131453
    at e.r [as _subscribe] (main.js:1:131403)
    at e._trySubscribe (main.js:1:4854)
    at main.js:1:4799
    at Fo (main.js:1:2598)
    at e.subscribe (main.js:1:4713)
    at So.onCreate (main.js:1:172937)
    at main.js:1:169938
    at Hh (main.js:1:66934)
    at i (main.js:1:67083)

so i can't read values from the FormGroup... Any ideas?
the service is actually called by a second component.


问:
I want to be able to change the Ideal date in the iteration burndown chart
I need to be able to adjust the Ideal date on the iteration burndown chart.  I am experimenting and the hours were added after the start of the sprint but I want them to show as added on the first day so the chart is reflecting my perception.
What would I need to tweak in the source code for me to trick it into showing what I want?

I am not a developer so I haven't tried much yet.


问:
Is it possible to add files to .gitignore so that they are not displayed in the repository if the project is already uploaded to github
I uploaded my training project to github and only then noticed that there are a lot of extra files that simply should not be displayed, I added them to .gitignore but they are all displayed exactly in the repository, how to make them not be displayed but in .gitignore

I tried to solve the problem through the terminal, drive the necessary files into .gitignore through PyCharm and directly into the .gitignore file


问:
Android Studio daily notification API 31+
I am attempting to set daily notifications in my app, but they only seem to be working one time. Additionally, I am attempting to make it work also on API 31 and higher.

```<code>                int hourOfDay = timePicker.getHour();
                int minute = timePicker.getMinute();
                Calendar calendar = Calendar.getInstance();
                calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
                calendar.set(Calendar.MINUTE, minute);
                calendar.set(Calendar.SECOND, 0);
                if(calendar.getTimeInMillis() < System.currentTimeMillis())
                    calendar.add(Calendar.DATE, 1);
                AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
                Intent intent = new Intent(TimerPickerAct.this, MyBroadcastReceiver.class);
                PendingIntent pendingIntent = PendingIntent.getBroadcast(TimerPickerAct.this, 0, intent, PendingIntent.FLAG_IMMUTABLE);
                alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);

</code>```

I tried to do it this way but in this way I don't get any notification.

```<code>alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),AlarmManager.INTERVAL_DAY, pendingIntent)

</code>```

Body:
I am attempting to set daily notifications in my app, but they only seem to be working one time. Additionally, I am attempting to make it work also on API 31 and higher.

                int hourOfDay = timePicker.getHour();
                int minute = timePicker.getMinute();
                Calendar calendar = Calendar.getInstance();
                calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
                calendar.set(Calendar.MINUTE, minute);
                calendar.set(Calendar.SECOND, 0);
                if(calendar.getTimeInMillis() < System.currentTimeMillis())
                    calendar.add(Calendar.DATE, 1);
                AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
                Intent intent = new Intent(TimerPickerAct.this, MyBroadcastReceiver.class);
                PendingIntent pendingIntent = PendingIntent.getBroadcast(TimerPickerAct.this, 0, intent, PendingIntent.FLAG_IMMUTABLE);
                alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);

I tried to do it this way but in this way I don't get any notification.

alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),AlarmManager.INTERVAL_DAY, pendingIntent)


问:
BWA alignment "fail to locate the index files"
This question has been asked previously, but unfortunately for me the solutions posted did not resolve my issue. I am trying to use BWA to align my ddradseq paired end reads to a reference genome, and keep running into the issue of the program throwing the error  [E::bwa_idx_load_from_disk] fail to locate the index files.

This is the code I am using:

```<code># Load the BWA module:

module load bwa

bwa mem -t 2 genome/genome.fasta \ processrad_out/sample1.1.fq.gz processrad_out/sample1.2.fq.gz \
>bwa_out/sample1.sam
</code>```

My data it stored in the 'processrad_out' directory, indexed genome in the 'genome' directory, and I want the output to be stored in the 'bwa_out' directory.

I have already indexed the genome, and have tried running my script in the indexed genome directly, but still seem to have the same issue. These are the indexed files I have:

```<code>LeachsGenome.fasta
LeachsGenome.fasta.ann
LeachsGenome.fasta.fai
LeachsGenome.fasta.sa
LeachsGenome.fasta.amb
LeachsGenome.fasta.bwt
LeachsGenome.fasta.pac
</code>```

Previously when I indexed I was missing the .fai file but managed to correct that issue. Despite, the program is still having difficulty locating the indexed files. I have also tried re-indexing as that seems to have worked for some people but no such luck. I know my paths are correct and I can quite figure out what the correct solution is.

I am fairly new to bioinformatics and am trying to learn as much as I can. Any suggestions are welcome and highly appriciated!

Body:
This question has been asked previously, but unfortunately for me the solutions posted did not resolve my issue. I am trying to use BWA to align my ddradseq paired end reads to a reference genome, and keep running into the issue of the program throwing the error  [E::bwa_idx_load_from_disk] fail to locate the index files.

This is the code I am using:

# Load the BWA module:

module load bwa

bwa mem -t 2 genome/genome.fasta \ processrad_out/sample1.1.fq.gz processrad_out/sample1.2.fq.gz \
>bwa_out/sample1.sam

My data it stored in the 'processrad_out' directory, indexed genome in the 'genome' directory, and I want the output to be stored in the 'bwa_out' directory.

I have already indexed the genome, and have tried running my script in the indexed genome directly, but still seem to have the same issue. These are the indexed files I have:

LeachsGenome.fasta
LeachsGenome.fasta.ann
LeachsGenome.fasta.fai
LeachsGenome.fasta.sa
LeachsGenome.fasta.amb
LeachsGenome.fasta.bwt
LeachsGenome.fasta.pac

Previously when I indexed I was missing the .fai file but managed to correct that issue. Despite, the program is still having difficulty locating the indexed files. I have also tried re-indexing as that seems to have worked for some people but no such luck. I know my paths are correct and I can quite figure out what the correct solution is.

I am fairly new to bioinformatics and am trying to learn as much as I can. Any suggestions are welcome and highly appriciated!


问:
Unable to access main during debug mode on uvision / no problem with mcuxpresso
This might be a newbie question, but I am going crazy already haha.

symptom

I am having an issue with the lpcxpresso54102 Dev Board, where I am not able to access main.c during debug session, but if I check on the disassembly window I can see the main file, instruction set and actually the project works and I am able to set breakpoints through disassembly. disassembly_data

symptom

If I place a break point on main.c, when I start the debug session, my breakpoint is replaced by a circle with a exclamation point inside the circle. Browsing through ARM dev QA site, I was able to find that this issue is related to

NO CODE AT BREAKPOINT: A breakpoint could not be set because there is no code generated for this source code line. Compiler or linker optimization can remove unnecessary source code.

ARM_DEV_QA

NOTE: optimization config. was modified from original project to 0 optimization level.

symptom

Once I enabled the option for debug information on the target configuration, the file "startup_LPC54102_cm4.s", the cursor was actually going trough the file and eventually reaching the infinite loop used to toggle the led on  the board.

NOTE: This file is the example code from the SDK example lib from NXP (blinky), but all the other examples behave the same in UVision, but if I tried on MCUXpresso IDE the debug session works just fine.

Also I checked the linker files and they seem to be ok.

I changed the configuration on the target of Uvision enabling the output info and also changing the optimization to level 0, checked the compiler control string on C/C++ tab and it seems that all the files path and controls are there (no completely sure though). I tried with external and internal debug HW, same behavior.


问:
Trusting additional CAs in iOS application
I'm basically looking for a way, in an iOS app I'm developing, to achieve the same thing as this on Android.

I need to somehow embed my CA cert in the iOS app and then configure it to trust that CA in addition to the system certificates.

Is this possible without writing native code?

I'm using Expo so ideally I'd like an easy way via Info.plist or something like that if possible.

I haven't really tried anything yet. I did for Android and it works, just can't figure out how to do the same thing on iOS.


问:
URL breaks after reading an environment variable from a .json file
I wanted to be able to set environment variables at runtime and so I followed this tutorial. However, when I try to use a variable, the URL breaks and redirects me to e.g. localhost:8080/index.html#/foo instead of localhost:8080/#/foo. This happens when I try to use the variable as a class field:

```<code>export class CometdService implements OnDestroy {

  protected cometd: CometDExtended = new cometlib.CometD() as CometDExtended;

  private subscriptions: cometlib.SubscriptionHandle[] = [];

  apiUrl: string;

  constructor(private environment: AppConfigService, private store: Store<fromRoot.State>) {
    this.apiUrl = environment.config.apiUrl;
    this.cometd.configure('http://localhost:8080/cometd');

    this.startConnection();
  }
(...)
}
</code>```

or pass it into a path like so:

```<code>export class CometdService implements OnDestroy {

  protected cometd: CometDExtended = new cometlib.CometD() as CometDExtended;

  private subscriptions: cometlib.SubscriptionHandle[] = [];

  constructor(private environment: AppConfigService, private store: Store<fromRoot.State>) {
    this.cometd.configure(`http://${environment.config.apiUrl}/cometd`);

    this.startConnection();
  }
(...)
}
</code>```

but not when I just instantiate a variable in the constructor:

```<code>export class CometdService implements OnDestroy {

  protected cometd: CometDExtended = new cometlib.CometD() as CometDExtended;

  private subscriptions: cometlib.SubscriptionHandle[] = [];

  constructor(private environment: AppConfigService, private store: Store<fromRoot.State>) {
    let apiUrl = environment.config.apiUrl;
    this.cometd.configure('http://localhost:8080/cometd');

    this.startConnection();
  }
(...)
}
</code>```

Body:
I wanted to be able to set environment variables at runtime and so I followed this tutorial. However, when I try to use a variable, the URL breaks and redirects me to e.g. localhost:8080/index.html#/foo instead of localhost:8080/#/foo. This happens when I try to use the variable as a class field:

export class CometdService implements OnDestroy {

  protected cometd: CometDExtended = new cometlib.CometD() as CometDExtended;

  private subscriptions: cometlib.SubscriptionHandle[] = [];

  apiUrl: string;

  constructor(private environment: AppConfigService, private store: Store<fromRoot.State>) {
    this.apiUrl = environment.config.apiUrl;
    this.cometd.configure('http://localhost:8080/cometd');

    this.startConnection();
  }
(...)
}

or pass it into a path like so:

export class CometdService implements OnDestroy {

  protected cometd: CometDExtended = new cometlib.CometD() as CometDExtended;

  private subscriptions: cometlib.SubscriptionHandle[] = [];

  constructor(private environment: AppConfigService, private store: Store<fromRoot.State>) {
    this.cometd.configure(`http://${environment.config.apiUrl}/cometd`);

    this.startConnection();
  }
(...)
}

but not when I just instantiate a variable in the constructor:

export class CometdService implements OnDestroy {

  protected cometd: CometDExtended = new cometlib.CometD() as CometDExtended;

  private subscriptions: cometlib.SubscriptionHandle[] = [];

  constructor(private environment: AppConfigService, private store: Store<fromRoot.State>) {
    let apiUrl = environment.config.apiUrl;
    this.cometd.configure('http://localhost:8080/cometd');

    this.startConnection();
  }
(...)
}


问:
display different object types on a power point slide using RMarkdown
I want to save different objects on a powerpoint slide and generate a deck using RMarkdown.

I found Side-by-side plots with ggplot2 to display two ggplot, but it did not work for plotly images.

My use case would like to combine

up to 3 flextables

plotly image

text box with specific location

our current solution is to save each as images and write them to a ppt, but this is not optimal.

My sample rmd is here:

```<code>---
title: "Untitled"
output: powerpoint_presentation
date: "2023-01-13"
---

```{r setup, include=FALSE}
library(flextable)
library(tidyverse)
library(plotly)
knitr::opts_chunk$set(echo = FALSE)
```

## Slide with R Output

```{r echo = FALSE}
df = data.frame(col1="brocolli", col2 = "and spinach and kale and peas and lettuce")
df %>%
  flextable() %>%
  fontsize(part = "all", size = 7) %>%
  width(2,5)
```

##
```{r echo = FALSE}
df = data.frame(col1="Apples", col2 = "and bananas and oranges and pears and pinapple")
df %>%
  flextable() %>%
  fontsize(part = "all", size = 7) %>%
  width(2,5)
```

## Slide with Plot

```{r pressure}

trace_0 <- rnorm(100, mean = 5)
trace_1 <- rnorm(100, mean = 0)
trace_2 <- rnorm(100, mean = -5)
x <- c(1:100)

data <- data.frame(x, trace_0, trace_1, trace_2)

fig <- plot_ly(data, x = ~x, y = ~trace_0, name = 'trace 0', type = 'scatter', mode = 'lines')
fig <- fig %>% add_trace(y = ~trace_1, name = 'trace 1', mode = 'lines+markers')
fig <- fig %>% add_trace(y = ~trace_2, name = 'trace 2', mode = 'markers')

fig
```

```{r}

df = data.frame(matrix(round(rnorm(150),2), ncol = 10))
df %>%
  flextable() %>%
  fontsize(part = "all", size = 7)
```
</code>```

result after I save each table/plot as png and save into single ppt slide is here (ignore the text in red, just for clarity where each chunk placed and where textbox would be added)

Are there any suggestions on if it is possible to include all the objects on a single slide?

Body:
I want to save different objects on a powerpoint slide and generate a deck using RMarkdown.

I found Side-by-side plots with ggplot2 to display two ggplot, but it did not work for plotly images.

My use case would like to combine

up to 3 flextables

plotly image

text box with specific location

our current solution is to save each as images and write them to a ppt, but this is not optimal.

My sample rmd is here:

---
title: "Untitled"
output: powerpoint_presentation
date: "2023-01-13"
---

```{r setup, include=FALSE}
library(flextable)
library(tidyverse)
library(plotly)
knitr::opts_chunk$set(echo = FALSE)
```

## Slide with R Output

```{r echo = FALSE}
df = data.frame(col1="brocolli", col2 = "and spinach and kale and peas and lettuce")
df %>%
  flextable() %>%
  fontsize(part = "all", size = 7) %>%
  width(2,5)
```

##
```{r echo = FALSE}
df = data.frame(col1="Apples", col2 = "and bananas and oranges and pears and pinapple")
df %>%
  flextable() %>%
  fontsize(part = "all", size = 7) %>%
  width(2,5)
```

## Slide with Plot

```{r pressure}

trace_0 <- rnorm(100, mean = 5)
trace_1 <- rnorm(100, mean = 0)
trace_2 <- rnorm(100, mean = -5)
x <- c(1:100)

data <- data.frame(x, trace_0, trace_1, trace_2)

fig <- plot_ly(data, x = ~x, y = ~trace_0, name = 'trace 0', type = 'scatter', mode = 'lines')
fig <- fig %>% add_trace(y = ~trace_1, name = 'trace 1', mode = 'lines+markers')
fig <- fig %>% add_trace(y = ~trace_2, name = 'trace 2', mode = 'markers')

fig
```

```{r}

df = data.frame(matrix(round(rnorm(150),2), ncol = 10))
df %>%
  flextable() %>%
  fontsize(part = "all", size = 7)
```

result after I save each table/plot as png and save into single ppt slide is here (ignore the text in red, just for clarity where each chunk placed and where textbox would be added)

Are there any suggestions on if it is possible to include all the objects on a single slide?